Skip to content

Commit

Permalink
Fixes the annotations in deployments and services (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
victornoel authored and travisgroth committed Jan 18, 2020
1 parent ec70b0c commit b8f73a1
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 44 deletions.
2 changes: 1 addition & 1 deletion charts/pomerium/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: pomerium
version: 4.2.0
version: 4.2.1
appVersion: 0.5.2
home: http://www.pomerium.io/
icon: https://www.pomerium.io/logo.svg
Expand Down
20 changes: 11 additions & 9 deletions charts/pomerium/templates/authenticate-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ metadata:
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
annotations:
{{- if .Values.authenticate.service.annotations }}
{{- range $key, $value := .Values.authenticate.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.service.annotations }}
{{- range $key, $value := .Values.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if or .Values.authenticate.service.annotations .Values.service.annotations }}
annotations:
{{- if .Values.authenticate.service.annotations }}
{{- range $key, $value := .Values.authenticate.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.service.annotations }}
{{- range $key, $value := .Values.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.service.type }}
Expand Down
18 changes: 10 additions & 8 deletions charts/pomerium/templates/authorize-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: authorize
name: {{ template "pomerium.authorize.fullname" . }}
{{- if or .Values.authorize.deployment.annotations .Values.annotations }}
annotations:
{{- if .Values.authorize.deployment.annotations }}
{{- range $key, $value := .Values.authorize.deployment.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.annotations }}
{{- range $key, $value := .Values.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.authorize.deployment.annotations }}
{{- range $key, $value := .Values.authorize.deployment.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.annotations }}
{{- range $key, $value := .Values.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
spec:
replicas: {{ default .Values.replicaCount .Values.authorize.replicaCount }}
Expand Down
20 changes: 11 additions & 9 deletions charts/pomerium/templates/authorize-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ metadata:
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
annotations:
{{- if .Values.authorize.service.annotations }}
{{- range $key, $value := .Values.authorize.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.service.annotations }}
{{- range $key, $value := .Values.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if or .Values.authorize.service.annotations .Values.service.annotations }}
annotations:
{{- if .Values.authorize.service.annotations }}
{{- range $key, $value := .Values.authorize.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.service.annotations }}
{{- range $key, $value := .Values.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
spec:
{{- if .Values.service.authorize.headless }}
Expand Down
18 changes: 10 additions & 8 deletions charts/pomerium/templates/proxy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: proxy
name: {{ template "pomerium.proxy.fullname" . }}
{{- if or .Values.proxy.deployment.annotations .Values.annotations }}
annotations:
{{- if .Values.proxy.deployment.annotations }}
{{- range $key, $value := .Values.proxy.deployment.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.annotations }}
{{- range $key, $value := .Values.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.proxy.deployment.annotations }}
{{- range $key, $value := .Values.proxy.deployment.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.annotations }}
{{- range $key, $value := .Values.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
spec:
replicas: {{ default .Values.replicaCount .Values.proxy.replicaCount }}
Expand Down
20 changes: 11 additions & 9 deletions charts/pomerium/templates/proxy-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ metadata:
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
annotations:
{{- if .Values.proxy.service.annotations }}
{{- range $key, $value := .Values.proxy.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.service.annotations }}
{{- range $key, $value := .Values.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if or .Values.proxy.service.annotations .Values.service.annotations }}
annotations:
{{- if .Values.proxy.service.annotations }}
{{- range $key, $value := .Values.proxy.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.service.annotations }}
{{- range $key, $value := .Values.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.service.type }}
Expand Down

0 comments on commit b8f73a1

Please sign in to comment.