blob: 8c6898daaa0126814596c1bfdd9b21e15946e458 [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" . }}
Jonathan Hartf6c66e22020-02-10 13:47:19 -080020 namespace: {{ .Release.Namespace }}
Zack Williams1849e612018-10-05 15:26:44 -070021 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 }}
Luca Prete61164ae2018-11-28 16:15:59 -080042 image: {{ .Values.global.registry }}{{ .Values.images.bbsim.repository }}:{{ tpl .Values.images.bbsim.tag . }}
43 imagePullPolicy: {{ .Values.images.bbsim.pullPolicy }}
Zack Williams1849e612018-10-05 15:26:44 -070044 securityContext:
45 privileged: true
46 command: [
47 "/app/bbsim",
Matteo Scandolo3ed02892019-10-07 09:57:06 -070048 "-olt_id", "{{ .Values.olt_id }}",
49 "-nni", "{{ .Values.nni }}",
50 "-pon", "{{ .Values.pon }}",
51 "-onu", "{{ .Values.onu }}",
Matteo Scandoloeb401ad2019-10-30 13:32:11 -070052 {{ if .Values.auth -}}
53 "-auth",
54 {{ end -}}
55 {{ if .Values.dhcp -}}
56 "-dhcp",
57 {{ end -}}
Jonathan Hart1b9ae5c2020-02-11 16:54:45 -080058 "-c_tag", "{{ .Values.c_tag }}",
59 "-s_tag", "{{ .Values.s_tag }}",
Matteo Scandoloc99fb1c2019-12-03 17:16:15 -080060 "-delay", "{{ .Values.delay }}"
Zack Williams1849e612018-10-05 15:26:44 -070061 ]
62 ports:
Matteo Scandolo812688a2019-12-11 09:16:53 -080063 - name: "bbsim-{{ .Values.olt_id }}"
Zack Williams1849e612018-10-05 15:26:44 -070064 containerPort: {{ .Values.olt_tcp_port }}
65 port: {{ .Values.olt_tcp_port }}
66 protocol: TCP
Matteo Scandolo812688a2019-12-11 09:16:53 -080067 - name: "bbsim-{{ .Values.olt_id }}-api"
68 containerPort: {{ .Values.bbsim_api_port }}
69 port: {{ .Values.bbsim_api_port }}
70 protocol: TCP
71 - name: "bbsim-{{ .Values.olt_id }}-sadis"
72 containerPort: {{ .Values.bbsim_sadis_port }}
73 port: {{ .Values.bbsim_sadis_port }}
74 protocol: TCP
Zack Williams1849e612018-10-05 15:26:44 -070075 env:
76 - name: POD_IP
77 valueFrom:
78 fieldRef:
79 fieldPath: status.podIP
80 - name: NAMESPACE
81 valueFrom:
82 fieldRef:
83 fieldPath: metadata.namespace
84 resources:
85{{ toYaml .Values.resources | indent 12 }}
86 {{- with .Values.nodeSelector }}
87 nodeSelector:
88{{ toYaml . | indent 8 }}
89 {{- end }}
90 {{- with .Values.affinity }}
91 affinity:
92{{ toYaml . | indent 8 }}
93 {{- end }}
94 {{- with .Values.tolerations }}
95 tolerations:
96{{ toYaml . | indent 8 }}
97 {{- end }}