Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support k8s 1.28 #31

Merged
merged 3 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 33 additions & 35 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
name: Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Test
Expand All @@ -22,12 +22,10 @@ jobs:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Lint
Expand All @@ -36,22 +34,22 @@ jobs:
name: Check goreleaser.yml
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- uses: goreleaser/goreleaser-action@ff11ca24a9b39f2d36796d1fbd7a4e39c182630a # v3.1.0
- uses: goreleaser/goreleaser-action@v5.0.0
with:
version: v1.11.4
version: v1.21.2
args: check -f .goreleaser.yml
test:
name: Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Test
Expand All @@ -60,46 +58,46 @@ jobs:
name: End-to-End Tests
strategy:
matrix:
k8s-version: ["1.24.12", "1.25.8", "1.26.3"]
k8s-version: ["1.26.6", "1.27.3", "1.28.0"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
- run: make start KUBERNETES_VERSION=${{ matrix.k8s-version }}
working-directory: e2e
- run: make test
working-directory: e2e
- run: make logs
working-directory: e2e
if: always()
- uses: actions/upload-artifact@v3
if: always()
with:
name: logs-${{ matrix.k8s-version }}.tar.gz
path: e2e/logs.tar.gz
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- run: make start KUBERNETES_VERSION=${{ matrix.k8s-version }}
working-directory: e2e
- run: make test
working-directory: e2e
- run: make logs
working-directory: e2e
if: always()
- uses: actions/upload-artifact@v3
if: always()
with:
name: logs-${{ matrix.k8s-version }}.tar.gz
path: e2e/logs.tar.gz
dry-run:
name: Dry-run release
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Setup tag for goreleaser
run: |
echo "GORELEASER_CURRENT_TAG=$(git describe --tags --abbrev=0 --match "v*" || echo v0.0.0)" >> $GITHUB_ENV
- name: GoReleaser
uses: goreleaser/goreleaser-action@ff11ca24a9b39f2d36796d1fbd7a4e39c182630a # v3.1.0
uses: goreleaser/goreleaser-action@v5.0.0
with:
version: v1.11.4
version: v1.21.2
args: --snapshot --skip-publish --rm-dist
- name: Test built containers
run: make container-structure-test
19 changes: 4 additions & 15 deletions .github/workflows/helm-release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
name: Release Charts

on:
push:
tags:
- 'chart-v*'

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.10.0

version: v3.11.3
- name: Check chart version
run: |
tag_version=${GITHUB_REF##*/chart-v}
Expand All @@ -29,36 +25,29 @@ jobs:
fi
- name: Packaging the chart
run: helm package ./charts/tenet/

- uses: actions/upload-artifact@v3
with:
name: helm-charts
path: ./tenet-*.tgz
retention-days: 1

publish:
name: Publish charts on GitHub Pages
runs-on: ubuntu-22.04
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: gh-pages

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.10.0

version: v3.11.3
- uses: actions/download-artifact@v3
with:
name: helm-charts

- name: Update charts index
run: helm repo index --url https://cybozu-go.github.io/tenet/ --merge index.yaml .

- run: git add .

- name: Check diffs
run: |
diffs=$(git status -s)
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
name: Lint and Test Charts

on:
pull_request:
paths:
- "charts/**"
- '!**.md'

jobs:
lint-test:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.4.0

uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # 2.6.1
- name: Run chart-testing (list-changed)
id: list-changed
run: |
Expand All @@ -32,13 +24,12 @@ jobs:
fi
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml

- name: Create kind cluster
uses: helm/kind-action@v1.5.0
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # 1.8.0
if: steps.list-changed.outputs.changed == 'true'
with:
node_image: kindest/node:v1.26.3@sha256:94eb63275ad6305210041cdb5aca87c8562cc50fa152dbec3fef8c58479db4ff

node_image: kindest/node:v1.27.3
version: v0.20.0
- name: Apply cert-manager
run: |
kubectl apply -f https://github.com/jetstack/cert-manager/releases/latest/download/cert-manager.yaml
Expand Down
68 changes: 34 additions & 34 deletions .github/workflows/mdbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,47 @@ on:
pull_request:
push:
branches:
- 'main'
- 'main'
jobs:
build:
name: Build book
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: make book
- uses: actions/upload-artifact@v3
with:
name: book
path: docs/book
retention-days: 1
- uses: actions/checkout@v4
- run: make book
- uses: actions/upload-artifact@v3
with:
name: book
path: docs/book
retention-days: 1
publish:
name: Publish book on GitHub Pages
runs-on: ubuntu-22.04
needs: build
steps:
- uses: actions/checkout@v3
with:
ref: gh-pages
# do not remove helm chart related files if present
- run: ls | grep -v -E "index.yaml|.*\.tgz" | xargs rm -rf
- uses: actions/download-artifact@v3
with:
name: book
- run: git add .
- name: Check diff
run: |
diffs=$(git status -s)
if [ "$diffs" = "" ]; then
echo "NO_DIFF=1" >> $GITHUB_ENV
else
printf "%s\n" "$diffs"
fi
- name: Commit changes
if: env.NO_DIFF != '1'
run: |
git config --global user.name 'Cybozu Neco'
git config --global user.email 'cybozu-neco@users.noreply.github.com'
git commit -m 'update'
- name: Push to gh-pages
if: github.ref == 'refs/heads/main' && env.NO_DIFF != '1'
run: git push origin gh-pages
- uses: actions/checkout@v4
with:
ref: gh-pages
# do not remove helm chart related files if present
- run: ls | grep -v -E "index.yaml|.*\.tgz" | xargs rm -rf
- uses: actions/download-artifact@v3
with:
name: book
- run: git add .
- name: Check diff
run: |
diffs=$(git status -s)
if [ "$diffs" = "" ]; then
echo "NO_DIFF=1" >> $GITHUB_ENV
else
printf "%s\n" "$diffs"
fi
- name: Commit changes
if: env.NO_DIFF != '1'
run: |
git config --global user.name 'Cybozu Neco'
git config --global user.email 'cybozu-neco@users.noreply.github.com'
git commit -m 'update'
- name: Push to gh-pages
if: github.ref == 'refs/heads/main' && env.NO_DIFF != '1'
run: git push origin gh-pages
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: GHCR Login
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: GoReleaser
uses: goreleaser/goreleaser-action@ff11ca24a9b39f2d36796d1fbd7a4e39c182630a # v3.1.0
uses: goreleaser/goreleaser-action@v5.0.0
with:
version: v1.11.4
version: v1.21.2
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading