diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 49c0696..691547d 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -32,6 +32,8 @@ spec: - name: config-volume mountPath: /etc/nginx/nginx.conf subPath: nginx.conf + - name: confd-volume + mountPath: /etc/nginx/conf.d {{- if .Values.configMap.enabled }} - name: config-volume mountPath: /usr/share/nginx/html/slides @@ -44,6 +46,9 @@ spec: - name: config-volume configMap: name: nginx-conf + - name: confd-volume + configMap: + name: nginx-confd {{- if .Values.configMap.enabled }} - name: config-volume configMap: diff --git a/helm/templates/nginx-conf-configmap.yaml b/helm/templates/nginx-conf-configmap.yaml new file mode 100644 index 0000000..8fe0319 --- /dev/null +++ b/helm/templates/nginx-conf-configmap.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-conf +data: + default.conf: | + server { + listen 80; + listen [::]:80; + server_name localhost; + + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + } \ No newline at end of file diff --git a/helm/templates/nginxdotconf-configmap.yaml b/helm/templates/nginx-confd-configmap.yaml.yaml similarity index 97% rename from helm/templates/nginxdotconf-configmap.yaml rename to helm/templates/nginx-confd-configmap.yaml.yaml index 3db79b9..23a6e52 100644 --- a/helm/templates/nginxdotconf-configmap.yaml +++ b/helm/templates/nginx-confd-configmap.yaml.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: nginx-conf + name: nginx-confd data: nginx.conf: | user nginx;