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 |
| 34 | loggers: |
| 35 | 'multistructlog': |
| 36 | handlers: |
| 37 | - console |
| 38 | - file |
| 39 | level: DEBUG |
| 40 | {{- end }} |
| 41 | |
| 42 | {{- define "xos-core.initial_data" }} |
| 43 | - model: core.Site |
| 44 | fields: |
| 45 | name: {{ .Values.cordSiteName | quote }} |
| 46 | abbreviated_name: {{ .Values.cordSiteName | quote }} |
| 47 | login_base: {{ .Values.cordSiteName | quote }} |
| 48 | site_url: "http://opencord.org/" |
| 49 | hosts_nodes: true |
| 50 | |
| 51 | - model: core.User |
| 52 | fields: |
| 53 | email: {{ .Values.xosAdminUser | quote }} |
| 54 | password: {{ .Values.xosAdminPassword | quote }} |
| 55 | firstname: {{ .Values.xosAdminFirstname | quote }} |
| 56 | lastname: {{ .Values.xosAdminLastname | quote }} |
| 57 | is_admin: true |
| 58 | relations: |
| 59 | site: |
| 60 | fields: |
| 61 | name: {{ .Values.cordSiteName | quote }} |
| 62 | model: core.Site |
| 63 | {{- end }} |
| 64 | |
| 65 | {{- define "xos-core.ca_cert_chain" }} |
| 66 | {{ .Values.ca_cert_chain | b64dec }} |
| 67 | {{- end }} |
| 68 | |