File tree Expand file tree Collapse file tree 5 files changed +38
-4
lines changed Expand file tree Collapse file tree 5 files changed +38
-4
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ patches:
30
30
- path : patches/webhook_in_machinehealthchecks.yaml
31
31
- path : patches/webhook_in_clusterresourcesets.yaml
32
32
- path : patches/webhook_in_clusterresourcesetbindings.yaml
33
+ - path : patches/webhook_in_ipaddresses.yaml
34
+ - path : patches/webhook_in_ipaddressclaims.yaml
33
35
# +kubebuilder:scaffold:crdkustomizewebhookpatch
34
36
35
37
# the following config is for teaching kustomize how to do kustomization for CRDs.
Original file line number Diff line number Diff line change
1
+ # The following patch enables conversion webhook for CRD
2
+ # CRD conversion requires k8s 1.13 or later.
3
+ apiVersion : apiextensions.k8s.io/v1
4
+ kind : CustomResourceDefinition
5
+ metadata :
6
+ name : ipaddressclaims.ipam.cluster.x-k8s.io
7
+ spec :
8
+ conversion :
9
+ strategy : Webhook
10
+ webhook :
11
+ conversionReviewVersions : ["v1", "v1beta1"]
12
+ clientConfig :
13
+ service :
14
+ namespace : system
15
+ name : webhook-service
16
+ path : /convert
Original file line number Diff line number Diff line change
1
+ # The following patch enables conversion webhook for CRD
2
+ # CRD conversion requires k8s 1.13 or later.
3
+ apiVersion : apiextensions.k8s.io/v1
4
+ kind : CustomResourceDefinition
5
+ metadata :
6
+ name : ipaddresses.ipam.cluster.x-k8s.io
7
+ spec :
8
+ conversion :
9
+ strategy : Webhook
10
+ webhook :
11
+ conversionReviewVersions : ["v1", "v1beta1"]
12
+ clientConfig :
13
+ service :
14
+ namespace : system
15
+ name : webhook-service
16
+ path : /convert
Original file line number Diff line number Diff line change @@ -58,8 +58,6 @@ replacements:
58
58
select :
59
59
kind : CustomResourceDefinition
60
60
reject :
61
- - name : ipaddressclaims.ipam.cluster.x-k8s.io
62
- - name : ipaddresses.ipam.cluster.x-k8s.io
63
61
- name : extensionconfigs.runtime.cluster.x-k8s.io
64
62
- source :
65
63
fieldPath : .metadata.name
@@ -93,8 +91,6 @@ replacements:
93
91
select :
94
92
kind : CustomResourceDefinition
95
93
reject :
96
- - name : ipaddressclaims.ipam.cluster.x-k8s.io
97
- - name : ipaddresses.ipam.cluster.x-k8s.io
98
94
- name : extensionconfigs.runtime.cluster.x-k8s.io
99
95
- source :
100
96
fieldPath : .metadata.name
Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ import (
65
65
expv1beta1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
66
66
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta2"
67
67
expcontrollers "sigs.k8s.io/cluster-api/exp/controllers"
68
+ ipamv1alpha1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1alpha1"
69
+ ipamv1beta1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta1"
68
70
ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta2"
69
71
expipamwebhooks "sigs.k8s.io/cluster-api/exp/ipam/webhooks"
70
72
runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1alpha1"
@@ -158,6 +160,8 @@ func init() {
158
160
159
161
_ = runtimev1 .AddToScheme (scheme )
160
162
163
+ _ = ipamv1alpha1 .AddToScheme (scheme )
164
+ _ = ipamv1beta1 .AddToScheme (scheme )
161
165
_ = ipamv1 .AddToScheme (scheme )
162
166
163
167
// Register the RuntimeHook types into the catalog.
You can’t perform that action at this time.
0 commit comments