Skip to content

Commit d24f5ee

Browse files
committed
important: add generator directives
1 parent 11f491c commit d24f5ee

File tree

13 files changed

+163
-33
lines changed

13 files changed

+163
-33
lines changed

cloudnetwork/.codegen.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
manifestMerge:
2+
tupleOverrides:
3+
- crdName: cloudprivateipconfigs.cloud.network.openshift.io
4+
ungated: true

config/.codegen.yaml

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,55 @@
1+
emptyPartialSchema:
12
schemapatch:
2-
requiredFeatureSets:
3-
- ""
4-
- "Default"
5-
- "TechPreviewNoUpgrade"
6-
- "CustomNoUpgrade"
73
swaggerdocs:
84
commentPolicy: Warn
5+
manifestMerge:
6+
tupleOverrides:
7+
- crdName: clusteroperators.config.openshift.io
8+
ungated: true
9+
clusterProfilesToInject:
10+
- include.release.openshift.io/self-managed-high-availability
11+
- include.release.openshift.io/single-node-developer
12+
- crdName: clusterversions.config.openshift.io
13+
featureSet: CustomNoUpgrade
14+
clusterProfilesToInject:
15+
- include.release.openshift.io/self-managed-high-availability
16+
- include.release.openshift.io/single-node-developer
17+
- crdName: clusterversions.config.openshift.io
18+
featureSet: Default
19+
clusterProfilesToInject:
20+
- include.release.openshift.io/self-managed-high-availability
21+
- include.release.openshift.io/single-node-developer
22+
- crdName: clusterversions.config.openshift.io
23+
featureSet: TechPreviewNoUpgrade
24+
clusterProfilesToInject:
25+
- include.release.openshift.io/self-managed-high-availability
26+
- include.release.openshift.io/single-node-developer
27+
- crdName: proxies.config.openshift.io
28+
ungated: true
29+
- crdName: operatorhubs.config.openshift.io
30+
ungated: true
31+
- crdName: consoles.config.openshift.io
32+
ungated: true
33+
- crdName: featuregates.config.openshift.io
34+
ungated: true
35+
- crdName: images.config.openshift.io
36+
ungated: true
37+
- crdName: imagecontentpolicies.config.openshift.io
38+
ungated: true
39+
- crdName: imagedigestmirrorsets.config.openshift.io
40+
ungated: true
41+
- crdName: imagetagmirrorsets.config.openshift.io
42+
ungated: true
43+
- crdName: ingresses.config.openshift.io
44+
ungated: true
45+
- crdName: nodes.config.openshift.io
46+
ungated: true
47+
- crdName: oauths.config.openshift.io
48+
ungated: true
49+
- crdName: projects.config.openshift.io
50+
ungated: true
51+
- crdName: builds.config.openshift.io
52+
ungated: true
53+
54+
55+

example/.codegen.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
emptyPartialSchema:
12
compatibility:
23
disabled: false
34
deepcopy:
@@ -9,13 +10,8 @@ schemacheck:
910
enabledValidators: []
1011
disabledValidators: []
1112
schemapatch:
12-
disabled: false
13-
requiredFeatureSets:
14-
- ""
15-
- "Default"
16-
- "TechPreviewNoUpgrade"
17-
- "CustomNoUpgrade"
1813
swaggerdocs:
1914
disabled: false
2015
commentPolicy: Warn
2116
outputFileName: zz_generated.swagger_doc_generated.go
17+
manifestMerge:

hack/update-codegen-crds.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
source "$(dirname "${BASH_SOURCE}")/lib/init.sh"
44

5+
GENERATOR=empty-partial-schemas ${SCRIPT_ROOT}/hack/update-codegen.sh
56
GENERATOR=schemapatch ${SCRIPT_ROOT}/hack/update-codegen.sh
7+
GENERATOR=crd-manifest-merge ${SCRIPT_ROOT}/hack/update-codegen.sh

hack/verify-codegen-crds.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
source "$(dirname "${BASH_SOURCE}")/lib/init.sh"
44

5+
GENERATOR=empty-partial-schemas EXTRA_ARGS=--verify ${SCRIPT_ROOT}/hack/update-codegen.sh
56
GENERATOR=schemapatch EXTRA_ARGS=--verify ${SCRIPT_ROOT}/hack/update-codegen.sh
7+
GENERATOR=crd-manifest-merge EXTRA_ARGS=--verify ${SCRIPT_ROOT}/hack/update-codegen.sh

hack/verify-crds.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ for f in $(find . -name "*.yaml" -type f); do
2424
fi
2525
fi
2626

