From 2060de4608397ef567b96e5a37c0134f221c1f73 Mon Sep 17 00:00:00 2001 From: s7aesis Date: Mon, 7 May 2018 16:37:49 -0400 Subject: [PATCH] Updating etcd cluster --- manifests/deployment.yaml | 8 ++++++-- manifests/example-etcd-cluster.yaml | 11 ++++++++--- scripts/etcd.sh | 13 +------------ 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/manifests/deployment.yaml b/manifests/deployment.yaml index 41fceed..f355504 100644 --- a/manifests/deployment.yaml +++ b/manifests/deployment.yaml @@ -11,7 +11,11 @@ spec: spec: containers: - name: etcd-operator - image: quay.io/coreos/etcd-operator:v0.4.2 + image: quay.io/coreos/etcd-operator:v0.9.2 + command: + - etcd-operator + # Uncomment to act for resources in all namespaces. More information in doc/clusterwide.md + #- -cluster-wide env: - name: MY_POD_NAMESPACE valueFrom: @@ -20,4 +24,4 @@ spec: - name: MY_POD_NAME valueFrom: fieldRef: - fieldPath: metadata.name \ No newline at end of file + fieldPath: metadata.name diff --git a/manifests/example-etcd-cluster.yaml b/manifests/example-etcd-cluster.yaml index 28dc4ad..262f7af 100644 --- a/manifests/example-etcd-cluster.yaml +++ b/manifests/example-etcd-cluster.yaml @@ -1,7 +1,12 @@ -apiVersion: "etcd.coreos.com/v1beta1" -kind: "Cluster" +apiVersion: "etcd.database.coreos.com/v1beta2" +kind: "EtcdCluster" metadata: name: "example-etcd-cluster" + ## Adding this annotation make this cluster managed by clusterwide operators + ## namespaced operators ignore it + # annotations: + # etcd.database.coreos.com/scope: clusterwide spec: size: 3 - version: "3.1.8" \ No newline at end of file + version: "3.2.13" + diff --git a/scripts/etcd.sh b/scripts/etcd.sh index f03fd5d..cfd8596 100755 --- a/scripts/etcd.sh +++ b/scripts/etcd.sh @@ -4,12 +4,6 @@ echo "installing etcd operator" kubectl create -f manifests/deployment.yaml kubectl rollout status -f manifests/deployment.yaml -until kubectl get thirdpartyresource cluster.etcd.coreos.com -do - echo "waiting for operator" - sleep 2 -done - echo "pausing for 10 seconds for operator to settle" sleep 10 @@ -19,9 +13,4 @@ echo "installing etcd cluster service" kubectl create -f manifests/service.json echo "waiting for etcd cluster to turnup" - -until kubectl get pod example-etcd-cluster-0002 -do - echo "waiting for etcd cluster to turnup" - sleep 2 -done +sleep 10