k8snetworkplumbingwg / sriov-network-operator

Operator for provisioning and configuring SR-IOV CNI plugin and device plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webhooks enabled by default

ianb-mp opened this issue · comments

According to the quickstart quide webhooks should be disabled by default and yet it appears to be enabled by default!?

I followed the install instructions in the quickstart guide and did not set ENABLE_ADMISSION_CONTROLLER=true. The install appears to have been successful, however I see a couple of pods that are failing to start:

$ kubectl get pods -n sriov-network-operator
NAME                                      READY   STATUS              RESTARTS   AGE
network-resources-injector-kmx4n          0/1     ContainerCreating   0          2d18h
operator-webhook-sr7jc                    0/1     ContainerCreating   0          2d18h
sriov-network-operator-7c76968557-wpfqn   1/1     Running             0          2d18h

If I describe the webhook and network-resources pods I see these event messages:

Events:
  Type     Reason       Age                     From     Message
  ----     ------       ----                    ----     -------
  Warning  FailedMount  59m (x1743 over 2d18h)  kubelet  Unable to attach or mount volumes: unmounted volumes=[tls], unattached volumes=[], failed to process volumes=[]: timed out waiting for the condition
  Warning  FailedMount  49m (x1955 over 2d18h)  kubelet  MountVolume.SetUp failed for volume "tls" : secret "operator-webhook-service" not found
  Warning  FailedMount  12m (x23 over 42m)      kubelet  MountVolume.SetUp failed for volume "tls" : secret "operator-webhook-service" not found
  Warning  FailedMount  2m11s (x18 over 40m)    kubelet  Unable to attach or mount volumes: unmounted volumes=[tls], unattached volumes=[], failed to process volumes=[]: timed out waiting for the condition

I'm using Kubernetes v1.27.7+k3s2

Hey, how did you deployed? Did you use a make target?

I used make deploy-setup-k8s. I did a complete reinstall (for other reasons) and had the same issue on the second attempt. Installing cert-manager as per the quickstart instructions has resolved the issue.

Unless I'm mistaken, the Makefile will set ENABLE_ADMISSION_CONTROLLER to be true unless the variable is already set prior to make being called. Would it make sense to modify the Makefile like this? master...ianb-mp:sriov-network-operator:patch-1

im fine with disabling by default to align with quickstart guide.