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.
// When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated.
48
50
// 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
51
// When omitted no obfuscation is applied.
52
+
// +kubebuilder:validation:MinItems=0
50
53
// +kubebuilder:validation:MaxItems=2
51
54
// +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))",message="dataPolicy items must be unique"
// +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 +71,13 @@ type Gatherers struct {
68
71
// When set to None, all gatherers will be disabled and no data will be gathered.
69
72
// When set to Custom, the custom configuration from the custom field will be applied.
70
73
// +required
71
-
ModeGatheringMode`json:"mode"`
74
+
ModeGatheringMode`json:"mode,omitempty"`
72
75
// custom provides gathering configuration.
73
76
// It is required when mode is Custom, and forbidden otherwise.
74
77
// Custom configuration allows user to disable only a subset of gatherers.
75
78
// Gatherers that are not explicitly disabled in custom configuration will run.
76
79
// +optional
77
-
Custom*Custom`json:"custom,omitempty"`
80
+
Custom*Custom`json:"custom,omitempty,omitzero"`
78
81
}
79
82
80
83
// custom provides the custom configuration of gatherers
@@ -85,11 +88,12 @@ type Custom struct {
85
88
// The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md.
86
89
// Run the following command to get the names of last active gatherers:
87
90
// "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
158
// When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.
155
159
// The current default mount path is /var/lib/insights-operator
156
160
// The path may not exceed 1024 characters and must not contain a colon.
161
+
// +kubebuilder:validation:MinLength=0
157
162
// +kubebuilder:validation:MaxLength=1024
158
163
// +kubebuilder:validation:XValidation:rule="!self.contains(':')",message="mountPath must not contain a colon"
159
164
// +optional
160
-
MountPathstring`json:"mountPath,omitempty"`
165
+
MountPath*string`json:"mountPath,omitempty"`
161
166
}
162
167
163
168
// persistentVolumeClaimReference is a reference to a PersistentVolumeClaim.
164
169
typePersistentVolumeClaimReferencestruct {
165
170
// name is a string that follows the DNS1123 subdomain format.
166
171
// 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
172
// +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
173
+
// +kubebuilder:validation:MinLength=1
174
+
// +kubebuilder:validation:MaxLength=253
169
175
// +required
170
-
Namestring`json:"name"`
176
+
Namestring`json:"name,omitempty"`
171
177
}
172
178
173
179
// gathererConfig allows to configure specific gatherers
@@ -180,15 +186,16 @@ type GathererConfig struct {
180
186
// The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md.
181
187
// Run the following command to get the names of last active gatherers:
182
188
// "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
189
+
// +kubebuilder:validation:MinLength=1
183
190
// +kubebuilder:validation:MaxLength=256
184
191
// +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
192
// +required
186
-
Namestring`json:"name"`
193
+
Namestring`json:"name,omitempty"`
187
194
// state is a required field that allows you to configure specific gatherer. Valid values are "Enabled" and "Disabled".
188
195
// When set to Enabled the gatherer will run.
189
196
// When set to Disabled the gatherer will not run.
190
197
// +required
191
-
StateGathererState`json:"state"`
198
+
StateGathererState`json:"state,omitempty"`
192
199
}
193
200
194
201
// state declares valid gatherer state types.
@@ -212,10 +219,11 @@ type InsightsDataGatherList struct {
212
219
// metadata is the required standard list's metadata.
213
220
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
214
221
// +required
215
-
metav1.ListMeta`json:"metadata"`
222
+
metav1.ListMeta`json:"metadata,omitempty"`
216
223
// 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
+1Lines changed: 1 addition & 0 deletions
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
Copy file name to clipboardExpand all lines: config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_insightsdatagathers-DevPreviewNoUpgrade.crd.yaml
+1Lines changed: 1 addition & 0 deletions
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
Copy file name to clipboardExpand all lines: config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_insightsdatagathers-TechPreviewNoUpgrade.crd.yaml
+1Lines changed: 1 addition & 0 deletions
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
Copy file name to clipboardExpand all lines: config/v1/zz_generated.featuregated-crd-manifests/insightsdatagathers.config.openshift.io/InsightsConfig.yaml
+1Lines changed: 1 addition & 0 deletions
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
0 commit comments