Have GetCredentialsSecretReference operate on pointers

Credentials secrets are used by ProviderConfigs. They should be optional, since
a ProviderConfig may use a form of authentication that does not involve secrets.

This is a breaking API change, though I believe this interface was orphaned and
not actually in use anywhere.

Signed-off-by: Nic Cope <negz@rk0n.org>
This commit is contained in:
Nic Cope 2020-09-25 23:12:00 -07:00
parent 529fb076ce
commit 8f5be41347
2 changed files with 5 additions and 5 deletions

View File

@ -133,15 +133,15 @@ func (m *Orphanable) GetDeletionPolicy() v1alpha1.DeletionPolicy { return m.Poli
// CredentialsSecretReferencer is a mock that satisfies CredentialsSecretReferencer
// interface.
type CredentialsSecretReferencer struct{ Ref v1alpha1.SecretKeySelector }
type CredentialsSecretReferencer struct{ Ref *v1alpha1.SecretKeySelector }
// SetCredentialsSecretReference sets CredentialsSecretReference.
func (m *CredentialsSecretReferencer) SetCredentialsSecretReference(r v1alpha1.SecretKeySelector) {
func (m *CredentialsSecretReferencer) SetCredentialsSecretReference(r *v1alpha1.SecretKeySelector) {
m.Ref = r
}
// GetCredentialsSecretReference gets CredentialsSecretReference.
func (m *CredentialsSecretReferencer) GetCredentialsSecretReference() v1alpha1.SecretKeySelector {
func (m *CredentialsSecretReferencer) GetCredentialsSecretReference() *v1alpha1.SecretKeySelector {
return m.Ref
}

View File

@ -68,8 +68,8 @@ type Orphanable interface {
// A CredentialsSecretReferencer may refer to a credential secret in an arbitrary
// namespace.
type CredentialsSecretReferencer interface {
GetCredentialsSecretReference() v1alpha1.SecretKeySelector
SetCredentialsSecretReference(r v1alpha1.SecretKeySelector)
GetCredentialsSecretReference() *v1alpha1.SecretKeySelector
SetCredentialsSecretReference(r *v1alpha1.SecretKeySelector)
}
// A ProviderReferencer may reference a provider resource.