From 66e6eeec949e40121070ce9f1f4a8050b4e8d8cb Mon Sep 17 00:00:00 2001 From: Philip Gough Date: Fri, 26 Apr 2024 14:59:41 +0100 Subject: [PATCH] Remove MCO v1beta1 api tests and deps Signed-off-by: Philip Gough --- cicd-scripts/customize-mco.sh | 10 +- examples/mco/e2e/v1beta1/kustomization.yaml | 2 - ...servability-v1beta1-to-v1beta2-golden.yaml | 28 -- examples/mco/e2e/v1beta1/observability.yaml | 18 -- operators/multiclusterobservability/Makefile | 3 - .../multiclusterobservability_conversion.go | 125 -------- .../multiclusterobservability_types.go | 146 --------- .../api/v1beta1/zz_generated.deepcopy.go | 139 --------- ...bility-operator.clusterserviceversion.yaml | 21 -- ...gement.io_multiclusterobservabilities.yaml | 213 ------------- ...gement.io_multiclusterobservabilities.yaml | 285 ------------------ ...bility-operator.clusterserviceversion.yaml | 5 - .../config/samples/kustomization.yaml | 1 - ...ity_v1beta1_multiclusterobservability.yaml | 10 - tests/pkg/tests/observability_install_test.go | 55 ---- 15 files changed, 1 insertion(+), 1060 deletions(-) delete mode 100644 examples/mco/e2e/v1beta1/kustomization.yaml delete mode 100644 examples/mco/e2e/v1beta1/observability-v1beta1-to-v1beta2-golden.yaml delete mode 100644 examples/mco/e2e/v1beta1/observability.yaml delete mode 100644 operators/multiclusterobservability/api/v1beta1/multiclusterobservability_conversion.go delete mode 100644 operators/multiclusterobservability/api/v1beta1/multiclusterobservability_types.go delete mode 100644 operators/multiclusterobservability/config/samples/observability_v1beta1_multiclusterobservability.yaml diff --git a/cicd-scripts/customize-mco.sh b/cicd-scripts/customize-mco.sh index 68e7c4130..98950d5e0 100755 --- a/cicd-scripts/customize-mco.sh +++ b/cicd-scripts/customize-mco.sh @@ -32,42 +32,34 @@ update_mco_cr() { for component_name in ${CHANGED_COMPONENTS}; do component_anno_name=$(echo ${component_name} | sed 's/-/_/g') get_image ${component_name} - ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-${component_anno_name}-image: ${IMAGE}" ${ROOTDIR}/examples/mco/e2e/v1beta1/observability.yaml ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-${component_anno_name}-image: ${IMAGE}" ${ROOTDIR}/examples/mco/e2e/v1beta2/observability.yaml done else if [[ -n ${RBAC_QUERY_PROXY_IMAGE_REF} ]]; then - ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-rbac_query_proxy-image: ${RBAC_QUERY_PROXY_IMAGE_REF}" ${ROOTDIR}/examples/mco/e2e/v1beta1/observability.yaml ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-rbac_query_proxy-image: ${RBAC_QUERY_PROXY_IMAGE_REF}" ${ROOTDIR}/examples/mco/e2e/v1beta2/observability.yaml fi if [[ -n ${ENDPOINT_MONITORING_OPERATOR_IMAGE_REF} ]]; then - ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-endpoint_monitoring_operator-image: ${ENDPOINT_MONITORING_OPERATOR_IMAGE_REF}" ${ROOTDIR}/examples/mco/e2e/v1beta1/observability.yaml ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-endpoint_monitoring_operator-image: ${ENDPOINT_MONITORING_OPERATOR_IMAGE_REF}" ${ROOTDIR}/examples/mco/e2e/v1beta2/observability.yaml fi if [[ -n ${GRAFANA_DASHBOARD_LOADER_IMAGE_REF} ]]; then - ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-grafana_dashboard_loader-image: ${GRAFANA_DASHBOARD_LOADER_IMAGE_REF}" ${ROOTDIR}/examples/mco/e2e/v1beta1/observability.yaml ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-grafana_dashboard_loader-image: ${GRAFANA_DASHBOARD_LOADER_IMAGE_REF}" ${ROOTDIR}/examples/mco/e2e/v1beta2/observability.yaml fi if [[ -n ${METRICS_COLLECTOR_IMAGE_REF} ]]; then - ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-metrics_collector-image: ${METRICS_COLLECTOR_IMAGE_REF}" ${ROOTDIR}/examples/mco/e2e/v1beta1/observability.yaml ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-metrics_collector-image: ${METRICS_COLLECTOR_IMAGE_REF}" ${ROOTDIR}/examples/mco/e2e/v1beta2/observability.yaml fi if [[ -n ${OBSERVATORIUM_OPERATOR_IMAGE_REF} ]]; then - ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-observatorium_operator-image: ${OBSERVATORIUM_OPERATOR_IMAGE_REF}" ${ROOTDIR}/examples/mco/e2e/v1beta1/observability.yaml ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-metrics_collector-image: ${OBSERVATORIUM_OPERATOR_IMAGE_REF}" ${ROOTDIR}/examples/mco/e2e/v1beta2/observability.yaml fi fi # Add mco-imageTagSuffix annotation - ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-imageTagSuffix: ${LATEST_SNAPSHOT}" ${ROOTDIR}/examples/mco/e2e/v1beta1/observability.yaml ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-imageTagSuffix: ${LATEST_SNAPSHOT}" ${ROOTDIR}/examples/mco/e2e/v1beta2/observability.yaml # need to add this annotation due to KinD cluster resources are insufficient if [[ -n ${IS_KIND_ENV} ]]; then - ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-thanos-without-resources-requests: true" ${ROOTDIR}/examples/mco/e2e/v1beta1/observability.yaml ${SED_COMMAND} "/annotations.*/a \ \ \ \ mco-thanos-without-resources-requests: true" ${ROOTDIR}/examples/mco/e2e/v1beta2/observability.yaml # annotate MCO in kind env to be able to install prometheus - ${SED_COMMAND} "/annotations.*/a \ \ \ \ test-env: kind-test" ${ROOTDIR}/examples/mco/e2e/v1beta1/observability.yaml + ${SED_COMMAND} "/annotations.*/a \ \ \ \ test-env: kind-test" ${ROOTDIR}/examples/mco/e2e/v1beta2/observability.yaml fi } diff --git a/examples/mco/e2e/v1beta1/kustomization.yaml b/examples/mco/e2e/v1beta1/kustomization.yaml deleted file mode 100644 index f0c8a4650..000000000 --- a/examples/mco/e2e/v1beta1/kustomization.yaml +++ /dev/null @@ -1,2 +0,0 @@ -resources: -- observability.yaml diff --git a/examples/mco/e2e/v1beta1/observability-v1beta1-to-v1beta2-golden.yaml b/examples/mco/e2e/v1beta1/observability-v1beta1-to-v1beta2-golden.yaml deleted file mode 100644 index d669314f3..000000000 --- a/examples/mco/e2e/v1beta1/observability-v1beta1-to-v1beta2-golden.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: observability.open-cluster-management.io/v1beta2 -kind: MultiClusterObservability -metadata: - name: observability -spec: - advanced: - retentionConfig: - retentionResolution1h: 30d - retentionResolution5m: 14d - retentionResolutionRaw: 5d - enableDownsampling: false - imagePullPolicy: IfNotPresent - imagePullSecret: multiclusterhub-operator-pull-secret - nodeSelector: - kubernetes.io/os: linux - observabilityAddonSpec: - enableMetrics: true - interval: 300 - storageConfig: - alertmanagerStorageSize: 1Gi - compactStorageSize: 1Gi - metricObjectStorage: - key: thanos.yaml - name: thanos-object-storage - receiveStorageSize: 1Gi - ruleStorageSize: 1Gi - storageClass: gp2 - storeStorageSize: 1Gi diff --git a/examples/mco/e2e/v1beta1/observability.yaml b/examples/mco/e2e/v1beta1/observability.yaml deleted file mode 100644 index ee59f4ce4..000000000 --- a/examples/mco/e2e/v1beta1/observability.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: observability.open-cluster-management.io/v1beta1 -kind: MultiClusterObservability -metadata: - name: observability - annotations: -spec: - nodeSelector: - kubernetes.io/os: linux - observabilityAddonSpec: {} - retentionResolutionRaw: 5d - retentionResolution5m: 14d - retentionResolution1h: 30d - storageConfigObject: - metricObjectStorage: - key: thanos.yaml - name: thanos-object-storage - statefulSetSize: 1Gi - statefulSetStorageClass: gp2 diff --git a/operators/multiclusterobservability/Makefile b/operators/multiclusterobservability/Makefile index 3556917c7..36941053c 100644 --- a/operators/multiclusterobservability/Makefile +++ b/operators/multiclusterobservability/Makefile @@ -97,9 +97,6 @@ undeploy: # Generate manifests e.g. CRD, RBAC etc. manifests: controller-gen $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases - # TODO(morvencao): replace the sed command with kubebuilder marker - $(SED) -i 's/storage: false/&\n deprecated: true/g' config/crd/bases/observability.open-cluster-management.io_multiclusterobservabilities.yaml - $(SED) -i 's/storage: false/&\n deprecationWarning: observability.open-cluster-management.io\/v1beta1 MultiClusterObservability is deprecated in v2.3+, unavailable in v2.6+; use observability.open-cluster-management.io\/v1beta2 MultiClusterObservability/g' config/crd/bases/observability.open-cluster-management.io_multiclusterobservabilities.yaml # Run go fmt against code fmt: diff --git a/operators/multiclusterobservability/api/v1beta1/multiclusterobservability_conversion.go b/operators/multiclusterobservability/api/v1beta1/multiclusterobservability_conversion.go deleted file mode 100644 index 0e210a8da..000000000 --- a/operators/multiclusterobservability/api/v1beta1/multiclusterobservability_conversion.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Red Hat, Inc. -// Copyright Contributors to the Open Cluster Management project -// Licensed under the Apache License 2.0 - -package v1beta1 - -/* -For imports, we'll need the controller-runtime -[`conversion`](https://godoc.org/sigs.k8s.io/controller-runtime/pkg/conversion) -package, plus the API version for our hub type (v1beta2), and finally some of the -standard packages. -*/ -import ( - "sigs.k8s.io/controller-runtime/pkg/conversion" - - observabilityv1beta2 "github.com/stolostron/multicluster-observability-operator/operators/multiclusterobservability/api/v1beta2" -) - -// +kubebuilder:docs-gen:collapse=Imports - -/* -Our "spoke" versions need to implement the -[`Convertible`](https://godoc.org/sigs.k8s.io/controller-runtime/pkg/conversion#Convertible) -interface. Namely, they'll need `ConvertTo` and `ConvertFrom` methods to convert to/from -the hub version. -*/ - -/* -ConvertTo is expected to modify its argument to contain the converted object. -Most of the conversion is straightforward copying, except for converting our changed field. -*/ -// ConvertTo converts this MultiClusterObservability to the Hub version (v1beta2). -func (src *MultiClusterObservability) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*observabilityv1beta2.MultiClusterObservability) - - // TODO(morvencao)?: convert the AvailabilityConfig field - // availabilityConfig := src.Spec.AvailabilityConfig - - dst.Spec.StorageConfig = &observabilityv1beta2.StorageConfig{ - MetricObjectStorage: src.Spec.StorageConfig.MetricObjectStorage, - StorageClass: src.Spec.StorageConfig.StatefulSetStorageClass, - // How to convert the current storage size to new one? - AlertmanagerStorageSize: src.Spec.StorageConfig.StatefulSetSize, - RuleStorageSize: src.Spec.StorageConfig.StatefulSetSize, - StoreStorageSize: src.Spec.StorageConfig.StatefulSetSize, - CompactStorageSize: src.Spec.StorageConfig.StatefulSetSize, - ReceiveStorageSize: src.Spec.StorageConfig.StatefulSetSize, - } - - dst.Spec.AdvancedConfig = &observabilityv1beta2.AdvancedConfig{ - RetentionConfig: &observabilityv1beta2.RetentionConfig{ - RetentionResolutionRaw: src.Spec.RetentionResolutionRaw, - RetentionResolution5m: src.Spec.RetentionResolution5m, - RetentionResolution1h: src.Spec.RetentionResolution1h, - }, - } - - dst.Spec.EnableDownsampling = src.Spec.EnableDownSampling - - /* - The rest of the conversion is pretty rote. - */ - // ObjectMeta - dst.ObjectMeta = src.ObjectMeta - - // Spec - dst.Spec.ImagePullPolicy = src.Spec.ImagePullPolicy - dst.Spec.ImagePullSecret = src.Spec.ImagePullSecret - dst.Spec.NodeSelector = src.Spec.NodeSelector - dst.Spec.Tolerations = src.Spec.Tolerations - dst.Spec.ObservabilityAddonSpec = src.Spec.ObservabilityAddonSpec - - // Status - dst.Status.Conditions = src.Status.Conditions - - // +kubebuilder:docs-gen:collapse=rote conversion - return nil -} - -/* -ConvertFrom is expected to modify its receiver to contain the converted object. -Most of the conversion is straightforward copying, except for converting our changed field. -*/ - -// ConvertFrom converts from the Hub version (observabilityv1beta2) to this version. -func (dst *MultiClusterObservability) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*observabilityv1beta2.MultiClusterObservability) - - // TODO(morvencao): convert the AvailabilityConfig field - // dst.Spec.AvailabilityConfig = - - if src.Spec.AdvancedConfig != nil && src.Spec.AdvancedConfig.RetentionConfig != nil { - dst.Spec.RetentionResolutionRaw = src.Spec.AdvancedConfig.RetentionConfig.RetentionResolutionRaw - dst.Spec.RetentionResolution5m = src.Spec.AdvancedConfig.RetentionConfig.RetentionResolution5m - dst.Spec.RetentionResolution1h = src.Spec.AdvancedConfig.RetentionConfig.RetentionResolution1h - } - - dst.Spec.StorageConfig = &StorageConfigObject{ - MetricObjectStorage: src.Spec.StorageConfig.MetricObjectStorage, - StatefulSetStorageClass: src.Spec.StorageConfig.StorageClass, - // How to convert the new storage size to old one? - // StatefulSetSize = - } - - dst.Spec.EnableDownSampling = src.Spec.EnableDownsampling - - /* - The rest of the conversion is pretty rote. - */ - // ObjectMeta - dst.ObjectMeta = src.ObjectMeta - - // Spec - dst.Spec.ImagePullPolicy = src.Spec.ImagePullPolicy - dst.Spec.ImagePullSecret = src.Spec.ImagePullSecret - dst.Spec.NodeSelector = src.Spec.NodeSelector - dst.Spec.Tolerations = src.Spec.Tolerations - dst.Spec.ObservabilityAddonSpec = src.Spec.ObservabilityAddonSpec - - // Status - dst.Status.Conditions = src.Status.Conditions - - // +kubebuilder:docs-gen:collapse=rote conversion - return nil -} diff --git a/operators/multiclusterobservability/api/v1beta1/multiclusterobservability_types.go b/operators/multiclusterobservability/api/v1beta1/multiclusterobservability_types.go deleted file mode 100644 index 4491d99a6..000000000 --- a/operators/multiclusterobservability/api/v1beta1/multiclusterobservability_types.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Red Hat, Inc. -// Copyright Contributors to the Open Cluster Management project -// Licensed under the Apache License 2.0 - -package v1beta1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - observabilityshared "github.com/stolostron/multicluster-observability-operator/operators/multiclusterobservability/api/shared" -) - -// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// AvailabilityType ... -type AvailabilityType string - -const ( - // HABasic stands up most app subscriptions with a replicaCount of 1. - HABasic AvailabilityType = "Basic" - // HAHigh stands up most app subscriptions with a replicaCount of 2. - HAHigh AvailabilityType = "High" -) - -// MultiClusterObservabilitySpec defines the desired state of MultiClusterObservability. -type MultiClusterObservabilitySpec struct { - // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster - // Important: Run "make" to regenerate code after modifying this file - - // ReplicaCount for HA support. Does not affect data stores. - // Enabled will toggle HA support. This will provide better support in cases of failover - // but consumes more resources. Options are: Basic and High (default). - // +optional - // +kubebuilder:default:=High - AvailabilityConfig AvailabilityType `json:"availabilityConfig,omitempty"` - - // Enable or disable the downsample. - // The default value is false. - // This is not recommended as querying long time ranges - // without non-downsampled data is not efficient and useful. - // +optional - // +kubebuilder:default:=false - EnableDownSampling bool `json:"enableDownSampling"` - - // Pull policy of the MultiClusterObservability images - // +optional - // +kubebuilder:default:=IfNotPresent - ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` - - // Pull secret of the MultiClusterObservability images - // +optional - // +kubebuilder:default:=multiclusterhub-operator-pull-secret - ImagePullSecret string `json:"imagePullSecret,omitempty"` - - // Spec of NodeSelector - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // Tolerations causes all components to tolerate any taints. - // +optional - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - - // How long to retain raw samples in a bucket. - // +optional - // +kubebuilder:default:="5d" - RetentionResolutionRaw string `json:"retentionResolutionRaw,omitempty"` - - // How long to retain samples of resolution 1 (5 minutes) in bucket. - // +optional - // +kubebuilder:default:="14d" - RetentionResolution5m string `json:"retentionResolution5m,omitempty"` - - // How long to retain samples of resolution 2 (1 hour) in bucket. - // +optional - // +kubebuilder:default:="30d" - RetentionResolution1h string `json:"retentionResolution1h,omitempty"` - - // Specifies the storage to be used by Observability - // +required - StorageConfig *StorageConfigObject `json:"storageConfigObject,omitempty"` - - // The ObservabilityAddonSpec defines the global settings for all managed - // clusters which have observability add-on enabled. - // +optional - ObservabilityAddonSpec *observabilityshared.ObservabilityAddonSpec `json:"observabilityAddonSpec,omitempty"` -} - -// StorageConfigObject is the spec of object storage. -type StorageConfigObject struct { - // Object store config secret for metrics - // +required - MetricObjectStorage *observabilityshared.PreConfiguredStorage `json:"metricObjectStorage,omitempty"` - // The amount of storage applied to the Observability stateful sets, i.e. - // Thanos store, Rule, compact and receiver. - // +optional - // +kubebuilder:default:="10Gi" - StatefulSetSize string `json:"statefulSetSize,omitempty"` - - // Specify the storageClass Stateful Sets. This storage class will also - // be used for Object Storage if MetricObjectStorage was configured for - // the system to create the storage. - // +optional - // +kubebuilder:default:=gp2 - StatefulSetStorageClass string `json:"statefulSetStorageClass,omitempty"` -} - -// MultiClusterObservabilityStatus defines the observed state of MultiClusterObservability. -type MultiClusterObservabilityStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file - - // Represents the status of each deployment - // +optional - Conditions []observabilityshared.Condition `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status - -// MultiClusterObservability defines the configuration for the Observability installation on -// Hub and Managed Clusters all through this one custom resource. -// +kubebuilder:pruning:PreserveUnknownFields -// +kubebuilder:resource:path=multiclusterobservabilities,scope=Cluster,shortName=mco -// +operator-sdk:csv:customresourcedefinitions:displayName="MultiClusterObservability" -type MultiClusterObservability struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec MultiClusterObservabilitySpec `json:"spec,omitempty"` - Status MultiClusterObservabilityStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// MultiClusterObservabilityList contains a list of MultiClusterObservability -type MultiClusterObservabilityList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []MultiClusterObservability `json:"items"` -} - -func init() { - SchemeBuilder.Register(&MultiClusterObservability{}, &MultiClusterObservabilityList{}) -} diff --git a/operators/multiclusterobservability/api/v1beta1/zz_generated.deepcopy.go b/operators/multiclusterobservability/api/v1beta1/zz_generated.deepcopy.go index 8ec0c8192..a0d5185e0 100644 --- a/operators/multiclusterobservability/api/v1beta1/zz_generated.deepcopy.go +++ b/operators/multiclusterobservability/api/v1beta1/zz_generated.deepcopy.go @@ -22,130 +22,9 @@ limitations under the License. package v1beta1 import ( - "github.com/stolostron/multicluster-observability-operator/operators/multiclusterobservability/api/shared" - "k8s.io/api/core/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 *MultiClusterObservability) DeepCopyInto(out *MultiClusterObservability) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterObservability. -func (in *MultiClusterObservability) DeepCopy() *MultiClusterObservability { - if in == nil { - return nil - } - out := new(MultiClusterObservability) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MultiClusterObservability) 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 *MultiClusterObservabilityList) DeepCopyInto(out *MultiClusterObservabilityList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MultiClusterObservability, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterObservabilityList. -func (in *MultiClusterObservabilityList) DeepCopy() *MultiClusterObservabilityList { - if in == nil { - return nil - } - out := new(MultiClusterObservabilityList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MultiClusterObservabilityList) 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 *MultiClusterObservabilitySpec) DeepCopyInto(out *MultiClusterObservabilitySpec) { - *out = *in - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.StorageConfig != nil { - in, out := &in.StorageConfig, &out.StorageConfig - *out = new(StorageConfigObject) - (*in).DeepCopyInto(*out) - } - if in.ObservabilityAddonSpec != nil { - in, out := &in.ObservabilityAddonSpec, &out.ObservabilityAddonSpec - *out = new(shared.ObservabilityAddonSpec) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterObservabilitySpec. -func (in *MultiClusterObservabilitySpec) DeepCopy() *MultiClusterObservabilitySpec { - if in == nil { - return nil - } - out := new(MultiClusterObservabilitySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MultiClusterObservabilityStatus) DeepCopyInto(out *MultiClusterObservabilityStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]shared.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterObservabilityStatus. -func (in *MultiClusterObservabilityStatus) DeepCopy() *MultiClusterObservabilityStatus { - if in == nil { - return nil - } - out := new(MultiClusterObservabilityStatus) - in.DeepCopyInto(out) - return out -} // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ObservabilityAddon) DeepCopyInto(out *ObservabilityAddon) { @@ -244,22 +123,4 @@ func (in *StatusCondition) DeepCopy() *StatusCondition { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StorageConfigObject) DeepCopyInto(out *StorageConfigObject) { - *out = *in - if in.MetricObjectStorage != nil { - in, out := &in.MetricObjectStorage, &out.MetricObjectStorage - *out = new(shared.PreConfiguredStorage) - **out = **in - } -} -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageConfigObject. -func (in *StorageConfigObject) DeepCopy() *StorageConfigObject { - if in == nil { - return nil - } - out := new(StorageConfigObject) - in.DeepCopyInto(out) - return out -} diff --git a/operators/multiclusterobservability/bundle/manifests/multicluster-observability-operator.clusterserviceversion.yaml b/operators/multiclusterobservability/bundle/manifests/multicluster-observability-operator.clusterserviceversion.yaml index 77508b297..f946ba032 100644 --- a/operators/multiclusterobservability/bundle/manifests/multicluster-observability-operator.clusterserviceversion.yaml +++ b/operators/multiclusterobservability/bundle/manifests/multicluster-observability-operator.clusterserviceversion.yaml @@ -4,22 +4,6 @@ metadata: annotations: alm-examples: |- [ - { - "apiVersion": "observability.open-cluster-management.io/v1beta1", - "kind": "MultiClusterObservability", - "metadata": { - "name": "observability" - }, - "spec": { - "observabilityAddonSpec": {}, - "storageConfigObject": { - "metricObjectStorage": { - "key": "thanos.yaml", - "name": "thanos-object-storage" - } - } - } - }, { "apiVersion": "observability.open-cluster-management.io/v1beta1", "kind": "ObservabilityAddon", @@ -57,11 +41,6 @@ spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - description: MultiClusterObservability defines the configuration for the Observability installation on Hub and Managed Clusters all through this one custom resource. - displayName: MultiClusterObservability - kind: MultiClusterObservability - name: multiclusterobservabilities.observability.open-cluster-management.io - version: v1beta1 - description: MultiClusterObservability defines the configuration for the Observability installation on Hub and Managed Clusters all through this one custom resource. displayName: MultiClusterObservability kind: MultiClusterObservability diff --git a/operators/multiclusterobservability/bundle/manifests/observability.open-cluster-management.io_multiclusterobservabilities.yaml b/operators/multiclusterobservability/bundle/manifests/observability.open-cluster-management.io_multiclusterobservabilities.yaml index 7c449d53f..351e180a0 100644 --- a/operators/multiclusterobservability/bundle/manifests/observability.open-cluster-management.io_multiclusterobservabilities.yaml +++ b/operators/multiclusterobservability/bundle/manifests/observability.open-cluster-management.io_multiclusterobservabilities.yaml @@ -30,219 +30,6 @@ spec: singular: multiclusterobservability scope: Cluster versions: - - deprecated: true - deprecationWarning: observability.open-cluster-management.io/v1beta1 MultiClusterObservability is deprecated in v2.3+, unavailable in v2.6+; use observability.open-cluster-management.io/v1beta2 MultiClusterObservability - name: v1beta1 - schema: - openAPIV3Schema: - description: MultiClusterObservability defines the configuration for the Observability installation on Hub and Managed Clusters all through this one custom resource. - 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: MultiClusterObservabilitySpec defines the desired state of MultiClusterObservability. - properties: - availabilityConfig: - default: High - description: 'ReplicaCount for HA support. Does not affect data stores. Enabled will toggle HA support. This will provide better support in cases of failover but consumes more resources. Options are: Basic and High (default).' - type: string - enableDownSampling: - default: false - description: Enable or disable the downsample. The default value is false. This is not recommended as querying long time ranges without non-downsampled data is not efficient and useful. - type: boolean - imagePullPolicy: - default: IfNotPresent - description: Pull policy of the MultiClusterObservability images - type: string - imagePullSecret: - default: multiclusterhub-operator-pull-secret - description: Pull secret of the MultiClusterObservability images - type: string - nodeSelector: - additionalProperties: - type: string - description: Spec of NodeSelector - type: object - observabilityAddonSpec: - description: The ObservabilityAddonSpec defines the global settings for all managed clusters which have observability add-on enabled. - properties: - enableMetrics: - default: true - description: EnableMetrics indicates the observability addon push metrics to hub server. - type: boolean - interval: - default: 300 - description: Interval for the observability addon push metrics to hub server. - format: int32 - maximum: 3600 - minimum: 15 - type: integer - resources: - description: Resource requirement for metrics-collector - properties: - claims: - description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable. It can only be set for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - type: object - retentionResolution1h: - default: 30d - description: How long to retain samples of resolution 2 (1 hour) in bucket. - type: string - retentionResolution5m: - default: 14d - description: How long to retain samples of resolution 1 (5 minutes) in bucket. - type: string - retentionResolutionRaw: - default: 5d - description: How long to retain raw samples in a bucket. - type: string - storageConfigObject: - description: Specifies the storage to be used by Observability - properties: - metricObjectStorage: - description: Object store config secret for metrics - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. Refer to https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage for a valid content of key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - serviceAccountProjection: - description: serviceAccountProjection indicates whether mount service account token to thanos pods. Default is false. - type: boolean - tlsSecretMountPath: - description: TLS secret mount path for the custom certificate for the object store - type: string - tlsSecretName: - description: TLS secret contains the custom certificate for the object store - type: string - required: - - key - - name - type: object - statefulSetSize: - default: 10Gi - description: The amount of storage applied to the Observability stateful sets, i.e. Thanos store, Rule, compact and receiver. - type: string - statefulSetStorageClass: - default: gp2 - description: "\tSpecify the storageClass Stateful Sets. This storage class will also be used for Object Storage if MetricObjectStorage was configured for the system to create the storage." - type: string - type: object - tolerations: - description: Tolerations causes all components to tolerate any taints. - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - type: object - status: - description: MultiClusterObservabilityStatus defines the observed state of MultiClusterObservability. - properties: - conditions: - description: Represents the status of each deployment - items: - description: Condition is from metav1.Condition. Cannot use it directly because the upgrade issue. Have to mark LastTransitionTime and Status as optional. - 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. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - 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: - - message - - reason - - type - type: object - type: array - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - served: true - storage: false - subresources: - status: {} - name: v1beta2 schema: openAPIV3Schema: diff --git a/operators/multiclusterobservability/config/crd/bases/observability.open-cluster-management.io_multiclusterobservabilities.yaml b/operators/multiclusterobservability/config/crd/bases/observability.open-cluster-management.io_multiclusterobservabilities.yaml index 180cce973..1be535a7f 100644 --- a/operators/multiclusterobservability/config/crd/bases/observability.open-cluster-management.io_multiclusterobservabilities.yaml +++ b/operators/multiclusterobservability/config/crd/bases/observability.open-cluster-management.io_multiclusterobservabilities.yaml @@ -18,291 +18,6 @@ spec: singular: multiclusterobservability scope: Cluster versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: MultiClusterObservability defines the configuration for the Observability - installation on Hub and Managed Clusters all through this one custom resource. - 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: MultiClusterObservabilitySpec defines the desired state of - MultiClusterObservability. - properties: - availabilityConfig: - default: High - description: 'ReplicaCount for HA support. Does not affect data stores. - Enabled will toggle HA support. This will provide better support - in cases of failover but consumes more resources. Options are: Basic - and High (default).' - type: string - enableDownSampling: - default: false - description: Enable or disable the downsample. The default value is - false. This is not recommended as querying long time ranges without - non-downsampled data is not efficient and useful. - type: boolean - imagePullPolicy: - default: IfNotPresent - description: Pull policy of the MultiClusterObservability images - type: string - imagePullSecret: - default: multiclusterhub-operator-pull-secret - description: Pull secret of the MultiClusterObservability images - type: string - nodeSelector: - additionalProperties: - type: string - description: Spec of NodeSelector - type: object - observabilityAddonSpec: - description: The ObservabilityAddonSpec defines the global settings - for all managed clusters which have observability add-on enabled. - properties: - enableMetrics: - default: true - description: EnableMetrics indicates the observability addon push - metrics to hub server. - type: boolean - interval: - default: 300 - description: Interval for the observability addon push metrics - to hub server. - format: int32 - maximum: 3600 - minimum: 15 - type: integer - resources: - description: Resource requirement for metrics-collector - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - type: object - retentionResolution1h: - default: 30d - description: How long to retain samples of resolution 2 (1 hour) in - bucket. - type: string - retentionResolution5m: - default: 14d - description: How long to retain samples of resolution 1 (5 minutes) - in bucket. - type: string - retentionResolutionRaw: - default: 5d - description: How long to retain raw samples in a bucket. - type: string - storageConfigObject: - description: Specifies the storage to be used by Observability - properties: - metricObjectStorage: - description: Object store config secret for metrics - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. Refer to https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage - for a valid content of key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - serviceAccountProjection: - description: serviceAccountProjection indicates whether mount - service account token to thanos pods. Default is false. - type: boolean - tlsSecretMountPath: - description: TLS secret mount path for the custom certificate - for the object store - type: string - tlsSecretName: - description: TLS secret contains the custom certificate for - the object store - type: string - required: - - key - - name - type: object - statefulSetSize: - default: 10Gi - description: The amount of storage applied to the Observability - stateful sets, i.e. Thanos store, Rule, compact and receiver. - type: string - statefulSetStorageClass: - default: gp2 - description: "\tSpecify the storageClass Stateful Sets. This storage - class will also be used for Object Storage if MetricObjectStorage - was configured for the system to create the storage." - type: string - type: object - tolerations: - description: Tolerations causes all components to tolerate any taints. - items: - description: The pod this Toleration is attached to tolerates any - taint that matches the triple using the matching - operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty - means match all taint effects. When specified, allowed values - are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match all - values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the - value. Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod - can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time - the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. By default, it - is not set, which means tolerate the taint forever (do not - evict). Zero and negative values will be treated as 0 (evict - immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - type: object - status: - description: MultiClusterObservabilityStatus defines the observed state - of MultiClusterObservability. - properties: - conditions: - description: Represents the status of each deployment - items: - description: Condition is from metav1.Condition. Cannot use it directly - because the upgrade issue. Have to mark LastTransitionTime and - Status as optional. - 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. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - 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: - - message - - reason - - type - type: object - type: array - type: object - type: object - x-kubernetes-preserve-unknown-fields: true - served: true - storage: false - deprecationWarning: observability.open-cluster-management.io/v1beta1 MultiClusterObservability is deprecated in v2.3+, unavailable in v2.6+; use observability.open-cluster-management.io/v1beta2 MultiClusterObservability - deprecated: true - subresources: - status: {} - name: v1beta2 schema: openAPIV3Schema: diff --git a/operators/multiclusterobservability/config/manifests/bases/multicluster-observability-operator.clusterserviceversion.yaml b/operators/multiclusterobservability/config/manifests/bases/multicluster-observability-operator.clusterserviceversion.yaml index 0ed34592c..907eba2a7 100644 --- a/operators/multiclusterobservability/config/manifests/bases/multicluster-observability-operator.clusterserviceversion.yaml +++ b/operators/multiclusterobservability/config/manifests/bases/multicluster-observability-operator.clusterserviceversion.yaml @@ -10,11 +10,6 @@ spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - description: MultiClusterObservability defines the configuration for the Observability installation on Hub and Managed Clusters all through this one custom resource. - displayName: MultiClusterObservability - kind: MultiClusterObservability - name: multiclusterobservabilities.observability.open-cluster-management.io - version: v1beta1 - description: MultiClusterObservability defines the configuration for the Observability installation on Hub and Managed Clusters all through this one custom resource. displayName: MultiClusterObservability kind: MultiClusterObservability diff --git a/operators/multiclusterobservability/config/samples/kustomization.yaml b/operators/multiclusterobservability/config/samples/kustomization.yaml index f79069338..0eb874038 100644 --- a/operators/multiclusterobservability/config/samples/kustomization.yaml +++ b/operators/multiclusterobservability/config/samples/kustomization.yaml @@ -1,6 +1,5 @@ ## Append samples you want in your CSV to this file as resources ## resources: -- observability_v1beta1_multiclusterobservability.yaml - observability_v1beta2_multiclusterobservability.yaml - observability_v1beta1_observabilityaddon.yaml # +kubebuilder:scaffold:manifestskustomizesamples diff --git a/operators/multiclusterobservability/config/samples/observability_v1beta1_multiclusterobservability.yaml b/operators/multiclusterobservability/config/samples/observability_v1beta1_multiclusterobservability.yaml deleted file mode 100644 index 6e9b27557..000000000 --- a/operators/multiclusterobservability/config/samples/observability_v1beta1_multiclusterobservability.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: observability.open-cluster-management.io/v1beta1 -kind: MultiClusterObservability -metadata: - name: observability -spec: - observabilityAddonSpec: {} - storageConfigObject: - metricObjectStorage: - name: thanos-object-storage - key: thanos.yaml diff --git a/tests/pkg/tests/observability_install_test.go b/tests/pkg/tests/observability_install_test.go index 485196ba3..2b29b361c 100644 --- a/tests/pkg/tests/observability_install_test.go +++ b/tests/pkg/tests/observability_install_test.go @@ -6,7 +6,6 @@ package tests import ( "context" - "errors" "fmt" "os" "time" @@ -88,60 +87,6 @@ func installMCO() { By("Creating the MCO testing RBAC resources") Expect(utils.CreateMCOTestingRBAC(testOptions)).NotTo(HaveOccurred()) - if os.Getenv("SKIP_INTEGRATION_CASES") != trueStr { - By("Creating MCO instance of v1beta1") - v1beta1KustomizationPath := "../../../examples/mco/e2e/v1beta1" - yamlB, err = kustomize.Render(kustomize.Options{KustomizationPath: v1beta1KustomizationPath}) - Expect(err).NotTo(HaveOccurred()) - Expect( - utils.Apply( - testOptions.HubCluster.ClusterServerURL, - testOptions.KubeConfig, - testOptions.HubCluster.KubeContext, - yamlB, - )).NotTo(HaveOccurred()) - - By("Waiting for MCO ready status") - allPodsIsReady := false - Eventually(func() error { - instance, err := dynClient.Resource(utils.NewMCOGVRV1BETA1()). - Get(context.TODO(), MCO_CR_NAME, metav1.GetOptions{}) - if err == nil { - allPodsIsReady = utils.StatusContainsTypeEqualTo(instance, "Ready") - if allPodsIsReady { - testFailed = false - return nil - } - } - testFailed = true - if instance != nil && instance.Object != nil { - return fmt.Errorf( - "MCO componnets cannot be running in 20 minutes. check the MCO CR status for the details: %v", - instance.Object["status"], - ) - } else { - return errors.New("Wait for reconciling.") - } - }, EventuallyTimeoutMinute*20, EventuallyIntervalSecond*5).Should(Succeed()) - - By("Check clustermanagementaddon CR is created") - Eventually(func() error { - _, err := dynClient.Resource(utils.NewMCOClusterManagementAddonsGVR()). - Get(context.TODO(), "observability-controller", metav1.GetOptions{}) - if err != nil { - testFailed = true - return err - } - testFailed = false - return nil - }, EventuallyTimeoutMinute*5, EventuallyIntervalSecond*5).Should(Succeed()) - - By("Check the api conversion is working as expected") - v1beta1Tov1beta2GoldenPath := "../../../examples/mco/e2e/v1beta1/observability-v1beta1-to-v1beta2-golden.yaml" - err = utils.CheckMCOConversion(testOptions, v1beta1Tov1beta2GoldenPath) - Expect(err).NotTo(HaveOccurred()) - } - if os.Getenv("IS_CANARY_ENV") != trueStr { By("Recreating Minio-tls as object storage") //set resource quota and limit range for canary environment to avoid destruct the node