-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Bug Report
What did you do?
Generated packagemanifests using operator-sdk with webhooks. Used the generated package manifests to deploy the operator using olm.
What did you expect to see?
Operator running successfully.
What did you see instead? Under which circumstances?
LAST SEEN TYPE REASON OBJECT MESSAGE
83s Normal Scheduled pod/gitlab-controller-manager-58559487b4-gck6q Successfully assigned default/gitlab-controller-manager-58559487b4-gck6q to ip-10-0-140-83.ec2.internal
19s Warning FailedMount pod/gitlab-controller-manager-58559487b4-gck6q MountVolume.SetUp failed for volume "cert" : secret "webhook-server-cert" not found
83s Normal SuccessfulCreate replicaset/gitlab-controller-manager-58559487b4 Created pod: gitlab-controller-manager-58559487b4-gck6q
6m25s Warning FailedMount pod/gitlab-controller-manager-c6fd7d85f-kwl6d MountVolume.SetUp failed for volume "cert" : secret "webhook-server-cert" not found
Environment
Operator type:
/language go
$ operator-sdk version
operator-sdk version: "v1.0.1", commit: "4169b318b578156ed56530f373d328276d040a1b", kubernetes version: "v1.18.2", go version: "go1.15.2 darwin/amd64", GOOS: "darwin", GOARCH: "amd64"
$ go version (if language is Go)
go version go1.15.2
Possible Solution
The reason for this error is that the generated CSV specifies the volume where webhook server certificate will be attached. However, since olm takes care of providing the certificate and placing at the required location, we need not specify this. Currently, the operator waits to mount webhook-server-cert (certificate) which is not present in cluster. Commenting this piece in csv solves the issue and operator installs successfully.
The csv generator may have to be modified to not add conatainerMountVolume if olm is mounting the certificates. However, we need to be aware to not remove volumes/ports specified by users.
Previous discussion: #3761 (comment)
c/c @estroz