# The webhook sees only pods with the profile label, so gofer can never # block any other pod. A pod that asked for a browser never runs without # one, so a webhook that cannot be reached refuses the pod. The operator # writes caBundle when it starts. apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: name: gofer webhooks: - name: pods.gofer.guid.foo admissionReviewVersions: [v1] sideEffects: None failurePolicy: Fail # A webhook that runs after this one and changes the pod sends it # back here, so the rules see the pod as it will run. reinvocationPolicy: IfNeeded timeoutSeconds: 10 clientConfig: service: name: gofer namespace: gofer-system path: /mutate port: 8443 objectSelector: matchExpressions: - key: gofer.guid.foo/profile operator: Exists rules: - apiGroups: [""] apiVersions: [v1] operations: [CREATE, UPDATE] resources: [pods, pods/ephemeralcontainers]