Skip to content

Commit 14ff8fd

Browse files
committed
chore: add container security context to admission webhook jobs (newrelic#619)
1 parent 09329f1 commit 14ff8fd

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### enhancements
11+
- Pass container security context into admission webhooks @kondracek-nr [#619](https://github.com/newrelic/k8s-metadata-injection/pull/619)
12+
1013
## v1.33.1 - 2025-05-05
1114

1215
### ⛓️ Dependencies

charts/nri-metadata-injection/templates/admission-webhooks/job-patch/job-createSecret.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ spec:
3030
- name: create
3131
image: {{ include "newrelic.common.images.image" ( dict "defaultRegistry" "registry.k8s.io" "imageRoot" .Values.jobImage "context" .) }}
3232
imagePullPolicy: {{ .Values.jobImage.pullPolicy }}
33+
{{- with include "newrelic.common.securityContext.container" . }}
34+
securityContext:
35+
{{- . | nindent 12 }}
36+
{{- end }}
3337
args:
3438
- create
3539
- --host={{ include "newrelic.common.naming.fullname" . }},{{ include "newrelic.common.naming.fullname" . }}.{{ .Release.Namespace }}.svc

charts/nri-metadata-injection/templates/admission-webhooks/job-patch/job-patchWebhook.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ spec:
3030
- name: patch
3131
image: {{ include "newrelic.common.images.image" ( dict "defaultRegistry" "registry.k8s.io" "imageRoot" .Values.jobImage "context" .) }}
3232
imagePullPolicy: {{ .Values.jobImage.pullPolicy }}
33+
{{- with include "newrelic.common.securityContext.container" . }}
34+
securityContext:
35+
{{- . | nindent 12 }}
36+
{{- end }}
3337
args:
3438
- patch
3539
- --webhook-name={{ include "newrelic.common.naming.fullname" . }}

0 commit comments

Comments
 (0)