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

bugfix: set labels to kubeconfig and cert secrets #2330

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maheshbaliga
Copy link
Contributor

What issue type does this pull request address? (keep at least one, remove the others)
/kind bugfix

What does this pull request do? Which issues does it resolve? (use resolves #<issue_number> if possible)
resolves #2283 .The pull request adds labels to two secrets that contain a kubeconfig and a certificate. These labels help improve the organization and management of the secrets.

Please provide a short message that should be published in the vcluster release notes
Fixed an issue where vcluster 2 secrets containing a kubeconfig and a certificate were missing labels.

What else do we need to know?

Copy link

netlify bot commented Dec 13, 2024

Deploy Preview for vcluster-docs canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit dbf9d38
🔍 Latest deploy log https://app.netlify.com/sites/vcluster-docs/deploys/67642e8739183400085db0c8

@maheshbaliga maheshbaliga marked this pull request as ready for review December 16, 2024 07:16
Copy link
Member

@FabianKramm FabianKramm left a comment

Choose a reason for hiding this comment

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

@maheshbaliga thanks for the PR! Please see my comments

@@ -70,6 +73,10 @@ func WriteKubeConfig(ctx context.Context, currentNamespaceClient client.Client,
ObjectMeta: metav1.ObjectMeta{
Name: secretName,
Namespace: secretNamespace,
Labels: map[string]string{
KubeConfigSecretLabelAppKey: KubeConfigSecretLabelAppValue,
KubeConfigSecretLabelReleaseKey: secretNamespace,
Copy link
Member

Choose a reason for hiding this comment

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

I don't think the release name is equal to the namespace name, that only happens for development where the release is equal the namespace

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @FabianKramm, I have made the necessary changes. I initially wanted to use 'vcluster.loft.sh/vcluster-name' instead of 'vcluster-name' as the key, but found the same key used as an annotation in syncer.go

@@ -131,6 +137,10 @@ func EnsureCerts(
Name: secretName,
Namespace: currentNamespace,
OwnerReferences: ownerRef,
Labels: map[string]string{
CertSecretLabelAppKey: CertSecretLabelAppValue,
CertSecretLabelReleaseKey: currentNamespace,
Copy link
Member

Choose a reason for hiding this comment

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

I don't think the release name is equal to the namespace name, that only happens for development where the release is equal the namespace

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made the necessary changes.

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.

Vcluster secrets labelling is missing
2 participants