Skip to content

Commit 163d345

Browse files
Merge pull request #319 from abays/OSPRH-19336
[OSPRH-19336] Remove deprecated Kustomize fields in config dir
2 parents f4b9fba + 062b1b6 commit 163d345

File tree

6 files changed

+35
-30
lines changed

6 files changed

+35
-30
lines changed

config/crd/kustomization.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ resources:
66
- bases/baremetal.openstack.org_openstackbaremetalsets.yaml
77
#+kubebuilder:scaffold:crdkustomizeresource
88

9-
patchesStrategicMerge:
9+
patches:
1010
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
1111
# patches here are for enabling the conversion webhook for each CRD
12-
#- patches/webhook_in_openstackprovisionservers.yaml
13-
#- patches/webhook_in_openstackbaremetalsets.yaml
12+
#- path: patches/webhook_in_openstackprovisionservers.yaml
13+
#- path: patches/webhook_in_openstackbaremetalsets.yaml
1414
#+kubebuilder:scaffold:crdkustomizewebhookpatch
1515

1616
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
1717
# patches here are for enabling the CA injection for each CRD
18-
#- patches/cainjection_in_openstackprovisionservers.yaml
19-
#- patches/cainjection_in_openstackbaremetalsets.yaml
18+
#- path: patches/cainjection_in_openstackprovisionservers.yaml
19+
#- path: patches/cainjection_in_openstackbaremetalsets.yaml
2020
#+kubebuilder:scaffold:crdkustomizecainjectionpatch
2121

2222
# the following config is for teaching kustomize how to do kustomization for CRDs.

config/default/kustomization.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ namespace: openstack-baremetal-operator-system
99
namePrefix: openstack-baremetal-operator-
1010

1111
# Labels to add to all resources and selectors.
12-
#commonLabels:
13-
# someName: someValue
12+
#labels:
13+
#- includeSelectors: true
14+
# includeTemplates: true
15+
# pairs:
16+
# someName: someValue
1417

15-
bases:
18+
resources:
1619
- ../crd
1720
- ../rbac
1821
- ../manager
@@ -24,25 +27,26 @@ bases:
2427
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
2528
#- ../prometheus
2629

27-
patchesStrategicMerge:
30+
patches:
2831
# Protect the /metrics endpoint by putting it behind auth.
2932
# If you want your controller-manager to expose the /metrics
3033
# endpoint w/o any authn/z, please comment the following line.
31-
- manager_auth_proxy_patch.yaml
34+
- path: manager_auth_proxy_patch.yaml
3235

3336

3437

3538
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
3639
# crd/kustomization.yaml
37-
- manager_webhook_patch.yaml
40+
- path: manager_webhook_patch.yaml
3841

3942
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'.
4043
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks.
4144
# 'CERTMANAGER' needs to be enabled to use ca injection
42-
- webhookcainjection_patch.yaml
45+
- path: mutatingwebhookcainjection_patch.yaml
46+
- path: validatingwebhookcainjection_patch.yaml
4347

4448
# Injects our custom images (ENV variable settings)
45-
- manager_default_images.yaml
49+
- path: manager_default_images.yaml
4650

4751
# the following config is for teaching kustomize how to do var substitution
4852
vars:
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This patch add annotation to admission webhook config and
2+
# the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize.
3+
apiVersion: admissionregistration.k8s.io/v1
4+
kind: MutatingWebhookConfiguration
5+
metadata:
6+
labels:
7+
app.kubernetes.io/name: mutatingwebhookconfiguration
8+
app.kubernetes.io/instance: mutating-webhook-configuration
9+
app.kubernetes.io/component: webhook
10+
app.kubernetes.io/created-by: openstack-baremetal-operator
11+
app.kubernetes.io/part-of: openstack-baremetal-operator
12+
app.kubernetes.io/managed-by: kustomize
13+
name: mutating-webhook-configuration
14+
annotations:
15+
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)

config/default/webhookcainjection_patch.yaml renamed to config/default/validatingwebhookcainjection_patch.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
# This patch add annotation to admission webhook config and
22
# the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize.
33
apiVersion: admissionregistration.k8s.io/v1
4-
kind: MutatingWebhookConfiguration
5-
metadata:
6-
labels:
7-
app.kubernetes.io/name: mutatingwebhookconfiguration
8-
app.kubernetes.io/instance: mutating-webhook-configuration
9-
app.kubernetes.io/component: webhook
10-
app.kubernetes.io/created-by: openstack-baremetal-operator
11-
app.kubernetes.io/part-of: openstack-baremetal-operator
12-
app.kubernetes.io/managed-by: kustomize
13-
name: mutating-webhook-configuration
14-
annotations:
15-
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
16-
---
17-
apiVersion: admissionregistration.k8s.io/v1
184
kind: ValidatingWebhookConfiguration
195
metadata:
206
labels:

config/manifests/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ resources:
99
# [WEBHOOK] To enable webhooks, uncomment all the sections with [WEBHOOK] prefix.
1010
# Do NOT uncomment sections with prefix [CERTMANAGER], as OLM does not support cert-manager.
1111
# These patches remove the unnecessary "cert" volume and its manager container volumeMount.
12-
#patchesJson6902:
12+
#patches:
1313
#- target:
1414
# group: apps
1515
# version: v1

config/scorecard/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resources:
22
- bases/config.yaml
3-
patchesJson6902:
3+
patches:
44
- path: patches/basic.config.yaml
55
target:
66
group: scorecard.operatorframework.io
@@ -13,4 +13,4 @@ patchesJson6902:
1313
version: v1alpha3
1414
kind: Configuration
1515
name: config
16-
#+kubebuilder:scaffold:patchesJson6902
16+
#+kubebuilder:scaffold:patches

0 commit comments

Comments
 (0)