Skip to content

Commit a68262c

Browse files
abaysClaude
authored andcommitted
[OSPRH-19301] Remove deprecated Kustomize fields in config dir
Update all deprecated Kustomize fields to their modern equivalents across the config directory to ensure compatibility with Kustomize v5.3+ and future versions. Changes made: config/default/kustomization.yaml: - Replace 'bases:' with 'resources:' - Replace 'patchesStrategicMerge:' with 'patches:' - Convert patch entries to use 'path:' format config/crd/kustomization.yaml: - Replace 'patchesStrategicMerge:' with 'patches:' - Update commented patch entries to use 'path:' format for both webhook and cainjection patches config/manifests/kustomization.yaml: - Replace commented '#patchesJson6902:' with '#patches:' config/scorecard/kustomization.yaml: - Replace 'patchesJson6902:' with 'patches:' - Update kubebuilder scaffold comment from 'patchesJson6902' to 'patches' These changes eliminate deprecation warnings and align with the modern Kustomize field syntax while maintaining full backward compatibility. The modernization follows patterns established by other OpenStack K8s operators and industry best practices. Jira: https://issues.redhat.com/browse/OSPRH-19301 Co-authored-by: Claude <[email protected]>
1 parent e67a113 commit a68262c

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

config/crd/kustomization.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ resources:
1212
- bases/nova.openstack.org_novacomputes.yaml
1313
#+kubebuilder:scaffold:crdkustomizeresource
1414

15-
patchesStrategicMerge:
15+
patches:
1616
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
1717
# patches here are for enabling the conversion webhook for each CRD
18-
#- patches/webhook_in_novaapis.yaml
19-
#- patches/webhook_in_novaschedulers.yaml
20-
#- patches/webhook_in_novaconductors.yaml
21-
#- patches/webhook_in_novametadata.yaml
22-
#- patches/webhook_in_novanovncproxies.yaml
23-
#- patches/webhook_in_novacells.yaml
24-
#- patches/webhook_in_nova.yaml
18+
#- path: patches/webhook_in_novaapis.yaml
19+
#- path: patches/webhook_in_novaschedulers.yaml
20+
#- path: patches/webhook_in_novaconductors.yaml
21+
#- path: patches/webhook_in_novametadata.yaml
22+
#- path: patches/webhook_in_novanovncproxies.yaml
23+
#- path: patches/webhook_in_novacells.yaml
24+
#- path: patches/webhook_in_nova.yaml
2525
#+kubebuilder:scaffold:crdkustomizewebhookpatch
2626

2727
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
2828
# patches here are for enabling the CA injection for each CRD
29-
#- patches/cainjection_in_novaapis.yaml
30-
#- patches/cainjection_in_novaschedulers.yaml
31-
#- patches/cainjection_in_novaconductors.yaml
32-
#- patches/cainjection_in_novametadata.yaml
33-
#- patches/cainjection_in_novanovncproxies.yaml
34-
#- patches/cainjection_in_novacells.yaml
35-
#- patches/cainjection_in_nova.yaml
29+
#- path: patches/cainjection_in_novaapis.yaml
30+
#- path: patches/cainjection_in_novaschedulers.yaml
31+
#- path: patches/cainjection_in_novaconductors.yaml
32+
#- path: patches/cainjection_in_novametadata.yaml
33+
#- path: patches/cainjection_in_novanovncproxies.yaml
34+
#- path: patches/cainjection_in_novacells.yaml
35+
#- path: patches/cainjection_in_nova.yaml
3636
#+kubebuilder:scaffold:crdkustomizecainjectionpatch
3737

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

config/default/kustomization.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namePrefix: nova-operator-
1212
#commonLabels:
1313
# someName: someValue
1414

15-
bases:
15+
resources:
1616
- ../crd
1717
- ../rbac
1818
- ../manager
@@ -24,27 +24,27 @@ bases:
2424
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
2525
#- ../prometheus
2626

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

3333
# Mount the controller config file for loading manager configurations
3434
# through a ComponentConfig type
35-
#- manager_config_patch.yaml
35+
#- path: manager_config_patch.yaml
3636

3737
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
3838
# crd/kustomization.yaml
39-
- manager_webhook_patch.yaml
39+
- path: manager_webhook_patch.yaml
4040

4141
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'.
4242
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks.
4343
# 'CERTMANAGER' needs to be enabled to use ca injection
44-
#- webhookcainjection_patch.yaml
44+
#- path: webhookcainjection_patch.yaml
4545

4646
# Injects our custom images (ENV variable settings)
47-
- manager_default_images.yaml
47+
- path: manager_default_images.yaml
4848

4949
# the following config is for teaching kustomize how to do var substitution
5050
vars:

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)