Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Controller name value for app selectors In Release 1.5 #593

Merged
merged 1 commit into from
Jun 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions deployments/helm-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,10 @@ Expand wildcard TLS name.
{{- define "nginx-ingress.wildcardTLSName" -}}
{{- printf "%s-%s" (include "nginx-ingress.name" .) "wildcard-tls-secret" -}}
{{- end -}}

{{/*
Expand app name.
*/}}
{{- define "nginx-ingress.appName" -}}
{{- default (include "nginx-ingress.name" .) .Values.controller.name -}}
{{- end -}}
4 changes: 2 additions & 2 deletions deployments/helm-chart/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ metadata:
spec:
selector:
matchLabels:
app: {{ include "nginx-ingress.name" . }}
app: {{ include "nginx-ingress.appName" . }}
template:
metadata:
labels:
app: {{ include "nginx-ingress.name" . }}
app: {{ include "nginx-ingress.appName" . }}
{{- if or (.Values.prometheus.create) (.Values.controller.pod.annotations) }}
annotations:
{{- if .Values.prometheus.create }}
Expand Down
4 changes: 2 additions & 2 deletions deployments/helm-chart/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ spec:
replicas: {{ .Values.controller.replicaCount }}
selector:
matchLabels:
app: {{ include "nginx-ingress.name" . }}
app: {{ include "nginx-ingress.appName" . }}
template:
metadata:
labels:
app: {{ include "nginx-ingress.name" . }}
app: {{ include "nginx-ingress.appName" . }}
{{- if or (.Values.prometheus.create) (.Values.controller.pod.annotations) }}
annotations:
{{- if .Values.prometheus.create }}
Expand Down
2 changes: 1 addition & 1 deletion deployments/helm-chart/templates/controller-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
{{- end }}
{{- end }}
selector:
app: {{ include "nginx-ingress.name" . }}
app: {{ include "nginx-ingress.appName" . }}
{{- if .Values.controller.service.externalIPs }}
externalIPs:
{{ toYaml .Values.controller.service.externalIPs | indent 4 }}
Expand Down