You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2024/01/17 16:19:36 UTC

(pulsar-helm-chart) branch master updated (e49bd32 -> 89602c3)

This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git


    from e49bd32  Fix indent for Tiered storage offload environment
     new 23211c9  Fix creating namespace for cert-manager deployment
     new 89602c3  Improve functions testing logging

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .ci/helm.sh                                  | 26 +++++++++++++++++++++++++-
 scripts/cert-manager/install-cert-manager.sh | 11 +----------
 2 files changed, 26 insertions(+), 11 deletions(-)


(pulsar-helm-chart) 02/02: Improve functions testing logging

Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git

commit 89602c39e2666a05e152d81ad3f53e7e56c7a13d
Author: Lari Hotari <lh...@apache.org>
AuthorDate: Wed Jan 17 17:03:56 2024 +0200

    Improve functions testing logging
---
 .ci/helm.sh | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/helm.sh b/.ci/helm.sh
index bfc87b3..ffc0e50 100644
--- a/.ci/helm.sh
+++ b/.ci/helm.sh
@@ -285,20 +285,44 @@ function ci::test_pulsar_producer_consumer() {
 
 function ci::wait_function_running() {
     num_running=$(${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bash -c 'bin/pulsar-admin functions status --tenant pulsar-ci --namespace test --name test-function' | jq .numRunning)
+    counter=1
     while [[ ${num_running} -lt 1 ]]; do
+      ((counter++))
+      if [[ $counter -gt 6 ]]; then
+        echo >&2 "Timeout waiting..."
+        return 1
+      fi
       echo "Waiting 15 seconds for function to be running"
       sleep 15
-      ${KUBECTL} get pods -n ${NAMESPACE} --field-selector=status.phase=Running
+      ${KUBECTL} get pods -n ${NAMESPACE} -l component=function || true
       ${KUBECTL} get events --sort-by=.lastTimestamp -A | tail -n 30 || true
+      podname=$(${KUBECTL} get pods -l component=function -n ${NAMESPACE} --no-headers -o custom-columns=":metadata.name") || true
+      if [[ -n "$podname" ]]; then
+        echo "Function pod is $podname"
+        ${KUBECTL} describe pod -n ${NAMESPACE} $podname
+        echo "Function pod logs"
+        ${KUBECTL} logs -n ${NAMESPACE} $podname
+      fi
       num_running=$(${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bash -c 'bin/pulsar-admin functions status --tenant pulsar-ci --namespace test --name test-function' | jq .numRunning)
     done
 }
 
 function ci::wait_message_processed() {
     num_processed=$(${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bash -c 'bin/pulsar-admin functions stats --tenant pulsar-ci --namespace test --name test-function' | jq .processedSuccessfullyTotal)
+    podname=$(${KUBECTL} get pods -l component=function -n ${NAMESPACE} --no-headers -o custom-columns=":metadata.name")
+    counter=1
     while [[ ${num_processed} -lt 1 ]]; do
+      ((counter++))
+      if [[ $counter -gt 6 ]]; then
+        echo >&2 "Timeout waiting..."
+        return 1
+      fi
       echo "Waiting 15 seconds for message to be processed"
       sleep 15
+      echo "Function pod is $podname"
+      ${KUBECTL} describe pod -n ${NAMESPACE} $podname
+      echo "Function pod logs"
+      ${KUBECTL} logs -n ${NAMESPACE} $podname
       ${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-admin functions stats --tenant pulsar-ci --namespace test --name test-function
       num_processed=$(${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bash -c 'bin/pulsar-admin functions stats --tenant pulsar-ci --namespace test --name test-function' | jq .processedSuccessfullyTotal)
     done


(pulsar-helm-chart) 01/02: Fix creating namespace for cert-manager deployment

Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git

commit 23211c998ab993285353519453010dcb15f64864
Author: Lari Hotari <lh...@apache.org>
AuthorDate: Wed Jan 17 17:50:38 2024 +0200

    Fix creating namespace for cert-manager deployment
---
 scripts/cert-manager/install-cert-manager.sh | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/scripts/cert-manager/install-cert-manager.sh b/scripts/cert-manager/install-cert-manager.sh
index 403902e..4cbecf9 100755
--- a/scripts/cert-manager/install-cert-manager.sh
+++ b/scripts/cert-manager/install-cert-manager.sh
@@ -31,16 +31,6 @@ VERSION=v1.11.4
 echo "Installing cert-manager CRD resources ..."
 kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/${VERSION}/cert-manager.crds.yaml
 
-# Create the namespace 
-kubectl get ns ${NAMESPACE}
-if [ $? == 0 ]; then
-    echo "Namespace '${NAMESPACE}' already exists."
-else
-    echo "Creating namespace '${NAMESPACE}' ..."
-    kubectl create namespace ${NAMESPACE}
-    echo "Successfully created namespace '${NAMESPACE}'."
-fi
-
 # Add the Jetstack Helm repository.
 echo "Adding Jetstack Helm repository."
 helm repo add jetstack https://charts.jetstack.io
@@ -53,6 +43,7 @@ helm repo update
 echo "Installing cert-manager ${VERSION} to namespace ${NAMESPACE} as '${NAME}' ..."
 helm install \
   --namespace ${NAMESPACE} \
+  --create-namespace \
   --version ${VERSION} \
   ${NAME} \
   jetstack/cert-manager