Skip to content

Update k8s packages to v0.30.0, controller-runtime to v0.18.0 #392

Update k8s packages to v0.30.0, controller-runtime to v0.18.0

Update k8s packages to v0.30.0, controller-runtime to v0.18.0 #392

name: controller-sharding
on:
push:
branches:
- main
tags:
- v*
paths-ignore:
- "webhosting-operator/**"
- ".github/workflows/webhosting-operator.yaml"
- "**.md"
pull_request:
paths-ignore:
- "webhosting-operator/**"
- ".github/workflows/webhosting-operator.yaml"
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: make verify
e2e-kind:
runs-on: ubuntu-latest
env:
ARTIFACTS: artifacts
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: make ci-e2e-kind
- uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-artifacts
path: artifacts
if-no-files-found: error
images:
runs-on: ubuntu-latest
env:
# renovate: datasource=github-releases depName=ko-build/ko
KO_VERSION: v0.15.2
steps:
- uses: actions/checkout@v4
with:
# fetch all history so that git describe works (needed by hack/prepare-image-metadata.sh)
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: ko-build/[email protected]
with:
version: ${{ env.KO_VERSION }}
- name: Prepare image metadata
id: meta
run: ./hack/prepare-image-metadata.sh
- name: ko build
run: |
set -ex
# prepare .ko.yaml to inject build settings into all images
entrypoints=(
./cmd/sharder
./cmd/shard
./hack/cmd/janitor
)
echo builds: > .ko.yaml
for entrypoint in "${entrypoints[@]}" ; do
cat >> .ko.yaml <<EOF
- main: $entrypoint
ldflags:
- |
{{.Env.LDFLAGS}}
EOF
done
ko build --push=${{ github.event_name != 'pull_request' }} --sbom none --base-import-paths \
--tags "${{ steps.meta.outputs.tags }}" --image-label "${{ steps.meta.outputs.labels }}" \
--platform linux/amd64,linux/arm64 \
"${entrypoints[@]}"