Skip to content

Commit e170e52

Browse files
stubbiclaude
andcommitted
fix(olm): declare webhookDefinitions so OLM provisions the webhook cert
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>
1 parent 7487d80 commit e170e52

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

bundle/manifests/hermes-operator.clusterserviceversion.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,10 @@ spec:
632632
args:
633633
- '--leader-elect'
634634
- '--health-probe-bind-address=:8081'
635+
ports:
636+
- containerPort: 9443
637+
name: webhook-server
638+
protocol: TCP
635639
securityContext:
636640
allowPrivilegeEscalation: false
637641
capabilities:
@@ -658,3 +662,84 @@ spec:
658662
requests:
659663
cpu: 100m
660664
memory: 128Mi
665+
webhookdefinitions:
666+
- type: MutatingAdmissionWebhook
667+
admissionReviewVersions:
668+
- v1
669+
containerPort: 443
670+
targetPort: 9443
671+
deploymentName: hermes-operator-controller-manager
672+
failurePolicy: Fail
673+
generateName: mhermesinstance.hermes.agent
674+
rules:
675+
- apiGroups:
676+
- hermes.agent
677+
apiVersions:
678+
- v1
679+
operations:
680+
- CREATE
681+
- UPDATE
682+
resources:
683+
- hermesinstances
684+
sideEffects: None
685+
webhookPath: /mutate-hermes-agent-v1-hermesinstance
686+
- type: ValidatingAdmissionWebhook
687+
admissionReviewVersions:
688+
- v1
689+
containerPort: 443
690+
targetPort: 9443
691+
deploymentName: hermes-operator-controller-manager
692+
failurePolicy: Fail
693+
generateName: vhermesinstance.hermes.agent
694+
rules:
695+
- apiGroups:
696+
- hermes.agent
697+
apiVersions:
698+
- v1
699+
operations:
700+
- CREATE
701+
- UPDATE
702+
resources:
703+
- hermesinstances
704+
sideEffects: None
705+
webhookPath: /validate-hermes-agent-v1-hermesinstance
706+
- type: ValidatingAdmissionWebhook
707+
admissionReviewVersions:
708+
- v1
709+
containerPort: 443
710+
targetPort: 9443
711+
deploymentName: hermes-operator-controller-manager
712+
failurePolicy: Fail
713+
generateName: vhermesclusterdefaults.hermes.agent
714+
rules:
715+
- apiGroups:
716+
- hermes.agent
717+
apiVersions:
718+
- v1
719+
operations:
720+
- CREATE
721+
- UPDATE
722+
resources:
723+
- hermesclusterdefaults
724+
sideEffects: None
725+
webhookPath: /validate-hermes-agent-v1-hermesclusterdefaults
726+
- type: ValidatingAdmissionWebhook
727+
admissionReviewVersions:
728+
- v1
729+
containerPort: 443
730+
targetPort: 9443
731+
deploymentName: hermes-operator-controller-manager
732+
failurePolicy: Fail
733+
generateName: vhermesselfconfig.hermes.agent
734+
rules:
735+
- apiGroups:
736+
- hermes.agent
737+
apiVersions:
738+
- v1
739+
operations:
740+
- CREATE
741+
- UPDATE
742+
resources:
743+
- hermesselfconfigs
744+
sideEffects: None
745+
webhookPath: /validate-hermes-agent-v1-hermesselfconfig

0 commit comments

Comments
 (0)