Skip to content

Commit 21e0ab1

Browse files
feat: Add support for vertical scaling (storage scaling) [KO-448] [KO-459] (#409)
* feat: Add support for vertical scaling (storage scaling) with gradual new rack rollout * Handle failed pod with rack revision change
1 parent eb37c6a commit 21e0ab1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1230
-315
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} GO111MODULE=on go
2727
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
2828

2929
# Version of Operator (build arg)
30-
ARG VERSION="4.1.1"
30+
ARG VERSION="4.2.0-dev1"
3131

3232
# User to run container as
3333
ARG USER="root"

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pipeline {
2323

2424
AEROSPIKE_CUSTOM_INIT_REGISTRY="568976754000.dkr.ecr.ap-south-1.amazonaws.com"
2525
AEROSPIKE_CUSTOM_INIT_REGISTRY_NAMESPACE="aerospike"
26-
AEROSPIKE_CUSTOM_INIT_NAME_TAG="aerospike-kubernetes-init:2.3.1"
26+
AEROSPIKE_CUSTOM_INIT_NAME_TAG="aerospike-kubernetes-init:2.4.0-dev2"
2727
}
2828

2929
stages {
@@ -238,7 +238,7 @@ boolean isNightly() {
238238
}
239239

240240
String getVersion() {
241-
def prefix = "4.1.1"
241+
def prefix = "4.2.0-dev1"
242242
def candidateName = ""
243243
if(isNightly()) {
244244
def timestamp = new Date().format("yyyy-MM-dd")

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ OPENSHIFT_VERSION="v4.10"
1111
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
1212
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
1313
# TODO: Version must be pulled from git tags
14-
VERSION ?= 4.1.1
14+
VERSION ?= 4.2.0-dev1
1515

1616
# Platforms supported
1717
PLATFORMS ?= linux/amd64,linux/arm64
@@ -335,7 +335,7 @@ submodules: ## Pull and update git submodules recursively
335335

336336
# Generate bundle manifests and metadata, then validate generated files.
337337
# For OpenShift bundles run
338-
# CHANNELS=stable DEFAULT_CHANNEL=stable OPENSHIFT_VERSION=v4.10 IMG=docker.io/aerospike/aerospike-kubernetes-operator-nightly:4.1.1 make bundle
338+
# CHANNELS=stable DEFAULT_CHANNEL=stable OPENSHIFT_VERSION=v4.10 IMG=docker.io/aerospike/aerospike-kubernetes-operator-nightly:4.2.0-dev1 make bundle
339339
.PHONY: bundle
340340
bundle: manifests kustomize operator-sdk
341341
rm -rf $(ROOT_DIR)/bundle.Dockerfile $(BUNDLE_DIR)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Run the following command with the appropriate name and version for the operator
4444

4545
```sh
4646
IMAGE_TAG_BASE=aerospike/aerospike-kubernetes-operator-nightly
47-
VERSION=4.1.1
47+
VERSION=4.2.0-dev1
4848
make docker-buildx IMG=${IMAGE_TAG_BASE}:${VERSION} PLATFORMS=linux/amd64
4949
```
5050
**Note**: Change `PLATFORMS` var as per host machine or remove it to build multi-arch image
@@ -96,7 +96,7 @@ Set up the environment with image names.
9696
```shell
9797
export ACCOUNT=aerospike
9898
export IMAGE_TAG_BASE=${ACCOUNT}/aerospike-kubernetes-operator
99-
export VERSION=4.1.1
99+
export VERSION=4.2.0-dev1
100100
export IMG=docker.io/${IMAGE_TAG_BASE}-nightly:${VERSION}
101101
export BUNDLE_IMG=docker.io/${IMAGE_TAG_BASE}-bundle-nightly:${VERSION}
102102
```

api/v1/aerospikecluster_types.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,13 @@ type Rack struct { //nolint:govet // for readability
490490
// Identifier for the rack
491491
ID int `json:"id"`
492492

493+
// Revision is a version identifier for this rack's specification, used to trigger controlled migrations
494+
// when rack configuration changes require new StatefulSets. Change this field when making changes
495+
// that cannot be applied in-place, such as storage updates that require pod recreation.
496+
// The revision is appended to the rack ID for Kubernetes resource naming (e.g., <cluster-name>-<rackID>-<revision>).
497+
// +optional
498+
Revision string `json:"revision,omitempty"`
499+
493500
// Zone name for setting rack affinity. Rack pods will be deployed to given Zone
494501
// +optional
495502
Zone string `json:"zone,omitempty"`
@@ -1239,7 +1246,7 @@ type AerospikePodStatus struct { //nolint:govet // for readability
12391246

12401247
// AerospikeCluster is the schema for the AerospikeCluster API
12411248
// +operator-sdk:csv:customresourcedefinitions:displayName="Aerospike Cluster",resources={{Service, v1},{Pod,v1},{StatefulSet,v1}}
1242-
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=4.1.1"
1249+
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=4.2.0-dev1"
12431250
//
12441251
//nolint:lll // for readability
12451252
type AerospikeCluster struct { //nolint:govet // for readability

api/v1/utils.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@ const (
8181
AerospikeInitContainerNameTagEnvVar = "AEROSPIKE_KUBERNETES_INIT_NAME_TAG"
8282
AerospikeInitContainerDefaultRegistry = "docker.io"
8383
AerospikeInitContainerDefaultRegistryNamespace = "aerospike"
84-
AerospikeInitContainerDefaultNameAndTag = "aerospike-kubernetes-init:2.3.1"
84+
AerospikeInitContainerDefaultNameAndTag = "aerospike-kubernetes-init:2.4.0-dev2"
8585
AerospikeAppLabel = "app"
8686
AerospikeAppLabelValue = "aerospike-cluster"
8787
AerospikeCustomResourceLabel = "aerospike.com/cr"
8888
AerospikeRackIDLabel = "aerospike.com/rack-id"
89+
AerospikeRackRevisionLabel = "aerospike.com/rack-revision"
8990
AerospikeAPIVersionLabel = "aerospike.com/api-version"
9091
AerospikeAPIVersion = "v1"
9192
)

api/v1beta1/aerospikebackup_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ type AerospikeBackupStatus struct {
8686

8787
// +kubebuilder:object:root=true
8888
// +kubebuilder:subresource:status
89-
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=4.1.1"
89+
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=4.2.0-dev1"
9090
// +kubebuilder:printcolumn:name="Backup Service Name",type=string,JSONPath=`.spec.backupService.name`
9191
// +kubebuilder:printcolumn:name="Backup Service Namespace",type=string,JSONPath=`.spec.backupService.namespace`
9292
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

api/v1beta1/aerospikebackupservice_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ type ServiceContainerSpec struct {
161161

162162
// +kubebuilder:object:root=true
163163
// +kubebuilder:subresource:status
164-
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=4.1.1"
164+
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=4.2.0-dev1"
165165
// +kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.spec.image`
166166
// +kubebuilder:printcolumn:name="Service Type",type=string,JSONPath=`.spec.service.type`
167167
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`

api/v1beta1/aerospikerestore_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ type AerospikeRestoreStatus struct {
8989

9090
// +kubebuilder:object:root=true
9191
// +kubebuilder:subresource:status
92-
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=4.1.1"
92+
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=4.2.0-dev1"
9393
// +kubebuilder:printcolumn:name="Backup Service Name",type=string,JSONPath=`.spec.backupService.name`
9494
// +kubebuilder:printcolumn:name="Backup Service Namespace",type=string,JSONPath=`.spec.backupService.namespace`
9595
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`

config/crd/bases/asdb.aerospike.com_aerospikebackups.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
aerospike-kubernetes-operator/version: 4.1.1
6+
aerospike-kubernetes-operator/version: 4.2.0-dev1
77
controller-gen.kubebuilder.io/version: v0.17.2
88
name: aerospikebackups.asdb.aerospike.com
99
spec:

0 commit comments

Comments
 (0)