Skip to content

Conversation

@Diaphteiros
Copy link
Contributor

@Diaphteiros Diaphteiros commented Oct 28, 2025

What this PR does / why we need it:
For webhooks, the main pod of a PlatformService likely needs to mount a secret containing TLS certificates, while the init job is likely to create/update this secret and therefore cannot mount it (at least not on the initial run). Configuring this scenario is not possible with the extraVolumes and extraVolumeMounts field inside the PlatformService's spec, because the configuration from there is applied to both pods.

This PR adds a webhook field to all provider resources' spec, containing an enabled field. If true, a certificate secret will automatically be mounted in the regular pod belonging to the provider. During deployment of the provider, the deployment controller now checks if a webhook TLS secret exists for the provider. The name of the secret is derived from a method that has been added to the lib/ utils package.

Which issue(s) this PR fixes:
Required for openmcp-project/project-workspace-operator#132

Special notes for your reviewer:

Release note:

During provider deployment, it is now checked whether a webhook TLS secret exists for the provider being deployed. If so, it is automatically mounted in the run container. The name of the mounted secret is determined by the new `WebhookSecretName` function from the `lib/utils` package.

@Diaphteiros
Copy link
Contributor Author

@reshnm criticized that it would be difficult for a human landscape operator to remember for which platform services the webhook needs to be enabled and for which ones not. Since this is only used for mounting the TLS secret at the moment, I modified the logic to simply search for a secret with the expected name. If found, it is mounted in the run container.

@Diaphteiros Diaphteiros merged commit 90bc43f into main Oct 30, 2025
5 checks passed
@Diaphteiros Diaphteiros deleted the webhooks branch October 30, 2025 14:05
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.

3 participants