Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
64 changes: 31 additions & 33 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,39 +45,37 @@ archives:
checksum:
name_template: 'checksums.txt'

dockers:
- image_templates:
- "ghcr.io/bankdata/styra-controller:{{ .Version }}-amd64"
use: buildx
goarch: amd64
dockerfile: build/package/Dockerfile
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/bankdata/styra-controller:{{ .Version }}-arm64"
use: buildx
goarch: arm64
dockerfile: build/package/Dockerfile
build_flag_templates:
- "--platform=linux/arm64"

docker_manifests:
- name_template: "ghcr.io/bankdata/styra-controller:latest"
image_templates:
- "ghcr.io/bankdata/styra-controller:{{ .Version }}-amd64"
- "ghcr.io/bankdata/styra-controller:{{ .Version }}-arm64"
- name_template: "ghcr.io/bankdata/styra-controller:{{ .Major }}"
image_templates:
- "ghcr.io/bankdata/styra-controller:{{ .Version }}-amd64"
- "ghcr.io/bankdata/styra-controller:{{ .Version }}-arm64"
- name_template: "ghcr.io/bankdata/styra-controller:{{ .Major }}.{{ .Minor }}"
image_templates:
- "ghcr.io/bankdata/styra-controller:{{ .Version }}-amd64"
- "ghcr.io/bankdata/styra-controller:{{ .Version }}-arm64"
- name_template: "ghcr.io/bankdata/styra-controller:{{ .Version }}"
image_templates:
- "ghcr.io/bankdata/styra-controller:{{ .Version }}-amd64"
- "ghcr.io/bankdata/styra-controller:{{ .Version }}-arm64"
dockers_v2:
- id: multiarch
dockerfile: build/package/Dockerfile
images:
- ghcr.io/bankdata/styra-controller
tags:
- latest
- "{{ .Major }}"
- "{{ .Major }}.{{ .Minor }}"
- "{{ .Version }}"
platforms:
- linux/amd64
- linux/arm64
- id: amd64
dockerfile: build/package/Dockerfile
images:
- ghcr.io/bankdata/styra-controller
tags:
- "{{ .Version }}-amd64"
platforms:
- linux/amd64
disable: "{{ .IsSnapshot }}"
- id: arm64
dockerfile: build/package/Dockerfile
images:
- ghcr.io/bankdata/styra-controller
tags:
- "{{ .Version }}-arm64"
platforms:
- linux/arm64
disable: "{{ .IsSnapshot }}"

release:
github:
Expand Down
5 changes: 3 additions & 2 deletions build/package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM alpine:3.17.2 AS certs
FROM --platform=$BUILDPLATFORM alpine:3.17.2 AS certs

RUN apk add --no-cache ca-certificates

FROM scratch

ARG BINARY=styra-controller
ARG TARGETPLATFORM
ARG BINARY=${TARGETPLATFORM}/styra-controller

USER 65532:65532

