Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 1 | --- |
| 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 | |
| 17 | apiVersion: apps/v1beta2 |
| 18 | kind: Deployment |
| 19 | metadata: |
| 20 | name: {{ template "onos.fullname" . }} |
Gopinath Taget | fff8934 | 2018-04-16 12:12:17 -0700 | [diff] [blame] | 21 | namespace: {{ .Values.namespace }} |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 22 | labels: |
| 23 | app: {{ template "onos.name" . }} |
| 24 | chart: {{ template "onos.chart" . }} |
| 25 | release: {{ .Release.Name }} |
| 26 | heritage: {{ .Release.Service }} |
Scott Baker | 900343a | 2018-08-09 17:03:16 -0700 | [diff] [blame] | 27 | {{- if .Values.xos_service_label }} |
| 28 | xos_service: {{ .Values.xos_service_label }} |
| 29 | {{- end }} |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 30 | spec: |
| 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 Baker | 900343a | 2018-08-09 17:03:16 -0700 | [diff] [blame] | 41 | {{- if .Values.xos_service_label }} |
| 42 | xos_service: {{ .Values.xos_service_label }} |
| 43 | {{- end }} |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 44 | spec: |
Gopinath Taget | fff8934 | 2018-04-16 12:12:17 -0700 | [diff] [blame] | 45 | serviceAccount: {{ .Values.serviceAccountName }} |
| 46 | serviceAccountName: {{ .Values.serviceAccountName }} |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 47 | containers: |
| 48 | - name: {{ .Chart.Name }} |
Matteo Scandolo | f6c28df | 2018-05-08 11:44:05 -0700 | [diff] [blame] | 49 | image: {{ .Values.onosImage }} |
| 50 | imagePullPolicy: {{ .Values.imagePullPolicy }} |
Matteo Scandolo | c859a7b | 2018-09-10 10:13:45 -0700 | [diff] [blame^] | 51 | command: ["./bin/onos-service", "server", "debug"] |
Gopinath Taget | fff8934 | 2018-04-16 12:12:17 -0700 | [diff] [blame] | 52 | env: |
| 53 | {{ toYaml .Values.onos_env | indent 12 }} |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 54 | ports: |
| 55 | - name: ovsdb |
| 56 | containerPort: {{ .Values.services.ovsdb.port }} |
| 57 | - name: openflow |
| 58 | containerPort: {{ .Values.services.openflow.port }} |
| 59 | - name: ssh |
| 60 | containerPort: {{ .Values.services.ssh.port }} |
| 61 | - name: ui |
| 62 | containerPort: {{ .Values.services.ui.port }} |
| 63 | - name: cluster |
| 64 | containerPort: {{ .Values.services.cluster.port }} |
Matteo Scandolo | c859a7b | 2018-09-10 10:13:45 -0700 | [diff] [blame^] | 65 | - name: debugger |
| 66 | containerPort: {{ .Values.services.debugger.port }} |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 67 | resources: |
| 68 | {{ toYaml .Values.resources | indent 12 }} |
Andy Bavier | 67a6e7f | 2018-05-30 12:17:45 -0700 | [diff] [blame] | 69 | volumeMounts: |
Matteo Scandolo | 55ff150 | 2018-09-06 15:15:01 -0700 | [diff] [blame] | 70 | - name: onos-logs-cfg |
| 71 | mountPath: /root/onos/apache-karaf-3.0.8/etc/org.ops4j.pax.logging.cfg |
| 72 | subPath: org.ops4j.pax.logging.cfg |
Andy Bavier | 67a6e7f | 2018-05-30 12:17:45 -0700 | [diff] [blame] | 73 | - name: node-key |
| 74 | mountPath: /root/vtn |
| 75 | readOnly: true |
| 76 | volumes: |
| 77 | - name: node-key |
| 78 | secret: |
| 79 | secretName: node-key |
| 80 | defaultMode: 256 |
| 81 | optional: true |
Matteo Scandolo | 55ff150 | 2018-09-06 15:15:01 -0700 | [diff] [blame] | 82 | - name: onos-logs-cfg |
| 83 | configMap: |
| 84 | name: onos |
| 85 | items: |
| 86 | - key: logCfg |
| 87 | path: org.ops4j.pax.logging.cfg |
Andy Bavier | f15d53a | 2018-03-07 17:34:30 -0700 | [diff] [blame] | 88 | {{- with .Values.nodeSelector }} |
| 89 | nodeSelector: |
| 90 | {{ toYaml . | indent 8 }} |
| 91 | {{- end }} |
| 92 | {{- with .Values.affinity }} |
| 93 | affinity: |
| 94 | {{ toYaml . | indent 8 }} |
| 95 | {{- end }} |
| 96 | {{- with .Values.tolerations }} |
| 97 | tolerations: |
| 98 | {{ toYaml . | indent 8 }} |
| 99 | {{- end }} |