- Submitted manifests required to run the EAPOL test
in a single-node Kubernetes environment
Change-Id: I90342d013ba2a38e8a24a349fdadccf17c9e8be9
diff --git a/k8s/single-node/cli.yml b/k8s/single-node/cli.yml
new file mode 100644
index 0000000..680d172
--- /dev/null
+++ b/k8s/single-node/cli.yml
@@ -0,0 +1,63 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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: v1
+kind: Service
+metadata:
+ name: vcli
+ namespace: voltha
+ labels:
+ name: vcli
+spec:
+ ports:
+ - name: ssh
+ port: 5022
+ targetPort: 22
+ selector:
+ app: vcli
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: vcli
+ namespace: voltha
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: vcli
+ annotations:
+ cni: "calico"
+ spec:
+ containers:
+ - name: vcli
+ image: voltha-cli
+ env:
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ args:
+ - "/voltha/python/cli/setup.sh"
+ - "-g rw-core:50057"
+ ports:
+ - containerPort: 22
+ name: ssh-port
+ imagePullPolicy: Never
+
+
diff --git a/k8s/single-node/etcd-cluster.yml b/k8s/single-node/etcd-cluster.yml
new file mode 100644
index 0000000..61a35fa
--- /dev/null
+++ b/k8s/single-node/etcd-cluster.yml
@@ -0,0 +1,25 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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: "etcd.database.coreos.com/v1beta2"
+kind: "EtcdCluster"
+metadata:
+ name: etcd
+ namespace: voltha
+spec:
+ size: 1
+ version: "3.2.18"
+ pod:
+ annotations:
+ cni: "calico"
+
diff --git a/k8s/single-node/kafka.yml b/k8s/single-node/kafka.yml
new file mode 100644
index 0000000..4604676
--- /dev/null
+++ b/k8s/single-node/kafka.yml
@@ -0,0 +1,58 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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: v1
+kind: Service
+metadata:
+ name: kafka
+ namespace: voltha
+spec:
+ clusterIP: None
+ selector:
+ app: kafka
+ ports:
+ - protocol: TCP
+ port: 9092
+ targetPort: 9092
+---
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+ name: kafka
+ namespace: voltha
+spec:
+ serviceName: kafka
+ replicas: 1
+ selector:
+ matchLabels:
+ app: kafka
+ template:
+ metadata:
+ labels:
+ app: kafka
+ annotations:
+ cni: "calico"
+ spec:
+ terminationGracePeriodSeconds: 10
+ containers:
+ - name: kafka
+ image: wurstmeister/kafka:1.0.0
+ ports:
+ - containerPort: 9092
+ env:
+ - name: KAFKA_ADVERTISED_PORT
+ value: "9092"
+ - name: KAFKA_ZOOKEEPER_CONNECT
+ value: zoo:2181
+ - name: KAFKA_HEAP_OPTS
+ value: "-Xmx256M -Xms128M"
diff --git a/k8s/single-node/olt.yml b/k8s/single-node/olt.yml
new file mode 100644
index 0000000..148e1ad
--- /dev/null
+++ b/k8s/single-node/olt.yml
@@ -0,0 +1,74 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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: v1
+kind: Service
+metadata:
+ name: olt
+ namespace: voltha
+ labels:
+ name: olt
+spec:
+ ports:
+ - name: grpc
+ port: 50060
+ targetPort: 50060
+ selector:
+ app: olt
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: olt
+ namespace: voltha
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: olt
+ annotations:
+ cni: "calico"
+ spec:
+ containers:
+ - name: olt
+ image: "voltha-ponsim:latest"
+ env:
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+
+ args:
+ - "/app/ponsim"
+ - "-device_type"
+ - "OLT"
+ - "-onus"
+ - "1"
+ - "-internal_if"
+ - "eth0"
+ - "-external_if"
+ - "eth0"
+ - "-vcore_endpoint"
+ - "rw-core"
+ - "-promiscuous"
+ - "-verbose"
+ ports:
+ - containerPort: 50060
+ name: grpc-port
+
+ imagePullPolicy: Never
diff --git a/k8s/single-node/onu.yml b/k8s/single-node/onu.yml
new file mode 100644
index 0000000..38e6cc6
--- /dev/null
+++ b/k8s/single-node/onu.yml
@@ -0,0 +1,74 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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: v1
+kind: Service
+metadata:
+ name: onu
+ namespace: voltha
+ labels:
+ name: onu
+spec:
+ ports:
+ - name: grpc
+ port: 50061
+ targetPort: 50061
+ selector:
+ app: onu
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: onu
+ namespace: voltha
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: onu
+ annotations:
+ cni: "calico,pon0"
+ spec:
+ containers:
+ - name: onu
+ image: "voltha-ponsim:latest"
+ env:
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+
+ args:
+ - "/app/ponsim"
+ - "-device_type"
+ - "ONU"
+ - "-parent_addr"
+ - "olt"
+ - "-grpc_port"
+ - "50061"
+ - "-internal_if"
+ - "eth0"
+ - "-external_if"
+ - "eth1"
+ - "-promiscuous"
+ - "-verbose"
+ ports:
+ - containerPort: 50061
+ name: grpc-port
+
+ imagePullPolicy: Never
diff --git a/k8s/single-node/rw-core.yml b/k8s/single-node/rw-core.yml
new file mode 100644
index 0000000..df75a6d
--- /dev/null
+++ b/k8s/single-node/rw-core.yml
@@ -0,0 +1,78 @@
+# Copyright 2018 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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: v1
+kind: Service
+metadata:
+ name: rw-core
+ namespace: voltha
+spec:
+ clusterIP: None
+ ports:
+ - name: grpc
+ port: 50057
+ targetPort: 50057
+ selector:
+ app: rw-core
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: rw-core
+ namespace: voltha
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: rw-core
+ template:
+ metadata:
+ labels:
+ app: rw-core
+ annotations:
+ cni: "calico"
+ spec:
+ containers:
+ - name: voltha
+ image: voltha-rw-core
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ args:
+ - "/app/rw_core"
+ - "-kv_store_type=etcd"
+ - "-kv_store_host=etcd.$(NAMESPACE).svc.cluster.local"
+ - "-kv_store_port=2379"
+ - "-grpc_host=rw-core.$(NAMESPACE).svc.cluster.local"
+ - "-grpc_port=50057"
+ - "-banner=true"
+ - "-kafka_adapter_host=kafka.$(NAMESPACE).svc.cluster.local"
+ - "-kafka_adapter_port=9092"
+ - "-kafka_cluster_host=kafka.$(NAMESPACE).svc.cluster.local"
+ - "-kafka_cluster_port=9092"
+ - "-rw_core_topic=rwcore"
+ - "-log_level=0"
+ ports:
+ - containerPort: 50057
+ name: grpc-port
+ imagePullPolicy: IfNotPresent
+
+
+
diff --git a/k8s/single-node/zookeeper.yml b/k8s/single-node/zookeeper.yml
new file mode 100644
index 0000000..ffd3e12
--- /dev/null
+++ b/k8s/single-node/zookeeper.yml
@@ -0,0 +1,69 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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: v1
+kind: Service
+metadata:
+ name: zoo
+ namespace: voltha
+spec:
+ clusterIP: None
+ selector:
+ app: zookeeper
+ ports:
+ - name: client
+ port: 2181
+ targetPort: 2181
+ - name: follower
+ port: 2888
+ targetPort: 2888
+ - name: leader
+ port: 3888
+ targetPort: 3888
+---
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+ name: zookeeper
+ namespace: voltha
+spec:
+ serviceName: zoo
+ replicas: 1
+ selector:
+ matchLabels:
+ app: zookeeper
+ template:
+ metadata:
+ labels:
+ app: zookeeper
+ annotations:
+ cni: "calico"
+ spec:
+ containers:
+ - name: zoo
+ image: zookeeper:3.4.11
+ ports:
+ - containerPort: 2181
+ - containerPort: 2888
+ - containerPort: 3888
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: ZOO_MY_ID
+ value: "1"
+# - name: ZOO_SERVERS
+# value: >
+# server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888
+