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

fix(k8s): reconcile serviceMaps when using mesh namespace annotation #3815

Merged
merged 1 commit into from
Mar 3, 2022

Conversation

lahabana
Copy link
Contributor

Summary

We were not looking at annotations on the namespace when looking
at config map that need to be reconciled when service changes.

This would cause issue if pods were not individually annotated.

Testing

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

Backwards compatibility

  • [ ] Update UPGRADE.md with any steps users will need to take when upgrading.
  • [ ] Add backport-to-stable label if the code follows our backporting policy

@lahabana lahabana requested a review from a team as a code owner February 11, 2022 12:37
@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2022

Codecov Report

Merging #3815 (aa7e157) into master (f298bf2) will increase coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3815   +/-   ##
=======================================
  Coverage   55.79%   55.80%           
=======================================
  Files         916      916           
  Lines       54617    54620    +3     
=======================================
+ Hits        30473    30478    +5     
  Misses      21701    21701           
+ Partials     2443     2441    -2     
Impacted Files Coverage Δ
...ns/runtime/k8s/controllers/configmap_controller.go 24.75% <50.00%> (+16.58%) ⬆️
pkg/insights/components.go 70.00% <0.00%> (-30.00%) ⬇️
pkg/core/resources/store/customizable_store.go 55.55% <0.00%> (-22.23%) ⬇️
pkg/events/eventbus.go 85.18% <0.00%> (-7.41%) ⬇️
pkg/plugins/runtime/gateway/route/sorter.go 66.66% <0.00%> (-5.13%) ⬇️
pkg/insights/resyncer.go 71.16% <0.00%> (-2.46%) ⬇️
pkg/core/resources/model/rest/resource.go 67.94% <0.00%> (-1.29%) ⬇️
pkg/defaults/components.go 88.88% <0.00%> (+3.70%) ⬆️
pkg/core/resources/manager/cache.go 88.31% <0.00%> (+5.19%) ⬆️
pkg/core/tokens/default_signing_key.go 72.22% <0.00%> (+5.55%) ⬆️
... and 1 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 f298bf2...aa7e157. Read the comment docs.

@lahabana lahabana marked this pull request as draft February 14, 2022 08:33
@lahabana lahabana force-pushed the meshAnnotationServiceMap branch from ccd45f1 to cc4e082 Compare February 14, 2022 14:53
@lahabana lahabana force-pushed the meshAnnotationServiceMap branch from cc4e082 to 1aa571b Compare February 25, 2022 16:41
@lahabana lahabana marked this pull request as ready for review February 26, 2022 10:01
@lahabana
Copy link
Contributor Author

lahabana commented Mar 2, 2022

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Mar 2, 2022

update

✅ Branch has been successfully updated

@lahabana
Copy link
Contributor Author

lahabana commented Mar 2, 2022

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Mar 2, 2022

update

✅ Branch has been successfully updated

We were not looking at annotations on the namespace when looking
at config map that need to be reconciled when service changes.

This would cause issue if pods were not individually annotated.

Signed-off-by: Charly Molter <charly.molter@konghq.com>
@lahabana lahabana force-pushed the meshAnnotationServiceMap branch from 417823c to 36ae244 Compare March 2, 2022 19:36
@jakubdyszkiewicz
Copy link
Contributor

I don't think we need to look into a namespace.
Pod with kuma sidecar always has an annotation kuma.io/mesh: default. Example

apiVersion: v1
kind: Pod
metadata:
  annotations:
    kuma.io/builtindns: enabled
    kuma.io/builtindnsport: "15053"
    kuma.io/envoy-admin-port: "9901"
    kuma.io/mesh: default
    kuma.io/sidecar-injected: "true"
    kuma.io/sidecar-uid: "5678"
    kuma.io/transparent-proxying: enabled
    kuma.io/transparent-proxying-inbound-port: "15006"
    kuma.io/transparent-proxying-inbound-v6-port: "15010"
    kuma.io/transparent-proxying-outbound-port: "15001"
    kuma.io/virtual-probes: enabled
    kuma.io/virtual-probes-port: "9000"

@lahabana lahabana enabled auto-merge (squash) March 3, 2022 12:41
@lahabana lahabana merged commit c3562c0 into kumahq:master Mar 3, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
…umahq#3815)

We were not looking at annotations on the namespace when looking
at config map that need to be reconciled when service changes.

This would cause issue if pods were not individually annotated.

Signed-off-by: Charly Molter <charly.molter@konghq.com>
Signed-off-by: Sally Blich <sally.blich@walkme.com>
@lahabana lahabana deleted the meshAnnotationServiceMap branch March 29, 2024 12:46
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.

4 participants