login

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 25 Imported by: 4

Documentation

Index

Constants

View Source
const (
	BackplaneUserNamespacePrefix = "openshift-backplane-"
	CEE                          = "cee"
	McsTierTwo                   = "mcs-tier-two"
	LPSRE                        = "lpsre"
	SREP                         = "srep"
)

Variables

This section is empty.

Functions

func AddElevationReasonsToRawKubeconfig added in v0.1.34

func AddElevationReasonsToRawKubeconfig(config api.Config, elevationReasons []string) error

func CreateClusterKubeConfig

func CreateClusterKubeConfig(clusterID string, kubeConfig api.Config) (string, error)

CreateClusterKubeConfig creates cluster specific kube config based on a cluster ID

func FindOtherSessions added in v0.1.42

func FindOtherSessions(clientset kubernetes.Interface, config *rest.Config, user string) (map[string]int, error)

FindOtherSessions discovers other active backplane sessions in the cluster. It examines service accounts across different backplane user namespaces to identify concurrent sessions. Returns a map of role names to session counts, excluding the current user's session.

func GetAccessProtectionStatus added in v0.1.38

func GetAccessProtectionStatus(clusterID string) string

GetAccessProtectionStatus retrieves and displays the access protection status for a cluster. It checks if the cluster has access protection enabled (not available for govcloud). Returns the status as a string and prints it to stdout.

func GetElevateContextReasons added in v0.1.34

func GetElevateContextReasons(config api.Config) []string

in some cases (mainly when config is created from json) the "ElevateContext Extension" is created as runtime.Unknow object instead of the desired ElevateContext, so we need to Unmarshal the raw definition in that case

func GetLimitedSupportStatus added in v0.1.38

func GetLimitedSupportStatus(clusterID string) string

GetLimitedSupportStatus retrieves and displays the limited support status for a cluster. It checks the cluster's limited support reason count and displays the appropriate status. Returns the count as a string and prints the status to stdout.

func PrintClusterInfo added in v0.1.38

func PrintClusterInfo(clusterID string) error

func PrintSessions added in v0.1.42

func PrintSessions(w io.Writer, sessions map[string]int)

func RemoveClusterKubeConfig

func RemoveClusterKubeConfig(clusterID string) error

RemoveClusterKubeConfig delete cluster specific kube config file

func SaveElevateContextReasons added in v0.1.34

func SaveElevateContextReasons(config api.Config, elevationReason string) ([]string, error)

func SaveKubeConfig

func SaveKubeConfig(clusterID string, config api.Config, isMulti bool, kubePath string) error

SaveKubeConfig modify Kube config based on user setting

func SetKubeConfigBasePath

func SetKubeConfigBasePath(basePath string) error

Types

type ElevateContext added in v0.1.34

type ElevateContext struct {
	Reasons  []string  `json:"reasons"`
	LastUsed time.Time `json:"lastUsed"`
}

func (*ElevateContext) DeepCopyObject added in v0.1.34

func (r *ElevateContext) DeepCopyObject() runtime.Object

DeepCopyObject creates a deep copy of the ElevateContext.

func (*ElevateContext) GetObjectKind added in v0.1.34

func (r *ElevateContext) GetObjectKind() schema.ObjectKind

GetObjectKind returns the schema.GroupVersionKind of the object.

Jump to

Keyboard shortcuts

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