webhook.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. apiVersion: cert-manager.io/v1
  2. kind: Issuer
  3. metadata:
  4. name: selfsigned-issuer
  5. namespace: hostpath-provisioner
  6. spec:
  7. selfSigned: {}
  8. ---
  9. apiVersion: cert-manager.io/v1
  10. kind: Certificate
  11. metadata:
  12. namespace: hostpath-provisioner
  13. name: hostpath-provisioner-operator-webhook-service-cert
  14. labels:
  15. name: hostpath-provisioner-operator
  16. spec:
  17. secretName: hostpath-provisioner-operator-webhook-service-cert
  18. dnsNames:
  19. - hostpath-provisioner-operator-webhook-service.hostpath-provisioner.svc
  20. issuerRef:
  21. name: selfsigned-issuer
  22. ---
  23. apiVersion: v1
  24. kind: Service
  25. metadata:
  26. name: hostpath-provisioner-operator-webhook-service
  27. namespace: hostpath-provisioner
  28. spec:
  29. ports:
  30. - port: 443
  31. protocol: TCP
  32. targetPort: 9443
  33. selector:
  34. name: hostpath-provisioner-operator
  35. ---
  36. apiVersion: admissionregistration.k8s.io/v1
  37. kind: ValidatingWebhookConfiguration
  38. metadata:
  39. name: hostpathprovisioner.kubevirt.io
  40. annotations:
  41. cert-manager.io/inject-ca-from: hostpath-provisioner/hostpath-provisioner-operator-webhook-service-cert
  42. labels:
  43. name: hostpath-provisioner-operator
  44. webhooks:
  45. - admissionReviewVersions:
  46. - v1beta1
  47. clientConfig:
  48. service:
  49. name: hostpath-provisioner-operator-webhook-service
  50. namespace: hostpath-provisioner
  51. path: /validate-hostpathprovisioner-kubevirt-io-v1beta1-hostpathprovisioner
  52. port: 443
  53. failurePolicy: Fail
  54. matchPolicy: Equivalent
  55. name: validate-hostpath-provisioner.kubevirt.io
  56. objectSelector: {}
  57. rules:
  58. - apiGroups:
  59. - hostpathprovisioner.kubevirt.io
  60. apiVersions:
  61. - v1beta1
  62. operations:
  63. - CREATE
  64. - DELETE
  65. - UPDATE
  66. resources:
  67. - "*/*"
  68. scope: '*'
  69. sideEffects: None
  70. timeoutSeconds: 30