blob: 279a0b68cdca0fbf9b7964795768a762ed2597ab [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 Scandolo06833062018-11-05 13:27:42 -080053 "-aw", "{{ .Values.wpa_wait }}",
54 "-dw", "{{ .Values.dhcp_wait }}",
Matteo Scandolo7df3ee02018-11-06 16:28:11 -080055 "-k", "{{ .Values.kafka_broker }}",
Zack Williams1849e612018-10-05 15:26:44 -070056 ]
57 ports:
58 - name: "bbsim-olt-id-{{ .Values.olt_id }}"
59 containerPort: {{ .Values.olt_tcp_port }}
60 port: {{ .Values.olt_tcp_port }}
61 protocol: TCP
62 env:
63 - name: POD_IP
64 valueFrom:
65 fieldRef:
66 fieldPath: status.podIP
67 - name: NAMESPACE
68 valueFrom:
69 fieldRef:
70 fieldPath: metadata.namespace
71 resources:
72{{ toYaml .Values.resources | indent 12 }}
73 {{- with .Values.nodeSelector }}
74 nodeSelector:
75{{ toYaml . | indent 8 }}
76 {{- end }}
77 {{- with .Values.affinity }}
78 affinity:
79{{ toYaml . | indent 8 }}
80 {{- end }}
81 {{- with .Values.tolerations }}
82 tolerations:
83{{ toYaml . | indent 8 }}
84 {{- end }}