How to categorize this issue?
/area backup
/kind cleanup
What would you like to be added:
As can be seen in the following structs, the bucketName field is exposed by the cloud provider credential structs, which the secrets' data is unmarshalled into.
|
type awsCredentials struct { |
|
SSECustomerAlgorithm *string `json:"sseCustomerAlgorithm,omitempty"` |
|
SSECustomerKey *string `json:"sseCustomerKey,omitempty"` |
|
Endpoint *string `json:"endpoint,omitempty"` |
|
S3ForcePathStyle *bool `json:"s3ForcePathStyle,omitempty"` |
|
InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"` |
|
TrustedCaCert *string `json:"trustedCaCert,omitempty"` |
|
RequestChecksumCalculation *string `json:"requestChecksumCalculation,omitempty"` |
|
ResponseChecksumValidation *string `json:"responseChecksumValidation,omitempty"` |
|
AccessKeyID string `json:"accessKeyID"` |
|
Region string `json:"region"` |
|
SecretAccessKey string `json:"secretAccessKey"` |
|
BucketName string `json:"bucketName"` |
|
RoleARN string `json:"roleARN"` |
|
TokenPath string `json:"tokenPath"` |
|
} |
|
type absCredentials struct { |
|
Domain *string `json:"domain,omitempty"` |
|
BucketName string `json:"bucketName"` |
|
StorageAccount string `json:"storageAccount"` |
|
StorageKey string `json:"storageKey"` |
|
EmulatorEnabled bool `json:"emulatorEnabled,omitempty"` |
|
} |
|
type swiftCredentials struct { |
|
AuthType string `json:"authType"` |
|
AuthURL string `json:"authURL"` |
|
BucketName string `json:"bucketName"` |
|
DomainName string `json:"domainName"` |
|
Region string `json:"region"` |
|
TenantName string `json:"tenantName"` |
|
passwordCredential |
|
applicationCredential |
|
} |
However, this field is never actually used in any of the code, in any of the providers. The bucket name is provided as a flag, and is passed to all relevant places from there.
These fields should be removed, so that all extensions that create the etcd-backup secrets don't have to populate this field anymore.
Why is this needed:
We should remove unneeded fields and cleanup the public interfaces we have with consumers, like the secret created for cloud provider credentials.
How to categorize this issue?
/area backup
/kind cleanup
What would you like to be added:
As can be seen in the following structs, the
bucketNamefield is exposed by the cloud provider credential structs, which the secrets' data is unmarshalled into.etcd-backup-restore/pkg/snapstore/s3_snapstore.go
Lines 50 to 65 in 81c4c17
etcd-backup-restore/pkg/snapstore/abs_snapstore.go
Lines 93 to 99 in 81c4c17
etcd-backup-restore/pkg/snapstore/swift_snapstore.go
Lines 63 to 72 in 81c4c17
However, this field is never actually used in any of the code, in any of the providers. The bucket name is provided as a flag, and is passed to all relevant places from there.
These fields should be removed, so that all extensions that create the etcd-backup secrets don't have to populate this field anymore.
Why is this needed:
We should remove unneeded fields and cleanup the public interfaces we have with consumers, like the secret created for cloud provider credentials.