shootsecrets

package
v1.31.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecretConfigGeneratorFunc

type SecretConfigGeneratorFunc func(*secrets.BasicAuth, *secrets.StaticToken, map[string]*secrets.Certificate) ([]secrets.ConfigInterface, error)

SecretConfigGeneratorFunc is a func used to generate secret configurations

type SecretsManager

type SecretsManager struct {
	GardenerResourceDataList gardencorev1alpha1helper.GardenerResourceDataList
	StaticToken              *secrets.StaticToken
	DeployedSecrets          map[string]*corev1.Secret
	// contains filtered or unexported fields
}

SecretsManager holds the configurations of all required shoot secrets that have to be preserved in the ShootState. It uses these configurations to generate new secret infodata and save it into the ShootState or create kubernetes secret objects from infodata available in the ShootState and deploy them.

func NewSecretsManager

func NewSecretsManager(
	gardenerResourceDataList gardencorev1alpha1helper.GardenerResourceDataList,
	staticTokenConfig *secrets.StaticTokenSecretConfig,
	certificateAuthorityConfigs map[string]*secrets.CertificateSecretConfig,
	secretConfigGenerator SecretConfigGeneratorFunc,
) *SecretsManager

NewSecretsManager takes in a list of GardenerResourceData items, a static token secret config, a map of certificate authority configs, a function which can generate secret configurations and returns a new SecretsManager struct

func (*SecretsManager) Deploy

func (s *SecretsManager) Deploy(ctx context.Context, k8sClient client.Client, namespace string) error

Deploy gets InfoData for all shoot secrets managed by gardener from the SecretManager's GardenerResourceDataList and uses it to generate kubernetes secrets and deploy them in the provided namespace.

func (*SecretsManager) Generate

func (s *SecretsManager) Generate() error

Generate generates InfoData for all shoot secrets managed by gardener and adds it to the SecretManager's GardenerResourceData

func (*SecretsManager) WithAPIServerBasicAuthConfig

func (s *SecretsManager) WithAPIServerBasicAuthConfig(config *secrets.BasicAuthSecretConfig) *SecretsManager

WithAPIServerBasicAuthConfig adds the provided basic auth secret configuration to the SecretsManager

func (*SecretsManager) WithExistingSecrets

func (s *SecretsManager) WithExistingSecrets(existingSecrets map[string]*corev1.Secret) *SecretsManager

WithExistingSecrets adds the provided map of existing secrets to the SecretsManager

Jump to

Keyboard shortcuts

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