github kubernetes-sigs/kubebuilder v4.4.0

18 hours ago

changes since v4.3.1

✨ New Features

  • (go/v4): Upgrade golangci-lint from v1.61.0 to v1.62.2 (#4448)
  • (go/v4): Add support for go 1.23 (#4446)
  • (go/v4): Upgraded controller-gen from v0.16.4 to v0.17.0. (#4254, #4457)
  • (go/v4): Upgrade controller-runtime v0.19.1 to v0.19.4 (#4482)
  • (kustomize/v2): Kubebuilder scaffolds rules under config/rbac to help cluster admins manage the permissions for their solutions. The comments and explanations added to these scaffolds have been improved. Furthermore, it now includes admin-specific rules to make it easier for cluster admins to work with features like aggregation (e.g., rbac.authorization.k8s.io/aggregate-to-admin). More info. (#4299)
  • (go/v4): Added configurations for securing Metrics Server and Prometheus integration using TLS and certificates managed by CertManager, enabling users to align their solutions with best practices, enhance security, and achieve production readiness. (#4243, #4312, #4400)
  • (go/v4): Added webhook CertWatcher and flags for custom certificate configuration #4429)
  • (go/v4): Ensures that the manager container adheres to Restricted Pod Security Standards and can operate in namespaces labelled for restricted policies, following best practices. (#4251).
  • (go/v4): Ensure that e2e test scaffolds will validate that the enforcement is prepared to ensure that all can run as restricted. See that the curl pod to use the metrics was updated and changed (#4435)
  • (go/v4): Improved developer experience and maintainability by updating actions and the Makefile to utilize go.mod for Go version management and automating ENVTEST versioning by retrieving the version directly from go.mod, based on the controller-runtime dependency in use. (#4385) (#4401)
  • (helm/v1-alpha): Introduced the new helm.kubebuilder.io/v1-alpha plugin to enable users to distribute solutions using Helm Charts. Example scaffolds are available under testdata/project-v4-with-plugins/dist/chart. (#4227, #4315, #4350, #4351, #4356, #4357, #4371, #4377, #4383, #4380, #4373, #4386, #4375, #4388, #4406, #4399, #4419,#4451). IMPORTANT: The helm.kubebuilder.io/v1-alpha is an experimental initial version. (More info)
  • (go/v4,kustomize/v2): Add app.kubernetes.io/name label to allow more precise configurations (#4437)
  • (go/v4): Standardize the webhook and controller test suites (#4447)
  • (go/v4): Add new makefile target to check and validate the linter config (#4462)
  • (go/v4): Added Hub and Spoke support for conversion webhooks. Developers can now scaffold webhooks for resource conversion more easily. (#4254) Example:
    # Create API to test conversion from v1 to v2
    $ kubebuilder create api --group crew --version v1 --kind FirstMate --controller=true --resource=true --make=false
    $ kubebuilder create api --group crew --version v2 --kind FirstMate --controller=false --resource=true --make=false
    $ kubebuilder create webhook --group crew --version v1 --kind FirstMate --conversion --make=false --spoke v2

🐛 Bug Fixes

  • (go/v4): Fixed an issue where GitHub Actions workflows were overwritten by commands, ensuring users can now customize workflows freely without their changes being overridden. (#4379)
  • (go/v4): Resolved linting issues in generated scaffolds. (#4384)
  • (kustomize/v2, go/v4): Fixed CA injection for conversion webhooks. Previously, the CA injection patch was not accurate; The injection should occur only for CRDs, which are conversion types and not for all CRDs when a webhook with --conversion option is scaffolded. The issue goes back to release 3.5.0 (where to replace vars for replacements was done and the kustomize/v2-alpha plugin was introduced). It was not previously found, likely because conversion webhook features were incomplete, which is addressed in this release. Now, users can use the tool to generate the conversion webhooks properly (#4254). (#4282)
  • (go/v4): Ensure that schemas are added before starting EnvTest-based suite tests for webhooks and controllers (#4466)
  • (go/v4): e2e-tests: cleanup by removing calls to call make generate and manifests (#4471)

What's Changed

New Contributors

Full Changelog: v4.3.1...v4.4.0

Don't miss a new kubebuilder release

NewReleases is sending notifications on new releases.