Skip to content

Commit

Permalink
Fix script pod image pull policy env var (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
APErebus authored Dec 16, 2024
1 parent 9bc9861 commit 897f59b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/violet-paws-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kubernetes-agent": patch
---

Fix scriptPods.image.pullPolicy not working
8 changes: 4 additions & 4 deletions charts/kubernetes-agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ The Env-var block required to set image name, tag and pullpolicy
{{- define "kubernetes-agent.scriptPodEnvVars" -}}
{{- if .repository }}
- name: "OCTOPUS__K8STENTACLE__SCRIPTPODIMAGE"
value: {{ .repository | quote}}
value: {{ .repository | quote }}
{{- end }}
{{- if .tag }}
- name: "OCTOPUS__K8STENTACLE__SCRIPTPODIMAGETAG"
value: {{ .tag | quote}}
value: {{ .tag | quote }}
{{- end }}
{{- if .pullPolicy }}
- name: "OCTOPUS__K8STENTACLE__SCRIPTPODIMAGEPULLPOLICY"
value: {{ .pullPolicy | quote}}
- name: "OCTOPUS__K8STENTACLE__SCRIPTPODPULLPOLICY"
value: {{ .pullPolicy | quote }}
{{- end }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/kubernetes-agent/templates/tentacle-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ spec:
- name: "OCTOPUS__K8STENTACLE__PODSERVICEACCOUNTNAME"
value: {{ include "kubernetes-agent.scriptPodServiceAccountName" . | quote }}
- name: "OCTOPUS__K8STENTACLE__PODVOLUMECLAIMNAME"
value: {{ (include "kubernetes-agent.pvcName" .) | quote}}
value: {{ (include "kubernetes-agent.pvcName" .) | quote }}
- name: "OCTOPUS__K8STENTACLE__HELMRELEASENAME"
value: {{ .Release.Name | quote}}
- name: "OCTOPUS__K8STENTACLE__HELMCHARTVERSION"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ tests:
path: spec.template.spec.containers[0].env[?(@.name == 'OCTOPUS__K8STENTACLE__SCRIPTPODIMAGETAG')].value
value: "1.0.0-deploymentTarget"
- equal:
path: spec.template.spec.containers[0].env[?(@.name == 'OCTOPUS__K8STENTACLE__SCRIPTPODIMAGEPULLPOLICY')].value
path: spec.template.spec.containers[0].env[?(@.name == 'OCTOPUS__K8STENTACLE__SCRIPTPODPULLPOLICY')].value
value: "Always"

- it: "When running as a deployment Target, script pod image is not set by default"
Expand Down

0 comments on commit 897f59b

Please sign in to comment.