Support disabling pulling credentials from awsAccessSecret.name
in the Helm chart
#298
Labels
enhancement
New feature or request
awsAccessSecret.name
in the Helm chart
#298
/feature
Is your feature request related to a problem? Please describe.
The Helm chart for the DaemonSet's
s3-plugin
container will always configure theAWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
, andAWS_SESSION_TOKEN
environment variables to be sourced from theawsAccessSecret.name
secret:mountpoint-s3-csi-driver/charts/aws-mountpoint-s3-csi-driver/templates/node.yaml
Lines 102 to 121 in 5cf881c
While the variables are set as
optional: true
, I think this is still bad practice from a security hygiene perspective -- the best practice would be to use EKS Pod Identity or IRSA, rather than static credentials, so that should be the default behavior, and I don't want these environment variables configured at all. It's also potentially confusing when looking at the rendered DaemonSet configuration to see the differentAWS_*
environment variables configured when they're not being used.Further, the default value for the secret name is very generic,
aws-secret
, and so if something else creates a Secret in the same namespace namedaws-secret
then all of a sudden, my driver pods will start to use those credentials instead of the IRSA credentials, and that could cause it to start to fail.Lastly, if somebody wants to use credentials from
aws-secret
but forgets to create it, then it should fail loudly saying that the secret doesn't exist, rather than failing silently with the environment variables just not getting set.Describe the solution you'd like in detail
Perhaps something like:
And then the environment variables in the chart could be:
Then, I can set
awsAccessSecret.enabled
tofalse
, and folks who want to can setawsAccessSecret.optional
tofalse
.Describe alternatives you've considered
Set
awsAccessSecret.name
to something likes3-csi-secret-creds-do-not-exist
to ensure my pods will never pick up the wrong credentials when a secret with a very generic name gets created. It's still ugly, but it's more clear what the intent is.Additional context
The text was updated successfully, but these errors were encountered: