Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail if pod with CrashLoopBackOff state #162

Open
patsevanton opened this issue Oct 15, 2024 · 0 comments
Open

Fail if pod with CrashLoopBackOff state #162

patsevanton opened this issue Oct 15, 2024 · 0 comments

Comments

@patsevanton
Copy link

patsevanton commented Oct 15, 2024

Hello!
I try check pods in all namespaces in github action

name: Lint and Test Charts

on: pull_request

jobs:
  lint-test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Set up Helm
        uses: azure/[email protected]
        with:
          version: v3.14.4

      - uses: actions/setup-python@v5
        with:
          python-version: '3.x'
          check-latest: true

      - name: Set up chart-testing
        uses: helm/[email protected]

      - name: Add Helm Repositories
        run: |
          helm repo add sentry-kubernetes https://sentry-kubernetes.github.io/charts
          helm repo update

      - name: Run chart-testing (list-changed)
        id: list-changed
        run: |
          changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
          if [[ -n "$changed" ]]; then
            echo "changed=true" >> "$GITHUB_OUTPUT"
          fi

      - name: Run chart-testing (lint)
        if: steps.list-changed.outputs.changed == 'true'
        run: ct lint --target-branch ${{ github.event.repository.default_branch }} --check-version-increment=false

      - name: Create kind cluster
        if: steps.list-changed.outputs.changed == 'true'
        uses: helm/[email protected]

      - name: Run chart-testing (install)
        if: steps.list-changed.outputs.changed == 'true'
        run: ct install --target-branch ${{ github.event.repository.default_branch }} --helm-extra-args "--timeout 1000s"

      - name: View all pods
        if: steps.list-changed.outputs.changed == 'true'
        run: |
          kubectl get pods --all-namespaces

but i can't see pod in all namespaces

Run kubectl get pods --all-namespaces
NAMESPACE            NAME                                                  READY   STATUS    RESTARTS   AGE
kube-system          coredns-76f75df574-684hx                              1/1     Running   0          11m
kube-system          coredns-76f75df574-sf7px                              1/1     Running   0          11m
kube-system          etcd-chart-testing-control-plane                      1/1     Running   0          11m
kube-system          kindnet-7mmk5                                         1/1     Running   0          11m
kube-system          kube-apiserver-chart-testing-control-plane            1/1     Running   0          11m
kube-system          kube-controller-manager-chart-testing-control-plane   1/1     Running   0          11m
kube-system          kube-proxy-wd55x                                      1/1     Running   0          11m
kube-system          kube-scheduler-chart-testing-control-plane            1/1     Running   0          11m
local-path-storage   local-path-provisioner-7577fdbbfb-xsswh               1/1     Running   0          11m

Full log here https://github.com/sentry-kubernetes/charts/actions/runs/11345668376/job/31553067955

Code here sentry-kubernetes/charts#1546

How check pods with CrashLoopBackOff state ?

@patsevanton patsevanton changed the title Fail if pod in CrashLoopBackOff state Fail if pod with CrashLoopBackOff state Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant