Skip to content

Commit f10a85e

Browse files
Consolidate webhook kustomize pieces into the one component
1 parent df77bbc commit f10a85e

File tree

6 files changed

+8
-17
lines changed

6 files changed

+8
-17
lines changed

config/crd/kustomization.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,3 @@ resources:
1212
- bases/elbv2.k8s.aws_targetgroupbindings.yaml
1313
- bases/elbv2.k8s.aws_ingressclassparams.yaml
1414
# +kubebuilder:scaffold:crdkustomizeresource
15-
16-
patches:
17-
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
18-
# patches here are for enabling the conversion webhook for each CRD
19-
#- path: patches/webhook_in_targetgroupbindings.yaml
20-
#- path: patches/webhook_in_ingressclassparams.yaml
21-
# +kubebuilder:scaffold:crdkustomizewebhookpatch

config/default/kustomization.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,15 @@ resources:
1919
- ../crd
2020
- ../rbac
2121
- ../controller
22-
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
23-
# crd/kustomization.yaml
24-
- ../webhook
2522
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
2623
#- ../prometheus
2724

2825
components:
26+
# To disable the conversion webhook, comment out this component
27+
- ../webhook
2928
# To disable cert-manager comment out the following line, the 'webhook' component is required
3029
- ../certmanager
3130

32-
patches:
33-
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
34-
# crd/kustomization.yaml
35-
- path: controller_webhook_patch.yaml
36-
3731
# the following config is for teaching kustomize how to do var substitution
3832
vars:
3933
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.

config/webhook/kustomization.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
apiVersion: kustomize.config.k8s.io/v1beta1
2-
kind: Kustomization
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
33

44
configurations:
55
- kustomizeconfig.yaml
@@ -12,3 +12,7 @@ patches:
1212
- path: pod_mutator_patch.yaml
1313
- path: service_mutator_patch.yaml
1414
- path: ingressclassparams_validator_patch.yaml
15+
- path: controller_webhook_patch.yaml
16+
# patches here are for enabling the conversion webhook for each CRD
17+
- path: targetgroupbindings_patch.yaml
18+
- path: ingressclassparams_patch.yaml

0 commit comments

Comments
 (0)