diff --git a/Documentation/Storage-Configuration/Monitoring/ceph-monitoring.md b/Documentation/Storage-Configuration/Monitoring/ceph-monitoring.md index 7cb6e352ff07..46e809673735 100644 --- a/Documentation/Storage-Configuration/Monitoring/ceph-monitoring.md +++ b/Documentation/Storage-Configuration/Monitoring/ceph-monitoring.md @@ -21,8 +21,11 @@ First the Prometheus operator needs to be started in the cluster so it can watch A full explanation can be found in the [Prometheus operator repository on GitHub](https://github.com/prometheus-operator/prometheus-operator), but the quick instructions can be found here: ```console -kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.40.0/bundle.yaml +kubectl create -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.71.1/bundle.yaml ``` +!!! note + If the Prometheus Operator is already present in your cluster, the command provided above may fail. For a detailed explanation of the issue and a workaround, please refer to [this issue](https://github.com/rook/rook/issues/13459). + This will start the Prometheus operator, but before moving on, wait until the operator is in the `Running` state: @@ -247,7 +250,7 @@ To clean up all the artifacts created by the monitoring walk-through, copy/paste kubectl delete -f service-monitor.yaml kubectl delete -f prometheus.yaml kubectl delete -f prometheus-service.yaml -kubectl delete -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.40.0/bundle.yaml +kubectl delete -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.71.1/bundle.yaml ``` Then the rest of the instructions in the [Prometheus Operator docs](https://github.com/prometheus-operator/prometheus-operator#removal) can be followed to finish cleaning up. diff --git a/tests/framework/installer/ceph_installer.go b/tests/framework/installer/ceph_installer.go index 525f99d025d4..680925465974 100644 --- a/tests/framework/installer/ceph_installer.go +++ b/tests/framework/installer/ceph_installer.go @@ -520,7 +520,7 @@ func (h *CephInstaller) InstallRook() (bool, error) { if h.settings.UseHelm { // Install Prometheus so we can create the prometheus rules - args := []string{"apply", "-f", "https://raw.githubusercontent.com/coreos/prometheus-operator/v0.40.0/bundle.yaml"} + args := []string{"create", "-f", "https://raw.githubusercontent.com/coreos/prometheus-operator/v0.71.1/bundle.yaml"} _, err = h.k8shelper.MakeContext().Executor.ExecuteCommandWithOutput("kubectl", args...) if err != nil { return false, errors.Wrap(err, "failed to install prometheus") diff --git a/tests/scripts/auto-grow-storage.sh b/tests/scripts/auto-grow-storage.sh index 8871af059f36..38d5aa87030b 100755 --- a/tests/scripts/auto-grow-storage.sh +++ b/tests/scripts/auto-grow-storage.sh @@ -179,7 +179,7 @@ function growOSD(){ function creatingPrerequisites(){ echo "creating Prerequisites deployments - Prometheus Operator and Prometheus Instances" # creating Prometheus operator - kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.40.0/bundle.yaml + kubectl create -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.71.1/bundle.yaml # waiting for Prometheus operator to get ready timeout 30 sh -c "until [ $(kubectl get pod -l app.kubernetes.'io/name'=prometheus-operator -o json | jq -r '.items[0].status.phase') = Running ]; do echo 'waiting for prometheus-operator to get created' && sleep 1; done" # creating a service monitor that will watch the Rook cluster and collect metrics regularly diff --git a/tests/scripts/create-dev-cluster.sh b/tests/scripts/create-dev-cluster.sh index 3809c84b3ea9..cead784ce4ff 100755 --- a/tests/scripts/create-dev-cluster.sh +++ b/tests/scripts/create-dev-cluster.sh @@ -167,7 +167,7 @@ enable_rook_orchestrator() { enable_monitoring() { echo "Enabling monitoring" - $KUBECTL apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.40.0/bundle.yaml + $KUBECTL create -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.71.1/bundle.yaml $KUBECTL wait --for=condition=ready pod -l app.kubernetes.io/name=prometheus-operator --timeout=30s $KUBECTL apply -f monitoring/rbac.yaml $KUBECTL apply -f monitoring/service-monitor.yaml diff --git a/tests/scripts/github-action-helper.sh b/tests/scripts/github-action-helper.sh index faf23f116083..9af42bae4b99 100755 --- a/tests/scripts/github-action-helper.sh +++ b/tests/scripts/github-action-helper.sh @@ -296,7 +296,7 @@ function deploy_cluster() { fi # enable monitoring yq w -i -d0 cluster-test.yaml spec.monitoring.enabled true - kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.40.0/bundle.yaml + kubectl create -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.71.1/bundle.yaml kubectl create -f monitoring/rbac.yaml # create the cluster resources