feat(chart): deny EtcdMember deletion at admission #124
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| # CI only builds and tests — no writes to the repo, releases, or packages. | |
| permissions: | |
| contents: read | |
| jobs: | |
| image-multiarch: | |
| # Build-only assertion that the operator image builds for every published | |
| # platform. Deliberately sets up buildx WITHOUT QEMU: the Dockerfile builder | |
| # is pinned to $BUILDPLATFORM and Go cross-compiles via GOARCH, so both legs | |
| # must build natively on this amd64 runner with no emulation. If the | |
| # --platform=$BUILDPLATFORM pin regresses, the arm64 leg fails here (exec | |
| # format error) instead of silently breaking the tag-release publish. | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3.3.0 | |
| - name: Build multi-arch image (no push, no QEMU) | |
| run: docker buildx build --platform linux/amd64,linux/arm64 -t etcd-operator:buildtest . | |
| verify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: codegen drift | |
| # If a contributor edits an API type or +kubebuilder:rbac markers | |
| # without re-running codegen, this gate catches it before the chart's | |
| # CRDs (charts/etcd-operator/crd-bases), manager RBAC rules | |
| # (charts/etcd-operator/files/manager-role-rules.yaml), or deepcopy ship | |
| # out of sync. Runs before `make test` so the as-committed state of | |
| # generated files is what we check. | |
| run: | | |
| make generate manifests | |
| if ! git diff --quiet --exit-code; then | |
| echo "::error::codegen is out of date; run 'make generate manifests' and commit the result" | |
| git --no-pager diff | |
| exit 1 | |
| fi | |
| - name: make test | |
| # `make test` runs fmt, vet, downloads envtest assets via | |
| # setup-envtest, exports KUBEBUILDER_ASSETS, and runs the whole | |
| # suite — including the CEL envtest cases in api/v1alpha2 | |
| # which silently skip when KUBEBUILDER_ASSETS is unset. | |
| run: make test |