Documentation ¶
Index ¶
- Variables
- func AddElevationReasonToRawKubeconfig(config api.Config, elevationReason string) error
- func AddElevationReasonsToRawKubeconfig(config api.Config, elevationReasons []string) error
- func ComputeElevateContextAndStoreToKubeConfigFileAndGetReasons(config api.Config, elevationReason string) ([]string, error)
- func GetElevateContextReasons(config api.Config) []string
- func RunElevate(argv []string) error
- type ElevateContext
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OsRemove = os.Remove ExecCmd = exec.Command ReadKubeConfigRaw = utils.ReadKubeconfigRaw WriteKubeconfigToFile = utils.CreateTempKubeConfig )
View Source
var ( ModifyConfig = clientcmd.ModifyConfig AskQuestionFromPrompt = utils.AskQuestionFromPrompt )
Functions ¶
func AddElevationReasonsToRawKubeconfig ¶ added in v0.1.31
func ComputeElevateContextAndStoreToKubeConfigFileAndGetReasons ¶ added in v0.1.31
func GetElevateContextReasons ¶ added in v0.1.31
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 RunElevate ¶
Types ¶
type ElevateContext ¶ added in v0.1.31
type ElevateContext struct { Reasons []string `json:"reasons"` LastUsed time.Time `json:"lastUsed"` }
func (*ElevateContext) DeepCopyObject ¶ added in v0.1.31
func (r *ElevateContext) DeepCopyObject() runtime.Object
DeepCopyObject creates a deep copy of the ElevateContext.
func (*ElevateContext) GetObjectKind ¶ added in v0.1.31
func (r *ElevateContext) GetObjectKind() schema.ObjectKind
GetObjectKind returns the schema.GroupVersionKind of the object.
Click to show internal directories.
Click to hide internal directories.