github.com/verrazzano/verrazzano@v1.7.1/tests/e2e/config/scripts/multicluster_edit_vz.sh (about) 1 #!/bin/bash 2 # 3 # Copyright (c) 2022, 2023, Oracle and/or its affiliates. 4 # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 5 # 6 7 # This script edits the Verrazzano CR file in yaml format to enable components that are disabled by default, 8 # but required by the multi cluster test pipeline. 9 set -x 10 CLUSTER_COUNT=${1} 11 VZ_CR_FILE=${2} 12 MINIMAL_INSTALL=${3} 13 14 if [ -n "${MINIMAL_INSTALL}" ] && [ "${MINIMAL_INSTALL}" = "true" ] ; then 15 echo "Minimal install, not applying the overrides" 16 exit 0 17 fi 18 19 yq -i eval '.spec.components.prometheusAdapter.enabled = true' "${VZ_CR_FILE}" 20 yq -i eval '.spec.components.kubeStateMetrics.enabled = true' "${VZ_CR_FILE}" 21 yq -i eval '.spec.components.prometheusPushgateway.enabled = true' "${VZ_CR_FILE}" 22 yq -i eval '.spec.components.jaegerOperator.enabled = true' "${VZ_CR_FILE}" 23 # For managed clusters, enable Jaeger operator and update the istio tracing configuration 24 if [ "${CLUSTER_COUNT}" -gt 1 ]; then 25 yq -i eval '.spec.components.istio.overrides.[0].values.apiVersion = "install.istio.io/v1alpha1"' ${VZ_CR_FILE} 26 yq -i eval '.spec.components.istio.overrides.[0].values.kind = "IstioOperator"' ${VZ_CR_FILE} 27 yq -i eval '.spec.components.istio.overrides.[0].values.spec.meshConfig.defaultConfig.tracing.sampling = 90' ${VZ_CR_FILE} 28 yq -i eval '.spec.components.istio.overrides.[0].values.spec.meshConfig.defaultConfig.tracing.zipkin.address = "jaeger-verrazzano-managed-cluster-collector.verrazzano-monitoring.svc.cluster.local.:9411"' ${VZ_CR_FILE} 29 yq -i eval '.spec.components.istio.overrides.[0].values.spec.meshConfig.enableTracing = true' ${VZ_CR_FILE} 30 fi 31 #For admin cluster only, enable Argo CD 32 if [ "${CLUSTER_COUNT}" -eq 1 ]; then 33 yq -i eval '.spec.components.argoCD.enabled = true' "${VZ_CR_FILE}" 34 fi 35 echo "VZ CR to be applied:" 36 cat "${VZ_CR_FILE}"