blob: a1027d7a6018205396ad4b7aaf120dc37a455a89 [file] [log] [blame]
Andy Bavierf15d53a2018-03-07 17:34:30 -07001---
2
3# Copyright 2018-present Open Networking Foundation
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17apiVersion: apps/v1beta2
18kind: Deployment
19metadata:
20 name: {{ template "onos.fullname" . }}
Gopinath Tagetfff89342018-04-16 12:12:17 -070021 namespace: {{ .Values.namespace }}
Andy Bavierf15d53a2018-03-07 17:34:30 -070022 labels:
23 app: {{ template "onos.name" . }}
24 chart: {{ template "onos.chart" . }}
25 release: {{ .Release.Name }}
26 heritage: {{ .Release.Service }}
Scott Baker900343a2018-08-09 17:03:16 -070027{{- if .Values.xos_service_label }}
28 xos_service: {{ .Values.xos_service_label }}
29{{- end }}
Andy Bavierf15d53a2018-03-07 17:34:30 -070030spec:
31 replicas: {{ .Values.replicaCount }}
32 selector:
33 matchLabels:
34 app: {{ template "onos.name" . }}
35 release: {{ .Release.Name }}
36 template:
37 metadata:
38 labels:
39 app: {{ template "onos.name" . }}
40 release: {{ .Release.Name }}
Scott Baker900343a2018-08-09 17:03:16 -070041{{- if .Values.xos_service_label }}
42 xos_service: {{ .Values.xos_service_label }}
43{{- end }}
Andy Bavierf15d53a2018-03-07 17:34:30 -070044 spec:
Gopinath Tagetfff89342018-04-16 12:12:17 -070045 serviceAccount: {{ .Values.serviceAccountName }}
46 serviceAccountName: {{ .Values.serviceAccountName }}
Andy Bavierf15d53a2018-03-07 17:34:30 -070047 containers:
48 - name: {{ .Chart.Name }}
Matteo Scandolof6c28df2018-05-08 11:44:05 -070049 image: {{ .Values.onosImage }}
50 imagePullPolicy: {{ .Values.imagePullPolicy }}
Gopinath Tagetfff89342018-04-16 12:12:17 -070051 env:
52{{ toYaml .Values.onos_env | indent 12 }}
Andy Bavierf15d53a2018-03-07 17:34:30 -070053 ports:
54 - name: ovsdb
55 containerPort: {{ .Values.services.ovsdb.port }}
56 - name: openflow
57 containerPort: {{ .Values.services.openflow.port }}
58 - name: ssh
59 containerPort: {{ .Values.services.ssh.port }}
60 - name: ui
61 containerPort: {{ .Values.services.ui.port }}
62 - name: cluster
63 containerPort: {{ .Values.services.cluster.port }}
64 resources:
65{{ toYaml .Values.resources | indent 12 }}
Andy Bavier67a6e7f2018-05-30 12:17:45 -070066 volumeMounts:
67 - name: node-key
68 mountPath: /root/vtn
69 readOnly: true
70 volumes:
71 - name: node-key
72 secret:
73 secretName: node-key
74 defaultMode: 256
75 optional: true
Andy Bavierf15d53a2018-03-07 17:34:30 -070076 {{- with .Values.nodeSelector }}
77 nodeSelector:
78{{ toYaml . | indent 8 }}
79 {{- end }}
80 {{- with .Values.affinity }}
81 affinity:
82{{ toYaml . | indent 8 }}
83 {{- end }}
84 {{- with .Values.tolerations }}
85 tolerations:
86{{ toYaml . | indent 8 }}
87 {{- end }}