Skip to content
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

added imagePullPolicy for images in values.yaml #2310

Merged
merged 11 commits into from
Jun 13, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ spec:
containers:
- name: api-gateway-controller
image: {{ .Values.apiGateway.image }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
aahel marked this conversation as resolved.
Show resolved Hide resolved
ports:
- containerPort: 9090
name: sds
Expand Down Expand Up @@ -219,6 +220,7 @@ spec:
{{- if .Values.global.acls.manageSystemACLs }}
- name: copy-consul-bin
image: {{ .Values.global.image | quote }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
command:
- cp
- /bin/consul
Expand Down Expand Up @@ -256,6 +258,7 @@ spec:
{{- end}}
{{- include "consul.consulK8sConsulServerEnvVars" . | nindent 8 }}
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
volumeMounts:
- mountPath: /consul/login
name: consul-data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ spec:
image:
consulAPIGateway: {{ .Values.apiGateway.image }}
envoy: {{ .Values.apiGateway.imageEnvoy }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
{{- if .Values.apiGateway.managedGatewayClass.nodeSelector }}
nodeSelector:
{{ tpl .Values.apiGateway.managedGatewayClass.nodeSelector . | indent 4 | trim }}
Expand Down
1 change: 1 addition & 0 deletions charts/consul/templates/client-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ spec:
{{- if .Values.global.acls.manageSystemACLs }}
- name: client-acl-init
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
env:
- name: NAMESPACE
valueFrom:
Expand Down
1 change: 1 addition & 0 deletions charts/consul/templates/cni-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ spec:
# This container installs the consul CNI binaries and CNI network config file on each node
- name: install-cni
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
securityContext:
privileged: true
command:
Expand Down
1 change: 1 addition & 0 deletions charts/consul/templates/enterprise-license-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ spec:
initContainers:
- name: ent-license-acl-init
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
command:
- "/bin/sh"
- "-ec"
Expand Down
1 change: 1 addition & 0 deletions charts/consul/templates/gateway-cleanup-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ spec:
containers:
- name: gateway-cleanup
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
command:
- consul-k8s-control-plane
args:
Expand Down
1 change: 1 addition & 0 deletions charts/consul/templates/gateway-resources-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ spec:
containers:
- name: gateway-resources
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
command:
- consul-k8s-control-plane
args:
Expand Down
2 changes: 2 additions & 0 deletions charts/consul/templates/mesh-gateway-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ spec:
initContainers:
- name: mesh-gateway-init
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
env:
- name: NAMESPACE
valueFrom:
Expand Down Expand Up @@ -179,6 +180,7 @@ spec:
containers:
- name: mesh-gateway
image: {{ .Values.global.imageConsulDataplane | quote }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
{{- if .Values.meshGateway.resources }}
resources:
{{- if eq (typeOf .Values.meshGateway.resources) "string" }}
Expand Down
1 change: 1 addition & 0 deletions charts/consul/templates/partition-init-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ spec:
containers:
- name: partition-init-job
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
env:
{{- include "consul.consulK8sConsulServerEnvVars" . | nindent 10 }}
{{- if (and .Values.global.acls.bootstrapToken.secretName .Values.global.acls.bootstrapToken.secretKey) }}
Expand Down
1 change: 1 addition & 0 deletions charts/consul/templates/server-acl-init-cleanup-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ spec:
containers:
- name: server-acl-init-cleanup
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
command:
- consul-k8s-control-plane
args:
Expand Down
1 change: 1 addition & 0 deletions charts/consul/templates/server-acl-init-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ spec:
containers:
- name: server-acl-init-job
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
env:
- name: NAMESPACE
valueFrom:
Expand Down
1 change: 1 addition & 0 deletions charts/consul/templates/server-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ spec:
initContainers:
- name: locality-init
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
env:
- name: NODE_NAME
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ spec:
-deployment-name={{ template "consul.fullname" . }}-webhook-cert-manager \
-deployment-namespace={{ .Release.Namespace }}
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
name: webhook-cert-manager
resources:
limits:
Expand Down
6 changes: 6 additions & 0 deletions charts/consul/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ global:
# Changing the partition name would require an un-install and a re-install with the updated name.
# Must be "default" in the server cluster ie the Kubernetes cluster that the Consul server pods are deployed onto.
name: "default"

# Set imagePullPolicy for all images used. This is applies to all the images being used.
# One of "IfNotPresent", "Always", "Never"
# Refer to https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
# @type: string
imagePullPolicy: ""

# The name (and tag) of the Consul Docker image for clients and servers.
# This can be overridden per component. This should be pinned to a specific
Expand Down