GitHub Action to report info and logs from the current namespace.
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
.
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
Live example
You can inspect recent test runs here.
GIF Animation