This will keep static files in sync during upgrades and rollbacks
@@ -34,6 +34,17 @@ spec:
initialDelaySeconds: 3
periodSeconds: 3
failureThreshold: 30
+{{ if .Values.balancer.enabled }}
+ - name: nginx
+ image: {{ .Values.image.registry }}/nginx:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ ports:
+ - containerPort: 80
+ volumeMounts:
+ - name: nginx-config
+ mountPath: /etc/nginx/sites-available/hue
+ subPath: hue
+{{ end }}
volumes:
- name: config-volume
configMap:
@@ -41,3 +52,8 @@ spec:
- name: config-volume-extra
name: hue-config-extra
+ configMap:
+ name: nginx-config
@@ -1,30 +0,0 @@
-{{- if .Values.balancer.enabled -}}
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: nginx-hue
-spec:
- selector:
- matchLabels:
- app: nginx
- replicas: 1
- template:
- metadata:
- labels:
- spec:
- containers:
- - name: nginx
- image: {{ .Values.image.registry }}/nginx:{{ .Values.image.tag }}
- imagePullPolicy: {{ .Values.image.pullPolicy }}
- ports:
- - containerPort: 80
- volumeMounts:
- - name: nginx-config
- mountPath: /etc/nginx/sites-available/hue
- subPath: hue
- volumes:
- configMap:
- name: nginx-config
-{{- end -}}
@@ -7,7 +7,7 @@ spec:
type: NodePort
# type: LoadBalancer
selector:
+ pod: hue
ports:
- protocol: TCP
port: 80