diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 4ce60c4..55d6bcd 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -29,6 +29,9 @@ spec: path: / port: http volumeMounts: + - name: config-volume + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf {{- if .Values.configMap.enabled }} - name: config-volume mountPath: /usr/share/nginx/html/slides @@ -38,6 +41,9 @@ spec: mountPath: {{ .mountPath }} {{- end }} volumes: + - name: config-volume + configMap: + name: nginx-config {{- if .Values.configMap.enabled }} - name: config-volume configMap: diff --git a/helm/templates/configmap.yaml b/helm/templates/nginx-configmap.yaml similarity index 100% rename from helm/templates/configmap.yaml rename to helm/templates/nginx-configmap.yaml diff --git a/helm/templates/slides-configmap copy.yaml b/helm/templates/slides-configmap copy.yaml new file mode 100644 index 0000000..3db79b9 --- /dev/null +++ b/helm/templates/slides-configmap copy.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-conf +data: + nginx.conf: | + user nginx; + worker_processes auto; + + error_log /var/log/nginx/error.log notice; + pid /var/run/nginx.pid; + + events { + worker_connections 1024; + } + + http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; + }