Andy Bavier | d807026 | 2018-03-12 10:12:43 -0700 | [diff] [blame] | 1 | --- |
Andy Bavier | d807026 | 2018-03-12 10:12:43 -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 | |
Matteo Scandolo | 5628d4b | 2021-01-11 11:46:12 -0800 | [diff] [blame] | 16 | apiVersion: apps/v1 |
Andy Bavier | d807026 | 2018-03-12 10:12:43 -0700 | [diff] [blame] | 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: {{ template "onos-service.fullname" . }} |
| 20 | labels: |
| 21 | app: {{ template "onos-service.name" . }} |
| 22 | chart: {{ template "onos-service.chart" . }} |
| 23 | release: {{ .Release.Name }} |
| 24 | heritage: {{ .Release.Service }} |
| 25 | spec: |
| 26 | replicas: {{ .Values.replicaCount }} |
| 27 | selector: |
| 28 | matchLabels: |
| 29 | app: {{ template "onos-service.name" . }} |
| 30 | release: {{ .Release.Name }} |
| 31 | template: |
| 32 | metadata: |
| 33 | labels: |
| 34 | app: {{ template "onos-service.name" . }} |
| 35 | release: {{ .Release.Name }} |
| 36 | annotations: |
| 37 | checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} |
| 38 | spec: |
| 39 | containers: |
| 40 | - name: {{ .Chart.Name }} |
Zack Williams | d9d6b35 | 2018-10-05 07:53:30 -0700 | [diff] [blame] | 41 | image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }} |
| 42 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
Andy Bavier | d807026 | 2018-03-12 10:12:43 -0700 | [diff] [blame] | 43 | resources: |
| 44 | {{ toYaml .Values.resources | indent 12 }} |
| 45 | volumeMounts: |
| 46 | - name: onos-service-config |
Matteo Scandolo | d66ed51 | 2018-06-12 11:15:03 -0700 | [diff] [blame] | 47 | mountPath: /opt/xos/synchronizers/onos/mounted_config.yaml |
| 48 | subPath: mounted_config.yaml |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 49 | - name: certchain-volume |
| 50 | mountPath: /usr/local/share/ca-certificates/local_certs.crt |
| 51 | subPath: config/ca_cert_chain.pem |
Andy Bavier | d807026 | 2018-03-12 10:12:43 -0700 | [diff] [blame] | 52 | volumes: |
| 53 | - name: onos-service-config |
| 54 | configMap: |
| 55 | name: onos-service |
| 56 | items: |
| 57 | - key: serviceConfig |
Matteo Scandolo | d66ed51 | 2018-06-12 11:15:03 -0700 | [diff] [blame] | 58 | path: mounted_config.yaml |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 59 | - name: certchain-volume |
| 60 | configMap: |
| 61 | name: ca-certificates |
| 62 | items: |
| 63 | - key: chain |
| 64 | path: config/ca_cert_chain.pem |
Andy Bavier | d807026 | 2018-03-12 10:12:43 -0700 | [diff] [blame] | 65 | {{- with .Values.nodeSelector }} |
| 66 | nodeSelector: |
| 67 | {{ toYaml . | indent 8 }} |
| 68 | {{- end }} |
| 69 | {{- with .Values.affinity }} |
| 70 | affinity: |
| 71 | {{ toYaml . | indent 8 }} |
| 72 | {{- end }} |
| 73 | {{- with .Values.tolerations }} |
| 74 | tolerations: |
| 75 | {{ toYaml . | indent 8 }} |
| 76 | {{- end }} |