Skip to content

Commit

Permalink
add confd configmap
Browse files Browse the repository at this point in the history
  • Loading branch information
Syntax3rror404 committed Jan 11, 2024
1 parent 31809b8 commit 4e66d37
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
5 changes: 5 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
29 changes: 29 additions & 0 deletions helm/templates/nginx-conf-configmap.yaml
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
name: nginx-confd
data:
nginx.conf: |
user nginx;
Expand Down

0 comments on commit 4e66d37

Please sign in to comment.