k8s

package
v0.0.0-...-83c1a15 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdmissionServerConfig

type AdmissionServerConfig struct {
	config.BaseConfig

	// Address the Admission WebHook Server should be listening on.
	Address string `json:"address" envconfig:"dubbo_runtime_kubernetes_admission_server_address"`
	// Port the Admission WebHook Server should be listening on.
	Port uint32 `json:"port" envconfig:"dubbo_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 `json:"certDir" envconfig:"dubbo_runtime_kubernetes_admission_server_cert_dir"`
}

AdmissionServerConfig defines configuration of the Admission WebHook Server implemented by the Control Plane.

func (*AdmissionServerConfig) Validate

func (c *AdmissionServerConfig) Validate() error

type ClientConfig

type ClientConfig struct {
	// Qps defines maximum requests kubernetes client is allowed to make per second.
	// Default value 100. If set to 0 kube-client default value of 5 will be used.
	Qps int `json:"qps" envconfig:"dubbo_runtime_kubernetes_client_config_qps"`
	// BurstQps defines maximum burst requests kubernetes client is allowed to make per second
	// Default value 100. If set to 0 kube-client default value of 10 will be used.
	BurstQps       int    `json:"burstQps" envconfig:"dubbo_runtime_kubernetes_client_config_burst_qps"`
	KubeFileConfig string `json:"kube_file_config" envconfig:"dubbo_runtime_kube_file_config"`
}

type ControllersConcurrency

type ControllersConcurrency struct {
	// PodController defines maximum concurrent reconciliations of Pod resources
	// Default value 10. If set to 0 kube controller-runtime default value of 1 will be used.
	PodController int `json:"podController" envconfig:"dubbo_runtime_kubernetes_controllers_concurrency_pod_controller"`
}

type DataplaneContainer

type DataplaneContainer struct {
	// Deprecated: Use DUBBO_BOOTSTRAP_SERVER_PARAMS_ADMIN_PORT instead.
	AdminPort uint32 `json:"adminPort,omitempty" envconfig:"dubbo_runtime_kubernetes_injector_sidecar_container_admin_port"`
	// Drain time for listeners.
	DrainTime config_types.Duration `json:"drainTime,omitempty" envconfig:"dubbo_runtime_kubernetes_injector_sidecar_container_drain_time"`
	// Readiness probe.
	ReadinessProbe SidecarReadinessProbe `json:"readinessProbe,omitempty"`
	// Liveness probe.
	LivenessProbe SidecarLivenessProbe `json:"livenessProbe,omitempty"`
	// EnvVars are additional environment variables that can be placed on Dubbo DP sidecar
	EnvVars map[string]string `json:"envVars" envconfig:"dubbo_runtime_kubernetes_injector_sidecar_container_env_vars"`
}

DataplaneContainer defines the configuration of a Dubbo dataplane proxy container.

type KubernetesRuntimeConfig

type KubernetesRuntimeConfig struct {
	config.BaseConfig

	// Admission WebHook Server implemented by the Control Plane.
	AdmissionServer AdmissionServerConfig `json:"admissionServer"`
	// MarshalingCacheExpirationTime defines a duration for how long
	// marshaled objects will be stored in the cache. If equal to 0s then
	// cache is turned off
	MarshalingCacheExpirationTime config_types.Duration `json:"marshalingCacheExpirationTime" envconfig:"dubbo_runtime_kubernetes_marshaling_cache_expiration_time"`
	// Kubernetes' resources reconciliation concurrency configuration
	ControllersConcurrency ControllersConcurrency `json:"controllersConcurrency"`
	// Kubernetes client configuration
	ClientConfig ClientConfig `json:"clientConfig"`
	// Kubernetes leader election configuration
	LeaderElection LeaderElection `json:"leaderElection"`
}

KubernetesRuntimeConfig defines Kubernetes-specific configuration

func DefaultKubernetesRuntimeConfig

func DefaultKubernetesRuntimeConfig() *KubernetesRuntimeConfig

func (*KubernetesRuntimeConfig) PostProcess

func (c *KubernetesRuntimeConfig) PostProcess() error

func (*KubernetesRuntimeConfig) Validate

func (c *KubernetesRuntimeConfig) Validate() error

type LeaderElection

type LeaderElection struct {
	// LeaseDuration is the duration that non-leader candidates will
	// wait to force acquire leadership. This is measured against time of
	// last observed ack. Default is 15 seconds.
	LeaseDuration config_types.Duration `json:"leaseDuration" envconfig:"dubbo_runtime_kubernetes_leader_election_lease_duration"`
	// RenewDeadline is the duration that the acting controlplane will retry
	// refreshing leadership before giving up. Default is 10 seconds.
	RenewDeadline config_types.Duration `json:"renewDeadline" envconfig:"dubbo_runtime_kubernetes_leader_election_renew_deadline"`
}

type SidecarLivenessProbe

type SidecarLivenessProbe struct {
	config.BaseConfig

	// Number of seconds after the container has started before liveness probes are initiated.
	InitialDelaySeconds int32 `` /* 137-byte string literal not displayed */
	// Number of seconds after which the probe times out.
	TimeoutSeconds int32 `` /* 126-byte string literal not displayed */
	// How often (in seconds) to perform the probe.
	PeriodSeconds int32 `json:"periodSeconds,omitempty" envconfig:"dubbo_runtime_kubernetes_injector_sidecar_container_liveness_probe_period_seconds"`
	// Minimum consecutive failures for the probe to be considered failed after having succeeded.
	FailureThreshold int32 `` /* 130-byte string literal not displayed */
}

SidecarLivenessProbe defines periodic probe of container service liveness.

type SidecarReadinessProbe

type SidecarReadinessProbe struct {
	config.BaseConfig

	// Number of seconds after the container has started before readiness probes are initiated.
	InitialDelaySeconds int32 `` /* 138-byte string literal not displayed */
	// Number of seconds after which the probe times out.
	TimeoutSeconds int32 `` /* 127-byte string literal not displayed */
	// Number of seconds after which the probe times out.
	PeriodSeconds int32 `json:"periodSeconds,omitempty" envconfig:"dubbo_runtime_kubernetes_injector_sidecar_container_readiness_probe_period_seconds"`
	// Minimum consecutive successes for the probe to be considered successful after having failed.
	SuccessThreshold int32 `` /* 131-byte string literal not displayed */
	// Minimum consecutive failures for the probe to be considered failed after having succeeded.
	FailureThreshold int32 `` /* 131-byte string literal not displayed */
}

SidecarReadinessProbe defines periodic probe of container service readiness.

Jump to

Keyboard shortcuts

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