args

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package args provides helpers for formatting clusteradm args.

Index

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

func SanitizeArgs(args []string) []string

SanitizeArgs redacts sensitive args to prevent leaking credentials

func SanitizeOutput

func SanitizeOutput(output []byte) []byte

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

Jump to

Keyboard shortcuts

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