VOL-794: Assignment lists in etcd not updated correctly in presence of vcore failures
* Fixed coordinator method _sanitize_member_list
* Fixed keys-only GET operation for etcd KV store
* Fixed key DELETE operation for etcd KV store
* Modified vcore manifest to allow a failed pod to be re-spawned on a
different host but with the same pod name
* Modified zookeeper manifest to allow a failed pod to be re-spawned
on a different host. With the current manifest, when all 3 zookeeper
pods are scheduled on the same node and that node fails, none of the
pods get re-spawned.
* Added NodePort for the Envoy service
* Removed anti-affinity rule from OFAgent and NetConf manifests to allow
the deployment of multiple pods on the same node
Change-Id: I052d952d81a81cafb96acfc1d57a192596e2e9a1
diff --git a/k8s/envoy_for_consul.yml b/k8s/envoy_for_consul.yml
index 6ed7923..e80812e 100644
--- a/k8s/envoy_for_consul.yml
+++ b/k8s/envoy_for_consul.yml
@@ -6,7 +6,7 @@
labels:
name: voltha
spec:
- clusterIP: None
+ type: NodePort
ports:
- name: rest
port: 8882
@@ -16,6 +16,7 @@
targetPort: 8001
- name: mystery2
port: 8443
+ nodePort: 32443
targetPort: 8443
- name: grpc
port: 50555
diff --git a/k8s/envoy_for_etcd.yml b/k8s/envoy_for_etcd.yml
index af5c1f4..d217eee 100644
--- a/k8s/envoy_for_etcd.yml
+++ b/k8s/envoy_for_etcd.yml
@@ -6,7 +6,7 @@
labels:
name: voltha
spec:
- clusterIP: None
+ type: NodePort
ports:
- name: rest
port: 8882
@@ -16,6 +16,7 @@
targetPort: 8001
- name: mystery2
port: 8443
+ nodePort: 32443
targetPort: 8443
- name: grpc
port: 50555
diff --git a/k8s/netconf.yml b/k8s/netconf.yml
index 9bb7e67..b15bc5c 100644
--- a/k8s/netconf.yml
+++ b/k8s/netconf.yml
@@ -26,16 +26,6 @@
cni: "calico"
spec:
terminationGracePeriodSeconds: 10
- affinity:
- podAntiAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- - labelSelector:
- matchExpressions:
- - key: app
- operator: In
- values:
- - netconf
- topologyKey: kubernetes.io/hostname
containers:
- name: netconf
image: voltha-netconf
diff --git a/k8s/ofagent.yml b/k8s/ofagent.yml
index c2415ae..5449947 100644
--- a/k8s/ofagent.yml
+++ b/k8s/ofagent.yml
@@ -13,16 +13,6 @@
cni: "calico"
spec:
terminationGracePeriodSeconds: 10
- affinity:
- podAntiAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- - labelSelector:
- matchExpressions:
- - key: app
- operator: In
- values:
- - ofagent
- topologyKey: kubernetes.io/hostname
containers:
- name: ofagent
image: voltha-ofagent
diff --git a/k8s/vcore_for_consul.yml b/k8s/vcore_for_consul.yml
index 2679451..b32f1c2 100644
--- a/k8s/vcore_for_consul.yml
+++ b/k8s/vcore_for_consul.yml
@@ -61,3 +61,4 @@
- "--backend=consul"
- "--pon-subnet=10.38.0.0/12"
- "--ponsim-comm=grpc"
+ - "--core-number-extractor=^.*-([0-9]+)_.*$"
diff --git a/k8s/vcore_for_etcd.yml b/k8s/vcore_for_etcd.yml
index 37ceeea..b2d5d5d 100644
--- a/k8s/vcore_for_etcd.yml
+++ b/k8s/vcore_for_etcd.yml
@@ -20,13 +20,19 @@
selector:
app: vcore
---
-apiVersion: apps/v1beta1
-kind: Deployment
+apiVersion: apps/v1
+kind: StatefulSet
metadata:
name: vcore
namespace: voltha
spec:
+ serviceName: vcore
replicas: 3
+ updateStrategy:
+ type: RollingUpdate
+ selector:
+ matchLabels:
+ app: vcore
template:
metadata:
labels:
@@ -34,6 +40,7 @@
annotations:
cni: "calico"
spec:
+ terminationGracePeriodSeconds: 0
containers:
- name: voltha
image: voltha-voltha
@@ -53,6 +60,7 @@
- "--backend=etcd"
- "--pon-subnet=10.38.0.0/12"
- "--ponsim-comm=grpc"
+ - "--core-number-extractor=^.*-([0-9]+)_.*$"
ports:
- containerPort: 8880
name: rest-port
diff --git a/k8s/zookeeper.yml b/k8s/zookeeper.yml
index 1c7f02d..93e4385 100644
--- a/k8s/zookeeper.yml
+++ b/k8s/zookeeper.yml
@@ -78,6 +78,7 @@
annotations:
cni: "calico"
spec:
+ terminationGracePeriodSeconds: 0
containers:
- name: zoo1
image: zookeeper:3.4.11
@@ -118,6 +119,7 @@
annotations:
cni: "calico"
spec:
+ terminationGracePeriodSeconds: 0
containers:
- name: zoo2
image: zookeeper:3.4.11
@@ -158,6 +160,7 @@
annotations:
cni: "calico"
spec:
+ terminationGracePeriodSeconds: 0
containers:
- name: zoo3
image: zookeeper:3.4.11