You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// InsightsDataGatherSpec contains the configuration for the data gathering.
35
+
// +kubebuilder:validation:MinProperties=1
34
36
typeInsightsDataGatherSpecstruct {
35
37
// gatherConfig is an optional spec attribute that includes all the configuration options related to gathering of the Insights data and its uploading to the ingress.
// gatherConfig provides data gathering configuration options.
@@ -47,18 +50,19 @@ type GatherConfig struct {
47
50
// When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated.
48
51
// 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.
49
52
// When omitted no obfuscation is applied.
53
+
// +kubebuilder:validation:MinItems=0
50
54
// +kubebuilder:validation:MaxItems=2
51
55
// +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))",message="dataPolicy items must be unique"
// storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive.
59
63
// If omitted, the gathering job will use ephemeral storage.
60
64
// +optional
61
-
Storage*Storage`json:"storage,omitempty"`
65
+
StorageStorage`json:"storage,omitempty,omitzero"`
62
66
}
63
67
64
68
// +kubebuilder:validation:XValidation:rule="has(self.mode) && self.mode == 'Custom' ? has(self.custom) : !has(self.custom)",message="custom is required when mode is Custom, and forbidden otherwise"
@@ -68,13 +72,13 @@ type Gatherers struct {
68
72
// When set to None, all gatherers will be disabled and no data will be gathered.
69
73
// When set to Custom, the custom configuration from the custom field will be applied.
70
74
// +required
71
-
ModeGatheringMode`json:"mode"`
75
+
ModeGatheringMode`json:"mode,omitempty"`
72
76
// custom provides gathering configuration.
73
77
// It is required when mode is Custom, and forbidden otherwise.
74
78
// Custom configuration allows user to disable only a subset of gatherers.
75
79
// Gatherers that are not explicitly disabled in custom configuration will run.
76
80
// +optional
77
-
Custom*Custom`json:"custom,omitempty"`
81
+
CustomCustom`json:"custom,omitempty,omitzero"`
78
82
}
79
83
80
84
// custom provides the custom configuration of gatherers
@@ -85,11 +89,12 @@ type Custom struct {
85
89
// The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md.
86
90
// Run the following command to get the names of last active gatherers:
87
91
// "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
// mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod.
154
159
// When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.
155
160
// The current default mount path is /var/lib/insights-operator
156
161
// The path may not exceed 1024 characters and must not contain a colon.
162
+
// +kubebuilder:validation:MinLength=1
157
163
// +kubebuilder:validation:MaxLength=1024
158
164
// +kubebuilder:validation:XValidation:rule="!self.contains(':')",message="mountPath must not contain a colon"
159
165
// +optional
@@ -165,9 +171,10 @@ type PersistentVolumeClaimReference struct {
165
171
// name is a string that follows the DNS1123 subdomain format.
166
172
// 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.
167
173
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
168
-
// +kubebuilder:validation:MaxLength:=253
174
+
// +kubebuilder:validation:MinLength=1
175
+
// +kubebuilder:validation:MaxLength=253
169
176
// +required
170
-
Namestring`json:"name"`
177
+
Namestring`json:"name,omitempty"`
171
178
}
172
179
173
180
// gathererConfig allows to configure specific gatherers
@@ -180,15 +187,16 @@ type GathererConfig struct {
180
187
// The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md.
181
188
// Run the following command to get the names of last active gatherers:
182
189
// "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
190
+
// +kubebuilder:validation:MinLength=1
183
191
// +kubebuilder:validation:MaxLength=256
184
192
// +kubebuilder:validation:XValidation:rule=`self.matches("^[a-z]+[_a-z]*[a-z]([/a-z][_a-z]*)?[a-z]$")`,message=`gatherer name must be in the format of {gatherer}/{function} where the gatherer and function are lowercase letters only that may include underscores (_) and are separated by a forward slash (/) if the function is provided`
185
193
// +required
186
-
Namestring`json:"name"`
194
+
Namestring`json:"name,omitempty"`
187
195
// state is a required field that allows you to configure specific gatherer. Valid values are "Enabled" and "Disabled".
188
196
// When set to Enabled the gatherer will run.
189
197
// When set to Disabled the gatherer will not run.
190
198
// +required
191
-
StateGathererState`json:"state"`
199
+
StateGathererState`json:"state,omitempty"`
192
200
}
193
201
194
202
// state declares valid gatherer state types.
@@ -212,10 +220,11 @@ type InsightsDataGatherList struct {
212
220
// metadata is the required standard list's metadata.
213
221
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
214
222
// +required
215
-
metav1.ListMeta`json:"metadata"`
223
+
metav1.ListMeta`json:"metadata,omitempty"`
216
224
// items is the required list of InsightsDataGather objects
Copy file name to clipboardExpand all lines: config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_insightsdatagathers-CustomNoUpgrade.crd.yaml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ spec:
44
44
type: object
45
45
spec:
46
46
description: spec holds user settable values for configuration
47
+
minProperties: 1
47
48
properties:
48
49
gatherConfig:
49
50
description: gatherConfig is an optional spec attribute that includes
@@ -193,7 +194,7 @@ spec:
193
194
The current default mount path is /var/lib/insights-operator
194
195
The path may not exceed 1024 characters and must not contain a colon.
195
196
maxLength: 1024
196
-
minLength: 0
197
+
minLength: 1
197
198
type: string
198
199
x-kubernetes-validations:
199
200
- message: mountPath must not contain a colon
@@ -226,6 +227,7 @@ spec:
226
227
status:
227
228
description: status holds observed values from the cluster. They may not
Copy file name to clipboardExpand all lines: config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_insightsdatagathers-DevPreviewNoUpgrade.crd.yaml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ spec:
44
44
type: object
45
45
spec:
46
46
description: spec holds user settable values for configuration
47
+
minProperties: 1
47
48
properties:
48
49
gatherConfig:
49
50
description: gatherConfig is an optional spec attribute that includes
@@ -193,7 +194,7 @@ spec:
193
194
The current default mount path is /var/lib/insights-operator
194
195
The path may not exceed 1024 characters and must not contain a colon.
195
196
maxLength: 1024
196
-
minLength: 0
197
+
minLength: 1
197
198
type: string
198
199
x-kubernetes-validations:
199
200
- message: mountPath must not contain a colon
@@ -226,6 +227,7 @@ spec:
226
227
status:
227
228
description: status holds observed values from the cluster. They may not
Copy file name to clipboardExpand all lines: config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_insightsdatagathers-TechPreviewNoUpgrade.crd.yaml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ spec:
44
44
type: object
45
45
spec:
46
46
description: spec holds user settable values for configuration
47
+
minProperties: 1
47
48
properties:
48
49
gatherConfig:
49
50
description: gatherConfig is an optional spec attribute that includes
@@ -193,7 +194,7 @@ spec:
193
194
The current default mount path is /var/lib/insights-operator
194
195
The path may not exceed 1024 characters and must not contain a colon.
195
196
maxLength: 1024
196
-
minLength: 0
197
+
minLength: 1
197
198
type: string
198
199
x-kubernetes-validations:
199
200
- message: mountPath must not contain a colon
@@ -226,6 +227,7 @@ spec:
226
227
status:
227
228
description: status holds observed values from the cluster. They may not
Copy file name to clipboardExpand all lines: config/v1/zz_generated.featuregated-crd-manifests/insightsdatagathers.config.openshift.io/InsightsConfig.yaml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ spec:
44
44
type: object
45
45
spec:
46
46
description: spec holds user settable values for configuration
47
+
minProperties: 1
47
48
properties:
48
49
gatherConfig:
49
50
description: gatherConfig is an optional spec attribute that includes
@@ -193,7 +194,7 @@ spec:
193
194
The current default mount path is /var/lib/insights-operator
194
195
The path may not exceed 1024 characters and must not contain a colon.
195
196
maxLength: 1024
196
-
minLength: 0
197
+
minLength: 1
197
198
type: string
198
199
x-kubernetes-validations:
199
200
- message: mountPath must not contain a colon
@@ -226,6 +227,7 @@ spec:
226
227
status:
227
228
description: status holds observed values from the cluster. They may not
0 commit comments