k8s

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: UPL-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DryRunAnnotationName = "dry-run"

DryRunAnnotationName annotation used on jobs to indicate dry-run state [true|false]

View Source
const NoOpMode = "NOOP"

NoOpMode value for MODE variable for no-op (test) jobs

Variables

This section is empty.

Functions

func DeleteJob

func DeleteJob(client clipkg.Client, jobName string, namespace string) error

DeleteJob the job if it exists

func GetAPIServerURL

func GetAPIServerURL(client clipkg.Client) (string, error)

GetAPIServerURL gets the external URL of the API server

Types

type JobConfigCommon

type JobConfigCommon struct {
	JobName            string            // Name of the job
	Namespace          string            // Namespace for the job
	Labels             map[string]string // Container labels for the job
	ServiceAccountName string            // Service account name to execute the job as
	JobImage           string            // Image name/tag for the job
	DryRun             bool              // Perform the job as a dry-run/no-op, for testing purposes
}

JobConfigCommon Common configuration for install/uninstall jobs

type KubeConfig

type KubeConfig struct {
	Clusters       []kcCluster `json:"clusters"`
	Users          []kcUser    `json:"users"`
	Contexts       []kcContext `json:"contexts"`
	CurrentContext string      `json:"current-context"`
}

KubeConfig represents a kubeconfig object used to connect using a token

type KubeconfigBuilder

type KubeconfigBuilder struct {
	ClusterName string
	Server      string
	CertAuth    string
	UserName    string
	UserToken   string
	ContextName string
}

KubeconfigBuilder contains fields needed to build a KubeConfig object

func (*KubeconfigBuilder) Build

func (b *KubeconfigBuilder) Build() KubeConfig

Build creates a KubeConfig object using the fields of the builder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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