-
Notifications
You must be signed in to change notification settings - Fork 69
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
Experimental New secret manager that watches secrets at host level. #1182
base: scale-out-poc-2021-0930
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
||
// ensure this is the same as cache.MetaNamespaceKeyFunc | ||
func (s *byHostSecretManager) key(tenant, namespace, name string) string { | ||
result := name |
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.
Minor: using fmt might be easiler for read and goland optimization
pkg/kubelet/secret/secret_manager.go
Outdated
key := s.key(tenant, namespace, name) | ||
klog.Infof("get secret: %s", key) | ||
for _, store := range s.stores { | ||
klog.Infof("debug: dump store keys: [%v]", store.ListKeys()) |
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.
Please remove debug for large scale test.
return "", fmt.Errorf("object has no meta: %v", err) | ||
} | ||
|
||
metaKey := meta.GetName() |
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.
simliar for key
klog.Infof("create secret manager for host: %s", hostName) | ||
stores := make([]cache.Store, len(kubeClients)) | ||
|
||
for i, tenantPartitionClient := range kubeClients { |
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.
This push all secrets tied to namespaces to all node, could really be a security concern.
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.
Also greatly increased secret data population.
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 agree. as it is commented, the list/watch will be node based once the secret controller logic is in
pod secret controller
Issue #1170
First step to enable hostbased secrets watcher: new secret manager, to evaluate the trade off on reduced watchers and node based watch to secrets.
passed 500 node perf run.
remaining works: