blob: 244c4cae06061ed13330cc185224628f7ab6d2be [file] [log] [blame]
David Bainbridge2f9b76f2019-05-15 13:48:11 -07001# Copyright 2019-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15{{- if .Values.replicas.cli }}
16---
17apiVersion: v1
18kind: Service
19metadata:
20 name: voltha-cli
21 serviceAccountName: {{ .Values.serviceaccount }}
22 labels:
23 name: vcli
24spec:
25 serviceAccountName: {{ .Values.serviceaccount }}
26 ports:
27 - name: ssh
28 port: 5022
29 targetPort: 22
30 selector:
31 app: vcli
32
33---
34apiVersion: apps/v1beta1
35kind: Deployment
36metadata:
37 name: voltha-cli-server
38 serviceAccountName: {{ .Values.serviceaccount }}
39spec:
40 replicas: {{ .Values.replicas.cli }}
41 template:
42 metadata:
43 labels:
44 app: vcli
45 annotations:
46 cni: "calico"
47 spec:
48 serviceAccountName: {{ .Values.serviceaccount }}
49 containers:
50 - name: vcli
51 image: {{ .Values.registry }}{{ .Values.images.cli.repository }}:{{ tpl .Values.images.cli.tag . }}
52 imagePullPolicy: {{ .Values.images.cli.pullPolicy }}
53 env:
54 - name: POD_IP
55 valueFrom:
56 fieldRef:
57 fieldPath: status.podIP
58 args:
59 - "/voltha/python/cli/setup.sh"
60 - "-g voltha-api.{{ .Release.Namespace }}.svc.cluster.local:55555"
61 ports:
62 - containerPort: 22
63 name: ssh-port
64{{- end}}