Expand Down
2 changes: 1 addition & 1 deletion docs/apis/styra/v1alpha1.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,5 +458,5 @@ GitRepo
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>6cb1f30</code>.
on git commit <code>3d62492</code>.
</em></p>
2 changes: 1 addition & 1 deletion docs/apis/styra/v1beta1.md
Original file line number Diff line number Diff line change
Expand Up @@ -1656,5 +1656,5 @@ System.</p>
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>6cb1f30</code>.
on git commit <code>3d62492</code>.
</em></p>
19 changes: 17 additions & 2 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,20 @@ This will run [goreleaser](https://goreleaser.com/) according to the
configuration in `.goreleaser.yaml`.

The release workflow reads the Go version from `go.mod`. GoReleaser v2.18.0
requires Go 1.27.0 or newer. For local releases, `make release` installs the
GoReleaser version pinned in `go.mod`.
requires Go 1.27.0 or newer. `make release` is intended only for the release
pipeline, which installs GoReleaser at the version pinned in `go.mod` and
configures Docker Buildx through `docker/setup-buildx-action`.

Docker releases use GoReleaser's `dockers_v2` pipeline and require a Docker
Buildx builder supporting `linux/amd64` and `linux/arm64`. The Dockerfile copies
the pre-built binary from the matching platform directory in GoReleaser's
build context; local `make docker-build` and `make podman-build` override the
binary path with the `BINARY` build argument.

Releases publish multi-platform images tagged `latest`, the major version,
the major/minor version, and the full version. The full-version `-amd64` and
`-arm64` tags remain available for architecture-specific consumers.

With `dockers_v2`, image building and pushing happen together during the publish
phase. `goreleaser build` and `goreleaser release --skip=publish` do not build
images.
20 changes: 10 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
module github.com/bankdata/styra-controller

go 1.27.0
go 1.27.1

require (
github.com/ahmetb/gen-crd-api-reference-docs v0.3.0
github.com/go-logr/logr v1.4.4
github.com/golangci/golangci-lint/v2 v2.14.0
github.com/google/uuid v1.6.0
github.com/goreleaser/goreleaser/v2 v2.18.0
github.com/onsi/ginkgo/v2 v2.32.1
github.com/onsi/ginkgo/v2 v2.33.0
github.com/onsi/gomega v1.44.0
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.24.1
github.com/stretchr/testify v1.12.1
github.com/vektra/mockery/v2 v2.53.6
github.com/vektra/mockery/v2 v2.53.7
go.uber.org/zap v1.28.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.37.1
k8s.io/apimachinery v0.37.1
k8s.io/client-go v0.37.1
sigs.k8s.io/controller-runtime v0.24.1
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.24.1
sigs.k8s.io/controller-runtime v0.25.2
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.25.2
sigs.k8s.io/controller-tools v0.22.0
sigs.k8s.io/kind v0.33.0
sigs.k8s.io/kustomize/kustomize/v5 v5.8.1
sigs.k8s.io/kustomize/kustomize/v5 v5.8.2
sigs.k8s.io/yaml v1.6.0
)

Expand Down Expand Up @@ -212,7 +212,7 @@ require (
github.com/ghostiam/protogetter v1.0.1 // indirect
github.com/github/smimesign v0.2.0 // indirect
github.com/go-critic/go-critic v0.15.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-fed/httpsig v1.1.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.9.0 // indirect
Expand Down Expand Up @@ -545,9 +545,9 @@ require (
mvdan.cc/gofumpt v0.12.0 // indirect
mvdan.cc/unparam v0.0.0-20260823230713-2fa3d841b0c8 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/kustomize/api v0.21.1 // indirect
sigs.k8s.io/kustomize/cmd/config v0.21.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.21.1 // indirect
sigs.k8s.io/kustomize/api v0.21.2 // indirect
sigs.k8s.io/kustomize/cmd/config v0.21.2 // indirect
sigs.k8s.io/kustomize/kyaml v0.21.2 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.4.2 // indirect
software.sslmate.com/src/go-pkcs12 v0.7.3 // indirect
Expand Down
40 changes: 20 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ github.com/go-chi/chi/v5 v5.3.0 h1:halUjDxhshgXHMrao5bB8eNBXo/rnzwr8m5m36glehM=
github.com/go-chi/chi/v5 v5.3.0/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto=
github.com/go-critic/go-critic v0.15.0 h1:MDUZIQKytIl+vPEc0Igw51m4uLTdi1ZGz2jatEqNs1g=
github.com/go-critic/go-critic v0.15.0/go.mod h1:3BPrw8nHATGm3o2n37cssOmJzpySGKCdY8JWkCzxgKQ=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=
github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI=
github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
Expand Down Expand Up @@ -980,8 +980,8 @@ github.com/nunnatsa/ginkgolinter v0.24.0 h1:Mp0EagluLFP98JatP6nqp/gGEoljNG97uf9A
github.com/nunnatsa/ginkgolinter v0.24.0/go.mod h1:2ZMRuzX6+3XXyY6UZOwb6n+MCocVGbkIsDBC4vuWz5c=
github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s=
github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ=
github.com/onsi/ginkgo/v2 v2.32.1 h1:6tlvcDm/3sE8lGJbZ4+d4mO3RLy24/tQWOFzVSQNIfw=
github.com/onsi/ginkgo/v2 v2.32.1/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44=
github.com/onsi/ginkgo/v2 v2.33.0 h1:C8gBA6Uc2ZEubiV+SXiu5tZnMTwEmXHgkJwGozKtZf8=
github.com/onsi/ginkgo/v2 v2.33.0/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44=
github.com/onsi/gomega v1.44.0 h1:eAiGl3Pw5jz5GQdDff0BcxYpAX1JxW8xD7mFUuwNfZQ=
github.com/onsi/gomega v1.44.0/go.mod h1:e/C2HwaZ1DhvjzXXuFhcR7hY7Sh9pl7MmoWKEjzwcdA=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
Expand Down Expand Up @@ -1232,8 +1232,8 @@ github.com/uudashr/gocognit v1.2.1 h1:CSJynt5txTnORn/DkhiB4mZjwPuifyASC8/6Q0I/QS
github.com/uudashr/gocognit v1.2.1/go.mod h1:acaubQc6xYlXFEMb9nWX2dYBzJ/bIjEkc1zzvyIZg5Q=
github.com/uudashr/iface v1.5.1 h1:BS3yrgaT55s3dAtJoxuTnsZNbsejq/mVuzp49YDyfBA=
github.com/uudashr/iface v1.5.1/go.mod h1:5UWoT6SvTdTww/KToRj6clO+n4Kg3/NrAQvgOB+5Ggw=
github.com/vektra/mockery/v2 v2.53.6 h1:qfUB6saauu652ZlMF/mEdlj7B/A0fw2XR0XBACBrf7Y=
github.com/vektra/mockery/v2 v2.53.6/go.mod h1:fjxC+mskIZqf67+z34pHxRRyyZnPnWNA36Cirf01Pkg=
github.com/vektra/mockery/v2 v2.53.7 h1:ms47n3ZfOrI6UC13dEzExiTbVWFPRWaPdcuUchfZvbU=
github.com/vektra/mockery/v2 v2.53.7/go.mod h1:EfkbujEmR0Y30bm+PArI1iZnEZa7af9dt6Vy5rGhmmc=
github.com/wagoodman/go-progress v0.0.0-20230925121702-07e42b3cdba0 h1:0KGbf+0SMg+UFy4e1A/CPVvXn21f1qtWdeJwxZFoQG8=
github.com/wagoodman/go-progress v0.0.0-20230925121702-07e42b3cdba0/go.mod h1:jLXFoL31zFaHKAAyZUh+sxiTDFe1L1ZHrcK2T1itVKA=
github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ=
Expand Down Expand Up @@ -1559,10 +1559,10 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
k8s.io/api v0.37.1 h1:l6N77U7tjwB5L056bgrBTJIEdevac/naBZ3iSvDNfpM=
k8s.io/api v0.37.1/go.mod h1:zSlbB1YpJ1YQlFVQy20UYll81UJSJJUMLhkhvg6Z78M=
honnef.co/go/tools v0.8.1 h1:+JKf3xJ1ni4CwrhVg4/pqsfPGP6vNAXcKbMXJodYx3w=
honnef.co/go/tools v0.8.1/go.mod h1:XA+OnlRA9EDh/ukGvXMNSZNKGwFQJ+5dER0ioUkOxks=
k8s.io/api v0.37.1 h1:l6N77U7tjwB5L056bgrBTJIEdevac/naBZ3iSvDNfpM=
k8s.io/api v0.37.1/go.mod h1:zSlbB1YpJ1YQlFVQy20UYll81UJSJJUMLhkhvg6Z78M=
k8s.io/apiextensions-apiserver v0.37.0 h1:zRMQ3+/LIE5oZ0tVvXwYHC+dIkSP5cjNWju7AZU1LOI=
k8s.io/apiextensions-apiserver v0.37.0/go.mod h1:HU0PfSBwchHL5iDau6jjt9zU6ryWkDDlaVUiq91NK80=
k8s.io/apimachinery v0.37.1 h1:hGCYyvKHCwtwMitj2vU4vYx0Z16N9GyZk9BBnz0wDAE=
Expand Down Expand Up @@ -1600,24 +1600,24 @@ pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk=
pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.36.0 h1:/YpDJ4vReG7ZmzSpBGxduXgywWkJU9zHubgJG03MT+Y=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.36.0/go.mod h1:tJo1aepTXyR+8Xs3sUsGBDk4Ub2AM5dPAPKJx0mpm5c=
sigs.k8s.io/controller-runtime v0.24.1 h1:miPEwrmirImAvgME1L9qebGHrOnGJoVmVdtOU9fRfo4=
sigs.k8s.io/controller-runtime v0.24.1/go.mod h1:vFkfY5fGt5xAC/sKb8IBFKgWPNKG9OUG29dR8Y2wImw=
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.24.1 h1:l2AjyGE/PWub6EB165ij4/bpCK0TlY5NlhzIHfmGvmg=
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.24.1/go.mod h1:wpkYufRHTSw9ABET21/PkEL7kdGnmiZJ6o72t9p/1I8=
sigs.k8s.io/controller-runtime v0.25.2 h1:bEkK3PVOIVK9X8QWLGVhJgmFc++47vfT6wakSzAOLsQ=
sigs.k8s.io/controller-runtime v0.25.2/go.mod h1:4QqLdT6z/L6Olj8JJCtvztid4/fnIiYsfaTFScegctc=
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.25.2 h1:53Y05LgEZ7qAr1bsdNTIcwgzEHQzHYUZkCDa3TqLdVg=
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.25.2/go.mod h1:q4i4kLTq6J6o29RUAQieHH8LS5knNkpgalnBhvrLp/8=
sigs.k8s.io/controller-tools v0.22.0 h1:eG3FAVja/KnlXKIWg95udIFz1cMyAtMjP11cqBh3t+k=
sigs.k8s.io/controller-tools v0.22.0/go.mod h1:VizwUStoZK7rReCj704czGGrB7mLxXTiJSJt7wN5ilI=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/kind v0.33.0 h1:AjvDv3vOygb/VKLVQW87lfktIBzkxR8Ump9DjxC8+Lk=
sigs.k8s.io/kind v0.33.0/go.mod h1:FSqriGaoTPruiXWfRnUXNykF8r2t+fHtK0P0m1AbGF8=
sigs.k8s.io/kustomize/api v0.21.1 h1:lzqbzvz2CSvsjIUZUBNFKtIMsEw7hVLJp0JeSIVmuJs=
sigs.k8s.io/kustomize/api v0.21.1/go.mod h1:f3wkKByTrgpgltLgySCntrYoq5d3q7aaxveSagwTlwI=
sigs.k8s.io/kustomize/cmd/config v0.21.1 h1:/gxf3J1rQD9nfuL8fHlrTLeUL+JHWbK44eOnXJDYx0M=
sigs.k8s.io/kustomize/cmd/config v0.21.1/go.mod h1:7yEFYBJyBJlpZQ50VaRGQRtFMn3Vzn9Fb2wts4TCok4=
sigs.k8s.io/kustomize/kustomize/v5 v5.8.1 h1:Pgsg5psubpVEy7Nf6S89PARg5VmmWUC1l9dC6Dl4PG0=
sigs.k8s.io/kustomize/kustomize/v5 v5.8.1/go.mod h1:0vFa5pQ/elNEQMyiAJuGku9rhAMzz7u9+61hRqFKiwY=
sigs.k8s.io/kustomize/kyaml v0.21.1 h1:IVlbmhC076nf6foyL6Taw4BkrLuEsXUXNpsE+ScX7fI=
sigs.k8s.io/kustomize/kyaml v0.21.1/go.mod h1:hmxADesM3yUN2vbA5z1/YTBnzLJ1dajdqpQonwBL1FQ=
sigs.k8s.io/kustomize/api v0.21.2 h1:MRyw+zLnFBP+G40gZJoKZErAuRiOPEPao+ddS9L6xt4=
sigs.k8s.io/kustomize/api v0.21.2/go.mod h1:inubcVvQjJR/BjUti22YVBWr4EX+XlurEWhB81v2JV4=
sigs.k8s.io/kustomize/cmd/config v0.21.2 h1:yHEXGPE0HNVyrLpVo8BJgm5RJU1ALDsR0ZbLQdJec4M=
sigs.k8s.io/kustomize/cmd/config v0.21.2/go.mod h1:iM45S61fPQlQ6OveEX/IDY8EY+UluHiO9WaW6kFm5fE=
sigs.k8s.io/kustomize/kustomize/v5 v5.8.2 h1:sSNeWwgkdSMGCIavtY63JQMgBJkGv3IwOltWVZy+LFQ=
sigs.k8s.io/kustomize/kustomize/v5 v5.8.2/go.mod h1:zzp/kd2bAYFCO6igFQdIn41S/l+gySmsTyMfiQCkVZg=
sigs.k8s.io/kustomize/kyaml v0.21.2 h1:1javwStFk7cgOeLU7yJtPmXcgMEhQgC2X0WjFT6U0p0=
sigs.k8s.io/kustomize/kyaml v0.21.2/go.mod h1:zX3qwtuouXd2K1fMiCV0VSFReX06a+CY1rhyf5Dy7hQ=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
sigs.k8s.io/structured-merge-diff/v6 v6.4.2 h1:qdOxHwrl2Kaag1aQEarlYcOA9vSyGCp3CIki3aW8c4Q=
Expand Down
Loading