Skip to content

Commit

Permalink
3.4.0 release (#319)
Browse files Browse the repository at this point in the history
* Updated AKO and init image tag to 3.4.0 and 2.2.2

* Add backup and restore related resources in helm-chart

---------

Co-authored-by: sud82 <[email protected]>
  • Loading branch information
abhishekdwivedi3060 and sud82 authored Oct 16, 2024
1 parent 74a853c commit 12c90d4
Show file tree
Hide file tree
Showing 40 changed files with 780 additions and 418 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} GO111MODULE=on go
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest

# Version of Operator (build arg)
ARG VERSION="3.3.1"
ARG VERSION="3.4.0"

# User to run container as
ARG USER="root"
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pipeline {

AEROSPIKE_CUSTOM_INIT_REGISTRY="568976754000.dkr.ecr.ap-south-1.amazonaws.com"
AEROSPIKE_CUSTOM_INIT_REGISTRY_NAMESPACE="aerospike"
AEROSPIKE_CUSTOM_INIT_NAME_TAG="aerospike-kubernetes-init:2.2.1"
AEROSPIKE_CUSTOM_INIT_NAME_TAG="aerospike-kubernetes-init:2.2.2"
}

stages {
Expand Down Expand Up @@ -119,7 +119,7 @@ boolean isNightly() {
}

String getVersion() {
def prefix = "3.3.1"
def prefix = "3.4.0"
def candidateName = ""
if(isNightly()) {
def timestamp = new Date().format("yyyy-MM-dd")
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ OPENSHIFT_VERSION="v4.9"
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
# TODO: Version must be pulled from git tags
VERSION ?= 3.3.1
VERSION ?= 3.4.0

# Platforms supported
PLATFORMS ?= linux/amd64,linux/arm64
Expand Down Expand Up @@ -313,7 +313,7 @@ submodules: ## Pull and update git submodules recursively

# Generate bundle manifests and metadata, then validate generated files.
# For OpenShift bundles run
# CHANNELS=stable DEFAULT_CHANNEL=stable OPENSHIFT_VERSION=v4.6 IMG=docker.io/aerospike/aerospike-kubernetes-operator-nightly:3.3.1 make bundle
# CHANNELS=stable DEFAULT_CHANNEL=stable OPENSHIFT_VERSION=v4.6 IMG=docker.io/aerospike/aerospike-kubernetes-operator-nightly:3.4.0 make bundle
.PHONY: bundle
bundle: manifests kustomize operator-sdk
rm -rf $(ROOT_DIR)/bundle.Dockerfile $(BUNDLE_DIR)
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ The Operator supports the following capabilities:
* Configure persistent storage and resource allocation
* Standardize and validate configurations
* Cluster security management
* Aerospike cluster monitoring
* Backup and restore Aerospike clusters

## Building and quick start

Expand All @@ -42,7 +44,7 @@ Run the following command with the appropriate name and version for the operator

```sh
IMAGE_TAG_BASE=aerospike/aerospike-kubernetes-operator-nightly
VERSION=3.3.1
VERSION=3.4.0
make docker-buildx IMG=${IMAGE_TAG_BASE}:${VERSION} PLATFORMS=linux/amd64
```
**Note**: Change `PLATFORMS` var as per host machine or remove it to build multi-arch image
Expand Down Expand Up @@ -82,8 +84,8 @@ operator using OLM.

### Install operator-sdk

Install operator-sdk version 1.28.0 using the
installation [guide](https://v1-28-x.sdk.operatorframework.io/docs/installation/)
Install operator-sdk version 1.36.0 using the
installation [guide](https://v1-36-x.sdk.operatorframework.io/docs/installation/)

### Build the bundle

Expand All @@ -94,7 +96,7 @@ Set up the environment with image names.
```shell
export ACCOUNT=aerospike
export IMAGE_TAG_BASE=${ACCOUNT}/aerospike-kubernetes-operator
export VERSION=3.3.1
export VERSION=3.4.0
export IMG=docker.io/${IMAGE_TAG_BASE}-nightly:${VERSION}
export BUNDLE_IMG=docker.io/${IMAGE_TAG_BASE}-bundle-nightly:${VERSION}
export CATALOG_IMG=docker.io/${IMAGE_TAG_BASE}-catalog-nightly:${VERSION}
Expand Down
2 changes: 1 addition & 1 deletion api/v1/aerospikecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ type AerospikePodStatus struct { //nolint:govet // for readability

// AerospikeCluster is the schema for the AerospikeCluster API
// +operator-sdk:csv:customresourcedefinitions:displayName="Aerospike Cluster",resources={{Service, v1},{Pod,v1},{StatefulSet,v1}}
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=3.3.1"
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=3.4.0"
//
//nolint:lll // for readability
type AerospikeCluster struct { //nolint:govet // for readability
Expand Down
14 changes: 9 additions & 5 deletions api/v1/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const (
AerospikeInitContainerNameTagEnvVar = "AEROSPIKE_KUBERNETES_INIT_NAME_TAG"
AerospikeInitContainerDefaultRegistry = "docker.io"
AerospikeInitContainerDefaultRegistryNamespace = "aerospike"
AerospikeInitContainerDefaultNameAndTag = "aerospike-kubernetes-init:2.2.1"
AerospikeInitContainerDefaultNameAndTag = "aerospike-kubernetes-init:2.2.2"
AerospikeAppLabel = "app"
AerospikeAppLabelValue = "aerospike-cluster"
AerospikeCustomResourceLabel = "aerospike.com/cr"
Expand Down Expand Up @@ -132,11 +132,15 @@ func getInitContainerImage(registry, namespace, repoAndTag string) string {
}

func GetAerospikeInitContainerImage(aeroCluster *AerospikeCluster) string {
registry := getInitContainerImageValue(aeroCluster, AerospikeInitContainerRegistryEnvVar,
AerospikeInitContainerDefaultRegistry)
registry := getInitContainerImageValue(
aeroCluster, AerospikeInitContainerRegistryEnvVar,
AerospikeInitContainerDefaultRegistry,
)
namespace := getInitContainerImageRegistryNamespace(aeroCluster)
repoAndTag := getInitContainerImageValue(aeroCluster, AerospikeInitContainerNameTagEnvVar,
AerospikeInitContainerDefaultNameAndTag)
repoAndTag := getInitContainerImageValue(
aeroCluster, AerospikeInitContainerNameTagEnvVar,
AerospikeInitContainerDefaultNameAndTag,
)

return getInitContainerImage(registry, namespace, repoAndTag)
}
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/aerospikebackup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ type AerospikeBackupStatus struct {

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=3.3.1"
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=3.4.0"
// +kubebuilder:printcolumn:name="Backup Service Name",type=string,JSONPath=`.spec.backupService.name`
// +kubebuilder:printcolumn:name="Backup Service Namespace",type=string,JSONPath=`.spec.backupService.namespace`
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/aerospikebackupservice_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ type AerospikeBackupServiceStatus struct {

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=3.3.1"
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=3.4.0"
// +kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.spec.image`
// +kubebuilder:printcolumn:name="Service Type",type=string,JSONPath=`.spec.service.type`
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/aerospikerestore_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type AerospikeRestoreStatus struct {

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=3.3.1"
// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=3.4.0"
// +kubebuilder:printcolumn:name="Backup Service Name",type=string,JSONPath=`.spec.backupService.name`
// +kubebuilder:printcolumn:name="Backup Service Namespace",type=string,JSONPath=`.spec.backupService.namespace`
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/asdb.aerospike.com_aerospikebackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
aerospike-kubernetes-operator/version: 3.3.1
aerospike-kubernetes-operator/version: 3.4.0
controller-gen.kubebuilder.io/version: v0.14.0
name: aerospikebackups.asdb.aerospike.com
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
aerospike-kubernetes-operator/version: 3.3.1
aerospike-kubernetes-operator/version: 3.4.0
controller-gen.kubebuilder.io/version: v0.14.0
name: aerospikebackupservices.asdb.aerospike.com
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/asdb.aerospike.com_aerospikeclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
aerospike-kubernetes-operator/version: 3.3.1
aerospike-kubernetes-operator/version: 3.4.0
controller-gen.kubebuilder.io/version: v0.14.0
name: aerospikeclusters.asdb.aerospike.com
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/asdb.aerospike.com_aerospikerestores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
aerospike-kubernetes-operator/version: 3.3.1
aerospike-kubernetes-operator/version: 3.4.0
controller-gen.kubebuilder.io/version: v0.14.0
name: aerospikerestores.asdb.aerospike.com
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ configMapGenerator:
images:
- name: controller
newName: docker.io/aerospike/aerospike-kubernetes-operator-nightly
newTag: 3.3.1
newTag: 3.4.0
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
value: aerospike
- name: AEROSPIKE_KUBERNETES_INIT_NAME_TAG
# this is the name and tag of aerospike-init image
value: aerospike-kubernetes-init:2.2.1
value: aerospike-kubernetes-init:2.2.2
serviceAccountName: controller-manager

terminationGracePeriodSeconds: 10
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ spec:
- Configure persistent storage and resource allocation
- Standardize and validate configurations
- Cluster security management
- Aerospike cluster monitoring
- Backup and restore Aerospike clusters
displayName: Aerospike Kubernetes Operator
icon:
- base64data: PHN2ZyB3aWR0aD0iMjUwMCIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZD0iTTAgMGgyNTZ2MjU2SDBWMHoiIGZpbGw9IiNCMDI1MkEiLz48cGF0aCBkPSJNMTU2LjI5MyA5NS42MDVsLTczLjE2OSAzMi41OTQgNzMuMTcgMzIuODFWOTUuNjA1em0tOTIuMDMyIDM5Ljk3OWwtMTcuMDQ5LTcuMyAxNy4wNDktNy44ODIgMTQ0LjUyNy02NS4zNzZ2MTcuNDAzbC0zNy45MzIgMTYuODI0djc4LjExN2wzNy45MzIgMTd2MTYuNjA0TDY0LjI2IDEzNS41ODR6IiBmaWxsPSIjRkZGIi8+PC9zdmc+
Expand Down
4 changes: 2 additions & 2 deletions helm-charts/aerospike-backup-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ type: application
name: aerospike-backup-service

# version tracks chart changes
version: 3.3.1
version: 3.4.0
# appVersion tracks operator version
appVersion: 3.3.1
appVersion: 3.4.0

description: A Helm chart for Aerospike Backup Service Custom Resource
icon: https://avatars0.githubusercontent.com/u/2214313?s=200&v=4
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/aerospike-backup-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ backupServiceConfig: {}
# test-policy:
# parallel: 3
# remove-files: KeepAll
# type: 1
# storage:
# local:
# path: /localStorage
Expand All @@ -42,6 +41,7 @@ backupServiceConfig: {}
# type: aws-s3
# path: "s3://test-bucket"
# s3-region: us-east-1
# s3-endpoint-override: ""
# s3-profile: default

## SecretMounts is the list of secret to be mounted in the backup service.
Expand Down
4 changes: 2 additions & 2 deletions helm-charts/aerospike-backup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ type: application
name: aerospike-backup

# version tracks chart changes
version: 3.3.1
version: 3.4.0
# appVersion tracks operator version
appVersion: 3.3.1
appVersion: 3.4.0

description: A Helm chart for Aerospike Backup Custom Resource
icon: https://avatars0.githubusercontent.com/u/2214313?s=200&v=4
Expand Down
6 changes: 4 additions & 2 deletions helm-charts/aerospike-backup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ backupService: {}
## This config is used to trigger backups. It includes: aerospike-cluster, backup-routines
backupConfig: {}
# aerospike-cluster:
# aerospike-aerospikebackup-test-cluster: # Name format: <backup-namespace>-<backup-name>-<cluster-name>
# Name format: The name must begin with the prefix <backup-namespace>-<backup-name>
# aerospike-aerospikebackup-test-cluster:
# credentials:
# password: admin123
# user: admin
# seed-nodes:
# - host-name: aerocluster.aerospike.svc.cluster.local
# port: 3000
# backup-routines:
# aerospike-aerospikebackup-test-routine: # Name format: <backup-namespace>-<backup-name>-<routine-name>
# Name format: The name must begin with the prefix <backup-namespace>-<backup-name>
# aerospike-aerospikebackup-test-routine:
# backup-policy: test-policy
# interval-cron: "@daily"
# incr-interval-cron: "@hourly"
Expand Down
4 changes: 2 additions & 2 deletions helm-charts/aerospike-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ type: application
name: aerospike-cluster

# version tracks chart changes
version: 3.3.1
version: 3.4.0
# appVersion tracks operator version
appVersion: 3.3.1
appVersion: 3.4.0

description: A Helm chart for Aerospike Cluster Custom Resource
icon: https://avatars0.githubusercontent.com/u/2214313?s=200&v=4
Expand Down
4 changes: 2 additions & 2 deletions helm-charts/aerospike-kubernetes-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ type: application
name: aerospike-kubernetes-operator

# version tracks chart changes
version: 3.3.1
version: 3.4.0
# appVersion tracks operator version
appVersion: 3.3.1
appVersion: 3.4.0

description: A Helm chart for Aerospike Kubernetes Operator
icon: https://avatars0.githubusercontent.com/u/2214313?s=200&v=4
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/aerospike-kubernetes-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ helm install aerospike-kubernetes-operator ./aerospike-kubernetes-operator --set
|-------------------------------------|-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| `replicas` | Number of operator replicas | `2` |
| `operatorImage.repository` | Operator image repository | `aerospike/aerospike-kubernetes-operator` |
| `operatorImage.tag` | Operator image tag | `3.3.1` |
| `operatorImage.tag` | Operator image tag | `3.4.0` |
| `operatorImage.pullPolicy` | Image pull policy | `IfNotPresent` |
| `imagePullSecrets` | Secrets containing credentials to pull Operator image from a private registry | `{}` (nil) |
| `rbac.create` | Set this to `true` to let helm chart automatically create RBAC resources necessary for operator | `true` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
aerospike-kubernetes-operator/version: 3.3.1
aerospike-kubernetes-operator/version: 3.4.0
controller-gen.kubebuilder.io/version: v0.14.0
name: aerospikebackups.asdb.aerospike.com
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
aerospike-kubernetes-operator/version: 3.3.1
aerospike-kubernetes-operator/version: 3.4.0
controller-gen.kubebuilder.io/version: v0.14.0
name: aerospikebackupservices.asdb.aerospike.com
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
aerospike-kubernetes-operator/version: 3.3.1
aerospike-kubernetes-operator/version: 3.4.0
controller-gen.kubebuilder.io/version: v0.14.0
name: aerospikeclusters.asdb.aerospike.com
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
aerospike-kubernetes-operator/version: 3.3.1
aerospike-kubernetes-operator/version: 3.4.0
controller-gen.kubebuilder.io/version: v0.14.0
name: aerospikerestores.asdb.aerospike.com
spec:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: aerospike-operator-aerospikebackup-editor-role
labels:
app: {{ template "aerospike-kubernetes-operator.fullname" . }}
chart: {{ .Chart.Name }}
release: {{ .Release.Name }}
rules:
- apiGroups:
- asdb.aerospike.com
resources:
- aerospikebackups
verbs:
- create
- delete
- patch
- update
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: aerospike-operator-aerospikebackup-viewer-role
labels:
app: {{ template "aerospike-kubernetes-operator.fullname" . }}
chart: {{ .Chart.Name }}
release: {{ .Release.Name }}
rules:
- apiGroups:
- asdb.aerospike.com
resources:
- aerospikebackups
verbs:
- get
- list
- watch
- apiGroups:
- asdb.aerospike.com
resources:
- aerospikebackups/status
verbs:
- get
{{- end }}
Loading

0 comments on commit 12c90d4

Please sign in to comment.