Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 1 | --- |
| 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 | |
| 16 | apiVersion: apps/v1beta2 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 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 }} |
| 25 | spec: |
| 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 Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 36 | annotations: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 37 | cni: {{ template "mininet.cni" . }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 38 | spec: |
| 39 | containers: |
| 40 | - name: {{ .Chart.Name }} |
Andy Bavier | f4d29c5 | 2019-09-05 15:40:09 -0700 | [diff] [blame] | 41 | image: "{{ .Values.global.registry }}{{ .Values.images.mininet.repository }}:{{ tpl .Values.images.mininet.tag . }}" |
| 42 | imagePullPolicy: {{ .Values.images.mininet.pullPolicy }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 43 | 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 }} |