/action-k8s-namespace-report

GitHub Action to report info and logs from the current namespace.

Primary LanguageShellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

GitHub Action: Emit a k8s namespace report

GitHub Action badge

GitHub Action to report info and logs from the current namespace.

Optional input parameters

  • namespace: Emit a report for another namespace than the kubeconfig's current context.
  • pod-selector: Limit pod reporting to pods with certain labels, example: app.kubernetes.io/component notin (secret-server,boring-server).
  • important-workloads: Always provide logs of these workloads. Use space a separator, example: deploy/my-deployment sts/my-statefulset.

Example

name: Example workflow

on:
  pull_request:
  push:
  workflow_dispatch:

jobs:
  k8s-test:
    runs-on: ubuntu-22.04
    steps:
      # GitHub Action reference: https://github.com/jupyterhub/action-k3s-helm
      - name: Setup k8s
        uses: jupyterhub/action-k3s-helm@v4
        with:
          k3s-channel: stable    # https://update.k3s.io/v1-release/channels

      # GitHub Action reference: https://github.com/jupyterhub/action-k8s-namespace-report
      - name: Kubernetes namespace report
        uses: jupyterhub/action-k8s-namespace-report@v1
        if: always()
        # with:
        #   namespace: my-namespace
        #   pod-selector: app.kubernetes.io/component notin (secret-server,boring-server)
        #   important-workloads: deploy/my-deployment sts/my-statefulset

Preview

Live example

You can inspect recent test runs here.

GIF Animation