Skip to content

Commit

Permalink
feat: Update audit and controller manager with pod labels (#3240)
Browse files Browse the repository at this point in the history
Signed-off-by: James Bruce <james.bruce@ba.com>
Co-authored-by: Rita Zhang <rita.z.zhang@gmail.com>
  • Loading branch information
James Bruce and ritazh committed Feb 6, 2024
1 parent e4853bb commit 902a1b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/build/helmify/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (ks *kindSet) Write() error {
}

if kind == DeploymentKind {
obj = strings.Replace(obj, " labels:", " labels:\n{{- include \"gatekeeper.podLabels\" . | nindent 8 }}", 1)
obj = strings.Replace(obj, " labels:", " labels:\n {{- include \"gatekeeper.podLabels\" . | nindent 8 }}\n {{- include \"gatekeeper.commonLabels\" . | nindent 8 }}", 1)
}

if name == "gatekeeper-manager-role" && kind == "Role" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ spec:
{{- toYaml .Values.auditPodAnnotations | trim | nindent 8 }}
{{- end }}
labels:
{{- include "gatekeeper.podLabels" . | nindent 8 }}
{{- include "gatekeeper.podLabels" . | nindent 8 }}
{{- include "gatekeeper.commonLabels" . | nindent 8 }}
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 @@ -32,7 +32,8 @@ spec:
{{- toYaml .Values.podAnnotations | trim | nindent 8 }}
{{- end }}
labels:
{{- include "gatekeeper.podLabels" . | nindent 8 }}
{{- include "gatekeeper.podLabels" . | nindent 8 }}
{{- include "gatekeeper.commonLabels" . | nindent 8 }}
app: '{{ template "gatekeeper.name" . }}'
chart: '{{ template "gatekeeper.name" . }}'
control-plane: controller-manager
Expand Down

0 comments on commit 902a1b4

Please sign in to comment.