From a473dfe0373d56c7815a8f71dcf704e0ac5fd891 Mon Sep 17 00:00:00 2001 From: Ashwin Venkatesh Date: Wed, 21 Jun 2023 16:01:15 -0400 Subject: [PATCH] Revert "added imagePullPolicy for images in values.yaml (#2310)" (#2415) This reverts commit 285096241e0d5c5b6d53dd8a37889ab3ea5a8af2. --- .changelog/2310.txt | 3 --- .../consul/templates/api-gateway-controller-deployment.yaml | 3 --- charts/consul/templates/api-gateway-gatewayclassconfig.yaml | 1 - charts/consul/templates/client-daemonset.yaml | 1 - charts/consul/templates/cni-daemonset.yaml | 1 - charts/consul/templates/enterprise-license-job.yaml | 1 - charts/consul/templates/gateway-cleanup-job.yaml | 1 - charts/consul/templates/gateway-resources-job.yaml | 1 - charts/consul/templates/mesh-gateway-deployment.yaml | 2 -- charts/consul/templates/partition-init-job.yaml | 1 - charts/consul/templates/server-acl-init-cleanup-job.yaml | 1 - charts/consul/templates/server-acl-init-job.yaml | 1 - charts/consul/templates/server-statefulset.yaml | 1 - .../consul/templates/webhook-cert-manager-deployment.yaml | 1 - charts/consul/values.yaml | 6 ------ 15 files changed, 25 deletions(-) delete mode 100644 .changelog/2310.txt diff --git a/.changelog/2310.txt b/.changelog/2310.txt deleted file mode 100644 index 5e37de44ea..0000000000 --- a/.changelog/2310.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:feature -helm: Added imagePullPolicy global field which can be configured to override the default behaviour. -``` \ No newline at end of file diff --git a/charts/consul/templates/api-gateway-controller-deployment.yaml b/charts/consul/templates/api-gateway-controller-deployment.yaml index c942576034..8c5c2fa73e 100644 --- a/charts/consul/templates/api-gateway-controller-deployment.yaml +++ b/charts/consul/templates/api-gateway-controller-deployment.yaml @@ -57,7 +57,6 @@ spec: containers: - name: api-gateway-controller image: {{ .Values.apiGateway.image }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} ports: - containerPort: 9090 name: sds @@ -220,7 +219,6 @@ spec: {{- if .Values.global.acls.manageSystemACLs }} - name: copy-consul-bin image: {{ .Values.global.image | quote }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} command: - cp - /bin/consul @@ -258,7 +256,6 @@ spec: {{- end}} {{- include "consul.consulK8sConsulServerEnvVars" . | nindent 8 }} image: {{ .Values.global.imageK8S }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} volumeMounts: - mountPath: /consul/login name: consul-data diff --git a/charts/consul/templates/api-gateway-gatewayclassconfig.yaml b/charts/consul/templates/api-gateway-gatewayclassconfig.yaml index 8688ee6ae7..ba0e6c63db 100644 --- a/charts/consul/templates/api-gateway-gatewayclassconfig.yaml +++ b/charts/consul/templates/api-gateway-gatewayclassconfig.yaml @@ -65,7 +65,6 @@ 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 }} diff --git a/charts/consul/templates/client-daemonset.yaml b/charts/consul/templates/client-daemonset.yaml index ba19343652..09a70b394e 100644 --- a/charts/consul/templates/client-daemonset.yaml +++ b/charts/consul/templates/client-daemonset.yaml @@ -493,7 +493,6 @@ spec: {{- if .Values.global.acls.manageSystemACLs }} - name: client-acl-init image: {{ .Values.global.imageK8S }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} env: - name: NAMESPACE valueFrom: diff --git a/charts/consul/templates/cni-daemonset.yaml b/charts/consul/templates/cni-daemonset.yaml index 33ffb0a77e..ae04d9e657 100644 --- a/charts/consul/templates/cni-daemonset.yaml +++ b/charts/consul/templates/cni-daemonset.yaml @@ -61,7 +61,6 @@ 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: diff --git a/charts/consul/templates/enterprise-license-job.yaml b/charts/consul/templates/enterprise-license-job.yaml index 2a3fa01d00..0122690104 100644 --- a/charts/consul/templates/enterprise-license-job.yaml +++ b/charts/consul/templates/enterprise-license-job.yaml @@ -124,7 +124,6 @@ spec: initContainers: - name: ent-license-acl-init image: {{ .Values.global.imageK8S }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} command: - "/bin/sh" - "-ec" diff --git a/charts/consul/templates/gateway-cleanup-job.yaml b/charts/consul/templates/gateway-cleanup-job.yaml index e4656916de..44f032b5fd 100644 --- a/charts/consul/templates/gateway-cleanup-job.yaml +++ b/charts/consul/templates/gateway-cleanup-job.yaml @@ -37,7 +37,6 @@ spec: containers: - name: gateway-cleanup image: {{ .Values.global.imageK8S }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} 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 ea38d7af32..441e64eb14 100644 --- a/charts/consul/templates/gateway-resources-job.yaml +++ b/charts/consul/templates/gateway-resources-job.yaml @@ -37,7 +37,6 @@ spec: containers: - name: gateway-resources image: {{ .Values.global.imageK8S }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} 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 4150b2bdfd..449d6ae492 100644 --- a/charts/consul/templates/mesh-gateway-deployment.yaml +++ b/charts/consul/templates/mesh-gateway-deployment.yaml @@ -121,7 +121,6 @@ spec: initContainers: - name: mesh-gateway-init image: {{ .Values.global.imageK8S }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} env: - name: NAMESPACE valueFrom: @@ -180,7 +179,6 @@ 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" }} diff --git a/charts/consul/templates/partition-init-job.yaml b/charts/consul/templates/partition-init-job.yaml index b351d10027..db73ef783b 100644 --- a/charts/consul/templates/partition-init-job.yaml +++ b/charts/consul/templates/partition-init-job.yaml @@ -81,7 +81,6 @@ 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) }} diff --git a/charts/consul/templates/server-acl-init-cleanup-job.yaml b/charts/consul/templates/server-acl-init-cleanup-job.yaml index 3676144b40..35b0877ab4 100644 --- a/charts/consul/templates/server-acl-init-cleanup-job.yaml +++ b/charts/consul/templates/server-acl-init-cleanup-job.yaml @@ -53,7 +53,6 @@ spec: containers: - name: server-acl-init-cleanup image: {{ .Values.global.imageK8S }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} 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 e42a073c42..e62db41ec2 100644 --- a/charts/consul/templates/server-acl-init-job.yaml +++ b/charts/consul/templates/server-acl-init-job.yaml @@ -122,7 +122,6 @@ spec: containers: - name: server-acl-init-job image: {{ .Values.global.imageK8S }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} env: - name: NAMESPACE valueFrom: diff --git a/charts/consul/templates/server-statefulset.yaml b/charts/consul/templates/server-statefulset.yaml index 0c2eb1bffa..0bde9b881a 100644 --- a/charts/consul/templates/server-statefulset.yaml +++ b/charts/consul/templates/server-statefulset.yaml @@ -225,7 +225,6 @@ spec: initContainers: - name: locality-init image: {{ .Values.global.imageK8S }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} 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 25e382be84..dd93c039d2 100644 --- a/charts/consul/templates/webhook-cert-manager-deployment.yaml +++ b/charts/consul/templates/webhook-cert-manager-deployment.yaml @@ -50,7 +50,6 @@ 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: diff --git a/charts/consul/values.yaml b/charts/consul/values.yaml index 06a816156f..478f51b5d6 100644 --- a/charts/consul/values.yaml +++ b/charts/consul/values.yaml @@ -52,12 +52,6 @@ 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