Skip to content

Commit

Permalink
common addition
Browse files Browse the repository at this point in the history
  • Loading branch information
ssyno committed Jan 15, 2024
1 parent 9a3ee08 commit 658f486
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 12 deletions.
4 changes: 3 additions & 1 deletion helm/dex-app/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
application.giantswarm.io/team: {{ index .Chart.Annotations "application.giantswarm.io/team" | quote }}
giantswarm.io/service-type: "managed"
{{- end -}}

{{- define "dex-app.labels.common" -}}
{{ include "dex-app.labels.selector" . }}
{{- end -}}
{{/*
Selector dex labels
*/}}
Expand Down
2 changes: 1 addition & 1 deletion helm/dex-app/templates/dex/certs-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: kubernetes.io/tls
metadata:
labels:
{{- include "dex.labels.common" . | nindent 4 }}
{{- include "dex-app.labels.selector" . | nindent 4 }}
{{- include "dex-app.labels.common" . | nindent 4 }}
name: {{ include "resource.dex.name" . }}-tls
data:
ca.crt: {{ .Values.ingress.tls.caPemB64 | quote }}
Expand Down
4 changes: 2 additions & 2 deletions helm/dex-app/templates/dex/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ClusterRole
metadata:
labels:
{{- include "dex.labels.common" . | nindent 4 }}
{{- include "dex-app.labels.selector" . | nindent 4 }}
{{- include "dex-app.labels.common" . | nindent 4 }}
name: {{ include "resource.dex.name" . }}
rules:
- apiGroups: ["dex.coreos.com"] # API group created by dex
Expand All @@ -27,7 +27,7 @@ metadata:
name: {{ include "resource.dex.name" . }}-metrics
labels:
{{- include "dex.labels.common" . | nindent 4 }}
{{- include "dex-app.labels.selector" . | nindent 4 }}
{{- include "dex-app.labels.common" . | nindent 4 }}
rules:
- nonResourceURLs:
- "/metrics"
Expand Down
2 changes: 1 addition & 1 deletion helm/dex-app/templates/dex/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ClusterRoleBinding
metadata:
labels:
{{- include "dex.labels.common" . | nindent 4 }}
{{- include "dex-app.labels.selector" . | nindent 4 }}
{{- include "dex-app.labels.common" . | nindent 4 }}
name: {{ include "resource.dex.name" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down
5 changes: 3 additions & 2 deletions helm/dex-app/templates/dex/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: {{ include "resource.dex.name" . }}
labels:
{{- include "dex.labels.common" . | nindent 4 }}
{{- include "dex-app.labels.selector" . | nindent 4 }}
{{- include "dex-app.labels.common" . | nindent 4 }}
annotations:
app.giantswarm.io/secret-checksum: {{ include (print .Template.BasePath "/dex/secret.yaml") . | sha256sum | quote }}
spec:
Expand All @@ -17,11 +17,12 @@ spec:
selector:
matchLabels:
{{- include "dex.labels.selector" . | nindent 6 }}
{{- include "dex-app.labels.selector" . | nindent 6 }}
template:
metadata:
labels:
{{- include "dex.labels.common" . | nindent 8 }}
{{- include "dex-app.labels.selector" . | nindent 8 }}
{{- include "dex-app.labels.common" . | nindent 8 }}
annotations:
checksum/config: {{ include (print .Template.BasePath "/dex/secret.yaml") . | sha256sum | quote }}
spec:
Expand Down
2 changes: 1 addition & 1 deletion helm/dex-app/templates/dex/np.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: {{ include "resource.dex.networkPolicy.name" . }}
labels:
{{- include "dex.labels.common" . | nindent 4 }}
{{- include "dex-app.labels.selector" . | nindent 4 }}
{{- include "dex-app.labels.common" . | nindent 4 }}
spec:
podSelector:
matchLabels:
Expand Down
2 changes: 1 addition & 1 deletion helm/dex-app/templates/dex/psp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: PodSecurityPolicy
metadata:
labels:
{{- include "dex.labels.common" . | nindent 4 }}
{{- include "dex-app.labels.selector" . | nindent 4 }}
{{- include "dex-app.labels.common" . | nindent 4 }}
name: {{ include "resource.dex.psp.name" . }}
spec:
privileged: false
Expand Down
2 changes: 1 addition & 1 deletion helm/dex-app/templates/dex/service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: {{ include "resource.dex.name" . }}
labels:
{{- include "dex.labels.common" . | nindent 4 }}
{{- include "dex-app.labels.selector" . | nindent 4 }}
{{- include "dex-app.labels.common" . | nindent 4 }}
spec:
endpoints:
- path: /metrics
Expand Down
2 changes: 1 addition & 1 deletion helm/dex-app/templates/dex/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: {{ include "resource.dex.name" . }}
labels:
{{- include "dex.labels.common" . | nindent 4 }}
{{- include "dex-app.labels.selector" . | nindent 4 }}
{{- include "dex-app.labels.common" . | nindent 4 }}
giantswarm.io/monitoring: "true"
annotations:
giantswarm.io/monitoring-path: "/metrics"
Expand Down
2 changes: 1 addition & 1 deletion helm/dex-app/templates/dex/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ kind: ServiceAccount
metadata:
labels:
{{- include "dex.labels.common" . | nindent 4 }}
{{- include "dex-app.labels.selector" . | nindent 4 }}
{{- include "dex-app.labels.common" . | nindent 4 }}
name: {{ include "resource.dex.name" . }}

0 comments on commit 658f486

Please sign in to comment.