blob: 3f03ed5ef4d32acb1da8b60f444d8dbaadcf15db [file] [log] [blame]
Andy Bavier2259a6b2018-07-12 15:27:48 -07001---
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Andy Baviere21a5f52019-05-28 15:39:52 -070016{{- range $i, $junk := until (.Values.numOlts|int) }}
17---
Andy Bavier2259a6b2018-07-12 15:27:48 -070018apiVersion: v1
19kind: Service
20metadata:
Andy Baviere21a5f52019-05-28 15:39:52 -070021 name: olt{{ $i }}
22 namespace: {{ $.Values.global.namespace }}
Andy Bavier2259a6b2018-07-12 15:27:48 -070023 labels:
Andy Baviere21a5f52019-05-28 15:39:52 -070024 name: olt{{ $i }}
Andy Bavier2259a6b2018-07-12 15:27:48 -070025spec:
26 ports:
27 - name: grpc
28 port: 50060
29 targetPort: 50060
30 selector:
Andy Baviere21a5f52019-05-28 15:39:52 -070031 app: olt{{ $i }}
Andy Bavier2259a6b2018-07-12 15:27:48 -070032---
33apiVersion: apps/v1beta1
34kind: Deployment
35metadata:
Andy Baviere21a5f52019-05-28 15:39:52 -070036 name: olt{{ $i }}
37 namespace: {{ $.Values.global.namespace }}
Andy Bavier2259a6b2018-07-12 15:27:48 -070038spec:
39 replicas: 1
40 template:
41 metadata:
42 labels:
Andy Baviere21a5f52019-05-28 15:39:52 -070043 app: olt{{ $i }}
Andy Bavier2259a6b2018-07-12 15:27:48 -070044 annotations:
Andy Baviere21a5f52019-05-28 15:39:52 -070045 cni: "calico,nni{{ $i }}"
Andy Bavier2259a6b2018-07-12 15:27:48 -070046 spec:
47 containers:
Andy Baviere21a5f52019-05-28 15:39:52 -070048 - name: olt{{ $i }}
49 image: "{{ $.Values.global.registry }}{{ $.Values.images.olt.repository }}:{{ tpl $.Values.images.olt.tag $ }}"
50 imagePullPolicy: {{ $.Values.images.olt.pullPolicy }}
Andy Bavier2259a6b2018-07-12 15:27:48 -070051 env:
52 - name: POD_IP
53 valueFrom:
54 fieldRef:
55 fieldPath: status.podIP
56 - name: NAMESPACE
57 valueFrom:
58 fieldRef:
59 fieldPath: metadata.namespace
Andy Bavier2259a6b2018-07-12 15:27:48 -070060 args:
61 - "/app/ponsim"
62 - "-device_type"
63 - "OLT"
64 - "-onus"
65 - "4"
66 - "-internal_if"
Jonathan Hart26867b22018-08-14 14:53:28 -070067 - "eth1"
Andy Bavier2259a6b2018-07-12 15:27:48 -070068 - "-external_if"
Jonathan Hart26867b22018-08-14 14:53:28 -070069 - "eth1"
Andy Bavier2259a6b2018-07-12 15:27:48 -070070 - "-vcore_endpoint"
71 - "vcore"
72 - "-promiscuous"
Andy Bavier2259a6b2018-07-12 15:27:48 -070073 ports:
74 - containerPort: 50060
75 name: grpc-port
Andy Baviere21a5f52019-05-28 15:39:52 -070076{{- end }}