fix(olm): declare webhookDefinitions so OLM provisions the webhook cert - #57
Merged
Conversation
The hermes manager registers admission webhooks (RegisterHermesInstanceWebhook mutating defaulter + validating, RegisterHermesClusterDefaultsWebhook, RegisterHermesSelfConfigWebhook) and serves TLS on the webhook server (default port 9443), but the bundle CSV declared no spec.webhookDefinitions. Under OLM there is no cert-manager, so OLM only provisions the webhook serving cert and creates the Validating/MutatingWebhookConfiguration when the CSV declares the webhooks in spec.webhookDefinitions. Without it the manager crashes with "open /tmp/k8s-webhook-server/serving-certs/tls.crt: no such file or directory", CrashLoopBackOff, and the OperatorHub "Full operator test" (kiwi) install fails. This is the real blocker keeping hermes off OperatorHub. Add one webhookDefinitions entry per registered webhook (1 mutating, 3 validating) derived from config/webhook/manifests.yaml and the api/v1 +kubebuilder:webhook markers, plus expose containerPort 9443 (webhook-server) on the manager container so OLM wires the service to the webhook server. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stubbi
added a commit
that referenced
this pull request
Jun 3, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.12](v0.1.11...v0.1.12) (2026-06-03) ### Features * optional Gateway API HTTPRoute for HermesInstance ([#59](#59)) ([ff5d781](ff5d781)) * tier-1/2 parity (digest-pin, bench, image CEL, zombie reaping, Grafana, docs-site) ([#56](#56)) ([712ed2b](712ed2b)) ### Bug Fixes * **olm:** declare webhookDefinitions so OLM provisions the webhook cert ([#57](#57)) ([4420511](4420511)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: paperclip-release-bot[bot] <288053502+paperclip-release-bot[bot]@users.noreply.github.com> Co-authored-by: Jannes Stubbemann <jannes.stubbemann@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem (kiwi crash root cause)
The hermes manager registers admission webhooks and serves TLS on the webhook server, but the bundle CSV declared no
spec.webhookDefinitions:RegisterHermesInstanceWebhook(mutating defaulter + validating)RegisterHermesClusterDefaultsWebhook(validating)RegisterHermesSelfConfigWebhook(validating)Under OLM there is no cert-manager. OLM only provisions the webhook serving cert and creates the
ValidatingWebhookConfiguration/MutatingWebhookConfigurationwhen the CSV declares the webhooks inspec.webhookDefinitions. Without it the manager starts, tries to load its serving cert, and crashes:This produces a CrashLoopBackOff, and the OperatorHub "Full operator test" (kiwi) install fails. This is the real blocker keeping hermes off OperatorHub. (paperclip has no webhook; openclaw does not register/serve one, so only hermes hits this.)
Fix
Added a
spec.webhookDefinitionslist to the CSV with one entry per registered webhook, derived fromconfig/webhook/manifests.yamland theapi/v1+kubebuilder:webhookmarkers:All entries use
admissionReviewVersions: [v1],containerPort: 443/targetPort: 9443(OLM convention to the controller-runtime default webhook port),deploymentName: hermes-operator-controller-manager,sideEffects: None,failurePolicy: Fail, andrulesfor CREATE/UPDATE onapiGroups: [hermes.agent],apiVersions: [v1].Also exposed
containerPort: 9443(webhook-server) on the manager container so OLM can wire the generated webhook Service to the server.The CSV's hand-maintained metadata (rich description, icon, keywords, links, alm-examples, specDescriptors) is preserved unchanged. The bundle
make bundletarget is a custom sync (it does not runoperator-sdk generate bundle), so thewebhookDefinitionsblock was hand-added per the OLMWebhookDescriptionschema rather than regenerated. The webhook details were taken directly from the kubebuilder-generatedconfig/webhook/manifests.yaml; no markers orconfig/webhookwere changed, so nomake manifests/make generateregeneration was required.Validation
operator-sdk bundle validate ./bundle --select-optional suite=operatorframework: All validation tests have completed successfully (the 2 pre-existing cronjobs v1.25 deprecation warnings are unchanged and unrelated).go build ./...: clean.Note on final validation
This cannot be fully validated via kiwi from a branch: kiwi needs a published release plus ~20min. Final validation happens via the next release's OperatorHub re-submission. This PR gets the CSV structurally correct per the OLM spec and
operator-sdk bundle validate.🤖 Generated with Claude Code