Skip to content

Commit

Permalink
Update the readiness/liveness Probes configuration. (#357)
Browse files Browse the repository at this point in the history
* Update the readiness/liveness Probes configuration.

* Address review feedback

* Fix the unit tests.
  • Loading branch information
ishan16696 authored Jun 14, 2022
1 parent b45c5fa commit 3d721af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions charts/etcd/templates/etcd-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ spec:
{{ end }}
initialDelaySeconds: 15
periodSeconds: 5
failureThreshold: 5
livenessProbe:
exec:
command:
Expand All @@ -99,8 +100,10 @@ spec:
# {{- end }}
- get
- foo
- --consistency=s
initialDelaySeconds: 15
periodSeconds: 5
failureThreshold: 5
ports:
- containerPort: {{ .Values.etcd.serverPort }}
name: server
Expand Down
10 changes: 6 additions & 4 deletions controllers/etcd_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1176,8 +1176,9 @@ func validateEtcdWithDefaults(instance *druidv1alpha1.Etcd, s *appsv1.StatefulSe
"ETCDCTL_API=3": Equal("ETCDCTL_API=3"),
"etcdctl": Equal("etcdctl"),
fmt.Sprintf("--endpoints=http://%s-local:%d", instance.Name, clientPort): Equal(fmt.Sprintf("--endpoints=http://%s-local:%d", instance.Name, clientPort)),
"get": Equal("get"),
"foo": Equal("foo"),
"get": Equal("get"),
"foo": Equal("foo"),
"--consistency=s": Equal("--consistency=s"),
}),
})),
}),
Expand Down Expand Up @@ -1565,8 +1566,9 @@ func validateEtcd(instance *druidv1alpha1.Etcd, s *appsv1.StatefulSet, cm *corev
"--key=/var/etcd/ssl/client/client/tls.key": Equal("--key=/var/etcd/ssl/client/client/tls.key"),
"--cacert=/var/etcd/ssl/client/ca/ca.crt": Equal("--cacert=/var/etcd/ssl/client/ca/ca.crt"),
fmt.Sprintf("--endpoints=https://%s-local:%d", instance.Name, clientPort): Equal(fmt.Sprintf("--endpoints=https://%s-local:%d", instance.Name, clientPort)),
"get": Equal("get"),
"foo": Equal("foo"),
"get": Equal("get"),
"foo": Equal("foo"),
"--consistency=s": Equal("--consistency=s"),
}),
})),
}),
Expand Down

0 comments on commit 3d721af

Please sign in to comment.