connectionsecret

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectLabelKey string = "atlas.mongodb.com/project-id"
	ClusterLabelKey string = "atlas.mongodb.com/cluster-name"
)

Variables

This section is empty.

Functions

func AddCredentialsToConnectionURL

func AddCredentialsToConnectionURL(connURL, userName, password string) (string, error)

func Ensure

func Ensure(client client.Client, namespace, projectName, projectID, clusterName string, data ConnectionData) (string, error)

Ensure creates or updates the connection Secret for the specific cluster and db user. Returns the name of the Secret created.

func ListByClusterName

func ListByClusterName(k8sClient client.Client, namespace, projectID, clusterName string) ([]corev1.Secret, error)

ListByClusterName returns all secrets in the specified namespace that have labels for 'projectID' and 'clusterName'

func ListByUserName

func ListByUserName(k8sClient client.Client, namespace, projectID, userName string) ([]corev1.Secret, error)

ListByUserName returns all secrets in the specified namespace that have label for 'projectID' and data for 'userName'

Types

type ConnectionData

type ConnectionData struct {
	DBUserName, ConnURL, SrvConnURL, Password string
}

Jump to

Keyboard shortcuts

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