diff --git a/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 b/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 index 6208e8964..47dbf70a3 100644 --- a/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 @@ -24,6 +24,7 @@ spec: containers: - name: netchecker-agent image: "{{ netcheck_agent_image_repo }}:{{ netcheck_agent_image_tag }}" + imagePullPolicy: {{ k8s_image_pull_policy }} env: - name: MY_POD_NAME valueFrom: @@ -38,7 +39,6 @@ spec: - "-alsologtostderr=true" - "-serverendpoint=netchecker-service:8081" - "-reportinterval={{ agent_report_interval }}" - imagePullPolicy: {{ k8s_image_pull_policy }} resources: limits: cpu: {{ netchecker_agent_cpu_limit }} diff --git a/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 b/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 index bbf6d99d6..8b2e51a42 100644 --- a/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 @@ -26,6 +26,7 @@ spec: containers: - name: netchecker-agent image: "{{ netcheck_agent_image_repo }}:{{ netcheck_agent_image_tag }}" + imagePullPolicy: {{ k8s_image_pull_policy }} env: - name: MY_POD_NAME valueFrom: @@ -40,7 +41,6 @@ spec: - "-alsologtostderr=true" - "-serverendpoint=netchecker-service:8081" - "-reportinterval={{ agent_report_interval }}" - imagePullPolicy: {{ k8s_image_pull_policy }} resources: limits: cpu: {{ netchecker_agent_cpu_limit }} diff --git a/roles/kubernetes-apps/ansible/templates/netchecker-server-deployment.yml.j2 b/roles/kubernetes-apps/ansible/templates/netchecker-server-deployment.yml.j2 index 53f6c4807..0be97e0db 100644 --- a/roles/kubernetes-apps/ansible/templates/netchecker-server-deployment.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/netchecker-server-deployment.yml.j2 @@ -20,7 +20,6 @@ spec: containers: - name: netchecker-server image: "{{ netcheck_server_image_repo }}:{{ netcheck_server_image_tag }}" - env: imagePullPolicy: {{ k8s_image_pull_policy }} resources: limits: diff --git a/roles/kubernetes-apps/csi_driver/aws_ebs/templates/aws-ebs-csi-controllerservice.yml.j2 b/roles/kubernetes-apps/csi_driver/aws_ebs/templates/aws-ebs-csi-controllerservice.yml.j2 index 947c0d310..f570cf2b3 100644 --- a/roles/kubernetes-apps/csi_driver/aws_ebs/templates/aws-ebs-csi-controllerservice.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/aws_ebs/templates/aws-ebs-csi-controllerservice.yml.j2 @@ -103,7 +103,7 @@ spec: {% if aws_ebs_csi_enable_volume_resizing %} - name: csi-resizer image: {{ csi_resizer_image_repo }}:{{ csi_resizer_image_tag }} - imagePullPolicy: Always + imagePullPolicy: {{ k8s_image_pull_policy }} args: - --csi-address=$(ADDRESS) - --v=5 diff --git a/roles/kubernetes-apps/csi_driver/azuredisk/templates/azure-csi-azuredisk-controller.yml.j2 b/roles/kubernetes-apps/csi_driver/azuredisk/templates/azure-csi-azuredisk-controller.yml.j2 index 3b3b7e2b5..ab7a540f8 100644 --- a/roles/kubernetes-apps/csi_driver/azuredisk/templates/azure-csi-azuredisk-controller.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/azuredisk/templates/azure-csi-azuredisk-controller.yml.j2 @@ -27,6 +27,7 @@ spec: containers: - name: csi-provisioner image: {{ azure_csi_image_repo }}/csi-provisioner:{{ azure_csi_provisioner_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} args: - "--provisioner=disk.csi.azure.com" - "--feature-gates=Topology=true" @@ -39,7 +40,6 @@ spec: env: - name: ADDRESS value: /csi/csi.sock - imagePullPolicy: IfNotPresent volumeMounts: - mountPath: /csi name: socket-dir @@ -52,6 +52,7 @@ spec: memory: 20Mi - name: csi-attacher image: {{ azure_csi_image_repo }}/csi-attacher:{{ azure_csi_attacher_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} args: - "-v=5" - "-csi-address=$(ADDRESS)" @@ -61,7 +62,6 @@ spec: env: - name: ADDRESS value: /csi/csi.sock - imagePullPolicy: IfNotPresent volumeMounts: - mountPath: /csi name: socket-dir @@ -148,6 +148,7 @@ spec: memory: 20Mi - name: azuredisk image: {{ azure_csi_plugin_image_repo }}/azuredisk-csi:{{ azure_csi_plugin_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} args: - "--v=5" - "--endpoint=$(CSI_ENDPOINT)" @@ -172,7 +173,6 @@ spec: value: "/etc/kubernetes/azure.json" - name: CSI_ENDPOINT value: unix:///csi/csi.sock - imagePullPolicy: IfNotPresent volumeMounts: - mountPath: /csi name: socket-dir diff --git a/roles/kubernetes-apps/csi_driver/azuredisk/templates/azure-csi-azuredisk-node.yml.j2 b/roles/kubernetes-apps/csi_driver/azuredisk/templates/azure-csi-azuredisk-node.yml.j2 index 45046a021..45e46718f 100644 --- a/roles/kubernetes-apps/csi_driver/azuredisk/templates/azure-csi-azuredisk-node.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/azuredisk/templates/azure-csi-azuredisk-node.yml.j2 @@ -19,11 +19,11 @@ spec: priorityClassName: system-node-critical containers: - name: liveness-probe - imagePullPolicy: IfNotPresent volumeMounts: - mountPath: /csi name: socket-dir image: {{ azure_csi_image_repo }}/livenessprobe:{{ azure_csi_livenessprobe_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} args: - --csi-address=/csi/csi.sock - --connection-timeout=3s @@ -65,6 +65,7 @@ spec: memory: 20Mi - name: azuredisk image: {{ azure_csi_plugin_image_repo }}/azuredisk-csi:{{ azure_csi_plugin_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} args: - "--v=5" - "--endpoint=$(CSI_ENDPOINT)" @@ -95,7 +96,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - imagePullPolicy: IfNotPresent securityContext: privileged: true volumeMounts: diff --git a/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-controllerplugin.yml.j2 b/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-controllerplugin.yml.j2 index ade276450..ad7abefbc 100644 --- a/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-controllerplugin.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-controllerplugin.yml.j2 @@ -21,6 +21,7 @@ spec: containers: - name: csi-attacher image: {{ csi_attacher_image_repo }}:{{ csi_attacher_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} args: - "--v=5" - "--csi-address=$(ADDRESS)" @@ -32,12 +33,12 @@ spec: env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock - imagePullPolicy: "IfNotPresent" volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - name: csi-provisioner image: {{ csi_provisioner_image_repo }}:{{ csi_provisioner_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} args: - "--csi-address=$(ADDRESS)" {% if cinder_topology is defined and cinder_topology %} @@ -51,12 +52,12 @@ spec: env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock - imagePullPolicy: "IfNotPresent" volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - name: csi-snapshotter image: {{ csi_snapshotter_image_repo }}:{{ csi_snapshotter_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} args: - "--csi-address=$(ADDRESS)" {% if cinder_csi_controller_replicas is defined and cinder_csi_controller_replicas > 1 %} @@ -66,12 +67,12 @@ spec: env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock - imagePullPolicy: {{ k8s_image_pull_policy }} volumeMounts: - mountPath: /var/lib/csi/sockets/pluginproxy/ name: socket-dir - name: csi-resizer image: {{ csi_resizer_image_repo }}:{{ csi_resizer_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} args: - "--csi-address=$(ADDRESS)" {% if cinder_csi_controller_replicas is defined and cinder_csi_controller_replicas > 1 %} @@ -81,13 +82,13 @@ spec: env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock - imagePullPolicy: "IfNotPresent" volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - name: cinder-csi-plugin image: {{ cinder_csi_plugin_image_repo }}:{{ cinder_csi_plugin_image_tag }} - args : + imagePullPolicy: {{ k8s_image_pull_policy }} + args: - /bin/cinder-csi-plugin - "--nodeid=$(NODE_ID)" - "--endpoint=$(CSI_ENDPOINT)" @@ -104,7 +105,6 @@ spec: value: /etc/config/cloud.conf - name: CLUSTER_NAME value: kubernetes - imagePullPolicy: "IfNotPresent" volumeMounts: - name: socket-dir mountPath: /csi diff --git a/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 b/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 index b9cefa0c7..5787b7cf3 100644 --- a/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 @@ -20,6 +20,7 @@ spec: containers: - name: node-driver-registrar image: {{ csi_node_driver_registrar_image_repo }}:{{ csi_node_driver_registrar_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} args: - "--csi-address=$(ADDRESS)" - "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)" @@ -36,7 +37,6 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName - imagePullPolicy: "IfNotPresent" volumeMounts: - name: socket-dir mountPath: /csi @@ -49,7 +49,8 @@ spec: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true image: {{ cinder_csi_plugin_image_repo }}:{{ cinder_csi_plugin_image_tag }} - args : + imagePullPolicy: {{ k8s_image_pull_policy }} + args: - /bin/cinder-csi-plugin - "--nodeid=$(NODE_ID)" - "--endpoint=$(CSI_ENDPOINT)" @@ -63,7 +64,6 @@ spec: value: unix://csi/csi.sock - name: CLOUD_CONFIG value: /etc/config/cloud.conf - imagePullPolicy: "IfNotPresent" volumeMounts: - name: socket-dir mountPath: /csi diff --git a/roles/kubernetes-apps/csi_driver/vsphere/templates/vsphere-csi-controller-ss.yml.j2 b/roles/kubernetes-apps/csi_driver/vsphere/templates/vsphere-csi-controller-ss.yml.j2 index a88a23bd5..a11d635d7 100644 --- a/roles/kubernetes-apps/csi_driver/vsphere/templates/vsphere-csi-controller-ss.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/vsphere/templates/vsphere-csi-controller-ss.yml.j2 @@ -40,13 +40,13 @@ spec: name: socket-dir - name: vsphere-csi-controller image: {{ gcr_image_repo }}/cloud-provider-vsphere/csi/release/driver:{{ vsphere_csi_controller }} + imagePullPolicy: {{ k8s_image_pull_policy }} lifecycle: preStop: exec: command: ["/bin/sh", "-c", "rm -rf /var/lib/csi/sockets/pluginproxy/csi.vsphere.vmware.com"] args: - "--v=4" - imagePullPolicy: "Always" env: - name: CSI_ENDPOINT value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock @@ -84,9 +84,9 @@ spec: name: socket-dir - name: vsphere-syncer image: {{ gcr_image_repo }}/cloud-provider-vsphere/csi/release/syncer:{{ vsphere_syncer_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} args: - "--v=2" - imagePullPolicy: "Always" env: - name: FULL_SYNC_INTERVAL_MINUTES value: "30" diff --git a/roles/kubernetes-apps/csi_driver/vsphere/templates/vsphere-csi-node.yml.j2 b/roles/kubernetes-apps/csi_driver/vsphere/templates/vsphere-csi-node.yml.j2 index 24c39abfe..b9e37697c 100644 --- a/roles/kubernetes-apps/csi_driver/vsphere/templates/vsphere-csi-node.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/vsphere/templates/vsphere-csi-node.yml.j2 @@ -41,7 +41,7 @@ spec: mountPath: /registration - name: vsphere-csi-node image: {{ gcr_image_repo }}/cloud-provider-vsphere/csi/release/driver:{{ vsphere_csi_driver_image_tag }} - imagePullPolicy: "Always" + imagePullPolicy: {{ k8s_image_pull_policy }} env: - name: NODE_NAME valueFrom: diff --git a/roles/network_plugin/cilium/templates/cilium-deploy.yml.j2 b/roles/network_plugin/cilium/templates/cilium-deploy.yml.j2 index c052e9e16..d379477ec 100644 --- a/roles/network_plugin/cilium/templates/cilium-deploy.yml.j2 +++ b/roles/network_plugin/cilium/templates/cilium-deploy.yml.j2 @@ -85,7 +85,7 @@ spec: name: cilium-aws optional: true image: "{{ cilium_operator_image_repo }}:{{ cilium_operator_image_tag }}" - imagePullPolicy: IfNotPresent + imagePullPolicy: {{ k8s_image_pull_policy }} name: cilium-operator livenessProbe: httpGet: diff --git a/roles/network_plugin/cilium/templates/cilium-ds.yml.j2 b/roles/network_plugin/cilium/templates/cilium-ds.yml.j2 index 370dba225..9cdc04cba 100755 --- a/roles/network_plugin/cilium/templates/cilium-ds.yml.j2 +++ b/roles/network_plugin/cilium/templates/cilium-ds.yml.j2 @@ -46,7 +46,7 @@ spec: - name: CILIUM_CLUSTERMESH_CONFIG value: /var/lib/cilium/clustermesh/ image: "{{cilium_image_repo}}:{{cilium_image_tag}}" - imagePullPolicy: IfNotPresent + imagePullPolicy: {{ k8s_image_pull_policy }} resources: limits: cpu: {{ cilium_cpu_limit }} @@ -162,7 +162,7 @@ spec: name: cilium-config optional: true image: "{{cilium_init_image_repo}}:{{cilium_init_image_tag}}" - imagePullPolicy: IfNotPresent + imagePullPolicy: {{ k8s_image_pull_policy }} name: clean-cilium-state securityContext: capabilities: diff --git a/roles/network_plugin/kube-ovn/templates/cni-kube-ovn.yml.j2 b/roles/network_plugin/kube-ovn/templates/cni-kube-ovn.yml.j2 index 79f1fc671..426b9b9e5 100644 --- a/roles/network_plugin/kube-ovn/templates/cni-kube-ovn.yml.j2 +++ b/roles/network_plugin/kube-ovn/templates/cni-kube-ovn.yml.j2 @@ -217,8 +217,8 @@ spec: containers: - name: pinger image: {{ kube_ovn_container_image_repo }}:{{ kube_ovn_container_image_tag }} - command: ["/kube-ovn/kube-ovn-pinger", "--external-address=114.114.114.114"] imagePullPolicy: {{ k8s_image_pull_policy }} + command: ["/kube-ovn/kube-ovn-pinger", "--external-address=114.114.114.114"] securityContext: runAsUser: 0 privileged: false diff --git a/roles/network_plugin/kube-router/templates/kube-router.yml.j2 b/roles/network_plugin/kube-router/templates/kube-router.yml.j2 index 20816cd4e..f1a46e870 100644 --- a/roles/network_plugin/kube-router/templates/kube-router.yml.j2 +++ b/roles/network_plugin/kube-router/templates/kube-router.yml.j2 @@ -33,7 +33,7 @@ spec: containers: - name: kube-router image: {{ kube_router_image_repo }}:{{ kube_router_image_tag }} - imagePullPolicy: IfNotPresent + imagePullPolicy: {{ k8s_image_pull_policy }} args: - --run-router={{ kube_router_run_router | bool }} - --run-firewall={{ kube_router_run_firewall | bool }}