Skip to content

Use CA in cloudprofile for STACKIT clients#150

Open
nschad wants to merge 29 commits into
mainfrom
use-cloudprofile-ca
Open

Use CA in cloudprofile for STACKIT clients#150
nschad wants to merge 29 commits into
mainfrom
use-cloudprofile-ca

Conversation

@nschad

@nschad nschad commented May 21, 2026

Copy link
Copy Markdown
Contributor

How to categorize this PR?

/kind enhancement

What this PR does / why we need it:

Removes the custom-ca secret and instead uses the CA from the Cloudprofile for all stackit components. OpenStack is unaffected.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Breaking changes:

@ske-prow ske-prow Bot added kind/enhancement Enhancement, improvement, extension do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels May 21, 2026
@ske-prow

ske-prow Bot commented May 21, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nschad for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ske-prow ske-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 21, 2026
@nschad nschad force-pushed the use-cloudprofile-ca branch from 2677cbd to ec54626 Compare May 22, 2026 07:42
@nschad nschad force-pushed the use-cloudprofile-ca branch from ec54626 to 3afb9c7 Compare June 1, 2026 11:18
@nschad nschad force-pushed the use-cloudprofile-ca branch 3 times, most recently from cffc406 to 6431448 Compare June 8, 2026 08:46
@nschad

nschad commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@nschad

nschad commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

/test post-gardener-extension-provider-stackit-dev-artifacts

@ske-prow

ske-prow Bot commented Jun 8, 2026

Copy link
Copy Markdown

@nschad: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test pull-gardener-extension-provider-stackit-integration-tests
/test pull-gardener-extension-provider-stackit-validate-renovate
/test pull-gardener-extension-provider-stackit-verify

Use /test all to run the following jobs that were automatically triggered:

pull-gardener-extension-provider-stackit-integration-tests
pull-gardener-extension-provider-stackit-verify
Details

In response to this:

/test post-gardener-extension-provider-stackit-dev-artifacts

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@nschad nschad changed the title WIP: Use CA in cloudprofile for STACKIT clients Use CA in cloudprofile for STACKIT clients Jun 8, 2026
@ske-prow ske-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 8, 2026

@breuerfelix breuerfelix 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.

Add tests for as much as possible. E.g. webhook, factory and maybe valuesprovider

Comment thread charts/internal/cloud-provider-config/values.yaml Outdated
Comment thread pkg/webhook/controlplane/ensurer.go Outdated
Comment thread pkg/apis/stackit/v1alpha1/types_cloudprofile.go
"podNetwork": strings.Join(extensionscontroller.GetPodNetwork(cluster), ","),
"podAnnotations": map[string]any{
"checksum/secret-" + v1beta1constants.SecretNameCloudProvider: checksums[v1beta1constants.SecretNameCloudProvider],
"checksum/secret-" + openstack.CloudProviderConfigName: checksums[openstack.CloudProviderConfigName],

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.

We also need to add a checksum of the new stackit-ca here, we also need to make sure that the other pods that use the secret has the corresponding checksum in order for ca rotation to work properly

@nschad nschad Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

CA rotation? That's not really a thing to be honest, atleast in this case

@ske-prow ske-prow Bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 23, 2026
@nschad nschad force-pushed the use-cloudprofile-ca branch from 2ef9925 to 38ef61c Compare June 24, 2026 07:30
func newHTTPClientWithCustomCA(caBundle []byte) (*http.Client, error) {
caCertPool, err := x509.SystemCertPool()
if err != nil {
// we could also fall back here and use an empty pool via x509.NewCertPool()

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.

I think erroring is fine but we should customize the error to state what is broken and where does it come from.

Comment thread pkg/controller/controlplane/valuesprovider.go Outdated
apiVersion: v1
kind: Secret
metadata:
name: stackit-ca-bundle

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.

As the CloudProfile.Spec.CABundle field is no STACKIT exclusive I am not sure if we should name it differently (like cloudprofile-ca-bundle), WDYT?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've renamed this. Do you also want me to rename the "internal-path". For example it's called stackit-ca.crt everywhere. I thought its okay since this is the "stackit" extension. So 🤷

nschad added 5 commits July 3, 2026 09:19
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
nschad added 23 commits July 3, 2026 09:19
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
…ed Root CA's

Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
…le instead

Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
…lm-chart

Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
…ending everytime

Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
…verted

Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
@nschad nschad force-pushed the use-cloudprofile-ca branch from 38ef61c to 40db20c Compare July 3, 2026 07:38
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Enhancement, improvement, extension size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants