From 7d1ee2e84104ac4cdcb6b5c755670aab809b6b94 Mon Sep 17 00:00:00 2001 From: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> Date: Mon, 16 Jan 2023 19:22:22 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=96=20Updated=20v3=20docs=20with=20the?= =?UTF-8?q?=20latest=20changes=20(#3166)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix nil pointer in Finalizer example * :book: fix link for platform support * update kubebuilder core dependencies for k8s 1.25 Signed-off-by: Bryce Palmer * docs: notify deps install to build book * Update controller-tools version (v0.9.2->v0.10.0) * :bug: remove duplicate words and fix spelling mistakes * :sparkles: update kubebuilder kubernetes version * Update the export path of webhook * :book: fix broken links * fixing the kubebuilder install locally curl request * add dependency bot updates * :seedling: Bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * :seedling: Bump actions/setup-go from 2 to 3 Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * :seedling: Bump goreleaser/goreleaser-action from 2 to 3 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2 to 3. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2...v3) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Bump github.com/spf13/afero from 1.6.0 to 1.9.2 Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.6.0 to 1.9.2. - [Release notes](https://github.com/spf13/afero/releases) - [Commits](https://github.com/spf13/afero/compare/v1.6.0...v1.9.2) --- updated-dependencies: - dependency-name: github.com/spf13/afero dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/onsi/gomega from 1.19.0 to 1.20.2 Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.19.0 to 1.20.2. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.19.0...v1.20.2) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/sirupsen/logrus from 1.8.1 to 1.9.0 Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.8.1 to 1.9.0. - [Release notes](https://github.com/sirupsen/logrus/releases) - [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md) - [Commits](https://github.com/sirupsen/logrus/compare/v1.8.1...v1.9.0) --- updated-dependencies: - dependency-name: github.com/sirupsen/logrus dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump k8s.io/apimachinery from 0.25.0 to 0.25.2 Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.25.0 to 0.25.2. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.25.0...v0.25.2) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump github.com/gobuffalo/flect from 0.2.5 to 0.3.0 Bumps [github.com/gobuffalo/flect](https://github.com/gobuffalo/flect) from 0.2.5 to 0.3.0. - [Release notes](https://github.com/gobuffalo/flect/releases) - [Commits](https://github.com/gobuffalo/flect/compare/v0.2.5...v0.3.0) --- updated-dependencies: - dependency-name: github.com/gobuffalo/flect dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * docs: describe e2e test towards plugin Co-authored-by: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> * :seedling: remove WORKSPACE file commited by mistake * remove unused value * Bump github.com/spf13/cobra from 1.4.0 to 1.5.0 Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.4.0...v1.5.0) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/onsi/ginkgo/v2 from 2.1.6 to 2.2.0 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.1.6 to 2.2.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.1.6...v2.2.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/cloudflare/cfssl from 1.5.0 to 1.6.3 Bumps [github.com/cloudflare/cfssl](https://github.com/cloudflare/cfssl) from 1.5.0 to 1.6.3. - [Release notes](https://github.com/cloudflare/cfssl/releases) - [Changelog](https://github.com/cloudflare/cfssl/blob/master/CHANGELOG) - [Commits](https://github.com/cloudflare/cfssl/compare/v1.5.0...v1.6.3) --- updated-dependencies: - dependency-name: github.com/cloudflare/cfssl dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * update simple-external-plugin-tutorial * update mdbook * :warning: remove config-gen alpha option * :book: clarifies plugins available and its usage * :book: update doc samples * :sparkles: (go/v4-alpha) : update kustomize version from 4.5.5 to 4.5.7 * :sparkles: (grafana/v1-alpha) : add custom units for custom grafana dashboards (#2965) :sparkles: add custom units for custom grafana dashboards Signed-off-by: Jirka Kremser Signed-off-by: Jirka Kremser * cleanup: cert-manager and prometheus installs into e2e tests * Apply suggestions from code review * fixed bug for component-config flag updated testdata * Make jmrodri and varsha admins Signed-off-by: jesus m. rodriguez * Bump github.com/onsi/gomega from 1.20.2 to 1.21.1 Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.20.2 to 1.21.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.20.2...v1.21.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * :book: Updating doc with Installation steps of cert-manager and prometheus (#2982) * Adding installing steps for testing webhooks Adding installing steps for testing webhooks Adding installing steps for testing webhooks Adding installing steps for testing webhooks Adding installing steps for testing webhooks Adding installing steps for testing webhooks Adding installing steps for testing webhooks Adding installing steps for testing webhooks Adding installing steps for testing webhooks Adding installing steps for testing webhooks Adding installing steps for testing webhooks Adding installing steps for testing webhooks * Adding installing steps for testing webhooks * Adding installing steps for testing webhooks * Adding installing steps for testing webhooks * 🐛 : leader-elect arg scaffolded should be scaffolded when component config option is not used (#3013) * updated templates for component config * updates * update * update revert main.go * update revert main.go * revert changes and go thru docs once * Update make build cmd with manifests * Bump github.com/spf13/cobra from 1.5.0 to 1.6.0 Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.5.0 to 1.6.0. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.5.0...v1.6.0) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump golang.org/x/text from 0.3.7 to 0.4.0 Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.4.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.3.7...v0.4.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * :seeding: update CLI deps * golangci-lint: add recommended revive checks to linter-settings but disable checks with to many findings. Fix findings * Improve rendering of the documentation This fixes various rendering issues: * Wrong or uninterpreted formatting * Some missing links * Incorrect markup * Missing documentation pages This doesn't fix all the links but at least the initial ones. * update cronjob to use batchv1 api * Fix grammar in comment Change `these is` to `these are` * Enable revive unused-parameter check and fix findings * Bump github.com/onsi/ginkgo/v2 from 2.3.1 to 2.4.0 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.3.1 to 2.4.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.3.1...v2.4.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/spf13/cobra from 1.6.0 to 1.6.1 Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Update github workflow to use same golangci-lint minor version as Makefile * fix docker buildx args Signed-off-by: Mikhail Sidorov * 🐛 (kustomize/v2-alpha): Fix typo issue in the labels added to the manifests (#3047) * Fix typo in kubernets (missing 'e') * make generate * Add KB project git-repo and edit icons * Add doc FAQ section * docs: supplement plugin creation * Update joelanford/go-apidiff (v0.4.0 -> v0.5.0) * Bump github.com/onsi/gomega from 1.22.1 to 1.23.0 Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.22.1 to 1.23.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.22.1...v1.23.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/onsi/gomega from 1.23.0 to 1.24.0 Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.23.0 to 1.24.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.23.0...v1.24.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/onsi/ginkgo/v2 from 2.4.0 to 2.5.0 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.4.0 to 2.5.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.4.0...v2.5.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/spf13/afero from 1.9.2 to 1.9.3 Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.9.2 to 1.9.3. - [Release notes](https://github.com/spf13/afero/releases) - [Commits](https://github.com/spf13/afero/compare/v1.9.2...v1.9.3) --- updated-dependencies: - dependency-name: github.com/spf13/afero dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump golang.org/x/tools from 0.2.0 to 0.3.0 Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.2.0 to 0.3.0. - [Release notes](https://github.com/golang/tools/releases) - [Commits](https://github.com/golang/tools/compare/v0.2.0...v0.3.0) --- updated-dependencies: - dependency-name: golang.org/x/tools dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/onsi/gomega from 1.24.0 to 1.24.1 Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.24.0 to 1.24.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.24.0...v1.24.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * fix typo in Makefile * :sparkles: add version check for makefile template tools (#3077) * add version check for makefile template tools Prevent running controller-gen and kustomize commands with a version that does not match the one specified in the corresponding CONTROLLER_TOOLS_VERSION or KUSTOMIZE_VERSION vars Addresses https://github.com/kubernetes-sigs/kubebuilder/issues/3068 * Update makefile target descriptions * Updated descriptions for `kustomize` and `controller-gen` targets. * Reformatted `controller-gen` recipe to reduce line length Signed-off-by: Eduardo Coria * update makefile samples Signed-off-by: Eduardo Coria Signed-off-by: Eduardo Coria * fix unexpected end of file error in makefiles Signed-off-by: Eduardo Coria * :sparkles: Add go/v4 base and migration guide Co-authored-by: Varsha * Update docs/book/src/plugins/go-v4-plugin.md Co-authored-by: Varsha * Update docs/book/src/migration/legacy.md Co-authored-by: Varsha * Update docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md Co-authored-by: Varsha * Update docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md Co-authored-by: Varsha * Update docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md Co-authored-by: Varsha * (go/v3,go/v4-alpha): Upgrade controller-runtime version from 1.13.0 to 1.13.1 * 📖 : suggest specify plugin for pr * Bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.5.0 to 2.5.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.5.0...v2.5.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * docs: fix typo in the component config tutorial Signed-off-by: Andreas Gerstmayr * 🌱: refact testdata * ✨ (kustomize/v2-alpha): add kustomize file to track crd sample info * add action to lint yaml and fix existing yamllint failures Signed-off-by: Bryce Palmer * update yamllint to now be run via Makefile Signed-off-by: Bryce Palmer * run yamllint target as part of lint target Signed-off-by: Bryce Palmer * add yamllint job back as the lint job only runs golangci-lint Signed-off-by: Bryce Palmer * bump proxy image * fix: Remove trailing space making yamllint fail on new project * (kustomize/v2-alpha): change kustomization file to track samples to use marker instead of overwritting * (deployimage/v1-alpha): fix error to scaffold go/v4-alpha projects * Replace restricted-access ComponentConfig design doc link with the public one Signed-off-by: Michail Resvanis * Bump golang.org/x/text from 0.4.0 to 0.5.0 Bumps [golang.org/x/text](https://github.com/golang/text) from 0.4.0 to 0.5.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.4.0...v0.5.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * fix lint issue * 🌱 Change testdata suffix and regenerate samples (#3111) * edit script * make generate * fix test name * project-v3-with-grafana * book: add details rbac doc in tutorial Signed-off-by: qingwave * improve golang/v3/v4 README template * correctly spell "until" * correct grammar * add previously-absent puncuation * remove trailing whitespace Signed-off-by: Mike Ball * run 'make generate' Signed-off-by: Mike Ball * Bump golang.org/x/tools from 0.3.0 to 0.4.0 Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.3.0 to 0.4.0. - [Release notes](https://github.com/golang/tools/releases) - [Commits](https://github.com/golang/tools/compare/v0.3.0...v0.4.0) --- updated-dependencies: - dependency-name: golang.org/x/tools dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump github.com/onsi/ginkgo/v2 from 2.5.1 to 2.6.0 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.5.1 to 2.6.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.5.1...v2.6.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update envtest.md Fix typo * Update SUMMARY.md move the FAQ section to the bottom, after Plugins finish. * 📖 Making section on envtest limitations visible in Master (#3123) * files added Signed-off-by: ShivamTyagi12345 * duplicate removed Signed-off-by: ShivamTyagi12345 Signed-off-by: ShivamTyagi12345 * :seedling: Bump goreleaser/goreleaser-action from 3 to 4 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 3 to 4. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v3...v4) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Bump github.com/onsi/ginkgo/v2 from 2.6.0 to 2.6.1 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.6.0...v2.6.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * fix: Fix "Available Plugins" link * Bump github.com/onsi/gomega from 1.24.1 to 1.24.2 Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.24.1 to 1.24.2. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.24.1...v1.24.2) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * ✨ warning comment on PROJECT file (#3137) * warning comment on PROJECT file * make generate * add link * docs: added missing shell argument to autocompletion snippet The documentation's snippet was missing the shell argument, so the code was not working if added to the .bash_profile. * :seedling: update license date * ⚠️ go/v4-alpha: change the layout to follow Golang Standards (#2985) * fix-missing dashes infront of plugins The kubebuilder command was missing the "--" infront of plugins. This meant that it used the go/v3 layout. * :doc: cleanup info and code regards legacy actions using GCP to build KB CLI release * :sparkles: upgrade k8s from 1.25 to 1.26 (#3147) * Bump github.com/onsi/ginkgo/v2 from 2.6.1 to 2.7.0 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.6.1 to 2.7.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.6.1...v2.7.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump golang.org/x/text from 0.5.0 to 0.6.0 Bumps [golang.org/x/text](https://github.com/golang/text) from 0.5.0 to 0.6.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump golang.org/x/tools from 0.4.0 to 0.5.0 Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.4.0 to 0.5.0. - [Release notes](https://github.com/golang/tools/releases) - [Commits](https://github.com/golang/tools/compare/v0.4.0...v0.5.0) --- updated-dependencies: - dependency-name: golang.org/x/tools dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * :book: fix typo in curl command (#3156) fix typo in curl command * Bump github.com/gobuffalo/flect from 0.3.0 to 1.0.0 Bumps [github.com/gobuffalo/flect](https://github.com/gobuffalo/flect) from 0.3.0 to 1.0.0. - [Release notes](https://github.com/gobuffalo/flect/releases) - [Commits](https://github.com/gobuffalo/flect/compare/v0.3.0...v1.0.0) --- updated-dependencies: - dependency-name: github.com/gobuffalo/flect dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Signed-off-by: Bryce Palmer Signed-off-by: dependabot[bot] Signed-off-by: Jirka Kremser Signed-off-by: jesus m. rodriguez Signed-off-by: Mikhail Sidorov Signed-off-by: Eduardo Coria Signed-off-by: Andreas Gerstmayr Signed-off-by: Michail Resvanis Signed-off-by: qingwave Signed-off-by: Mike Ball Signed-off-by: ShivamTyagi12345 Co-authored-by: Simon Jürgensmeyer <6493966+sj14@users.noreply.github.com> Co-authored-by: Kubernetes Prow Robot Co-authored-by: Camila Macedo Co-authored-by: Bryce Palmer Co-authored-by: Tony Co-authored-by: Oscar Utbult Co-authored-by: Yash Singh Co-authored-by: Abhishek koserwal Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jirka Kremser <535866+jkremser@users.noreply.github.com> Co-authored-by: laxmikantbpandhare Co-authored-by: jesus m. rodriguez Co-authored-by: Phillip Wittrock Co-authored-by: Yash Singh <99066083+yashsingh74@users.noreply.github.com> Co-authored-by: Laxmikant Bhaskar Pandhare <47066536+laxmikantbpandhare@users.noreply.github.com> Co-authored-by: astraw99 Co-authored-by: Jonathan Ballet Co-authored-by: Krishna Indani Co-authored-by: Nicholas Seemiller Co-authored-by: Mikhail Sidorov Co-authored-by: Marc Villacorta Co-authored-by: Shunsuke Ise Co-authored-by: Eduardo M Coria Co-authored-by: Eduardo Coria Co-authored-by: Varsha Co-authored-by: Andreas Gerstmayr Co-authored-by: Erik Godding Boye Co-authored-by: Michail Resvanis Co-authored-by: Jason Jung Co-authored-by: qingwave Co-authored-by: Mike Ball Co-authored-by: Jordan Neufeld Co-authored-by: Chinu Anand <66985303+chinu-anand@users.noreply.github.com> Co-authored-by: shivam tyagi Co-authored-by: Yi-Han Chen Co-authored-by: Gabriele Fedi Co-authored-by: Gabriele Fedi <91485518+GabriFedi97@users.noreply.github.com> Co-authored-by: Simon Zengerling Co-authored-by: Thomas Güttler --- .github/workflows/release.yml | 2 +- RELEASE.md | 9 +- build/.goreleaser.yml | 2 +- build/build_kubebuilder.sh | 111 --- build/cloudbuild.yaml | 47 -- build/cloudbuild_local.yaml | 25 - build/cloudbuild_snapshot.yaml | 48 -- docs/book/src/SUMMARY.md | 4 +- .../testdata/project/Makefile | 2 +- .../testdata/emptycontroller.go | 10 + .../manually_migration_guide_gov3_to_gov4.md | 154 +++- .../migration/migration_guide_gov3_to_gov4.md | 2 +- docs/book/src/migration/v3vsv4.md | 3 + docs/book/src/plugins/creating-plugins.md | 2 +- docs/book/src/plugins/go-v4-plugin.md | 7 +- docs/book/src/quick-start.md | 5 +- docs/book/src/reference/completion.md | 2 +- docs/book/src/reference/envtest.md | 60 +- go.mod | 14 +- go.sum | 32 +- pkg/config/store/yaml/store.go | 10 + pkg/config/store/yaml/store_test.go | 25 +- pkg/model/resource/utils.go | 8 + pkg/model/resource/utils_test.go | 17 + pkg/plugin/helpers.go | 13 + pkg/plugin/util/helpers.go | 3 + pkg/plugin/util/util.go | 19 + .../kustomize/v2-alpha/scaffolds/api.go | 1 + .../templates/config/samples/kustomization.go | 1 + pkg/plugins/golang/declarative/v1/api.go | 9 +- pkg/plugins/golang/declarative/v1/init.go | 17 +- .../golang/declarative/v1/scaffolds/api.go | 6 +- .../internal/templates/controller.go | 27 +- .../v1/scaffolds/internal/templates/types.go | 18 +- .../golang/deploy-image/v1alpha1/api.go | 27 +- .../deploy-image/v1alpha1/scaffolds/api.go | 68 +- .../scaffolds/internal/templates/api/types.go | 22 +- .../templates/config/samples/crd_sample.go | 2 + .../templates/controllers/controller-test.go | 24 +- .../templates/controllers/controller.go | 25 +- pkg/plugins/golang/options.go | 19 +- pkg/plugins/golang/options_test.go | 2 +- pkg/plugins/golang/v3/api.go | 1 + pkg/plugins/golang/v3/commons.go | 2 +- pkg/plugins/golang/v3/scaffolds/init.go | 4 +- .../scaffolds/internal/templates/makefile.go | 2 +- .../v3/scaffolds/internal/templates/readme.go | 12 +- pkg/plugins/golang/v3/webhook.go | 1 + pkg/plugins/golang/v4/api.go | 7 +- pkg/plugins/golang/v4/init.go | 6 +- pkg/plugins/golang/v4/scaffolds/api.go | 2 +- pkg/plugins/golang/v4/scaffolds/edit.go | 24 - pkg/plugins/golang/v4/scaffolds/init.go | 4 +- .../scaffolds/internal/templates/api/group.go | 8 +- .../scaffolds/internal/templates/api/types.go | 8 +- .../internal/templates/api/webhook.go | 8 +- .../templates/api/webhook_suitetest.go | 8 +- .../templates/controllers/controller.go | 6 +- .../controllers/controller_suitetest.go | 10 +- .../internal/templates/dockerfile.go | 6 +- .../v4/scaffolds/internal/templates/main.go | 12 +- .../scaffolds/internal/templates/makefile.go | 6 +- .../v4/scaffolds/internal/templates/readme.go | 12 +- test/common.sh | 3 +- test/e2e/v4/generate_test.go | 7 +- test/testdata/generate.sh | 11 +- test/testdata/test.sh | 4 +- testdata/project-v2/PROJECT | 4 + testdata/project-v2/api/v1/admiral_types.go | 2 +- testdata/project-v2/api/v1/admiral_webhook.go | 2 +- testdata/project-v2/api/v1/captain_types.go | 2 +- testdata/project-v2/api/v1/captain_webhook.go | 2 +- testdata/project-v2/api/v1/firstmate_types.go | 2 +- .../project-v2/api/v1/firstmate_webhook.go | 2 +- .../project-v2/api/v1/groupversion_info.go | 2 +- .../api/v1/zz_generated.deepcopy.go | 2 +- .../controllers/admiral_controller.go | 2 +- .../controllers/captain_controller.go | 2 +- .../controllers/firstmate_controller.go | 2 +- .../controllers/laker_controller.go | 2 +- testdata/project-v2/controllers/suite_test.go | 2 +- testdata/project-v2/hack/boilerplate.go.txt | 2 +- testdata/project-v2/main.go | 2 +- testdata/project-v3-config/Makefile | 4 +- testdata/project-v3-config/PROJECT | 4 + testdata/project-v3-config/README.md | 14 +- .../project-v3-config/api/v1/admiral_types.go | 2 +- .../api/v1/admiral_webhook.go | 2 +- .../project-v3-config/api/v1/captain_types.go | 2 +- .../api/v1/captain_webhook.go | 2 +- .../api/v1/firstmate_types.go | 2 +- .../api/v1/firstmate_webhook.go | 2 +- .../api/v1/groupversion_info.go | 2 +- .../api/v1/webhook_suite_test.go | 2 +- .../api/v1/zz_generated.deepcopy.go | 2 +- .../bases/crew.testproject.org_admirals.yaml | 2 +- .../bases/crew.testproject.org_captains.yaml | 2 +- .../crew.testproject.org_firstmates.yaml | 2 +- .../controllers/admiral_controller.go | 4 +- .../controllers/captain_controller.go | 4 +- .../controllers/firstmate_controller.go | 4 +- .../controllers/laker_controller.go | 4 +- .../controllers/suite_test.go | 2 +- testdata/project-v3-config/go.mod | 69 +- .../project-v3-config/hack/boilerplate.go.txt | 2 +- testdata/project-v3-config/main.go | 2 +- testdata/project-v3-declarative-v1/Makefile | 4 +- testdata/project-v3-declarative-v1/PROJECT | 6 +- testdata/project-v3-declarative-v1/README.md | 14 +- .../api/v1/admiral_types.go | 2 +- .../api/v1/captain_types.go | 2 +- .../api/v1/firstmate_types.go | 2 +- .../api/v1/groupversion_info.go | 2 +- .../api/v1/zz_generated.deepcopy.go | 2 +- .../bases/crew.testproject.org_admirals.yaml | 2 +- .../bases/crew.testproject.org_captains.yaml | 2 +- .../crew.testproject.org_firstmates.yaml | 2 +- .../controllers/admiral_controller.go | 2 +- .../controllers/captain_controller.go | 2 +- .../controllers/firstmate_controller.go | 2 +- .../controllers/suite_test.go | 2 +- testdata/project-v3-declarative-v1/go.mod | 85 +-- .../hack/boilerplate.go.txt | 2 +- testdata/project-v3-declarative-v1/main.go | 2 +- testdata/project-v3-multigroup/Makefile | 4 +- testdata/project-v3-multigroup/PROJECT | 4 + testdata/project-v3-multigroup/README.md | 14 +- .../apis/crew/v1/captain_types.go | 2 +- .../apis/crew/v1/captain_webhook.go | 2 +- .../apis/crew/v1/groupversion_info.go | 2 +- .../apis/crew/v1/webhook_suite_test.go | 2 +- .../apis/crew/v1/zz_generated.deepcopy.go | 2 +- .../apis/fiz/v1/bar_types.go | 2 +- .../apis/fiz/v1/groupversion_info.go | 2 +- .../apis/fiz/v1/zz_generated.deepcopy.go | 2 +- .../apis/foo.policy/v1/groupversion_info.go | 2 +- .../foo.policy/v1/healthcheckpolicy_types.go | 2 +- .../foo.policy/v1/zz_generated.deepcopy.go | 2 +- .../apis/foo/v1/bar_types.go | 2 +- .../apis/foo/v1/groupversion_info.go | 2 +- .../apis/foo/v1/zz_generated.deepcopy.go | 2 +- .../v1beta1/groupversion_info.go | 2 +- .../sea-creatures/v1beta1/kraken_types.go | 2 +- .../v1beta1/zz_generated.deepcopy.go | 2 +- .../v1beta2/groupversion_info.go | 2 +- .../sea-creatures/v1beta2/leviathan_types.go | 2 +- .../v1beta2/zz_generated.deepcopy.go | 2 +- .../apis/ship/v1/destroyer_types.go | 2 +- .../apis/ship/v1/destroyer_webhook.go | 2 +- .../apis/ship/v1/groupversion_info.go | 2 +- .../apis/ship/v1/webhook_suite_test.go | 2 +- .../apis/ship/v1/zz_generated.deepcopy.go | 2 +- .../apis/ship/v1beta1/frigate_types.go | 2 +- .../apis/ship/v1beta1/frigate_webhook.go | 2 +- .../apis/ship/v1beta1/groupversion_info.go | 2 +- .../ship/v1beta1/zz_generated.deepcopy.go | 2 +- .../apis/ship/v2alpha1/cruiser_types.go | 2 +- .../apis/ship/v2alpha1/cruiser_webhook.go | 2 +- .../apis/ship/v2alpha1/groupversion_info.go | 2 +- .../apis/ship/v2alpha1/webhook_suite_test.go | 2 +- .../ship/v2alpha1/zz_generated.deepcopy.go | 2 +- .../apis/v1/groupversion_info.go | 2 +- .../apis/v1/lakers_types.go | 2 +- .../apis/v1/lakers_webhook.go | 2 +- .../apis/v1/webhook_suite_test.go | 2 +- .../apis/v1/zz_generated.deepcopy.go | 2 +- .../bases/crew.testproject.org_captains.yaml | 2 +- .../crd/bases/fiz.testproject.org_bars.yaml | 2 +- ...y.testproject.org_healthcheckpolicies.yaml | 2 +- .../crd/bases/foo.testproject.org_bars.yaml | 2 +- ...sea-creatures.testproject.org_krakens.yaml | 2 +- ...-creatures.testproject.org_leviathans.yaml | 2 +- .../bases/ship.testproject.org_cruisers.yaml | 2 +- .../ship.testproject.org_destroyers.yaml | 2 +- .../bases/ship.testproject.org_frigates.yaml | 2 +- .../crd/bases/testproject.org_lakers.yaml | 2 +- .../controllers/apps/deployment_controller.go | 4 +- .../controllers/apps/suite_test.go | 2 +- .../controllers/crew/captain_controller.go | 4 +- .../controllers/crew/suite_test.go | 2 +- .../controllers/fiz/bar_controller.go | 4 +- .../controllers/fiz/suite_test.go | 2 +- .../healthcheckpolicy_controller.go | 4 +- .../controllers/foo.policy/suite_test.go | 2 +- .../controllers/foo/bar_controller.go | 4 +- .../controllers/foo/suite_test.go | 2 +- .../controllers/lakers_controller.go | 4 +- .../sea-creatures/kraken_controller.go | 4 +- .../sea-creatures/leviathan_controller.go | 4 +- .../controllers/sea-creatures/suite_test.go | 2 +- .../controllers/ship/cruiser_controller.go | 4 +- .../controllers/ship/destroyer_controller.go | 4 +- .../controllers/ship/frigate_controller.go | 4 +- .../controllers/ship/suite_test.go | 2 +- .../controllers/suite_test.go | 2 +- testdata/project-v3-multigroup/go.mod | 69 +- .../hack/boilerplate.go.txt | 2 +- testdata/project-v3-multigroup/main.go | 2 +- .../project-v3-with-deploy-image/Makefile | 4 +- testdata/project-v3-with-deploy-image/PROJECT | 4 + .../project-v3-with-deploy-image/README.md | 14 +- .../api/v1alpha1/busybox_types.go | 2 +- .../api/v1alpha1/groupversion_info.go | 2 +- .../api/v1alpha1/memcached_types.go | 2 +- .../api/v1alpha1/memcached_webhook.go | 2 +- .../api/v1alpha1/webhook_suite_test.go | 2 +- .../api/v1alpha1/zz_generated.deepcopy.go | 2 +- ...example.com.testproject.org_busyboxes.yaml | 2 +- ...xample.com.testproject.org_memcacheds.yaml | 2 +- .../controllers/busybox_controller.go | 4 +- .../controllers/busybox_controller_test.go | 2 +- .../controllers/memcached_controller.go | 4 +- .../controllers/memcached_controller_test.go | 2 +- .../controllers/suite_test.go | 2 +- testdata/project-v3-with-deploy-image/go.mod | 69 +- .../hack/boilerplate.go.txt | 2 +- testdata/project-v3-with-deploy-image/main.go | 2 +- .../.dockerignore | 0 .../.gitignore | 0 .../Dockerfile | 0 .../Makefile | 4 +- testdata/project-v3-with-grafana/PROJECT | 12 + .../README.md | 20 +- .../config/default/kustomization.yaml | 4 +- .../default/manager_auth_proxy_patch.yaml | 0 .../config/default/manager_config_patch.yaml | 0 .../config/manager/kustomization.yaml | 0 .../config/manager/manager.yaml | 8 +- .../config/prometheus/kustomization.yaml | 0 .../config/prometheus/monitor.yaml | 4 +- .../rbac/auth_proxy_client_clusterrole.yaml | 4 +- .../config/rbac/auth_proxy_role.yaml | 4 +- .../config/rbac/auth_proxy_role_binding.yaml | 4 +- .../config/rbac/auth_proxy_service.yaml | 4 +- .../config/rbac/kustomization.yaml | 0 .../config/rbac/leader_election_role.yaml | 4 +- .../rbac/leader_election_role_binding.yaml | 4 +- .../config/rbac/role_binding.yaml | 4 +- .../config/rbac/service_account.yaml | 4 +- testdata/project-v3-with-grafana/go.mod | 68 ++ .../grafana/controller-resources-metrics.json | 0 .../grafana/controller-runtime-metrics.json | 0 .../grafana/custom-metrics/config.yaml | 0 .../hack/boilerplate.go.txt | 2 +- .../main.go | 4 +- testdata/project-v3-with-metrics/PROJECT | 8 - testdata/project-v3-with-metrics/go.mod | 79 -- testdata/project-v3/Makefile | 4 +- testdata/project-v3/PROJECT | 4 + testdata/project-v3/README.md | 14 +- testdata/project-v3/api/v1/admiral_types.go | 2 +- testdata/project-v3/api/v1/admiral_webhook.go | 2 +- testdata/project-v3/api/v1/captain_types.go | 2 +- testdata/project-v3/api/v1/captain_webhook.go | 2 +- testdata/project-v3/api/v1/firstmate_types.go | 2 +- .../project-v3/api/v1/firstmate_webhook.go | 2 +- .../project-v3/api/v1/groupversion_info.go | 2 +- .../project-v3/api/v1/webhook_suite_test.go | 2 +- .../api/v1/zz_generated.deepcopy.go | 2 +- .../bases/crew.testproject.org_admirales.yaml | 2 +- .../bases/crew.testproject.org_captains.yaml | 2 +- .../crew.testproject.org_firstmates.yaml | 2 +- .../controllers/admiral_controller.go | 4 +- .../controllers/captain_controller.go | 4 +- .../controllers/firstmate_controller.go | 4 +- .../controllers/laker_controller.go | 4 +- testdata/project-v3/controllers/suite_test.go | 2 +- testdata/project-v3/go.mod | 69 +- testdata/project-v3/hack/boilerplate.go.txt | 2 +- testdata/project-v3/main.go | 2 +- testdata/project-v4-config/Dockerfile | 6 +- testdata/project-v4-config/Makefile | 8 +- testdata/project-v4-config/PROJECT | 4 + testdata/project-v4-config/README.md | 14 +- .../project-v4-config/api/v1/admiral_types.go | 2 +- .../api/v1/admiral_webhook.go | 2 +- .../project-v4-config/api/v1/captain_types.go | 2 +- .../api/v1/captain_webhook.go | 2 +- .../api/v1/firstmate_types.go | 2 +- .../api/v1/firstmate_webhook.go | 2 +- .../api/v1/groupversion_info.go | 2 +- .../api/v1/webhook_suite_test.go | 2 +- .../api/v1/zz_generated.deepcopy.go | 2 +- testdata/project-v4-config/{ => cmd}/main.go | 12 +- .../bases/crew.testproject.org_admirals.yaml | 2 +- .../bases/crew.testproject.org_captains.yaml | 2 +- .../crew.testproject.org_firstmates.yaml | 2 +- testdata/project-v4-config/go.mod | 69 +- .../project-v4-config/hack/boilerplate.go.txt | 2 +- .../controller}/admiral_controller.go | 6 +- .../controller}/captain_controller.go | 6 +- .../controller}/firstmate_controller.go | 6 +- .../internal/controller}/laker_controller.go | 6 +- .../internal/controller}/suite_test.go | 6 +- testdata/project-v4-declarative-v1/Dockerfile | 6 +- testdata/project-v4-declarative-v1/Makefile | 8 +- testdata/project-v4-declarative-v1/PROJECT | 6 +- testdata/project-v4-declarative-v1/README.md | 14 +- .../api/v1/admiral_types.go | 2 +- .../api/v1/captain_types.go | 2 +- .../api/v1/firstmate_types.go | 2 +- .../api/v1/groupversion_info.go | 2 +- .../api/v1/zz_generated.deepcopy.go | 2 +- .../{ => cmd}/main.go | 10 +- .../bases/crew.testproject.org_admirals.yaml | 2 +- .../bases/crew.testproject.org_captains.yaml | 2 +- .../crew.testproject.org_firstmates.yaml | 2 +- testdata/project-v4-declarative-v1/go.mod | 85 +-- .../grafana/controller-resources-metrics.json | 306 -------- .../grafana/controller-runtime-metrics.json | 710 ------------------ .../grafana/custom-metrics/config.yaml | 15 - .../hack/boilerplate.go.txt | 2 +- .../controller}/admiral_controller.go | 4 +- .../controller}/captain_controller.go | 4 +- .../controller}/firstmate_controller.go | 4 +- .../controller}/suite_test.go | 6 +- testdata/project-v4-multigroup/Dockerfile | 8 +- testdata/project-v4-multigroup/Makefile | 8 +- testdata/project-v4-multigroup/PROJECT | 24 +- testdata/project-v4-multigroup/README.md | 14 +- .../{apis => api}/crew/v1/captain_types.go | 2 +- .../{apis => api}/crew/v1/captain_webhook.go | 2 +- .../crew/v1/groupversion_info.go | 2 +- .../crew/v1/webhook_suite_test.go | 2 +- .../crew/v1/zz_generated.deepcopy.go | 2 +- .../{apis/foo => api/fiz}/v1/bar_types.go | 2 +- .../{apis => api}/fiz/v1/groupversion_info.go | 2 +- .../fiz/v1/zz_generated.deepcopy.go | 2 +- .../foo.policy/v1/groupversion_info.go | 2 +- .../foo.policy/v1/healthcheckpolicy_types.go | 2 +- .../foo.policy/v1/zz_generated.deepcopy.go | 2 +- .../{apis/fiz => api/foo}/v1/bar_types.go | 2 +- .../{apis => api}/foo/v1/groupversion_info.go | 2 +- .../foo/v1/zz_generated.deepcopy.go | 2 +- .../v1beta1/groupversion_info.go | 2 +- .../sea-creatures/v1beta1/kraken_types.go | 2 +- .../v1beta1/zz_generated.deepcopy.go | 2 +- .../v1beta2/groupversion_info.go | 2 +- .../sea-creatures/v1beta2/leviathan_types.go | 2 +- .../v1beta2/zz_generated.deepcopy.go | 2 +- .../{apis => api}/ship/v1/destroyer_types.go | 2 +- .../ship/v1/destroyer_webhook.go | 2 +- .../ship/v1/groupversion_info.go | 2 +- .../ship/v1/webhook_suite_test.go | 2 +- .../ship/v1/zz_generated.deepcopy.go | 2 +- .../ship/v1beta1/frigate_types.go | 2 +- .../ship/v1beta1/frigate_webhook.go | 2 +- .../ship/v1beta1/groupversion_info.go | 2 +- .../ship/v1beta1/zz_generated.deepcopy.go | 2 +- .../ship/v2alpha1/cruiser_types.go | 2 +- .../ship/v2alpha1/cruiser_webhook.go | 2 +- .../ship/v2alpha1/groupversion_info.go | 2 +- .../ship/v2alpha1/webhook_suite_test.go | 2 +- .../ship/v2alpha1/zz_generated.deepcopy.go | 2 +- .../{apis => api}/v1/groupversion_info.go | 2 +- .../{apis => api}/v1/lakers_types.go | 2 +- .../{apis => api}/v1/lakers_webhook.go | 2 +- .../{apis => api}/v1/webhook_suite_test.go | 2 +- .../{apis => api}/v1/zz_generated.deepcopy.go | 2 +- .../project-v4-multigroup/{ => cmd}/main.go | 60 +- .../bases/crew.testproject.org_captains.yaml | 2 +- .../crd/bases/fiz.testproject.org_bars.yaml | 2 +- ...y.testproject.org_healthcheckpolicies.yaml | 2 +- .../crd/bases/foo.testproject.org_bars.yaml | 2 +- ...sea-creatures.testproject.org_krakens.yaml | 2 +- ...-creatures.testproject.org_leviathans.yaml | 2 +- .../bases/ship.testproject.org_cruisers.yaml | 2 +- .../ship.testproject.org_destroyers.yaml | 2 +- .../bases/ship.testproject.org_frigates.yaml | 2 +- .../crd/bases/testproject.org_lakers.yaml | 2 +- testdata/project-v4-multigroup/go.mod | 69 +- .../hack/boilerplate.go.txt | 2 +- .../controller}/apps/deployment_controller.go | 4 +- .../controller}/apps/suite_test.go | 4 +- .../controller}/crew/captain_controller.go | 6 +- .../internal/controller/crew}/suite_test.go | 8 +- .../controller}/fiz/bar_controller.go | 6 +- .../controller}/fiz/suite_test.go | 6 +- .../healthcheckpolicy_controller.go | 6 +- .../controller}/foo.policy/suite_test.go | 6 +- .../controller}/foo/bar_controller.go | 6 +- .../controller}/foo/suite_test.go | 6 +- .../controller}/lakers_controller.go | 8 +- .../sea-creatures/kraken_controller.go | 6 +- .../sea-creatures/leviathan_controller.go | 6 +- .../controller}/sea-creatures/suite_test.go | 8 +- .../controller}/ship/cruiser_controller.go | 6 +- .../controller}/ship/destroyer_controller.go | 6 +- .../controller}/ship/frigate_controller.go | 6 +- .../controller}/ship/suite_test.go | 10 +- .../controller}/suite_test.go | 8 +- .../project-v4-with-deploy-image/Dockerfile | 6 +- .../project-v4-with-deploy-image/Makefile | 8 +- testdata/project-v4-with-deploy-image/PROJECT | 4 + .../project-v4-with-deploy-image/README.md | 14 +- .../api/v1alpha1/busybox_types.go | 2 +- .../api/v1alpha1/groupversion_info.go | 2 +- .../api/v1alpha1/memcached_types.go | 2 +- .../api/v1alpha1/memcached_webhook.go | 2 +- .../api/v1alpha1/webhook_suite_test.go | 2 +- .../api/v1alpha1/zz_generated.deepcopy.go | 2 +- .../{ => cmd}/main.go | 8 +- ...example.com.testproject.org_busyboxes.yaml | 2 +- ...xample.com.testproject.org_memcacheds.yaml | 2 +- testdata/project-v4-with-deploy-image/go.mod | 69 +- .../hack/boilerplate.go.txt | 2 +- .../controller}/busybox_controller.go | 6 +- .../controller}/busybox_controller_test.go | 4 +- .../controller}/memcached_controller.go | 6 +- .../controller}/memcached_controller_test.go | 4 +- .../controller}/suite_test.go | 6 +- .../.dockerignore | 0 .../.gitignore | 0 .../Dockerfile | 0 .../Makefile | 4 +- testdata/project-v4-with-grafana/PROJECT | 12 + .../README.md | 20 +- .../config/default/kustomization.yaml | 4 +- .../default/manager_auth_proxy_patch.yaml | 0 .../config/default/manager_config_patch.yaml | 0 .../config/manager/kustomization.yaml | 0 .../config/manager/manager.yaml | 8 +- .../config/prometheus/kustomization.yaml | 0 .../config/prometheus/monitor.yaml | 4 +- .../rbac/auth_proxy_client_clusterrole.yaml | 4 +- .../config/rbac/auth_proxy_role.yaml | 4 +- .../config/rbac/auth_proxy_role_binding.yaml | 4 +- .../config/rbac/auth_proxy_service.yaml | 4 +- .../config/rbac/kustomization.yaml | 0 .../config/rbac/leader_election_role.yaml | 4 +- .../rbac/leader_election_role_binding.yaml | 4 +- .../config/rbac/role_binding.yaml | 4 +- .../config/rbac/service_account.yaml | 4 +- testdata/project-v4-with-grafana/go.mod | 68 ++ .../grafana/controller-resources-metrics.json | 0 .../grafana/controller-runtime-metrics.json | 0 .../grafana/custom-metrics/config.yaml | 0 .../hack/boilerplate.go.txt | 2 +- .../main.go | 4 +- testdata/project-v4-with-metrics/PROJECT | 8 - testdata/project-v4-with-metrics/go.mod | 79 -- .../grafana/controller-resources-metrics.json | 306 -------- .../grafana/controller-runtime-metrics.json | 710 ------------------ .../grafana/custom-metrics/config.yaml | 15 - testdata/project-v4/Dockerfile | 6 +- testdata/project-v4/Makefile | 8 +- testdata/project-v4/PROJECT | 4 + testdata/project-v4/README.md | 14 +- testdata/project-v4/api/v1/admiral_types.go | 2 +- testdata/project-v4/api/v1/admiral_webhook.go | 2 +- testdata/project-v4/api/v1/captain_types.go | 2 +- testdata/project-v4/api/v1/captain_webhook.go | 2 +- testdata/project-v4/api/v1/firstmate_types.go | 2 +- .../project-v4/api/v1/firstmate_webhook.go | 2 +- .../project-v4/api/v1/groupversion_info.go | 2 +- .../project-v4/api/v1/webhook_suite_test.go | 2 +- .../api/v1/zz_generated.deepcopy.go | 2 +- testdata/project-v4/{ => cmd}/main.go | 12 +- .../bases/crew.testproject.org_admirales.yaml | 2 +- .../bases/crew.testproject.org_captains.yaml | 2 +- .../crew.testproject.org_firstmates.yaml | 2 +- testdata/project-v4/go.mod | 69 +- testdata/project-v4/hack/boilerplate.go.txt | 2 +- .../controller}/admiral_controller.go | 6 +- .../controller}/captain_controller.go | 6 +- .../controller}/firstmate_controller.go | 6 +- .../internal/controller}/laker_controller.go | 6 +- .../controller}/suite_test.go | 6 +- 468 files changed, 1716 insertions(+), 3798 deletions(-) delete mode 100755 build/build_kubebuilder.sh delete mode 100644 build/cloudbuild.yaml delete mode 100644 build/cloudbuild_local.yaml delete mode 100644 build/cloudbuild_snapshot.yaml rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/.dockerignore (100%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/.gitignore (100%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/Dockerfile (100%) rename testdata/{project-v4-with-metrics => project-v3-with-grafana}/Makefile (99%) create mode 100644 testdata/project-v3-with-grafana/PROJECT rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/README.md (85%) rename testdata/{project-v4-with-metrics => project-v3-with-grafana}/config/default/kustomization.yaml (96%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/config/default/manager_auth_proxy_patch.yaml (100%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/config/default/manager_config_patch.yaml (100%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/config/manager/kustomization.yaml (100%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/config/manager/manager.yaml (93%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/config/prometheus/kustomization.yaml (100%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/config/prometheus/monitor.yaml (85%) rename testdata/{project-v4-with-metrics => project-v3-with-grafana}/config/rbac/auth_proxy_client_clusterrole.yaml (75%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/config/rbac/auth_proxy_role.yaml (80%) rename testdata/{project-v4-with-metrics => project-v3-with-grafana}/config/rbac/auth_proxy_role_binding.yaml (80%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/config/rbac/auth_proxy_service.yaml (81%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/config/rbac/kustomization.yaml (100%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/config/rbac/leader_election_role.yaml (85%) rename testdata/{project-v4-with-metrics => project-v3-with-grafana}/config/rbac/leader_election_role_binding.yaml (80%) rename testdata/{project-v3-with-metrics => project-v3-with-grafana}/config/rbac/role_binding.yaml (80%) rename testdata/{project-v4-with-metrics => project-v3-with-grafana}/config/rbac/service_account.yaml (71%) create mode 100644 testdata/project-v3-with-grafana/go.mod rename testdata/{project-v3-declarative-v1 => project-v3-with-grafana}/grafana/controller-resources-metrics.json (100%) rename testdata/{project-v3-declarative-v1 => project-v3-with-grafana}/grafana/controller-runtime-metrics.json (100%) rename testdata/{project-v3-declarative-v1 => project-v3-with-grafana}/grafana/custom-metrics/config.yaml (100%) rename testdata/{project-v4-with-metrics => project-v3-with-grafana}/hack/boilerplate.go.txt (93%) rename testdata/{project-v4-with-metrics => project-v3-with-grafana}/main.go (97%) delete mode 100644 testdata/project-v3-with-metrics/PROJECT delete mode 100644 testdata/project-v3-with-metrics/go.mod rename testdata/project-v4-config/{ => cmd}/main.go (93%) rename testdata/project-v4-config/{controllers => internal/controller}/admiral_controller.go (94%) rename testdata/project-v4-config/{controllers => internal/controller}/captain_controller.go (94%) rename testdata/project-v4-config/{controllers => internal/controller}/firstmate_controller.go (94%) rename testdata/{project-v4/controllers => project-v4-config/internal/controller}/laker_controller.go (94%) rename testdata/{project-v4-multigroup/controllers/crew => project-v4-config/internal/controller}/suite_test.go (94%) rename testdata/project-v4-declarative-v1/{ => cmd}/main.go (94%) delete mode 100644 testdata/project-v4-declarative-v1/grafana/controller-resources-metrics.json delete mode 100644 testdata/project-v4-declarative-v1/grafana/controller-runtime-metrics.json delete mode 100644 testdata/project-v4-declarative-v1/grafana/custom-metrics/config.yaml rename testdata/project-v4-declarative-v1/{controllers => internal/controller}/admiral_controller.go (97%) rename testdata/project-v4-declarative-v1/{controllers => internal/controller}/captain_controller.go (97%) rename testdata/project-v4-declarative-v1/{controllers => internal/controller}/firstmate_controller.go (98%) rename testdata/project-v4-declarative-v1/{controllers => internal/controller}/suite_test.go (93%) rename testdata/project-v4-multigroup/{apis => api}/crew/v1/captain_types.go (98%) rename testdata/project-v4-multigroup/{apis => api}/crew/v1/captain_webhook.go (98%) rename testdata/project-v4-multigroup/{apis => api}/crew/v1/groupversion_info.go (96%) rename testdata/project-v4-multigroup/{apis => api}/crew/v1/webhook_suite_test.go (98%) rename testdata/project-v4-multigroup/{apis => api}/crew/v1/zz_generated.deepcopy.go (98%) rename testdata/project-v4-multigroup/{apis/foo => api/fiz}/v1/bar_types.go (97%) rename testdata/project-v4-multigroup/{apis => api}/fiz/v1/groupversion_info.go (96%) rename testdata/project-v4-multigroup/{apis => api}/fiz/v1/zz_generated.deepcopy.go (98%) rename testdata/project-v4-multigroup/{apis => api}/foo.policy/v1/groupversion_info.go (96%) rename testdata/project-v4-multigroup/{apis => api}/foo.policy/v1/healthcheckpolicy_types.go (98%) rename testdata/project-v4-multigroup/{apis => api}/foo.policy/v1/zz_generated.deepcopy.go (98%) rename testdata/project-v4-multigroup/{apis/fiz => api/foo}/v1/bar_types.go (97%) rename testdata/project-v4-multigroup/{apis => api}/foo/v1/groupversion_info.go (96%) rename testdata/project-v4-multigroup/{apis => api}/foo/v1/zz_generated.deepcopy.go (98%) rename testdata/project-v4-multigroup/{apis => api}/sea-creatures/v1beta1/groupversion_info.go (96%) rename testdata/project-v4-multigroup/{apis => api}/sea-creatures/v1beta1/kraken_types.go (98%) rename testdata/project-v4-multigroup/{apis => api}/sea-creatures/v1beta1/zz_generated.deepcopy.go (98%) rename testdata/project-v4-multigroup/{apis => api}/sea-creatures/v1beta2/groupversion_info.go (96%) rename testdata/project-v4-multigroup/{apis => api}/sea-creatures/v1beta2/leviathan_types.go (98%) rename testdata/project-v4-multigroup/{apis => api}/sea-creatures/v1beta2/zz_generated.deepcopy.go (98%) rename testdata/project-v4-multigroup/{apis => api}/ship/v1/destroyer_types.go (98%) rename testdata/project-v4-multigroup/{apis => api}/ship/v1/destroyer_webhook.go (97%) rename testdata/project-v4-multigroup/{apis => api}/ship/v1/groupversion_info.go (96%) rename testdata/project-v4-multigroup/{apis => api}/ship/v1/webhook_suite_test.go (98%) rename testdata/project-v4-multigroup/{apis => api}/ship/v1/zz_generated.deepcopy.go (98%) rename testdata/project-v4-multigroup/{apis => api}/ship/v1beta1/frigate_types.go (98%) rename testdata/project-v4-multigroup/{apis => api}/ship/v1beta1/frigate_webhook.go (96%) rename testdata/project-v4-multigroup/{apis => api}/ship/v1beta1/groupversion_info.go (96%) rename testdata/project-v4-multigroup/{apis => api}/ship/v1beta1/zz_generated.deepcopy.go (98%) rename testdata/project-v4-multigroup/{apis => api}/ship/v2alpha1/cruiser_types.go (98%) rename testdata/project-v4-multigroup/{apis => api}/ship/v2alpha1/cruiser_webhook.go (98%) rename testdata/project-v4-multigroup/{apis => api}/ship/v2alpha1/groupversion_info.go (96%) rename testdata/project-v4-multigroup/{apis => api}/ship/v2alpha1/webhook_suite_test.go (98%) rename testdata/project-v4-multigroup/{apis => api}/ship/v2alpha1/zz_generated.deepcopy.go (98%) rename testdata/project-v4-multigroup/{apis => api}/v1/groupversion_info.go (96%) rename testdata/project-v4-multigroup/{apis => api}/v1/lakers_types.go (98%) rename testdata/project-v4-multigroup/{apis => api}/v1/lakers_webhook.go (98%) rename testdata/project-v4-multigroup/{apis => api}/v1/webhook_suite_test.go (98%) rename testdata/project-v4-multigroup/{apis => api}/v1/zz_generated.deepcopy.go (98%) rename testdata/project-v4-multigroup/{ => cmd}/main.go (82%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/apps/deployment_controller.go (95%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/apps/suite_test.go (93%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/crew/captain_controller.go (94%) rename testdata/{project-v4-config/controllers => project-v4-multigroup/internal/controller/crew}/suite_test.go (89%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/fiz/bar_controller.go (94%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/fiz/suite_test.go (93%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/foo.policy/healthcheckpolicy_controller.go (94%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/foo.policy/suite_test.go (92%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/foo/bar_controller.go (94%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/foo/suite_test.go (93%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/lakers_controller.go (93%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/sea-creatures/kraken_controller.go (93%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/sea-creatures/leviathan_controller.go (93%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/sea-creatures/suite_test.go (91%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/ship/cruiser_controller.go (94%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/ship/destroyer_controller.go (94%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/ship/frigate_controller.go (94%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/ship/suite_test.go (92%) rename testdata/project-v4-multigroup/{controllers => internal/controller}/suite_test.go (92%) rename testdata/project-v4-with-deploy-image/{ => cmd}/main.go (96%) rename testdata/project-v4-with-deploy-image/{controllers => internal/controller}/busybox_controller.go (99%) rename testdata/project-v4-with-deploy-image/{controllers => internal/controller}/busybox_controller_test.go (98%) rename testdata/project-v4-with-deploy-image/{controllers => internal/controller}/memcached_controller.go (99%) rename testdata/project-v4-with-deploy-image/{controllers => internal/controller}/memcached_controller_test.go (98%) rename testdata/project-v4-with-deploy-image/{controllers => internal/controller}/suite_test.go (93%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/.dockerignore (100%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/.gitignore (100%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/Dockerfile (100%) rename testdata/{project-v3-with-metrics => project-v4-with-grafana}/Makefile (99%) create mode 100644 testdata/project-v4-with-grafana/PROJECT rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/README.md (85%) rename testdata/{project-v3-with-metrics => project-v4-with-grafana}/config/default/kustomization.yaml (96%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/config/default/manager_auth_proxy_patch.yaml (100%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/config/default/manager_config_patch.yaml (100%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/config/manager/kustomization.yaml (100%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/config/manager/manager.yaml (93%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/config/prometheus/kustomization.yaml (100%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/config/prometheus/monitor.yaml (85%) rename testdata/{project-v3-with-metrics => project-v4-with-grafana}/config/rbac/auth_proxy_client_clusterrole.yaml (75%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/config/rbac/auth_proxy_role.yaml (80%) rename testdata/{project-v3-with-metrics => project-v4-with-grafana}/config/rbac/auth_proxy_role_binding.yaml (80%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/config/rbac/auth_proxy_service.yaml (81%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/config/rbac/kustomization.yaml (100%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/config/rbac/leader_election_role.yaml (85%) rename testdata/{project-v3-with-metrics => project-v4-with-grafana}/config/rbac/leader_election_role_binding.yaml (80%) rename testdata/{project-v4-with-metrics => project-v4-with-grafana}/config/rbac/role_binding.yaml (80%) rename testdata/{project-v3-with-metrics => project-v4-with-grafana}/config/rbac/service_account.yaml (71%) create mode 100644 testdata/project-v4-with-grafana/go.mod rename testdata/{project-v3-with-metrics => project-v4-with-grafana}/grafana/controller-resources-metrics.json (100%) rename testdata/{project-v3-with-metrics => project-v4-with-grafana}/grafana/controller-runtime-metrics.json (100%) rename testdata/{project-v3-with-metrics => project-v4-with-grafana}/grafana/custom-metrics/config.yaml (100%) rename testdata/{project-v3-with-metrics => project-v4-with-grafana}/hack/boilerplate.go.txt (93%) rename testdata/{project-v3-with-metrics => project-v4-with-grafana}/main.go (97%) delete mode 100644 testdata/project-v4-with-metrics/PROJECT delete mode 100644 testdata/project-v4-with-metrics/go.mod delete mode 100644 testdata/project-v4-with-metrics/grafana/controller-resources-metrics.json delete mode 100644 testdata/project-v4-with-metrics/grafana/controller-runtime-metrics.json delete mode 100644 testdata/project-v4-with-metrics/grafana/custom-metrics/config.yaml rename testdata/project-v4/{ => cmd}/main.go (94%) rename testdata/project-v4/{controllers => internal/controller}/admiral_controller.go (94%) rename testdata/project-v4/{controllers => internal/controller}/captain_controller.go (94%) rename testdata/project-v4/{controllers => internal/controller}/firstmate_controller.go (94%) rename testdata/{project-v4-config/controllers => project-v4/internal/controller}/laker_controller.go (94%) rename testdata/project-v4/{controllers => internal/controller}/suite_test.go (93%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6651f6225b1..18244da68d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: with: go-version: '~1.19' - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v4 with: version: v1.11.2 args: release -f ./build/.goreleaser.yml --rm-dist diff --git a/RELEASE.md b/RELEASE.md index 4f00aad65b7..3c130a888b2 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -86,13 +86,8 @@ The releases occur in an account in the Google Cloud (See [here](https://console ### To build the Kubebuilder CLI binaries: -A trigger `build-kb-release` is configured to call [build/cloudbuild.yaml](build/cloudbuild.yaml). -This trigger will be executed when any new tag be published. -The tags must be built from the release branch (Currently, `release-3`). - -Also, we have a trigger to generate snapshots builds from the master branch. -This trigger will call [build/cloudbuild_snapshot.yaml](build/cloudbuild_snapshot.yaml) -when any change needs to be performed on master. +A trigger GitHub action [release](.github/workflows/release.yml) is trigged when a new tag is pushed. +This action will caall the job [./build/.goreleaser.yml](./build/.goreleaser.yml). ### To build the Kubebuilder-tools: (Artifacts required to use ENV TEST) diff --git a/build/.goreleaser.yml b/build/.goreleaser.yml index 881dab0aa54..1b207212896 100644 --- a/build/.goreleaser.yml +++ b/build/.goreleaser.yml @@ -44,7 +44,7 @@ builds: - darwin_amd64 - darwin_arm64 env: - - KUBERNETES_VERSION=1.25.0 + - KUBERNETES_VERSION=1.26.0 - CGO_ENABLED=0 # Only binaries of the form "kubebuilder_${goos}_${goarch}" will be released. diff --git a/build/build_kubebuilder.sh b/build/build_kubebuilder.sh deleted file mode 100755 index 6569396b865..00000000000 --- a/build/build_kubebuilder.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script runs goreleaser using the build/.goreleaser.yml config. -# While it can be run locally, it is intended to be run by cloudbuild -# in the goreleaser/goreleaser image. - -function usage() { - echo " - This script runs goreleaser using the build/.goreleaser.yml config. - While it can be run locally, it is intended to be run by cloudbuild - in the goreleaser/goreleaser image. - - GORELEASER_FLAGS: contains flags to pass to the goreleaser binary (default: only --config is set). - - SNAPSHOT: if set to any value, runs goreleaser in snapshot mode with mock release notes (default: unset). - - NOTES_FLAGS: contains flags to pass to the notes binary (sigs.k8s.io/kubebuilder-release-tools/notes). - Does nothing if SNAPSHOT is set. (default: unset). - - Examples: - - # Run in snapshot mode: fake release notes, nothing is published, binaries build in '$(pwd)/dist' - \$ SNAPSHOT=1 $0 - - # Add a release type to the release notes - \$ NOTES_FLAGS=\"-r beta\" $0 -" -} - -# GORELEASER_FLAGS contains flags for goreleaser such that the binary can be run -# in local/snapshot/prod mode from the same script. -# NOTE: if --snapshot is in GORELEASER_FLAGS, the release is not published to GitHub -# and the build is available under $PWD/dist. -GORELEASER_FLAGS="${GORELEASER_FLAGS:-}" -# NOTES_FLAGS contains flags for the release notes generator (see install_notes for details). -NOTES_FLAGS="${NOTES_FLAGS:-}" -# SNAPSHOT is set by the CLI flag parser if --snapshot is a passed flag. -# If not set, release notes are not generated. -SNAPSHOT="${SNAPSHOT:-}" - -while [ $# -gt 0 ]; do - case $1 in - -h|--help) - usage - exit 0 - ;; - esac -done - - -# install_notes installs kubebuilder's release notes generator globally with name "notes". -function install_notes() { - local tmp=$(mktemp -d) - pushd "$tmp" - go mod init tmp - # Get by commit because v0.1.1 cannot be retrieved via `go get`. - go get sigs.k8s.io/kubebuilder-release-tools/notes@4777888c377a26956f1831d5b9207eea1fa3bf29 - popd - rm -rf "$tmp" -} - -set -o errexit -set -o pipefail - -# Generate real release notes. -if [ -z "$SNAPSHOT" ]; then - tmp_notes="$(mktemp)" - trap "rm -f ${tmp_notes}" EXIT - install_notes - if [[ -n "${CLOUD_BUILD}" ]]; then - # we refresh just before this, no point (plus, we fiddle with the current branch a bit) - NOTES_FLAGS+=" --use-upstream=false" - # we can look for tag alpha/beta here too - # (TODO(directxman12): this should be in the tool) - [[ "${TAG_NAME}" == "v"*"-alpha."* ]] && NOTES_FLAGS+=" -r alpha" - [[ "${TAG_NAME}" == "v"*"-beta."* ]] && NOTES_FLAGS+=" -r beta" - [[ "${TAG_NAME}" == "v"*"-rc."* ]] && NOTES_FLAGS+=" -r rc" - fi - # TODO(cmacedo): figure out how to download the release notes and let it available in the cloud build - # Currently it does not work: https://github.com/kubernetes-sigs/kubebuilder/issues/2667 - # notes $NOTES_FLAGS | tee "$tmp_notes" - notes="Mock Release Notes for $(git describe --tags --always --broken)" - # we need to delete the tag for the release notes script, so restore it when done so that - # go releaser can find the right tag - if [[ -n "${TAG_NAME}" ]]; then - git tag ${TAG_NAME} - fi - GORELEASER_FLAGS="${GORELEASER_FLAGS} --release-notes=${tmp_notes}" -else - # TODO(estroz): figure out how to generate snapshot release notes with the kubebuilder generator. - echo "Running in snapshot mode. Release notes will not be generated from commits." - notes="Mock Release Notes for $(git describe --tags --always --broken)" - GORELEASER_FLAGS="${GORELEASER_FLAGS} --snapshot --rm-dist --skip-validate --release-notes <(echo \"${notes}\")" -fi - -# eval to run process substitution. -eval goreleaser release --config=build/.goreleaser.yml $GORELEASER_FLAGS diff --git a/build/cloudbuild.yaml b/build/cloudbuild.yaml deleted file mode 100644 index 70c62748c40..00000000000 --- a/build/cloudbuild.yaml +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Instructions to run locally: -# Download google container builder: https://github.com/GoogleCloudPlatform/cloud-build-local -# $ mkdir cloudbuild -# $ cloud-build-local --config=build/cloudbuild_local.yaml --dryrun=false --write-workspace=./cloudbuild . -# Release tar will be in ./cloudbuild - -steps: -- name: "gcr.io/cloud-builders/git" - entrypoint: 'bash' - args: - - '-c' - - | - git fetch --tags --unshallow - git for-each-ref --contains HEAD - # TAG_NAME is defined by GCB, so uses 1 dollar sign, BRANCH_NAME is bash, so we need to escape it - # with two dollar signs - export BRANCH_NAME=$(git for-each-ref --format="%(refname:strip=-1)" --contains HEAD 'refs/remotes/origin/release-*') - export ALL_BRANCHES=$(git for-each-ref --format="%(refname:strip=-1)" 'refs/remotes/origin/release-*') - echo "branch: $${BRANCH_NAME}, tag: ${TAG_NAME}, all release branches: $${ALL_BRANCHES}" - for branch in $${ALL_BRANCHES}; do - git branch $${branch} origin/$${branch} - done - git branch -f $${BRANCH_NAME} HEAD - git checkout $${BRANCH_NAME} - git branch --set-upstream-to=origin/$${BRANCH_NAME} - git tag -d ${TAG_NAME} -- name: "goreleaser/goreleaser:v1.11.2" - entrypoint: "bash" - args: ["build/build_kubebuilder.sh"] - env: - - 'TAG_NAME=$TAG_NAME' - - 'CLOUD_BUILD=true' - - 'GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}' \ No newline at end of file diff --git a/build/cloudbuild_local.yaml b/build/cloudbuild_local.yaml deleted file mode 100644 index ed97f90aa34..00000000000 --- a/build/cloudbuild_local.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Instructions to run locally: -# Download google container builder: https://github.com/GoogleCloudPlatform/cloud-build-local -# $ mkdir cloudbuild -# $ cloud-build-local --config=build/cloudbuild_local.yaml --dryrun=false --write-workspace=./cloudbuild . -# Release tar will be in ./cloudbuild - -steps: -- name: "goreleaser/goreleaser:v1.11.2" - entrypoint: "bash" - env: ["SNAPSHOT=1"] - args: ["build/build_kubebuilder.sh"] diff --git a/build/cloudbuild_snapshot.yaml b/build/cloudbuild_snapshot.yaml deleted file mode 100644 index 9eaf2d4ffc4..00000000000 --- a/build/cloudbuild_snapshot.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2018 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Instructions to run locally: -# Download google container builder: https://github.com/GoogleCloudPlatform/cloud-build-local -# $ mkdir cloudbuild -# $ cloud-build-local --config=build/cloudbuild_snapshot.yaml --dryrun=false --write-workspace=./cloudbuild . -# Release tar will be in ./cloudbuild - -steps: -- name: "goreleaser/goreleaser:v1.11.2" - entrypoint: "bash" - env: ["SNAPSHOT=1"] - args: ["build/build_kubebuilder.sh"] - timeout: 30m -- name: "ubuntu" - args: ["tar", "-zcvf", "kubebuilder_linux_amd64.tar.gz", "-C", "dist/kubebuilder_linux_amd64_v1", "kubebuilder"] -- name: "gcr.io/cloud-builders/gsutil" - args: ["-h", "Content-Type:application/gzip", "cp", "kubebuilder_linux_amd64.tar.gz", "gs://kubebuilder-release/kubebuilder_master_linux_amd64.tar.gz"] -- name: "ubuntu" - args: ["tar", "-zcvf", "kubebuilder_linux_arm64.tar.gz", "-C", "dist/kubebuilder_linux_arm64", "kubebuilder"] -- name: "gcr.io/cloud-builders/gsutil" - args: ["-h", "Content-Type:application/gzip", "cp", "kubebuilder_linux_arm64.tar.gz", "gs://kubebuilder-release/kubebuilder_master_linux_arm64.tar.gz"] -- name: "ubuntu" - args: ["tar", "-zcvf", "kubebuilder_linux_ppc64le.tar.gz", "-C", "dist/kubebuilder_linux_ppc64le", "kubebuilder"] -- name: "gcr.io/cloud-builders/gsutil" - args: ["-h", "Content-Type:application/gzip", "cp", "kubebuilder_linux_ppc64le.tar.gz", "gs://kubebuilder-release/kubebuilder_master_linux_ppc64le.tar.gz"] -- name: "ubuntu" - args: ["tar", "-zcvf", "kubebuilder_darwin_amd64.tar.gz", "-C", "dist/kubebuilder_darwin_amd64_v1", "kubebuilder"] -- name: "gcr.io/cloud-builders/gsutil" - args: ["-h", "Content-Type:application/gzip", "cp", "kubebuilder_darwin_amd64.tar.gz", "gs://kubebuilder-release/kubebuilder_master_darwin_amd64.tar.gz"] -- name: "ubuntu" - args: ["tar", "-zcvf", "kubebuilder_darwin_arm64.tar.gz", "-C", "dist/kubebuilder_darwin_arm64", "kubebuilder"] -- name: "gcr.io/cloud-builders/gsutil" - args: ["-h", "Content-Type:application/gzip", "cp", "kubebuilder_darwin_arm64.tar.gz", "gs://kubebuilder-release/kubebuilder_master_darwin_arm64.tar.gz"] - - diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md index 3a90c65b218..a2eb8a02ae0 100644 --- a/docs/book/src/SUMMARY.md +++ b/docs/book/src/SUMMARY.md @@ -6,8 +6,6 @@ [Architecture](./architecture.md) -[FAQ](./faq.md) - --- - [Tutorial: Building CronJob](cronjob-tutorial/cronjob-tutorial.md) @@ -134,6 +132,8 @@ --- +[FAQ](./faq.md) + [Appendix: The TODO Landing Page](./TODO.md) [plugins]: ./plugins/plugins.md diff --git a/docs/book/src/component-config-tutorial/testdata/project/Makefile b/docs/book/src/component-config-tutorial/testdata/project/Makefile index e833f6285ad..a551a6e1cca 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/Makefile +++ b/docs/book/src/component-config-tutorial/testdata/project/Makefile @@ -2,7 +2,7 @@ # Image URL to use all building/pushing image targets IMG ?= controller:latest # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.25.0 +ENVTEST_K8S_VERSION = 1.26.0 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) diff --git a/docs/book/src/cronjob-tutorial/testdata/emptycontroller.go b/docs/book/src/cronjob-tutorial/testdata/emptycontroller.go index 9a1fc29be4e..bc941060ec0 100644 --- a/docs/book/src/cronjob-tutorial/testdata/emptycontroller.go +++ b/docs/book/src/cronjob-tutorial/testdata/emptycontroller.go @@ -55,6 +55,16 @@ needed to run. As we add more functionality, we'll need to revisit these. // +kubebuilder:rbac:groups=batch.tutorial.kubebuilder.io,resources=cronjobs,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=batch.tutorial.kubebuilder.io,resources=cronjobs/status,verbs=get;update;patch +/* +The `ClusterRole` manifest at `config/rbac/role.yaml` is generated from the above markers via controller-gen with the following command: +*/ + +// make manifests + +/* +NOTE: If you receive an error, please run the specified command in the error and re-run `make manifests`. +*/ + /* `Reconcile` actually performs the reconciling for a single named object. Our [Request](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/reconcile?tab=doc#Request) just has a name, but we can use the client to fetch diff --git a/docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md b/docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md index cae361c45ca..e776bb5beb9 100644 --- a/docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md +++ b/docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md @@ -16,11 +16,17 @@ The recommended upgrade approach is to follow the [Migration Guide go/v3 to go/v ## Migration from project config version "go/v3" to "go/v4" -Update `PROJECT` file layout which stores the information about the resources are use to enable plugins to make useful decisions when scaffolding. +Update the `PROJECT` file layout which stores information about the resources that are used to enable plugins make +useful decisions while scaffolding. The `layout` field indicates the scaffolding and the primary plugin version in use. -Furthermore, the `PROJECT` file itself is now versioned. The `version` field corresponds to the version of the `PROJECT` file itself, while the `layout` field indicates the scaffolding and the primary plugin version in use. +### Steps to migrate + +#### Migrate the layout version into the PROJECT file + +The following steps describe the manual changes required to bring the project configuration file (`PROJECT`). +These change will add the information that Kubebuilder would add when generating the file. This file can be found in the root directory. -Update: +Update the PROJECT file by replacing: ```yaml layout: @@ -35,16 +41,119 @@ layout: ``` -### Steps to migrate +#### Changes to the layout -- Update the `main.go` with the changes which can be found in the samples under testdata for the release tag used. (see for example `testdata/project-v4/main.go`). -- Update the Makefile with the changes which can be found in the samples under testdata for the release tag used. (see for example `testdata/project-v4/Makefile`) -- Update the `go.mod` with the changes which can be found in the samples under `testdata` for the release tag used. (see for example `testdata/project-v4/go.mod`). Then, run -`go mod tidy` to ensure that you get the latest dependencies and your Golang code has no breaking changes. -- Update the manifest under `config/` directory with all changes performed in the default scaffold done with `go/v4-alpha` plugin. (see for example `testdata/project-v4/config/`) to get all changes in the -default scaffolds to be applied on your project -- Create `config/samples/kustomization.yaml` with all CR samples specified. (see for example `testdata/project-v4/config/samples/kustomization.yaml`) -- Replace the import `admissionv1beta1 "k8s.io/api/admission/v1beta1"` with `admissionv1 "k8s.io/api/admission/v1"` in the webhook test files +##### New layout: + +- The directory `apis` was renamed to `api` to follow the standard +- The `controller(s)` directory has been moved under a new directory called `internal` and renamed to singular as well `controller` +- The `main.go` previously scaffolded in the root directory has been moved under a new directory called `cmd` + +Therefore, you can check the changes in the layout results into: + +```sh +... +├── cmd +│ └── main.go +├── internal +│ └── controller +└── api +``` + +##### Migrating to the new layout: + +- Create a new directory `cmd` and move the `main.go` under it. +- If your project support multi-group the APIs are scaffold under a directory called `apis`. Rename this directory to `api` +- Move the `controllers` directory under the `internal` and rename it for `controller` +- Now ensure that the imports will be updated accordingly by: + - Update the `main.go` imports to look for the new path of your controllers under the `pkg` directory + +**Then, let's update the scaffolds paths** + +- Update the Dockerfile to ensure that you will have: + +``` +COPY cmd/main.go cmd/main.go +COPY api/ api/ +COPY internal/controller/ internal/controller/ +``` + +Then, replace: + +``` +RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager main.go + +``` + +With: + +``` +RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go +``` + +- Update the Makefile targets to build and run the manager by replacing: + +``` +.PHONY: build +build: manifests generate fmt vet ## Build manager binary. + go build -o bin/manager main.go + +.PHONY: run +run: manifests generate fmt vet ## Run a controller from your host. + go run ./main.go +``` + +With: + +``` +.PHONY: build +build: manifests generate fmt vet ## Build manager binary. + go build -o bin/manager cmd/main.go + +.PHONY: run +run: manifests generate fmt vet ## Run a controller from your host. + go run ./cmd/main.go +``` + +- Update the `internal/controller/suite_test.go` to set the path for the `CRDDirectoryPaths`: + +Replace: + +``` +CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, +``` + +With: + +``` +CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, +``` + +Note that if your project has multiple groups (`multigroup:true`) then the above update should result into `"..", "..", "..",` instead of `"..",".."` + +#### Now, let's update the PATHs in the PROJECT file accordingly + +The PROJECT tracks the paths of all APIs used in your project. Ensure that they now point to `api/...` as the following example: + +Before update: + group: crew + kind: Captain + path: sigs.k8s.io/kubebuilder/testdata/project-v4/apis/crew/v1 +``` + +After Update: + +``` + group: crew + kind: Captain + path: sigs.k8s.io/kubebuilder/testdata/project-v4/api/crew/v1 +``` + +### Update kustomize manifests with the changes made so far + +- Update the manifest under `config/` directory with all changes performed in the default scaffold done with `go/v4-alpha` plugin. (see for example `testdata/project-v4/config/`) to get all changes in the + default scaffolds to be applied on your project +- Create `config/samples/kustomization.yaml` with all Custom Resources samples specified into `config/samples`. _(see for example `testdata/project-v4/config/samples/kustomization.yaml`)_ +### If you have webhooks: + +Replace the import `admissionv1beta1 "k8s.io/api/admission/v1beta1"` with `admissionv1 "k8s.io/api/admission/v1"` in the webhook test files + +### Makefile updates + +Update the Makefile with the changes which can be found in the samples under testdata for the release tag used. (see for example `testdata/project-v4/Makefile`) + +### Update the dependencies + +Update the `go.mod` with the changes which can be found in the samples under `testdata` for the release tag used. (see for example `testdata/project-v4/go.mod`). Then, run +`go mod tidy` to ensure that you get the latest dependencies and your Golang code has no breaking changes. + ### Verification In the steps above, you updated your project manually with the goal of ensuring that it follows diff --git a/docs/book/src/migration/migration_guide_gov3_to_gov4.md b/docs/book/src/migration/migration_guide_gov3_to_gov4.md index c7741e8b398..a62bb33cc91 100644 --- a/docs/book/src/migration/migration_guide_gov3_to_gov4.md +++ b/docs/book/src/migration/migration_guide_gov3_to_gov4.md @@ -50,7 +50,7 @@ module tutorial.kubebuilder.io/migration-project Now, we can finish initializing the project with kubebuilder. ```bash -kubebuilder init --domain tutorial.kubebuilder.io plugins=go/v4-alpha +kubebuilder init --domain tutorial.kubebuilder.io --plugins=go/v4-alpha ```