diff --git a/insights/install.go b/insights/install.go index 39286c7331b..62f3d0997aa 100644 --- a/insights/install.go +++ b/insights/install.go @@ -5,6 +5,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" insightsv1alpha1 "github.com/openshift/api/insights/v1alpha1" + insightsv1alpha2 "github.com/openshift/api/insights/v1alpha2" ) const ( @@ -12,7 +13,7 @@ const ( ) var ( - schemeBuilder = runtime.NewSchemeBuilder(insightsv1alpha1.Install) + schemeBuilder = runtime.NewSchemeBuilder(insightsv1alpha1.Install, insightsv1alpha2.Install) // Install is a function which adds every version of this group to a scheme Install = schemeBuilder.AddToScheme ) diff --git a/insights/v1alpha2/Makefile b/insights/v1alpha2/Makefile new file mode 100644 index 00000000000..d5f9bb96c6c --- /dev/null +++ b/insights/v1alpha2/Makefile @@ -0,0 +1,3 @@ +.PHONY: test +test: + make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="insights.openshift.io/v1alpha2" diff --git a/insights/v1alpha2/doc.go b/insights/v1alpha2/doc.go new file mode 100644 index 00000000000..9738e1be576 --- /dev/null +++ b/insights/v1alpha2/doc.go @@ -0,0 +1,7 @@ +// +k8s:deepcopy-gen=package,register +// +k8s:defaulter-gen=TypeMeta +// +k8s:openapi-gen=true + +// +groupName=insights.openshift.io +// Package v1alpha2 is the v1alpha2 version of the API. +package v1alpha2 diff --git a/insights/v1alpha2/register.go b/insights/v1alpha2/register.go new file mode 100644 index 00000000000..366b95e6ce8 --- /dev/null +++ b/insights/v1alpha2/register.go @@ -0,0 +1,38 @@ +package v1alpha2 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + GroupName = "insights.openshift.io" + GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} + schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // Install is a function which adds this version to a scheme + Install = schemeBuilder.AddToScheme + + // SchemeGroupVersion generated code relies on this name + // Deprecated + SchemeGroupVersion = GroupVersion + // AddToScheme exists solely to keep the old generators creating valid code + // DEPRECATED + AddToScheme = schemeBuilder.AddToScheme +) + +// Resource generated code relies on this being here, but it logically belongs to the group +// DEPRECATED +func Resource(resource string) schema.GroupResource { + return schema.GroupResource{Group: GroupName, Resource: resource} +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(GroupVersion, + &DataGather{}, + &DataGatherList{}, + ) + metav1.AddToGroupVersion(scheme, GroupVersion) + return nil +} diff --git a/insights/v1alpha2/tests/datagathers.insights.openshift.io/InsightsOnDemandDataGather.yaml b/insights/v1alpha2/tests/datagathers.insights.openshift.io/InsightsOnDemandDataGather.yaml new file mode 100644 index 00000000000..6a797b0785c --- /dev/null +++ b/insights/v1alpha2/tests/datagathers.insights.openshift.io/InsightsOnDemandDataGather.yaml @@ -0,0 +1,541 @@ +apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this +name: "[TechPreview] DataGather" +crdName: datagathers.insights.openshift.io +featureGates: + - InsightsOnDemandDataGather +tests: + onCreate: + - name: Should be able to create a minimal DataGather + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + expected: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} + - name: Should be able to create a DataGather with a storage persistentVolume, dataPolicy and gatherers + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + dataPolicy: + - WorkloadNames + gatherers: + mode: All + storage: + type: PersistentVolume + persistentVolume: + mountPath: /data + claim: + name: test-claim + expected: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + dataPolicy: + - WorkloadNames + gatherers: + mode: All + storage: + type: PersistentVolume + persistentVolume: + mountPath: /data + claim: + name: test-claim + - name: Should be able to create a DataGather with a storage Epemeral, multitple DataPolicy options and gatherers + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + dataPolicy: + - ObfuscateNetworking + - WorkloadNames + gatherers: + mode: None + storage: + type: Ephemeral + expected: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + dataPolicy: + - ObfuscateNetworking + - WorkloadNames + gatherers: + mode: None + storage: + type: Ephemeral + - name: Should be able to create DataGather with valid custom config + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + gatherers: + mode: Custom + custom: + configs: + - name: gatherer + state: Disabled + expected: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + gatherers: + mode: Custom + custom: + configs: + - name: gatherer + state: Disabled + - name: When gatherers.mode is Custom then Custom must be present + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + gatherers: + mode: Custom + expectedError: 'Invalid value: "object": custom is required when mode is Custom, and forbidden otherwise' + - name: State must contain only valid values + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + gatherers: + mode: Custom + custom: + configs: + - name: gatherer + state: InvalidState + expectedError: 'spec.gatherers.custom.configs[0].state: Unsupported value: "InvalidState": supported values: "Enabled", "Disabled", ' + - name: Name must be in a described format + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + gatherers: + mode: Custom + custom: + configs: + - name: gatherer_1 + state: Enabled + expectedError: 'spec.gatherers.custom.configs[0].name: Invalid value: "string": 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' + - name: When storage.type is persistentVolume then PersistentVolume must be present + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + storage: + type: PersistentVolume + expectedError: 'spec.storage: Invalid value: "object": persistentVolume is required when type is PersistentVolume, and forbidden otherwise' + - name: When storage.type is not persistentVolume then PersistentVolume must not be present + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + storage: + type: Ephemeral + persistentVolume: + claim: + name: test-claim + expectedError: 'spec.storage: Invalid value: "object": persistentVolume is required when type is PersistentVolume, and forbidden otherwise' + - name: mountPath must not contain colon + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + storage: + type: PersistentVolume + persistentVolume: + mountPath: /data:/data + claim: + name: test-claim + expectedError: 'spec.storage.persistentVolume.mountPath: Invalid value: "string": mountPath must not contain a colon' + - name: storage.type is required + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + storage: + persistentVolume: + mountPath: /data + claim: + name: test-claim + expectedError: "spec.storage.type: Required value" + - name: storage.persistentVolume.claim can not be empty + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + storage: + type: PersistentVolume + persistentVolume: + mountPath: /data + claim: + expectedError: "spec.storage.persistentVolume.claim: Required value" + - name: persistentVolumeClaim must follow the naming convention + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + storage: + type: PersistentVolume + persistentVolume: + claim: + name: INVALID_PVC_NAME + expectedError: 'Invalid value: "string": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, ''-'' or ''.'', and must start and end with an alphanumeric character.' + - name: dataPolicy must be one of a valid values + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + dataPolicy: + - InvalidValue + expectedError: 'spec.dataPolicy[0]: Unsupported value: "InvalidValue": supported values: "ObfuscateNetworking", "WorkloadNames", ' + - name: dataPolicy must not contain duplicates + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: + dataPolicy: + - WorkloadNames + - WorkloadNames + expectedError: 'invalid: spec.dataPolicy: Invalid value: "array": dataPolicy items must be unique' + onUpdate: + - name: status is present and startTime is added + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: xyz + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: xyz + startTime: 2023-03-13T11:34:06Z + expected: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: xyz + startTime: 2023-03-13T11:34:06Z + - name: startTime cannot be removed from status + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: xyz + startTime: 2023-03-13T11:34:06Z + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: xyz + expectedStatusError: 'status: Invalid value: "object": cannot remove startTime attribute from status' + - name: startTime is immutable once set + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: xyz + startTime: 2023-03-13T11:34:06Z + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: xyz + startTime: 2023-03-13T12:34:06Z + expectedStatusError: 'Invalid value: "string": startTime is immutable once set' + - name: Status is present and insightsRequestID is added + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + relatedObjects: + - name: periodic-job-xyz + resource: "pods" + group: "" + namespace: "openshift-insights" + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: testing-xyz + relatedObjects: + - name: periodic-job-xyz + resource: "pods" + group: "" + namespace: "openshift-insights" + expected: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: testing-xyz + relatedObjects: + - name: periodic-job-xyz + group: "" + resource: "pods" + namespace: "openshift-insights" + - name: insightsRequestID cannot be removed from status + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: testing-xyz + relatedObjects: + - name: periodic-job-xyz + group: "" + resource: "pods" + namespace: "openshift-insights" + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + relatedObjects: + - name: periodic-job-xyz + group: "" + resource: "pods" + namespace: "openshift-insights" + expectedStatusError: 'status: Invalid value: "object": cannot remove insightsRequestID attribute from status' + - name: insightsRequestID is immutable once set + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: testing-xyz + relatedObjects: + - name: periodic-job-xyz + group: "" + resource: "pods" + namespace: "openshift-insights" + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsRequestID: testing-xyz-updated + relatedObjects: + - name: periodic-job-xyz + group: "" + resource: "pods" + namespace: "openshift-insights" + expectedStatusError: 'Invalid value: "string": insightsRequestID is immutable once set' + - name: finishTime cannot be removed from status + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + finishTime: 2023-03-13T11:34:06Z + relatedObjects: + - name: periodic-job-xyz + group: "" + resource: "pods" + namespace: "openshift-insights" + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + relatedObjects: + - name: periodic-job-xyz + group: "" + resource: "pods" + namespace: "openshift-insights" + expectedStatusError: 'status: Invalid value: "object": cannot remove finishTime attribute from status' + - name: lastGatherSeconds must be integer + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + gatherers: + - name: testGatherer + lastGatherSeconds: 1.1 + conditions: + - type: Gathered + status: "True" + reason: OK + message: "test message" + lastTransitionTime: "2024-12-01T08:04:21Z" + expectedStatusError: "gatherers[0].lastGatherSeconds in body must be of type integer" + - name: lastGatherSeconds cannot be updated with an invalid value + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + gatherers: + - name: testGatherer + lastGatherSeconds: 1d2h + conditions: + - type: Gathered + status: "True" + reason: OK + message: "test message" + lastTransitionTime: "2024-12-01T08:04:21Z" + expectedStatusError: 'Invalid value: "string": gatherers[0].lastGatherSeconds in body must be of type integer' + - name: lastGatherSeconds cannot be updated with a negative value + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + gatherers: + - name: testGatherer + lastGatherSeconds: -5 + conditions: + - type: Gathered + status: "True" + reason: OK + message: "test message" + lastTransitionTime: "2024-12-01T08:04:21Z" + expectedStatusError: "lastGatherSeconds in body should be greater than or equal to 0" + - name: should not be updated with URL that is not HTTPS + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsReport: + uri: http://example.com + expectedStatusError: 'status.insightsReport.uri: Invalid value: "string": URI must be a valid HTTPS URL (e.g., https://example.com)' + - name: should be updated with a valid HTTPS URL + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsReport: + uri: https://example.com + expected: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsReport: + uri: https://example.com + - name: should be updated with a valid totalRisk + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsReport: + healthChecks: + - description: Low risk update test + totalRisk: Low + advisorURI: https://example.com + expected: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsReport: + healthChecks: + - description: Low risk update test + totalRisk: Low + advisorURI: https://example.com + - name: should not be updated with invalid totalRisk value + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsReport: + healthChecks: + - description: NoRisk update test + totalRisk: NoRisk + advisorURI: https://example.com + expectedStatusError: 'totalRisk: Unsupported value: "NoRisk": supported values: "Low", "Moderate", "Important", "Critical"' + - name: should pass + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsReport: + healthChecks: + - description: NoRisk update test + totalRisk: Low + advisorURI: https://example.com + - description: NoRisk update test + totalRisk: Important + advisorURI: https://example.com + expected: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsReport: + healthChecks: + - description: NoRisk update test + totalRisk: Low + advisorURI: https://example.com + - description: NoRisk update test + totalRisk: Important + advisorURI: https://example.com + - name: no duplicates + initial: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + updated: | + apiVersion: insights.openshift.io/v1alpha2 + kind: DataGather + spec: {} # No spec is required for a DataGather + status: + insightsReport: + healthChecks: + - description: Low risk update test + totalRisk: Low + advisorURI: https://example.com + - description: Low risk update test + totalRisk: Low + advisorURI: https://example.com + expectedStatusError: "invalid: status.insightsReport.healthChecks[1]: Duplicate value" diff --git a/insights/v1alpha2/types_insights.go b/insights/v1alpha2/types_insights.go new file mode 100644 index 00000000000..38c478401f7 --- /dev/null +++ b/insights/v1alpha2/types_insights.go @@ -0,0 +1,431 @@ +package v1alpha2 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=datagathers,scope=Cluster +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2248 +// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=insights,operatorOrdering=01 +// +openshift:enable:FeatureGate=InsightsOnDemandDataGather +// +kubebuilder:printcolumn:name=State,type=string,JSONPath=.status.dataGatherState,description=DataGather job state +// +kubebuilder:printcolumn:name=StartTime,type=date,JSONPath=.status.startTime,description=DataGather start time +// +kubebuilder:printcolumn:name=FinishTime,type=date,JSONPath=.status.finishTime,description=DataGather finish time +// +// DataGather provides data gather configuration options and status for the particular Insights data gathering. +// +// 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. +// +openshift:compatibility-gen:level=4 +type DataGather struct { + metav1.TypeMeta `json:",inline"` + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // spec holds user settable values for configuration + // +required + Spec DataGatherSpec `json:"spec"` + // status holds observed values from the cluster. They may not be overridden. + // +optional + Status DataGatherStatus `json:"status"` +} + +// DataGatherSpec contains the configuration for the DataGather. +type DataGatherSpec struct { + // dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. + // It may not exceed 2 items and must not contain duplicates. + // Valid values are ObfuscateNetworking and WorkloadNames. + // When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. + // 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. + // When omitted no obfuscation is applied. + // +kubebuilder:validation:MaxItems=2 + // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))",message="dataPolicy items must be unique" + // +listType=atomic + // +optional + DataPolicy []DataPolicyOption `json:"dataPolicy"` + // gatherers is an optional field that specifies the configuration of the gatherers. + // If omitted, all gatherers will be run. + // +optional + Gatherers *Gatherers `json:"gatherers,omitempty"` + // storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. + // If omitted, the gathering job will use ephemeral storage. + // +optional + Storage *Storage `json:"storage,omitempty"` +} + +// Gathereres specifies the configuration of the gatherers +// +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" +// +union +type Gatherers struct { + // mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. + // When set to All, all gatherers wil run and gather data. + // When set to None, all gatherers will be disabled and no data will be gathered. + // When set to Custom, the custom configuration from the custom field will be applied. + // +unionDiscriminator + // +required + Mode GatheringMode `json:"mode"` + // custom provides gathering configuration. + // It is required when mode is Custom, and forbidden otherwise. + // Custom configuration allows user to disable only a subset of gatherers. + // Gatherers that are not explicitly disabled in custom configuration will run. + // +optional + Custom *Custom `json:"custom,omitempty"` +} + +// custom provides the custom configuration of gatherers +type Custom struct { + // configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. + // It may not exceed 100 items and each gatherer can be present only once. + // It is possible to disable an entire set of gatherers while allowing a specific function within that set. + // The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. + // Run the following command to get the names of last active gatherers: + // "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" + // +kubebuilder:validation:MaxItems=100 + // +listType=map + // +listMapKey=name + // +required + Configs []GathererConfig `json:"configs"` +} + +// gatheringMode defines the valid gathering modes. +// +kubebuilder:validation:Enum=All;None;Custom +type GatheringMode string + +const ( + // Enabled enables all gatherers + GatheringModeAll GatheringMode = "All" + // Disabled disables all gatherers + GatheringModeNone GatheringMode = "None" + // Custom applies the configuration from GatheringConfig. + GatheringModeCustom GatheringMode = "Custom" +) + +// storage provides persistent storage configuration options for gathering jobs. +// If the type is set to PersistentVolume, then the PersistentVolume must be defined. +// If the type is set to Ephemeral, then the PersistentVolume must not be defined. +// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'PersistentVolume' ? has(self.persistentVolume) : !has(self.persistentVolume)",message="persistentVolume is required when type is PersistentVolume, and forbidden otherwise" +// +union +type Storage struct { + // type is a required field that specifies the type of storage that will be used to store the Insights data archive. + // Valid values are "PersistentVolume" and "Ephemeral". + // When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. + // When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is + // defined by the PersistentVolume field. + // +unionDiscriminator + // +required + Type StorageType `json:"type"` + // persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. + // The PersistentVolume must be created in the openshift-insights namespace. + // +optional + PersistentVolume *PersistentVolumeConfig `json:"persistentVolume,omitempty"` +} + +// storageType declares valid storage types +// +kubebuilder:validation:Enum=PersistentVolume;Ephemeral +type StorageType string + +const ( + // StorageTypePersistentVolume storage type + StorageTypePersistentVolume StorageType = "PersistentVolume" + // StorageTypeEphemeral storage type + StorageTypeEphemeral StorageType = "Ephemeral" +) + +// persistentVolumeConfig provides configuration options for PersistentVolume storage. +type PersistentVolumeConfig struct { + // claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. + // The PersistentVolumeClaim must be created in the openshift-insights namespace. + // +required + Claim PersistentVolumeClaimReference `json:"claim"` + // mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + // The current default mount path is /var/lib/insights-operator + // The path may not exceed 1024 characters and must not contain a colon. + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:XValidation:rule="!self.contains(':')",message="mountPath must not contain a colon" + // +optional + MountPath string `json:"mountPath,omitempty"` +} + +// persistentVolumeClaimReference is a reference to a PersistentVolumeClaim. +type PersistentVolumeClaimReference struct { + // name is a string that follows the DNS1123 subdomain format. + // 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. + // +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." + // +kubebuilder:validation:MaxLength:=253 + // +required + Name string `json:"name"` +} + +// dataPolicyOption declares valid data policy types +// +kubebuilder:validation:Enum=ObfuscateNetworking;WorkloadNames +type DataPolicyOption string + +const ( + // IP addresses and cluster domain name are obfuscated + DataPolicyOptionObfuscateNetworking DataPolicyOption = "ObfuscateNetworking" + // Data from Deployment Validation Operator are obfuscated + DataPolicyOptionObfuscateWorkloadNames DataPolicyOption = "WorkloadNames" +) + +// gathererConfig allows to configure specific gatherers +type GathererConfig struct { + // name is the required name of a specific gatherer + // It may not exceed 256 characters. + // The format for a gatherer name is: {gatherer}/{function} where the function is optional. + // Gatherer consists of a lowercase letters only that may include underscores (_). + // Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). + // The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. + // Run the following command to get the names of last active gatherers: + // "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" + // +kubebuilder:validation:MaxLength=256 + // +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` + // +required + Name string `json:"name"` + // state is a required field that allows you to configure specific gatherer. Valid values are "Enabled" and "Disabled". + // When set to Enabled the gatherer will run. + // When set to Disabled the gatherer will not run. + // +required + State GathererState `json:"state"` +} + +// state declares valid gatherer state types. +// +kubebuilder:validation:Enum=Enabled;Disabled +type GathererState string + +const ( + // GathererStateEnabled gatherer state, which means that the gatherer will run. + GathererStateEnabled GathererState = "Enabled" + // GathererStateDisabled gatherer state, which means that the gatherer will not run. + GathererStateDisabled GathererState = "Disabled" +) + +// DataGatherStatus contains information relating to the DataGather state. +// +kubebuilder:validation:XValidation:rule="(!has(oldSelf.insightsRequestID) || has(self.insightsRequestID))",message="cannot remove insightsRequestID attribute from status" +// +kubebuilder:validation:XValidation:rule="(!has(oldSelf.startTime) || has(self.startTime))",message="cannot remove startTime attribute from status" +// +kubebuilder:validation:XValidation:rule="(!has(oldSelf.finishTime) || has(self.finishTime))",message="cannot remove finishTime attribute from status" +// +kubebuilder:validation:Optional +type DataGatherStatus struct { + // conditions is an optional field that provides details on the status of the gatherer job. + // It may not exceed 100 items and must not contain duplicates. + // + // The current condition types are DataUploaded, DataRecorded, DataProcessed, RemoteConfigurationNotAvailable, RemoteConfigurationInvalid + // + // The DataUploaded condition is used to represent whether or not the archive was successfully uploaded for further processing. + // When it has a status of True and a reason of Succeeded, the archive was successfully uploaded. + // When it has a status of Unknown and a reason of NoUploadYet, the upload has not occurred, or there was no data to upload. + // When it has a status of False and a reason Failed, the upload failed. The accompanying message will include the specific error encountered. + // + // The DataRecorded condition is used to represent whether or not the archive was successfully recorded. + // When it has a status of True and a reason of Succeeded, the archive was recorded successfully. + // When it has a status of Unknown and a reason of NoDataGatheringYet, the data gathering process has not started yet. + // When it has a status of False and a reason of RecordingFailed, the recording failed and a message will include the specific error encountered. + // + // The DataProcessed condition is used to represent whether or not the archive was processed by the processing service. + // When it has a status of True and a reason of Processed, the data was processed successfully. + // When it has a status of Unknown and a reason of NothingToProcessYet, there is no data to process at the moment. + // When it has a status of False and a reason of Failure, processing failed and a message will include the specific error encountered. + // + // The RemoteConfigurationAvailable condition is used to represent whether the remote configuration is available. + // When it has a status of Unknown and a reason of Unknown or RemoteConfigNotRequestedYet, the state of the remote configuration is unknown—typically at startup. + // When it has a status of True and a reason of Succeeded, the configuration is available. + // When it has a status of False and a reason of NoToken, the configuration was disabled by removing the cloud.openshift.com field from the pull secret. + // When it has a status of False and a reason of DisabledByConfiguration, the configuration was disabled in insightsdatagather.config.openshift.io. + // + // The RemoteConfigurationValid condition is used to represent whether the remote configuration is valid. + // When it has a status of Unknown and a reason of Unknown or NoValidationYet, the validity of the remote configuration is unknown—typically at startup. + // When it has a status of True and a reason of Succeeded, the configuration is valid. + // When it has a status of False and a reason of Invalid, the configuration is invalid. + // + // The Progressing condition is used to represent the phase of gathering + // When it has a status of False and the reason is DataGatherPending, the gathering has not started yet. + // When it has a status of True and reason is Gathering, the gathering is running. + // When it has a status of False and reason is GatheringSucceeded, the gathering succesfully finished. + // When it has a status of False and reason is GatheringFailed, the gathering failed. + // + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MaxItems=100 + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` + // gatherers is a list of active gatherers (and their statuses) in the last gathering. + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MaxItems=100 + // +optional + Gatherers []GathererStatus `json:"gatherers,omitempty"` + // startTime is the time when Insights data gathering started. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="startTime is immutable once set" + // +optional + StartTime *metav1.Time `json:"startTime,omitempty"` + // finishTime is the time when Insights data gathering finished. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="finishTime is immutable once set" + // +optional + FinishTime *metav1.Time `json:"finishTime,omitempty"` + // relatedObjects is an optional list of resources which are useful when debugging or inspecting the data gathering Pod + // It may not exceed 100 items and must not contain duplicates. + // +listType=map + // +listMapKey=name + // +listMapKey=namespace + // +kubebuilder:validation:MaxItems=100 + // +optional + RelatedObjects []ObjectReference `json:"relatedObjects,omitempty"` + // insightsRequestID is an optional Insights request ID to track the status of the Insights analysis (in console.redhat.com processing pipeline) for the corresponding Insights data archive. + // It may not exceed 256 characters and is immutable once set. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="insightsRequestID is immutable once set" + // +kubebuilder:validation:MaxLength=256 + // +optional + InsightsRequestID string `json:"insightsRequestID,omitempty"` + // insightsReport provides general Insights analysis results. + // When omitted, this means no data gathering has taken place yet or the + // corresponding Insights analysis (identified by "insightsRequestID") is not available. + // +optional + InsightsReport InsightsReport `json:"insightsReport,omitempty"` +} + +// gathererStatus represents information about a particular +// data gatherer. +type GathererStatus struct { + // conditions provide details on the status of each gatherer. + // + // The current condition type is DataGathered + // + // The DataGathered condition is used to represent whether or not the data was gathered by a gatherer specified by name. + // When it has a status of True and a reason of GatheredOK, the data has been successfully gathered as expected. + // When it has a status of False and a reason of NoData, no data was gathered—for example, when the resource is not present in the cluster. + // When it has a status of False and a reason of GatherError, an error occurred and no data was gathered. + // When it has a status of False and a reason of GatherPanic, a panic occurred during gathering and no data was collected. + // When it has a status of False and a reason of GatherWithErrorReason, data was partially gathered or gathered with an error message. + // + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=100 + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` + // name is the required name of the gatherer. + // It must contain at least 5 characters and may not exceed 256 characters. + // +kubebuilder:validation:MaxLength=256 + // +kubebuilder:validation:MinLength=5 + // +required + Name string `json:"name"` + // lastGatherSeconds is required field that represents the time spent gathering in seconds + // +kubebuilder:validation:Minimum=0 + // +required + LastGatherSeconds int32 `json:"lastGatherSeconds"` +} + +// insightsReport provides Insights health check report based on the most +// recently sent Insights data. +type InsightsReport struct { + // downloadedTime is an optional time when the last Insights report was downloaded. + // An empty value means that there has not been any Insights report downloaded yet and + // it usually appears in disconnected clusters (or clusters when the Insights data gathering is disabled). + // +optional + DownloadedTime *metav1.Time `json:"downloadedTime,omitempty"` + // healthChecks provides basic information about active Insights health checks + // in a cluster. + // +listType=map + // +listMapKey=advisorURI + // +listMapKey=totalRisk + // +listMapKey=description + // +kubebuilder:validation:MaxItems=100 + // +optional + HealthChecks []HealthCheck `json:"healthChecks,omitempty"` + // uri is optional field that provides the URL link from which the report was downloaded. + // The link must be a valid HTTPS URL and the maximum length is 2048 characters. + // +kubebuilder:validation:XValidation:rule=`isURL(self) && url(self).getScheme() == "https"`,message=`URI must be a valid HTTPS URL (e.g., https://example.com)` + // +kubebuilder:validation:MaxLength=2048 + // +optional + URI string `json:"uri,omitempty"` +} + +// healthCheck represents an Insights health check attributes. +type HealthCheck struct { + // description is required field that provides basic description of the healtcheck. + // It must contain at least 10 characters and may not exceed 2048 characters. + // +kubebuilder:validation:MaxLength=2048 + // +kubebuilder:validation:MinLength=10 + // +required + Description string `json:"description"` + // totalRisk is the required field of the healthcheck. + // It is indicator of the total risk posed by the detected issue; combination of impact and likelihood. + // Allowed values are Low, Medium, Important and Critical. + // The value represents the severity of the issue. + // +required + TotalRisk TotalRisk `json:"totalRisk"` + // advisorURI is required field that provides the URL link to the Insights Advisor. + // The link must be a valid HTTPS URL and the maximum length is 2048 characters. + // +kubebuilder:validation:XValidation:rule=`isURL(self) && url(self).getScheme() == "https"`,message=`advisorURI must be a valid HTTPS URL (e.g., https://example.com)` + // +kubebuilder:validation:MaxLength=2048 + // +required + AdvisorURI string `json:"advisorURI"` +} + +// totalRisk defines the valid totalRisk values. +// +kubebuilder:validation:Enum=Low;Moderate;Important;Critical +type TotalRisk string + +const ( + TotalRiskLow TotalRisk = "Low" + TotalRiskModerate TotalRisk = "Moderate" + TotalRiskImportant TotalRisk = "Important" + TotalRiskCritical TotalRisk = "Critical" +) + +// ObjectReference contains enough information to let you inspect or modify the referred object. +type ObjectReference struct { + // group is required field that specifies the API Group of the Resource. + // Enter empty string for the core group. + // This value is empty or it should follow the DNS1123 subdomain format. + // 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. + // Example: "", "apps", "build.openshift.io", etc. + // +kubebuilder:validation:XValidation:rule="self.size() == 0 || !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." + // +kubebuilder:validation:MaxLength:=253 + // +required + Group string `json:"group"` + // resource is required field of the type that is being referenced. + // It is normally the plural form of the resource kind in lowercase. + // It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens + // Example: "deployments", "deploymentconfigs", "pods", etc. + // +kubebuilder:validation:XValidation:rule=`!format.dns1123Label().validate(self).hasValue()`,message="the value must consist of only lowercase alphanumeric characters and hyphens" + // +kubebuilder:validation:MaxLength=63 + // +required + Resource string `json:"resource"` + // name is required field that specifies the referent that follows the DNS1123 subdomain format. + // 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. + // +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." + // +kubebuilder:validation:MaxLength=253 + // +required + Name string `json:"name"` + // namespace if required field of the referent that follows the DNS1123 labels format. + // It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens + // +kubebuilder:validation:XValidation:rule=`!format.dns1123Label().validate(self).hasValue()`,message="the value must consist of only lowercase alphanumeric characters and hyphens" + // +kubebuilder:validation:MaxLength=63 + // +required + Namespace string `json:"namespace"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DataGatherList is a collection of items +// +// 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. +// +openshift:compatibility-gen:level=4 +type DataGatherList struct { + metav1.TypeMeta `json:",inline"` + // metadata is the standard list's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + // items contains a list of DataGather resources. + // +listType=atomic + // +kubebuilder:validation:MaxItems=100 + // +optional + Items []DataGather `json:"items,omitempty"` +} diff --git a/insights/v1alpha2/zz_generated.crd-manifests/0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml b/insights/v1alpha2/zz_generated.crd-manifests/0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml new file mode 100644 index 00000000000..f77a0454f60 --- /dev/null +++ b/insights/v1alpha2/zz_generated.crd-manifests/0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml @@ -0,0 +1,604 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2248 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: CustomNoUpgrade + name: datagathers.insights.openshift.io +spec: + group: insights.openshift.io + names: + kind: DataGather + listKind: DataGatherList + plural: datagathers + singular: datagather + scope: Cluster + versions: + - additionalPrinterColumns: + - description: DataGather job state + jsonPath: .status.dataGatherState + name: State + type: string + - description: DataGather start time + jsonPath: .status.startTime + name: StartTime + type: date + - description: DataGather finish time + jsonPath: .status.finishTime + name: FinishTime + type: date + name: v1alpha2 + schema: + openAPIV3Schema: + description: |- + DataGather provides data gather configuration options and status for the particular Insights data gathering. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec holds user settable values for configuration + properties: + dataPolicy: + description: |- + dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. + It may not exceed 2 items and must not contain duplicates. + Valid values are ObfuscateNetworking and WorkloadNames. + When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. + 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. + When omitted no obfuscation is applied. + items: + description: dataPolicyOption declares valid data policy types + enum: + - ObfuscateNetworking + - WorkloadNames + type: string + maxItems: 2 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: dataPolicy items must be unique + rule: self.all(x, self.exists_one(y, x == y)) + gatherers: + description: |- + gatherers is an optional field that specifies the configuration of the gatherers. + If omitted, all gatherers will be run. + properties: + custom: + description: |- + custom provides gathering configuration. + It is required when mode is Custom, and forbidden otherwise. + Custom configuration allows user to disable only a subset of gatherers. + Gatherers that are not explicitly disabled in custom configuration will run. + properties: + configs: + description: |- + configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. + It may not exceed 100 items and each gatherer can be present only once. + It is possible to disable an entire set of gatherers while allowing a specific function within that set. + The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. + Run the following command to get the names of last active gatherers: + "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" + items: + description: gathererConfig allows to configure specific + gatherers + properties: + name: + description: |- + name is the required name of a specific gatherer + It may not exceed 256 characters. + The format for a gatherer name is: {gatherer}/{function} where the function is optional. + Gatherer consists of a lowercase letters only that may include underscores (_). + Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). + The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. + Run the following command to get the names of last active gatherers: + "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" + maxLength: 256 + type: string + x-kubernetes-validations: + - 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 + rule: self.matches("^[a-z]+[_a-z]*[a-z]([/a-z][_a-z]*)?[a-z]$") + state: + description: |- + state is a required field that allows you to configure specific gatherer. Valid values are "Enabled" and "Disabled". + When set to Enabled the gatherer will run. + When set to Disabled the gatherer will not run. + enum: + - Enabled + - Disabled + type: string + required: + - name + - state + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - configs + type: object + mode: + description: |- + mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. + When set to All, all gatherers wil run and gather data. + When set to None, all gatherers will be disabled and no data will be gathered. + When set to Custom, the custom configuration from the custom field will be applied. + enum: + - All + - None + - Custom + type: string + required: + - mode + type: object + x-kubernetes-validations: + - message: custom is required when mode is Custom, and forbidden otherwise + rule: 'has(self.mode) && self.mode == ''Custom'' ? has(self.custom) + : !has(self.custom)' + storage: + description: |- + storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. + If omitted, the gathering job will use ephemeral storage. + properties: + persistentVolume: + description: |- + persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. + The PersistentVolume must be created in the openshift-insights namespace. + properties: + claim: + description: |- + claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. + The PersistentVolumeClaim must be created in the openshift-insights namespace. + properties: + name: + description: |- + name is a string that follows the DNS1123 subdomain format. + 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. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist + of lower case alphanumeric characters, '-' or '.', + and must start and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' + required: + - name + type: object + mountPath: + description: |- + mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default mount path is /var/lib/insights-operator + The path may not exceed 1024 characters and must not contain a colon. + maxLength: 1024 + type: string + x-kubernetes-validations: + - message: mountPath must not contain a colon + rule: '!self.contains('':'')' + required: + - claim + type: object + type: + description: |- + type is a required field that specifies the type of storage that will be used to store the Insights data archive. + Valid values are "PersistentVolume" and "Ephemeral". + When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. + When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is + defined by the PersistentVolume field. + enum: + - PersistentVolume + - Ephemeral + type: string + required: + - type + type: object + x-kubernetes-validations: + - message: persistentVolume is required when type is PersistentVolume, + and forbidden otherwise + rule: 'has(self.type) && self.type == ''PersistentVolume'' ? has(self.persistentVolume) + : !has(self.persistentVolume)' + type: object + status: + description: status holds observed values from the cluster. They may not + be overridden. + properties: + conditions: + description: |- + conditions is an optional field that provides details on the status of the gatherer job. + It may not exceed 100 items and must not contain duplicates. + + The current condition types are DataUploaded, DataRecorded, DataProcessed, RemoteConfigurationNotAvailable, RemoteConfigurationInvalid + + The DataUploaded condition is used to represent whether or not the archive was successfully uploaded for further processing. + When it has a status of True and a reason of Succeeded, the archive was successfully uploaded. + When it has a status of Unknown and a reason of NoUploadYet, the upload has not occurred, or there was no data to upload. + When it has a status of False and a reason Failed, the upload failed. The accompanying message will include the specific error encountered. + + The DataRecorded condition is used to represent whether or not the archive was successfully recorded. + When it has a status of True and a reason of Succeeded, the archive was recorded successfully. + When it has a status of Unknown and a reason of NoDataGatheringYet, the data gathering process has not started yet. + When it has a status of False and a reason of RecordingFailed, the recording failed and a message will include the specific error encountered. + + The DataProcessed condition is used to represent whether or not the archive was processed by the processing service. + When it has a status of True and a reason of Processed, the data was processed successfully. + When it has a status of Unknown and a reason of NothingToProcessYet, there is no data to process at the moment. + When it has a status of False and a reason of Failure, processing failed and a message will include the specific error encountered. + + The RemoteConfigurationAvailable condition is used to represent whether the remote configuration is available. + When it has a status of Unknown and a reason of Unknown or RemoteConfigNotRequestedYet, the state of the remote configuration is unknown—typically at startup. + When it has a status of True and a reason of Succeeded, the configuration is available. + When it has a status of False and a reason of NoToken, the configuration was disabled by removing the cloud.openshift.com field from the pull secret. + When it has a status of False and a reason of DisabledByConfiguration, the configuration was disabled in insightsdatagather.config.openshift.io. + + The RemoteConfigurationValid condition is used to represent whether the remote configuration is valid. + When it has a status of Unknown and a reason of Unknown or NoValidationYet, the validity of the remote configuration is unknown—typically at startup. + When it has a status of True and a reason of Succeeded, the configuration is valid. + When it has a status of False and a reason of Invalid, the configuration is invalid. + + The Progressing condition is used to represent the phase of gathering + When it has a status of False and the reason is DataGatherPending, the gathering has not started yet. + When it has a status of True and reason is Gathering, the gathering is running. + When it has a status of False and reason is GatheringSucceeded, the gathering succesfully finished. + When it has a status of False and reason is GatheringFailed, the gathering failed. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + finishTime: + description: finishTime is the time when Insights data gathering finished. + format: date-time + type: string + x-kubernetes-validations: + - message: finishTime is immutable once set + rule: self == oldSelf + gatherers: + description: gatherers is a list of active gatherers (and their statuses) + in the last gathering. + items: + description: |- + gathererStatus represents information about a particular + data gatherer. + properties: + conditions: + description: |- + conditions provide details on the status of each gatherer. + + The current condition type is DataGathered + + The DataGathered condition is used to represent whether or not the data was gathered by a gatherer specified by name. + When it has a status of True and a reason of GatheredOK, the data has been successfully gathered as expected. + When it has a status of False and a reason of NoData, no data was gathered—for example, when the resource is not present in the cluster. + When it has a status of False and a reason of GatherError, an error occurred and no data was gathered. + When it has a status of False and a reason of GatherPanic, a panic occurred during gathering and no data was collected. + When it has a status of False and a reason of GatherWithErrorReason, data was partially gathered or gathered with an error message. + items: + description: Condition contains details for one aspect of + the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + lastGatherSeconds: + description: lastGatherSeconds is required field that represents + the time spent gathering in seconds + format: int32 + minimum: 0 + type: integer + name: + description: |- + name is the required name of the gatherer. + It must contain at least 5 characters and may not exceed 256 characters. + maxLength: 256 + minLength: 5 + type: string + required: + - lastGatherSeconds + - name + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + insightsReport: + description: |- + insightsReport provides general Insights analysis results. + When omitted, this means no data gathering has taken place yet or the + corresponding Insights analysis (identified by "insightsRequestID") is not available. + properties: + downloadedTime: + description: |- + downloadedTime is an optional time when the last Insights report was downloaded. + An empty value means that there has not been any Insights report downloaded yet and + it usually appears in disconnected clusters (or clusters when the Insights data gathering is disabled). + format: date-time + type: string + healthChecks: + description: |- + healthChecks provides basic information about active Insights health checks + in a cluster. + items: + description: healthCheck represents an Insights health check + attributes. + properties: + advisorURI: + description: |- + advisorURI is required field that provides the URL link to the Insights Advisor. + The link must be a valid HTTPS URL and the maximum length is 2048 characters. + maxLength: 2048 + type: string + x-kubernetes-validations: + - message: advisorURI must be a valid HTTPS URL (e.g., https://example.com) + rule: isURL(self) && url(self).getScheme() == "https" + description: + description: |- + description is required field that provides basic description of the healtcheck. + It must contain at least 10 characters and may not exceed 2048 characters. + maxLength: 2048 + minLength: 10 + type: string + totalRisk: + description: |- + totalRisk is the required field of the healthcheck. + It is indicator of the total risk posed by the detected issue; combination of impact and likelihood. + Allowed values are Low, Medium, Important and Critical. + The value represents the severity of the issue. + enum: + - Low + - Moderate + - Important + - Critical + type: string + required: + - advisorURI + - description + - totalRisk + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - advisorURI + - totalRisk + - description + x-kubernetes-list-type: map + uri: + description: |- + uri is optional field that provides the URL link from which the report was downloaded. + The link must be a valid HTTPS URL and the maximum length is 2048 characters. + maxLength: 2048 + type: string + x-kubernetes-validations: + - message: URI must be a valid HTTPS URL (e.g., https://example.com) + rule: isURL(self) && url(self).getScheme() == "https" + type: object + insightsRequestID: + description: |- + insightsRequestID is an optional Insights request ID to track the status of the Insights analysis (in console.redhat.com processing pipeline) for the corresponding Insights data archive. + It may not exceed 256 characters and is immutable once set. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: insightsRequestID is immutable once set + rule: self == oldSelf + relatedObjects: + description: |- + relatedObjects is an optional list of resources which are useful when debugging or inspecting the data gathering Pod + It may not exceed 100 items and must not contain duplicates. + items: + description: ObjectReference contains enough information to let + you inspect or modify the referred object. + properties: + group: + description: |- + group is required field that specifies the API Group of the Resource. + Enter empty string for the core group. + This value is empty or it should follow the DNS1123 subdomain format. + 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. + Example: "", "apps", "build.openshift.io", etc. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: self.size() == 0 || !format.dns1123Subdomain().validate(self).hasValue() + name: + description: |- + name is required field that specifies the referent that follows the DNS1123 subdomain format. + 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. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' + namespace: + description: |- + namespace if required field of the referent that follows the DNS1123 labels format. + It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens + maxLength: 63 + type: string + x-kubernetes-validations: + - message: the value must consist of only lowercase alphanumeric + characters and hyphens + rule: '!format.dns1123Label().validate(self).hasValue()' + resource: + description: |- + resource is required field of the type that is being referenced. + It is normally the plural form of the resource kind in lowercase. + It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens + Example: "deployments", "deploymentconfigs", "pods", etc. + maxLength: 63 + type: string + x-kubernetes-validations: + - message: the value must consist of only lowercase alphanumeric + characters and hyphens + rule: '!format.dns1123Label().validate(self).hasValue()' + required: + - group + - name + - namespace + - resource + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + - namespace + x-kubernetes-list-type: map + startTime: + description: startTime is the time when Insights data gathering started. + format: date-time + type: string + x-kubernetes-validations: + - message: startTime is immutable once set + rule: self == oldSelf + type: object + x-kubernetes-validations: + - message: cannot remove insightsRequestID attribute from status + rule: (!has(oldSelf.insightsRequestID) || has(self.insightsRequestID)) + - message: cannot remove startTime attribute from status + rule: (!has(oldSelf.startTime) || has(self.startTime)) + - message: cannot remove finishTime attribute from status + rule: (!has(oldSelf.finishTime) || has(self.finishTime)) + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/insights/v1alpha2/zz_generated.crd-manifests/0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml b/insights/v1alpha2/zz_generated.crd-manifests/0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..671cddc9dd2 --- /dev/null +++ b/insights/v1alpha2/zz_generated.crd-manifests/0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml @@ -0,0 +1,604 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2248 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: DevPreviewNoUpgrade + name: datagathers.insights.openshift.io +spec: + group: insights.openshift.io + names: + kind: DataGather + listKind: DataGatherList + plural: datagathers + singular: datagather + scope: Cluster + versions: + - additionalPrinterColumns: + - description: DataGather job state + jsonPath: .status.dataGatherState + name: State + type: string + - description: DataGather start time + jsonPath: .status.startTime + name: StartTime + type: date + - description: DataGather finish time + jsonPath: .status.finishTime + name: FinishTime + type: date + name: v1alpha2 + schema: + openAPIV3Schema: + description: |- + DataGather provides data gather configuration options and status for the particular Insights data gathering. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec holds user settable values for configuration + properties: + dataPolicy: + description: |- + dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. + It may not exceed 2 items and must not contain duplicates. + Valid values are ObfuscateNetworking and WorkloadNames. + When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. + 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. + When omitted no obfuscation is applied. + items: + description: dataPolicyOption declares valid data policy types + enum: + - ObfuscateNetworking + - WorkloadNames + type: string + maxItems: 2 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: dataPolicy items must be unique + rule: self.all(x, self.exists_one(y, x == y)) + gatherers: + description: |- + gatherers is an optional field that specifies the configuration of the gatherers. + If omitted, all gatherers will be run. + properties: + custom: + description: |- + custom provides gathering configuration. + It is required when mode is Custom, and forbidden otherwise. + Custom configuration allows user to disable only a subset of gatherers. + Gatherers that are not explicitly disabled in custom configuration will run. + properties: + configs: + description: |- + configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. + It may not exceed 100 items and each gatherer can be present only once. + It is possible to disable an entire set of gatherers while allowing a specific function within that set. + The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. + Run the following command to get the names of last active gatherers: + "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" + items: + description: gathererConfig allows to configure specific + gatherers + properties: + name: + description: |- + name is the required name of a specific gatherer + It may not exceed 256 characters. + The format for a gatherer name is: {gatherer}/{function} where the function is optional. + Gatherer consists of a lowercase letters only that may include underscores (_). + Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). + The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. + Run the following command to get the names of last active gatherers: + "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" + maxLength: 256 + type: string + x-kubernetes-validations: + - 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 + rule: self.matches("^[a-z]+[_a-z]*[a-z]([/a-z][_a-z]*)?[a-z]$") + state: + description: |- + state is a required field that allows you to configure specific gatherer. Valid values are "Enabled" and "Disabled". + When set to Enabled the gatherer will run. + When set to Disabled the gatherer will not run. + enum: + - Enabled + - Disabled + type: string + required: + - name + - state + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - configs + type: object + mode: + description: |- + mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. + When set to All, all gatherers wil run and gather data. + When set to None, all gatherers will be disabled and no data will be gathered. + When set to Custom, the custom configuration from the custom field will be applied. + enum: + - All + - None + - Custom + type: string + required: + - mode + type: object + x-kubernetes-validations: + - message: custom is required when mode is Custom, and forbidden otherwise + rule: 'has(self.mode) && self.mode == ''Custom'' ? has(self.custom) + : !has(self.custom)' + storage: + description: |- + storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. + If omitted, the gathering job will use ephemeral storage. + properties: + persistentVolume: + description: |- + persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. + The PersistentVolume must be created in the openshift-insights namespace. + properties: + claim: + description: |- + claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. + The PersistentVolumeClaim must be created in the openshift-insights namespace. + properties: + name: + description: |- + name is a string that follows the DNS1123 subdomain format. + 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. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist + of lower case alphanumeric characters, '-' or '.', + and must start and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' + required: + - name + type: object + mountPath: + description: |- + mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default mount path is /var/lib/insights-operator + The path may not exceed 1024 characters and must not contain a colon. + maxLength: 1024 + type: string + x-kubernetes-validations: + - message: mountPath must not contain a colon + rule: '!self.contains('':'')' + required: + - claim + type: object + type: + description: |- + type is a required field that specifies the type of storage that will be used to store the Insights data archive. + Valid values are "PersistentVolume" and "Ephemeral". + When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. + When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is + defined by the PersistentVolume field. + enum: + - PersistentVolume + - Ephemeral + type: string + required: + - type + type: object + x-kubernetes-validations: + - message: persistentVolume is required when type is PersistentVolume, + and forbidden otherwise + rule: 'has(self.type) && self.type == ''PersistentVolume'' ? has(self.persistentVolume) + : !has(self.persistentVolume)' + type: object + status: + description: status holds observed values from the cluster. They may not + be overridden. + properties: + conditions: + description: |- + conditions is an optional field that provides details on the status of the gatherer job. + It may not exceed 100 items and must not contain duplicates. + + The current condition types are DataUploaded, DataRecorded, DataProcessed, RemoteConfigurationNotAvailable, RemoteConfigurationInvalid + + The DataUploaded condition is used to represent whether or not the archive was successfully uploaded for further processing. + When it has a status of True and a reason of Succeeded, the archive was successfully uploaded. + When it has a status of Unknown and a reason of NoUploadYet, the upload has not occurred, or there was no data to upload. + When it has a status of False and a reason Failed, the upload failed. The accompanying message will include the specific error encountered. + + The DataRecorded condition is used to represent whether or not the archive was successfully recorded. + When it has a status of True and a reason of Succeeded, the archive was recorded successfully. + When it has a status of Unknown and a reason of NoDataGatheringYet, the data gathering process has not started yet. + When it has a status of False and a reason of RecordingFailed, the recording failed and a message will include the specific error encountered. + + The DataProcessed condition is used to represent whether or not the archive was processed by the processing service. + When it has a status of True and a reason of Processed, the data was processed successfully. + When it has a status of Unknown and a reason of NothingToProcessYet, there is no data to process at the moment. + When it has a status of False and a reason of Failure, processing failed and a message will include the specific error encountered. + + The RemoteConfigurationAvailable condition is used to represent whether the remote configuration is available. + When it has a status of Unknown and a reason of Unknown or RemoteConfigNotRequestedYet, the state of the remote configuration is unknown—typically at startup. + When it has a status of True and a reason of Succeeded, the configuration is available. + When it has a status of False and a reason of NoToken, the configuration was disabled by removing the cloud.openshift.com field from the pull secret. + When it has a status of False and a reason of DisabledByConfiguration, the configuration was disabled in insightsdatagather.config.openshift.io. + + The RemoteConfigurationValid condition is used to represent whether the remote configuration is valid. + When it has a status of Unknown and a reason of Unknown or NoValidationYet, the validity of the remote configuration is unknown—typically at startup. + When it has a status of True and a reason of Succeeded, the configuration is valid. + When it has a status of False and a reason of Invalid, the configuration is invalid. + + The Progressing condition is used to represent the phase of gathering + When it has a status of False and the reason is DataGatherPending, the gathering has not started yet. + When it has a status of True and reason is Gathering, the gathering is running. + When it has a status of False and reason is GatheringSucceeded, the gathering succesfully finished. + When it has a status of False and reason is GatheringFailed, the gathering failed. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + finishTime: + description: finishTime is the time when Insights data gathering finished. + format: date-time + type: string + x-kubernetes-validations: + - message: finishTime is immutable once set + rule: self == oldSelf + gatherers: + description: gatherers is a list of active gatherers (and their statuses) + in the last gathering. + items: + description: |- + gathererStatus represents information about a particular + data gatherer. + properties: + conditions: + description: |- + conditions provide details on the status of each gatherer. + + The current condition type is DataGathered + + The DataGathered condition is used to represent whether or not the data was gathered by a gatherer specified by name. + When it has a status of True and a reason of GatheredOK, the data has been successfully gathered as expected. + When it has a status of False and a reason of NoData, no data was gathered—for example, when the resource is not present in the cluster. + When it has a status of False and a reason of GatherError, an error occurred and no data was gathered. + When it has a status of False and a reason of GatherPanic, a panic occurred during gathering and no data was collected. + When it has a status of False and a reason of GatherWithErrorReason, data was partially gathered or gathered with an error message. + items: + description: Condition contains details for one aspect of + the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + lastGatherSeconds: + description: lastGatherSeconds is required field that represents + the time spent gathering in seconds + format: int32 + minimum: 0 + type: integer + name: + description: |- + name is the required name of the gatherer. + It must contain at least 5 characters and may not exceed 256 characters. + maxLength: 256 + minLength: 5 + type: string + required: + - lastGatherSeconds + - name + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + insightsReport: + description: |- + insightsReport provides general Insights analysis results. + When omitted, this means no data gathering has taken place yet or the + corresponding Insights analysis (identified by "insightsRequestID") is not available. + properties: + downloadedTime: + description: |- + downloadedTime is an optional time when the last Insights report was downloaded. + An empty value means that there has not been any Insights report downloaded yet and + it usually appears in disconnected clusters (or clusters when the Insights data gathering is disabled). + format: date-time + type: string + healthChecks: + description: |- + healthChecks provides basic information about active Insights health checks + in a cluster. + items: + description: healthCheck represents an Insights health check + attributes. + properties: + advisorURI: + description: |- + advisorURI is required field that provides the URL link to the Insights Advisor. + The link must be a valid HTTPS URL and the maximum length is 2048 characters. + maxLength: 2048 + type: string + x-kubernetes-validations: + - message: advisorURI must be a valid HTTPS URL (e.g., https://example.com) + rule: isURL(self) && url(self).getScheme() == "https" + description: + description: |- + description is required field that provides basic description of the healtcheck. + It must contain at least 10 characters and may not exceed 2048 characters. + maxLength: 2048 + minLength: 10 + type: string + totalRisk: + description: |- + totalRisk is the required field of the healthcheck. + It is indicator of the total risk posed by the detected issue; combination of impact and likelihood. + Allowed values are Low, Medium, Important and Critical. + The value represents the severity of the issue. + enum: + - Low + - Moderate + - Important + - Critical + type: string + required: + - advisorURI + - description + - totalRisk + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - advisorURI + - totalRisk + - description + x-kubernetes-list-type: map + uri: + description: |- + uri is optional field that provides the URL link from which the report was downloaded. + The link must be a valid HTTPS URL and the maximum length is 2048 characters. + maxLength: 2048 + type: string + x-kubernetes-validations: + - message: URI must be a valid HTTPS URL (e.g., https://example.com) + rule: isURL(self) && url(self).getScheme() == "https" + type: object + insightsRequestID: + description: |- + insightsRequestID is an optional Insights request ID to track the status of the Insights analysis (in console.redhat.com processing pipeline) for the corresponding Insights data archive. + It may not exceed 256 characters and is immutable once set. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: insightsRequestID is immutable once set + rule: self == oldSelf + relatedObjects: + description: |- + relatedObjects is an optional list of resources which are useful when debugging or inspecting the data gathering Pod + It may not exceed 100 items and must not contain duplicates. + items: + description: ObjectReference contains enough information to let + you inspect or modify the referred object. + properties: + group: + description: |- + group is required field that specifies the API Group of the Resource. + Enter empty string for the core group. + This value is empty or it should follow the DNS1123 subdomain format. + 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. + Example: "", "apps", "build.openshift.io", etc. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: self.size() == 0 || !format.dns1123Subdomain().validate(self).hasValue() + name: + description: |- + name is required field that specifies the referent that follows the DNS1123 subdomain format. + 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. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' + namespace: + description: |- + namespace if required field of the referent that follows the DNS1123 labels format. + It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens + maxLength: 63 + type: string + x-kubernetes-validations: + - message: the value must consist of only lowercase alphanumeric + characters and hyphens + rule: '!format.dns1123Label().validate(self).hasValue()' + resource: + description: |- + resource is required field of the type that is being referenced. + It is normally the plural form of the resource kind in lowercase. + It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens + Example: "deployments", "deploymentconfigs", "pods", etc. + maxLength: 63 + type: string + x-kubernetes-validations: + - message: the value must consist of only lowercase alphanumeric + characters and hyphens + rule: '!format.dns1123Label().validate(self).hasValue()' + required: + - group + - name + - namespace + - resource + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + - namespace + x-kubernetes-list-type: map + startTime: + description: startTime is the time when Insights data gathering started. + format: date-time + type: string + x-kubernetes-validations: + - message: startTime is immutable once set + rule: self == oldSelf + type: object + x-kubernetes-validations: + - message: cannot remove insightsRequestID attribute from status + rule: (!has(oldSelf.insightsRequestID) || has(self.insightsRequestID)) + - message: cannot remove startTime attribute from status + rule: (!has(oldSelf.startTime) || has(self.startTime)) + - message: cannot remove finishTime attribute from status + rule: (!has(oldSelf.finishTime) || has(self.finishTime)) + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/insights/v1alpha2/zz_generated.crd-manifests/0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml b/insights/v1alpha2/zz_generated.crd-manifests/0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..e805f2fdd8c --- /dev/null +++ b/insights/v1alpha2/zz_generated.crd-manifests/0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml @@ -0,0 +1,604 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2248 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: TechPreviewNoUpgrade + name: datagathers.insights.openshift.io +spec: + group: insights.openshift.io + names: + kind: DataGather + listKind: DataGatherList + plural: datagathers + singular: datagather + scope: Cluster + versions: + - additionalPrinterColumns: + - description: DataGather job state + jsonPath: .status.dataGatherState + name: State + type: string + - description: DataGather start time + jsonPath: .status.startTime + name: StartTime + type: date + - description: DataGather finish time + jsonPath: .status.finishTime + name: FinishTime + type: date + name: v1alpha2 + schema: + openAPIV3Schema: + description: |- + DataGather provides data gather configuration options and status for the particular Insights data gathering. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec holds user settable values for configuration + properties: + dataPolicy: + description: |- + dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. + It may not exceed 2 items and must not contain duplicates. + Valid values are ObfuscateNetworking and WorkloadNames. + When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. + 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. + When omitted no obfuscation is applied. + items: + description: dataPolicyOption declares valid data policy types + enum: + - ObfuscateNetworking + - WorkloadNames + type: string + maxItems: 2 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: dataPolicy items must be unique + rule: self.all(x, self.exists_one(y, x == y)) + gatherers: + description: |- + gatherers is an optional field that specifies the configuration of the gatherers. + If omitted, all gatherers will be run. + properties: + custom: + description: |- + custom provides gathering configuration. + It is required when mode is Custom, and forbidden otherwise. + Custom configuration allows user to disable only a subset of gatherers. + Gatherers that are not explicitly disabled in custom configuration will run. + properties: + configs: + description: |- + configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. + It may not exceed 100 items and each gatherer can be present only once. + It is possible to disable an entire set of gatherers while allowing a specific function within that set. + The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. + Run the following command to get the names of last active gatherers: + "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" + items: + description: gathererConfig allows to configure specific + gatherers + properties: + name: + description: |- + name is the required name of a specific gatherer + It may not exceed 256 characters. + The format for a gatherer name is: {gatherer}/{function} where the function is optional. + Gatherer consists of a lowercase letters only that may include underscores (_). + Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). + The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. + Run the following command to get the names of last active gatherers: + "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" + maxLength: 256 + type: string + x-kubernetes-validations: + - 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 + rule: self.matches("^[a-z]+[_a-z]*[a-z]([/a-z][_a-z]*)?[a-z]$") + state: + description: |- + state is a required field that allows you to configure specific gatherer. Valid values are "Enabled" and "Disabled". + When set to Enabled the gatherer will run. + When set to Disabled the gatherer will not run. + enum: + - Enabled + - Disabled + type: string + required: + - name + - state + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - configs + type: object + mode: + description: |- + mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. + When set to All, all gatherers wil run and gather data. + When set to None, all gatherers will be disabled and no data will be gathered. + When set to Custom, the custom configuration from the custom field will be applied. + enum: + - All + - None + - Custom + type: string + required: + - mode + type: object + x-kubernetes-validations: + - message: custom is required when mode is Custom, and forbidden otherwise + rule: 'has(self.mode) && self.mode == ''Custom'' ? has(self.custom) + : !has(self.custom)' + storage: + description: |- + storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. + If omitted, the gathering job will use ephemeral storage. + properties: + persistentVolume: + description: |- + persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. + The PersistentVolume must be created in the openshift-insights namespace. + properties: + claim: + description: |- + claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. + The PersistentVolumeClaim must be created in the openshift-insights namespace. + properties: + name: + description: |- + name is a string that follows the DNS1123 subdomain format. + 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. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist + of lower case alphanumeric characters, '-' or '.', + and must start and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' + required: + - name + type: object + mountPath: + description: |- + mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default mount path is /var/lib/insights-operator + The path may not exceed 1024 characters and must not contain a colon. + maxLength: 1024 + type: string + x-kubernetes-validations: + - message: mountPath must not contain a colon + rule: '!self.contains('':'')' + required: + - claim + type: object + type: + description: |- + type is a required field that specifies the type of storage that will be used to store the Insights data archive. + Valid values are "PersistentVolume" and "Ephemeral". + When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. + When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is + defined by the PersistentVolume field. + enum: + - PersistentVolume + - Ephemeral + type: string + required: + - type + type: object + x-kubernetes-validations: + - message: persistentVolume is required when type is PersistentVolume, + and forbidden otherwise + rule: 'has(self.type) && self.type == ''PersistentVolume'' ? has(self.persistentVolume) + : !has(self.persistentVolume)' + type: object + status: + description: status holds observed values from the cluster. They may not + be overridden. + properties: + conditions: + description: |- + conditions is an optional field that provides details on the status of the gatherer job. + It may not exceed 100 items and must not contain duplicates. + + The current condition types are DataUploaded, DataRecorded, DataProcessed, RemoteConfigurationNotAvailable, RemoteConfigurationInvalid + + The DataUploaded condition is used to represent whether or not the archive was successfully uploaded for further processing. + When it has a status of True and a reason of Succeeded, the archive was successfully uploaded. + When it has a status of Unknown and a reason of NoUploadYet, the upload has not occurred, or there was no data to upload. + When it has a status of False and a reason Failed, the upload failed. The accompanying message will include the specific error encountered. + + The DataRecorded condition is used to represent whether or not the archive was successfully recorded. + When it has a status of True and a reason of Succeeded, the archive was recorded successfully. + When it has a status of Unknown and a reason of NoDataGatheringYet, the data gathering process has not started yet. + When it has a status of False and a reason of RecordingFailed, the recording failed and a message will include the specific error encountered. + + The DataProcessed condition is used to represent whether or not the archive was processed by the processing service. + When it has a status of True and a reason of Processed, the data was processed successfully. + When it has a status of Unknown and a reason of NothingToProcessYet, there is no data to process at the moment. + When it has a status of False and a reason of Failure, processing failed and a message will include the specific error encountered. + + The RemoteConfigurationAvailable condition is used to represent whether the remote configuration is available. + When it has a status of Unknown and a reason of Unknown or RemoteConfigNotRequestedYet, the state of the remote configuration is unknown—typically at startup. + When it has a status of True and a reason of Succeeded, the configuration is available. + When it has a status of False and a reason of NoToken, the configuration was disabled by removing the cloud.openshift.com field from the pull secret. + When it has a status of False and a reason of DisabledByConfiguration, the configuration was disabled in insightsdatagather.config.openshift.io. + + The RemoteConfigurationValid condition is used to represent whether the remote configuration is valid. + When it has a status of Unknown and a reason of Unknown or NoValidationYet, the validity of the remote configuration is unknown—typically at startup. + When it has a status of True and a reason of Succeeded, the configuration is valid. + When it has a status of False and a reason of Invalid, the configuration is invalid. + + The Progressing condition is used to represent the phase of gathering + When it has a status of False and the reason is DataGatherPending, the gathering has not started yet. + When it has a status of True and reason is Gathering, the gathering is running. + When it has a status of False and reason is GatheringSucceeded, the gathering succesfully finished. + When it has a status of False and reason is GatheringFailed, the gathering failed. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + finishTime: + description: finishTime is the time when Insights data gathering finished. + format: date-time + type: string + x-kubernetes-validations: + - message: finishTime is immutable once set + rule: self == oldSelf + gatherers: + description: gatherers is a list of active gatherers (and their statuses) + in the last gathering. + items: + description: |- + gathererStatus represents information about a particular + data gatherer. + properties: + conditions: + description: |- + conditions provide details on the status of each gatherer. + + The current condition type is DataGathered + + The DataGathered condition is used to represent whether or not the data was gathered by a gatherer specified by name. + When it has a status of True and a reason of GatheredOK, the data has been successfully gathered as expected. + When it has a status of False and a reason of NoData, no data was gathered—for example, when the resource is not present in the cluster. + When it has a status of False and a reason of GatherError, an error occurred and no data was gathered. + When it has a status of False and a reason of GatherPanic, a panic occurred during gathering and no data was collected. + When it has a status of False and a reason of GatherWithErrorReason, data was partially gathered or gathered with an error message. + items: + description: Condition contains details for one aspect of + the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + lastGatherSeconds: + description: lastGatherSeconds is required field that represents + the time spent gathering in seconds + format: int32 + minimum: 0 + type: integer + name: + description: |- + name is the required name of the gatherer. + It must contain at least 5 characters and may not exceed 256 characters. + maxLength: 256 + minLength: 5 + type: string + required: + - lastGatherSeconds + - name + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + insightsReport: + description: |- + insightsReport provides general Insights analysis results. + When omitted, this means no data gathering has taken place yet or the + corresponding Insights analysis (identified by "insightsRequestID") is not available. + properties: + downloadedTime: + description: |- + downloadedTime is an optional time when the last Insights report was downloaded. + An empty value means that there has not been any Insights report downloaded yet and + it usually appears in disconnected clusters (or clusters when the Insights data gathering is disabled). + format: date-time + type: string + healthChecks: + description: |- + healthChecks provides basic information about active Insights health checks + in a cluster. + items: + description: healthCheck represents an Insights health check + attributes. + properties: + advisorURI: + description: |- + advisorURI is required field that provides the URL link to the Insights Advisor. + The link must be a valid HTTPS URL and the maximum length is 2048 characters. + maxLength: 2048 + type: string + x-kubernetes-validations: + - message: advisorURI must be a valid HTTPS URL (e.g., https://example.com) + rule: isURL(self) && url(self).getScheme() == "https" + description: + description: |- + description is required field that provides basic description of the healtcheck. + It must contain at least 10 characters and may not exceed 2048 characters. + maxLength: 2048 + minLength: 10 + type: string + totalRisk: + description: |- + totalRisk is the required field of the healthcheck. + It is indicator of the total risk posed by the detected issue; combination of impact and likelihood. + Allowed values are Low, Medium, Important and Critical. + The value represents the severity of the issue. + enum: + - Low + - Moderate + - Important + - Critical + type: string + required: + - advisorURI + - description + - totalRisk + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - advisorURI + - totalRisk + - description + x-kubernetes-list-type: map + uri: + description: |- + uri is optional field that provides the URL link from which the report was downloaded. + The link must be a valid HTTPS URL and the maximum length is 2048 characters. + maxLength: 2048 + type: string + x-kubernetes-validations: + - message: URI must be a valid HTTPS URL (e.g., https://example.com) + rule: isURL(self) && url(self).getScheme() == "https" + type: object + insightsRequestID: + description: |- + insightsRequestID is an optional Insights request ID to track the status of the Insights analysis (in console.redhat.com processing pipeline) for the corresponding Insights data archive. + It may not exceed 256 characters and is immutable once set. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: insightsRequestID is immutable once set + rule: self == oldSelf + relatedObjects: + description: |- + relatedObjects is an optional list of resources which are useful when debugging or inspecting the data gathering Pod + It may not exceed 100 items and must not contain duplicates. + items: + description: ObjectReference contains enough information to let + you inspect or modify the referred object. + properties: + group: + description: |- + group is required field that specifies the API Group of the Resource. + Enter empty string for the core group. + This value is empty or it should follow the DNS1123 subdomain format. + 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. + Example: "", "apps", "build.openshift.io", etc. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: self.size() == 0 || !format.dns1123Subdomain().validate(self).hasValue() + name: + description: |- + name is required field that specifies the referent that follows the DNS1123 subdomain format. + 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. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' + namespace: + description: |- + namespace if required field of the referent that follows the DNS1123 labels format. + It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens + maxLength: 63 + type: string + x-kubernetes-validations: + - message: the value must consist of only lowercase alphanumeric + characters and hyphens + rule: '!format.dns1123Label().validate(self).hasValue()' + resource: + description: |- + resource is required field of the type that is being referenced. + It is normally the plural form of the resource kind in lowercase. + It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens + Example: "deployments", "deploymentconfigs", "pods", etc. + maxLength: 63 + type: string + x-kubernetes-validations: + - message: the value must consist of only lowercase alphanumeric + characters and hyphens + rule: '!format.dns1123Label().validate(self).hasValue()' + required: + - group + - name + - namespace + - resource + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + - namespace + x-kubernetes-list-type: map + startTime: + description: startTime is the time when Insights data gathering started. + format: date-time + type: string + x-kubernetes-validations: + - message: startTime is immutable once set + rule: self == oldSelf + type: object + x-kubernetes-validations: + - message: cannot remove insightsRequestID attribute from status + rule: (!has(oldSelf.insightsRequestID) || has(self.insightsRequestID)) + - message: cannot remove startTime attribute from status + rule: (!has(oldSelf.startTime) || has(self.startTime)) + - message: cannot remove finishTime attribute from status + rule: (!has(oldSelf.finishTime) || has(self.finishTime)) + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/insights/v1alpha2/zz_generated.crd-manifests/doc.go b/insights/v1alpha2/zz_generated.crd-manifests/doc.go new file mode 100644 index 00000000000..3d88d40e4d5 --- /dev/null +++ b/insights/v1alpha2/zz_generated.crd-manifests/doc.go @@ -0,0 +1 @@ +package insights_v1alpha2_crdmanifests diff --git a/insights/v1alpha2/zz_generated.deepcopy.go b/insights/v1alpha2/zz_generated.deepcopy.go new file mode 100644 index 00000000000..78209dc7c17 --- /dev/null +++ b/insights/v1alpha2/zz_generated.deepcopy.go @@ -0,0 +1,339 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by codegen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Custom) DeepCopyInto(out *Custom) { + *out = *in + if in.Configs != nil { + in, out := &in.Configs, &out.Configs + *out = make([]GathererConfig, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Custom. +func (in *Custom) DeepCopy() *Custom { + if in == nil { + return nil + } + out := new(Custom) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataGather) DeepCopyInto(out *DataGather) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataGather. +func (in *DataGather) DeepCopy() *DataGather { + if in == nil { + return nil + } + out := new(DataGather) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DataGather) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataGatherList) DeepCopyInto(out *DataGatherList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DataGather, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataGatherList. +func (in *DataGatherList) DeepCopy() *DataGatherList { + if in == nil { + return nil + } + out := new(DataGatherList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DataGatherList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataGatherSpec) DeepCopyInto(out *DataGatherSpec) { + *out = *in + if in.DataPolicy != nil { + in, out := &in.DataPolicy, &out.DataPolicy + *out = make([]DataPolicyOption, len(*in)) + copy(*out, *in) + } + if in.Gatherers != nil { + in, out := &in.Gatherers, &out.Gatherers + *out = new(Gatherers) + (*in).DeepCopyInto(*out) + } + if in.Storage != nil { + in, out := &in.Storage, &out.Storage + *out = new(Storage) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataGatherSpec. +func (in *DataGatherSpec) DeepCopy() *DataGatherSpec { + if in == nil { + return nil + } + out := new(DataGatherSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataGatherStatus) DeepCopyInto(out *DataGatherStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Gatherers != nil { + in, out := &in.Gatherers, &out.Gatherers + *out = make([]GathererStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = (*in).DeepCopy() + } + if in.FinishTime != nil { + in, out := &in.FinishTime, &out.FinishTime + *out = (*in).DeepCopy() + } + if in.RelatedObjects != nil { + in, out := &in.RelatedObjects, &out.RelatedObjects + *out = make([]ObjectReference, len(*in)) + copy(*out, *in) + } + in.InsightsReport.DeepCopyInto(&out.InsightsReport) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataGatherStatus. +func (in *DataGatherStatus) DeepCopy() *DataGatherStatus { + if in == nil { + return nil + } + out := new(DataGatherStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GathererConfig) DeepCopyInto(out *GathererConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GathererConfig. +func (in *GathererConfig) DeepCopy() *GathererConfig { + if in == nil { + return nil + } + out := new(GathererConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GathererStatus) DeepCopyInto(out *GathererStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GathererStatus. +func (in *GathererStatus) DeepCopy() *GathererStatus { + if in == nil { + return nil + } + out := new(GathererStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Gatherers) DeepCopyInto(out *Gatherers) { + *out = *in + if in.Custom != nil { + in, out := &in.Custom, &out.Custom + *out = new(Custom) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gatherers. +func (in *Gatherers) DeepCopy() *Gatherers { + if in == nil { + return nil + } + out := new(Gatherers) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HealthCheck) DeepCopyInto(out *HealthCheck) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheck. +func (in *HealthCheck) DeepCopy() *HealthCheck { + if in == nil { + return nil + } + out := new(HealthCheck) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InsightsReport) DeepCopyInto(out *InsightsReport) { + *out = *in + if in.DownloadedTime != nil { + in, out := &in.DownloadedTime, &out.DownloadedTime + *out = (*in).DeepCopy() + } + if in.HealthChecks != nil { + in, out := &in.HealthChecks, &out.HealthChecks + *out = make([]HealthCheck, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsReport. +func (in *InsightsReport) DeepCopy() *InsightsReport { + if in == nil { + return nil + } + out := new(InsightsReport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectReference) DeepCopyInto(out *ObjectReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference. +func (in *ObjectReference) DeepCopy() *ObjectReference { + if in == nil { + return nil + } + out := new(ObjectReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PersistentVolumeClaimReference) DeepCopyInto(out *PersistentVolumeClaimReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimReference. +func (in *PersistentVolumeClaimReference) DeepCopy() *PersistentVolumeClaimReference { + if in == nil { + return nil + } + out := new(PersistentVolumeClaimReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PersistentVolumeConfig) DeepCopyInto(out *PersistentVolumeConfig) { + *out = *in + out.Claim = in.Claim + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeConfig. +func (in *PersistentVolumeConfig) DeepCopy() *PersistentVolumeConfig { + if in == nil { + return nil + } + out := new(PersistentVolumeConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Storage) DeepCopyInto(out *Storage) { + *out = *in + if in.PersistentVolume != nil { + in, out := &in.PersistentVolume, &out.PersistentVolume + *out = new(PersistentVolumeConfig) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage. +func (in *Storage) DeepCopy() *Storage { + if in == nil { + return nil + } + out := new(Storage) + in.DeepCopyInto(out) + return out +} diff --git a/insights/v1alpha2/zz_generated.featuregated-crd-manifests.yaml b/insights/v1alpha2/zz_generated.featuregated-crd-manifests.yaml new file mode 100644 index 00000000000..939b42075c8 --- /dev/null +++ b/insights/v1alpha2/zz_generated.featuregated-crd-manifests.yaml @@ -0,0 +1,35 @@ +datagathers.insights.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/2248 + CRDName: datagathers.insights.openshift.io + Capability: "" + Category: "" + FeatureGates: + - InsightsOnDemandDataGather + FilenameOperatorName: insights + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_10" + GroupName: insights.openshift.io + HasStatus: true + KindName: DataGather + Labels: {} + PluralName: datagathers + PrinterColumns: + - description: DataGather job state + jsonPath: .status.dataGatherState + name: State + type: string + - description: DataGather start time + jsonPath: .status.startTime + name: StartTime + type: date + - description: DataGather finish time + jsonPath: .status.finishTime + name: FinishTime + type: date + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: + - InsightsOnDemandDataGather + Version: v1alpha2 + diff --git a/insights/v1alpha2/zz_generated.featuregated-crd-manifests/datagathers.insights.openshift.io/InsightsOnDemandDataGather.yaml b/insights/v1alpha2/zz_generated.featuregated-crd-manifests/datagathers.insights.openshift.io/InsightsOnDemandDataGather.yaml new file mode 100644 index 00000000000..c7e57b363b8 --- /dev/null +++ b/insights/v1alpha2/zz_generated.featuregated-crd-manifests/datagathers.insights.openshift.io/InsightsOnDemandDataGather.yaml @@ -0,0 +1,604 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2248 + api.openshift.io/filename-cvo-runlevel: "0000_10" + api.openshift.io/filename-operator: insights + api.openshift.io/filename-ordering: "01" + feature-gate.release.openshift.io/InsightsOnDemandDataGather: "true" + name: datagathers.insights.openshift.io +spec: + group: insights.openshift.io + names: + kind: DataGather + listKind: DataGatherList + plural: datagathers + singular: datagather + scope: Cluster + versions: + - additionalPrinterColumns: + - description: DataGather job state + jsonPath: .status.dataGatherState + name: State + type: string + - description: DataGather start time + jsonPath: .status.startTime + name: StartTime + type: date + - description: DataGather finish time + jsonPath: .status.finishTime + name: FinishTime + type: date + name: v1alpha2 + schema: + openAPIV3Schema: + description: |- + DataGather provides data gather configuration options and status for the particular Insights data gathering. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec holds user settable values for configuration + properties: + dataPolicy: + description: |- + dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. + It may not exceed 2 items and must not contain duplicates. + Valid values are ObfuscateNetworking and WorkloadNames. + When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. + 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. + When omitted no obfuscation is applied. + items: + description: dataPolicyOption declares valid data policy types + enum: + - ObfuscateNetworking + - WorkloadNames + type: string + maxItems: 2 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: dataPolicy items must be unique + rule: self.all(x, self.exists_one(y, x == y)) + gatherers: + description: |- + gatherers is an optional field that specifies the configuration of the gatherers. + If omitted, all gatherers will be run. + properties: + custom: + description: |- + custom provides gathering configuration. + It is required when mode is Custom, and forbidden otherwise. + Custom configuration allows user to disable only a subset of gatherers. + Gatherers that are not explicitly disabled in custom configuration will run. + properties: + configs: + description: |- + configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. + It may not exceed 100 items and each gatherer can be present only once. + It is possible to disable an entire set of gatherers while allowing a specific function within that set. + The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. + Run the following command to get the names of last active gatherers: + "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" + items: + description: gathererConfig allows to configure specific + gatherers + properties: + name: + description: |- + name is the required name of a specific gatherer + It may not exceed 256 characters. + The format for a gatherer name is: {gatherer}/{function} where the function is optional. + Gatherer consists of a lowercase letters only that may include underscores (_). + Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). + The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. + Run the following command to get the names of last active gatherers: + "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" + maxLength: 256 + type: string + x-kubernetes-validations: + - 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 + rule: self.matches("^[a-z]+[_a-z]*[a-z]([/a-z][_a-z]*)?[a-z]$") + state: + description: |- + state is a required field that allows you to configure specific gatherer. Valid values are "Enabled" and "Disabled". + When set to Enabled the gatherer will run. + When set to Disabled the gatherer will not run. + enum: + - Enabled + - Disabled + type: string + required: + - name + - state + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - configs + type: object + mode: + description: |- + mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. + When set to All, all gatherers wil run and gather data. + When set to None, all gatherers will be disabled and no data will be gathered. + When set to Custom, the custom configuration from the custom field will be applied. + enum: + - All + - None + - Custom + type: string + required: + - mode + type: object + x-kubernetes-validations: + - message: custom is required when mode is Custom, and forbidden otherwise + rule: 'has(self.mode) && self.mode == ''Custom'' ? has(self.custom) + : !has(self.custom)' + storage: + description: |- + storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. + If omitted, the gathering job will use ephemeral storage. + properties: + persistentVolume: + description: |- + persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. + The PersistentVolume must be created in the openshift-insights namespace. + properties: + claim: + description: |- + claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. + The PersistentVolumeClaim must be created in the openshift-insights namespace. + properties: + name: + description: |- + name is a string that follows the DNS1123 subdomain format. + 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. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist + of lower case alphanumeric characters, '-' or '.', + and must start and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' + required: + - name + type: object + mountPath: + description: |- + mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default mount path is /var/lib/insights-operator + The path may not exceed 1024 characters and must not contain a colon. + maxLength: 1024 + type: string + x-kubernetes-validations: + - message: mountPath must not contain a colon + rule: '!self.contains('':'')' + required: + - claim + type: object + type: + description: |- + type is a required field that specifies the type of storage that will be used to store the Insights data archive. + Valid values are "PersistentVolume" and "Ephemeral". + When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. + When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is + defined by the PersistentVolume field. + enum: + - PersistentVolume + - Ephemeral + type: string + required: + - type + type: object + x-kubernetes-validations: + - message: persistentVolume is required when type is PersistentVolume, + and forbidden otherwise + rule: 'has(self.type) && self.type == ''PersistentVolume'' ? has(self.persistentVolume) + : !has(self.persistentVolume)' + type: object + status: + description: status holds observed values from the cluster. They may not + be overridden. + properties: + conditions: + description: |- + conditions is an optional field that provides details on the status of the gatherer job. + It may not exceed 100 items and must not contain duplicates. + + The current condition types are DataUploaded, DataRecorded, DataProcessed, RemoteConfigurationNotAvailable, RemoteConfigurationInvalid + + The DataUploaded condition is used to represent whether or not the archive was successfully uploaded for further processing. + When it has a status of True and a reason of Succeeded, the archive was successfully uploaded. + When it has a status of Unknown and a reason of NoUploadYet, the upload has not occurred, or there was no data to upload. + When it has a status of False and a reason Failed, the upload failed. The accompanying message will include the specific error encountered. + + The DataRecorded condition is used to represent whether or not the archive was successfully recorded. + When it has a status of True and a reason of Succeeded, the archive was recorded successfully. + When it has a status of Unknown and a reason of NoDataGatheringYet, the data gathering process has not started yet. + When it has a status of False and a reason of RecordingFailed, the recording failed and a message will include the specific error encountered. + + The DataProcessed condition is used to represent whether or not the archive was processed by the processing service. + When it has a status of True and a reason of Processed, the data was processed successfully. + When it has a status of Unknown and a reason of NothingToProcessYet, there is no data to process at the moment. + When it has a status of False and a reason of Failure, processing failed and a message will include the specific error encountered. + + The RemoteConfigurationAvailable condition is used to represent whether the remote configuration is available. + When it has a status of Unknown and a reason of Unknown or RemoteConfigNotRequestedYet, the state of the remote configuration is unknown—typically at startup. + When it has a status of True and a reason of Succeeded, the configuration is available. + When it has a status of False and a reason of NoToken, the configuration was disabled by removing the cloud.openshift.com field from the pull secret. + When it has a status of False and a reason of DisabledByConfiguration, the configuration was disabled in insightsdatagather.config.openshift.io. + + The RemoteConfigurationValid condition is used to represent whether the remote configuration is valid. + When it has a status of Unknown and a reason of Unknown or NoValidationYet, the validity of the remote configuration is unknown—typically at startup. + When it has a status of True and a reason of Succeeded, the configuration is valid. + When it has a status of False and a reason of Invalid, the configuration is invalid. + + The Progressing condition is used to represent the phase of gathering + When it has a status of False and the reason is DataGatherPending, the gathering has not started yet. + When it has a status of True and reason is Gathering, the gathering is running. + When it has a status of False and reason is GatheringSucceeded, the gathering succesfully finished. + When it has a status of False and reason is GatheringFailed, the gathering failed. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + finishTime: + description: finishTime is the time when Insights data gathering finished. + format: date-time + type: string + x-kubernetes-validations: + - message: finishTime is immutable once set + rule: self == oldSelf + gatherers: + description: gatherers is a list of active gatherers (and their statuses) + in the last gathering. + items: + description: |- + gathererStatus represents information about a particular + data gatherer. + properties: + conditions: + description: |- + conditions provide details on the status of each gatherer. + + The current condition type is DataGathered + + The DataGathered condition is used to represent whether or not the data was gathered by a gatherer specified by name. + When it has a status of True and a reason of GatheredOK, the data has been successfully gathered as expected. + When it has a status of False and a reason of NoData, no data was gathered—for example, when the resource is not present in the cluster. + When it has a status of False and a reason of GatherError, an error occurred and no data was gathered. + When it has a status of False and a reason of GatherPanic, a panic occurred during gathering and no data was collected. + When it has a status of False and a reason of GatherWithErrorReason, data was partially gathered or gathered with an error message. + items: + description: Condition contains details for one aspect of + the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + lastGatherSeconds: + description: lastGatherSeconds is required field that represents + the time spent gathering in seconds + format: int32 + minimum: 0 + type: integer + name: + description: |- + name is the required name of the gatherer. + It must contain at least 5 characters and may not exceed 256 characters. + maxLength: 256 + minLength: 5 + type: string + required: + - lastGatherSeconds + - name + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + insightsReport: + description: |- + insightsReport provides general Insights analysis results. + When omitted, this means no data gathering has taken place yet or the + corresponding Insights analysis (identified by "insightsRequestID") is not available. + properties: + downloadedTime: + description: |- + downloadedTime is an optional time when the last Insights report was downloaded. + An empty value means that there has not been any Insights report downloaded yet and + it usually appears in disconnected clusters (or clusters when the Insights data gathering is disabled). + format: date-time + type: string + healthChecks: + description: |- + healthChecks provides basic information about active Insights health checks + in a cluster. + items: + description: healthCheck represents an Insights health check + attributes. + properties: + advisorURI: + description: |- + advisorURI is required field that provides the URL link to the Insights Advisor. + The link must be a valid HTTPS URL and the maximum length is 2048 characters. + maxLength: 2048 + type: string + x-kubernetes-validations: + - message: advisorURI must be a valid HTTPS URL (e.g., https://example.com) + rule: isURL(self) && url(self).getScheme() == "https" + description: + description: |- + description is required field that provides basic description of the healtcheck. + It must contain at least 10 characters and may not exceed 2048 characters. + maxLength: 2048 + minLength: 10 + type: string + totalRisk: + description: |- + totalRisk is the required field of the healthcheck. + It is indicator of the total risk posed by the detected issue; combination of impact and likelihood. + Allowed values are Low, Medium, Important and Critical. + The value represents the severity of the issue. + enum: + - Low + - Moderate + - Important + - Critical + type: string + required: + - advisorURI + - description + - totalRisk + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - advisorURI + - totalRisk + - description + x-kubernetes-list-type: map + uri: + description: |- + uri is optional field that provides the URL link from which the report was downloaded. + The link must be a valid HTTPS URL and the maximum length is 2048 characters. + maxLength: 2048 + type: string + x-kubernetes-validations: + - message: URI must be a valid HTTPS URL (e.g., https://example.com) + rule: isURL(self) && url(self).getScheme() == "https" + type: object + insightsRequestID: + description: |- + insightsRequestID is an optional Insights request ID to track the status of the Insights analysis (in console.redhat.com processing pipeline) for the corresponding Insights data archive. + It may not exceed 256 characters and is immutable once set. + maxLength: 256 + type: string + x-kubernetes-validations: + - message: insightsRequestID is immutable once set + rule: self == oldSelf + relatedObjects: + description: |- + relatedObjects is an optional list of resources which are useful when debugging or inspecting the data gathering Pod + It may not exceed 100 items and must not contain duplicates. + items: + description: ObjectReference contains enough information to let + you inspect or modify the referred object. + properties: + group: + description: |- + group is required field that specifies the API Group of the Resource. + Enter empty string for the core group. + This value is empty or it should follow the DNS1123 subdomain format. + 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. + Example: "", "apps", "build.openshift.io", etc. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: self.size() == 0 || !format.dns1123Subdomain().validate(self).hasValue() + name: + description: |- + name is required field that specifies the referent that follows the DNS1123 subdomain format. + 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. + maxLength: 253 + type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' + namespace: + description: |- + namespace if required field of the referent that follows the DNS1123 labels format. + It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens + maxLength: 63 + type: string + x-kubernetes-validations: + - message: the value must consist of only lowercase alphanumeric + characters and hyphens + rule: '!format.dns1123Label().validate(self).hasValue()' + resource: + description: |- + resource is required field of the type that is being referenced. + It is normally the plural form of the resource kind in lowercase. + It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens + Example: "deployments", "deploymentconfigs", "pods", etc. + maxLength: 63 + type: string + x-kubernetes-validations: + - message: the value must consist of only lowercase alphanumeric + characters and hyphens + rule: '!format.dns1123Label().validate(self).hasValue()' + required: + - group + - name + - namespace + - resource + type: object + maxItems: 100 + type: array + x-kubernetes-list-map-keys: + - name + - namespace + x-kubernetes-list-type: map + startTime: + description: startTime is the time when Insights data gathering started. + format: date-time + type: string + x-kubernetes-validations: + - message: startTime is immutable once set + rule: self == oldSelf + type: object + x-kubernetes-validations: + - message: cannot remove insightsRequestID attribute from status + rule: (!has(oldSelf.insightsRequestID) || has(self.insightsRequestID)) + - message: cannot remove startTime attribute from status + rule: (!has(oldSelf.startTime) || has(self.startTime)) + - message: cannot remove finishTime attribute from status + rule: (!has(oldSelf.finishTime) || has(self.finishTime)) + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/insights/v1alpha2/zz_generated.swagger_doc_generated.go b/insights/v1alpha2/zz_generated.swagger_doc_generated.go new file mode 100644 index 00000000000..203f8141254 --- /dev/null +++ b/insights/v1alpha2/zz_generated.swagger_doc_generated.go @@ -0,0 +1,164 @@ +package v1alpha2 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_Custom = map[string]string{ + "": "custom provides the custom configuration of gatherers", + "configs": "configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. It may not exceed 100 items and each gatherer can be present only once. It is possible to disable an entire set of gatherers while allowing a specific function within that set. The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. Run the following command to get the names of last active gatherers: \"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'\"", +} + +func (Custom) SwaggerDoc() map[string]string { + return map_Custom +} + +var map_DataGather = map[string]string{ + "": "\n\nDataGather provides data gather configuration options and status for the particular Insights data gathering.\n\nCompatibility 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.", + "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "spec holds user settable values for configuration", + "status": "status holds observed values from the cluster. They may not be overridden.", +} + +func (DataGather) SwaggerDoc() map[string]string { + return map_DataGather +} + +var map_DataGatherList = map[string]string{ + "": "DataGatherList is a collection of items\n\nCompatibility 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.", + "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "items contains a list of DataGather resources.", +} + +func (DataGatherList) SwaggerDoc() map[string]string { + return map_DataGatherList +} + +var map_DataGatherSpec = map[string]string{ + "": "DataGatherSpec contains the configuration for the DataGather.", + "dataPolicy": "dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. It may not exceed 2 items and must not contain duplicates. Valid values are ObfuscateNetworking and WorkloadNames. When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. 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. When omitted no obfuscation is applied.", + "gatherers": "gatherers is an optional field that specifies the configuration of the gatherers. If omitted, all gatherers will be run.", + "storage": "storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. If omitted, the gathering job will use ephemeral storage.", +} + +func (DataGatherSpec) SwaggerDoc() map[string]string { + return map_DataGatherSpec +} + +var map_DataGatherStatus = map[string]string{ + "": "DataGatherStatus contains information relating to the DataGather state.", + "conditions": "conditions is an optional field that provides details on the status of the gatherer job. It may not exceed 100 items and must not contain duplicates.\n\nThe current condition types are DataUploaded, DataRecorded, DataProcessed, RemoteConfigurationNotAvailable, RemoteConfigurationInvalid\n\nThe DataUploaded condition is used to represent whether or not the archive was successfully uploaded for further processing. When it has a status of True and a reason of Succeeded, the archive was successfully uploaded. When it has a status of Unknown and a reason of NoUploadYet, the upload has not occurred, or there was no data to upload. When it has a status of False and a reason Failed, the upload failed. The accompanying message will include the specific error encountered.\n\nThe DataRecorded condition is used to represent whether or not the archive was successfully recorded. When it has a status of True and a reason of Succeeded, the archive was recorded successfully. When it has a status of Unknown and a reason of NoDataGatheringYet, the data gathering process has not started yet. When it has a status of False and a reason of RecordingFailed, the recording failed and a message will include the specific error encountered.\n\nThe DataProcessed condition is used to represent whether or not the archive was processed by the processing service. When it has a status of True and a reason of Processed, the data was processed successfully. When it has a status of Unknown and a reason of NothingToProcessYet, there is no data to process at the moment. When it has a status of False and a reason of Failure, processing failed and a message will include the specific error encountered.\n\nThe RemoteConfigurationAvailable condition is used to represent whether the remote configuration is available. When it has a status of Unknown and a reason of Unknown or RemoteConfigNotRequestedYet, the state of the remote configuration is unknown—typically at startup. When it has a status of True and a reason of Succeeded, the configuration is available. When it has a status of False and a reason of NoToken, the configuration was disabled by removing the cloud.openshift.com field from the pull secret. When it has a status of False and a reason of DisabledByConfiguration, the configuration was disabled in insightsdatagather.config.openshift.io.\n\nThe RemoteConfigurationValid condition is used to represent whether the remote configuration is valid. When it has a status of Unknown and a reason of Unknown or NoValidationYet, the validity of the remote configuration is unknown—typically at startup. When it has a status of True and a reason of Succeeded, the configuration is valid. When it has a status of False and a reason of Invalid, the configuration is invalid.\n\nThe Progressing condition is used to represent the phase of gathering When it has a status of False and the reason is DataGatherPending, the gathering has not started yet. When it has a status of True and reason is Gathering, the gathering is running. When it has a status of False and reason is GatheringSucceeded, the gathering succesfully finished. When it has a status of False and reason is GatheringFailed, the gathering failed.", + "gatherers": "gatherers is a list of active gatherers (and their statuses) in the last gathering.", + "startTime": "startTime is the time when Insights data gathering started.", + "finishTime": "finishTime is the time when Insights data gathering finished.", + "relatedObjects": "relatedObjects is an optional list of resources which are useful when debugging or inspecting the data gathering Pod It may not exceed 100 items and must not contain duplicates.", + "insightsRequestID": "insightsRequestID is an optional Insights request ID to track the status of the Insights analysis (in console.redhat.com processing pipeline) for the corresponding Insights data archive. It may not exceed 256 characters and is immutable once set.", + "insightsReport": "insightsReport provides general Insights analysis results. When omitted, this means no data gathering has taken place yet or the corresponding Insights analysis (identified by \"insightsRequestID\") is not available.", +} + +func (DataGatherStatus) SwaggerDoc() map[string]string { + return map_DataGatherStatus +} + +var map_GathererConfig = map[string]string{ + "": "gathererConfig allows to configure specific gatherers", + "name": "name is the required name of a specific gatherer It may not exceed 256 characters. The format for a gatherer name is: {gatherer}/{function} where the function is optional. Gatherer consists of a lowercase letters only that may include underscores (_). Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. Run the following command to get the names of last active gatherers: \"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'\"", + "state": "state is a required field that allows you to configure specific gatherer. Valid values are \"Enabled\" and \"Disabled\". When set to Enabled the gatherer will run. When set to Disabled the gatherer will not run.", +} + +func (GathererConfig) SwaggerDoc() map[string]string { + return map_GathererConfig +} + +var map_GathererStatus = map[string]string{ + "": "gathererStatus represents information about a particular data gatherer.", + "conditions": "conditions provide details on the status of each gatherer.\n\nThe current condition type is DataGathered\n\nThe DataGathered condition is used to represent whether or not the data was gathered by a gatherer specified by name. When it has a status of True and a reason of GatheredOK, the data has been successfully gathered as expected. When it has a status of False and a reason of NoData, no data was gathered—for example, when the resource is not present in the cluster. When it has a status of False and a reason of GatherError, an error occurred and no data was gathered. When it has a status of False and a reason of GatherPanic, a panic occurred during gathering and no data was collected. When it has a status of False and a reason of GatherWithErrorReason, data was partially gathered or gathered with an error message.", + "name": "name is the required name of the gatherer. It must contain at least 5 characters and may not exceed 256 characters.", + "lastGatherSeconds": "lastGatherSeconds is required field that represents the time spent gathering in seconds", +} + +func (GathererStatus) SwaggerDoc() map[string]string { + return map_GathererStatus +} + +var map_Gatherers = map[string]string{ + "": "Gathereres specifies the configuration of the gatherers", + "mode": "mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. When set to All, all gatherers wil run and gather data. When set to None, all gatherers will be disabled and no data will be gathered. When set to Custom, the custom configuration from the custom field will be applied.", + "custom": "custom provides gathering configuration. It is required when mode is Custom, and forbidden otherwise. Custom configuration allows user to disable only a subset of gatherers. Gatherers that are not explicitly disabled in custom configuration will run.", +} + +func (Gatherers) SwaggerDoc() map[string]string { + return map_Gatherers +} + +var map_HealthCheck = map[string]string{ + "": "healthCheck represents an Insights health check attributes.", + "description": "description is required field that provides basic description of the healtcheck. It must contain at least 10 characters and may not exceed 2048 characters.", + "totalRisk": "totalRisk is the required field of the healthcheck. It is indicator of the total risk posed by the detected issue; combination of impact and likelihood. Allowed values are Low, Medium, Important and Critical. The value represents the severity of the issue.", + "advisorURI": "advisorURI is required field that provides the URL link to the Insights Advisor. The link must be a valid HTTPS URL and the maximum length is 2048 characters.", +} + +func (HealthCheck) SwaggerDoc() map[string]string { + return map_HealthCheck +} + +var map_InsightsReport = map[string]string{ + "": "insightsReport provides Insights health check report based on the most recently sent Insights data.", + "downloadedTime": "downloadedTime is an optional time when the last Insights report was downloaded. An empty value means that there has not been any Insights report downloaded yet and it usually appears in disconnected clusters (or clusters when the Insights data gathering is disabled).", + "healthChecks": "healthChecks provides basic information about active Insights health checks in a cluster.", + "uri": "uri is optional field that provides the URL link from which the report was downloaded. The link must be a valid HTTPS URL and the maximum length is 2048 characters.", +} + +func (InsightsReport) SwaggerDoc() map[string]string { + return map_InsightsReport +} + +var map_ObjectReference = map[string]string{ + "": "ObjectReference contains enough information to let you inspect or modify the referred object.", + "group": "group is required field that specifies the API Group of the Resource. Enter empty string for the core group. This value is empty or it should follow the DNS1123 subdomain format. 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. Example: \"\", \"apps\", \"build.openshift.io\", etc.", + "resource": "resource is required field of the type that is being referenced. It is normally the plural form of the resource kind in lowercase. It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens Example: \"deployments\", \"deploymentconfigs\", \"pods\", etc.", + "name": "name is required field that specifies the referent that follows the DNS1123 subdomain format. 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.", + "namespace": "namespace if required field of the referent that follows the DNS1123 labels format. It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens", +} + +func (ObjectReference) SwaggerDoc() map[string]string { + return map_ObjectReference +} + +var map_PersistentVolumeClaimReference = map[string]string{ + "": "persistentVolumeClaimReference is a reference to a PersistentVolumeClaim.", + "name": "name is a string that follows the DNS1123 subdomain format. 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.", +} + +func (PersistentVolumeClaimReference) SwaggerDoc() map[string]string { + return map_PersistentVolumeClaimReference +} + +var map_PersistentVolumeConfig = map[string]string{ + "": "persistentVolumeConfig provides configuration options for PersistentVolume storage.", + "claim": "claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. The PersistentVolumeClaim must be created in the openshift-insights namespace.", + "mountPath": "mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default mount path is /var/lib/insights-operator The path may not exceed 1024 characters and must not contain a colon.", +} + +func (PersistentVolumeConfig) SwaggerDoc() map[string]string { + return map_PersistentVolumeConfig +} + +var map_Storage = map[string]string{ + "": "storage provides persistent storage configuration options for gathering jobs. If the type is set to PersistentVolume, then the PersistentVolume must be defined. If the type is set to Ephemeral, then the PersistentVolume must not be defined.", + "type": "type is a required field that specifies the type of storage that will be used to store the Insights data archive. Valid values are \"PersistentVolume\" and \"Ephemeral\". When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is defined by the PersistentVolume field.", + "persistentVolume": "persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. The PersistentVolume must be created in the openshift-insights namespace.", +} + +func (Storage) SwaggerDoc() map[string]string { + return map_Storage +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 51099694646..e881a055d61 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -566,6 +566,20 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/insights/v1alpha1.PersistentVolumeClaimReference": schema_openshift_api_insights_v1alpha1_PersistentVolumeClaimReference(ref), "github.com/openshift/api/insights/v1alpha1.PersistentVolumeConfig": schema_openshift_api_insights_v1alpha1_PersistentVolumeConfig(ref), "github.com/openshift/api/insights/v1alpha1.Storage": schema_openshift_api_insights_v1alpha1_Storage(ref), + "github.com/openshift/api/insights/v1alpha2.Custom": schema_openshift_api_insights_v1alpha2_Custom(ref), + "github.com/openshift/api/insights/v1alpha2.DataGather": schema_openshift_api_insights_v1alpha2_DataGather(ref), + "github.com/openshift/api/insights/v1alpha2.DataGatherList": schema_openshift_api_insights_v1alpha2_DataGatherList(ref), + "github.com/openshift/api/insights/v1alpha2.DataGatherSpec": schema_openshift_api_insights_v1alpha2_DataGatherSpec(ref), + "github.com/openshift/api/insights/v1alpha2.DataGatherStatus": schema_openshift_api_insights_v1alpha2_DataGatherStatus(ref), + "github.com/openshift/api/insights/v1alpha2.GathererConfig": schema_openshift_api_insights_v1alpha2_GathererConfig(ref), + "github.com/openshift/api/insights/v1alpha2.GathererStatus": schema_openshift_api_insights_v1alpha2_GathererStatus(ref), + "github.com/openshift/api/insights/v1alpha2.Gatherers": schema_openshift_api_insights_v1alpha2_Gatherers(ref), + "github.com/openshift/api/insights/v1alpha2.HealthCheck": schema_openshift_api_insights_v1alpha2_HealthCheck(ref), + "github.com/openshift/api/insights/v1alpha2.InsightsReport": schema_openshift_api_insights_v1alpha2_InsightsReport(ref), + "github.com/openshift/api/insights/v1alpha2.ObjectReference": schema_openshift_api_insights_v1alpha2_ObjectReference(ref), + "github.com/openshift/api/insights/v1alpha2.PersistentVolumeClaimReference": schema_openshift_api_insights_v1alpha2_PersistentVolumeClaimReference(ref), + "github.com/openshift/api/insights/v1alpha2.PersistentVolumeConfig": schema_openshift_api_insights_v1alpha2_PersistentVolumeConfig(ref), + "github.com/openshift/api/insights/v1alpha2.Storage": schema_openshift_api_insights_v1alpha2_Storage(ref), "github.com/openshift/api/kubecontrolplane/v1.AggregatorConfig": schema_openshift_api_kubecontrolplane_v1_AggregatorConfig(ref), "github.com/openshift/api/kubecontrolplane/v1.KubeAPIServerConfig": schema_openshift_api_kubecontrolplane_v1_KubeAPIServerConfig(ref), "github.com/openshift/api/kubecontrolplane/v1.KubeAPIServerImagePolicyConfig": schema_openshift_api_kubecontrolplane_v1_KubeAPIServerImagePolicyConfig(ref), @@ -27586,6 +27600,661 @@ func schema_openshift_api_insights_v1alpha1_Storage(ref common.ReferenceCallback } } +func schema_openshift_api_insights_v1alpha2_Custom(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "custom provides the custom configuration of gatherers", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "configs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. It may not exceed 100 items and each gatherer can be present only once. It is possible to disable an entire set of gatherers while allowing a specific function within that set. The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. Run the following command to get the names of last active gatherers: \"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'\"", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/insights/v1alpha2.GathererConfig"), + }, + }, + }, + }, + }, + }, + Required: []string{"configs"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/insights/v1alpha2.GathererConfig"}, + } +} + +func schema_openshift_api_insights_v1alpha2_DataGather(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataGather provides data gather configuration options and status for the particular Insights data gathering.\n\nCompatibility 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.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec holds user settable values for configuration", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/insights/v1alpha2.DataGatherSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status holds observed values from the cluster. They may not be overridden.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/insights/v1alpha2.DataGatherStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/insights/v1alpha2.DataGatherSpec", "github.com/openshift/api/insights/v1alpha2.DataGatherStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_openshift_api_insights_v1alpha2_DataGatherList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataGatherList is a collection of items\n\nCompatibility 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.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "items contains a list of DataGather resources.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/insights/v1alpha2.DataGather"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/insights/v1alpha2.DataGather", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_openshift_api_insights_v1alpha2_DataGatherSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataGatherSpec contains the configuration for the DataGather.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "dataPolicy": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. It may not exceed 2 items and must not contain duplicates. Valid values are ObfuscateNetworking and WorkloadNames. When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. 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. When omitted no obfuscation is applied.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "gatherers": { + SchemaProps: spec.SchemaProps{ + Description: "gatherers is an optional field that specifies the configuration of the gatherers. If omitted, all gatherers will be run.", + Ref: ref("github.com/openshift/api/insights/v1alpha2.Gatherers"), + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. If omitted, the gathering job will use ephemeral storage.", + Ref: ref("github.com/openshift/api/insights/v1alpha2.Storage"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/insights/v1alpha2.Gatherers", "github.com/openshift/api/insights/v1alpha2.Storage"}, + } +} + +func schema_openshift_api_insights_v1alpha2_DataGatherStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DataGatherStatus contains information relating to the DataGather state.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "conditions is an optional field that provides details on the status of the gatherer job. It may not exceed 100 items and must not contain duplicates.\n\nThe current condition types are DataUploaded, DataRecorded, DataProcessed, RemoteConfigurationNotAvailable, RemoteConfigurationInvalid\n\nThe DataUploaded condition is used to represent whether or not the archive was successfully uploaded for further processing. When it has a status of True and a reason of Succeeded, the archive was successfully uploaded. When it has a status of Unknown and a reason of NoUploadYet, the upload has not occurred, or there was no data to upload. When it has a status of False and a reason Failed, the upload failed. The accompanying message will include the specific error encountered.\n\nThe DataRecorded condition is used to represent whether or not the archive was successfully recorded. When it has a status of True and a reason of Succeeded, the archive was recorded successfully. When it has a status of Unknown and a reason of NoDataGatheringYet, the data gathering process has not started yet. When it has a status of False and a reason of RecordingFailed, the recording failed and a message will include the specific error encountered.\n\nThe DataProcessed condition is used to represent whether or not the archive was processed by the processing service. When it has a status of True and a reason of Processed, the data was processed successfully. When it has a status of Unknown and a reason of NothingToProcessYet, there is no data to process at the moment. When it has a status of False and a reason of Failure, processing failed and a message will include the specific error encountered.\n\nThe RemoteConfigurationAvailable condition is used to represent whether the remote configuration is available. When it has a status of Unknown and a reason of Unknown or RemoteConfigNotRequestedYet, the state of the remote configuration is unknown—typically at startup. When it has a status of True and a reason of Succeeded, the configuration is available. When it has a status of False and a reason of NoToken, the configuration was disabled by removing the cloud.openshift.com field from the pull secret. When it has a status of False and a reason of DisabledByConfiguration, the configuration was disabled in insightsdatagather.config.openshift.io.\n\nThe RemoteConfigurationValid condition is used to represent whether the remote configuration is valid. When it has a status of Unknown and a reason of Unknown or NoValidationYet, the validity of the remote configuration is unknown—typically at startup. When it has a status of True and a reason of Succeeded, the configuration is valid. When it has a status of False and a reason of Invalid, the configuration is invalid.\n\nThe Progressing condition is used to represent the phase of gathering When it has a status of False and the reason is DataGatherPending, the gathering has not started yet. When it has a status of True and reason is Gathering, the gathering is running. When it has a status of False and reason is GatheringSucceeded, the gathering succesfully finished. When it has a status of False and reason is GatheringFailed, the gathering failed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + }, + }, + }, + }, + }, + "gatherers": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "gatherers is a list of active gatherers (and their statuses) in the last gathering.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/insights/v1alpha2.GathererStatus"), + }, + }, + }, + }, + }, + "startTime": { + SchemaProps: spec.SchemaProps{ + Description: "startTime is the time when Insights data gathering started.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "finishTime": { + SchemaProps: spec.SchemaProps{ + Description: "finishTime is the time when Insights data gathering finished.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "relatedObjects": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + "namespace", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "relatedObjects is an optional list of resources which are useful when debugging or inspecting the data gathering Pod It may not exceed 100 items and must not contain duplicates.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/insights/v1alpha2.ObjectReference"), + }, + }, + }, + }, + }, + "insightsRequestID": { + SchemaProps: spec.SchemaProps{ + Description: "insightsRequestID is an optional Insights request ID to track the status of the Insights analysis (in console.redhat.com processing pipeline) for the corresponding Insights data archive. It may not exceed 256 characters and is immutable once set.", + Type: []string{"string"}, + Format: "", + }, + }, + "insightsReport": { + SchemaProps: spec.SchemaProps{ + Description: "insightsReport provides general Insights analysis results. When omitted, this means no data gathering has taken place yet or the corresponding Insights analysis (identified by \"insightsRequestID\") is not available.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/insights/v1alpha2.InsightsReport"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/insights/v1alpha2.GathererStatus", "github.com/openshift/api/insights/v1alpha2.InsightsReport", "github.com/openshift/api/insights/v1alpha2.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_openshift_api_insights_v1alpha2_GathererConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "gathererConfig allows to configure specific gatherers", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the required name of a specific gatherer It may not exceed 256 characters. The format for a gatherer name is: {gatherer}/{function} where the function is optional. Gatherer consists of a lowercase letters only that may include underscores (_). Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. Run the following command to get the names of last active gatherers: \"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'\"", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "state": { + SchemaProps: spec.SchemaProps{ + Description: "state is a required field that allows you to configure specific gatherer. Valid values are \"Enabled\" and \"Disabled\". When set to Enabled the gatherer will run. When set to Disabled the gatherer will not run.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "state"}, + }, + }, + } +} + +func schema_openshift_api_insights_v1alpha2_GathererStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "gathererStatus represents information about a particular data gatherer.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "conditions provide details on the status of each gatherer.\n\nThe current condition type is DataGathered\n\nThe DataGathered condition is used to represent whether or not the data was gathered by a gatherer specified by name. When it has a status of True and a reason of GatheredOK, the data has been successfully gathered as expected. When it has a status of False and a reason of NoData, no data was gathered—for example, when the resource is not present in the cluster. When it has a status of False and a reason of GatherError, an error occurred and no data was gathered. When it has a status of False and a reason of GatherPanic, a panic occurred during gathering and no data was collected. When it has a status of False and a reason of GatherWithErrorReason, data was partially gathered or gathered with an error message.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + }, + }, + }, + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is the required name of the gatherer. It must contain at least 5 characters and may not exceed 256 characters.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "lastGatherSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "lastGatherSeconds is required field that represents the time spent gathering in seconds", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"name", "lastGatherSeconds"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + } +} + +func schema_openshift_api_insights_v1alpha2_Gatherers(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Gathereres specifies the configuration of the gatherers", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "mode": { + SchemaProps: spec.SchemaProps{ + Description: "mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. When set to All, all gatherers wil run and gather data. When set to None, all gatherers will be disabled and no data will be gathered. When set to Custom, the custom configuration from the custom field will be applied.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "custom": { + SchemaProps: spec.SchemaProps{ + Description: "custom provides gathering configuration. It is required when mode is Custom, and forbidden otherwise. Custom configuration allows user to disable only a subset of gatherers. Gatherers that are not explicitly disabled in custom configuration will run.", + Ref: ref("github.com/openshift/api/insights/v1alpha2.Custom"), + }, + }, + }, + Required: []string{"mode"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "mode", + "fields-to-discriminateBy": map[string]interface{}{ + "custom": "Custom", + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/insights/v1alpha2.Custom"}, + } +} + +func schema_openshift_api_insights_v1alpha2_HealthCheck(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "healthCheck represents an Insights health check attributes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "description": { + SchemaProps: spec.SchemaProps{ + Description: "description is required field that provides basic description of the healtcheck. It must contain at least 10 characters and may not exceed 2048 characters.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "totalRisk": { + SchemaProps: spec.SchemaProps{ + Description: "totalRisk is the required field of the healthcheck. It is indicator of the total risk posed by the detected issue; combination of impact and likelihood. Allowed values are Low, Medium, Important and Critical. The value represents the severity of the issue.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "advisorURI": { + SchemaProps: spec.SchemaProps{ + Description: "advisorURI is required field that provides the URL link to the Insights Advisor. The link must be a valid HTTPS URL and the maximum length is 2048 characters.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"description", "totalRisk", "advisorURI"}, + }, + }, + } +} + +func schema_openshift_api_insights_v1alpha2_InsightsReport(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "insightsReport provides Insights health check report based on the most recently sent Insights data.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "downloadedTime": { + SchemaProps: spec.SchemaProps{ + Description: "downloadedTime is an optional time when the last Insights report was downloaded. An empty value means that there has not been any Insights report downloaded yet and it usually appears in disconnected clusters (or clusters when the Insights data gathering is disabled).", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "healthChecks": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "advisorURI", + "totalRisk", + "description", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "healthChecks provides basic information about active Insights health checks in a cluster.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/insights/v1alpha2.HealthCheck"), + }, + }, + }, + }, + }, + "uri": { + SchemaProps: spec.SchemaProps{ + Description: "uri is optional field that provides the URL link from which the report was downloaded. The link must be a valid HTTPS URL and the maximum length is 2048 characters.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/insights/v1alpha2.HealthCheck", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_openshift_api_insights_v1alpha2_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Description: "group is required field that specifies the API Group of the Resource. Enter empty string for the core group. This value is empty or it should follow the DNS1123 subdomain format. 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. Example: \"\", \"apps\", \"build.openshift.io\", etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "resource is required field of the type that is being referenced. It is normally the plural form of the resource kind in lowercase. It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens Example: \"deployments\", \"deploymentconfigs\", \"pods\", etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is required field that specifies the referent that follows the DNS1123 subdomain format. 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.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "namespace if required field of the referent that follows the DNS1123 labels format. It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"group", "resource", "name", "namespace"}, + }, + }, + } +} + +func schema_openshift_api_insights_v1alpha2_PersistentVolumeClaimReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "persistentVolumeClaimReference is a reference to a PersistentVolumeClaim.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name is a string that follows the DNS1123 subdomain format. 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.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_openshift_api_insights_v1alpha2_PersistentVolumeConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "persistentVolumeConfig provides configuration options for PersistentVolume storage.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "claim": { + SchemaProps: spec.SchemaProps{ + Description: "claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. The PersistentVolumeClaim must be created in the openshift-insights namespace.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/insights/v1alpha2.PersistentVolumeClaimReference"), + }, + }, + "mountPath": { + SchemaProps: spec.SchemaProps{ + Description: "mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default mount path is /var/lib/insights-operator The path may not exceed 1024 characters and must not contain a colon.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"claim"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/insights/v1alpha2.PersistentVolumeClaimReference"}, + } +} + +func schema_openshift_api_insights_v1alpha2_Storage(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "storage provides persistent storage configuration options for gathering jobs. If the type is set to PersistentVolume, then the PersistentVolume must be defined. If the type is set to Ephemeral, then the PersistentVolume must not be defined.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type is a required field that specifies the type of storage that will be used to store the Insights data archive. Valid values are \"PersistentVolume\" and \"Ephemeral\". When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is defined by the PersistentVolume field.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "persistentVolume": { + SchemaProps: spec.SchemaProps{ + Description: "persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. The PersistentVolume must be created in the openshift-insights namespace.", + Ref: ref("github.com/openshift/api/insights/v1alpha2.PersistentVolumeConfig"), + }, + }, + }, + Required: []string{"type"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "type", + "fields-to-discriminateBy": map[string]interface{}{ + "persistentVolume": "PersistentVolume", + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/insights/v1alpha2.PersistentVolumeConfig"}, + } +} + func schema_openshift_api_kubecontrolplane_v1_AggregatorConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/openapi/openapi.json b/openapi/openapi.json index 4ffea45c1e4..eff35090db3 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -15432,6 +15432,393 @@ } } }, + "com.github.openshift.api.insights.v1alpha2.Custom": { + "description": "custom provides the custom configuration of gatherers", + "type": "object", + "required": [ + "configs" + ], + "properties": { + "configs": { + "description": "configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. It may not exceed 100 items and each gatherer can be present only once. It is possible to disable an entire set of gatherers while allowing a specific function within that set. The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. Run the following command to get the names of last active gatherers: \"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'\"", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.GathererConfig" + }, + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.DataGather": { + "description": "DataGather provides data gather configuration options and status for the particular Insights data gathering.\n\nCompatibility 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.", + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec holds user settable values for configuration", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.DataGatherSpec" + }, + "status": { + "description": "status holds observed values from the cluster. They may not be overridden.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.DataGatherStatus" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.DataGatherList": { + "description": "DataGatherList is a collection of items\n\nCompatibility 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.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "items contains a list of DataGather resources.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.DataGather" + }, + "x-kubernetes-list-type": "atomic" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.DataGatherSpec": { + "description": "DataGatherSpec contains the configuration for the DataGather.", + "type": "object", + "properties": { + "dataPolicy": { + "description": "dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. It may not exceed 2 items and must not contain duplicates. Valid values are ObfuscateNetworking and WorkloadNames. When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. 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. When omitted no obfuscation is applied.", + "type": "array", + "items": { + "type": "string", + "default": "" + }, + "x-kubernetes-list-type": "atomic" + }, + "gatherers": { + "description": "gatherers is an optional field that specifies the configuration of the gatherers. If omitted, all gatherers will be run.", + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.Gatherers" + }, + "storage": { + "description": "storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. If omitted, the gathering job will use ephemeral storage.", + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.Storage" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.DataGatherStatus": { + "description": "DataGatherStatus contains information relating to the DataGather state.", + "type": "object", + "properties": { + "conditions": { + "description": "conditions is an optional field that provides details on the status of the gatherer job. It may not exceed 100 items and must not contain duplicates.\n\nThe current condition types are DataUploaded, DataRecorded, DataProcessed, RemoteConfigurationNotAvailable, RemoteConfigurationInvalid\n\nThe DataUploaded condition is used to represent whether or not the archive was successfully uploaded for further processing. When it has a status of True and a reason of Succeeded, the archive was successfully uploaded. When it has a status of Unknown and a reason of NoUploadYet, the upload has not occurred, or there was no data to upload. When it has a status of False and a reason Failed, the upload failed. The accompanying message will include the specific error encountered.\n\nThe DataRecorded condition is used to represent whether or not the archive was successfully recorded. When it has a status of True and a reason of Succeeded, the archive was recorded successfully. When it has a status of Unknown and a reason of NoDataGatheringYet, the data gathering process has not started yet. When it has a status of False and a reason of RecordingFailed, the recording failed and a message will include the specific error encountered.\n\nThe DataProcessed condition is used to represent whether or not the archive was processed by the processing service. When it has a status of True and a reason of Processed, the data was processed successfully. When it has a status of Unknown and a reason of NothingToProcessYet, there is no data to process at the moment. When it has a status of False and a reason of Failure, processing failed and a message will include the specific error encountered.\n\nThe RemoteConfigurationAvailable condition is used to represent whether the remote configuration is available. When it has a status of Unknown and a reason of Unknown or RemoteConfigNotRequestedYet, the state of the remote configuration is unknown—typically at startup. When it has a status of True and a reason of Succeeded, the configuration is available. When it has a status of False and a reason of NoToken, the configuration was disabled by removing the cloud.openshift.com field from the pull secret. When it has a status of False and a reason of DisabledByConfiguration, the configuration was disabled in insightsdatagather.config.openshift.io.\n\nThe RemoteConfigurationValid condition is used to represent whether the remote configuration is valid. When it has a status of Unknown and a reason of Unknown or NoValidationYet, the validity of the remote configuration is unknown—typically at startup. When it has a status of True and a reason of Succeeded, the configuration is valid. When it has a status of False and a reason of Invalid, the configuration is invalid.\n\nThe Progressing condition is used to represent the phase of gathering When it has a status of False and the reason is DataGatherPending, the gathering has not started yet. When it has a status of True and reason is Gathering, the gathering is running. When it has a status of False and reason is GatheringSucceeded, the gathering succesfully finished. When it has a status of False and reason is GatheringFailed, the gathering failed.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + }, + "finishTime": { + "description": "finishTime is the time when Insights data gathering finished.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "gatherers": { + "description": "gatherers is a list of active gatherers (and their statuses) in the last gathering.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.GathererStatus" + }, + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map" + }, + "insightsReport": { + "description": "insightsReport provides general Insights analysis results. When omitted, this means no data gathering has taken place yet or the corresponding Insights analysis (identified by \"insightsRequestID\") is not available.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.InsightsReport" + }, + "insightsRequestID": { + "description": "insightsRequestID is an optional Insights request ID to track the status of the Insights analysis (in console.redhat.com processing pipeline) for the corresponding Insights data archive. It may not exceed 256 characters and is immutable once set.", + "type": "string" + }, + "relatedObjects": { + "description": "relatedObjects is an optional list of resources which are useful when debugging or inspecting the data gathering Pod It may not exceed 100 items and must not contain duplicates.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.ObjectReference" + }, + "x-kubernetes-list-map-keys": [ + "name", + "namespace" + ], + "x-kubernetes-list-type": "map" + }, + "startTime": { + "description": "startTime is the time when Insights data gathering started.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.GathererConfig": { + "description": "gathererConfig allows to configure specific gatherers", + "type": "object", + "required": [ + "name", + "state" + ], + "properties": { + "name": { + "description": "name is the required name of a specific gatherer It may not exceed 256 characters. The format for a gatherer name is: {gatherer}/{function} where the function is optional. Gatherer consists of a lowercase letters only that may include underscores (_). Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. Run the following command to get the names of last active gatherers: \"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'\"", + "type": "string", + "default": "" + }, + "state": { + "description": "state is a required field that allows you to configure specific gatherer. Valid values are \"Enabled\" and \"Disabled\". When set to Enabled the gatherer will run. When set to Disabled the gatherer will not run.", + "type": "string", + "default": "" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.GathererStatus": { + "description": "gathererStatus represents information about a particular data gatherer.", + "type": "object", + "required": [ + "name", + "lastGatherSeconds" + ], + "properties": { + "conditions": { + "description": "conditions provide details on the status of each gatherer.\n\nThe current condition type is DataGathered\n\nThe DataGathered condition is used to represent whether or not the data was gathered by a gatherer specified by name. When it has a status of True and a reason of GatheredOK, the data has been successfully gathered as expected. When it has a status of False and a reason of NoData, no data was gathered—for example, when the resource is not present in the cluster. When it has a status of False and a reason of GatherError, an error occurred and no data was gathered. When it has a status of False and a reason of GatherPanic, a panic occurred during gathering and no data was collected. When it has a status of False and a reason of GatherWithErrorReason, data was partially gathered or gathered with an error message.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + }, + "lastGatherSeconds": { + "description": "lastGatherSeconds is required field that represents the time spent gathering in seconds", + "type": "integer", + "format": "int32", + "default": 0 + }, + "name": { + "description": "name is the required name of the gatherer. It must contain at least 5 characters and may not exceed 256 characters.", + "type": "string", + "default": "" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.Gatherers": { + "description": "Gathereres specifies the configuration of the gatherers", + "type": "object", + "required": [ + "mode" + ], + "properties": { + "custom": { + "description": "custom provides gathering configuration. It is required when mode is Custom, and forbidden otherwise. Custom configuration allows user to disable only a subset of gatherers. Gatherers that are not explicitly disabled in custom configuration will run.", + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.Custom" + }, + "mode": { + "description": "mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. When set to All, all gatherers wil run and gather data. When set to None, all gatherers will be disabled and no data will be gathered. When set to Custom, the custom configuration from the custom field will be applied.", + "type": "string", + "default": "" + } + }, + "x-kubernetes-unions": [ + { + "discriminator": "mode", + "fields-to-discriminateBy": { + "custom": "Custom" + } + } + ] + }, + "com.github.openshift.api.insights.v1alpha2.HealthCheck": { + "description": "healthCheck represents an Insights health check attributes.", + "type": "object", + "required": [ + "description", + "totalRisk", + "advisorURI" + ], + "properties": { + "advisorURI": { + "description": "advisorURI is required field that provides the URL link to the Insights Advisor. The link must be a valid HTTPS URL and the maximum length is 2048 characters.", + "type": "string", + "default": "" + }, + "description": { + "description": "description is required field that provides basic description of the healtcheck. It must contain at least 10 characters and may not exceed 2048 characters.", + "type": "string", + "default": "" + }, + "totalRisk": { + "description": "totalRisk is the required field of the healthcheck. It is indicator of the total risk posed by the detected issue; combination of impact and likelihood. Allowed values are Low, Medium, Important and Critical. The value represents the severity of the issue.", + "type": "string", + "default": "" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.InsightsReport": { + "description": "insightsReport provides Insights health check report based on the most recently sent Insights data.", + "type": "object", + "properties": { + "downloadedTime": { + "description": "downloadedTime is an optional time when the last Insights report was downloaded. An empty value means that there has not been any Insights report downloaded yet and it usually appears in disconnected clusters (or clusters when the Insights data gathering is disabled).", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "healthChecks": { + "description": "healthChecks provides basic information about active Insights health checks in a cluster.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.HealthCheck" + }, + "x-kubernetes-list-map-keys": [ + "advisorURI", + "totalRisk", + "description" + ], + "x-kubernetes-list-type": "map" + }, + "uri": { + "description": "uri is optional field that provides the URL link from which the report was downloaded. The link must be a valid HTTPS URL and the maximum length is 2048 characters.", + "type": "string" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.ObjectReference": { + "description": "ObjectReference contains enough information to let you inspect or modify the referred object.", + "type": "object", + "required": [ + "group", + "resource", + "name", + "namespace" + ], + "properties": { + "group": { + "description": "group is required field that specifies the API Group of the Resource. Enter empty string for the core group. This value is empty or it should follow the DNS1123 subdomain format. 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. Example: \"\", \"apps\", \"build.openshift.io\", etc.", + "type": "string", + "default": "" + }, + "name": { + "description": "name is required field that specifies the referent that follows the DNS1123 subdomain format. 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.", + "type": "string", + "default": "" + }, + "namespace": { + "description": "namespace if required field of the referent that follows the DNS1123 labels format. It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens", + "type": "string", + "default": "" + }, + "resource": { + "description": "resource is required field of the type that is being referenced. It is normally the plural form of the resource kind in lowercase. It must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens Example: \"deployments\", \"deploymentconfigs\", \"pods\", etc.", + "type": "string", + "default": "" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.PersistentVolumeClaimReference": { + "description": "persistentVolumeClaimReference is a reference to a PersistentVolumeClaim.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "name is a string that follows the DNS1123 subdomain format. 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.", + "type": "string", + "default": "" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.PersistentVolumeConfig": { + "description": "persistentVolumeConfig provides configuration options for PersistentVolume storage.", + "type": "object", + "required": [ + "claim" + ], + "properties": { + "claim": { + "description": "claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. The PersistentVolumeClaim must be created in the openshift-insights namespace.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.PersistentVolumeClaimReference" + }, + "mountPath": { + "description": "mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default mount path is /var/lib/insights-operator The path may not exceed 1024 characters and must not contain a colon.", + "type": "string" + } + } + }, + "com.github.openshift.api.insights.v1alpha2.Storage": { + "description": "storage provides persistent storage configuration options for gathering jobs. If the type is set to PersistentVolume, then the PersistentVolume must be defined. If the type is set to Ephemeral, then the PersistentVolume must not be defined.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "persistentVolume": { + "description": "persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. The PersistentVolume must be created in the openshift-insights namespace.", + "$ref": "#/definitions/com.github.openshift.api.insights.v1alpha2.PersistentVolumeConfig" + }, + "type": { + "description": "type is a required field that specifies the type of storage that will be used to store the Insights data archive. Valid values are \"PersistentVolume\" and \"Ephemeral\". When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is defined by the PersistentVolume field.", + "type": "string", + "default": "" + } + }, + "x-kubernetes-unions": [ + { + "discriminator": "type", + "fields-to-discriminateBy": { + "persistentVolume": "PersistentVolume" + } + } + ] + }, "com.github.openshift.api.kubecontrolplane.v1.AggregatorConfig": { "description": "AggregatorConfig holds information required to make the aggregator function.", "type": "object",