vtgate

package
v0.0.0-...-8a63693 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterServiceName

func ClusterServiceName(clusterName string) string

ClusterServiceName returns the name of the vtgate Service for a cluster.

func DeploymentName

func DeploymentName(clusterName, cellName string) string

DeploymentName returns the name of the vtgate Deployment for a given cell.

func NewDeployment

func NewDeployment(key client.ObjectKey, spec *Spec, mysqldImage string) *appsv1.Deployment

NewDeployment creates a new Deployment object for vtgate.

func NewHorizontalPodAutoscaler

func NewHorizontalPodAutoscaler(key client.ObjectKey, spec *HpaSpec) *autoscalingv2.HorizontalPodAutoscaler

NewHorizontalPodAutoscaler creates a new HorizontalPodAutoscaler object for vtgate.

func NewService

func NewService(key client.ObjectKey, labels map[string]string) *corev1.Service

NewService creates a new Service object for vtgate.

func ServiceName

func ServiceName(clusterName, cellName string) string

ServiceName returns the name of the vtgate Service for a cell.

func UpdateDeployment

func UpdateDeployment(obj *appsv1.Deployment, spec *Spec, mysqldImage string)

UpdateDeployment updates the mutable parts of the vtgate Deployment.

func UpdateHorizontalPodAutoscaler

func UpdateHorizontalPodAutoscaler(obj *autoscalingv2.HorizontalPodAutoscaler, spec *HpaSpec)

UpdateHorizontalPodAutoscaler updates the mutable parts of the vtgate HorizontalPodAutoscaler.

func UpdateService

func UpdateService(obj *corev1.Service, labels map[string]string)

UpdateService updates the mutable parts of the vtgate Service.

Types

type HpaSpec

type HpaSpec struct {
	Labels      map[string]string
	MinReplicas *int32
	MaxReplicas int32
	Behavior    *autoscalingv2.HorizontalPodAutoscalerBehavior `json:"behavior,omitempty"`
	Metrics     []autoscalingv2.MetricSpec                     `json:"metrics,omitempty"`
}

HpaSpec specifies all the internal parameters needed to create a HorizontalPodAutoscaler for vtgate.

type Spec

type Spec struct {
	Cell                          *planetscalev2.VitessCellSpec
	CellsToWatch                  []string
	Labels                        map[string]string
	Replicas                      int32
	Resources                     corev1.ResourceRequirements
	Authentication                *planetscalev2.VitessGatewayAuthentication
	SecureTransport               *planetscalev2.VitessGatewaySecureTransport
	Affinity                      *corev1.Affinity
	ExtraFlags                    map[string]string
	ExtraEnv                      []corev1.EnvVar
	ExtraVolumes                  []corev1.Volume
	ExtraVolumeMounts             []corev1.VolumeMount
	InitContainers                []corev1.Container
	SidecarContainers             []corev1.Container
	Annotations                   map[string]string
	ExtraLabels                   map[string]string
	Tolerations                   []corev1.Toleration
	TopologySpreadConstraints     []corev1.TopologySpreadConstraint
	Lifecycle                     corev1.Lifecycle
	TerminationGracePeriodSeconds *int64
}

Spec specifies all the internal parameters needed to deploy vtgate, as opposed to the API type planetscalev2.VitessCellGatewaySpec, which is the public API.

Jump to

Keyboard shortcuts

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