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

Experimental New secret manager that watches secrets at host level. #1182

Open
wants to merge 1 commit into
base: scale-out-poc-2021-0930
Choose a base branch
from

Conversation

yb01
Copy link
Collaborator

@yb01 yb01 commented Sep 15, 2021

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:

  1. hide node labels when user GET secrets
  2. ensure label size large enough for large clusters
  3. optimization pod-secret-controller logic to avoid GET calls

@centaurus-cloud-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign yxiong2020
You can assign the PR to them by writing /assign @yxiong2020 in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


// ensure this is the same as cache.MetaNamespaceKeyFunc
func (s *byHostSecretManager) key(tenant, namespace, name string) string {
result := name
Copy link
Collaborator

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

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())
Copy link
Collaborator

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()
Copy link
Collaborator

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 {
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants