diff --git a/api/v1/aerospikecluster_types.go b/api/v1/aerospikecluster_types.go index bfa41cc29..72e942cf3 100644 --- a/api/v1/aerospikecluster_types.go +++ b/api/v1/aerospikecluster_types.go @@ -670,11 +670,10 @@ type AerospikeClusterStatusSpec struct { //nolint:govet // for readability // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Enable Dynamic Config Update" EnableDynamicConfigUpdate *bool `json:"enableDynamicConfigUpdate,omitempty"` - // IsClusterReadinessEnabled determines if the cluster is readiness enabled i.e. readiness probe is - // present in all pods. - // This field is used to determine if PodDisruptionBudget should be created for the Aerospike cluster or not. + // 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 - IsClusterReadinessEnabled bool `json:"isClusterReadinessEnabled"` + IsReadinessProbeEnabled bool `json:"isClusterReadinessEnabled"` // Define resources requests and limits for Aerospike Server Container. // Please contact aerospike for proper sizing exercise // Only Memory and Cpu resources can be given diff --git a/config/crd/bases/asdb.aerospike.com_aerospikeclusters.yaml b/config/crd/bases/asdb.aerospike.com_aerospikeclusters.yaml index f41146141..3fc9d4050 100644 --- a/config/crd/bases/asdb.aerospike.com_aerospikeclusters.yaml +++ b/config/crd/bases/asdb.aerospike.com_aerospikeclusters.yaml @@ -9619,10 +9619,9 @@ spec: description: Aerospike server image type: string isClusterReadinessEnabled: - description: IsClusterReadinessEnabled determines if the cluster is - readiness enabled i.e. readiness probe is present in all pods. This - field is used to determine if PodDisruptionBudget should be created - for the Aerospike cluster or not. + 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. type: boolean k8sNodeBlockList: description: K8sNodeBlockList is a list of Kubernetes nodes which diff --git a/controllers/poddistruptionbudget.go b/controllers/poddistruptionbudget.go index 684ad1bc4..f0d70a662 100644 --- a/controllers/poddistruptionbudget.go +++ b/controllers/poddistruptionbudget.go @@ -65,7 +65,7 @@ func (r *SingleClusterReconciler) deletePDB() error { func (r *SingleClusterReconciler) createOrUpdatePDB() error { // Check for cluster readiness status only when it's false. // Once enabled it won't be disabled. - if !r.IsStatusEmpty() && !r.aeroCluster.Status.IsClusterReadinessEnabled { + if !r.IsStatusEmpty() && !r.aeroCluster.Status.IsReadinessProbeEnabled { clusterReadinessEnabled, err := r.getClusterReadinessStatus() if err != nil { return fmt.Errorf("failed to get cluster readiness status: %v", err) diff --git a/controllers/reconciler.go b/controllers/reconciler.go index ae511bb5d..c39fcd6fa 100644 --- a/controllers/reconciler.go +++ b/controllers/reconciler.go @@ -417,15 +417,15 @@ func (r *SingleClusterReconciler) updateStatus() error { newAeroCluster.Status.AerospikeClusterStatusSpec = *specToStatus newAeroCluster.Status.Phase = asdbv1.AerospikeClusterCompleted - // If IsClusterReadinessEnabled is not enabled, then only check for cluster readiness. + // If IsReadinessProbeEnabled is not enabled, then only check for cluster readiness. // This is to avoid checking cluster readiness for every reconcile as once it is enabled, it will not be disabled. - if !newAeroCluster.Status.IsClusterReadinessEnabled { + if !newAeroCluster.Status.IsReadinessProbeEnabled { clusterReadinessEnable, gErr := r.getClusterReadinessStatus() if gErr != nil { return fmt.Errorf("failed to get cluster readiness status: %v", gErr) } - newAeroCluster.Status.IsClusterReadinessEnabled = clusterReadinessEnable + newAeroCluster.Status.IsReadinessProbeEnabled = clusterReadinessEnable } err = r.patchStatus(newAeroCluster) 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 f41146141..3fc9d4050 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 @@ -9619,10 +9619,9 @@ spec: description: Aerospike server image type: string isClusterReadinessEnabled: - description: IsClusterReadinessEnabled determines if the cluster is - readiness enabled i.e. readiness probe is present in all pods. This - field is used to determine if PodDisruptionBudget should be created - for the Aerospike cluster or not. + 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. type: boolean k8sNodeBlockList: description: K8sNodeBlockList is a list of Kubernetes nodes which