Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding missing fields in aerospike-cluster-cr.yaml #306

Merged
merged 3 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ metadata:

spec:
# Aerospike cluster size
size: {{ .Values.replicas | default 3 }}
size: {{ .Values.replicas }}

# Aerospike server docker image
image: {{ .Values.image.repository | default "aerospike/aerospike-server-enterprise" }}:{{ .Values.image.tag | default "7.1.0.0" }}

maxUnavailable: {{ .Values.maxUnavailable }}
abhishekdwivedi3060 marked this conversation as resolved.
Show resolved Hide resolved
abhishekdwivedi3060 marked this conversation as resolved.
Show resolved Hide resolved

disablePDB: {{ .Values.disablePDB }}

# Aerospike access control configuration
{{- with .Values.aerospikeAccessControl }}
aerospikeAccessControl: {{- toYaml . | nindent 4 }}
Expand Down Expand Up @@ -50,6 +54,8 @@ spec:

{{- end }}

enableDynamicConfigUpdate: {{ .Values.enableDynamicConfigUpdate }}

# Aerospike network policy
{{- with .Values.aerospikeNetworkPolicy }}
aerospikeNetworkPolicy: {{- toYaml . | nindent 4 }}
Expand Down Expand Up @@ -106,3 +112,11 @@ spec:
{{- with .Values.seedsFinderServices }}
seedsFinderServices: {{- toYaml . | nindent 4 }}
{{- end }}

{{- if .Values.rosterNodeBlockList }}
rosterNodeBlockList: {{ .Values.rosterNodeBlockList }}
{{- end }}

{{- if .Values.k8sNodeBlockList }}
k8sNodeBlockList: {{ .Values.k8sNodeBlockList }}
{{- end }}
abhishekdwivedi3060 marked this conversation as resolved.
Show resolved Hide resolved
22 changes: 21 additions & 1 deletion helm-charts/aerospike-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image:
tag: 7.1.0.0

## In case the above image is pulled from a registry that requires
## authentication, a secret containining credentials can be added
## authentication, a secret containing credentials can be added
## imagePullSecrets:
## - secret_with_credentials_to_custom_registry
imagePullSecrets: {}
Expand Down Expand Up @@ -113,3 +113,23 @@ operatorClientCert: {}

## Dev Mode
devMode: false

## maxUnavailable defines percentage/number of pods that can be allowed to go down or unavailable
## before application disruption.
maxUnavailable: 1

## Disable the PodDisruptionBudget creation for the Aerospike cluster.
disablePDB: false

## enableDynamicConfigUpdate enables dynamic config update flow of the operator.
enableDynamicConfigUpdate: false

## rosterNodeBlockList is a list of blocked nodeIDs from roster in a strong-consistency setup
## Replace the value with aerospike node id which needs to be blocked.
rosterNodeBlockList:
- <aerospike-node-id>

## k8sNodeBlockList is a list of Kubernetes nodes which are not used for Aerospike pods.
## Replace the value with kubernetes cluster node name which needs to be blocked.
k8sNodeBlockList:
- <node-name>
abhishekdwivedi3060 marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion helm-charts/aerospike-kubernetes-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ operatorImage:
pullPolicy: IfNotPresent

## In case the above image is pulled from a registry that requires
## authentication, a secret containining credentials can be added
## authentication, a secret containing credentials can be added
## imagePullSecrets:
## - secret_with_credentials_to_custom_registry
imagePullSecrets: {}
Expand Down
20 changes: 11 additions & 9 deletions test/on_demand_operations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package test
import (
goctx "context"
"fmt"
"time"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -80,7 +81,7 @@ var _ = Describe(
)

It(
"Should execute podRestart operations on all pods", func() {
"Should execute podRestart operation on all pods", func() {
aeroCluster, err := getCluster(
k8sClient, ctx, clusterNamespacedName,
)
Expand Down Expand Up @@ -138,16 +139,17 @@ var _ = Describe(
err = k8sClient.Update(ctx, aeroCluster)
Expect(err).ToNot(HaveOccurred())

aeroCluster, err = getCluster(
k8sClient, ctx, clusterNamespacedName,
)
Expect(err).ToNot(HaveOccurred())
Eventually(func() error {
aeroCluster, err = getCluster(
k8sClient, ctx, clusterNamespacedName,
)
Expect(err).ToNot(HaveOccurred())

aeroCluster.Spec.Operations[0].Kind = asdbv1.OperationPodRestart
aeroCluster.Spec.Operations[0].ID = "2"
aeroCluster.Spec.Operations[0].Kind = asdbv1.OperationPodRestart
aeroCluster.Spec.Operations[0].ID = "2"

err = updateCluster(k8sClient, ctx, aeroCluster)
Expect(err).ToNot(HaveOccurred())
return updateCluster(k8sClient, ctx, aeroCluster)
}, 1*time.Minute).ShouldNot(HaveOccurred())

operationTypeMap := map[string]asdbv1.OperationKind{
"operations-1-0": asdbv1.OperationPodRestart,
Expand Down
Loading