k8s

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanPVC added in v0.10.0

func CleanPVC(ctx context.Context, ui terminal.UI, log hclog.Logger, listOptions metav1.ListOptions, config K8sConfig) error

Takes list options and cleans up any PVCs found in the query of resources from the kubernetes api. Useful for cleaning up PVCs left behind by statefulsets deployed via helm.

func NewClient added in v0.10.0

func NewClient(config K8sConfig) (*kubernetes.Clientset, error)

newClient creates a new K8S client based on the configured settings.

Types

type K8sConfig

type K8sConfig struct {
	KubeconfigPath       string `hcl:"kubeconfig,optional"`
	K8sContext           string `hcl:"context,optional"`
	Version              string `hcl:"version,optional"`
	Namespace            string `hcl:"namespace,optional"`
	RunnerImage          string `hcl:"runner_image,optional"`
	CpuRequest           string `hcl:"runner_cpu_request,optional"`
	MemRequest           string `hcl:"runner_mem_request,optional"`
	CreateServiceAccount bool   `hcl:"create_service_account,optional"`
	OdrImage             string `hcl:"odr_image"`

	// Required for backwards compatibility
	ImagePullPolicy string `hcl:"image_pull_policy,optional"`
	CpuLimit        string `hcl:"cpu_limit,optional"`
	MemLimit        string `hcl:"mem_limit,optional"`
	ImagePullSecret string `hcl:"image_pull_secret,optional"`

	// Used for serverinstall
	ServerImage        string            `hcl:"server_image,optional"`
	ServiceAnnotations map[string]string `hcl:"service_annotations,optional"`

	OdrServiceAccount     string `hcl:"odr_service_account,optional"`
	OdrServiceAccountInit bool   `hcl:"odr_service_account_init,optional"`

	AdvertiseInternal bool   `hcl:"advertise_internal,optional"`
	StorageClassName  string `hcl:"storageclassname,optional"`
	StorageRequest    string `hcl:"storage_request,optional"`
	SecretFile        string `hcl:"secret_file,optional"`
	KubeConfigPath    string `hcl:"kubeconfig_path,optional"`
}

Jump to

Keyboard shortcuts

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