blob: 9825d6733ea4e2a185c45632832e904e00fb9ce9 [file] [log] [blame]
Doyoung Lee7102a812019-02-10 20:41:00 -08001---
2# Copyright 2018-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 "onos.fullname" . }}
20 namespace: {{ .Values.namespace }}
21 labels:
22 app: {{ template "onos.name" . }}
23 chart: {{ template "onos.chart" . }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
26{{- if .Values.xos_service_label }}
27 xos_service: {{ .Values.xos_service_label }}
28{{- end }}
29spec:
30 replicas: {{ .Values.replicaCount }}
31 selector:
32 matchLabels:
33 app: {{ template "onos.name" . }}
34 release: {{ .Release.Name }}
35 template:
36 metadata:
37 labels:
38 app: {{ template "onos.name" . }}
39 release: {{ .Release.Name }}
40{{- if .Values.xos_service_label }}
41 xos_service: {{ .Values.xos_service_label }}
42{{- end }}
43 spec:
44 serviceAccount: {{ .Values.serviceAccountName }}
45 serviceAccountName: {{ .Values.serviceAccountName }}
46 containers:
47 - name: {{ .Chart.Name }}
48 image: "{{ .Values.global.registry }}{{ .Values.images.onos.repository }}:{{ tpl .Values.images.onos.tag . }}"
49 imagePullPolicy: {{ .Values.images.onos.pullPolicy }}
Wei-Yu Chen07390f82019-02-12 16:46:54 -080050 command: ["./root/files/onos-1.7.0.cemturker/bin/onos-service", "server", "debug"]
Doyoung Lee7102a812019-02-10 20:41:00 -080051 env:
52{{ toYaml .Values.onos_env | indent 12 }}
53 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 - name: debugger
65 containerPort: {{ .Values.services.debugger.port }}
Pingping Linccf0f942019-02-13 10:10:35 -080066 - name: port22
67 containerPort: {{ .Values.services.port22.port }}
68 - name: port9876
69 containerPort: {{ .Values.services.port9876.port }}
70 - name: port4010
71 containerPort: {{ .Values.services.port4010.port }}
Doyoung Lee7102a812019-02-10 20:41:00 -080072 resources:
73{{ toYaml .Values.resources | indent 12 }}
74 volumeMounts:
75 - name: node-key
76 mountPath: /root/vtn
77 readOnly: true
78 - name: onos-logs-cfg
79 mountPath: /root/onos/apache-karaf-3.0.8/etc/org.ops4j.pax.logging.cfg
80 subPath: org.ops4j.pax.logging.cfg
81 - name: onos-logs
82 mountPath: /root/onos/apache-karaf-3.0.8/data/log
83{{- if .Values.log_agent.enabled }}
84 - name: {{ .Chart.Name }}-log-agent
85 image: "{{ .Values.global.registry }}{{ .Values.images.log_agent.repository }}:{{ .Values.images.log_agent.tag }}"
86 imagePullPolicy: {{ .Values.images.log_agent.pullPolicy }}
87 args: [ "-c", "/conf/filebeat.yml", "-e" ]
88 env:
89 - name: POD_NAMESPACE
90 valueFrom:
91 fieldRef:
92 fieldPath: metadata.namespace
93 - name: NODE_NAME
94 valueFrom:
95 fieldRef:
96 fieldPath: spec.nodeName
97 volumeMounts:
98 - name: onos-logs
99 mountPath: /onos_logs
Woojoong Kim1f1199e2019-09-05 11:41:30 -0700100 - name: progran-log-agent-configmap-volume
Doyoung Lee7102a812019-02-10 20:41:00 -0800101 mountPath: /conf
102{{- end }}
103 volumes:
104 - name: node-key
105 secret:
106 secretName: node-key
107 defaultMode: 256
108 optional: true
109 - name: onos-logs-cfg
110 configMap:
Wei-Yu Chen2d2b3162019-02-12 14:38:35 -0800111 name: onos-progran
Doyoung Lee7102a812019-02-10 20:41:00 -0800112 items:
113 - key: logCfg
114 path: org.ops4j.pax.logging.cfg
115 - name: onos-logs
116 emptyDir: {}
117{{- if .Values.log_agent.enabled }}
Woojoong Kim1f1199e2019-09-05 11:41:30 -0700118 - name: progran-log-agent-configmap-volume
Doyoung Lee7102a812019-02-10 20:41:00 -0800119 configMap:
Woojoong Kim1f1199e2019-09-05 11:41:30 -0700120 name: progran-log-agent-configmap
Doyoung Lee7102a812019-02-10 20:41:00 -0800121 items:
122 - key: config
123 path: filebeat.yml
124{{- end }}
125{{- with .Values.nodeSelector }}
126 nodeSelector:
127{{ toYaml . | indent 8 }}
128 {{- end }}
129 {{- with .Values.affinity }}
130 affinity:
131{{ toYaml . | indent 8 }}
132 {{- end }}
133 {{- with .Values.tolerations }}
134 tolerations:
135{{ toYaml . | indent 8 }}
136 {{- end }}
137{{- if .Values.log_agent.enabled }}
Woojoong Kim1f1199e2019-09-05 11:41:30 -0700138{{- include "onos.progran-log-agent-configmap" . }}
Doyoung Lee7102a812019-02-10 20:41:00 -0800139{{- end }}
140