Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 1 | --- |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 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 | |
| 16 | apiVersion: apps/v1beta2 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: {{ template "onos.fullname" . }} |
| 20 | labels: |
| 21 | app: {{ template "onos.name" . }} |
| 22 | chart: {{ template "onos.chart" . }} |
| 23 | release: {{ .Release.Name }} |
| 24 | heritage: {{ .Release.Service }} |
Scott Baker | 900343a | 2018-08-09 17:03:16 -0700 | [diff] [blame] | 25 | {{- if .Values.xos_service_label }} |
| 26 | xos_service: {{ .Values.xos_service_label }} |
| 27 | {{- end }} |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 28 | spec: |
| 29 | replicas: {{ .Values.replicaCount }} |
| 30 | selector: |
| 31 | matchLabels: |
| 32 | app: {{ template "onos.name" . }} |
| 33 | release: {{ .Release.Name }} |
| 34 | template: |
| 35 | metadata: |
| 36 | labels: |
| 37 | app: {{ template "onos.name" . }} |
| 38 | release: {{ .Release.Name }} |
Scott Baker | 900343a | 2018-08-09 17:03:16 -0700 | [diff] [blame] | 39 | {{- if .Values.xos_service_label }} |
| 40 | xos_service: {{ .Values.xos_service_label }} |
| 41 | {{- end }} |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 42 | spec: |
Gopinath Taget | fff8934 | 2018-04-16 12:12:17 -0700 | [diff] [blame] | 43 | serviceAccount: {{ .Values.serviceAccountName }} |
| 44 | serviceAccountName: {{ .Values.serviceAccountName }} |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 45 | containers: |
| 46 | - name: {{ .Chart.Name }} |
Zack Williams | 2749ae5 | 2018-09-28 09:43:43 -0700 | [diff] [blame] | 47 | image: "{{ .Values.global.registry }}{{ .Values.images.onos.repository }}:{{ tpl .Values.images.onos.tag . }}" |
| 48 | imagePullPolicy: {{ .Values.images.onos.pullPolicy }} |
Matteo Scandolo | c859a7b | 2018-09-10 10:13:45 -0700 | [diff] [blame] | 49 | command: ["./bin/onos-service", "server", "debug"] |
Gopinath Taget | fff8934 | 2018-04-16 12:12:17 -0700 | [diff] [blame] | 50 | env: |
| 51 | {{ toYaml .Values.onos_env | indent 12 }} |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 52 | resources: |
| 53 | {{ toYaml .Values.resources | indent 12 }} |
Andy Bavier | 67a6e7f | 2018-05-30 12:17:45 -0700 | [diff] [blame] | 54 | volumeMounts: |
| 55 | - name: node-key |
| 56 | mountPath: /root/vtn |
| 57 | readOnly: true |
Daniele Moro | 0904738 | 2020-01-31 16:10:57 -0800 | [diff] [blame^] | 58 | {{- if .Values.kafka_logging.enabled }} |
Zack Williams | 7a506d2 | 2018-09-24 17:00:13 -0700 | [diff] [blame] | 59 | - name: onos-logs-cfg |
Daniele Moro | 0904738 | 2020-01-31 16:10:57 -0800 | [diff] [blame^] | 60 | mountPath: /root/onos/apache-karaf-4.2.8/etc/org.ops4j.pax.logging.cfg |
Zack Williams | 7a506d2 | 2018-09-24 17:00:13 -0700 | [diff] [blame] | 61 | subPath: org.ops4j.pax.logging.cfg |
Zack Williams | 7a506d2 | 2018-09-24 17:00:13 -0700 | [diff] [blame] | 62 | {{- end }} |
Andy Bavier | 67a6e7f | 2018-05-30 12:17:45 -0700 | [diff] [blame] | 63 | volumes: |
| 64 | - name: node-key |
| 65 | secret: |
| 66 | secretName: node-key |
| 67 | defaultMode: 256 |
| 68 | optional: true |
Daniele Moro | 0904738 | 2020-01-31 16:10:57 -0800 | [diff] [blame^] | 69 | {{- if .Values.kafka_logging.enabled }} |
Matteo Scandolo | 55ff150 | 2018-09-06 15:15:01 -0700 | [diff] [blame] | 70 | - name: onos-logs-cfg |
| 71 | configMap: |
Hyunsun Moon | 90c6050 | 2019-10-19 14:46:41 -0600 | [diff] [blame] | 72 | name: {{ template "onos.fullname" . }}-onos |
Matteo Scandolo | 55ff150 | 2018-09-06 15:15:01 -0700 | [diff] [blame] | 73 | items: |
| 74 | - key: logCfg |
| 75 | path: org.ops4j.pax.logging.cfg |
Daniele Moro | 0904738 | 2020-01-31 16:10:57 -0800 | [diff] [blame^] | 76 | {{- end}} |
Zack Williams | 7a506d2 | 2018-09-24 17:00:13 -0700 | [diff] [blame] | 77 | - name: onos-logs |
| 78 | emptyDir: {} |
Zack Williams | 7a506d2 | 2018-09-24 17:00:13 -0700 | [diff] [blame] | 79 | {{- with .Values.nodeSelector }} |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 80 | nodeSelector: |
| 81 | {{ toYaml . | indent 8 }} |
| 82 | {{- end }} |
| 83 | {{- with .Values.affinity }} |
| 84 | affinity: |
| 85 | {{ toYaml . | indent 8 }} |
| 86 | {{- end }} |
| 87 | {{- with .Values.tolerations }} |
| 88 | tolerations: |
| 89 | {{ toYaml . | indent 8 }} |
| 90 | {{- end }} |