rancher / system-upgrade-controller

In your Kubernetes, upgrading your nodes
Apache License 2.0
676 stars 83 forks source link

"latest" tag does not exist on docker hub #302

Open ShakataGaNai opened 3 months ago

ShakataGaNai commented 3 months ago

Running kubectl apply -f https://raw.githubusercontent.com/rancher/system-upgrade-controller/master/manifests/system-upgrade-controller.yaml, as specified in the README.md will fail. That file references image: rancher/system-upgrade-controller:latest which does not exist on docker hub today https://hub.docker.com/r/rancher/system-upgrade-controller/tags.

image

Manual test screenshot.

aleksasiriski commented 3 months ago

+1 Happening to me as well, both on my cluster on Hetzner Falkenstein and locally in Serbia.

onno204 commented 3 months ago

@SISheogorath Could you look into this issue? It seems to be caused by your commit 4e31e5d6a0926df9f370a06c9ea3250ee1e088b1.

This currently breaks some installations because the latest tag does not exists on the docker hub. I suggest reverting the commit, and recommiting once the latest tag has been added to the docker hub.

mysticaltech commented 3 months ago

Tons of issues for hour project https://github.com/kube-hetzner/terraform-hcloud-kube-hetzner because of this. Please fix ASAP folks.

SISheogorath commented 3 months ago

I mean, rolling back is an option, but will also mean you will rollout a 1 year old version of the controller. Of course that's better than not functioning at all, but also not ideal. If we revert the change, we should at least deploy the latest version of the controller.

The better fix would certainly be to use the a proper kustomization or a generated yaml from a release. If you rely on the manifests in the repository the way you do right now, it'll certainly miss the required permissions as well.

mysticaltech commented 3 months ago

@SISheogorath Was thinking the same. If I understood correctly, all we need to do is remove the latest tag from the manifest via our kustomization and replace with the latest tag version on docker hub, please confirm?

SISheogorath commented 3 months ago

The quickest solution would be:

# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- github.com/rancher/system-upgrade-controller
images:
- name: rancher/system-upgrade-controller
  newTag: v0.13.4

This would include all manifests and set the correct version (for now).

mysticaltech commented 3 months ago

@SISheogorath Thank you, appreciate it.

mysticaltech commented 3 months ago

The quickest solution would be:

# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- github.com/rancher/system-upgrade-controller
images:
- name: rancher/system-upgrade-controller
  newTag: v0.13.4

This would include all manifests and set the correct version (for now).

Here's the same in kustomization patch format for anyone that needs it, the following goes into the patch array:

    {
      target = {
        group     = "apps"
        version   = "v1"
        kind      = "Deployment"
        name      = "system-upgrade-controller"
        namespace = "system-upgrade"
      }
      patch = <<-EOF
        - op: replace
          path: /spec/template/spec/containers/0/image
          value: rancher/system-upgrade-controller:v0.13.4
      EOF
    }
dweomer commented 1 week ago

You should want to use the release manifest, i.e.: https://github.com/rancher/system-upgrade-controller/releases/download/v0.13.4/system-upgrade-controller.yaml

The manifests/system-upgrade-controller.yaml is for [build|dev]-time testing and validation and also leveraged as a template for kustomize at release. Please see: https://github.com/rancher/system-upgrade-controller/blob/master/scripts/package-controller#L37