Skip to content

Commit

Permalink
feat: Add commonLabels to Deployments (#3684)
Browse files Browse the repository at this point in the history
Signed-off-by: Anlan Du <[email protected]>
Signed-off-by: Wyatt Fry <[email protected]>
Co-authored-by: Anlan Du <[email protected]>
Co-authored-by: alex <[email protected]>
Co-authored-by: Sertaç Özercan <[email protected]>
Co-authored-by: Rita Zhang <[email protected]>
Co-authored-by: Jaydip Gabani <[email protected]>
  • Loading branch information
6 people authored Nov 13, 2024
1 parent 887c1ab commit 9f1555a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/build/helmify/kustomize-for-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ kind: Deployment
metadata:
name: gatekeeper-controller-manager
namespace: gatekeeper-system
labels:
HELMSUBST_DEPLOYMENT_LABELS: ""
spec:
replicas: HELMSUBST_DEPLOYMENT_REPLICAS
revisionHistoryLimit: HELMSUBST_DEPLOYMENT_REVISION_HISTORY_LIMIT
Expand Down Expand Up @@ -154,6 +156,8 @@ kind: Deployment
metadata:
name: gatekeeper-audit
namespace: gatekeeper-system
labels:
HELMSUBST_DEPLOYMENT_LABELS: ""
spec:
revisionHistoryLimit: HELMSUBST_DEPLOYMENT_REVISION_HISTORY_LIMIT
template:
Expand Down
2 changes: 2 additions & 0 deletions cmd/build/helmify/replacements.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ var replacements = map[string]string{

"HELMSUBST_DEPLOYMENT_REPLICAS": `{{ .Values.replicas }}`,

`HELMSUBST_DEPLOYMENT_LABELS: ""`: `{{- include "gatekeeper.commonLabels" . | nindent 4 }}`,

"HELMSUBST_DEPLOYMENT_REVISION_HISTORY_LIMIT": `{{ .Values.revisionHistoryLimit }}`,

`HELMSUBST_ANNOTATIONS: ""`: `{{- if .Values.podAnnotations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
{{- include "gatekeeper.commonLabels" . | nindent 4 }}
app: '{{ template "gatekeeper.name" . }}'
chart: '{{ template "gatekeeper.name" . }}'
control-plane: audit-controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
{{- include "gatekeeper.commonLabels" . | nindent 4 }}
app: '{{ template "gatekeeper.name" . }}'
chart: '{{ template "gatekeeper.name" . }}'
control-plane: controller-manager
Expand Down

0 comments on commit 9f1555a

Please sign in to comment.