Skip to content

clusterctl init fails for k0sproject-k0smotron when GOPROXY=off (v1.10.1) #12241

@kahirokunn

Description

@kahirokunn

What steps did you take and what happened?

# Disable Go module proxy
export GOPROXY=off

# 1. No target namespace
clusterctl init --bootstrap k0sproject-k0smotron
# Error:
#   failed to get provider components for the "k0sproject-k0smotron" provider:
#   target namespace can't be defaulted. Please specify a target namespace

# 2. With explicit namespace
clusterctl init --bootstrap k0sproject-k0smotron --target-namespace k0smotron
# Error:
#   invalid provider metadata: version v1.5.2 for the provider
#   k0smotron/bootstrap-k0sproject-k0smotron does not match any release series

If GOPROXY is unset (default https://proxy.golang.org,direct) the same command succeeds:

unset GOPROXY
clusterctl init --bootstrap k0sproject-k0smotron
# → management cluster initialises successfully

What did you expect to happen?

clusterctl init should succeed—or at least fail with a single, clear diagnostic—irrespective of GOPROXY settings, as long as the referenced provider versions exist.

Cluster API version

Binary release v1.10.1
(clusterctl version: v1.10.1)

Heads-up: Building clusterctl from the current main branch does not reproduce the issue because the provider-URL table now points at k0smotron/k0smotron and metadata handling has improved.

Kubernetes version

Client Version: v1.33.1
Kustomize Version: v5.6.0
Server Version: v1.33.1

Anything else you would like to add?

  • Root cause is a mix of

    1. Hard-coded URLs in v1.10.1 pointing at the old repo (github.com/k0sproject/k0smotron) which now 404s, and
    2. GOPROXY=off preventing direct-VCS fallback, exposing a secondary issue where the v1.5.2 tag’s metadata.yaml lacks a matching releaseSeries.

Label(s) to be applied

/kind bug
/area clusterctl

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/clusterctlIssues or PRs related to clusterctlkind/bugCategorizes issue or PR as related to a bug.needs-priorityIndicates an issue lacks a `priority/foo` label and requires one.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions