From 9cab4fe45394a30208e73ed7134ca751831c62a9 Mon Sep 17 00:00:00 2001 From: Ramon de Klein Date: Thu, 17 Oct 2024 15:55:40 +0200 Subject: [PATCH] Show operator logging --- resources/base/deployment.yaml | 1 + shared-functions/shared-code.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/resources/base/deployment.yaml b/resources/base/deployment.yaml index 1beac815e95..2c4e52c3feb 100644 --- a/resources/base/deployment.yaml +++ b/resources/base/deployment.yaml @@ -25,6 +25,7 @@ spec: - name: minio-operator image: minio/operator:v6.0.4 imagePullPolicy: IfNotPresent + restartPolicy: Never args: - controller resources: diff --git a/shared-functions/shared-code.sh b/shared-functions/shared-code.sh index 93d365c6a2a..a4bf8d7213c 100755 --- a/shared-functions/shared-code.sh +++ b/shared-functions/shared-code.sh @@ -21,6 +21,12 @@ function wait_for_resource() { echo $command_to_wait while true; do + echo Operator log: + kubectl get pods -n minio-operator -l app.kubernetes.io/name=operator + kubectl logs -n minio-operator --prefix -l app.kubernetes.io/name=operator + echo + echo Pods: + kubectl -n $1 get pods -l $3=$2 --no-headers waitdone=$($command_to_wait | wc -l) if [ "$waitdone" -ne 0 ]; then echo "Found $waitdone pods"