clusteradmin

package
v1.224.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

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.

Types

type Opts

type Opts struct {
	Email      string
	Namespace  string
	SecretName string
}

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