Skip to content

disable automatic mount of SA token for pv-pool pod#1399

Merged
dannyzaken merged 1 commit intonoobaa:masterfrom
dannyzaken:danny-fixes
Aug 7, 2024
Merged

disable automatic mount of SA token for pv-pool pod#1399
dannyzaken merged 1 commit intonoobaa:masterfrom
dannyzaken:danny-fixes

Conversation

@dannyzaken
Copy link
Member

@dannyzaken dannyzaken commented Jul 29, 2024

Explain the changes

  1. Kubernetes automatically mounts a service account token for every pod by default.
  2. The best practice is to mount it only for pods that require access to the Kubernetes API.
  3. For now, disabling automount for pv-pool pods. We should consider it for all pods other than the operator.
  4. see more info here

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  • Doc added/updated
  • Tests added

@tangledbytes
Copy link
Member

This reminds me that we have create_k8s_auth in noobaa-core, I can't find its usage right now but that seems to read SA token.

@dannyzaken
Copy link
Member Author

This reminds me that we have create_k8s_auth in noobaa-core, I can't find its usage right now but that seems to read SA token.

I think it was used for SSO into noobaa UI, so it's not relevant anymore

Kubernetes automatically mounts a service account token for every pod by default. The best practice is to mount it only for pods that require access to the Kubernetes API.
For now, disabling automount for pv-pool pods. We should consider it for all pods other than the operator.

Signed-off-by: Danny Zaken <dannyzaken@gmail.com>
@dannyzaken dannyzaken merged commit 75ba085 into noobaa:master Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants