Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying registry mirror for "*" results in: Task failed, error was: runtime: unmarshalling manifest "webhook.yaml" #2926

Closed
judge-red opened this issue Oct 9, 2023 · 2 comments · Fixed by #2927
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management.

Comments

@judge-red
Copy link

What happened?

If specifying .containerRuntime.containerd.registries."*" (with appropriate childs), applying the machine-controller addon will fail:

INFO[16:55:44 CEST] Applying addon coredns-pdb...                
INFO[16:55:46 CEST] Applying addon metrics-server...             
INFO[16:55:49 CEST] Applying addon cni-cilium...                 
INFO[16:55:53 CEST] Applying addon nodelocaldns...               
INFO[16:55:56 CEST] Applying addon machinecontroller...          
WARN[16:55:56 CEST] Task failed, error was: runtime: unmarshalling manifest "webhook.yaml"
error converting YAML to JSON: yaml: line 8: did not find expected alphabetic or numeric character 
WARN[16:56:06 CEST] Retrying task...                             
INFO[16:56:06 CEST] Applying addon coredns-pdb...                
INFO[16:56:09 CEST] Applying addon metrics-server...             
INFO[16:56:11 CEST] Applying addon cni-cilium...                 
INFO[16:56:15 CEST] Applying addon nodelocaldns...               
INFO[16:56:18 CEST] Applying addon machinecontroller...          
WARN[16:56:18 CEST] Task failed, error was: runtime: unmarshalling manifest "webhook.yaml"
error converting YAML to JSON: yaml: line 8: did not find expected alphabetic or numeric character 
WARN[16:56:32 CEST] Retrying task...                     

If I replace "*" with e.g. "docker.io", it works as expected. However, "*" is explicitely supported by containerd, and is rather useful.

It should be noted, that containerd on the control plane nodes is correctly configured with "*", the error occurs afterwards.

Expected behavior

No error :)

How to reproduce the issue?

Add something like the below to your kubeone.yaml:

containerRuntime:
  containerd:
    registries:
      "*":
        mirrors:
          - https://my-cr.tld

What KubeOne version are you using?

$ kubeone version
{
  "kubeone": {
    "major": "1",
    "minor": "7",
    "gitVersion": "1.7.0",
    "gitCommit": "1195366fd0cf11f314d194a3b29b6a782afde9a8",
    "gitTreeState": "",
    "buildDate": "2023-09-08T14:02:33Z",
    "goVersion": "go1.20.5",
    "compiler": "gc",
    "platform": "darwin/amd64"
  },
  "machine_controller": {
    "major": "1",
    "minor": "57",
    "gitVersion": "v1.57.3",
    "gitCommit": "",
    "gitTreeState": "",
    "buildDate": "",
    "goVersion": "",
    "compiler": "",
    "platform": "linux/amd64"
  }
}

Provide your KubeOneCluster manifest here (if applicable)

Let me know if the above snippet isn't enough but pretty sure the rest doesn't matter.

# paste manifest here

What cloud provider are you running on?

OpenStack

What operating system are you running in your cluster?

Ubuntu 22.04

Additional information

I'm kinda thinking this is a regression, i.e. I think I tried using registry mirrors like that before (but then didn't use the feature at all because something else was missing - only retried now, probably several months later).

@judge-red judge-red added kind/bug Categorizes issue or PR as related to a bug. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. labels Oct 9, 2023
@judge-red
Copy link
Author

@kron4eg Thanks for the quick fix - can we get this into 1.7.1 (after/if it's merged into main), please?

@xmudrii
Copy link
Member

xmudrii commented Oct 9, 2023

@judge-red Yes, cherry-picks for v1.7 and v1.6 are already created. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants