Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 1 | {{- /* |
| 2 | Copyright 2017-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 | |
| 17 | {{- define "xos-core.config" }} |
| 18 | name: xos-core |
| 19 | xos_dir: /opt/xos |
| 20 | database: |
| 21 | name: {{ .Values.xosDBName | quote }} |
| 22 | username: {{ .Values.xosDBUser | quote }} |
| 23 | password: {{ .Values.xosDBPassword | quote }} |
| 24 | logging: |
| 25 | version: 1 |
| 26 | handlers: |
| 27 | console: |
| 28 | class: logging.StreamHandler |
| 29 | file: |
| 30 | class: logging.handlers.RotatingFileHandler |
| 31 | filename: /var/log/xos.log |
| 32 | maxBytes: 10485760 |
| 33 | backupCount: 5 |
Zack Williams | 1125598 | 2018-08-27 14:22:55 -0700 | [diff] [blame] | 34 | kafka: |
Zack Williams | 7659cc9 | 2018-11-01 07:51:12 -0700 | [diff] [blame] | 35 | class: kafkaloghandler.KafkaLogHandler |
Zack Williams | 1125598 | 2018-08-27 14:22:55 -0700 | [diff] [blame] | 36 | bootstrap_servers: |
| 37 | - "cord-kafka:9092" |
| 38 | topic: xos.log.core |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 39 | loggers: |
Zack Williams | 7659cc9 | 2018-11-01 07:51:12 -0700 | [diff] [blame] | 40 | '': |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 41 | handlers: |
| 42 | - console |
| 43 | - file |
Zack Williams | 1125598 | 2018-08-27 14:22:55 -0700 | [diff] [blame] | 44 | - kafka |
Zack Williams | 8999882 | 2018-11-19 14:54:13 -0700 | [diff] [blame] | 45 | level: {{ .Values.loglevel }} |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 46 | {{- end }} |
| 47 | |
| 48 | {{- define "xos-core.initial_data" }} |
| 49 | - model: core.Site |
| 50 | fields: |
| 51 | name: {{ .Values.cordSiteName | quote }} |
| 52 | abbreviated_name: {{ .Values.cordSiteName | quote }} |
| 53 | login_base: {{ .Values.cordSiteName | quote }} |
| 54 | site_url: "http://opencord.org/" |
| 55 | hosts_nodes: true |
| 56 | |
| 57 | - model: core.User |
| 58 | fields: |
| 59 | email: {{ .Values.xosAdminUser | quote }} |
| 60 | password: {{ .Values.xosAdminPassword | quote }} |
| 61 | firstname: {{ .Values.xosAdminFirstname | quote }} |
| 62 | lastname: {{ .Values.xosAdminLastname | quote }} |
| 63 | is_admin: true |
| 64 | relations: |
| 65 | site: |
| 66 | fields: |
| 67 | name: {{ .Values.cordSiteName | quote }} |
| 68 | model: core.Site |
| 69 | {{- end }} |
| 70 | |
| 71 | {{- define "xos-core.ca_cert_chain" }} |
| 72 | {{ .Values.ca_cert_chain | b64dec }} |
| 73 | {{- end }} |
| 74 | |