blob: f75041ef40615a538f38861d8e86e67ed7a4f4e6 [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 }}
36 {{- with .Values.annotations }}
37 annotations:
38{{ toYaml . | indent 8 }}
39 {{- end }}
40 spec:
41 containers:
42 - name: {{ .Chart.Name }}
43 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
44 imagePullPolicy: {{ .Values.image.pullPolicy }}
45 args: ["/toposcripts/topo.py"]
46 stdin: true
47 tty: true
48 securityContext:
49 privileged: true
50 volumeMounts:
51 - name: "topo-config"
52 mountPath: "/toposcripts"
53 resources:
54{{ toYaml .Values.resources | indent 12 }}
55 volumes:
56 - name: "topo-config"
57 configMap:
58 name: "{{ .Release.Name }}-configmap"
59 defaultMode: 0755
60 {{- with .Values.nodeSelector }}
61 nodeSelector:
62{{ toYaml . | indent 8 }}
63 {{- end }}
64 {{- with .Values.affinity }}
65 affinity:
66{{ toYaml . | indent 8 }}
67 {{- end }}
68 {{- with .Values.tolerations }}
69 tolerations:
70{{ toYaml . | indent 8 }}
71 {{- end }}