From 23d8bcf882bc0185afbaca5cfaad692a78553f09 Mon Sep 17 00:00:00 2001 From: Rory Z <16801068+Rory-Z@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:44:09 +0800 Subject: [PATCH] ci: check deployment error Signed-off-by: Rory Z <16801068+Rory-Z@users.noreply.github.com> --- .github/workflows/cts.yaml | 18 +++++++++--------- .github/workflows/deploy.yaml | 18 +++++++++--------- config/samples/emqx/v2beta1/emqx-full.yaml | 7 +++++++ config/samples/emqx/v2beta1/emqx-slim.yaml | 11 +++++++++++ 4 files changed, 36 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cts.yaml b/.github/workflows/cts.yaml index 7cff44d31..708bb3552 100644 --- a/.github/workflows/cts.yaml +++ b/.github/workflows/cts.yaml @@ -141,17 +141,17 @@ jobs: kind: ${{ matrix.emqx[0] }} name: ${{ matrix.emqx[1] }} file: ${{ matrix.emqx[2] }} - - name: Make sure all of pods can be deleted - run: | - kubectl delete ${{ matrix.emqx[0] }} ${{ matrix.emqx[1] }} - kubectl wait --for=delete pods -l "apps.emqx.io/instance=${{ matrix.emqx[1] }}" - - if: failure() + - if: always() run: kubectl logs -l "control-plane=controller-manager" -n emqx-operator-system -c manager --tail=1000 - - if: failure() + - if: always() run: kubectl get ${{ matrix.emqx[0] }} ${{ matrix.emqx[1] }} -o json - - if: failure() + - if: always() run: kubectl get events --sort-by='.lastTimestamp' - - if: failure() + - if: always() run: kubectl get pods -l "apps.emqx.io/managed-by=emqx-operator" -o json - - if: failure() + - if: always() run: kubectl logs -l "apps.emqx.io/managed-by=emqx-operator" -c emqx + - name: Make sure all of pods can be deleted + run: | + kubectl delete ${{ matrix.emqx[0] }} ${{ matrix.emqx[1] }} + kubectl wait --for=delete pods -l "apps.emqx.io/instance=${{ matrix.emqx[1] }}" diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0f0ecc7ef..f620430d2 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -75,17 +75,17 @@ jobs: kind: ${{ matrix.emqx[0] }} name: ${{ matrix.emqx[1] }} file: ${{ matrix.emqx[2] }} - - name: Make sure all of pods can be deleted - run: | - kubectl delete ${{ matrix.emqx[0] }} ${{ matrix.emqx[1] }} - kubectl wait --for=delete pods -l "apps.emqx.io/instance=${{ matrix.emqx[1] }}" - - if: failure() + - if: always() run: kubectl logs -l "control-plane=controller-manager" -n emqx-operator-system -c manager --tail=1000 - - if: failure() + - if: always() run: kubectl get ${{ matrix.emqx[0] }} ${{ matrix.emqx[1] }} -o json - - if: failure() + - if: always() run: kubectl get events --sort-by='.lastTimestamp' - - if: failure() + - if: always() run: kubectl get pods -l "apps.emqx.io/managed-by=emqx-operator" -o json - - if: failure() + - if: always() run: kubectl logs -l "apps.emqx.io/managed-by=emqx-operator" -c emqx + - name: Make sure all of pods can be deleted + run: | + kubectl delete ${{ matrix.emqx[0] }} ${{ matrix.emqx[1] }} + kubectl wait --for=delete pods -l "apps.emqx.io/instance=${{ matrix.emqx[1] }}" diff --git a/config/samples/emqx/v2beta1/emqx-full.yaml b/config/samples/emqx/v2beta1/emqx-full.yaml index f19d7125b..4cab34d97 100644 --- a/config/samples/emqx/v2beta1/emqx-full.yaml +++ b/config/samples/emqx/v2beta1/emqx-full.yaml @@ -11,6 +11,7 @@ spec: revisionHistoryLimit: 3 config: data: | + log.console.level = debug dashboard.listeners.http.bind = 18083 sysmon.vm.long_schedule = disabled coreTemplate: @@ -22,6 +23,12 @@ spec: apps.emqx.io/db-role: core annotations: spec: + args: + - bash + - -c + - | + printenv |grep EMQX_ + /opt/emqx/bin/emqx foreground replicas: 2 volumeClaimTemplates: resources: diff --git a/config/samples/emqx/v2beta1/emqx-slim.yaml b/config/samples/emqx/v2beta1/emqx-slim.yaml index 865a902f5..517e8821a 100644 --- a/config/samples/emqx/v2beta1/emqx-slim.yaml +++ b/config/samples/emqx/v2beta1/emqx-slim.yaml @@ -4,3 +4,14 @@ metadata: name: emqx spec: image: emqx:5 + config: + data: | + log.console.level: debug + coreTemplate: + spec: + args: + - bash + - -c + - | + printenv |grep EMQX_ + /opt/emqx/bin/emqx foreground