Doyoung Lee | 7102a81 | 2019-02-10 20:41:00 -0800 | [diff] [blame] | 1 | --- |
| 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 | |
Matteo Scandolo | 5628d4b | 2021-01-11 11:46:12 -0800 | [diff] [blame] | 16 | apiVersion: apps/v1 |
Doyoung Lee | 7102a81 | 2019-02-10 20:41:00 -0800 | [diff] [blame] | 17 | kind: Deployment |
| 18 | metadata: |
| 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 }} |
| 29 | spec: |
| 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 Chen | 07390f8 | 2019-02-12 16:46:54 -0800 | [diff] [blame] | 50 | command: ["./root/files/onos-1.7.0.cemturker/bin/onos-service", "server", "debug"] |
Doyoung Lee | 7102a81 | 2019-02-10 20:41:00 -0800 | [diff] [blame] | 51 | 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 Lin | ccf0f94 | 2019-02-13 10:10:35 -0800 | [diff] [blame] | 66 | - 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 Lee | 7102a81 | 2019-02-10 20:41:00 -0800 | [diff] [blame] | 72 | 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 Kim | 1f1199e | 2019-09-05 11:41:30 -0700 | [diff] [blame] | 100 | - name: progran-log-agent-configmap-volume |
Doyoung Lee | 7102a81 | 2019-02-10 20:41:00 -0800 | [diff] [blame] | 101 | 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 Chen | 2d2b316 | 2019-02-12 14:38:35 -0800 | [diff] [blame] | 111 | name: onos-progran |
Doyoung Lee | 7102a81 | 2019-02-10 20:41:00 -0800 | [diff] [blame] | 112 | items: |
| 113 | - key: logCfg |
| 114 | path: org.ops4j.pax.logging.cfg |
| 115 | - name: onos-logs |
| 116 | emptyDir: {} |
| 117 | {{- if .Values.log_agent.enabled }} |
Woojoong Kim | 1f1199e | 2019-09-05 11:41:30 -0700 | [diff] [blame] | 118 | - name: progran-log-agent-configmap-volume |
Doyoung Lee | 7102a81 | 2019-02-10 20:41:00 -0800 | [diff] [blame] | 119 | configMap: |
Woojoong Kim | 1f1199e | 2019-09-05 11:41:30 -0700 | [diff] [blame] | 120 | name: progran-log-agent-configmap |
Doyoung Lee | 7102a81 | 2019-02-10 20:41:00 -0800 | [diff] [blame] | 121 | 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 Kim | 1f1199e | 2019-09-05 11:41:30 -0700 | [diff] [blame] | 138 | {{- include "onos.progran-log-agent-configmap" . }} |
Doyoung Lee | 7102a81 | 2019-02-10 20:41:00 -0800 | [diff] [blame] | 139 | {{- end }} |
| 140 | |