-
Notifications
You must be signed in to change notification settings - Fork 140
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
FieldManager add namespace for Aeraki #338
Conversation
8f3b2ac
to
9786e2f
Compare
pkg/config/constants/constants.go
Outdated
// True: The generated envoyFilters will be placed under the service namespace | ||
DefaultAerakiEnableEnvoyFilterNsScopeName = "AERAKI_ENABLE_ENVOY_FILTER_NS_SCOPE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer “AerakiEnableEnvoyFilterNsScope” because it's just a env name, not a default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok.update it.
pkg/envoyfilter/controller.go
Outdated
LabelSelector: "manager=" + constants.AerakiFieldManager, | ||
}) | ||
listNamespace := "" | ||
if c.namespaceScoped { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Envoyfilters can exist in multiple namespaces, not only in the root namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update it.
9786e2f
to
c44d929
Compare
Signed-off-by: chentanjun <tanjunchen20@gmail.com>
c44d929
to
d28efed
Compare
// DefaultAerakiEnableEnvoyFilterNsScope is the name for Aeraki to place envoyFilters scope | ||
// False(Default): The generated envoyFilters will be placed under Istio root namespace | ||
// True: The generated envoyFilters will be placed under the service namespace | ||
DefaultAerakiEnableEnvoyFilterNsScope = "AERAKI_ENABLE_ENVOY_FILTER_NS_SCOPE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just AerakiEnableEnvoyFilterNsScope
as it's an Env name, not a default value.
@@ -105,7 +107,7 @@ func (c *namespaceController) createBootstrapConfigMap(ns string) { | |||
"custom_bootstrap.json": GetBootstrapConfig(c.AerakiAddr, c.AerakiPort), | |||
} | |||
if err := c.Client.Create(context.TODO(), cm, &controllerclient.CreateOptions{ | |||
FieldManager: constants.AerakiFieldManager, | |||
FieldManager: constants.AerakiFieldManager + "-" + c.rootNamespace, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There're two problems here:
- The change of FieldManager will break existing Aeraki deployment since old resources were created with “constants.AerakiFieldManager", the change should be back compatible
- I prefer geting FiledManager value from a central place rather than passing rootNamespace around everywhere
Hold this until we have a clear design how multi-tenants would work. |
This PR is related to #330 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
/reopen |
What this PR does / Why we need it:
Pre-Submission Checklist: