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: configure kubernetes synchronizer to watch All or specifiec name… #2460

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

kamiiiel
Copy link
Contributor

@kamiiiel kamiiiel commented Sep 14, 2022

Description

At the moment Kubernetes synchroniser is watching all namespaces and there is no way to configure it. This PR will make the synchronizer to only watch to the current namespace that the Gateway is running inside it by default but the user can change this behaviour by setting the 'namespace' attribute.

🚀 CI was able to deploy the build of this PR, so you can now try it directly here
Notes: The deployed app is linked to the management API of APIM master. (Same login and password as APIM master)


📚  View the storybook of this branch here

@kamiiiel kamiiiel requested review from a team as code owners September 14, 2022 16:19
Copy link
Contributor

@ThibaudAV ThibaudAV left a comment

Choose a reason for hiding this comment

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

I wonder if using labels would not be more flexible 🤔 And more in the ways of doing k8s 🤷‍♂️
but both would be even better 😁 WDYT @sebdevaux

What do you think about adding some tests on it ?

@ThibaudAV
Copy link
Contributor

There will surely be things to change here too.
because actually CRD are on default ns and apim on apim-dev ns of k3d

@kamiiiel
Copy link
Contributor Author

@brasseld , @ThibaudAV can you please approve this PR if nothing else needs to be modified.

@brasseld
Copy link
Member

@kamiiiel Do we agree that if no namespace is configured, then we are watching all namespaces ?

@kamiiiel
Copy link
Contributor Author

kamiiiel commented Oct 31, 2022

@kamiiiel Do we agree that if no namespace is configured, then we are watching all namespaces ?

If we don't provide any namespace, we only listen to the current namespace that the gateway is running inside it.
Btw, we will get errors if want to watch different namespaces but we don't use ClusterRole for our service account.

@gaetanmaisse gaetanmaisse merged commit fd6763b into master Nov 29, 2022
@gaetanmaisse gaetanmaisse deleted the kubeernetes_sync branch November 29, 2022 17:21
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.

6 participants