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

Make OhMyGlb operator watch all namespaces for Gslb CRs #13

Merged
merged 1 commit into from
Dec 19, 2019

Conversation

ytsarev
Copy link
Member

@ytsarev ytsarev commented Dec 18, 2019

  • Operator is cluster scope
  • Gslb CRDs are namespaced

* Operator is cluster scope
* Gslb CRDs are namespaced
@ytsarev
Copy link
Member Author

ytsarev commented Dec 18, 2019

Before we operated default namespaced scenario of operator-sdk: operator was managing resources in the same namespace as own deployment. OhMyGlb needs to watch all namespaces as there can be multiple application teams in different namespaces managing own Gslb resources.
Excerpt from operator log after this change:

{"level":"info","ts":1576684481.7743516,"logger":"controller-runtime.controller","msg":"Starting workers","controller":"gslb-controller","worker count":1}
{"level":"info","ts":1576684481.77468,"logger":"controller_gslb","msg":"Reconciling Gslb","Request.Namespace":"default","Request.Name":"example-gslb"}
{"level":"info","ts":1576684482.086346,"logger":"controller_gslb","msg":"Reconciling Gslb","Request.Namespace":"test","Request.Name":"example-gslb"}

It's visible that example-gslb got reconciled in both default and test namespaces

@ytsarev ytsarev merged commit 1e4bcaa into master Dec 19, 2019
@ytsarev ytsarev deleted the all_namespaces branch December 19, 2019 08:39
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.

2 participants