Skip to content
Snippets Groups Projects
Commit b67d6662 authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

refactored helm

parent 7a4ba0f6
No related branches found
No related tags found
No related merge requests found
{{ range .Values.http_proxies }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .name }}-config
data:
nginx.conf: |-
server {
listen 80;
server_name localhost;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass {{ .proxy_pass }};
proxy_buffering off;
client_max_body_size 0;
proxy_connect_timeout 3600s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
}
}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .name }}-service
namespace: {{ .namespace }}
spec:
selector:
app: {{ .name }}
ports:
- protocol: TCP
port: {{ .port }}
targetPort: {{ .port }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .name }}-deployment
namespace: {{ .namespace }}
labels:
app: {{ .name }}
spec:
replicas: {{ .replicas }}
selector:
matchLabels:
app: {{ .name }}
template:
metadata:
labels:
app: {{ .name }}
spec:
containers:
- name: {{ .name }}
image: nginx:1.21.0
ports:
- containerPort: {{ .port }}
resources:
{{ toYaml .resources | nindent 10 }}
volumeMounts:
- mountPath: /etc/nginx/conf.d
name: config
volumes:
- name: config
configMap:
name: {{ .name }}-config
{{ end }}
\ No newline at end of file
certificates: certificates:
- name: something - name: grafana
# namespace: istio-system (default) commonName: grafana.maze.sch.bme.hu
commonName: xy.maze.sch.bme.hu
# dnsNames: (default: commonName) - name: kiali
# - xya.maze.sch.bme.hu commonName: kiali.maze.sch.bme.hu
# - xxy.maze.sch.bme.hu
# issuerRef_name: letsencrypt-issuer (default) - name: hello
commonName: hello.maze.sch.bme.hu
- name: pve
commonName: pve.maze.sch.bme.hu
- name: pfsense
commonName: pfsense.maze.sch.bme.hu
gateways: gateways:
- name: something - name: grafana
namespace: somespace namespace: istio-system
kind: simple-https kind: simple-https
credentialName: xy-cert credentialName: grafana-cert
host: xy.maze.sch.bme.hu host: grafana.maze.sch.bme.hu
- name: somewhat - name: kiali
namespace: somespace namespace: istio-system
servers: kind: simple-https
- port: credentialName: kiali-cert
number: 443 host: kiali.maze.sch.bme.hu
name: https
protocol: HTTPS - name: hello
tls: namespace: deploy
mode: SIMPLE kind: simple-https
credentialName: epic-cert credentialName: hello-cert
hosts: host: hello.maze.sch.bme.hu
- epic.maze.sch.bme.hu
- name: pve
namespace: deploy
kind: simple-https
credentialName: pve-cert
host: pve.maze.sch.bme.hu
- name: pfsense
namespace: deploy
kind: simple-https
credentialName: pfsense-cert
host: pfsense.maze.sch.bme.hu
virtualservices: virtualservices:
- name: something - name: grafana
namespace: somespace namespace: istio-system
kind: simple-https kind: simple-https
host: xy.maze.sch.bme.hu host: grafana.maze.sch.bme.hu
destination: destination:
host: xy host: grafana
port: { number: 8080 } port: { number: 3000 }
- name: somewhat - name: kiali
namespace: somespace namespace: istio-system
spec: kind: simple-https
hosts: host: kiali.maze.sch.bme.hu
- xy.maze.sch.bme.hu destination:
gateways: host: kiali
- somewhat-gw port: { number: 20001 }
http:
- match: - name: hello
- uri: namespace: deploy
prefix: / kind: simple-https
route: host: hello.maze.sch.bme.hu
- destination: destination:
host: service host: hello
port: port: { number: 80 }
number: 8080
- name: pve
namespace: deploy
kind: simple-https
host: pve.maze.sch.bme.hu
destination:
host: pve-nginx-proxy-service
port: { number: 80 }
- name: pfsense
namespace: deploy
kind: simple-https
host: pfsense.maze.sch.bme.hu
destination:
host: pfsense-nginx-proxy-service
port: { number: 80 }
http_proxies:
- name: pve-nginx-proxy
replicas: 1
port: 80
namespace: deploy
resources:
requests:
memory: "256Mi"
cpu: "150m"
limits:
memory: "512Mi"
cpu: "300m"
proxy_pass: https://192.168.96.1:8006
- name: pfsense-nginx-proxy
replicas: 1
port: 80
namespace: deploy
resources:
requests:
memory: "256Mi"
cpu: "150m"
limits:
memory: "512Mi"
cpu: "300m"
proxy_pass: https://192.168.99.254
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment