Skip to content

Commit 1f97660

Browse files
author
Barkha Choithani
committed
updated tests and added comments in values file for updateStrategy
1 parent c4ef296 commit 1f97660

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

charts/values.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
replicaCount: 1
55

66
# update strategy for MarkLogic and Helm chart upgrades
7+
# It is recommended to use OnDelete updateStrategy as MarkLogic bootstrap host (pod-0) needs to be upgraded first in the cluster.
8+
# and onDelete allows more control over the upgrade and recovery incase of failure.
79
updateStrategy:
810
type: OnDelete
911

@@ -23,7 +25,7 @@ bootstrapHostName: ""
2325
# Marklogic image parameters
2426
image:
2527
repository: marklogicdb/marklogic-db
26-
tag: latest
28+
tag: latest-10.0
2729
pullPolicy: IfNotPresent
2830

2931
# Init container image parameters
@@ -55,7 +57,7 @@ fullnameOverride: ""
5557
# Configure Marklogic Admin Username and Password
5658
auth:
5759
adminUsername: admin
58-
adminPassword: ""
60+
adminPassword: admin
5961

6062
# Configure Affinity property for scheduling pods to nodes
6163
# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
@@ -70,7 +72,7 @@ nodeSelector: {}
7072
# The "" storageClass will use the default storage class for your cluster. (gp2 for EKS, standard for Minikube)
7173
# If set the enabled to false, it will use EmptyDir volume
7274
persistence:
73-
enabled: true
75+
enabled: false
7476
storageClass: ""
7577
size: 10Gi
7678
annotations: {}

test/e2e/upgrade_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ func TestMLupgrade(t *testing.T) {
126126
SetValues: map[string]string{
127127
"persistence.enabled": "false",
128128
"replicaCount": "1",
129+
"updateStrategy.type": "OnDelete",
129130
"image.repository": "marklogicdb/marklogic-db",
130131
"image.tag": "latest-10.0",
131132
"auth.adminUsername": username,
@@ -160,10 +161,10 @@ func TestMLupgrade(t *testing.T) {
160161
t.Logf("====Upgrading Helm Chart")
161162
helm.Upgrade(t, newOptions, helmChartPath, releaseName)
162163

163-
// Give time to change status of pod from running to terminate during upgrade
164-
time.Sleep(10 * time.Second)
164+
// delete pods to allow upgrades
165+
k8s.RunKubectl(t, kubectlOptions, "delete", "pod", podName)
165166

166-
// wait until second pod is in Ready status
167+
// wait until pod is in Ready status with new configuration
167168
k8s.WaitUntilPodAvailable(t, kubectlOptions, podName, 15, 30*time.Second)
168169

169170
tunnel := k8s.NewTunnel(

0 commit comments

Comments
 (0)