Skip to content

Commit 0247e40

Browse files
authored
Merge pull request #609 from mtchoum1/main
RHOAIENG-11681: Running 'kustomize edit fix --vars' on each component to upgrade to kustomize v5
2 parents cd19f45 + f84d519 commit 0247e40

File tree

18 files changed

+159
-185
lines changed

18 files changed

+159
-185
lines changed

components/base/kustomization.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
---
21
apiVersion: kustomize.config.k8s.io/v1beta1
32
kind: Kustomization
4-
bases:
5-
- ../notebook-controller/config/overlays/openshift
6-
- ../odh-notebook-controller/config/base
3+
resources:
4+
- ../notebook-controller/config/overlays/openshift
5+
- ../odh-notebook-controller/config/base

components/notebook-controller/config/crd/kustomization.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ resources:
55
- bases/kubeflow.org_notebooks.yaml
66
# +kubebuilder:scaffold:crdkustomizeresource
77

8-
patchesStrategicMerge:
9-
- patches/trivial_conversion_patch.yaml
108

119
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
1210
# patches here are for enabling the conversion webhook for each CRD
@@ -22,11 +20,13 @@ patchesStrategicMerge:
2220
configurations:
2321
- kustomizeconfig.yaml
2422

25-
patchesJson6902:
26-
- target:
27-
group: apiextensions.k8s.io
28-
version: v1
29-
kind: CustomResourceDefinition
30-
name: notebooks.kubeflow.org
31-
path: patches/validation_patches.yaml
32-
23+
apiVersion: kustomize.config.k8s.io/v1beta1
24+
kind: Kustomization
25+
patches:
26+
- path: patches/validation_patches.yaml
27+
target:
28+
group: apiextensions.k8s.io
29+
kind: CustomResourceDefinition
30+
name: notebooks.kubeflow.org
31+
version: v1
32+
- path: patches/trivial_conversion_patch.yaml

components/notebook-controller/config/default/kustomization.yaml

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,8 @@ namespace: notebook-controller-system
99
namePrefix: notebook-controller-
1010

1111
# Labels to add to all resources and selectors.
12-
commonLabels:
13-
app: notebook-controller
14-
kustomize.component: notebook-controller
1512

1613

17-
bases:
18-
- ../rbac
19-
- ../manager
20-
- ../crd
2114
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in crd/kustomization.yaml
2215
#- ../webhook
2316
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required.
@@ -45,31 +38,14 @@ bases:
4538
#- webhookcainjection_patch.yaml
4639

4740
# the following config is for teaching kustomize how to do var substitution
48-
vars:
49-
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
50-
# - name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
51-
# objref:
52-
# kind: Certificate
53-
# group: certmanager.k8s.io
54-
# version: v1alpha1
55-
# name: serving-cert # this name should match the one in certificate.yaml
56-
# fieldref:
57-
# fieldpath: metadata.namespace
58-
# - name: CERTIFICATE_NAME
59-
# objref:
60-
# kind: Certificate
61-
# group: certmanager.k8s.io
62-
# version: v1alpha1
63-
# name: serving-cert # this name should match the one in certificate.yaml
64-
# - name: SERVICE_NAMESPACE # namespace of the service
65-
# objref:
66-
# kind: Service
67-
# version: v1
68-
# name: webhook-service
69-
# fieldref:
70-
# fieldpath: metadata.namespace
71-
# - name: SERVICE_NAME
72-
# objref:
73-
# kind: Service
74-
# version: v1
75-
# name: webhook-service
41+
apiVersion: kustomize.config.k8s.io/v1beta1
42+
kind: Kustomization
43+
resources:
44+
- ../rbac
45+
- ../manager
46+
- ../crd
47+
labels:
48+
- includeSelectors: true
49+
pairs:
50+
app: notebook-controller
51+
kustomize.component: notebook-controller

components/notebook-controller/config/manager/kustomization.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ resources:
33
- service-account.yaml
44
- service.yaml
55
configMapGenerator:
6-
- name: config
7-
envs:
6+
- envs:
87
- params.env
8+
name: config
99
generatorOptions:
10-
disableNameSuffixHash: true
10+
disableNameSuffixHash: true
11+
apiVersion: kustomize.config.k8s.io/v1beta1
12+
kind: Kustomization

