rancher / terraform-provider-rke

Terraform provider plugin for deploy kubernetes cluster by RKE(Rancher Kubernetes Engine)
Mozilla Public License 2.0
340 stars 152 forks source link

provider 1.4.3 ignores system_images and tries to pull latest images regardless #437

Open p-v-a opened 11 months ago

p-v-a commented 11 months ago

When using 1.4.3 provider rke in air-gapped environment, it tries to pull latest rke-tool container regardless of system_images settings. See error below, if fail back to 1.4.2 provider, terraform plan runs as expected using container version specified in system_images. system images list:

      kubernetes                  = "private.registry.invalid.com/rke/rancher/hyperkube:v1.25.9-rancher2",
      etcd                        = "private.registry.invalid.com/rke/rancher/mirrored-coreos-etcd:v3.5.6",
      alpine                      = "private.registry.invalid.com/rke/rancher/rke-tools:v0.1.88",
      nginx_proxy                 = "private.registry.invalid.com/rke/rancher/rke-tools:v0.1.88",
      cert_downloader             = "private.registry.invalid.com/rke/rancher/rke-tools:v0.1.88",
      kubernetes_services_sidecar = "private.registry.invalid.com/rke/rancher/rke-tools:v0.1.88",
      ingress                     = "private.registry.invalid.com/rke/rancher/nginx-ingress-controller:nginx-1.5.1-rancher2",
      ingress_backend             = "private.registry.invalid.com/rke/rancher/mirrored-nginx-ingress-controller-defaultbackend:1.5-rancher1",
      coredns                     = "private.registry.invalid.com/rke/rancher/mirrored-coredns-coredns:1.9.4",
      coredns_autoscaler          = "private.registry.invalid.com/rke/rancher/mirrored-cluster-proportional-autoscaler:1.8.6",
      pod_infra_container         = "private.registry.invalid.com/rke/rancher/mirrored-pause:3.7",
      metrics_server              = "private.registry.invalid.com/rke/rancher/mirrored-metrics-server:v0.6.2",
      nodelocal                   = "private.registry.invalid.com/rke/rancher/mirrored-k8s-dns-node-cache:1.22.10"

Error:

time="2023-11-30T23:21:00+11:00" level=info msg="Pulling image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z], try #1"
│ time="2023-11-30T23:21:00+11:00" level=warning msg="Can't pull Docker image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z]: Error response from daemon: unknown: artifact rke/rancher/rke-tools:v0.1.96 not found"
│ time="2023-11-30T23:21:00+11:00" level=info msg="Pulling image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z], try #2"
│ time="2023-11-30T23:21:00+11:00" level=warning msg="Can't pull Docker image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z]: Error response from daemon: unknown: artifact rke/rancher/rke-tools:v0.1.96 not found"
│ time="2023-11-30T23:21:00+11:00" level=info msg="Pulling image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z], try #3"
│ time="2023-11-30T23:21:00+11:00" level=warning msg="Can't pull Docker image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z]: Error response from daemon: unknown: artifact rke/rancher/rke-tools:v0.1.96 not found"
│ time="2023-11-30T23:21:00+11:00" level=info msg="Pulling image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z], try #1"
│ time="2023-11-30T23:21:00+11:00" level=warning msg="Can't pull Docker image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z]: Error response from daemon: unknown: artifact rke/rancher/rke-tools:v0.1.96 not found"
│ time="2023-11-30T23:21:00+11:00" level=info msg="Pulling image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z], try #2"
│ time="2023-11-30T23:21:00+11:00" level=warning msg="Can't pull Docker image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z]: Error response from daemon: unknown: artifact rke/rancher/rke-tools:v0.1.96 not found"
│ time="2023-11-30T23:21:00+11:00" level=info msg="Pulling image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z], try #3"
│ time="2023-11-30T23:21:00+11:00" level=warning msg="Can't pull Docker image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z]: Error response from daemon: unknown: artifact rke/rancher/rke-tools:v0.1.96 not found"
│ time="2023-11-30T23:21:03+11:00" level=info msg="Pulling image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z], try #1"
│ time="2023-11-30T23:21:04+11:00" level=warning msg="Can't pull Docker image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z]: Error response from daemon: unknown: artifact rke/rancher/rke-tools:v0.1.96 not found"
│ time="2023-11-30T23:21:04+11:00" level=info msg="Pulling image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z], try #2"
│ time="2023-11-30T23:21:04+11:00" level=warning msg="Can't pull Docker image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z]: Error response from daemon: unknown: artifact rke/rancher/rke-tools:v0.1.96 not found"
│ time="2023-11-30T23:21:04+11:00" level=info msg="Pulling image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z], try #3"
│ time="2023-11-30T23:21:04+11:00" level=warning msg="Can't pull Docker image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z]: Error response from daemon: unknown: artifact rke/rancher/rke-tools:v0.1.96 not found"
│ time="2023-11-30T23:21:04+11:00" level=warning msg="[etcd] Can't pull Docker image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z]: Error response from daemon: unknown: artifact rke/rancher/rke-tools:v0.1.96 not found"
│
│ Failed running cluster err:[etcd] Failed to bring up Etcd Plane: Failed to pull image [private.registry.invalid.com/rke/rancher/rke-tools:v0.1.96] on host [10.x.y.z]: Error response from daemon: unknown: artifact rke/rancher/rke-tools:v0.1.96 not found