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
1 change: 1 addition & 0 deletions charts/consul/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ This template is for an init container.
{{- define "consul.getAutoEncryptClientCA" -}}
- name: get-auto-encrypt-client-ca
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{- default Always .Values.global.pullPolicy }}
command:
- "/bin/sh"
- "-ec"
Expand Down
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: {{- default Always .Values.apiGateway.pullPolicy }}
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: {{- default Always .Values.global.pullPolicy }}
command:
- cp
- /bin/consul
Expand Down Expand Up @@ -256,6 +258,7 @@ spec:
{{- end}}
{{- include "consul.consulK8sConsulServerEnvVars" . | nindent 8 }}
image: {{ .Values.global.imageK8S }}
imagePullPolicy: {{- default Always .Values.global.pullPolicy }}
volumeMounts:
- mountPath: /consul/login
name: consul-data
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: {{- default Always .Values.global.pullPolicy }}
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: {{- default Always .Values.global.pullPolicy }}
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: {{- default Always .Values.global.pullPolicy }}
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: {{- default Always .Values.global.pullPolicy }}
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: {{- default Always .Values.global.pullPolicy }}
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: {{- default Always .Values.global.pullPolicy }}
env:
- name: NAMESPACE
valueFrom:
Expand Down Expand Up @@ -179,6 +180,7 @@ spec:
containers:
- name: mesh-gateway
image: {{ .Values.global.imageConsulDataplane | quote }}
imagePullPolicy: {{- default Always .Values.global.pullPolicy }}
{{- 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: {{- default Always .Values.global.pullPolicy }}
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: {{- default Always .Values.global.pullPolicy }}
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: {{- default Always .Values.global.pullPolicy }}
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: {{- default Always .Values.global.pullPolicy }}
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: {{- default Always .Values.global.pullPolicy }}
name: webhook-cert-manager
resources:
limits:
Expand Down
14 changes: 13 additions & 1 deletion charts/consul/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ global:
# ```
# @default: hashicorp/consul:<latest version>
image: docker.mirror.hashicorp.services/hashicorppreview/consul-enterprise:1.16-dev
pullPolicy: ""


# Array of objects containing image pull secret names that will be applied to each service account.
# This can be used to reference image pull secrets if using a custom consul or consul-k8s-control-plane Docker image.
Expand All @@ -87,6 +89,7 @@ global:
# This can be overridden per component.
# @default: hashicorp/consul-k8s-control-plane:<latest version>
imageK8S: docker.mirror.hashicorp.services/hashicorppreview/consul-k8s-control-plane:1.2.0-dev
pullPolicy: ""
aahel marked this conversation as resolved.
Show resolved Hide resolved

# The name of the datacenter that the agents should
# register as. This can't be changed once the Consul cluster is up and running
Expand Down Expand Up @@ -558,6 +561,7 @@ global:
# connect-injected sidecar proxies and mesh, terminating, and ingress gateways.
# @default: hashicorp/consul-dataplane:<latest supported version>
imageConsulDataplane: "hashicorppreview/consul-dataplane:1.1-dev"
pullPolicy: ""

# Configuration for running this Helm chart on the Red Hat OpenShift platform.
# This Helm chart currently supports OpenShift v4.x+.
Expand Down Expand Up @@ -680,6 +684,7 @@ server:
# Consul server agents.
# @type: string
image: null
pullPolicy: ""

# The number of server agents to run. This determines the fault tolerance of
# the cluster. Please refer to the [deployment table](https://developer.hashicorp.com/consul/docs/architecture/consensus#deployment-table)
Expand Down Expand Up @@ -1252,6 +1257,7 @@ client:
# running Consul client agents.
# @type: string
image: null
pullPolicy: ""

# A list of valid [`-retry-join` values](https://developer.hashicorp.com/consul/docs/agent/config/cli-flags#_retry_join).
# If this is `null` (default), then the clients will attempt to automatically
Expand Down Expand Up @@ -1711,6 +1717,7 @@ syncCatalog:
# to run the sync program.
# @type: string
image: null
pullPolicy: ""

# If true, all valid services in K8S are
# synced by default. If false, the service must be [annotated](https://developer.hashicorp.com/consul/docs/k8s/service-sync#enable-and-disable-sync)
Expand Down Expand Up @@ -1959,6 +1966,7 @@ connectInject:
# Image for consul-k8s-control-plane that contains the injector.
# @type: string
image: null
pullPolicy: ""

# If true, the injector will inject the
# Connect sidecar into all pods by default. Otherwise, pods must specify the
Expand Down Expand Up @@ -2259,6 +2267,7 @@ connectInject:
# Defaults to global.image.
# @type: string
imageConsul: null
pullPolicy: ""

# Override global log verbosity level. One of "debug", "info", "warn", or "error".
# @type: string
Expand Down Expand Up @@ -3022,11 +3031,12 @@ apiGateway:
# ~> **Note:** Using API Gateway <= 0.4 with external servers requires setting `client.enabled: true`.
# @type: string
image: null

pullPolicy: ""
# The name (and tag) of the Envoy Docker image used for the
# apiGateway. For other Consul compoenents, imageEnvoy has been replaced with Consul Dataplane.
# @default: envoyproxy/envoy:<latest supported version>
imageEnvoy: "envoyproxy/envoy:v1.25.1"
pullPolicy: ""

# Override global log verbosity level for api-gateway-controller pods. One of "debug", "info", "warn", or "error".
# @type: string
Expand Down Expand Up @@ -3223,6 +3233,8 @@ telemetryCollector:
# the consul-telemetry-collector
# @type: string
image: "hashicorp/consul-telemetry-collector:0.0.1"
pullPolicy: ""


# The resource settings for consul-telemetry-collector pods.
# @recurse: false
Expand Down