Move const to file-of-use and replce dup string
Signed-off-by: aram price <pricear@vmware.com>
This commit is contained in:
parent
2f518b8b7c
commit
23be766c8b
@ -24,10 +24,6 @@ import (
|
|||||||
"go.pinniped.dev/internal/plog"
|
"go.pinniped.dev/internal/plog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
federationDomainKind = "FederationDomain"
|
|
||||||
)
|
|
||||||
|
|
||||||
type federationDomainSecretsController struct {
|
type federationDomainSecretsController struct {
|
||||||
secretHelper SecretHelper
|
secretHelper SecretHelper
|
||||||
secretRefFunc func(domain *configv1alpha1.FederationDomain) *corev1.LocalObjectReference
|
secretRefFunc func(domain *configv1alpha1.FederationDomain) *corev1.LocalObjectReference
|
||||||
|
@ -39,6 +39,8 @@ const (
|
|||||||
// FederationDomainStateEncryptionKeyType for the Secret storing the FederationDomain state encryption key.
|
// FederationDomainStateEncryptionKeyType for the Secret storing the FederationDomain state encryption key.
|
||||||
FederationDomainStateEncryptionKeyType corev1.SecretType = "secrets.pinniped.dev/federation-domain-state-encryption-key"
|
FederationDomainStateEncryptionKeyType corev1.SecretType = "secrets.pinniped.dev/federation-domain-state-encryption-key"
|
||||||
|
|
||||||
|
federationDomainKind = "FederationDomain"
|
||||||
|
|
||||||
// symmetricSecretDataKey is the corev1.Secret.Data key for the symmetric key value generated by this helper.
|
// symmetricSecretDataKey is the corev1.Secret.Data key for the symmetric key value generated by this helper.
|
||||||
symmetricSecretDataKey = "key"
|
symmetricSecretDataKey = "key"
|
||||||
|
|
||||||
@ -102,7 +104,7 @@ func (s *symmetricSecretHelper) Generate(parent *configv1alpha1.FederationDomain
|
|||||||
*metav1.NewControllerRef(parent, schema.GroupVersionKind{
|
*metav1.NewControllerRef(parent, schema.GroupVersionKind{
|
||||||
Group: configv1alpha1.SchemeGroupVersion.Group,
|
Group: configv1alpha1.SchemeGroupVersion.Group,
|
||||||
Version: configv1alpha1.SchemeGroupVersion.Version,
|
Version: configv1alpha1.SchemeGroupVersion.Version,
|
||||||
Kind: "FederationDomain",
|
Kind: federationDomainKind,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user