VOL-569: Create kubernetes deployment configuration for each voltha service
This update adds a kubernetes deployment file for netconf.
I tested the netconf service using the CLI that comes with the netopeer container.
That CLI appears to make connections with remote netconf servers at port 830; that
port number appears to be hard-coded. The port of the netconf server, on the other
hand, defaults to 1830. The changes in file netconf/main.py enable the override of
this default by using environment variable NETCONF_PORT. The kubernetes deployment
file for netconf sets the port to 830.
Change-Id: I19f90d6e14f59c855b84aa76bbc41586f3bace37
diff --git a/k8s/netconf.yml b/k8s/netconf.yml
new file mode 100644
index 0000000..5d999ba
--- /dev/null
+++ b/k8s/netconf.yml
@@ -0,0 +1,49 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: netconf
+spec:
+ selector:
+ app: netconf
+ clusterIP: None
+ ports:
+ - port: 830
+ targetPort: 830
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: netconf
+spec:
+ replicas: 3
+ template:
+ metadata:
+ labels:
+ app: netconf
+ spec:
+ terminationGracePeriodSeconds: 10
+ affinity:
+ podAntiAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ - labelSelector:
+ matchExpressions:
+ - key: app
+ operator: In
+ values:
+ - netconf
+ topologyKey: kubernetes.io/hostname
+ containers:
+ - name: netconf
+ image: "cord/netconf:latest"
+ imagePullPolicy: Never
+ ports:
+ - containerPort: 830
+ env:
+ - name: NETCONF_PORT
+ value: "830"
+ args:
+ - "/netconf/netconf/main.py"
+ - "-v"
+ - "--consul=consul:8500"
+ - "--fluentd=fluentd:24224"
+ - "--grpc-endpoint=voltha:50555"