diff --git a/charts/consul/templates/_helpers.tpl b/charts/consul/templates/_helpers.tpl index 1b866888c0..39fcc44de9 100644 --- a/charts/consul/templates/_helpers.tpl +++ b/charts/consul/templates/_helpers.tpl @@ -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" diff --git a/charts/consul/templates/api-gateway-controller-deployment.yaml b/charts/consul/templates/api-gateway-controller-deployment.yaml index 8c5c2fa73e..683de6ac5d 100644 --- a/charts/consul/templates/api-gateway-controller-deployment.yaml +++ b/charts/consul/templates/api-gateway-controller-deployment.yaml @@ -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 @@ -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 @@ -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 diff --git a/charts/consul/templates/client-daemonset.yaml b/charts/consul/templates/client-daemonset.yaml index 09a70b394e..f406f39add 100644 --- a/charts/consul/templates/client-daemonset.yaml +++ b/charts/consul/templates/client-daemonset.yaml @@ -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: diff --git a/charts/consul/templates/cni-daemonset.yaml b/charts/consul/templates/cni-daemonset.yaml index ae04d9e657..49cc1e84c4 100644 --- a/charts/consul/templates/cni-daemonset.yaml +++ b/charts/consul/templates/cni-daemonset.yaml @@ -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: diff --git a/charts/consul/templates/enterprise-license-job.yaml b/charts/consul/templates/enterprise-license-job.yaml index 0122690104..3729947101 100644 --- a/charts/consul/templates/enterprise-license-job.yaml +++ b/charts/consul/templates/enterprise-license-job.yaml @@ -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" diff --git a/charts/consul/templates/gateway-cleanup-job.yaml b/charts/consul/templates/gateway-cleanup-job.yaml index ff6f295357..e322e8528f 100644 --- a/charts/consul/templates/gateway-cleanup-job.yaml +++ b/charts/consul/templates/gateway-cleanup-job.yaml @@ -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: diff --git a/charts/consul/templates/gateway-resources-job.yaml b/charts/consul/templates/gateway-resources-job.yaml index f8f92f799d..80392cd908 100644 --- a/charts/consul/templates/gateway-resources-job.yaml +++ b/charts/consul/templates/gateway-resources-job.yaml @@ -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: diff --git a/charts/consul/templates/mesh-gateway-deployment.yaml b/charts/consul/templates/mesh-gateway-deployment.yaml index 449d6ae492..0ec3f62f7f 100644 --- a/charts/consul/templates/mesh-gateway-deployment.yaml +++ b/charts/consul/templates/mesh-gateway-deployment.yaml @@ -121,6 +121,7 @@ spec: initContainers: - name: mesh-gateway-init image: {{ .Values.global.imageK8S }} + imagePullPolicy: {{- default Always .Values.global.pullPolicy }} env: - name: NAMESPACE valueFrom: @@ -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" }} diff --git a/charts/consul/templates/partition-init-job.yaml b/charts/consul/templates/partition-init-job.yaml index db73ef783b..1b4cee7e6e 100644 --- a/charts/consul/templates/partition-init-job.yaml +++ b/charts/consul/templates/partition-init-job.yaml @@ -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) }} diff --git a/charts/consul/templates/server-acl-init-cleanup-job.yaml b/charts/consul/templates/server-acl-init-cleanup-job.yaml index 35b0877ab4..120eaa3ead 100644 --- a/charts/consul/templates/server-acl-init-cleanup-job.yaml +++ b/charts/consul/templates/server-acl-init-cleanup-job.yaml @@ -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: diff --git a/charts/consul/templates/server-acl-init-job.yaml b/charts/consul/templates/server-acl-init-job.yaml index e62db41ec2..13d206e22b 100644 --- a/charts/consul/templates/server-acl-init-job.yaml +++ b/charts/consul/templates/server-acl-init-job.yaml @@ -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: diff --git a/charts/consul/templates/server-statefulset.yaml b/charts/consul/templates/server-statefulset.yaml index 0bde9b881a..73844b9a04 100644 --- a/charts/consul/templates/server-statefulset.yaml +++ b/charts/consul/templates/server-statefulset.yaml @@ -225,6 +225,7 @@ spec: initContainers: - name: locality-init image: {{ .Values.global.imageK8S }} + imagePullPolicy: {{- default Always .Values.global.pullPolicy }} env: - name: NODE_NAME valueFrom: diff --git a/charts/consul/templates/webhook-cert-manager-deployment.yaml b/charts/consul/templates/webhook-cert-manager-deployment.yaml index dd93c039d2..aeea114595 100644 --- a/charts/consul/templates/webhook-cert-manager-deployment.yaml +++ b/charts/consul/templates/webhook-cert-manager-deployment.yaml @@ -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: diff --git a/charts/consul/values.yaml b/charts/consul/values.yaml index 0e325ca66c..587f468109 100644 --- a/charts/consul/values.yaml +++ b/charts/consul/values.yaml @@ -67,6 +67,8 @@ global: # ``` # @default: hashicorp/consul: 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. @@ -87,6 +89,7 @@ global: # This can be overridden per component. # @default: hashicorp/consul-k8s-control-plane: imageK8S: docker.mirror.hashicorp.services/hashicorppreview/consul-k8s-control-plane:1.2.0-dev + pullPolicy: "" # The name of the datacenter that the agents should # register as. This can't be changed once the Consul cluster is up and running @@ -558,6 +561,7 @@ global: # connect-injected sidecar proxies and mesh, terminating, and ingress gateways. # @default: hashicorp/consul-dataplane: 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+. @@ -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) @@ -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 @@ -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) @@ -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 @@ -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 @@ -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: 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 @@ -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