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

Allow overriding secretKey for kubeadm kubeconfig #408

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

kvaps
Copy link
Contributor

@kvaps kvaps commented Feb 5, 2024

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).

Copy link

netlify bot commented Feb 5, 2024

Deploy Preview for kamaji-documentation canceled.

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

internal/utilities/tenant_client.go Outdated Show resolved Hide 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 <kvapss@gmail.com>
@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
Copy link
Member

@prometherion prometherion left a comment

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
10 checks passed
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.

None yet

2 participants