Helm Chart for VOLTHA initial commit
Change-Id: I00a12981bfa0db6bedfa2c46a5b4ca2518b71018
diff --git a/voltha/templates/05-namespace.yaml b/voltha/templates/05-namespace.yaml
new file mode 100644
index 0000000..0944162
--- /dev/null
+++ b/voltha/templates/05-namespace.yaml
@@ -0,0 +1,18 @@
+# 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: Namespace
+metadata:
+ name: ingress-nginx
diff --git a/voltha/templates/10-default-backend.yaml b/voltha/templates/10-default-backend.yaml
new file mode 100644
index 0000000..60f368d
--- /dev/null
+++ b/voltha/templates/10-default-backend.yaml
@@ -0,0 +1,66 @@
+# 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: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: default-http-backend
+ labels:
+ app: default-http-backend
+ namespace: {{ .Values.global.namespace }}
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: default-http-backend
+ spec:
+ terminationGracePeriodSeconds: 60
+ containers:
+ - name: default-http-backend
+ # Any image is permissable as long as:
+ # 1. It serves a 404 page at /
+ # 2. It serves 200 on a /healthz endpoint
+ image: gcr.io/google_containers/defaultbackend:1.4
+ livenessProbe:
+ httpGet:
+ path: /healthz
+ port: 8080
+ scheme: HTTP
+ initialDelaySeconds: 30
+ timeoutSeconds: 5
+ ports:
+ - containerPort: 8080
+ resources:
+ limits:
+ cpu: 10m
+ memory: 20Mi
+ requests:
+ cpu: 10m
+ memory: 20Mi
+---
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: default-http-backend
+ namespace: {{ .Values.global.namespace }}
+ labels:
+ app: default-http-backend
+spec:
+ ports:
+ - port: 80
+ targetPort: 8080
+ selector:
+ app: default-http-backend
diff --git a/voltha/templates/20-configmap.yaml b/voltha/templates/20-configmap.yaml
new file mode 100644
index 0000000..7ee406a
--- /dev/null
+++ b/voltha/templates/20-configmap.yaml
@@ -0,0 +1,21 @@
+# 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.
+
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: nginx-configuration
+ namespace: {{ .Values.global.namespace }}
+ labels:
+ app: ingress-nginx
diff --git a/voltha/templates/30-tcp-services-configmap.yaml b/voltha/templates/30-tcp-services-configmap.yaml
new file mode 100644
index 0000000..d815835
--- /dev/null
+++ b/voltha/templates/30-tcp-services-configmap.yaml
@@ -0,0 +1,19 @@
+# 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.
+
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: tcp-services
+ namespace: {{ .Values.global.namespace }}
diff --git a/voltha/templates/40-udp-services-configmap.yaml b/voltha/templates/40-udp-services-configmap.yaml
new file mode 100644
index 0000000..380ab34
--- /dev/null
+++ b/voltha/templates/40-udp-services-configmap.yaml
@@ -0,0 +1,19 @@
+# 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.
+
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: udp-services
+ namespace: {{ .Values.global.namespace }}
diff --git a/voltha/templates/50-rbac.yaml b/voltha/templates/50-rbac.yaml
new file mode 100644
index 0000000..66b6c71
--- /dev/null
+++ b/voltha/templates/50-rbac.yaml
@@ -0,0 +1,147 @@
+# 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: ServiceAccount
+metadata:
+ name: nginx-ingress-serviceaccount
+ namespace: {{ .Values.global.namespace }}
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+ name: nginx-ingress-clusterrole
+rules:
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ - endpoints
+ - nodes
+ - pods
+ - secrets
+ verbs:
+ - list
+ - watch
+ - apiGroups:
+ - ""
+ resources:
+ - nodes
+ verbs:
+ - get
+ - apiGroups:
+ - ""
+ resources:
+ - services
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - "extensions"
+ resources:
+ - ingresses
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - ""
+ resources:
+ - events
+ verbs:
+ - create
+ - patch
+ - apiGroups:
+ - "extensions"
+ resources:
+ - ingresses/status
+ verbs:
+ - update
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: Role
+metadata:
+ name: nginx-ingress-role
+ namespace: {{ .Values.global.namespace }}
+rules:
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ - pods
+ - secrets
+ - namespaces
+ verbs:
+ - get
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ resourceNames:
+ # Defaults to "<election-id>-<ingress-class>"
+ # Here: "<ingress-controller-leader>-<nginx>"
+ # This has to be adapted if you change either parameter
+ # when launching the nginx-ingress-controller.
+ - "ingress-controller-leader-nginx"
+ verbs:
+ - get
+ - update
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ verbs:
+ - create
+ - apiGroups:
+ - ""
+ resources:
+ - endpoints
+ verbs:
+ - get
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: RoleBinding
+metadata:
+ name: nginx-ingress-role-nisa-binding
+ namespace: {{ .Values.global.namespace }}
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: Role
+ name: nginx-ingress-role
+subjects:
+ - kind: ServiceAccount
+ name: nginx-ingress-serviceaccount
+ namespace: {{ .Values.global.namespace }}
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+ name: nginx-ingress-clusterrole-nisa-binding
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: nginx-ingress-clusterrole
+subjects:
+ - kind: ServiceAccount
+ name: nginx-ingress-serviceaccount
+ namespace: {{ .Values.global.namespace }}
diff --git a/voltha/templates/54-namespace.yaml b/voltha/templates/54-namespace.yaml
new file mode 100644
index 0000000..db72ff1
--- /dev/null
+++ b/voltha/templates/54-namespace.yaml
@@ -0,0 +1,23 @@
+# 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.
+
+#
+# Observation:
+# It appears that when a namespace is created, Kubernetes creates
+# a ServiceAccount called "default" for that new namespace.
+#
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: {{ .Values.global.namespace }}
diff --git a/voltha/templates/55-rbac.yaml b/voltha/templates/55-rbac.yaml
new file mode 100644
index 0000000..16ee8b3
--- /dev/null
+++ b/voltha/templates/55-rbac.yaml
@@ -0,0 +1,111 @@
+# 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: ServiceAccount
+metadata:
+ name: voltha-serviceaccount
+ namespace: {{ .Values.global.namespace }}
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+ name: voltha-clusterrole
+rules:
+ - apiGroups:
+ - '*'
+ resources:
+ - '*'
+ verbs:
+ - '*'
+ - nonResourceURLs:
+ - '*'
+ verbs:
+ - '*'
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: Role
+metadata:
+ name: voltha-role
+ namespace: {{ .Values.global.namespace }}
+rules:
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ - pods
+ - secrets
+ - namespaces
+ verbs:
+ - get
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ resourceNames:
+ # Defaults to "<election-id>-<ingress-class>"
+ # Here: "<ingress-controller-leader>-<nginx>"
+ # This has to be adapted if you change either parameter
+ # when launching the voltha-controller.
+ - "ingress-controller-leader-nginx"
+ verbs:
+ - get
+ - update
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ verbs:
+ - create
+ - apiGroups:
+ - ""
+ resources:
+ - endpoints
+ verbs:
+ - get
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: RoleBinding
+metadata:
+ name: voltha-role-nisa-binding
+ namespace: {{ .Values.global.namespace }}
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: Role
+ name: voltha-role
+subjects:
+ - kind: ServiceAccount
+ name: voltha-serviceaccount
+ namespace: {{ .Values.global.namespace }}
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+ name: voltha-clusterrole-nisa-binding
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: voltha-clusterrole
+subjects:
+ - kind: ServiceAccount
+ name: voltha-serviceaccount
+ namespace: {{ .Values.global.namespace }}
diff --git a/voltha/templates/60-cluster-ingress-nginx.yaml b/voltha/templates/60-cluster-ingress-nginx.yaml
new file mode 100644
index 0000000..5518253
--- /dev/null
+++ b/voltha/templates/60-cluster-ingress-nginx.yaml
@@ -0,0 +1,86 @@
+# 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: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: nginx-ingress-controller
+ namespace: {{ .Values.global.namespace }}
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: ingress-nginx
+ template:
+ metadata:
+ labels:
+ app: ingress-nginx
+ annotations:
+ prometheus.io/port: '10254'
+ prometheus.io/scrape: 'true'
+ spec:
+ serviceAccountName: nginx-ingress-serviceaccount
+ initContainers:
+ - command:
+ - sh
+ - -c
+ - sysctl -w net.core.somaxconn=32768; sysctl -w net.ipv4.ip_local_port_range="1024 65535"
+ image: alpine:3.6
+ imagePullPolicy: IfNotPresent
+ name: sysctl
+ securityContext:
+ privileged: true
+ containers:
+ - name: nginx-ingress-controller
+ image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.10.2
+ args:
+ - /nginx-ingress-controller
+ - --default-backend-service=$(POD_NAMESPACE)/default-http-backend
+ - --configmap=$(POD_NAMESPACE)/nginx-configuration
+ - --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
+ - --udp-services-configmap=$(POD_NAMESPACE)/udp-services
+ - --annotations-prefix=nginx.ingress.kubernetes.io
+ env:
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ ports:
+ - name: http
+ containerPort: 80
+ - name: https
+ containerPort: 443
+ livenessProbe:
+ failureThreshold: 3
+ httpGet:
+ path: /healthz
+ port: 10254
+ scheme: HTTP
+ initialDelaySeconds: 10
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 1
+ readinessProbe:
+ failureThreshold: 3
+ httpGet:
+ path: /healthz
+ port: 10254
+ scheme: HTTP
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 1
diff --git a/voltha/templates/70-service-ingress-nginx.yaml b/voltha/templates/70-service-ingress-nginx.yaml
new file mode 100644
index 0000000..3af54d2
--- /dev/null
+++ b/voltha/templates/70-service-ingress-nginx.yaml
@@ -0,0 +1,32 @@
+# 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: ingress-nginx
+ namespace: {{ .Values.global.namespace }}
+spec:
+ type: NodePort
+ selector:
+ app: ingress-nginx
+ ports:
+ - name: http
+ port: 80
+ nodePort: 30080
+ targetPort: http
+ - name: https
+ port: 443
+ nodePort: 30443
+ targetPort: https
diff --git a/voltha/templates/80-ingress.yaml b/voltha/templates/80-ingress.yaml
new file mode 100644
index 0000000..8f28775
--- /dev/null
+++ b/voltha/templates/80-ingress.yaml
@@ -0,0 +1,38 @@
+# 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: extensions/v1beta1
+kind: Ingress
+metadata:
+ name: voltha-ingress
+ namespace: {{ .Values.global.namespace }}
+ annotations:
+ kubernetes.io/ingress.class: "nginx"
+ ingress.kubernetes.io/rewrite-target: /
+spec:
+ rules:
+ - host: k8s-consul
+ http:
+ paths:
+ - path: /
+ backend:
+ serviceName: consul
+ servicePort: 8500
+ - host: k8s-grafana
+ http:
+ paths:
+ - path: /
+ backend:
+ serviceName: grafana
+ servicePort: 8883
diff --git a/voltha/templates/envoy_for_etcd.yaml b/voltha/templates/envoy_for_etcd.yaml
new file mode 100644
index 0000000..7903605
--- /dev/null
+++ b/voltha/templates/envoy_for_etcd.yaml
@@ -0,0 +1,84 @@
+# 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: voltha
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ labels:
+ name: voltha
+spec:
+ clusterIP: None
+ ports:
+ - name: rest
+ port: 8882
+ targetPort: 8882
+ - name: mystery
+ port: 8001
+ targetPort: 8001
+ - name: mystery2
+ port: 8443
+ targetPort: 8443
+ - name: grpc
+ port: 50555
+ targetPort: 50555
+ selector:
+ app: voltha
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: voltha
+ namespace: {{ .Values.global.namespace }}
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: voltha
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ containers:
+ - name: voltha
+ image: {{ .Values.pull_docker_registry }}{{ .Values.images.envoy_for_etcd.repository }}:{{ .Values.images.envoy_for_etcd.tag }}
+ env:
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ args:
+ - "/usr/local/bin/envoyd"
+ - "-envoy-cfg-template=/envoy/voltha-grpc-proxy.template.json"
+ - "-envoy-config=/envoy/voltha-grpc-proxy.json"
+ - "-kv=etcd"
+ - "-kv-svc-name=etcd-cluster.default.svc.cluster.local"
+ - "-kv-port=2379"
+ ports:
+ - containerPort: 8882
+ name: rest-port
+ - containerPort: 8001
+ name: mystery-port
+ - containerPort: 8443
+ name: mystery2-port
+ - containerPort: 50555
+ name: grpc-port
+ imagePullPolicy: {{ .Values.image_pull_policy }}
+
+
diff --git a/voltha/templates/fluentd-config.yaml b/voltha/templates/fluentd-config.yaml
new file mode 100644
index 0000000..2329a6f
--- /dev/null
+++ b/voltha/templates/fluentd-config.yaml
@@ -0,0 +1,75 @@
+# 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
+data:
+ fluentd.conf: |
+
+ # Uncomment this source in environments where voltha services are forwarding logs to the fluentd port directly.
+ # <source>
+ # @type forward
+ # port 24224
+ # </source>
+
+ <source>
+ @id fluentd-containers.log
+ @type tail
+ path /var/log/containers/*.log
+ exclude_path ["/var/log/containers/*kube-system*.log"]
+ pos_file /var/log/containers/ag-containers.log.pos
+ time_format %Y-%m-%dT%H:%M:%S.%NZ
+ tag voltha.*
+ log_level debug
+ format json
+ read_from_head true
+ </source>
+ <match **>
+ @type forward
+ heartbeat_type tcp
+
+ # primary host
+ <server>
+ host fluentdactv
+ port 24224
+ </server>
+ # use secondary host
+ <server>
+ host fluentdstby
+ port 24224
+ standby
+ </server>
+ # use longer flush_interval to reduce CPU usage.
+ # note that this is a trade-off against latency.
+ flush_interval 60s
+ </match>
+
+ fluentd-agg.conf: |
+ <source>
+ @type forward
+ port 24224
+ </source>
+ <match **>
+ @type file
+
+ path /fluentd/log/voltha
+ buffer_path /fluentd/log/*.log
+ append true
+ time_slice_wait 10m
+ time_format %Y%m%dT%H%M%S%z
+ time_slice_format %Y%m%d%H
+ </match>
+kind: ConfigMap
+metadata:
+ name: fluentd-config
+ namespace: {{ .Values.global.namespace }}
diff --git a/voltha/templates/fluentd.yaml b/voltha/templates/fluentd.yaml
new file mode 100644
index 0000000..1e5b886
--- /dev/null
+++ b/voltha/templates/fluentd.yaml
@@ -0,0 +1,219 @@
+# 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.
+
+#
+# This file describes a cluster of 3 fluentd forwarders that
+# send logs to a cluster of 2 fluentd aggregators: one active
+# and one standby.
+#
+# The active fluentd aggregator
+#
+apiVersion: v1
+kind: Service
+metadata:
+ name: fluentdactv
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ clusterIP: None
+ selector:
+ app: fluentdactv
+ ports:
+ - protocol: TCP
+ port: 24224
+ targetPort: 24224
+---
+#
+# Ensure that the active aggregator is not deployed to the
+# same node as the standby
+#
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: fluentdactv
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: fluentdactv
+ annotations:
+ cni: "weave"
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ terminationGracePeriodSeconds: 10
+ affinity:
+ podAntiAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ - labelSelector:
+ matchExpressions:
+ - key: app
+ operator: In
+ values:
+ - fluentdstby
+ topologyKey: kubernetes.io/hostname
+ containers:
+ - name: fluentdactv
+ image: {{ .Values.k8s_docker_registry }}{{ .Values.images.fluentd.repository }}:{{ .Values.images.fluentd.tag }}
+ imagePullPolicy: {{ .Values.image_pull_policy }}
+ volumeMounts:
+ - name: fluentd-log
+ mountPath: /fluentd/log
+ - name: config-volume
+ mountPath: /etc/fluentd-config
+ ports:
+ - containerPort: 24224
+ env:
+ - name: FLUENTD_ARGS
+ value: -c /etc/fluentd-config/fluentd-agg.conf
+ volumes:
+ - name: config-volume
+ configMap:
+ name: fluentd-config
+ - name: fluentd-log
+ hostPath:
+ path: /var/log/voltha/logging_volume
+ type: Directory
+---
+#
+# The standby fluentd aggregator
+#
+apiVersion: v1
+kind: Service
+metadata:
+ name: fluentdstby
+ namespace: {{ .Values.global.namespace }}
+spec:
+ clusterIP: None
+ selector:
+ app: fluentdstby
+ ports:
+ - protocol: TCP
+ port: 24224
+ targetPort: 24224
+---
+#
+# Ensure thet the standby aggregator is not deployed to the
+# same node as the active
+#
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: fluentdstby
+ namespace: {{ .Values.global.namespace }}
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: fluentdstby
+ annotations:
+ cni: "weave"
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ terminationGracePeriodSeconds: 10
+ affinity:
+ podAntiAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ - labelSelector:
+ matchExpressions:
+ - key: app
+ operator: In
+ values:
+ - fluentdactv
+ topologyKey: kubernetes.io/hostname
+ containers:
+ - name: fluentdstby
+ image: k8s.gcr.io/fluentd-gcp:1.30
+ imagePullPolicy: Never
+ volumeMounts:
+ - name: fluentd-log
+ mountPath: /fluentd/log
+ - name: config-volume
+ mountPath: /etc/fluentd-config
+ ports:
+ - containerPort: 24224
+ env:
+ - name: FLUENTD_ARGS
+ value: -c /etc/fluentd-config/fluentd-agg.conf
+ volumes:
+ - name: config-volume
+ configMap:
+ name: fluentd-config
+ - name: fluentd-log
+ hostPath:
+ path: /var/log/voltha/logging_volume
+ type: Directory
+---
+#
+# The cluster of fluentd forwarders. The service itself will be removed once all fluentd forwarding logic are removed
+# from the specific voltha services. Fluentd is defined as a DaemonSet which implies that only 1 instance will
+# run on each node. Each instance will also gets its configuration data from a config map (fluentd-config.yml).
+#
+apiVersion: v1
+kind: Service
+metadata:
+ name: fluentd
+ namespace: {{ .Values.global.namespace }}
+spec:
+ clusterIP: None
+ selector:
+ app: fluentd
+ ports:
+ - protocol: TCP
+ port: 24224
+ targetPort: 24224
+---
+apiVersion: extensions/v1beta1
+kind: DaemonSet
+metadata:
+ name: fluentd
+ namespace: {{ .Values.global.namespace }}
+spec:
+ template:
+ metadata:
+ labels:
+ app: fluentd
+ annotations:
+ cni: "weave"
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ tolerations:
+ - key: node-role.kubernetes.io/master
+ effect: NoSchedule
+ containers:
+ - name: fluentd
+ image: k8s.gcr.io/fluentd-gcp:1.30
+ env:
+ - name: FLUENTD_ARGS
+ value: -c /etc/fluentd-config/fluentd.conf
+ volumeMounts:
+ - name: varlog
+ mountPath: /var/log/
+ - name: varlogcontainers
+ mountPath: /var/lib/docker/containers/
+ - name: config-volume
+ mountPath: /etc/fluentd-config
+ volumes:
+ - name: varlog
+ hostPath:
+ path: /var/log/
+ - name: varlogcontainers
+ hostPath:
+ path: /var/lib/docker/containers/
+ - name: config-volume
+ configMap:
+ name: fluentd-config
diff --git a/voltha/templates/freeradius-config.yaml b/voltha/templates/freeradius-config.yaml
new file mode 100644
index 0000000..a8aa079
--- /dev/null
+++ b/voltha/templates/freeradius-config.yaml
@@ -0,0 +1,28 @@
+# 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
+data:
+ clients.conf: |
+ client 192.168.64.0/18 {
+ secret = SECRET
+ }
+ users: |
+ user Cleartext-Password := "password", MS-CHAP-Use-NTLM-Auth := 0
+
+kind: ConfigMap
+metadata:
+ name: freeradius-config
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
diff --git a/voltha/templates/freeradius.yaml b/voltha/templates/freeradius.yaml
new file mode 100644
index 0000000..10a32c6
--- /dev/null
+++ b/voltha/templates/freeradius.yaml
@@ -0,0 +1,85 @@
+# 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: freeradius
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ labels:
+ name: freeradius
+spec:
+ clusterIP: None
+ ports:
+ - name: radius-auth
+ protocol: UDP
+ port: 1812
+ targetPort: 1812
+ - name: radius-acc
+ protocol: UDP
+ port: 1813
+ targetPort: 1813
+ - name: radius
+ port: 18120
+ targetPort: 18120
+ selector:
+ app: freeradius
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: freeradius
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: freeradius
+ annotations:
+ cni: "weave"
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ containers:
+ - name: freeradius
+ image: {{ .Values.pull_docker_registry }}{{ .Values.images.freeradius.repository }}:{{ .Values.images.freeradius.tag }}
+ env:
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ ports:
+ - containerPort: 1812
+ name: radauth-port
+ - containerPort: 1813
+ name: radacc-port
+ - containerPort: 18120
+ name: radius-port
+ volumeMounts:
+ - name: freeradius-config
+ mountPath: /etc/raddb/clients.conf
+ subPath: clients.conf
+ - name: freeradius-config
+ mountPath: /etc/raddb/users
+ subPath: users
+ volumes:
+ - name: freeradius-config
+ configMap:
+ name: freeradius-config
diff --git a/voltha/templates/grafana.yaml b/voltha/templates/grafana.yaml
new file mode 100644
index 0000000..4fa7566
--- /dev/null
+++ b/voltha/templates/grafana.yaml
@@ -0,0 +1,75 @@
+# 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.
+
+#
+# The grafana service
+#
+apiVersion: v1
+kind: Service
+metadata:
+ name: grafana
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ clusterIP: None
+ selector:
+ app: grafana
+ ports:
+ - name: ui-port
+ protocol: TCP
+ port: 8883
+ targetPort: 80
+ - name: port-2003
+ protocol: TCP
+ port: 2003
+ targetPort: 2003
+ - name: port-2004
+ protocol: TCP
+ port: 2004
+ targetPort: 2004
+ - name: port-8126
+ protocol: TCP
+ port: 8126
+ targetPort: 8126
+ - name: port-8125
+ protocol: TCP
+ port: 8125
+ targetPort: 8125
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: grafana
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: grafana
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ containers:
+ - name: grafana
+ image: {{ .Values.pull_docker_registry }}{{ .Values.images.grafana.repository }}:{{ .Values.images.grafana.tag }}
+ ports:
+ - containerPort: 80
+ - containerPort: 2003
+ - containerPort: 2004
+ - containerPort: 8126
+ - containerPort: 8125
+ env:
+ - name: GR_SERVER_ROOT_URL
+ value: "http://localhost:80/grafana/"
diff --git a/voltha/templates/netconf.yaml b/voltha/templates/netconf.yaml
new file mode 100644
index 0000000..d05afa8
--- /dev/null
+++ b/voltha/templates/netconf.yaml
@@ -0,0 +1,64 @@
+# 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: netconf
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ selector:
+ app: netconf
+ clusterIP: None
+ ports:
+ - port: 830
+ targetPort: 830
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: netconf
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ replicas: 3
+ template:
+ metadata:
+ labels:
+ app: netconf
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ terminationGracePeriodSeconds: 10
+ affinity:
+ podAntiAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ - labelSelector:
+ matchExpressions:
+ - key: app
+ operator: In
+ values:
+ - netconf
+ topologyKey: kubernetes.io/hostname
+ containers:
+ - name: netconf
+ image: {{ .Values.pull_docker_registry }}{{ .Values.images.netconf.repository }}:{{ .Values.images.netconf.tag }}
+ imagePullPolicy: {{ .Values.image_pull_policy }}
+ ports:
+ - containerPort: 830
+ env:
+ - name: NETCONF_PORT
+ value: "830"
+ args:
+{{ toYaml .Values.netconf_args | indent 8 }}
diff --git a/voltha/templates/ofagent.yaml b/voltha/templates/ofagent.yaml
new file mode 100644
index 0000000..5f6d81e
--- /dev/null
+++ b/voltha/templates/ofagent.yaml
@@ -0,0 +1,52 @@
+# 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: apps/v1beta1
+kind: Deployment
+metadata:
+ name: ofagent
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ replicas: 3
+ template:
+ metadata:
+ labels:
+ app: ofagent
+ annotations:
+ cni: "weave"
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ terminationGracePeriodSeconds: 10
+ affinity:
+ podAntiAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ - labelSelector:
+ matchExpressions:
+ - key: app
+ operator: In
+ values:
+ - ofagent
+ topologyKey: kubernetes.io/hostname
+ containers:
+ - name: ofagent
+ image: {{ .Values.pull_docker_registry }}{{ .Values.images.ofagent.repository }}:{{ .Values.images.ofagent.tag }}
+ imagePullPolicy: {{ .Values.image_pull_policy }}
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ args:
+{{ toYaml .Values.ofagent_args | indent 8 }}
diff --git a/voltha/templates/onos.yaml b/voltha/templates/onos.yaml
new file mode 100644
index 0000000..1549551
--- /dev/null
+++ b/voltha/templates/onos.yaml
@@ -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: onos
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ labels:
+ name: onos
+spec:
+ ports:
+ - name: ssh
+ port: 8101
+ targetPort: 8101
+ - name: of
+ port: 6653
+ targetPort: 6653
+ - name: ui
+ port: 8181
+ targetPort: 8181
+ selector:
+ app: onos
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: onos
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: onos
+ annotations:
+ cni: "calico"
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ containers:
+ - name: onos
+ image: {{ .Values.pull_docker_registry }}{{ .Values.images.onos.repository }}:{{ .Values.images.onos.tag }}
+ env:
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: ONOS_APPS
+ value: "drivers,openflow-base"
+ ports:
+ - containerPort: 8101
+ name: ssh-port
+ - containerPort: 6653
+ name: of-port
+ - containerPort: 8181
+ name: ui-port
+ imagePullPolicy: {{ .Values.image_pull_policy }}
diff --git a/voltha/templates/stats.yaml b/voltha/templates/stats.yaml
new file mode 100644
index 0000000..a7b9a70
--- /dev/null
+++ b/voltha/templates/stats.yaml
@@ -0,0 +1,79 @@
+# 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.
+
+#
+# The dashd deployment
+#
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: dashd
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: dashd
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ containers:
+ - name: dashd
+ image: {{ .Values.pull_docker_registry }}{{ .Values.images.dashd.repository }}:{{ .Values.images.dashd.tag }}
+ imagePullPolicy: {{ .Values.image_pull_policy }}
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ args:
+ - "/dashd/dashd/main.py"
+ - "--kafka={{ .Release.Name }}-kafka.default.svc.cluster.local"
+ - "--grafana_url=http://admin:admin@grafana.$(NAMESPACE).svc.cluster.local:80/api"
+ - "--topic=voltha.kpis"
+ #- "--consul=consul:8500"
+---
+#
+# The shovel deployment
+#
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: shovel
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: shovel
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ containers:
+ - name: shovel
+ image: {{ .Values.pull_docker_registry }}{{ .Values.images.shovel.repository }}:{{ .Values.images.shovel.tag }}
+ imagePullPolicy: {{ .Values.image_pull_policy }}
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ args:
+ - "/shovel/shovel/main.py"
+ - "--kafka={{ .Release.Name }}-kafka.default.svc.cluster.local"
+ - "--host=grafana.voltha.svc.cluster.local"
+ - "--topic=voltha.kpis"
+ #- "--consul=consul:8500"
\ No newline at end of file
diff --git a/voltha/templates/vcli.yaml b/voltha/templates/vcli.yaml
new file mode 100644
index 0000000..76c8681
--- /dev/null
+++ b/voltha/templates/vcli.yaml
@@ -0,0 +1,68 @@
+# 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: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ labels:
+ name: vcli
+spec:
+ type: NodePort
+ ports:
+ - name: ssh
+ port: 5022
+ targetPort: 22
+ nodePort: {{ .Values.node_ports.vcli_port }}
+ selector:
+ app: vcli
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: vcli
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ replicas: 2
+ template:
+ metadata:
+ labels:
+ app: vcli
+ annotations:
+ cni: "weave"
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ containers:
+ - name: vcli
+ image: {{ .Values.pull_docker_registry }}{{ .Values.images.vcli.repository }}:{{ .Values.images.vcli.tag }}
+ env:
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ args:
+{{ toYaml .Values.vcli_args | indent 12 }}
+ ports:
+ - containerPort: 22
+ name: ssh-port
+ imagePullPolicy: {{ .Values.image_pull_policy }}
+
+
diff --git a/voltha/templates/vcore_for_etcd.yaml b/voltha/templates/vcore_for_etcd.yaml
new file mode 100644
index 0000000..8ceb6f3
--- /dev/null
+++ b/voltha/templates/vcore_for_etcd.yaml
@@ -0,0 +1,82 @@
+# 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: vcore
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ labels:
+ name: vcore
+spec:
+ clusterIP: None
+ ports:
+ - name: rest
+ port: 8880
+ targetPort: 8880
+ - name: mystery
+ port: 18880
+ targetPort: 18880
+ - name: grpc
+ port: 50556
+ targetPort: 50556
+ selector:
+ app: vcore
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: vcore
+ namespace: {{ .Values.global.namespace }}
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+ replicas: 3
+ template:
+ metadata:
+ labels:
+ app: vcore
+ annotations:
+ cni: "weave"
+ spec:
+ serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+ containers:
+ - name: voltha
+ image: {{ .Values.pull_docker_registry }}{{ .Values.images.vcore.repository }}:{{ .Values.images.vcore.tag }}
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ args:
+ - "voltha/voltha/main.py"
+ - "-v"
+ - "--etcd=etcd-cluster.default.svc.cluster.local:2379"
+ - "--kafka={{ .Release.Name }}-kafka.default.svc.cluster.local"
+ - "--rest-port=8880"
+ - "--grpc-port=50556"
+ - "--interface=eth1"
+ - "--backend=etcd"
+ - "--pon-subnet=10.38.0.0/12"
+ - "--ponsim-comm=grpc"
+ ports:
+ - containerPort: 8880
+ name: rest-port
+ - containerPort: 18880
+ name: mystery-port
+ - containerPort: 50556
+ name: grpc-port
+ imagePullPolicy: {{ .Values.image_pull_policy }}
+
+