clusteradmin

package
v1.294.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultNamespace is the namespace the cluster-admin-email secret lives in.
	DefaultNamespace = "codesphere"
	// DefaultSecretName is the name of the secret holding the cluster admin email.
	// It is referenced by the platform deployment via a secretKeyRef.
	DefaultSecretName = "cluster-admin-email"
	// EmailKey is the secret data key under which the admin email is stored.
	EmailKey = "email"
)

Variables

This section is empty.

Functions

func AddClusterAdmin

func AddClusterAdmin(ctx context.Context, clientset kubernetes.Interface, opts Opts) error

AddClusterAdmin writes the given email to the cluster-admin-email secret in the target cluster, creating the secret if it does not exist yet or updating it otherwise.

The email is stored under the EmailKey data key. Running the command again with a different email overwrites the previous value.

func NormalizeEmail added in v1.227.0

func NormalizeEmail(raw string) (string, error)

NormalizeEmail validates and canonicalizes an email address.

Types

type Opts

type Opts struct {
	Email      string
	Namespace  string
	SecretName string
	// CreateNamespace creates the target namespace if it does not exist yet
	// instead of failing. Used during installation, where the secret may be
	// written before the platform charts have created the namespace.
	CreateNamespace bool
}

Opts contains the options for adding a cluster admin.

Jump to

Keyboard shortcuts

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