Skip to content

Commit

Permalink
ci: check deployment error
Browse files Browse the repository at this point in the history
Signed-off-by: Rory Z <[email protected]>
  • Loading branch information
Rory-Z committed Apr 10, 2024
1 parent ca67358 commit 23d8bcf
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 18 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/cts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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] }}"
18 changes: 9 additions & 9 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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] }}"
7 changes: 7 additions & 0 deletions config/samples/emqx/v2beta1/emqx-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
revisionHistoryLimit: 3
config:
data: |
log.console.level = debug
dashboard.listeners.http.bind = 18083
sysmon.vm.long_schedule = disabled
coreTemplate:
Expand All @@ -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:
Expand Down
11 changes: 11 additions & 0 deletions config/samples/emqx/v2beta1/emqx-slim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 23d8bcf

Please sign in to comment.