-
Notifications
You must be signed in to change notification settings - Fork 65
feat: Allow Setting Image Registry and Pull Secrets Globally #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -141,3 +141,23 @@ Return true if a secret object should be created | |||||||||||||
| key: "password" | ||||||||||||||
| {{- end -}} | ||||||||||||||
| {{- end -}} | ||||||||||||||
|
|
||||||||||||||
| {{- define "openfga.pullSecrets" -}} | ||||||||||||||
| {{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image .Values.initContainer) "context" $) -}} | ||||||||||||||
| {{- end }} | ||||||||||||||
|
|
||||||||||||||
| {{/* | ||||||||||||||
| Job does not use the initContainer image, so by the least-priviledge principle, we do not need to include its pull | ||||||||||||||
| secrets. | ||||||||||||||
| */}} | ||||||||||||||
| {{- define "openfga.jobPullSecrets" -}} | ||||||||||||||
| {{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image) "context" $) -}} | ||||||||||||||
| {{- end }} | ||||||||||||||
|
Comment on lines
+153
to
+155
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix incorrect context parameter in job helper template. Same issue as in Apply this diff: {{- define "openfga.jobPullSecrets" -}}
-{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image) "context" $) -}}
+{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image) "context" .) -}}
{{- end }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
| {{- define "openfga.image" -}} | ||||||||||||||
| {{- include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global "chart" .Chart) -}} | ||||||||||||||
| {{- end }} | ||||||||||||||
|
|
||||||||||||||
| {{- define "openfga.initContainer.image" -}} | ||||||||||||||
| {{- include "common.images.image" (dict "imageRoot" .Values.initContainer "global" .Values.global) -}} | ||||||||||||||
| {{- end }} | ||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect context parameter in helper template.
The
openfga.pullSecretshelper passes$(root context at template definition) instead of.(current context) tocommon.images.renderPullSecrets. This will cause the helper to receive the wrong context and fail to properly resolve image pull secrets.Apply this diff to fix the context parameter:
{{- define "openfga.pullSecrets" -}} -{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image .Values.initContainer) "context" $) -}} +{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image .Values.initContainer) "context" .) -}} {{- end }}📝 Committable suggestion
🤖 Prompt for AI Agents