Skip to content

Error: WithLatestTag(): invalid tag format (on rancher/k3s-upgrade)

Version not using system-upgrade-controller binary, but applying manifest 0.6.1

Platform/Architecture K3S v1.17.4+k3s1

Describe the bug After applying server-plan:

time="2020-06-24T09:11:05Z" level=error msg="WithLatestTag(): invalid tag format (on rancher/k3s-upgrade)" E0624 09:11:05.321244 1 controller.go:135] error syncing 'system-upgrade/server-plan': handler system-upgrade-controller: Get https://update.k3s.io/v1-release/channels/stable: x509: certificate signed by unknown authority, handler system-upgrade-controller: failed to create system-upgrade/apply-server-plan-on-dvkube007188.nl.novamedia.com-with- batch/v1, Kind=Job for system-upgrade-controller system-upgrade/server-plan: Job.batch "apply-server-plan-on-dvkube007188.nl.novamedia.com-with-" is invalid: [metadata.name: Invalid value: "apply-server-plan-on-dvkube007188.nl.novamedia.com-with-": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)'), spec.template.labels: Invalid value: "apply-server-plan-on-dvkube007188.nl.novamedia.com-with-": a valid label must be an empty string or consist of alphanumeric characters, '-', '' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9.])?[A-Za-z0-9])?')], requeuing

To Reproduce Create controller:

kubectl apply -f https://github.com/rancher/system-upgrade-controller/releases/download/v0.6.1/system-upgrade-controller.yaml

server-plan.yaml:

kind: Plan
metadata:
  name: server-plan
  namespace: system-upgrade
spec:
  concurrency: 1
  cordon: true
  nodeSelector:
    matchExpressions:
    - key: node-role.kubernetes.io/master
      operator: In
      values:
      - "true"
  serviceAccountName: system-upgrade
  upgrade:
    image: rancher/k3s-upgrade
  channel: https://update.k3s.io/v1-release/channels/stable

Add plan:

kubectl apply -f server-plan.yaml