Skip to content

chore(admin): move watch diagnostics to a module #58

chore(admin): move watch diagnostics to a module

chore(admin): move watch diagnostics to a module #58

Workflow file for this run

name: Pull Request
on: pull_request
permissions:
contents: read
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
changed:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- id: build
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366
with:
files: |
.github/workflows/pr.yml
justfile
examples/Dockerfile
- id: markdown
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366
with:
files: |
**/*.md
- id: actions
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366
with:
files: |
.github/workflows/**
.devcontainer/*
- id: kubert
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366
with:
files: |
Cargo.toml
kubert/**
- id: kubert-prometheus-process
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366
with:
files: |
Cargo.toml
kubert-prometheus-process/**
- id: kubert-prometheus-tokio
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366
with:
files: |
Cargo.toml
kubert-prometheus-tokio/**
- id: cargo
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366
with:
files: |
**/Cargo.toml
- id: deny
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366
with:
files: |
deny.toml
- id: rust
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366
with:
files: |
**/*.rs
outputs:
by-dependabot: ${{ github.actor == 'dependabot[bot]' }}
any: >-
${{
steps.build.outputs.any_changed == 'true' ||
steps.actions.outputs.any_changed == 'true' ||
steps.markdown.outputs.any_changed == 'true' ||
steps.kubert.outputs.any_change == 'true' ||
steps.kubert-prometheus-process.outputs.any_change == 'true' ||
steps.kubert-prometheus-tokio.outputs.any_change == 'true' ||
steps.cargo.outputs.any_changed == 'true' ||
steps.deny.outputs.any_changed == 'true' ||
steps.rust.outputs.any_changed == 'true'
}}
build: ${{ steps.build.outputs.any_changed == 'true' }}
actions: ${{ steps.actions.outputs.any_changed == 'true' }}
cargo: ${{ steps.cargo.outputs.any_changed == 'true' }}
deny: ${{ steps.deny.outputs.any_changed == 'true' }}
kubert: ${{ steps.kubert.outputs.any_changed == 'true' }}
kubert-prometheus-process: ${{ steps.kubert-prometheus-process.outputs.any_changed == 'true' }}
kubert-prometheus-tokio: ${{ steps.kubert-prometheus-tokio.outputs.any_changed == 'true' }}
rust: ${{ steps.rust.outputs.any_changed == 'true' }}
markdown: ${{ steps.markdown.outputs.any_changed == 'true' }}
info:
timeout-minutes: 3
needs: changed
runs-on: ubuntu-latest
steps:
- name: changed.outputs
run: |
jq . <<EOF
${{ toJson(needs.changed.outputs) }}
EOF
fmt:
needs: changed
if: needs.changed.outputs.rust == 'true' || needs.changed.outputs.build == 'true'
timeout-minutes: 5
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v44-rust
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: just fmt-check
doc:
needs: changed
if: needs.changed.outputs.rust == 'true' || needs.changed.outputs.cargo == 'true' || needs.changed.outputs.build == 'true'
timeout-minutes: 10
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v44-rust
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3
- run: just fetch
- run: just doc
deny:
needs: changed
if: needs.changed.outputs.cargo == 'true' || needs.changed.outputs.deny == 'true' || needs.changed.outputs.build == 'true'
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources
# Prevent sudden announcement of a new advisory from failing Ci.
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: EmbarkStudios/cargo-deny-action@3f4a782664881cf5725d0ffd23969fcce89fd868
with:
command: check ${{ matrix.checks }}
kubert-check-all:
needs: changed
if: needs.changed.outputs.kubert == 'true' || needs.changed.outputs.build == 'true'
strategy:
matrix:
rust:
- "1.81"
- "1.83"
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v44
- uses: linkerd/dev/actions/setup-rust@v44
with:
version: ${{ matrix.rust }}
components: clippy
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3
- run: just fetch
- run: just features=all clippy
- run: just test-build
- run: just test
kubert-check-feature:
needs: changed
if: needs.changed.outputs.kubert == 'true' || needs.changed.outputs.build == 'true'
strategy:
matrix:
feature:
- admin
- admin,prometheus-client
- client
- client,rustls-tls
- client,openssl-tls
- errors
- index
- initialized
- lease
- log
- prometheus-client
- requeue
- runtime
- runtime,lease
- runtime,runtime-diagnostics
- runtime,runtime-diagnostics,lease,prometheus-client
- server
- server,rustls-tls
- server,openssl-tls
- shutdown
timeout-minutes: 10
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v44-rust
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3
- run: just fetch
- run: just "features=${{ matrix.feature }}" clippy
kubert-client-local:
needs: changed
if: needs.changed.outputs.kubert == 'true' || needs.changed.outputs.build == 'true'
strategy:
matrix:
k8s:
- v1.21
- v1.31
tls:
- openssl-tls
- rustls-tls
timeout-minutes: 30 # building with OpenSSL can be quite slow...
runs-on: ubuntu-latest
env:
KUBERT_TEST_CLUSTER_VERSION: ${{ matrix.k8s }}
steps:
- uses: linkerd/dev/actions/setup-tools@v44
- uses: linkerd/dev/actions/setup-rust@v44
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3
- run: just fetch
- run: just features=${{ matrix.tls }} build-examples
- run: just features=${{ matrix.tls }} test-cluster-create
- run: just features=${{ matrix.tls }} test-cluster-run-watch-pods --log-level=debug
- run: just features=${{ matrix.tls }} test-cluster-create-ns
- name: Run just test-cluster-run-watch-pods with impersonation
run: |
just features=${{ matrix.tls }} \
test-cluster-run-watch-pods \
--log-level=debug \
--as=system:serviceaccount:${KUBERT_TEST_NS}:watch-pods \
--kubeconfig=$HOME/.kube/config
- run: just features=${{ matrix.tls }} test-lease-build
- run: just features=${{ matrix.tls }} test-lease
kubert-client-in-cluster:
needs: changed
if: needs.changed.outputs.kubert == 'true' || needs.changed.outputs.build == 'true'
strategy:
matrix:
k8s:
- v1.21
- v1.31
tls:
- openssl-tls
- rustls-tls
timeout-minutes: 15
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KUBERT_TEST_CLUSTER_VERSION: ${{ matrix.k8s }}
KUBERT_TEST_NS: kubert-test
steps:
- uses: linkerd/dev/actions/setup-tools@v44
- uses: linkerd/dev/actions/setup-rust@v44
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: just features=${{ matrix.tls }} build-examples-image
- run: just features=${{ matrix.tls }} test-cluster-create
- run: just features=${{ matrix.tls }} test-cluster-import-examples
- run: just features=${{ matrix.tls }} test-cluster-create-ns
- run: just features=${{ matrix.tls }} test-cluster-deploy-watch-pods --log-level=debug
kubert-prometheus-process:
needs: changed
if: needs.changed.outputs.kubert-prometheus-process == 'true' || needs.changed.outputs.build == 'true'
strategy:
matrix:
rust:
- "1.81"
- "1.83"
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v44
- uses: linkerd/dev/actions/setup-rust@v44
with:
version: ${{ matrix.rust }}
components: clippy
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3
- run: just fetch
- run: just-cargo clippy -p kubert-prometheus-process
#- run: just-cargo test -p kubert-prometheus-process
kubert-prometheus-tokio:
needs: changed
if: needs.changed.outputs.kubert-prometheus-tokio == 'true' || needs.changed.outputs.build == 'true'
strategy:
matrix:
rust:
- "1.81"
- "1.83"
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v44
- uses: linkerd/dev/actions/setup-rust@v44
with:
version: ${{ matrix.rust }}
components: clippy
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3
- run: just fetch
- run: just-cargo clippy -p kubert-prometheus-tokio
#- run: just-cargo test -p kubert-prometheus-tokio
markdown:
needs: changed
if: needs.changed.outputs.markdown == 'true' || needs.changed.outputs.build == 'true'
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: DavidAnson/markdownlint-cli2-action@a23dae216ce3fee4db69da41fed90d2a4af801cf
with:
globs: |
**/*.md
!**/node_modules/**
!target/**
pr-ok:
needs:
- deny
- doc
- fmt
- kubert-check-all
- kubert-check-feature
- kubert-client-local
- kubert-client-in-cluster
- kubert-prometheus-process
- kubert-prometheus-tokio
- markdown
if: always()
timeout-minutes: 3
runs-on: ubuntu-latest
steps:
- name: Results
run: |
jq . <<EOF
${{ toJson(needs) }}
EOF
- name: Verify jobs
# All jobs must succeed or be skipped.
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1