blob: cf30ccf24ec5bd754486abbb134ac98a0bc8fbf3 [file] [log] [blame]
Zack Williams1849e612018-10-05 15:26:44 -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
16apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
19 name: {{ template "bbsim.fullname" . }}
20 namespace: {{ .Values.namespace }}
21 labels:
22 app: {{ template "bbsim.name" . }}
23 chart: {{ template "bbsim.chart" . }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
26spec:
27 replicas: {{ .Values.replicaCount }}
28 selector:
29 matchLabels:
30 app: {{ template "bbsim.name" . }}
31 release: {{ .Release.Name }}
32 template:
33 metadata:
34 labels:
35 app: {{ template "bbsim.name" . }}
36 release: {{ .Release.Name }}
37 spec:
38 serviceAccount: {{ .Values.serviceAccountName }}
39 serviceAccountName: {{ .Values.serviceAccountName }}
40 containers:
41 - name: {{ .Chart.Name }}
42 image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
43 imagePullPolicy: {{ .Values.image.pullPolicy }}
44 securityContext:
45 privileged: true
46 command: [
47 "/app/bbsim",
48 "-n", "{{ .Values.onus_per_pon_port }}",
49 "-m", "{{ .Values.emulation_mode }}",
50 "-H", ":{{ .Values.olt_tcp_port }}",
51 "-id", "{{ .Values.olt_id }}",
52 "-i", "{{ .Values.pon_ports }}",
Matteo Scandolo6e192f52018-10-15 18:22:48 -070053 "-a", "{{ .Values.wpa_wait }}",
54 "-d", "{{ .Values.dhcp_wait }}",
Zack Williams1849e612018-10-05 15:26:44 -070055 ]
56 ports:
57 - name: "bbsim-olt-id-{{ .Values.olt_id }}"
58 containerPort: {{ .Values.olt_tcp_port }}
59 port: {{ .Values.olt_tcp_port }}
60 protocol: TCP
61 env:
62 - name: POD_IP
63 valueFrom:
64 fieldRef:
65 fieldPath: status.podIP
66 - name: NAMESPACE
67 valueFrom:
68 fieldRef:
69 fieldPath: metadata.namespace
70 resources:
71{{ toYaml .Values.resources | indent 12 }}
72 {{- with .Values.nodeSelector }}
73 nodeSelector:
74{{ toYaml . | indent 8 }}
75 {{- end }}
76 {{- with .Values.affinity }}
77 affinity:
78{{ toYaml . | indent 8 }}
79 {{- end }}
80 {{- with .Values.tolerations }}
81 tolerations:
82{{ toYaml . | indent 8 }}
83 {{- end }}