Skip to content

Commit 44f630b

Browse files
committed
chore: upgrade existing kustomizations to v5
After upgrading the version of kustomize we use we need to upgrade our kustomization.yaml files to v5 format. Signed-off-by: Richard Case <[email protected]>
1 parent b812b70 commit 44f630b

File tree

30 files changed

+256
-210
lines changed

30 files changed

+256
-210
lines changed

hack/gen-test-flavors.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ mkdir -p "${generated_dir}"
3434

3535
# Ignore non kustomized
3636
find "${src_dir}"* -maxdepth 1 -type d \
37-
-print0 | xargs -0 -I {} basename {} | grep -vx -E '(patches|addons|cni|csi|ccm|base)' | xargs -t -I {} ${kustomize} build --load-restrictor LoadRestrictionsNone --reorder none ${src_dir}{} -o ${generated_dir}/cluster-template-{}.yaml
38-
37+
-print0 | xargs -0 -I {} basename {} | grep -vx -E '(patches|addons|cni|csi|ccm|base)' | xargs -t -I {} ${kustomize} build --load-restrictor LoadRestrictionsNone ${src_dir}{} -o ${generated_dir}/cluster-template-{}.yaml
3938

4039
## move the default template to the default file expected by clusterctl in case of withoutclusterclass
41-
if [ "${sub_dir_path}" == "withoutclusterclass" ]
42-
then
40+
if [ "${sub_dir_path}" == "withoutclusterclass" ]; then
4341
mv "${generated_dir}/cluster-template-default.yaml" "${generated_dir}/cluster-template.yaml"
4442
fi
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
resources:
2-
- ../topology/cluster-template.yaml
2+
- ../topology/cluster-template.yaml
33
patches:
4-
- path: ./byo-infra-variables.yaml
5-
target:
6-
group: cluster.x-k8s.io
7-
version: v1beta1
8-
kind: Cluster
9-
- path: ./limited-az-variable.yaml
10-
target:
11-
group: cluster.x-k8s.io
12-
version: v1beta1
13-
kind: Cluster
4+
- path: ./byo-infra-variables.yaml
5+
target:
6+
group: cluster.x-k8s.io
7+
kind: Cluster
8+
version: v1beta1
9+
- path: ./limited-az-variable.yaml
10+
target:
11+
group: cluster.x-k8s.io
12+
kind: Cluster
13+
version: v1beta1
1414
configMapGenerator:
15-
- name: cloud-controller-manager-addon
16-
files:
17-
- ../../..//withoutclusterclass/kustomize_sources/addons/ccm/data/aws-ccm-external.yaml
18-
- name: aws-ebs-csi-driver-addon
19-
files:
20-
- ../../../withoutclusterclass/kustomize_sources/addons/csi/data/aws-ebs-csi-external.yaml
15+
- files:
16+
- ../../..//withoutclusterclass/kustomize_sources/addons/ccm/data/aws-ccm-external.yaml
17+
name: cloud-controller-manager-addon
18+
- files:
19+
- ../../../withoutclusterclass/kustomize_sources/addons/csi/data/aws-ebs-csi-external.yaml
20+
name: aws-ebs-csi-driver-addon
2121
generatorOptions:
22+
annotations:
23+
note: generated
2224
disableNameSuffixHash: true
2325
labels:
2426
type: generated
25-
annotations:
26-
note: generated
27-
28-
27+
apiVersion: kustomize.config.k8s.io/v1beta1
28+
kind: Kustomization
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
resources:
2-
- cluster-template.yaml
3-
- role.yaml
2+
- cluster-template.yaml
3+
- role.yaml
44
configMapGenerator:
5-
- name: cloud-controller-manager-addon
6-
files:
7-
- ../../../withoutclusterclass/kustomize_sources/addons/ccm/data/aws-ccm-external.yaml
8-
- name: aws-ebs-csi-driver-addon
9-
files:
10-
- ../../../withoutclusterclass/kustomize_sources/addons/csi/data/aws-ebs-csi-external.yaml
5+
- files:
6+
- ../../../withoutclusterclass/kustomize_sources/addons/ccm/data/aws-ccm-external.yaml
7+
name: cloud-controller-manager-addon
8+
- files:
9+
- ../../../withoutclusterclass/kustomize_sources/addons/csi/data/aws-ebs-csi-external.yaml
10+
name: aws-ebs-csi-driver-addon
1111
generatorOptions:
12+
annotations:
13+
note: generated
1214
disableNameSuffixHash: true
1315
labels:
1416
type: generated
15-
annotations:
16-
note: generated
17+
apiVersion: kustomize.config.k8s.io/v1beta1
18+
kind: Kustomization
Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
resources:
2-
- ../topology/cluster-template.yaml
2+
- ../topology/cluster-template.yaml
33
patches:
4-
- path: ./self-hosted-variable.yaml
5-
target:
6-
group: cluster.x-k8s.io
7-
version: v1beta1
8-
kind: Cluster
9-
- path: ./limited-az-variable.yaml
10-
target:
11-
group: cluster.x-k8s.io
12-
version: v1beta1
13-
kind: Cluster
4+
- path: ./self-hosted-variable.yaml
5+
target:
6+
group: cluster.x-k8s.io
7+
kind: Cluster
8+
version: v1beta1
9+
- path: ./limited-az-variable.yaml
10+
target:
11+
group: cluster.x-k8s.io
12+
kind: Cluster
13+
version: v1beta1
1414
configMapGenerator:
15-
- name: cloud-controller-manager-addon
16-
files:
17-
- ../../..//withoutclusterclass/kustomize_sources/addons/ccm/data/aws-ccm-external.yaml
18-
- name: aws-ebs-csi-driver-addon
19-
files:
20-
- ../../../withoutclusterclass/kustomize_sources/addons/csi/data/aws-ebs-csi-external.yaml
15+
- files:
16+
- ../../..//withoutclusterclass/kustomize_sources/addons/ccm/data/aws-ccm-external.yaml
17+
name: cloud-controller-manager-addon
18+
- files:
19+
- ../../../withoutclusterclass/kustomize_sources/addons/csi/data/aws-ebs-csi-external.yaml
20+
name: aws-ebs-csi-driver-addon
2121
generatorOptions:
22+
annotations:
23+
note: generated
2224
disableNameSuffixHash: true
2325
labels:
2426
type: generated
25-
annotations:
26-
note: generated
27+
apiVersion: kustomize.config.k8s.io/v1beta1
28+
kind: Kustomization
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
resources:
2-
- cluster-template.yaml
2+
- cluster-template.yaml
33
configMapGenerator:
4-
- name: cloud-controller-manager-addon
5-
files:
6-
- ../../..//withoutclusterclass/kustomize_sources/addons/ccm/data/aws-ccm-external.yaml
7-
- name: aws-ebs-csi-driver-addon
8-
files:
9-
- ../../../withoutclusterclass/kustomize_sources/addons/csi/data/aws-ebs-csi-external.yaml
4+
- files:
5+
- ../../..//withoutclusterclass/kustomize_sources/addons/ccm/data/aws-ccm-external.yaml
6+
name: cloud-controller-manager-addon
7+
- files:
8+
- ../../../withoutclusterclass/kustomize_sources/addons/csi/data/aws-ebs-csi-external.yaml
9+
name: aws-ebs-csi-driver-addon
1010
generatorOptions:
11+
annotations:
12+
note: generated
1113
disableNameSuffixHash: true
1214
labels:
1315
type: generated
14-
annotations:
15-
note: generated
16-
16+
apiVersion: kustomize.config.k8s.io/v1beta1
17+
kind: Kustomization
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- cluster-template.yaml
4+
- cluster-template.yaml
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
resources:
2-
- ../intree-cloud-provider
3-
patchesStrategicMerge:
4-
- patches/csimigration-off.yaml
2+
- ../intree-cloud-provider
3+
apiVersion: kustomize.config.k8s.io/v1beta1
4+
kind: Kustomization
5+
patches:
6+
- path: patches/csimigration-off.yaml
Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
# default template enables external ccm and csi
22
resources:
3-
- ../base
4-
- machine-deployment.yaml
5-
- ../addons/cni/resources/cni-resource-set.yaml
6-
- ../addons/ccm/resources/ccm-resource-set.yaml
7-
- ../addons/csi/resources/csi-resource-set.yaml
8-
patchesStrategicMerge:
9-
- ../addons/cni/patches/cluster-cni.yaml
10-
- ../addons/ccm/patches/external-cloud-provider.yaml
11-
- ../addons/csi/patches/external-csi-provider.yaml
3+
- ../base
4+
- machine-deployment.yaml
5+
- ../addons/cni/resources/cni-resource-set.yaml
6+
- ../addons/ccm/resources/ccm-resource-set.yaml
7+
- ../addons/csi/resources/csi-resource-set.yaml
128
configMapGenerator:
13-
- name: cloud-controller-manager-addon
14-
files:
15-
- ../addons/ccm/data/aws-ccm-external.yaml
16-
- name: aws-ebs-csi-driver-addon
17-
files:
18-
- ../addons/csi/data/aws-ebs-csi-external.yaml
9+
- files:
10+
- ../addons/ccm/data/aws-ccm-external.yaml
11+
name: cloud-controller-manager-addon
12+
- files:
13+
- ../addons/csi/data/aws-ebs-csi-external.yaml
14+
name: aws-ebs-csi-driver-addon
1915
generatorOptions:
16+
annotations:
17+
note: generated
2018
disableNameSuffixHash: true
2119
labels:
2220
type: generated
23-
annotations:
24-
note: generated
25-
21+
apiVersion: kustomize.config.k8s.io/v1beta1
22+
kind: Kustomization
23+
patches:
24+
- path: ../addons/cni/patches/cluster-cni.yaml
25+
- path: ../addons/ccm/patches/external-cloud-provider.yaml
26+
- path: ../addons/csi/patches/external-csi-provider.yaml
Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
resources:
2-
- ../base
3-
- machine-deployment.yaml
4-
- ../addons/cni/resources/cni-resource-set.yaml
5-
- ../addons/ccm/resources/ccm-resource-set.yaml
6-
- csi-resource-set.yaml
7-
patchesStrategicMerge:
8-
- ../addons/cni/patches/cluster-cni.yaml
9-
- ../addons/ccm/patches/external-cloud-provider.yaml
10-
- patches/efs-support.yaml
11-
- patches/limit-az.yaml
2+
- ../base
3+
- machine-deployment.yaml
4+
- ../addons/cni/resources/cni-resource-set.yaml
5+
- ../addons/ccm/resources/ccm-resource-set.yaml
6+
- csi-resource-set.yaml
127
configMapGenerator:
13-
- name: cloud-controller-manager-addon
14-
files:
15-
- ../addons/ccm/data/aws-ccm-external.yaml
16-
- name: aws-efs-csi-driver-addon
17-
files:
18-
- aws-efs-csi-external.yaml
8+
- files:
9+
- ../addons/ccm/data/aws-ccm-external.yaml
10+
name: cloud-controller-manager-addon
11+
- files:
12+
- aws-efs-csi-external.yaml
13+
name: aws-efs-csi-driver-addon
1914
generatorOptions:
15+
annotations:
16+
note: generated
2017
disableNameSuffixHash: true
2118
labels:
2219
type: generated
23-
annotations:
24-
note: generated
25-
20+
apiVersion: kustomize.config.k8s.io/v1beta1
21+
kind: Kustomization
22+
patches:
23+
- path: ../addons/cni/patches/cluster-cni.yaml
24+
- path: ../addons/ccm/patches/external-cloud-provider.yaml
25+
- path: patches/efs-support.yaml
26+
- path: patches/limit-az.yaml
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# internal ccm and external csi installed
22
resources:
3-
- ../intree-cloud-provider
4-
- ../addons/csi/resources/csi-resource-set.yaml
5-
patchesStrategicMerge:
6-
- ../addons/csi/patches/external-csi-provider.yaml
3+
- ../intree-cloud-provider
4+
- ../addons/csi/resources/csi-resource-set.yaml
75
configMapGenerator:
8-
- name: aws-ebs-csi-driver-addon
9-
files:
10-
- ../addons/csi/data/aws-ebs-csi-external.yaml
6+
- files:
7+
- ../addons/csi/data/aws-ebs-csi-external.yaml
8+
name: aws-ebs-csi-driver-addon
119
generatorOptions:
10+
annotations:
11+
note: generated
1212
disableNameSuffixHash: true
1313
labels:
1414
type: generated
15-
annotations:
16-
note: generated
15+
apiVersion: kustomize.config.k8s.io/v1beta1
16+
kind: Kustomization
17+
patches:
18+
- path: ../addons/csi/patches/external-csi-provider.yaml

0 commit comments

Comments
 (0)