secret

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// OrphanResourceAnnotation when set to true prevents the deletion of secret from target clusters even if matching ReplicatedSecret is removed
	OrphanResourceAnnotation = "replicatedresource.k8ssandra.io/orphan"
)
View Source
const (
	SecretInjectionAnnotation = "k8ssandra.io/inject-secret"
)

e.g. k8ssandra.io/inject-secret: '[{ "name": "test-secret", "path": "/etc/test/test-secret", "containers": ["c1", "c2"]}]'

Variables

This section is empty.

Functions

func AddInjectionAnnotation added in v1.7.0

func AddInjectionAnnotation(t *meta.Tags, secretName string, containers []string) error

func AddInjectionAnnotationCassandraContainers added in v1.7.0

func AddInjectionAnnotationCassandraContainers(t *meta.Tags, secretName string) error

func AddInjectionAnnotationMedusaContainers added in v1.7.0

func AddInjectionAnnotationMedusaContainers(t *meta.Tags, secretName string) error

func AddInjectionAnnotationReaperContainers added in v1.7.0

func AddInjectionAnnotationReaperContainers(t *meta.Tags, secretName string) error

func DefaultSuperuserSecretName

func DefaultSuperuserSecretName(clusterName string) string

DefaultSuperuserSecretName returns a default name for the superuser secret. It is of the general form <cluster_name>-superuser. Note that we expect clusterName to be a valid DNS subdomain name as defined in RFC 1123, otherwise the secret name won't be valid.

func HasReplicatedSecrets

func HasReplicatedSecrets(ctx context.Context, c client.Client, kcKey client.ObjectKey, targetContext string) bool

func ReconcileReplicatedSecret

func ReconcileReplicatedSecret(ctx context.Context, c client.Client, scheme *runtime.Scheme, kc *api.K8ssandraCluster, logger logr.Logger) error

ReconcileReplicatedSecret ensures that the correct replicatedSecret for all managed secrets is created

func ReconcileSecret

func ReconcileSecret(ctx context.Context, c client.Client, secretName string, kcKey client.ObjectKey) error

ReconcileSecret creates a new secret with proper "managed-by" annotations, or ensure the existing secret has such annotations.

Types

type SecretInjection added in v1.7.0

type SecretInjection struct {
	SecretName string   `json:"name"`
	Path       string   `json:"path"`
	Containers []string `json:"containers,omitempty"`
}

Jump to

Keyboard shortcuts

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