Skip to content

Fail if pod with CrashLoopBackOff state #162

Open
@patsevanton

Description

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 ?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions