secrets

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package secrets provides functions to manage and handle secrets

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyOperatorPullSecretToServiceAccount added in v1.29.0

func CopyOperatorPullSecretToServiceAccount(
	ctx context.Context,
	crudClient client.Client,
	operatorDeployment appsv1.Deployment,
	targetNamespace, serviceAccountName string,
) error

CopyOperatorPullSecretToServiceAccount copies the operator pull secret from the operator namespace to the target namespace and adds it as an imagePullSecret on the specified ServiceAccount. This is needed for shared ServiceAccounts that are not managed by the operator, so they can pull the operator image used by the bootstrap-controller init container. If no operator pull secret exists, this is a no-op.

func CreateObjectStorageSecret

func CreateObjectStorageSecret(
	ctx context.Context,
	crudClient client.Client,
	namespace, secretName string,
	id, key string,
) (*corev1.Secret, error)

CreateObjectStorageSecret generates an Opaque Secret with a given ID and Key

func CreateSecretCA

func CreateSecretCA(
	ctx context.Context,
	crudClient client.Client,
	namespace, clusterName, caSecName string,
	includeCAPrivateKey bool,
) (
	*apiv1.Cluster, *certs.KeyPair, error,
)

CreateSecretCA generates a CA for the cluster and return the cluster and the key pair

func GetCredentials

func GetCredentials(
	ctx context.Context,
	crudClient client.Client,
	clusterName, namespace, secretSuffix string,
) (
	string, string, error,
)

GetCredentials retrieve username and password from secrets and return it as per user suffix

Types

This section is empty.

Jump to

Keyboard shortcuts

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