gocosi
gocosi copied to clipboard
[FEATURE]: Simplify process of creating secrets for GrantBucketAccess
Are you interested in contributing to the development of this feature?
Yes
Is your feature request related to a problem? Please describe.
The credentials returned in the Driver
is of type map[string]string
. It is sometimes confusing to new developers how to structure this value for available protocols.
Describe the solution you'd like.
I would like to have functions that simplify the creation of the credentials, e.g.:
func S3Credential(secretKeyID, secretKey, bucketName string, endpoint *url.URL) (map[string]string, error)
Additionally, for the purpose of custom functions that can be written in the future, provide each map key in form of constant, e.g.:
import "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts"
const (
S3SecretAccessKeyID string = consts.SecretAccessKeyID
// ...
)
Describe alternatives you've considered.
Importing the sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts
and creating the credentials by hand.
Additional Information
N/A