backend

package
v0.0.0-...-9c723d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWorkerPoolSize = 100
)

Variables

This section is empty.

Functions

func FetchSecret

func FetchSecret(ctx context.Context, cli client.Client, name types.NamespacedName) (*v1.Secret, error)

Types

type DestSyncer

type DestSyncer interface {
	Setup(ctx context.Context) error
	Sync(ctx context.Context, secret *v1.Secret) error
	Cleanup(ctx context.Context) error
}

type KubernetesSecretSource

type KubernetesSecretSource struct {
	client.Client
	Name types.NamespacedName
}

func (*KubernetesSecretSource) Retrieve

func (s *KubernetesSecretSource) Retrieve(ctx context.Context) (*v1.Secret, error)

func (*KubernetesSecretSource) Setup

type NamespacesDest

type NamespacesDest struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

func (*NamespacesDest) Cleanup

func (d *NamespacesDest) Cleanup(ctx context.Context) error

func (*NamespacesDest) Setup

func (d *NamespacesDest) Setup(ctx context.Context) error

func (*NamespacesDest) Sync

func (d *NamespacesDest) Sync(ctx context.Context, secret *v1.Secret) error

type SecretMirrorBackend

type SecretMirrorBackend struct {
	client.Client
	Recorder record.EventRecorder
	// contains filtered or unexported fields
}

func MakeSecretMirrorBackend

func MakeSecretMirrorBackend(cli client.Client, recorder record.EventRecorder, nsKeeper *nskeeper.NSKeeper, vaultBackendMaker VaultBackendMakerFunc) (*SecretMirrorBackend, error)

func (*SecretMirrorBackend) Cleanup

func (b *SecretMirrorBackend) Cleanup()

func (*SecretMirrorBackend) Init

func (*SecretMirrorBackend) SetupWithManager

func (b *SecretMirrorBackend) SetupWithManager(mgr ctrl.Manager) (*ctrl.Builder, error)

type SecretMirrorContext

type SecretMirrorContext struct {
	SecretMirror *mirrorsv1alpha2.SecretMirror
	// contains filtered or unexported fields
}

func (*SecretMirrorContext) Init

func (*SecretMirrorContext) SetStatus

func (*SecretMirrorContext) SetupOrRunFinalizer

func (c *SecretMirrorContext) SetupOrRunFinalizer(ctx context.Context) (bool, error)

SetupOrRunFinalizer returns (stopReconciliation, error)

func (*SecretMirrorContext) Sync

type SourceRetriever

type SourceRetriever interface {
	Setup(ctx context.Context) error
	Retrieve(ctx context.Context) (*v1.Secret, error)
}

type VaultBackend

type VaultBackend interface {
	Addr() string
	Token() string
	SetToken(token string)
	LoginAppRole(appRolePath, roleID, secretID string) error
	ReadSecret(path string) (*vault.Secret, error)
	RetrieveData(path string) (map[string]interface{}, error)
	WriteData(path string, data map[string]interface{}) error
	RenewLease(leaseId string, increment int) (*vault.Secret, error)
}

type VaultBackendMakerFunc

type VaultBackendMakerFunc func(addr string) (VaultBackend, error)

type VaultSecretDest

type VaultSecretDest struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

func (*VaultSecretDest) Cleanup

func (d *VaultSecretDest) Cleanup(ctx context.Context) error

func (*VaultSecretDest) Setup

func (d *VaultSecretDest) Setup(ctx context.Context) error

func (*VaultSecretDest) Sync

func (d *VaultSecretDest) Sync(ctx context.Context, secret *v1.Secret) error

type VaultSecretSource

type VaultSecretSource struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

func (*VaultSecretSource) Retrieve

func (s *VaultSecretSource) Retrieve(ctx context.Context) (*v1.Secret, error)

func (*VaultSecretSource) Setup

func (s *VaultSecretSource) Setup(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL