Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [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 | |
| 16 | apiVersion: apps/v1beta2 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: {{ template "internetemulator.fullname" . }} |
| 20 | labels: |
| 21 | app: {{ template "internetemulator.name" . }} |
| 22 | chart: {{ template "internetemulator.chart" . }} |
| 23 | release: {{ .Release.Name }} |
| 24 | heritage: {{ .Release.Service }} |
| 25 | spec: |
| 26 | replicas: {{ .Values.replicaCount }} |
| 27 | selector: |
| 28 | matchLabels: |
| 29 | app: {{ template "internetemulator.name" . }} |
| 30 | release: {{ .Release.Name }} |
| 31 | template: |
| 32 | metadata: |
| 33 | labels: |
| 34 | app: {{ template "internetemulator.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 | 1f58c2a | 2018-09-28 09:43:43 -0700 | [diff] [blame^] | 41 | image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }} |
| 42 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 43 | resources: |
| 44 | {{ toYaml .Values.resources | indent 12 }} |
| 45 | volumeMounts: |
| 46 | - name: internetemulator-config |
Matteo Scandolo | a174170 | 2018-06-12 14:23:45 -0700 | [diff] [blame] | 47 | mountPath: /opt/xos/synchronizers/internetemulator/mounted_config.yaml |
| 48 | subPath: mounted_config.yaml |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 49 | - name: certchain-volume |
| 50 | mountPath: /usr/local/share/ca-certificates/local_certs.crt |
| 51 | subPath: config/ca_cert_chain.pem |
| 52 | - name: internetemulator-keys |
| 53 | mountPath: /opt/xos/services/internetemulator/keys |
| 54 | readOnly: true |
Andy Bavier | 0fe2e7a | 2018-05-30 11:54:46 -0700 | [diff] [blame] | 55 | - name: node-key |
| 56 | mountPath: /opt/cord_profile |
| 57 | readOnly: true |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 58 | volumes: |
| 59 | - name: internetemulator-config |
| 60 | configMap: |
| 61 | name: internetemulator |
| 62 | items: |
| 63 | - key: serviceConfig |
Matteo Scandolo | a174170 | 2018-06-12 14:23:45 -0700 | [diff] [blame] | 64 | path: mounted_config.yaml |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 65 | - name: certchain-volume |
| 66 | configMap: |
| 67 | name: ca-certificates |
| 68 | items: |
| 69 | - key: chain |
| 70 | path: config/ca_cert_chain.pem |
| 71 | - name: internetemulator-keys |
| 72 | secret: |
| 73 | secretName: internetemulator-keys |
Andy Bavier | 0fe2e7a | 2018-05-30 11:54:46 -0700 | [diff] [blame] | 74 | - name: node-key |
| 75 | secret: |
| 76 | secretName: node-key |
| 77 | defaultMode: 256 |
| 78 | optional: true |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 79 | {{- with .Values.nodeSelector }} |
| 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 }} |