Skip to content

Commit 965804d

Browse files
authored
Making Nginx optional (#32)
* making nginx an optional component based on an enabled flag in config.yaml Signed-off-by: Ken Haines <[email protected]> * updating ingress to only be enabled if nginx is, in addition to the previous check Signed-off-by: Ken Haines <[email protected]>
1 parent 5ab206d commit 965804d

File tree

5 files changed

+8
-1
lines changed

5 files changed

+8
-1
lines changed

templates/ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.ingress.enabled -}}
1+
{{- if and .Values.ingress.enabled .Values.nginx.enabled -}}
22
{{- $fullName := include "cortex.fullname" . -}}
33
{{- $svcPort := .Values.nginx.service.port -}}
44
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}

templates/nginx-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.nginx.enabled }}
12
kind: ConfigMap
23
apiVersion: v1
34
metadata:
@@ -56,3 +57,4 @@ data:
5657
}
5758
}
5859
}
60+
{{- end}}

templates/nginx-dep.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.nginx.enabled }}
12
apiVersion: apps/v1
23
kind: Deployment
34
metadata:
@@ -96,3 +97,4 @@ spec:
9697
{{- if .Values.nginx.extraVolumes }}
9798
{{ toYaml .Values.nginx.extraVolumes | indent 8}}
9899
{{- end }}
100+
{{- end}}

templates/nginx-svc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.nginx.enabled }}
12
apiVersion: v1
23
kind: Service
34
metadata:
@@ -23,3 +24,4 @@ spec:
2324
selector:
2425
app: {{ template "cortex.name" . }}-nginx
2526
release: {{ .Release.Name }}
27+
{{- end }}

values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ configs:
764764
env: []
765765

766766
nginx:
767+
enabled: true
767768
replicas: 2
768769
http_listen_port: 80
769770
config:

0 commit comments

Comments
 (0)