blob: 6de376f12def0887de325329cc970eb8520ffc4b [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 }}",
53 ]
54 ports:
55 - name: "bbsim-olt-id-{{ .Values.olt_id }}"
56 containerPort: {{ .Values.olt_tcp_port }}
57 port: {{ .Values.olt_tcp_port }}
58 protocol: TCP
59 env:
60 - name: POD_IP
61 valueFrom:
62 fieldRef:
63 fieldPath: status.podIP
64 - name: NAMESPACE
65 valueFrom:
66 fieldRef:
67 fieldPath: metadata.namespace
68 resources:
69{{ toYaml .Values.resources | indent 12 }}
70 {{- with .Values.nodeSelector }}
71 nodeSelector:
72{{ toYaml . | indent 8 }}
73 {{- end }}
74 {{- with .Values.affinity }}
75 affinity:
76{{ toYaml . | indent 8 }}
77 {{- end }}
78 {{- with .Values.tolerations }}
79 tolerations:
80{{ toYaml . | indent 8 }}
81 {{- end }}