Documentation
¶
Index ¶
- Constants
- func AddElevationReasonsToRawKubeconfig(config api.Config, elevationReasons []string) error
- func CreateClusterKubeConfig(clusterID string, kubeConfig api.Config) (string, error)
- func FindOtherSessions(clientset kubernetes.Interface, config *rest.Config, user string) (map[string]int, error)
- func GetAccessProtectionStatus(clusterID string) string
- func GetElevateContextReasons(config api.Config) []string
- func GetLimitedSupportStatus(clusterID string) string
- func PrintClusterInfo(clusterID string) error
- func PrintSessions(w io.Writer, sessions map[string]int)
- func RemoveClusterKubeConfig(clusterID string) error
- func SaveElevateContextReasons(config api.Config, elevationReason string) ([]string, error)
- func SaveKubeConfig(clusterID string, config api.Config, isMulti bool, kubePath string) error
- func SetKubeConfigBasePath(basePath string) error
- type ElevateContext
Constants ¶
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 CreateClusterKubeConfig ¶
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
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
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
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 RemoveClusterKubeConfig ¶
RemoveClusterKubeConfig delete cluster specific kube config file
func SaveElevateContextReasons ¶ added in v0.1.34
func SaveKubeConfig ¶
SaveKubeConfig modify Kube config based on user setting
func SetKubeConfigBasePath ¶
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.