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

chore(*) update helm and controller-runtime #2764

Merged

Conversation

lahabana
Copy link
Contributor

@lahabana lahabana commented Sep 13, 2021

Summary

Increasing the helm version requires us to upgrade a few dependencies and especially controller-runtime which has a few breaking changes.

Full changelog

  • [Implement ...]
  • [Fix ...]

Issues resolved

Fix #XXX

Documentation

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

  • Add backport-to-stable label if the code is backwards compatible. Otherwise, list breaking changes.

@lahabana lahabana force-pushed the dependabot/go_modules/helm.sh/helm/v3-3.6.3 branch 3 times, most recently from ad77dfd to 40b6ea6 Compare September 14, 2021 08:58
@codecov-commenter
Copy link

codecov-commenter commented Sep 14, 2021

Codecov Report

Merging #2764 (466b797) into master (6e78e40) will increase coverage by 0.14%.
The diff coverage is 22.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2764      +/-   ##
==========================================
+ Coverage   52.13%   52.28%   +0.14%     
==========================================
  Files         897      896       -1     
  Lines       52093    51969     -124     
==========================================
+ Hits        27161    27171      +10     
+ Misses      22760    22626     -134     
  Partials     2172     2172              
Impacted Files Coverage Δ
pkg/plugins/bootstrap/k8s/cache/informer_cache.go 0.00% <0.00%> (ø)
...ugins/bootstrap/k8s/cache/internal/cache_reader.go 0.00% <0.00%> (ø)
.../plugins/bootstrap/k8s/cache/internal/deleg_map.go 0.00% <0.00%> (ø)
...gins/bootstrap/k8s/cache/internal/informers_map.go 0.00% <0.00%> (ø)
pkg/plugins/bootstrap/k8s/plugin.go 2.32% <0.00%> (-0.50%) ⬇️
pkg/plugins/bootstrap/k8s/scheme.go 27.27% <0.00%> (+4.19%) ⬆️
pkg/plugins/resources/k8s/events/listener.go 0.00% <0.00%> (ø)
...lugins/resources/k8s/native/pkg/model/resources.go 100.00% <ø> (ø)
pkg/plugins/resources/k8s/plugin.go 10.52% <ø> (+1.00%) ⬆️
...plugins/runtime/k8s/controllers/mesh_controller.go 0.00% <0.00%> (ø)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e78e40...466b797. Read the comment docs.

@lahabana lahabana force-pushed the dependabot/go_modules/helm.sh/helm/v3-3.6.3 branch 3 times, most recently from 53fe5c2 to df5e78a Compare September 16, 2021 15:55
@lahabana lahabana marked this pull request as ready for review September 16, 2021 16:43
@lahabana lahabana requested a review from a team as a code owner September 16, 2021 16:43
@lahabana
Copy link
Contributor Author

I want to add some more complex upgrade e2e tests before merging this but the code on this is ready to review.

Copy link
Contributor

@jpeach jpeach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, these changes look OK to me. My main concern is simply the size of the PR. I wonder whether we can break this down into a set of smaller PRs:

  • consolidate the scheme registration
  • pass context down through the component initialization
  • upgrade the admission control API
  • upgrade controller-runtime & client-go

SystemNamespace: r.SystemNamespace,
},
}).
Watches(&kube_source.Kind{Type: &kube_core.Service{}}, kube_handler.EnqueueRequestsFromMapFunc(ServiceToConfigMapsMapper(mgr.GetClient(), r.Log, r.SystemNamespace))).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these helper functions are only used here, why not have them return a kube_handler.EventHandler directly? i.e. do the EnqueueRequestsFromMapFunc wrapping internally ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's simpler for testing to not have the whole EventHandler wrapper.

ToRequests: &ConfigMapToPodsMapper{Client: mgr.GetClient(), Log: r.Log.WithName("configmap-to-pods-mapper"), SystemNamespace: r.SystemNamespace},
}).
Watches(&kube_source.Kind{Type: &mesh_k8s.ExternalService{}}, kube_handler.EnqueueRequestsFromMapFunc(ExternalServiceToPodsMapper(r.Log, mgr.GetClient()))).
Watches(&kube_source.Kind{Type: &kube_core.ConfigMap{}}, kube_handler.EnqueueRequestsFromMapFunc(ConfigMapToPodsMapper(r.Log, r.SystemNamespace, mgr.GetClient()))).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as for config maps, return EventHandler from the mapper functions.

@lahabana
Copy link
Contributor Author

I'm concerned as well by the size. Unfortunately Most of these changes are caused by breaking changes in the controller-runtime api.

I've tried to split this but I could find an easy way. I'll look again now that I've spent some time away from this :)

dependabot bot and others added 2 commits September 22, 2021 15:49
Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.3.4 to 3.6.3.
- [Release notes](https://github.com/helm/helm/releases)
- [Commits](helm/helm@v3.3.4...v3.6.3)

---
updated-dependencies:
- dependency-name: helm.sh/helm/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Charly Molter <charly.molter@konghq.com>
@lahabana lahabana force-pushed the dependabot/go_modules/helm.sh/helm/v3-3.6.3 branch from df5e78a to ca71004 Compare September 22, 2021 14:21
Copy link
Contributor

@bartsmykla bartsmykla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one question and otherwise lgtm

@bartsmykla bartsmykla changed the title Update helm and controller-runtime chore(*) update helm and controller-runtime Sep 24, 2021
I assume Charly removed this schema addition to apiextensionsv1 api
as he assumed it's already processed by
`kube_client_scheme.AddToScheme`, but it's not, so I added it back

Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
As we stopped supporting Kubernetes < 1.17, I'm removing minikube
1.16 from our CI/CD

Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
@bartsmykla bartsmykla merged commit 5d0380f into kumahq:master Oct 11, 2021
mergify bot pushed a commit that referenced this pull request Oct 11, 2021
* chore(deps): bump helm.sh/helm/v3 from 3.3.4 to 3.6.3

Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.3.4 to 3.6.3.
- [Release notes](https://github.com/helm/helm/releases)
- [Commits](helm/helm@v3.3.4...v3.6.3)

---
updated-dependencies:
- dependency-name: helm.sh/helm/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix breaking changes

Signed-off-by: Charly Molter <charly.molter@konghq.com>

* chore(*) get read of admission v1beta1 api

Signed-off-by: Bart Smykla <bartek@smykla.com>

* chore(*) remove minikube 1.16 from tests

As we stopped supporting Kubernetes < 1.17, I'm removing minikube
1.16 from our CI/CD

Signed-off-by: Bart Smykla <bartek@smykla.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bart Smykla <bartek@smykla.com>
(cherry picked from commit 5d0380f)

# Conflicts:
#	app/kumactl/cmd/install/testdata/install-control-plane.cni-enabled.golden.yaml
#	app/kumactl/cmd/install/testdata/install-control-plane.defaults.golden.yaml
#	app/kumactl/cmd/install/testdata/install-control-plane.global.golden.yaml
#	app/kumactl/cmd/install/testdata/install-control-plane.override-env-vars.golden.yaml
#	app/kumactl/cmd/install/testdata/install-control-plane.overrides.golden.yaml
#	app/kumactl/cmd/install/testdata/install-control-plane.with-ingress.golden.yaml
#	app/kumactl/cmd/install/testdata/install-control-plane.zone.golden.yaml
#	go.sum
#	pkg/plugins/runtime/k8s/webhooks/validation.go
#	pkg/plugins/runtime/k8s/webhooks/validation_test.go
@lahabana lahabana deleted the dependabot/go_modules/helm.sh/helm/v3-3.6.3 branch March 29, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants