Back to godoc.org

Package k8s

v0.0.0 (4760111)
Latest Go to latest
Published: Jun 10, 2020 | License: Apache-2.0 | Module: github.com/xbauquet/kuma

Index

Package Files

type AdmissionServerConfig

type AdmissionServerConfig struct {
	// Address the Admission WebHook Server should be listening on.
	Address string `yaml:"address" envconfig:"kuma_runtime_kubernetes_admission_server_address"`
	// Port the Admission WebHook Server should be listening on.
	Port uint32 `yaml:"port" envconfig:"kuma_runtime_kubernetes_admission_server_port"`
	// Directory with a TLS cert and private key for the Admission WebHook Server.
	// TLS certificate file must be named `tls.crt`.
	// TLS key file must be named `tls.key`.
	CertDir string `yaml:"certDir" envconfig:"kuma_runtime_kubernetes_admission_server_cert_dir"`
}

Configuration of the Admission WebHook Server implemented by the Control Plane.

func (*AdmissionServerConfig) Sanitize

func (c *AdmissionServerConfig) Sanitize()

func (*AdmissionServerConfig) Validate

func (c *AdmissionServerConfig) Validate() (errs error)

type InitContainer

type InitContainer struct {
	// Image name.
	Image string `yaml:"image,omitempty" envconfig:"kuma_injector_init_container_image"`
}

InitContainer defines configuration of the Kuma init container.

func (*InitContainer) Sanitize

func (c *InitContainer) Sanitize()

func (*InitContainer) Validate

func (c *InitContainer) Validate() (errs error)

type Injector

type Injector struct {
	// SidecarContainer defines configuration of the Kuma sidecar container.
	SidecarContainer SidecarContainer `yaml:"sidecarContainer,omitempty"`
	// InitContainer defines configuration of the Kuma init container.
	InitContainer InitContainer `yaml:"initContainer,omitempty"`
	// CNIEnabled if true runs kuma-cp in CNI compatible mode
	CNIEnabled bool `yaml:"cniEnabled" envconfig:"kuma_runtime_kubernetes_injector_cni_enabled"`
}

Injector defines configuration of a Kuma Sidecar Injector.

func (*Injector) Sanitize

func (i *Injector) Sanitize()

func (*Injector) Validate

func (i *Injector) Validate() (errs error)

type KubernetesRuntimeConfig

type KubernetesRuntimeConfig struct {
	// Admission WebHook Server implemented by the Control Plane.
	AdmissionServer AdmissionServerConfig `yaml:"admissionServer"`
	// Injector-specific configuration
	Injector Injector `yaml:"injector,omitempty"`
}

Kubernetes-specific configuration

func DefaultKubernetesRuntimeConfig

func DefaultKubernetesRuntimeConfig() *KubernetesRuntimeConfig

func (*KubernetesRuntimeConfig) Sanitize

func (c *KubernetesRuntimeConfig) Sanitize()

func (*KubernetesRuntimeConfig) Validate

func (c *KubernetesRuntimeConfig) Validate() (errs error)

type SidecarContainer

type SidecarContainer struct {
	// Image name.
	Image string `yaml:"image,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_image"`
	// Redirect port.
	RedirectPort uint32 `yaml:"redirectPort,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_redirect_port"`
	// User ID.
	UID int64 `yaml:"uid,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_uid"`
	// Group ID.
	GID int64 `yaml:"gid,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_gui"`
	// Admin port.
	AdminPort uint32 `yaml:"adminPort,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_admin_port"`
	// Drain time for listeners.
	DrainTime time.Duration `yaml:"drainTime,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_drain_time"`
	// Readiness probe.
	ReadinessProbe SidecarReadinessProbe `yaml:"readinessProbe,omitempty"`
	// Liveness probe.
	LivenessProbe SidecarLivenessProbe `yaml:"livenessProbe,omitempty"`
	// Compute resource requirements.
	Resources SidecarResources `yaml:"resources,omitempty"`
}

SidecarContainer defines configuration of the Kuma sidecar container.

func (*SidecarContainer) Sanitize

func (c *SidecarContainer) Sanitize()

func (*SidecarContainer) Validate

func (c *SidecarContainer) Validate() (errs error)

type SidecarLivenessProbe

type SidecarLivenessProbe struct {
	InitialDelaySeconds int32 "" /* 136 byte string literal not displayed */

	TimeoutSeconds int32 `yaml:"timeoutSeconds,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_liveness_probe_timeout_seconds"`

	PeriodSeconds int32 `yaml:"periodSeconds,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_liveness_probe_period_seconds"`

	FailureThreshold int32 "" /* 129 byte string literal not displayed */
}

SidecarLivenessProbe defines periodic probe of container service liveness.

func (*SidecarLivenessProbe) Sanitize

func (c *SidecarLivenessProbe) Sanitize()

func (*SidecarLivenessProbe) Validate

func (c *SidecarLivenessProbe) Validate() (errs error)

type SidecarReadinessProbe

type SidecarReadinessProbe struct {
	InitialDelaySeconds int32 "" /* 137 byte string literal not displayed */

	TimeoutSeconds int32 `yaml:"timeoutSeconds,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_readiness_probe_timeout_seconds"`

	PeriodSeconds int32 `yaml:"periodSeconds,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_readiness_probe_period_seconds"`

	SuccessThreshold int32 "" /* 130 byte string literal not displayed */

	FailureThreshold int32 "" /* 130 byte string literal not displayed */
}

SidecarReadinessProbe defines periodic probe of container service readiness.

func (*SidecarReadinessProbe) Sanitize

func (c *SidecarReadinessProbe) Sanitize()

func (*SidecarReadinessProbe) Validate

func (c *SidecarReadinessProbe) Validate() (errs error)

type SidecarResourceLimits

type SidecarResourceLimits struct {
	// CPU, in cores. (500m = .5 cores)
	CPU string `yaml:"cpu,omitempty" envconfig:"kuma_injector_sidecar_container_resources_limits_cpu"`
	// Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
	Memory string `yaml:"memory,omitempty" envconfig:"kuma_injector_sidecar_container_resources_limits_memory"`
}

SidecarResourceLimits defines the maximum amount of compute resources allowed.

func (*SidecarResourceLimits) Sanitize

func (c *SidecarResourceLimits) Sanitize()

func (*SidecarResourceLimits) Validate

func (c *SidecarResourceLimits) Validate() (errs error)

type SidecarResourceRequests

type SidecarResourceRequests struct {
	// CPU, in cores. (500m = .5 cores)
	CPU string `yaml:"cpu,omitempty" envconfig:"kuma_injector_sidecar_container_resources_requests_cpu"`
	// Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
	Memory string `yaml:"memory,omitempty" envconfig:"kuma_injector_sidecar_container_resources_requests_memory"`
}

SidecarResourceRequests defines the minimum amount of compute resources required.

func (*SidecarResourceRequests) Sanitize

func (c *SidecarResourceRequests) Sanitize()

func (*SidecarResourceRequests) Validate

func (c *SidecarResourceRequests) Validate() (errs error)

type SidecarResources

type SidecarResources struct {
	// Minimum amount of compute resources required.
	Requests SidecarResourceRequests `yaml:"requests,omitempty"`
	// Maximum amount of compute resources allowed.
	Limits SidecarResourceLimits `yaml:"limits,omitempty"`
}

SidecarResources defines compute resource requirements.

func (*SidecarResources) Sanitize

func (c *SidecarResources) Sanitize()

func (*SidecarResources) Validate

func (c *SidecarResources) Validate() (errs error)
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier