-
Notifications
You must be signed in to change notification settings - Fork 16
[ENH] ✨ add information in secret link to user #110
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
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks. I've left a few comments
} | ||
|
||
// Create a new K8S Secret to hold the user's accessKey and secretKey | ||
fmt.Println(s3Client.GetConfig().Region) |
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.
Please remove debugging code.
userResource.Spec.SecretFieldNameSecretKey: []byte(secretKey), | ||
"s3region": []byte(s3Client.GetConfig().Region), | ||
"s3certificate": []byte(strings.Join(s3Client.GetConfig().CaCertificatesBase64, ",")), | ||
"S3url": []byte(s3Client.GetConfig().S3Url), |
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.
s3url to use consistent casing.
) | ||
userResource.Spec.SecretFieldNameSecretKey: []byte(secretKey), | ||
"s3region": []byte(s3Client.GetConfig().Region), | ||
"s3certificate": []byte(strings.Join(s3Client.GetConfig().CaCertificatesBase64, ",")), |
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.
Maybe de-base64 ?
assert.Equal(t, "example-user", string(secretCreated.Data["accessKey"])) | ||
assert.GreaterOrEqual(t, len(string(secretCreated.Data["secretKey"])), 20) | ||
|
||
fmt.Println(string(secretCreated.Data["s3ConnectionURL"])) |
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.
Please remove debugging code.
Add asserts instead.
S3Config.S3Url, | ||
S3Config.Endpoint, | ||
S3Config.Secure, |
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.
s3 instance has Url, why this change?
endpoint string, | ||
isSSL bool, |
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.
s3 instance has Url, why this change?
} | ||
s3Config.Secure = isSSL | ||
s3Config.Endpoint = endpoint | ||
s3Logger.Info("region ici : " + s3Config.Region) |
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.
please remove debugging code.
) | ||
userResource.Spec.SecretFieldNameSecretKey: []byte(secretKey), | ||
"s3region": []byte(s3Client.GetConfig().Region), | ||
"s3certificate": []byte(strings.Join(s3Client.GetConfig().CaCertificatesBase64, ",")), |
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.
Maybe rename field to s3CACertificate.
userResource.Spec.AccessKey, | ||
secretKey, | ||
strings.TrimPrefix(s3Client.GetConfig().Endpoint, "https://"), | ||
)), |
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.
Can you add a boolean field s3PathStyleUrl to identify if it's path or virtual-hosted style URL ?
Cf: https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access
No description provided.