kube

package
v0.0.0-...-e391bab Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLeaseNotFound            = errors.New("kube: lease not found")
	ErrNoDeploymentForLease     = errors.New("kube: no deployments for lease")
	ErrNoGlobalServicesForLease = errors.New("kube: no global services for lease")
	ErrInternalError            = errors.New("kube: internal error")
	ErrNoServiceForLease        = errors.New("no service for that lease")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	cluster.Client
}

Client interface includes cluster client

func NewClient

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

NewClient returns new Kubernetes Client instance with provided logger, host and ns. Returns error incase of failure

type Settings

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

	// path to kube config file, may be left blank
	ConfigPath             string
	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

func NewDefaultSettings() Settings

Jump to

Keyboard shortcuts

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