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