Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
alpeb committed Nov 30, 2023
1 parent 855de7b commit c8d5318
Show file tree
Hide file tree
Showing 28 changed files with 1,974 additions and 242 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkerd2",
"image": "ghcr.io/linkerd/dev:v39",
"image": "ghcr.io/linkerd/dev:v42",
"extensions": [
"DavidAnson.vscode-markdownlint",
"golang.go",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: linkerd/dev/actions/setup-tools@v41
- uses: linkerd/dev/actions/setup-tools@v42
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- run: just action-lint

devcontainer-versions:
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v41
- uses: linkerd/dev/actions/setup-tools@v42
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- run: just action-dev-check
8 changes: 4 additions & 4 deletions .github/workflows/cni-plugin-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v41
- uses: linkerd/dev/actions/setup-tools@v42
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- name: Run CNI integration tests
run: just cni-plugin-test-integration-flannel
Expand All @@ -24,7 +24,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v41
- uses: linkerd/dev/actions/setup-tools@v42
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- name: Run CNI integration tests
run: just cni-plugin-test-integration-calico
Expand All @@ -33,7 +33,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v41
- uses: linkerd/dev/actions/setup-tools@v42
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- name: Run CNI integration tests
run: just cni-plugin-test-integration-cilium
Expand All @@ -42,7 +42,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v41
- uses: linkerd/dev/actions/setup-tools@v42
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- name: Run CNI ordering tests
run: just cni-plugin-test-ordering
12 changes: 9 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,31 @@ on:
- go.sum
- justfile

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v39-go
container: ghcr.io/linkerd/dev:v42-go
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- run: git config --global --add safe.directory "$PWD" # actions/runner#2033
- run: just go-lint --verbose --timeout=10m

fmt:
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v39-go
container: ghcr.io/linkerd/dev:v42-go
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- run: git config --global --add safe.directory "$PWD" # actions/runner#2033
- run: just go-fmt-check

unit-test:
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v39-go
container: ghcr.io/linkerd/dev:v42-go
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- run: git config --global --add safe.directory "$PWD" # actions/runner#2033
- run: just proxy-init-test-unit

2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v41
- uses: linkerd/dev/actions/setup-tools@v42
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- name: Run proxy-init integration tests
run: just proxy-init-test-integration
2 changes: 1 addition & 1 deletion .github/workflows/release-cni-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
restore-keys: cni-plugin-${{ needs.meta.outputs.mode }}-

- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3
- uses: linkerd/dev/actions/setup-tools@v41
- uses: linkerd/dev/actions/setup-tools@v42
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- run: |
just cni-plugin-image='${{ needs.meta.outputs.repo }}:${{ needs.meta.outputs.version }}' \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-proxy-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
restore-keys: proxy-init-${{ needs.meta.outputs.mode }}-

- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3
- uses: linkerd/dev/actions/setup-tools@v41
- uses: linkerd/dev/actions/setup-tools@v42
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- run: |
just proxy-init-image='${{ needs.meta.outputs.repo }}:${{ needs.meta.outputs.version }}' \
Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/release-reinitialize-pods.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: reinitialize-pods release

on:
pull_request:
paths:
- .github/workflows/release-reinitialize-pods.yml
push:
tags: ["reinitialize-pods/v*"]

permissions:
contents: read

jobs:
meta:
timeout-minutes: 15
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v42-rust
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- id: meta
shell: bash
run: |
set -eu
shopt -s extglob
ref="${{ github.ref }}"
if [[ "$ref" == refs/tags/reinitialize-pods/v+([0-9]).+([0-9]).+([0-9])?(-+([a-z0-9-])) ]]; then
( echo version="${ref##refs/tags/reinitialize-pods/}"
echo mode=release
) >> "$GITHUB_OUTPUT"
else
sha="${{ github.sha }}"
( echo version="$(just reinitialize-pods --evaluate version)-${sha:0:7}"
echo mode=test
) >> "$GITHUB_OUTPUT"
fi
- if: steps.meta.outputs.mode == 'release'
name: Check that reinitialize-pods version matches release version
shell: bash
run: |
version=$(just reinitialize-pods --evaluate version)
# shellcheck disable=SC2193
if [[ "${version}" != '${{ steps.meta.outputs.version }}' ]]; then
echo "::error ::Crate version v${version} does not match tag ${{ steps.meta.outputs.version }}"
exit 1
fi
outputs:
mode: ${{ steps.meta.outputs.mode }}
version: ${{ steps.meta.outputs.version }}

package:
needs: meta
strategy:
matrix:
arch: [amd64, arm64, arm]
timeout-minutes: 10
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v42-rust-musl
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- run: just reinitialize-pods arch=${{ matrix.arch }} profile=release version=${{ needs.meta.outputs.version }} package
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.arch }}-artifacts
path: target/package/

publish:
needs: [meta, package]
timeout-minutes: 5
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
path: ${{ runner.temp }}/artifacts
- run: find "$RUNNER_TEMP"/artifacts -type f -ls
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- if: needs.meta.outputs.mode == 'release'
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
name: reinitialize-pods ${{ needs.meta.outputs.version }}
files: ${{ runner.temp }}/artifacts/**/*
4 changes: 2 additions & 2 deletions .github/workflows/release-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
meta:
timeout-minutes: 15
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v39-rust
container: ghcr.io/linkerd/dev:v42-rust
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- id: meta
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
arch: [amd64, arm64, arm]
timeout-minutes: 10
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v39-rust-musl
container: ghcr.io/linkerd/dev:v42-rust-musl
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- run: just validator arch=${{ matrix.arch }} profile=release version=${{ needs.meta.outputs.version }} package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
check:
timeout-minutes: 5
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v39-rust
container: ghcr.io/linkerd/dev:v42-rust
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- run: just rs-fetch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v41
- uses: linkerd/dev/actions/setup-tools@v42
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- run: just sh-lint
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
linters:
enable:
- depguard
- errcheck
- errorlint
- exportloopref
Expand All @@ -18,6 +17,7 @@ linters:
- unconvert
- unused
## TODO: enable more linters!
# - depguard
# - dupl
# - gochecknoglobals
# - gochecknoinits
Expand Down
Loading

0 comments on commit c8d5318

Please sign in to comment.