-
Notifications
You must be signed in to change notification settings - Fork 34
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
Making helm charts configurable #116
Conversation
pkg/driver/mount.go
Outdated
@@ -39,11 +39,11 @@ const ( | |||
defaultRegionEnv = "AWS_DEFAULT_REGION" | |||
stsEndpointsEnv = "AWS_STS_REGIONAL_ENDPOINTS" | |||
MountS3PathEnv = "MOUNT_S3_PATH" | |||
hostTokenPath = "HOST_TOKEN_PATH" |
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 doesn't look right. I would expect another code change that reads the environment variable. Unless mountpoint is reading the env var for us. Either way make sure this works on a clean cluster with service account auth.
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.
latest commit wasn't pushed, should be there now!
if hostTokenPath == "" { | ||
// set the default in case the env variable isn't found | ||
hostTokenPath = "/var/lib/kubelet/plugins/s3.csi.aws.com/token" | ||
} | ||
if webIdentityFile != "" { |
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.
should this be ==
in place of !=
? if webIdentityFile is set should we not use it?
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.
not quite, we're trying to set the env variable here based on the driver env (if you look at webIdentityFileEnv
it comes from driver.go, this isn't something set by the customer) so if the driver is running with the web token, that should be passed here as well (but with different paths)
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 see, so this line.
https://github.com/awslabs/mountpoint-s3-csi-driver/blob/main/pkg/driver/driver.go#L78C4-L82
I was little confused as it was pointing to /csi/token
as path in driver. I assumed this might be some mechanism to override it. Thanks for clarification.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.