From: Balazs Szekeres Date: Fri, 6 Sep 2019 20:54:45 +0000 (+0200) Subject: Etcd update X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fcaas-etcd.git;a=commitdiff_plain;h=e131842648210ce33c4edbd00f131507edbb07a2 Etcd update Etcd updated to version 3.4.0 Proxy no longer needed for HA (etcd cluster can take care of it now) Change-Id: Idc5ada6d7716d8041d3de7a84ef137f15bd42e02 Signed-off-by: Balazs Szekeres --- diff --git a/ansible/roles/etcd/templates/etcd.yml b/ansible/roles/etcd/templates/etcd.yml index 3be70a8..c54017f 100644 --- a/ansible/roles/etcd/templates/etcd.yml +++ b/ansible/roles/etcd/templates/etcd.yml @@ -89,35 +89,6 @@ spec: - name: secret mountPath: /etc/etcd/ssl readOnly: true - - name: kube-etcd-proxy - image: {{ container_image_names | select('search', '/etcd') | list | last }} -{% set etcdproxys = [] -%} -{%- for nodenumber in range(groups['caas_master']|length|int) -%} -{%- if etcdproxys.append('https://' + (hostvars[groups.caas_master[nodenumber]]['networking']['infra_internal']['ip']|string) + ':' + (caas.etcd_api_port|string) ) -%}{%- endif -%} -{%- endfor %} - command: - - /usr/bin/etcd - args: - - grpc-proxy - - start - - --endpoints={{ etcdproxys|join(',')}} - - --listen-addr={{ ansible_host }}:{{ caas.etcd_proxy_port }} - - --advertise-client-url={{ ansible_host }}:{{ caas.etcd_proxy_port }} - - --resolver-prefix='___grpc_proxy_endpoint' - - --resolver-ttl=60 - - --cert=/etc/etcd/ssl/etcd{{ nodeindex }}.pem - - --key=/etc/etcd/ssl/etcd{{ nodeindex }}-key.pem - - --cacert=/etc/etcd/ssl/ca.pem - resources: - requests: - cpu: "10m" - volumeMounts: - - name: time-mount - mountPath: /etc/localtime - readOnly: true - - name: secret - mountPath: /etc/etcd/ssl - readOnly: true volumes: - name: time-mount hostPath: diff --git a/caas-etcd.spec b/caas-etcd.spec index 9c3253f..73cfc45 100644 --- a/caas-etcd.spec +++ b/caas-etcd.spec @@ -14,8 +14,8 @@ %define COMPONENT etcd %define RPM_NAME caas-%{COMPONENT} -%define RPM_MAJOR_VERSION 3.3.13 -%define RPM_MINOR_VERSION 6 +%define RPM_MAJOR_VERSION 3.4.0 +%define RPM_MINOR_VERSION 0 %define go_version 1.12.9 %define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION} %define docker_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build diff --git a/docker-build/etcd/Dockerfile b/docker-build/etcd/Dockerfile index e178418..f0c9816 100644 --- a/docker-build/etcd/Dockerfile +++ b/docker-build/etcd/Dockerfile @@ -46,9 +46,9 @@ RUN apk add py-pip \ && cd ${go_install_dir}/src/ \ && ./make.bash \ \ -&& mkdir -p ${GOPATH}/src/github.com/coreos/etcd \ -&& curl -fsSL -k https://github.com/coreos/etcd/archive/v${ETCD_VERSION}.tar.gz | tar zx --strip-components=1 -C ${GOPATH}/src/github.com/coreos/etcd \ -&& cd ${GOPATH}/src/github.com/coreos/etcd \ +&& mkdir -p ${GOPATH}/src/go.etcd.io/etcd \ +&& curl -fsSL -k https://github.com/coreos/etcd/archive/v${ETCD_VERSION}.tar.gz | tar zx --strip-components=1 -C ${GOPATH}/src/go.etcd.io/etcd \ +&& cd ${GOPATH}/src/go.etcd.io/etcd \ && GOOS=linux ./build \ && mv bin/etcd /usr/bin/ \ && mv bin/etcdctl /usr/bin/ \