blob: 0f1807d7189bb4b566fa901574b9299237234dc6 [file] [log] [blame]
Andy Bavier7a080492018-08-30 14:26:09 -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: apps/v1beta2
17kind: Deployment
18metadata:
19 name: {{ template "mininet.fullname" . }}
20 labels:
21 app: {{ template "mininet.name" . }}
22 chart: {{ template "mininet.chart" . }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
25spec:
26 replicas: {{ .Values.replicaCount }}
27 selector:
28 matchLabels:
29 app: {{ template "mininet.name" . }}
30 release: {{ .Release.Name }}
31 template:
32 metadata:
33 labels:
34 app: {{ template "mininet.name" . }}
35 release: {{ .Release.Name }}
Andy Bavier7a080492018-08-30 14:26:09 -070036 annotations:
Andy Baviere21a5f52019-05-28 15:39:52 -070037 cni: {{ template "mininet.cni" . }}
Andy Bavier7a080492018-08-30 14:26:09 -070038 spec:
39 containers:
40 - name: {{ .Chart.Name }}
Andy Bavierf4d29c52019-09-05 15:40:09 -070041 image: "{{ .Values.global.registry }}{{ .Values.images.mininet.repository }}:{{ tpl .Values.images.mininet.tag . }}"
42 imagePullPolicy: {{ .Values.images.mininet.pullPolicy }}
Andy Bavier7a080492018-08-30 14:26:09 -070043 args: ["/toposcripts/topo.py"]
44 stdin: true
45 tty: true
46 securityContext:
47 privileged: true
48 volumeMounts:
49 - name: "topo-config"
50 mountPath: "/toposcripts"
51 resources:
52{{ toYaml .Values.resources | indent 12 }}
53 volumes:
54 - name: "topo-config"
55 configMap:
56 name: "{{ .Release.Name }}-configmap"
57 defaultMode: 0755
58 {{- with .Values.nodeSelector }}
59 nodeSelector:
60{{ toYaml . | indent 8 }}
61 {{- end }}
62 {{- with .Values.affinity }}
63 affinity:
64{{ toYaml . | indent 8 }}
65 {{- end }}
66 {{- with .Values.tolerations }}
67 tolerations:
68{{ toYaml . | indent 8 }}
69 {{- end }}