Skip to content

Allow overriding secretKey for kubeadm kubeconfig - #408

Merged
prometherion merged 1 commit into
clastix:masterfrom
aenix-io:kubeconfig-secret-key
Apr 18, 2024
Merged

prometherion merged 1 commit into
clastix:masterfrom
aenix-io:kubeconfig-secret-key

Conversation

@kvaps

@kvaps kvaps commented Feb 5, 2024 •

Copy link
Copy Markdown
Contributor

follow up clastix/cluster-api-control-plane-provider-kamaji#78

During reconciliation, the bootstrap provider copies the content from the secret provided by Kamaji, named <cluster>-admin-kubeconfig into a cluster-info configmap of tenant cluster, which then used by kubeadm to join nodes.

This change introduces a new annotation, kamaji.clastix.io/kubeconfig-secret-key, for the TenantControlPlane resource. This annotation instructs kamaji to read the kubeconfig from a specific key (the default one is super-admin.conf).

Example:

kamaji.clastix.io/kubeconfig-secret-key: super-admin.svc

This will instruct the system to use super-admin.svc a kubeconfig with a local service FQDN (introduced by #403).

@netlify

netlify Bot commented Feb 5, 2024 •

Copy link
Copy Markdown

✅ Deploy Preview for kamaji-documentation canceled.

Name Link
🔨 Latest commit 294d70a
🔍 Latest deploy log https://app.netlify.com/sites/kamaji-documentation/deploys/65e6da9b2574a60008683546

Comment thread internal/utilities/tenant_client.go Resolved
@kvaps
kvaps force-pushed the kubeconfig-secret-key branch 2 times, most recently from 6df5b94 to 5324710 Compare March 5, 2024 08:39
During reconciliation, the bootstrap provider copies the content from the secret provided by Kamaji, named `<cluster>-admin-kubeconfig` into a `cluster-info` configmap of tenant cluster, which then used by kubeadm to join nodes.

This change introduces a new annotation, `kamaji.clastix.io/kubeconfig-secret-key`, for the TenantControlPlane resource. This annotation instructs kamaji to read the kubeconfig from a specific key (the default one is super-admin.conf).

Example:

```
kamaji.clastix.io/kubeconfig-secret-key: super-admin.svc
```

This will instruct the system to use `super-admin.svc` a kubeconfig with a local service FQDN (introduced by clastix#403).

Signed-off-by: Andrei Kvapil <[email protected]>
@kvaps
kvaps force-pushed the kubeconfig-secret-key branch from 5324710 to 294d70a Compare March 5, 2024 08:40
@kvaps
kvaps requested a review from prometherion March 5, 2024 08:43
@prometherion prometherion added this to the v0.5.0 milestone Apr 3, 2024

@prometherion prometherion left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this will be available in the upcoming Kamaji release (planned for v0.5.0).

@prometherion
prometherion merged commit ced34a5 into clastix:master Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants