secrets-provider-for-k8s icon indicating copy to clipboard operation
secrets-provider-for-k8s copied to clipboard

Enhancement: Remove use of downward API from manifest

Open sigalsax opened this issue 5 years ago • 0 comments
trafficstars

Current solution: Customer supplies these values using Downward API for MY_POD_NAME and MY_POD_NAMESPACE env vars in Secrets Provider manifest.

Enhanced solution: Get pod's namespace from /var/run/secrets/kubernetes.io/serviceaccount/namespace file inside the container. Get pod's name from HOSTNAME env var (as documented in K8s docs)

Motivation: better UX, no need to maintain another env vars.

Limitation: HOSTNAME is the pod's name only if customer didn't supply a hostname explicitly.

Solution: Use HOSTNAME if MY_POD_NAME is not supplied

sigalsax avatar Jul 02 '20 13:07 sigalsax