Skip to content

Commit

Permalink
Remove MCO v1beta1 api tests and deps
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Gough <[email protected]>
  • Loading branch information
philipgough committed Apr 26, 2024
1 parent f264b1e commit 66fb66d
Show file tree
Hide file tree
Showing 15 changed files with 1 addition and 1,060 deletions.
10 changes: 1 addition & 9 deletions cicd-scripts/customize-mco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 0 additions & 2 deletions examples/mco/e2e/v1beta1/kustomization.yaml

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions examples/mco/e2e/v1beta1/observability.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions operators/multiclusterobservability/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 66fb66d

Please sign in to comment.