Uploaded image for project: 'OpenShift Request For Enhancement'
  1. OpenShift Request For Enhancement
  2. RFE-7792

Update imagePullPolicy for istio-proxy container without relying on tech preview parameters

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • openshift-4.12.z
    • None
    • None
    • Product / Portfolio Work
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It would be better if we have a permanent solution for updating imagePullPolicy for istio-proxy container without relying on tech preview parameters.

      Reproducing steps :

      Tried three configs[1][2][3] to change the "imagePullPolicy" for the proxy container and out of three only the last one worked. I don't know why the first two didn't work. 

      [1] Used the following configs and restart the Istiod pod and application pod. Check the imagePullPolicy on application pod.

       

       $ oc patch -n istio-system smcp/basic --patch '{"spec":{"proxy":{"runtime":{"container":{"imagePullPolicy": "Always"}}}}}' --type=merge
       
      Verified the config in SMCP
      $ oc get smcp basic -n istio-system -ojson | jq .spec.proxy.runtime.container
      {
        "imagePullPolicy": "Always"
      $ oc get smcp basic -n istio-system -ojson | jq .status.appliedSpec.proxy.runtime.container
      {
        "imageName": "registry.redhat.io/openshift-service-mesh/proxyv2-rhel8@sha256:91d76a248eec9ddac000d36339df4ac6311e387bf32bb301c610ce4b93731766",
        "imagePullPolicy": "Always",
        "resources": {
          "requests": {
            "cpu": "10m",
            "memory": "128Mi"
      

       

      $ oc get pod -n httpd httpd-7b6cb57ff6-vqw6t -oyaml | grep -i imagepullpolicy -A1
          imagePullPolicy: Always
          name: httpd-cont
      --
          imagePullPolicy: IfNotPresent
          name: istio-proxy

      Didn't work. Revert the change in SMCP.

      [2]Edit the SMCP again :

      $ oc patch -n istio-system smcp/basic --patch '{"spec":{"runtime":{"components":{"proxy":{"container":{"imagePullPolicy": "Always"}}}}}}' --type=merge
        runtime:
          components:
            proxy:
              container:
                imagePullPolicy: Always
      

      Not worked. Remove the config.

      [3]Used this config:

      $ oc patch -n istio-system smcp/basic --patch '{"spec":{"techPreview":{"global":{"imagePullPolicy": "Always"}}}}' --type=merge

      This command restarted the control plane pods.

       

      $ oc get pods  istio-ingressgateway-5b89d49f4b-544xm  -oyaml | grep -i imagepullpolicy -A1
          imagePullPolicy: Always
          name: istio-proxy
       
      Application pod:
      $ oc get pods -n httpd httpd-7b6cb57ff6-8bj49 -oyaml | grep -i imagepullpolicy -A1
          imagePullPolicy: Always
          name: httpd-cont
      --
          imagePullPolicy: Always    <-----------here
          name: istio-proxy
      

       

      And with the tech preview parameter, it worked.

              mcurry@redhat.com Marc Curry
              rhn-support-ankhande Anjali Khandelwal
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                None
                None