kube

package
v0.14.1-rc7 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const SettingsKey = ContextKey("kube-client-settings")

Variables

View Source
var (
	ErrLeaseNotFound             = errors.New("kube: lease not found")
	ErrNoDeploymentForLease      = errors.New("kube: no deployments for lease")
	ErrInternalError             = errors.New("kube: internal error")
	ErrNoServiceForLease         = errors.New("no service for that lease")
	ErrInvalidHostnameConnection = errors.New("kube: invalid hostname connection")
	ErrMissingLabel              = errors.New("kube: missing label")
	ErrInvalidLabelValue         = errors.New("kube: invalid label value")
)

Functions

func ValidateSettings added in v0.14.0

func ValidateSettings(settings Settings) error

Types

type Client

type Client interface {
	cluster.Client
}

Client interface includes cluster client

func NewClient

func NewClient(log log.Logger, ns string, configPath string) (Client, error)

NewClient returns new Kubernetes Client instance with provided logger, host and ns. Returns error incase of failure configPath may be the empty string

func NewPreparedClient added in v0.14.0

func NewPreparedClient(log log.Logger, ns string, configPath string) (Client, error)

type ContextKey added in v0.14.0

type ContextKey string

type Settings added in v0.9.1

type Settings struct {
	// gcp:    NodePort
	// others: ClusterIP
	DeploymentServiceType corev1.ServiceType

	// gcp:    false
	// others: true
	DeploymentIngressStaticHosts bool
	// Ingress domain to map deployments to
	DeploymentIngressDomain string

	// Return load balancer host in lease status command ?
	// gcp:    true
	// others: optional
	DeploymentIngressExposeLBHosts bool

	// Global hostname for arbitrary ports
	ClusterPublicHostname string

	// NetworkPoliciesEnabled determines if NetworkPolicies should be installed.
	NetworkPoliciesEnabled bool

	CPUCommitLevel     float64
	MemoryCommitLevel  float64
	StorageCommitLevel float64

	DeploymentRuntimeClass string
}

settings configures k8s object generation such that it is customized to the cluster environment that is being used. For instance, GCP requires a different service type than minikube.

func NewDefaultSettings added in v0.9.1

func NewDefaultSettings() Settings

Jump to

Keyboard shortcuts

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