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

add --ca-cert flag to the vcluster platform add vcluster, so it can b… #2046

Conversation

hidalgopl
Copy link
Contributor

@hidalgopl hidalgopl commented Aug 8, 2024

…e used by passing .additionalCA from platform config

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

What does this pull request do? Which issues does it resolve? (use resolves #<issue_number> if possible)
part of ENG-4224

Please provide a short message that should be published in the vcluster release notes
adds --ca-cert flag and adds certificate-authority-data to the platform secret to enable secure connection between platform and vcluster. Overall behavior is described in this PR

What else do we need to know?

…e used by passing .additionalCA from platform config
Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for vcluster-docs canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 1f55f06
🔍 Latest deploy log https://app.netlify.com/sites/vcluster-docs/deploys/66bb1bcd86c353000884b323

@hidalgopl hidalgopl force-pushed the add-hidden-ca-cert-flag-to-platform-add-vcluster branch from bd17fd5 to 87054a4 Compare August 12, 2024 17:25
@hidalgopl hidalgopl added the backport-to-v0.20 backport this PR to v0.20 branch label Aug 13, 2024
@hidalgopl hidalgopl force-pushed the add-hidden-ca-cert-flag-to-platform-add-vcluster branch from 87054a4 to 1f55f06 Compare August 13, 2024 08:39
@@ -380,7 +380,7 @@ func (cmd *createHelm) addVCluster(ctx context.Context, vClusterConfig *config.C
return nil
}

err = platform.ApplyPlatformSecret(ctx, cmd.LoadedConfig(cmd.log), cmd.kubeClient, "", cmd.Namespace, cmd.Project, "", "", false)
err = platform.ApplyPlatformSecret(ctx, cmd.LoadedConfig(cmd.log), cmd.kubeClient, "", cmd.Namespace, cmd.Project, "", "", false, cmd.LoadedConfig(cmd.log).Platform.CertificateAuthorityData)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this come from the flag? Why is this read from the config, while the other options are read from the flag?

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'm not sure what's the preferred way to do this here.
I can change it for a flag, which will mean that vcluster create vcluster with driver helm will get a new flag. Do you think this should be a desired behavior?

@FabianKramm FabianKramm merged commit 9eb9cc7 into loft-sh:main Aug 14, 2024
61 checks passed
loft-bot pushed a commit that referenced this pull request Aug 14, 2024
#2046)

* add --ca-cert flag to the vcluster platform add vcluster, so it can be used by passing .additionalCA from platform config

* pass additionalCA to create kube config for platform

(cherry picked from commit 9eb9cc7)
@loft-bot
Copy link

💚 All backports created successfully

Status Branch Result
v0.20

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

FabianKramm added a commit that referenced this pull request Aug 14, 2024
[v0.20] add --ca-cert flag to the vcluster platform add vcluster, so it can b… (#2046)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-v0.20 backport this PR to v0.20 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants