login

package
v0.1.34 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

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 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 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