Moved the configmap data to values.yaml to make it configurable
Change-Id: Idfef9a959cb29a67a64a0d42a177be8a8c06a74b
diff --git a/xos-core/templates/core-configmap.yaml b/xos-core/templates/core-configmap.yaml
index 299d678..20fd143 100644
--- a/xos-core/templates/core-configmap.yaml
+++ b/xos-core/templates/core-configmap.yaml
@@ -20,25 +20,4 @@
{{- include "xos-core.release_labels" . | indent 4 }}
data:
config: |
- name: xos-core
- database:
- name: xos
- username: postgres
- password: password
- logging:
- version: 1
- handlers:
- console:
- class: logging.StreamHandler
- file:
- class: logging.handlers.RotatingFileHandler
- filename: /var/log/xos.log
- maxBytes: 10485760
- backupCount: 5
- loggers:
- '':
- handlers:
- - console
- - file
- level: DEBUG
- xos_dir: /opt/xos
+{{ toYaml .Values.configs.core_config | indent 4 }}
diff --git a/xos-core/templates/db-configmap.yaml b/xos-core/templates/db-configmap.yaml
index ef0fa9b..5c7f616 100644
--- a/xos-core/templates/db-configmap.yaml
+++ b/xos-core/templates/db-configmap.yaml
@@ -19,4 +19,4 @@
labels:
{{- include "xos-core.release_labels" . | indent 4 }}
data:
- service_5432_name: 'xos-db'
+ service_5432_name: {{ .Values.configs.db_config }}
diff --git a/xos-core/templates/gateway-configmap.yaml b/xos-core/templates/gateway-configmap.yaml
index 98b6b54..7f0828a 100644
--- a/xos-core/templates/gateway-configmap.yaml
+++ b/xos-core/templates/gateway-configmap.yaml
@@ -20,13 +20,5 @@
{{- include "xos-core.release_labels" . | indent 4 }}
data:
config: |
- default:
- xos:
- host: xost
- port: 9000
- redis:
- host: redis
- port: 6379
- gateway:
- port: 3000
+{{ toYaml .Values.configs.gateway_config | indent 4 }}
diff --git a/xos-core/templates/gui-app-configmap.yaml b/xos-core/templates/gui-app-configmap.yaml
index d49738b..e5b1041 100644
--- a/xos-core/templates/gui-app-configmap.yaml
+++ b/xos-core/templates/gui-app-configmap.yaml
@@ -19,9 +19,4 @@
labels:
{{- include "xos-core.release_labels" . | indent 4 }}
data:
- config: |
- angular.module('app')
- .constant('AppConfig', {
- apiEndpoint: '/xosapi/v1',
- websocketClient: '/'
- });
+ config: | {{ .Values.configs.gui_app | indent 4 }}
diff --git a/xos-core/templates/gui-style-configmap.yaml b/xos-core/templates/gui-style-configmap.yaml
index 8b05847..8b1564a 100644
--- a/xos-core/templates/gui-style-configmap.yaml
+++ b/xos-core/templates/gui-style-configmap.yaml
@@ -19,26 +19,4 @@
labels:
{{- include "xos-core.release_labels" . | indent 4 }}
data:
- config: |
- angular.module('app')
- .constant('StyleConfig', {
- projectName: 'R-CORD',
- favicon: 'cord-favicon.png',
- background: 'cord-bg.jpg',
- payoff: 'Your VNF orchestrator',
- logo: 'cord-logo.png',
- routes: [
- {
- label: 'Slices',
- state: 'xos.core.slice',
- },
- {
- label: 'Nodes',
- state: 'xos.core.node',
- },
- {
- label: 'Instances',
- state: 'xos.core.instance',
- },
- ]
- });
+ config: | {{ .Values.configs.gui_style | indent 4 }}
diff --git a/xos-core/templates/initial-data-configmap.yaml b/xos-core/templates/initial-data-configmap.yaml
index ab66f7a..602ee11 100644
--- a/xos-core/templates/initial-data-configmap.yaml
+++ b/xos-core/templates/initial-data-configmap.yaml
@@ -20,23 +20,4 @@
{{- include "xos-core.release_labels" . | indent 4 }}
data:
config: |
- - model: core.Site
- fields:
- name: "my_site"
- abbreviated_name: "my_site"
- login_base: "my_site"
- site_url: "http://opencord.org/"
- hosts_nodes: true
-
- - model: core.User
- fields:
- email: "admin@opencord.org"
- password: "letmein"
- firstname: "XOS"
- lastname: "User"
- is_admin: True
- relations:
- site:
- fields:
- name: "my_site"
- model: core.Site
+{{ toYaml .Values.configs.initial_data_config | indent 4 }}
diff --git a/xos-core/templates/tosca-configmap.yaml b/xos-core/templates/tosca-configmap.yaml
index 8f23e4f..54f2146 100644
--- a/xos-core/templates/tosca-configmap.yaml
+++ b/xos-core/templates/tosca-configmap.yaml
@@ -20,22 +20,4 @@
{{- include "xos-core.release_labels" . | indent 4 }}
data:
config: |
- name: xos-tosca
- gprc_endpoint: "xos-core"
- local_cert: /usr/local/share/ca-certificates/local_certs.crt
- logging:
- version: 1
- handlers:
- console:
- class: logging.StreamHandler
- file:
- class: logging.handlers.RotatingFileHandler
- filename: /var/log/xos.log
- maxBytes: 10485760
- backupCount: 5
- loggers:
- '':
- handlers:
- - console
- - file
- level: DEBUG
+{{ toYaml .Values.configs.tosca_config | indent 4 }}