Skip to content

Remove unneeded fields in cloud provider credential structs #949

@renormalize

Description

@renormalize

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.

Metadata

Metadata

Assignees

Labels

area/backupBackup relatedkind/cleanupSomething that is not needed anymore and can be cleaned uplifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions