Skip to content

Commit 8695c96

Browse files
dpacheconrclaude
andcommitted
feat: add global.images.pullSecrets support to k8s-agents-operator
Add support for cascade imagePullSecrets from global.images.pullSecrets: - Added pullSecrets configuration to controllerManager.manager.image in values.yaml - Added imagePullSecrets rendering in deployment.yaml that respects both global.images.pullSecrets (takes precedence) and chart-level pullSecrets - Pattern: Concatenates global and chart-level pullSecrets, uses common library renderPullSecrets helper for consistent formatting Configuration hierarchy: 1. global.images.pullSecrets (applied first) 2. controllerManager.manager.image.pullSecrets (applied second) Both sources are combined to support flexible secret management. 🤖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
1 parent b3beb5e commit 8695c96

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

charts/k8s-agents-operator/templates/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ spec:
2626
hostNetwork: {{ .Values.hostNetwork }}
2727
{{- end }}
2828
serviceAccountName: {{ include "newrelic.common.serviceAccount.name" . }}
29+
{{- $globalPullSecrets := .Values.global.images.pullSecrets | default list }}
30+
{{- $chartPullSecrets := .Values.controllerManager.manager.image.pullSecrets | default list }}
31+
{{- if or $globalPullSecrets $chartPullSecrets }}
32+
{{- with include "newrelic.common.images.renderPullSecrets" ( dict "pullSecrets" (concat $globalPullSecrets $chartPullSecrets) "context" .) }}
33+
imagePullSecrets:
34+
{{- . | nindent 8 }}
35+
{{- end }}
36+
{{- end }}
2937
{{- with include "newrelic.common.securityContext.pod" . }}
3038
securityContext:
3139
{{- . | nindent 8 }}

charts/k8s-agents-operator/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ controllerManager:
5757
# -- Sets the manager image version to retrieve. Could be a tag i.e. "v0.17.0" or a SHA digest i.e. "sha256:e2399e70e99ac370ca6a3c7e5affa9655da3b246d0ada77c40ed155b3726ee2e"
5858
version:
5959
pullPolicy:
60+
# -- The secrets that are needed to pull images from a custom registry. Can be configured also with `global.images.pullSecrets`
61+
pullSecrets: []
6062
resources:
6163
limits:
6264
cpu: 500m

0 commit comments

Comments
 (0)