Skip to content

Commit 610b8c6

Browse files
committed
feat: update hack/update-payload-crds.sh
Signed-off-by: Ondrej Pokorny <[email protected]>
1 parent 0db3b8c commit 610b8c6

7 files changed

+1859
-55
lines changed

hack/update-payload-crds.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

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

5+
shopt -s extglob
6+
57
crd_globs="\
68
authorization/v1/zz_generated.crd-manifests/*_config-operator_*.crd*yaml\
7-
config/v1/zz_generated.crd-manifests/*_config-operator_*.crd*yaml\
9+
config/v1/zz_generated.crd-manifests/*_config-operator_!(01_insightsdatagathers*).crd*yaml\
810
machine/v1/zz_generated.crd-manifests/*.crd*yaml\
911
operator/v1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml\
1012
operator/v1alpha1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml\
@@ -26,6 +28,8 @@ crd_globs="\
2628
config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitoring*.crd.yaml
2729
operator/v1/zz_generated.crd-manifests/*_storage_01_storages*.crd.yaml
2830
operator/v1/zz_generated.crd-manifests/*_csi-driver_01_clustercsidrivers*.crd.yaml
31+
insights/v1alpha2/zz_generated.crd-manifests/0000_10_insights_01_datagathers*.crd.yaml
32+
config/v1alpha2/zz_generated.crd-manifests/0000_10_config-operator_01_insightsdatagathers*.crd.yaml
2933
"
3034

3135
# To allow the crd_globs to be sourced in the verify script,

payload-manifests/crds/0000_10_config-operator_01_insightsdatagathers-CustomNoUpgrade.crd.yaml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
api-approved.openshift.io: https://github.com/openshift/api/pull/2448
5+
api-approved.openshift.io: https://github.com/openshift/api/pull/2195
66
api.openshift.io/merged-by-featuregates: "true"
77
include.release.openshift.io/ibm-cloud-managed: "true"
88
include.release.openshift.io/self-managed-high-availability: "true"
@@ -17,13 +17,13 @@ spec:
1717
singular: insightsdatagather
1818
scope: Cluster
1919
versions:
20-
- name: v1
20+
- name: v1alpha2
2121
schema:
2222
openAPIV3Schema:
2323
description: |-
24-
InsightsDataGather provides data gather configuration options for the Insights Operator.
24+
InsightsDataGather provides data gather configuration options for the the Insights Operator.
2525
26-
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
26+
Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.
2727
properties:
2828
apiVersion:
2929
description: |-
@@ -46,7 +46,7 @@ spec:
4646
description: spec holds user settable values for configuration
4747
properties:
4848
gatherConfig:
49-
description: gatherConfig is a required spec attribute that includes
49+
description: gatherConfig is an optional spec attribute that includes
5050
all the configuration options related to gathering of the Insights
5151
data and its uploading to the ingress.
5252
properties:
@@ -59,13 +59,12 @@ spec:
5959
When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead.
6060
When omitted no obfuscation is applied.
6161
items:
62-
description: DataPolicyOption declares valid data policy options
62+
description: dataPolicyOption declares valid data policy options
6363
enum:
6464
- ObfuscateNetworking
6565
- WorkloadNames
6666
type: string
6767
maxItems: 2
68-
minItems: 1
6968
type: array
7069
x-kubernetes-list-type: atomic
7170
x-kubernetes-validations:
@@ -91,12 +90,12 @@ spec:
9190
Run the following command to get the names of last active gatherers:
9291
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
9392
items:
94-
description: GathererConfig allows to configure specific
93+
description: gathererConfig allows to configure specific
9594
gatherers
9695
properties:
9796
name:
9897
description: |-
99-
name is the required name of a specific gatherer.
98+
name is the required name of a specific gatherer
10099
It may not exceed 256 characters.
101100
The format for a gatherer name is: {gatherer}/{function} where the function is optional.
102101
Gatherer consists of a lowercase letters only that may include underscores (_).
@@ -105,7 +104,6 @@ spec:
105104
Run the following command to get the names of last active gatherers:
106105
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
107106
maxLength: 256
108-
minLength: 1
109107
type: string
110108
x-kubernetes-validations:
111109
- message: gatherer name must be in the format of
@@ -128,7 +126,6 @@ spec:
128126
- state
129127
type: object
130128
maxItems: 100
131-
minItems: 1
132129
type: array
133130
x-kubernetes-list-map-keys:
134131
- name
@@ -139,7 +136,7 @@ spec:
139136
mode:
140137
description: |-
141138
mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom.
142-
When set to All, all gatherers will run and gather data.
139+
When set to All, all gatherers wil run and gather data.
143140
When set to None, all gatherers will be disabled and no data will be gathered.
144141
When set to Custom, the custom configuration from the custom field will be applied.
145142
enum:
@@ -172,11 +169,9 @@ spec:
172169
properties:
173170
name:
174171
description: |-
175-
name is the name of the PersistentVolumeClaim that will be used to store the Insights data archive.
176-
It is a string that follows the DNS1123 subdomain format.
172+
name is a string that follows the DNS1123 subdomain format.
177173
It must be at most 253 characters in length, and must consist only of lower case alphanumeric characters, '-' and '.', and must start and end with an alphanumeric character.
178174
maxLength: 253
179-
minLength: 1
180175
type: string
181176
x-kubernetes-validations:
182177
- message: a lowercase RFC 1123 subdomain must consist
@@ -194,7 +189,6 @@ spec:
194189
The current default mount path is /var/lib/insights-operator
195190
The path may not exceed 1024 characters and must not contain a colon.
196191
maxLength: 1024
197-
minLength: 1
198192
type: string
199193
x-kubernetes-validations:
200194
- message: mountPath must not contain a colon
@@ -223,11 +217,15 @@ spec:
223217
required:
224218
- gatherers
225219
type: object
226-
required:
227-
- gatherConfig
220+
type: object
221+
status:
222+
description: status holds observed values from the cluster. They may not
223+
be overridden.
228224
type: object
229225
required:
230226
- spec
231227
type: object
232228
served: true
233229
storage: true
230+
subresources:
231+
status: {}

payload-manifests/crds/0000_10_config-operator_01_insightsdatagathers-DevPreviewNoUpgrade.crd.yaml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
api-approved.openshift.io: https://github.com/openshift/api/pull/2448
5+
api-approved.openshift.io: https://github.com/openshift/api/pull/2195
66
api.openshift.io/merged-by-featuregates: "true"
77
include.release.openshift.io/ibm-cloud-managed: "true"
88
include.release.openshift.io/self-managed-high-availability: "true"
@@ -17,13 +17,13 @@ spec:
1717
singular: insightsdatagather
1818
scope: Cluster
1919
versions:
20-
- name: v1
20+
- name: v1alpha2
2121
schema:
2222
openAPIV3Schema:
2323
description: |-
24-
InsightsDataGather provides data gather configuration options for the Insights Operator.
24+
InsightsDataGather provides data gather configuration options for the the Insights Operator.
2525
26-
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
26+
Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.
2727
properties:
2828
apiVersion:
2929
description: |-
@@ -46,7 +46,7 @@ spec:
4646
description: spec holds user settable values for configuration
4747
properties:
4848
gatherConfig:
49-
description: gatherConfig is a required spec attribute that includes
49+
description: gatherConfig is an optional spec attribute that includes
5050
all the configuration options related to gathering of the Insights
5151
data and its uploading to the ingress.
5252
properties:
@@ -59,13 +59,12 @@ spec:
5959
When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead.
6060
When omitted no obfuscation is applied.
6161
items:
62-
description: DataPolicyOption declares valid data policy options
62+
description: dataPolicyOption declares valid data policy options
6363
enum:
6464
- ObfuscateNetworking
6565
- WorkloadNames
6666
type: string
6767
maxItems: 2
68-
minItems: 1
6968
type: array
7069
x-kubernetes-list-type: atomic
7170
x-kubernetes-validations:
@@ -91,12 +90,12 @@ spec:
9190
Run the following command to get the names of last active gatherers:
9291
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
9392
items:
94-
description: GathererConfig allows to configure specific
93+
description: gathererConfig allows to configure specific
9594
gatherers
9695
properties:
9796
name:
9897
description: |-
99-
name is the required name of a specific gatherer.
98+
name is the required name of a specific gatherer
10099
It may not exceed 256 characters.
101100
The format for a gatherer name is: {gatherer}/{function} where the function is optional.
102101
Gatherer consists of a lowercase letters only that may include underscores (_).
@@ -105,7 +104,6 @@ spec:
105104
Run the following command to get the names of last active gatherers:
106105
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
107106
maxLength: 256
108-
minLength: 1
109107
type: string
110108
x-kubernetes-validations:
111109
- message: gatherer name must be in the format of
@@ -128,7 +126,6 @@ spec:
128126
- state
129127
type: object
130128
maxItems: 100
131-
minItems: 1
132129
type: array
133130
x-kubernetes-list-map-keys:
134131
- name
@@ -139,7 +136,7 @@ spec:
139136
mode:
140137
description: |-
141138
mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom.
142-
When set to All, all gatherers will run and gather data.
139+
When set to All, all gatherers wil run and gather data.
143140
When set to None, all gatherers will be disabled and no data will be gathered.
144141
When set to Custom, the custom configuration from the custom field will be applied.
145142
enum:
@@ -172,11 +169,9 @@ spec:
172169
properties:
173170
name:
174171
description: |-
175-
name is the name of the PersistentVolumeClaim that will be used to store the Insights data archive.
176-
It is a string that follows the DNS1123 subdomain format.
172+
name is a string that follows the DNS1123 subdomain format.
177173
It must be at most 253 characters in length, and must consist only of lower case alphanumeric characters, '-' and '.', and must start and end with an alphanumeric character.
178174
maxLength: 253
179-
minLength: 1
180175
type: string
181176
x-kubernetes-validations:
182177
- message: a lowercase RFC 1123 subdomain must consist
@@ -194,7 +189,6 @@ spec:
194189
The current default mount path is /var/lib/insights-operator
195190
The path may not exceed 1024 characters and must not contain a colon.
196191
maxLength: 1024
197-
minLength: 1
198192
type: string
199193
x-kubernetes-validations:
200194
- message: mountPath must not contain a colon
@@ -223,11 +217,15 @@ spec:
223217
required:
224218
- gatherers
225219
type: object
226-
required:
227-
- gatherConfig
220+
type: object
221+
status:
222+
description: status holds observed values from the cluster. They may not
223+
be overridden.
228224
type: object
229225
required:
230226
- spec
231227
type: object
232228
served: true
233229
storage: true
230+
subresources:
231+
status: {}

0 commit comments

Comments
 (0)