secrets

package
v1.30.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package secrets provides Ginkgo/Gomega assertions for credential secret rotation, TLS certificate provisioning, and TLS verification from application pods.

Callers that also import tests/utils/secrets should alias one of the two to avoid the package name collision.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertSSLVerifyFullDBConnectionFromAppPod

func AssertSSLVerifyFullDBConnectionFromAppPod(
	env *environment.TestingEnvironment,
	namespace, clusterName string,
	appPod corev1.Pod,
)

AssertSSLVerifyFullDBConnectionFromAppPod verifies that the app pod can reach the cluster's -rw service over TLS with sslmode=verify-full, presenting a client certificate.

func AssertUpdateSecret

func AssertUpdateSecret(
	env *environment.TestingEnvironment,
	namespace, clusterName, secretName, field, value string,
	timeout int,
)

AssertUpdateSecret rotates the named field of the secret to the given value and waits until the cluster status reports the corresponding SecretsResourceVersion.

func CreateAndAssertClientCertificatesSecrets

func CreateAndAssertClientCertificatesSecrets(
	env *environment.TestingEnvironment,
	namespace, clusterName, caSecName, tlsSecName, userSecName string,
	includeCAPrivateKey bool,
)

CreateAndAssertClientCertificatesSecrets provisions a self-signed CA plus two client certificates: one for the streaming_replica user and one for the application user.

func CreateAndAssertServerCertificatesSecrets

func CreateAndAssertServerCertificatesSecrets(
	env *environment.TestingEnvironment,
	namespace, clusterName, caSecName, tlsSecName string,
	includeCAPrivateKey bool,
)

CreateAndAssertServerCertificatesSecrets provisions a self-signed CA secret plus a server-certificate secret signed by it, with the cluster DNS names plus "localhost" in SAN.

Types

This section is empty.

Jump to

Keyboard shortcuts

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