summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/etcd/templates
diff options
context:
space:
mode:
authorBorislav Glozman <Borislav.Glozman@amdocs.com>2019-06-06 10:10:58 +0000
committerGerrit Code Review <gerrit@onap.org>2019-06-06 10:10:58 +0000
commit7f68e58cda64be4cf24091840a86b9e8ee6a60b6 (patch)
tree7a47ef6beedb8bdaf01f2884e737a02515f79167 /kubernetes/common/etcd/templates
parentf07214a0022af59b4305039fb2368642bc14c942 (diff)
parentf02245c6cd6a5cf32e75d4671e923afa3e08b651 (diff)
Merge "Fix issue with etcd pod startup"
Diffstat (limited to 'kubernetes/common/etcd/templates')
-rw-r--r--kubernetes/common/etcd/templates/statefulset.yaml20
1 files changed, 7 insertions, 13 deletions
diff --git a/kubernetes/common/etcd/templates/statefulset.yaml b/kubernetes/common/etcd/templates/statefulset.yaml
index 8b6a53454e..7190c5bca0 100644
--- a/kubernetes/common/etcd/templates/statefulset.yaml
+++ b/kubernetes/common/etcd/templates/statefulset.yaml
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
@@ -55,17 +54,12 @@ spec:
name: {{ .Values.service.clientPortName }}
{{- if eq .Values.liveness.enabled true }}
livenessProbe:
- exec:
- command: ["/bin/sh", "-c", "etcdctl cluster-health | grep -w healthy" ]
- initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.liveness.periodSeconds }}
- timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
- {{ end -}}
- readinessProbe:
- exec:
- command: ["/bin/sh", "-c", "etcdctl cluster-health | grep -w healthy" ]
- initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
- periodSeconds: {{ .Values.readiness.periodSeconds }}
+ tcpSocket:
+ port: {{ .Values.service.clientInternalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
+ {{ end -}}
resources:
{{ include "common.resources" . | indent 10 }}
env:
@@ -142,7 +136,7 @@ spec:
done
# re-joining after failure?
- if [ -e /var/run/etcd/default.etcd ]; then
+ if [[ -e /var/run/etcd/default.etcd && -f /var/run/etcd/member_id ]]; then
echo "Re-joining etcd member"
member_id=$(cat /var/run/etcd/member_id)