@@ -3,53 +3,6 @@ kind: Namespace
3
3
metadata :
4
4
name : example1
5
5
---
6
- apiVersion : cert-manager.io/v1
7
- kind : Issuer
8
- metadata :
9
- name : selfsigned
10
- namespace : example1
11
- spec :
12
- selfSigned : {}
13
- ---
14
- apiVersion : cert-manager.io/v1
15
- kind : Certificate
16
- metadata :
17
- name : webhook1-certificate
18
- namespace : example1
19
- spec :
20
- secretName : k8s-controller-tls # Secret mounted in deployment
21
- dnsNames :
22
- - k8s-custom-controller-service.example1.svc
23
- - k8s-custom-controller-service.example1.svc.cluster.local
24
- issuerRef :
25
- name : selfsigned
26
- ---
27
- apiVersion : admissionregistration.k8s.io/v1
28
- kind : ValidatingWebhookConfiguration
29
- metadata :
30
- name : webhook1
31
- annotations :
32
- cert-manager.io/inject-ca-from : example1/webhook1-certificate
33
- webhooks :
34
- - name : k8s-custom-controller-service.example1.svc
35
- admissionReviewVersions :
36
- - v1
37
- sideEffects : None
38
- timeoutSeconds : 30
39
- clientConfig :
40
- service :
41
- name : k8s-custom-controller-service
42
- namespace : example1
43
- path : /validate
44
- port : 443
45
- rules :
46
- - apiGroups : [ "apps" ]
47
- apiVersions : [ "v1" ]
48
- operations : [ "CREATE" ]
49
- resources : [ "deployments" ]
50
- failurePolicy : Fail
51
-
52
- ---
53
6
apiVersion : apps/v1
54
7
kind : Deployment
55
8
metadata :
77
30
value : " /certs/tls.crt"
78
31
- name : TLS_KEY_FILE
79
32
value : " /certs/tls.key"
80
- # - name: BYPASS_CVE_DENIED
81
- # value: "yes" # yes or true (lowercase)
33
+ # - name: BYPASS_CVE_DENIED
34
+ # value: "yes" # yes or true (lowercase)
82
35
volumes :
83
36
- name : webhook-certs
84
37
secret :
97
50
port : 443
98
51
targetPort : 8000
99
52
type : ClusterIP
53
+ ---
54
+ apiVersion : cert-manager.io/v1
55
+ kind : Issuer
56
+ metadata :
57
+ name : selfsigned
58
+ namespace : example1
59
+ spec :
60
+ selfSigned : {}
61
+ ---
62
+ apiVersion : cert-manager.io/v1
63
+ kind : Certificate
64
+ metadata :
65
+ name : webhook1-certificate
66
+ namespace : example1
67
+ spec :
68
+ secretName : k8s-controller-tls # Secret mounted in deployment
69
+ dnsNames :
70
+ - k8s-custom-controller-service.example1.svc
71
+ - k8s-custom-controller-service.example1.svc.cluster.local
72
+ issuerRef :
73
+ name : selfsigned
74
+ ---
75
+ apiVersion : admissionregistration.k8s.io/v1
76
+ kind : ValidatingWebhookConfiguration
77
+ metadata :
78
+ name : webhook1
79
+ annotations :
80
+ cert-manager.io/inject-ca-from : example1/webhook1-certificate
81
+ webhooks :
82
+ - name : k8s-custom-controller-service.example1.svc
83
+ admissionReviewVersions :
84
+ - v1
85
+ sideEffects : None
86
+ timeoutSeconds : 30
87
+ clientConfig :
88
+ service :
89
+ name : k8s-custom-controller-service
90
+ namespace : example1
91
+ path : /validate
92
+ port : 443
93
+ rules :
94
+ - apiGroups : [ "apps" ]
95
+ apiVersions : [ "v1" ]
96
+ operations : [ "CREATE" ]
97
+ resources : [ "deployments" ]
98
+ failurePolicy : Fail
0 commit comments