diff --git a/.buildkite/hooks/pre-exit b/.buildkite/hooks/pre-exit index ab6d0af6..1286db9e 100644 --- a/.buildkite/hooks/pre-exit +++ b/.buildkite/hooks/pre-exit @@ -1,5 +1,25 @@ +#!/usr/bin/env bash + # Remove the docker container on which kind is running # Also removes the volume used by it docker container rm -v -f kind-${BUILDKITE_BUILD_ID}-control-plane # Remove the docker image created for the local PR code docker image rm -f vitess-operator-pr:latest + +# This hack exists because vitess-operator modifies the permissions on the git +# checkout during CI from inside docker. This causes future jobs run on the same +# node to fail the git checkout step due to permission errors +# +# Our fix is to reset the perms after each job step. We can't run arbitrary +# sudo commands as the buildkite-agent user but we _can_ run the /usr/bin/fix-buildkite-agent-builds-permissions +# tool via sudo +# +# these cmds stolen from: https://github.com/buildkite/elastic-ci-stack-for-aws/blob/da3aef5d96cecb796636a7ac25d7b205a6a0cc90/packer/linux/conf/buildkite-agent/hooks/environment#L117-L141 + +set -euo pipefail + +AGENT_ORG_PIPELINE_DIR="${BUILDKITE_BUILD_CHECKOUT_PATH#"${BUILDKITE_BUILD_PATH}/"}" +AGENT_DIR="${AGENT_ORG_PIPELINE_DIR%%/*}" + +set -x +sudo /usr/bin/fix-buildkite-agent-builds-permissions "$AGENT_DIR" planetscale vitess-operator \ No newline at end of file diff --git a/docs/api.md b/docs/api.md index 8573ca14..a43f0b7d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -504,6 +504,80 @@ VitessClusterStatus +

AutoscalerSpec +

+

+(Appears on: +VitessCellGatewaySpec) +

+

+

AutoscalerSpec defines the vtgate’s pod autoscaling specification.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+minReplicas
+ +int32 + +
+(Optional) +

MinReplicas is the minimum number of instances of vtgate to run in +this cell when autoscaling is enabled.

+
+maxReplicas
+ +int32 + +
+

MaxReplicas is the maximum number of instances of vtgate to run in +this cell when autoscaling is enabled.

+
+metrics
+ + +[]Kubernetes autoscaling/v2.MetricSpec + + +
+(Optional) +

Metrics is meant to provide a customizable way to configure HPA metrics. +currently the only supported custom metrics is type=Pod. +Use TargetCPUUtilization or TargetMemoryUtilization instead if scaling on these common resource metrics.

+
+behavior
+ + +Kubernetes autoscaling/v2.HorizontalPodAutoscalerBehavior + + +
+(Optional) +

Behavior specifies the scaling behavior of the target in both Up and Down directions.

+

AzblobBackupLocation

@@ -3335,6 +3409,21 @@ int32 +autoscaler
+ + +AutoscalerSpec + + + + +(Optional) +

Autoscaler specifies the pod autoscaling configuration to use +for the vtgate workload.

+ + + + resources
@@ -3612,6 +3701,30 @@ string

ServiceName is the name of the Service for this cell’s vtgate.

+ + +labelSelector
+ +string + + + +

LabelSelector is required by the Scale subresource, which is used by +HorizontalPodAutoscaler when reading pod metrics.

+ + + + +replicas
+ +int32 + + + +

Replicas is required by the Scale subresource, which is used by +HorizontalPodAutoscaler to determine the current number of replicas.

+ +

VitessCellImages @@ -6549,7 +6662,18 @@ operation, after which the source keyspace is destroyed.

VitessKeyspaceTemplateImages specifies user-definable container images to -use for this keyspace.

+use for this keyspace. The images defined here by the user will override +those defined at the top-level in VitessCluster.spec.images.

+

While this field allows you to set a different Vitess version for some +components than the version defined at the top level, it is important to +note that Vitess only ensures compatibility between one version and the +next and previous one. For instance: N is only guaranteed to be compatible +with N+1 and N-1. Do be careful when specifying multiple versions across +your cluster so that they respect this compatibility rule.

+

Note: this structure is a copy of VitessKeyspaceImages, once we have gotten +rid of MysqldImage and replaced it by MysqldImageNew (planned for v2.15), we +should be able to remove VitessKeyspaceTemplateImages entirely and just use +VitessKeyspaceImages instead as it contains exactly the same fields.

@@ -6561,6 +6685,39 @@ use for this keyspace.

+ + + + + + + + + + + + + + + +
+vttablet
+ +string + +
+

Vttablet is the container image (including version tag) to use for Vitess Tablet instances.

+
+vtorc
+ +string + +
+

Vtorc is the container image (including version tag) to use for Vitess Orchestrator instances.

+
+vtbackup
+ +string + +
+

Vtbackup is the container image (including version tag) to use for Vitess Backup jobs.

+
mysqld
@@ -6575,6 +6732,17 @@ compatible with. Only one flavor image may be provided at a time. mysqld running alongside each tablet.

+mysqldExporter
+ +string + +
+

MysqldExporter specifies the container image for mysqld-exporter.

+

VitessKeyspaceTurndownPolicy