Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kubernetes to v1.27 and Kustomize to v5 #850

Merged
merged 1 commit into from
May 23, 2023
Merged

Conversation

aryan9600
Copy link
Member

@aryan9600 aryan9600 commented May 4, 2023

This PR updates Kustomize from v4.5.7 to v5.0.3 (see v5 changelog for breaking changes).

The Kubernetes packages were updated from v0.26.3 to v0.27.2 and controller-gen from v0.11.1 to v0.12.0.

Changes made due to breaking changes in controller-runtime v0.15:

  • Watches require a plain client.Object instead of a source.Kind object.
  • handler.MapFunc requires a Go context.
  • ctrlcache.Options.SelectorByObject was renamed to ctrlcache.Options.ByObject.
  • ctrl.Options.Namespace was moved to ctrlcache.Options.Namespaces.
  • ctrl.Options.ClientDisableCacheFor was moved to ctrlclient.CacheOptions.DisableFor.
  • ctrl.Options.Port has been deprecated and removed.

Part of: fluxcd/flux2#3564 and fluxcd/flux2#3907

@stefanprodan stefanprodan changed the title update k8s to v1.27 and kustomize to v5 Update Kubernetes to v1.27 and Kustomize to v5 May 4, 2023
@aryan9600 aryan9600 marked this pull request as draft May 4, 2023 07:46
@stefanprodan stefanprodan force-pushed the k8s-1.27 branch 3 times, most recently from 95a2195 to a987419 Compare May 22, 2023 20:37
@stefanprodan stefanprodan added the dependencies Pull requests that update a dependency label May 22, 2023
@stefanprodan stefanprodan force-pushed the k8s-1.27 branch 2 times, most recently from f6ec792 to 1f9cbbc Compare May 23, 2023 06:23
main.go Show resolved Hide resolved
@stefanprodan stefanprodan marked this pull request as ready for review May 23, 2023 07:19
Changes made due to breaking changes in controller-runtime:
* `Watches` accepts a plain `client.Object` instead of a `source.Kind`
  object.
* Some fields in `controller.Options` are now in `config.Controller` which
  is embedded in `controller.Options`.
* `handler.MapFunc` now accepts a context.
* `ctrlcache.Options` uses `ByObject` instead of `SelectorByObject`.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
@stefanprodan stefanprodan merged commit c8a9ec6 into main May 23, 2023
@stefanprodan stefanprodan deleted the k8s-1.27 branch May 23, 2023 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants