keysync

package
v0.0.45 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeySync

type KeySync interface {
	// SyncIfNeeded for every given gsk, sync the current service account key in the cache entry to
	// the Kubernetes secret and Vault paths that are specified in the gsk's spec.
	//
	// Note that this function will update the cache entry's SyncStatus map to reflect any sync's it performs,
	// but it WILL NOT save the entry to the cache -- that's the caller's responsibility!
	SyncIfNeeded(entry *cache.Entry, gsks []Syncable) error
}

KeySync is responsible for propagating the current service account key from the Yale cache to destinations specified in the GcpSaKey spec - Vault paths, Kubernetes secrets, etc.

func New

func New(k8s kubernetes.Interface, vault *vaultapi.Client, secretManager *secretmanager.Client, cache cache.Cache, options ...Option) KeySync

type Option added in v0.0.45

type Option func(*Options)

type Options added in v0.0.45

type Options struct {
	DisableVaultReplication bool
}

type Syncable added in v0.0.37

type Syncable interface {
	Name() string
	Namespace() string
	SecretName() string
	Secret() apiv1b1.Secret
	SpecBytes() ([]byte, error)
	VaultReplications() []apiv1b1.VaultReplication
	GoogleSecretManagerReplications() []apiv1b1.GoogleSecretManagerReplication
	APIVersion() string
	Kind() string
	UID() types.UID
	Labels() map[string]string
}

Syncable is an interface for objects that can be synced to a Kubernetes secret It is a collection of getter methods that return the information needed to sync to a k8s secret or vault path.

func AzureClientSecretsToSyncable added in v0.0.37

func AzureClientSecretsToSyncable(acs []apiv1b1.AzureClientSecret) []Syncable

func GcpSaKeysToSyncable added in v0.0.37

func GcpSaKeysToSyncable(gsks []apiv1b1.GcpSaKey) []Syncable

Directories

Path Synopsis
testutils
gsm

Jump to

Keyboard shortcuts

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