How is a change on a resource that comes with helm...
# kubernetes
a
How is a change on a resource that comes with helm chart version update determined as replace or update?
We’re upgrading Istio and the change below appears as
replace
in preview.
resource name
doesn’t change, therefore, we expect it to be updated, not replaced. Unfortunately, this takes down the ingress gateway and recreates with the changes unnecessarily as we tested. We don’t see the same behaviour with
helm template
but Pulumi.
Copy code
++kubernetes:apps/v1:Deployment: (create-replacement)
            [id=istio-system/istio-ingressgateway]
            [urn=urn:pulumi:dev::minikubeistio::kubernetes:<http://helm.sh/v2:Chart$kubernetes:apps/v1:Deployment::istio-system/istio-ingressgateway|helm.sh/v2:Chart$kubernetes:apps/v1:Deployment::istio-system/istio-ingressgateway>]
            [provider=urn:pulumi:dev::minikubeistio::pulumi:providers:kubernetes::default_1_5_1::cec3d836-2896-4c22-bff6-c1f42199a421]
          ~ apiVersion: "extensions/v1beta1" => "apps/v1"
          ~ spec      : {
              + selector: {
                  + matchLabels: {
                      + app  : "istio-ingressgateway"
                      + istio: "ingressgateway"
                    }
                }
              ~ template: {
                  ~ spec: {
                      ~ containers: [
                          ~ [0]: {
                                  ~ env  : [
                                      ~ [0]: {
                                              ~ name     : "POD_NAME" => "NODE_NAME"
                                              ~ valueFrom: {
                                                  ~ fieldRef: {
                                                      ~ fieldPath: "metadata.name" => "spec.nodeName"
                                                    }
                                                }
                                            }
                                      ~ [1]: {
                                              ~ name     : "POD_NAMESPACE" => "POD_NAME"
                                              ~ valueFrom: {
                                                  ~ fieldRef: {
                                                      ~ fieldPath: "metadata.namespace" => "metadata.name"
                                                    }
                                                }
                                            }
                                      ~ [2]: {
                                              ~ name     : "INSTANCE_IP" => "POD_NAMESPACE"
                                              ~ valueFrom: {
                                                  ~ fieldRef: {
                                                      ~ fieldPath: "status.podIP" => "metadata.namespace"
                                                    }
                                                }
                                            }
                                      ~ [3]: {
                                              ~ name     : "HOST_IP" => "INSTANCE_IP"
                                              ~ valueFrom: {
                                                  ~ fieldRef: {
                                                      ~ fieldPath: "status.hostIP" => "status.podIP"
                                                    }
                                                }
                                            }
                                      ~ [4]: {
                                              ~ name     : "ISTIO_META_POD_NAME" => "HOST_IP"
                                              ~ valueFrom: {
                                                  ~ fieldRef: {
                                                      ~ fieldPath: "metadata.name" => "status.hostIP"
                                                    }
                                                }
                                            }
                                      ~ [5]: {
                                              ~ name     : "ISTIO_META_CONFIG_NAMESPACE" => "ISTIO_META_POD_NAME"
                                              ~ valueFrom: {
                                                  ~ fieldRef: {
                                                      + apiVersion: "v1"
                                                      ~ fieldPath : "metadata.namespace" => "metadata.name"
                                                    }
                                                }
                                            }
                                      ~ [6]: {
                                              ~ name     : "ISTIO_META_ROUTER_MODE" => "ISTIO_META_CONFIG_NAMESPACE"
                                              - value    : "sni-dnat"
                                              + valueFrom: {
                                                  + fieldRef: {
                                                      + fieldPath: "metadata.namespace"
                                                    }
                                                }
                                            }
                                      + [7]: {
                                              + name : "ISTIO_META_ROUTER_MODE"
                                              + value: "sni-dnat"
                                            }
                                    ]
                                  ~ image: "<http://docker.io/istio/proxyv2:1.1.16|docker.io/istio/proxyv2:1.1.16>" => "<http://docker.io/istio/proxyv2:1.2.10|docker.io/istio/proxyv2:1.2.10>"
                                }
                        ]
                    }
                }
            }
i
There appears to be a lot of metadata changes
a
Yes. Why would that be a reason to replace, though?
i
I'm too new to all this to begin to guess, sorry.
👍 1