27+
# skip the files that are merged to produce the final outcome
28+
if [[ "$f" == *"zz_generated.featuregated-crd-manifests"* ]]; then
29+
continue
30+
fi
31+
if [[ "$f" == *"manual-override-crd-manifests"* ]]; then
32+
continue
33+
fi
34+
if [[ "$f" == *"testdata"* ]]; then
35+
continue
36+
fi
37+
2738
if [[ $(./_output/tools/bin/yq r $f metadata.annotations[api-approved.openshift.io]) == "null" ]]; then
2839
echo "Error: missing 'api-approved.openshift.io' annotation pointing to openshift/api pull request in $f"
2940
FAILS=true

insights/.codegen.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
schemapatch:
2-
requiredFeatureSets:
3-
- ""
4-
- "Default"
5-
- "TechPreviewNoUpgrade"

machine/.codegen.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,18 @@ schemapatch:
66
- "CustomNoUpgrade"
77
swaggerdocs:
88
commentPolicy: Warn
9+
manifestMerge:
10+
tupleOverrides:
11+
- crdName: controlplanemachinesets.machine.openshift.io
12+
clusterProfilesToInject:
13+
- include.release.openshift.io/self-managed-high-availability
14+
featureSet: CustomNoUpgrade
15+
- crdName: controlplanemachinesets.machine.openshift.io
16+
clusterProfilesToInject:
17+
- include.release.openshift.io/self-managed-high-availability
18+
featureSet: TechPreviewNoUpgrade
19+
- crdName: controlplanemachinesets.machine.openshift.io
20+
clusterProfilesToInject:
21+
- include.release.openshift.io/self-managed-high-availability
22+
featureSet: Default
23+

network/.codegen.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
11
schemapatch:
2-
requiredFeatureSets:
3-
- ""
4-
- "Default"
5-
- "TechPreviewNoUpgrade"
6-
- "CustomNoUpgrade"

operator/.codegen.yaml

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,62 @@
11
schemapatch:
2-
requiredFeatureSets:
3-
- ""
4-
- "Default"
5-
- "TechPreviewNoUpgrade"
6-
- "CustomNoUpgrade"
72
swaggerdocs:
83
commentPolicy: Warn
4+
manifestMerge:
5+
tupleOverrides:
6+
- crdName: authentications.operator.openshift.io
7+
clusterProfilesToInject:
8+
- include.release.openshift.io/self-managed-high-availability
9+
- include.release.openshift.io/single-node-developer
10+
ungated: true
11+
- crdName: consoles.operator.openshift.io
12+
ungated: true
13+
- crdName: configs.operator.openshift.io
14+
ungated: true
15+
- crdName: kubeapiservers.operator.openshift.io
16+
ungated: true
17+
- crdName: kubecontrollermanagers.operator.openshift.io
18+
ungated: true
19+
- crdName: kubeschedulers.operator.openshift.io
20+
ungated: true
21+
- crdName: openshiftapiservers.operator.openshift.io
22+
ungated: true
23+
- crdName: cloudcredentials.operator.openshift.io
24+
ungated: true
25+
- crdName: kubestorageversionmigrators.operator.openshift.io
26+
ungated: true
27+
- crdName: openshiftcontrollermanagers.operator.openshift.io
28+
ungated: true
29+
- crdName: storages.operator.openshift.io
30+
ungated: true
31+
- crdName: ingresscontrollers.operator.openshift.io
32+
ungated: true
33+
- crdName: insightsoperators.operator.openshift.io
34+
ungated: true
35+
- crdName: servicecas.operator.openshift.io
36+
ungated: true
37+
- crdName: dnses.operator.openshift.io
38+
ungated: true
39+
- crdName: csisnapshotcontrollers.operator.openshift.io
40+
ungated: true
41+
- crdName: machineconfigurations.operator.openshift.io
42+
ungated: true
43+
- crdName: clustercsidrivers.operator.openshift.io
44+
ungated: true
45+
- crdName: networks.operator.openshift.io
46+
featureSet: Default
47+
clusterProfilesToInject:
48+
- include.release.openshift.io/self-managed-high-availability
49+
- include.release.openshift.io/single-node-developer
50+
- crdName: networks.operator.openshift.io
51+
featureSet: CustomNoUpgrade
52+
clusterProfilesToInject:
53+
- include.release.openshift.io/self-managed-high-availability
54+
- include.release.openshift.io/single-node-developer
55+
- crdName: networks.operator.openshift.io
56+
featureSet: TechPreviewNoUpgrade
57+
clusterProfilesToInject:
58+
- include.release.openshift.io/self-managed-high-availability
59+
- include.release.openshift.io/single-node-developer
60+
61+
62+

0 commit comments

Comments
 (0)