Andy Bavier | c3912a7 | 2018-03-09 14:40:50 -0700 | [diff] [blame] | 1 | --- |
Andy Bavier | c3912a7 | 2018-03-09 14:40:50 -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 "exampleservice.fullname" . }} |
| 20 | labels: |
| 21 | app: {{ template "exampleservice.name" . }} |
| 22 | chart: {{ template "exampleservice.chart" . }} |
| 23 | release: {{ .Release.Name }} |
| 24 | heritage: {{ .Release.Service }} |
| 25 | spec: |
| 26 | replicas: {{ .Values.replicaCount }} |
| 27 | selector: |
| 28 | matchLabels: |
| 29 | app: {{ template "exampleservice.name" . }} |
| 30 | release: {{ .Release.Name }} |
| 31 | template: |
| 32 | metadata: |
| 33 | labels: |
| 34 | app: {{ template "exampleservice.name" . }} |
| 35 | release: {{ .Release.Name }} |
| 36 | spec: |
| 37 | containers: |
| 38 | - name: {{ .Chart.Name }} |
Zack Williams | d9d6b35 | 2018-10-05 07:53:30 -0700 | [diff] [blame] | 39 | image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }} |
| 40 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
Andy Bavier | c3912a7 | 2018-03-09 14:40:50 -0700 | [diff] [blame] | 41 | resources: |
| 42 | {{ toYaml .Values.resources | indent 12 }} |
| 43 | volumeMounts: |
| 44 | - name: exampleservice-config |
Scott Baker | 6a4fd49 | 2018-06-19 08:12:42 -0700 | [diff] [blame] | 45 | mountPath: /opt/xos/synchronizers/exampleservice/mounted_config.yaml |
| 46 | subPath: mounted_config.yaml |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 47 | - name: certchain-volume |
| 48 | mountPath: /usr/local/share/ca-certificates/local_certs.crt |
| 49 | subPath: config/ca_cert_chain.pem |
Scott Baker | 6a4fd49 | 2018-06-19 08:12:42 -0700 | [diff] [blame] | 50 | - name: exampleservice-keys |
| 51 | mountPath: /opt/xos/services/exampleservice/keys |
| 52 | readOnly: true |
| 53 | - name: node-key |
| 54 | mountPath: /opt/cord_profile |
| 55 | readOnly: true |
Andy Bavier | c3912a7 | 2018-03-09 14:40:50 -0700 | [diff] [blame] | 56 | volumes: |
| 57 | - name: exampleservice-config |
| 58 | configMap: |
| 59 | name: exampleservice |
| 60 | items: |
Andy Bavier | d211e0e | 2018-03-16 08:38:39 -0700 | [diff] [blame] | 61 | - key: serviceConfig |
Scott Baker | 6a4fd49 | 2018-06-19 08:12:42 -0700 | [diff] [blame] | 62 | path: mounted_config.yaml |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 63 | - name: certchain-volume |
| 64 | configMap: |
| 65 | name: ca-certificates |
| 66 | items: |
| 67 | - key: chain |
| 68 | path: config/ca_cert_chain.pem |
Scott Baker | 6a4fd49 | 2018-06-19 08:12:42 -0700 | [diff] [blame] | 69 | - name: exampleservice-keys |
| 70 | secret: |
| 71 | secretName: exampleservice-keys |
| 72 | - name: node-key |
| 73 | secret: |
| 74 | secretName: node-key |
| 75 | defaultMode: 256 |
| 76 | optional: true |
Andy Bavier | c3912a7 | 2018-03-09 14:40:50 -0700 | [diff] [blame] | 77 | {{- with .Values.nodeSelector }} |
| 78 | nodeSelector: |
| 79 | {{ toYaml . | indent 8 }} |
| 80 | {{- end }} |
| 81 | {{- with .Values.affinity }} |
| 82 | affinity: |
| 83 | {{ toYaml . | indent 8 }} |
| 84 | {{- end }} |
| 85 | {{- with .Values.tolerations }} |
| 86 | tolerations: |
| 87 | {{ toYaml . | indent 8 }} |
| 88 | {{- end }} |