components/notebook-controller/config/overlays/kubeflow/kustomization.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ kind: Kustomization
33
resources:
44
- ../../base
55
namespace: kubeflow
6-
patchesStrategicMerge:
7-
- patches/remove-namespace.yaml
86
configMapGenerator:
9-
- name: config
10-
behavior: merge
7+
- behavior: merge
118
literals:
129
- USE_ISTIO=true
1310
- ISTIO_GATEWAY=kubeflow/kubeflow-gateway
11+
name: config
12+
patches:
13+
- path: patches/remove-namespace.yaml
Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
1-
---
21
apiVersion: kustomize.config.k8s.io/v1beta1
32
kind: Kustomization
43
resources:
5-
- ../../base
4+
- ../../base
65
namespace: opendatahub
7-
commonLabels:
8-
app.kubernetes.io/part-of: odh-notebook-controller
9-
component.opendatahub.io/name: kf-notebook-controller
10-
opendatahub.io/component: "true"
116
configurations:
12-
- params.yaml
7+
- params.yaml
138
configMapGenerator:
14-
- name: kf-notebook-controller-image-parameters
15-
env: params.env
16-
- name: config
17-
behavior: merge
18-
literals:
19-
- USE_ISTIO=false
20-
- ADD_FSGROUP=false
9+
- envs:
10+
- params.env
11+
name: kf-notebook-controller-image-parameters
12+
- behavior: merge
13+
literals:
14+
- USE_ISTIO=false
15+
- ADD_FSGROUP=false
16+
name: config
2117
generatorOptions:
2218
disableNameSuffixHash: true
23-
patchesStrategicMerge:
24-
- remove_namespace_patch.yaml
25-
- manager_openshift_patch.yaml
26-
- manager_service_openshift_patch.yaml
27-
vars:
28-
- name: odh-kf-notebook-controller-image
29-
objref:
19+
labels:
20+
- includeSelectors: true
21+
pairs:
22+
app.kubernetes.io/part-of: odh-notebook-controller
23+
component.opendatahub.io/name: kf-notebook-controller
24+
opendatahub.io/component: "true"
25+
patches:
26+
- path: remove_namespace_patch.yaml
27+
- path: manager_openshift_patch.yaml
28+
- path: manager_service_openshift_patch.yaml
29+
replacements:
30+
- source:
31+
fieldPath: data.odh-kf-notebook-controller-image
3032
kind: ConfigMap
3133
name: kf-notebook-controller-image-parameters
32-
apiVersion: v1
33-
fieldref:
34-
fieldpath: data.odh-kf-notebook-controller-image
34+
version: v1
35+
targets:
36+
- fieldPaths:
37+
- spec.template.spec.containers.0.image
38+
select:
39+
group: apps
40+
kind: Deployment
41+
name: deployment
42+
version: v1

components/notebook-controller/config/overlays/openshift/manager_openshift_patch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
name: notebook-controller-culler-config
3333
key: IDLENESS_CHECK_PERIOD
3434
optional: true
35-
image: $(odh-kf-notebook-controller-image)
35+
image: odh-kf-notebook-controller-image_PLACEHOLDER
3636
resources:
3737
limits:
3838
cpu: 500m
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
3-
bases:
4-
- ../openshift
53

64
configMapGenerator:
7-
- name: config
8-
behavior: merge
5+
- behavior: merge
96
envs:
107
- ossm.env
8+
name: config
9+
resources:
10+
- ../openshift
Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,46 @@
1-
---
21
apiVersion: kustomize.config.k8s.io/v1beta1
32
kind: Kustomization
43
resources:
5-
- ../openshift
6-
- gateway.yaml
7-
- gateway-route.yaml
8-
- cert-secret.yaml
9-
- smm.yaml
4+
- ../openshift
5+
- gateway.yaml
6+
- gateway-route.yaml
7+
- cert-secret.yaml
8+
- smm.yaml
109
namespace: odh-notebook-controller-system
1110

1211
configMapGenerator:
13-
- name: config
14-
behavior: merge
15-
literals:
16-
- USE_ISTIO=true
17-
- ISTIO_GATEWAY=odh-notebook-controller-system/odh-gateway
18-
19-
patchesJson6902:
20-
- patch: |-
21-
- op: replace
22-
path: /metadata/namespace
23-
value: istio-system
24-
target:
25-
group: route.openshift.io
26-
kind: Route
27-
version: v1
28-
namespace: odh-notebook-controller-system
29-
name: opendatahub-odh-gateway
30-
- patch: |-
31-
- op: replace
32-
path: /metadata/namespace
33-
value: istio-system
34-
target:
35-
kind: Secret
36-
version: v1
37-
namespace: odh-notebook-controller-system
38-
name: odh-dashboard-cert
39-
- patch: |-
40-
- op: replace
41-
path: /spec/controlPlaneRef/namespace
42-
value: istio-system
43-
target:
44-
group: maistra.io
45-
version: v1
46-
kind: ServiceMeshMember
47-
name: default
12+
- behavior: merge
13+
literals:
14+
- USE_ISTIO=true
15+
- ISTIO_GATEWAY=odh-notebook-controller-system/odh-gateway
16+
name: config
4817

18+
patches:
19+
- patch: |-
20+
- op: replace
21+
path: /metadata/namespace
22+
value: istio-system
23+
target:
24+
group: route.openshift.io
25+
kind: Route
26+
name: opendatahub-odh-gateway
27+
namespace: odh-notebook-controller-system
28+
version: v1
29+
- patch: |-
30+
- op: replace
31+
path: /metadata/namespace
32+
value: istio-system
33+
target:
34+
kind: Secret
35+
name: odh-dashboard-cert
36+
namespace: odh-notebook-controller-system
37+
version: v1
38+
- patch: |-
39+
- op: replace
40+
path: /spec/controlPlaneRef/namespace
41+
value: istio-system
42+
target:
43+
group: maistra.io
44+
kind: ServiceMeshMember
45+
name: default
46+
version: v1

components/notebook-controller/config/overlays/standalone/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resources:
44
- ../../base
55
namespace: notebook-controller-system
66
configMapGenerator:
7-
- name: config
8-
behavior: merge
7+
- behavior: merge
98
literals:
109
- USE_ISTIO=false
10+
name: config

0 commit comments

Comments
 (0)