diff --git a/Dockerfile b/Dockerfile index f91e4b0f9..7ad06900d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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.2.2" +ARG VERSION="3.3.0" # User to run container as ARG USER="root" diff --git a/Jenkinsfile b/Jenkinsfile index 8c704c983..ce22b6f60 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -119,7 +119,7 @@ boolean isNightly() { } String getVersion() { - def prefix = "3.2.2" + def prefix = "3.3.0" def candidateName = "" if(isNightly()) { def timestamp = new Date().format("yyyy-MM-dd") diff --git a/Makefile b/Makefile index 318d5af75..7bd70b4d9 100644 --- a/Makefile +++ b/Makefile @@ -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.2.2 +VERSION ?= 3.3.0 # Platforms supported PLATFORMS ?= linux/amd64,linux/arm64 @@ -254,7 +254,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.2.2 make bundle +# CHANNELS=stable DEFAULT_CHANNEL=stable OPENSHIFT_VERSION=v4.6 IMG=docker.io/aerospike/aerospike-kubernetes-operator-nightly:3.3.0 make bundle .PHONY: bundle bundle: manifests kustomize rm -rf $(ROOT_DIR)/bundle.Dockerfile $(BUNDLE_DIR) diff --git a/README.md b/README.md index 4a1ddf385..5a693532e 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,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.2.2 +VERSION=3.3.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 @@ -94,7 +94,7 @@ Set up the environment with image names. ```shell export ACCOUNT=aerospike export IMAGE_TAG_BASE=${ACCOUNT}/aerospike-kubernetes-operator -export VERSION=3.2.2 +export VERSION=3.3.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} diff --git a/api/v1/aerospikecluster_types.go b/api/v1/aerospikecluster_types.go index 72e942cf3..b6273d078 100644 --- a/api/v1/aerospikecluster_types.go +++ b/api/v1/aerospikecluster_types.go @@ -673,7 +673,7 @@ type AerospikeClusterStatusSpec struct { //nolint:govet // for readability // IsReadinessProbeEnabled tells whether the readiness probe is present in all pods or not. // Moreover, PodDisruptionBudget should be created for the Aerospike cluster only when this field is enabled. // +optional - IsReadinessProbeEnabled bool `json:"isClusterReadinessEnabled"` + IsReadinessProbeEnabled bool `json:"isReadinessProbeEnabled"` // Define resources requests and limits for Aerospike Server Container. // Please contact aerospike for proper sizing exercise // Only Memory and Cpu resources can be given @@ -924,7 +924,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.2.2" +// +kubebuilder:metadata:annotations="aerospike-kubernetes-operator/version=3.3.0" // //nolint:lll // for readability type AerospikeCluster struct { //nolint:govet // for readability diff --git a/api/v1/utils.go b/api/v1/utils.go index 0d3fa1b96..fd08bd7ca 100644 --- a/api/v1/utils.go +++ b/api/v1/utils.go @@ -71,7 +71,7 @@ const ( AerospikeInitContainerRegistryEnvVar = "AEROSPIKE_KUBERNETES_INIT_REGISTRY" AerospikeInitContainerDefaultRegistry = "docker.io" AerospikeInitContainerDefaultRegistryNamespace = "aerospike" - AerospikeInitContainerDefaultRepoAndTag = "aerospike-kubernetes-init:2.2.0-dev4" + AerospikeInitContainerDefaultRepoAndTag = "aerospike-kubernetes-init:2.2.0" AerospikeAppLabel = "app" AerospikeAppLabelValue = "aerospike-cluster" AerospikeCustomResourceLabel = "aerospike.com/cr" diff --git a/config/crd/bases/asdb.aerospike.com_aerospikeclusters.yaml b/config/crd/bases/asdb.aerospike.com_aerospikeclusters.yaml index 3fc9d4050..30b572767 100644 --- a/config/crd/bases/asdb.aerospike.com_aerospikeclusters.yaml +++ b/config/crd/bases/asdb.aerospike.com_aerospikeclusters.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - aerospike-kubernetes-operator/version: 3.2.2 + aerospike-kubernetes-operator/version: 3.3.0 controller-gen.kubebuilder.io/version: v0.12.1 name: aerospikeclusters.asdb.aerospike.com spec: @@ -9618,7 +9618,7 @@ spec: image: description: Aerospike server image type: string - isClusterReadinessEnabled: + isReadinessProbeEnabled: description: IsReadinessProbeEnabled tells whether the readiness probe is present in all pods or not. Moreover, PodDisruptionBudget should be created for the Aerospike cluster only when this field is enabled. diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index cf62c9a0a..fd8e34efe 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -14,4 +14,4 @@ configMapGenerator: images: - name: controller newName: docker.io/aerospike/aerospike-kubernetes-operator-nightly - newTag: 3.2.2 + newTag: 3.3.0 diff --git a/go.mod b/go.mod index f2a4abb7a..43749c83c 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 toolchain go1.21.8 require ( - github.com/aerospike/aerospike-management-lib v1.3.1-0.20240506094830-f70b1a5ea4e7 + github.com/aerospike/aerospike-management-lib v1.4.0 github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d github.com/evanphx/json-patch v4.12.0+incompatible github.com/go-logr/logr v1.4.1 diff --git a/go.sum b/go.sum index b68faee27..8b34f35c6 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/aerospike/aerospike-client-go/v7 v7.1.0 h1:yvCTKdbpqZxHvv7sWsFHV1j49jZcC8yXRooWsDFqKtA= github.com/aerospike/aerospike-client-go/v7 v7.1.0/go.mod h1:AkHiKvCbqa1c16gCNGju3c5X/yzwLVvblNczqjxNwNk= -github.com/aerospike/aerospike-management-lib v1.3.1-0.20240506094830-f70b1a5ea4e7 h1:aeK9T07k3l9Ea/LKnCXKRbVWu+o6rZVpUpGadxEokxA= -github.com/aerospike/aerospike-management-lib v1.3.1-0.20240506094830-f70b1a5ea4e7/go.mod h1:3JKrmC/mLSV8SygbrPQPNV8T7bFaTMjB8wfnX25gB+4= +github.com/aerospike/aerospike-management-lib v1.4.0 h1:wT0l3kwzXv5DV5Cd+hD0BQq3hjSIyaPX1HaUb1304TI= +github.com/aerospike/aerospike-management-lib v1.4.0/go.mod h1:3JKrmC/mLSV8SygbrPQPNV8T7bFaTMjB8wfnX25gB+4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= diff --git a/helm-charts/aerospike-cluster/Chart.yaml b/helm-charts/aerospike-cluster/Chart.yaml index abb2c9cfb..14ba32610 100644 --- a/helm-charts/aerospike-cluster/Chart.yaml +++ b/helm-charts/aerospike-cluster/Chart.yaml @@ -3,9 +3,9 @@ type: application name: aerospike-cluster # version tracks chart changes -version: 3.2.2 +version: 3.3.0 # appVersion tracks operator version -appVersion: 3.2.2 +appVersion: 3.3.0 description: A Helm chart for Aerospike Cluster Custom Resource icon: https://avatars0.githubusercontent.com/u/2214313?s=200&v=4 diff --git a/helm-charts/aerospike-kubernetes-operator/Chart.yaml b/helm-charts/aerospike-kubernetes-operator/Chart.yaml index 333660433..1e512b82c 100644 --- a/helm-charts/aerospike-kubernetes-operator/Chart.yaml +++ b/helm-charts/aerospike-kubernetes-operator/Chart.yaml @@ -3,9 +3,9 @@ type: application name: aerospike-kubernetes-operator # version tracks chart changes -version: 3.2.2 +version: 3.3.0 # appVersion tracks operator version -appVersion: 3.2.2 +appVersion: 3.3.0 description: A Helm chart for Aerospike Kubernetes Operator icon: https://avatars0.githubusercontent.com/u/2214313?s=200&v=4 diff --git a/helm-charts/aerospike-kubernetes-operator/README.md b/helm-charts/aerospike-kubernetes-operator/README.md index 06f0b8f65..f148110bd 100644 --- a/helm-charts/aerospike-kubernetes-operator/README.md +++ b/helm-charts/aerospike-kubernetes-operator/README.md @@ -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.2.2` | +| `operatorImage.tag` | Operator image tag | `3.3.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` | diff --git a/helm-charts/aerospike-kubernetes-operator/crds/customresourcedefinition_aerospikeclusters.asdb.aerospike.com.yaml b/helm-charts/aerospike-kubernetes-operator/crds/customresourcedefinition_aerospikeclusters.asdb.aerospike.com.yaml index 3fc9d4050..30b572767 100644 --- a/helm-charts/aerospike-kubernetes-operator/crds/customresourcedefinition_aerospikeclusters.asdb.aerospike.com.yaml +++ b/helm-charts/aerospike-kubernetes-operator/crds/customresourcedefinition_aerospikeclusters.asdb.aerospike.com.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - aerospike-kubernetes-operator/version: 3.2.2 + aerospike-kubernetes-operator/version: 3.3.0 controller-gen.kubebuilder.io/version: v0.12.1 name: aerospikeclusters.asdb.aerospike.com spec: @@ -9618,7 +9618,7 @@ spec: image: description: Aerospike server image type: string - isClusterReadinessEnabled: + isReadinessProbeEnabled: description: IsReadinessProbeEnabled tells whether the readiness probe is present in all pods or not. Moreover, PodDisruptionBudget should be created for the Aerospike cluster only when this field is enabled. diff --git a/helm-charts/aerospike-kubernetes-operator/values.yaml b/helm-charts/aerospike-kubernetes-operator/values.yaml index 860169607..3bca6fac6 100644 --- a/helm-charts/aerospike-kubernetes-operator/values.yaml +++ b/helm-charts/aerospike-kubernetes-operator/values.yaml @@ -4,7 +4,7 @@ replicas: 2 ## Operator image operatorImage: repository: aerospike/aerospike-kubernetes-operator - tag: 3.2.2 + tag: 3.3.0 pullPolicy: IfNotPresent ## In case the above image is pulled from a registry that requires diff --git a/test/access_control_test.go b/test/access_control_test.go index 6ca87bf74..78e2cf495 100644 --- a/test/access_control_test.go +++ b/test/access_control_test.go @@ -2221,14 +2221,15 @@ var _ = Describe( return cerr } - if !client.IsConnected() { + nodes := client.GetNodeNames() + if len(nodes) == 0 { return fmt.Errorf("Not connected") } - pkgLog.Info("Connected to cluster") + pkgLog.Info("Connected to cluster", "nodes", nodes, "pass", pass) return nil - }, 3*time.Minute).ShouldNot(HaveOccurred()) + }, 5*time.Minute).ShouldNot(HaveOccurred()) By("Try scaleup") err = scaleUpClusterTest( diff --git a/test/cluster_helper.go b/test/cluster_helper.go index 0e6ac343d..22a9a64c0 100644 --- a/test/cluster_helper.go +++ b/test/cluster_helper.go @@ -38,6 +38,8 @@ const ( post6Version = "7.0.0.0" pre6Version = "5.7.0.17" version6 = "6.0.0.5" + + latestSchemaVersion = "7.1.0" ) var ( diff --git a/test/dynamic_config_test.go b/test/dynamic_config_test.go index 36150e194..becbf0756 100644 --- a/test/dynamic_config_test.go +++ b/test/dynamic_config_test.go @@ -32,7 +32,11 @@ type podID struct { const clName = "dynamic-config-test" -var configWithMaxDefaultVal = mapset.NewSet("info-max-ms", "flush-max-ms") +var ( + configWithMaxDefaultVal = mapset.NewSet("info-max-ms", "flush-max-ms") + configWithPow2Val = mapset.NewSet("flush-size", "transaction-queue-limit") + configWithMul100Val = mapset.NewSet("max-throughput") +) var _ = Describe( "DynamicConfig", func() { @@ -532,7 +536,7 @@ var _ = Describe( podPIDMap, err := getPodIDs(ctx, aeroCluster) Expect(err).ToNot(HaveOccurred()) - dynamic, err := asconfig.GetDynamic("7.0.0") + dynamic, err := asconfig.GetDynamic(latestSchemaVersion) Expect(err).ToNot(HaveOccurred()) flatServer, flatSpec, err := getAerospikeConfigFromNodeAndSpec(aeroCluster) @@ -801,8 +805,11 @@ func validateNamespaceContextDynamically( } if v != nil { - if configWithMaxDefaultVal.Contains(asconfig.BaseKey(confKey)) { + switch { + case configWithMaxDefaultVal.Contains(asconfig.BaseKey(confKey)): v = v.(int64) - 1 + case configWithPow2Val.Contains(asconfig.BaseKey(confKey)): + v = (v.(int64) - 1) * 2 } newSpec[confKey] = v @@ -900,10 +907,10 @@ func validateXDRNSFieldsDynamically(ctx goctx.Context, flatServer, flatSpec *asc } if v != nil { - switch asconfig.BaseKey(confKey) { - case "max-throughput": + switch { + case configWithMul100Val.Contains(asconfig.BaseKey(confKey)): v = v.(int64) + 99 - case "transaction-queue-limit": + case configWithPow2Val.Contains(asconfig.BaseKey(confKey)): v = (v.(int64) - 1) * 2 } diff --git a/test/large_reconcile_test.go b/test/large_reconcile_test.go index 07075b644..1a5b9a8a2 100644 --- a/test/large_reconcile_test.go +++ b/test/large_reconcile_test.go @@ -244,8 +244,14 @@ func loadDataInCluster( return readErr } - fmt.Printf("Loading record, isClusterConnected %v\n", clientP.IsConnected()) - fmt.Println(asClient.GetNodes()) + for !asClient.IsConnected() { + pkgLog.Info("Waiting for cluster to connect") + time.Sleep(2 * time.Second) + } + + pkgLog.Info( + "Loading record", "nodes", asClient.GetNodeNames(), + ) // The k8s services take time to come up so the timeouts are on the // higher side. diff --git a/test/storage_wipe_test.go b/test/storage_wipe_test.go index 02217aee3..c6133edfe 100644 --- a/test/storage_wipe_test.go +++ b/test/storage_wipe_test.go @@ -241,10 +241,14 @@ func writeDataToCluster( return err } - fmt.Printf( - "Loading record, isClusterConnected %v\n", asClient.IsConnected(), + for !asClient.IsConnected() { + pkgLog.Info("Waiting for cluster to connect") + time.Sleep(2 * time.Second) + } + + pkgLog.Info( + "Loading record", "nodes", asClient.GetNodeNames(), ) - fmt.Println(asClient.GetNodes()) wp := as.NewWritePolicy(0, 0) @@ -299,10 +303,14 @@ func checkDataInCluster( defer asClient.Close() - fmt.Printf( - "Loading record, isClusterConnected %v\n", asClient.IsConnected(), + for !asClient.IsConnected() { + pkgLog.Info("Waiting for cluster to connect") + time.Sleep(2 * time.Second) + } + + pkgLog.Info( + "Loading record", "nodes", asClient.GetNodeNames(), ) - fmt.Println(asClient.GetNodes()) if _, err = asClient.WarmUp(-1); err != nil { return nil, err