Documentation
¶
Overview ¶
Package args provides helpers for formatting clusteradm args.
Index ¶
- Constants
- func PrepareKubeconfig(ctx context.Context, rawKubeconfig []byte, context string, args []string) ([]string, func(), error)
- func PrepareResources(resources ResourceSpec) []string
- func SanitizeArgs(args []string) []string
- func SanitizeOutput(output []byte) []byte
- type ResourceSpec
- type ResourceValues
Constants ¶
View Source
const Redacted = "REDACTED"
Redacted is used to mask sensitive values
Variables ¶
This section is empty.
Functions ¶
func PrepareKubeconfig ¶
func PrepareKubeconfig(ctx context.Context, rawKubeconfig []byte, context string, args []string) ([]string, func(), error)
PrepareKubeconfig parses a kubeconfig spec and returns updated clusteradm args. The '--kubeconfig' flag is added and a cleanup function is returned to remove the temp kubeconfig file.
func PrepareResources ¶
func PrepareResources(resources ResourceSpec) []string
PrepareResources returns resource-related flags
func SanitizeArgs ¶
SanitizeArgs redacts sensitive args to prevent leaking credentials
func SanitizeOutput ¶
SanitizeOutput redacts sensitive values from command output
Types ¶
type ResourceSpec ¶
type ResourceSpec interface {
GetRequests() ResourceValues
GetLimits() ResourceValues
GetQosClass() string
}
ResourceSpec is an interface implemented by any API version's ResourceSpec
type ResourceValues ¶
type ResourceValues interface {
String() string
}
ResourceValues is an interface implemented by any API version's ResourceValues
Click to show internal directories.
Click to hide internal directories.