Documentation
¶
Index ¶
Constants ¶
const ( // RancherCredentialsNamespace is the default namespace for // cloud provider credentials. RancherCredentialsNamespace = "cattle-global-data" // NameAnnotation is the annotation key for the cloud credential secret name. NameAnnotation = "field.cattle.io/name" // DriverNameAnnotation is the annotation key for the cloud provider driver name. DriverNameAnnotation = "provisioning.cattle.io/driver" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type B64 ¶
type B64 struct {
// contains filtered or unexported fields
}
B64 is a structure for encoding a secret key as base64.
type DefaultSynchronizer ¶
type DefaultSynchronizer[T client.Object] struct { Source *turtlesv1.CAPIProvider Destination T // contains filtered or unexported fields }
DefaultSynchronizer is a structure mirroring state of the CAPI Operator Provider object.
func NewDefaultSynchronizer ¶
func NewDefaultSynchronizer[T client.Object](cl client.Client, source *turtlesv1.CAPIProvider, destination T) *DefaultSynchronizer[T]
NewDefaultSynchronizer returns a new instance of DefaultSynchronizer.
type List ¶
type List []Sync
List contains a list of syncers to apply the syncing logic.
type Mapping ¶
type Mapping struct {
// contains filtered or unexported fields
}
Mapping defines a mapping between a source and destination secret keys.
type Raw ¶
type Raw struct {
// contains filtered or unexported fields
}
Raw is a structure for storing a secret key without encoding.
type SecretMapperSync ¶
type SecretMapperSync struct {
*SecretSync
RancherSecret *corev1.Secret
}
SecretMapperSync is a structure mirroring variable secret state of the Rancher secret data.
func (*SecretMapperSync) Apply ¶ added in v0.15.0
func (s *SecretMapperSync) Apply(ctx context.Context, reterr *error)
Apply performs SSA patch of the secret mapper resources, using different FieldOwner from default to avoid collisions with patches performed by variable syncer on the same secret resource.
func (*SecretMapperSync) Get ¶
func (s *SecretMapperSync) Get(ctx context.Context) error
Get retrieves the source Rancher secret and destenation secret.
func (SecretMapperSync) GetSecret ¶
func (SecretMapperSync) GetSecret(capiProvider *turtlesv1.CAPIProvider) *corev1.Secret
GetSecret returning the source secret resource template.
type SecretSync ¶
type SecretSync struct {
*DefaultSynchronizer[*corev1.Secret]
}
SecretSync is a structure mirroring variable secret state of the CAPI Operator Provider object.
func (SecretSync) GetSecret ¶
func (SecretSync) GetSecret(capiProvider *turtlesv1.CAPIProvider) *corev1.Secret
GetSecret returning the mirrored secret resource template.
func (*SecretSync) Sync ¶
func (s *SecretSync) Sync(_ context.Context) error
Sync updates the mirror object state from the upstream source object Direction of updates: Spec -> down up <- Status.
func (*SecretSync) SyncObjects ¶
func (s *SecretSync) SyncObjects()
SyncObjects updates the Source CAPIProvider object and the environment secret state. Direction of updates: Spec.Features + Spec.Variables -> Status.Variables -> Secret.
type Sync ¶
type Sync interface {
Get(ctx context.Context) error
Sync(ctx context.Context) error
Apply(ctx context.Context, reterr *error)
}
Sync is an inteface for mirroring state of the CAPI Operator Provider object on child objects.
func NewSecretMapperSync ¶
func NewSecretMapperSync(ctx context.Context, cl client.Client, capiProvider *turtlesv1.CAPIProvider) Sync
NewSecretMapperSync creates a new secret mapper object sync.
func NewSecretSync ¶
func NewSecretSync(cl client.Client, capiProvider *turtlesv1.CAPIProvider) Sync
NewSecretSync creates a new secret object sync.