vtadmin

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

View Source
const (

	// WebConfigFileName is the file name of the web config
	WebConfigFileName = "config.js"
)

Variables

This section is empty.

Functions

func ClusterConfigSecretName

func ClusterConfigSecretName(clusterName, cellName string) string

ClusterConfigSecretName returns the name of the vtadmin cluster config sercret's name for a given cell.

func DeploymentName

func DeploymentName(clusterName, cellName string) string

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

func DiscoverySecretName

func DiscoverySecretName(clusterName, cellName string) string

DiscoverySecretName returns the name of the vtadmin discovery sercret's name for a given cell.

func DiscoverySecretPath

func DiscoverySecretPath() string

DiscoverySecretPath returns the path at which the discovery secret would be mounted.

func NewDeployment

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

NewDeployment creates a new Deployment object for vtadmin.

func NewService

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

NewService creates a new Service object for vtadmin.

func ServiceName

func ServiceName(clusterName string) string

ServiceName returns the name of the vtadmin Service for a cluster.

func UpdateDeployment

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

UpdateDeployment updates the mutable parts of the vtadmin Deployment that should be changed as part of a gradual, rolling update.

func UpdateDeploymentImmediate

func UpdateDeploymentImmediate(obj *appsv1.Deployment, spec *Spec)

UpdateDeploymentImmediate updates the mutable parts of the vtadmin Deployment that are safe to change immediately.

func UpdateService

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

UpdateService updates the mutable parts of the vtadmin Service.

func WebConfigSecretName

func WebConfigSecretName(clusterName, cellName string) string

WebConfigSecretName returns the name of the vtadmin web config sercret's name for a given cell.

Types

type Spec

type Spec struct {
	Cell *planetscalev2.VitessCellTemplate
	// ClusterConfig holds the secret information for the cluster configuration
	// for VTAdmin. It includes information like what discovery method to use and the link for that file
	ClusterConfig *planetscalev2.SecretSource
	// Discovery holds the secret information for the vtctld and vtgate
	// endpoints to use by vtadmin
	Discovery         *planetscalev2.SecretSource
	Rbac              *planetscalev2.SecretSource
	WebConfig         *planetscalev2.SecretSource
	Image             string
	ImagePullPolicy   corev1.PullPolicy
	ImagePullSecrets  []corev1.LocalObjectReference
	Labels            map[string]string
	Replicas          int32
	APIResources      corev1.ResourceRequirements
	WebResources      corev1.ResourceRequirements
	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
}

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

Jump to

Keyboard shortcuts

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