k8s

package
v0.0.0-...-ca44064 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 5 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