Mods to get xos-core Helm chart working
Change-Id: Ia39b224413f20124fb54dadc419d286e3f28c5d1
diff --git a/xos-core/templates/chameleon-deployment.yaml b/xos-core/templates/chameleon-deployment.yaml
index 536b4a2..e86853f 100644
--- a/xos-core/templates/chameleon-deployment.yaml
+++ b/xos-core/templates/chameleon-deployment.yaml
@@ -14,7 +14,7 @@
containers:
- name: xos-chameleon
image: {{ .Values.pull_docker_registry }}{{ .Values.images.xos_chameleon.repository }}:{{ .Values.images.xos_chameleon.tag }}
- command: ["python chameleon/chameleon/main.py -R 9101 -G xos-core:50055 --swagger-url /apidocs -r"]
+ command: [ "python", "chameleon/chameleon/main.py", "-R", "9101", "-G", "xos-core:50055", "--swagger-url", "/apidocs", "-r" ]
ports:
- containerPort: 9101
port: 9101
diff --git a/xos-core/templates/core-configmap.yaml b/xos-core/templates/core-configmap.yaml
index 886a0f5..bf07f4e 100644
--- a/xos-core/templates/core-configmap.yaml
+++ b/xos-core/templates/core-configmap.yaml
@@ -2,7 +2,29 @@
kind: ConfigMap
metadata:
name: xos-core
- # labels:
- # {{- include "xos-core.release_labels" . | indent 4 }}
+ labels:
+ {{- include "xos-core.release_labels" . | indent 4 }}
data:
- config: {{ .Values.configs.core_config }}
+ 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
diff --git a/xos-core/templates/core-deployment.yaml b/xos-core/templates/core-deployment.yaml
index b9e2c16..b22639e 100644
--- a/xos-core/templates/core-deployment.yaml
+++ b/xos-core/templates/core-deployment.yaml
@@ -42,10 +42,10 @@
secret:
secretName: coreapi-cert-secret
items:
- - key: core_api_cert.pem
- path: coreapisecret/core_api_cert.pem
- - key: core_api_key.pem
- path: coreapisecret/core_api_key.pem
+ - key: tls.crt
+ path: core_api_cert.pem
+ - key: tls.key
+ path: core_api_key.pem
- name: xos-core-config
configMap:
name: xos-core
diff --git a/xos-core/templates/coreapi-cert-secret.yaml b/xos-core/templates/coreapi-cert-secret.yaml
index a79c84e..84712e5 100644
--- a/xos-core/templates/coreapi-cert-secret.yaml
+++ b/xos-core/templates/coreapi-cert-secret.yaml
@@ -5,5 +5,5 @@
namespace: default
type: kubernetes.io/tls
data:
- core_api_cert.pem: {{ .Values.secrets.core_api_cert }}
- core_api_key.pem: {{ .Values.secrets.core_api_key }}
+ tls.crt: {{ .Values.secrets.core_api_cert }}
+ tls.key: {{ .Values.secrets.core_api_key }}
diff --git a/xos-core/templates/gateway-configmap.yaml b/xos-core/templates/gateway-configmap.yaml
index d29b4b3..c526d53 100644
--- a/xos-core/templates/gateway-configmap.yaml
+++ b/xos-core/templates/gateway-configmap.yaml
@@ -2,5 +2,17 @@
kind: ConfigMap
metadata:
name: xos-gateway
+ labels:
+ {{- include "xos-core.release_labels" . | indent 4 }}
data:
- config: {{ .Values.configs.gateway_config }}
+ config: |
+ default:
+ xos:
+ host: xost
+ port: 9000
+ redis:
+ host: redis
+ port: 6379
+ gateway:
+ port: 3000
+
diff --git a/xos-core/templates/gui-app-configmap.yaml b/xos-core/templates/gui-app-configmap.yaml
index d387b77..a6b6213 100644
--- a/xos-core/templates/gui-app-configmap.yaml
+++ b/xos-core/templates/gui-app-configmap.yaml
@@ -2,5 +2,12 @@
kind: ConfigMap
metadata:
name: xos-app-config
+ labels:
+ {{- include "xos-core.release_labels" . | indent 4 }}
data:
- config: {{ .Values.configs.gui_app_config }}
+ config: |
+ angular.module('app')
+ .constant('AppConfig', {
+ apiEndpoint: '/xosapi/v1',
+ websocketClient: '/'
+ });
diff --git a/xos-core/templates/gui-deployment.yaml b/xos-core/templates/gui-deployment.yaml
index 57f4351..7a7d8f2 100644
--- a/xos-core/templates/gui-deployment.yaml
+++ b/xos-core/templates/gui-deployment.yaml
@@ -41,4 +41,4 @@
- key: config
path: app/app.config.js
- name: extensions-volume
- emptyDir: {}
+ emptyDir: {}
diff --git a/xos-core/templates/gui-style-configmap.yaml b/xos-core/templates/gui-style-configmap.yaml
index 88a1413..ac11d3a 100644
--- a/xos-core/templates/gui-style-configmap.yaml
+++ b/xos-core/templates/gui-style-configmap.yaml
@@ -2,5 +2,29 @@
kind: ConfigMap
metadata:
name: xos-style-config
+ labels:
+ {{- include "xos-core.release_labels" . | indent 4 }}
data:
- config: {{ .Values.configs.gui_style_config }}
+ 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',
+ },
+ ]
+ });
diff --git a/xos-core/templates/guiextensionstore-deployment.yaml b/xos-core/templates/guiextensionstore-deployment.yaml
deleted file mode 100644
index bc33061..0000000
--- a/xos-core/templates/guiextensionstore-deployment.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
- name: xos-guiextensionstore
- labels:
- app: xos-guiextensionstore
-spec:
- replicas: 1
- template:
- metadata:
- labels:
- app: xos-guiextensionstore
- spec:
- containers:
- - name: xos-guiextensionstore
- image: {{ .Values.pull_docker_registry }}{{ .Values.images.node.repository }}:{{ .Values.images.node.tag }}
- command: ["/bin/true"]
- volumeMounts:
- - name: extensions-volume
- mountPath: /var/www/dist/extensions
- volumes:
- - name: extensions-volume
- emptyDir: {}
diff --git a/xos-core/templates/initial-data-configmap.yaml b/xos-core/templates/initial-data-configmap.yaml
index e7b61c6..05d5283 100644
--- a/xos-core/templates/initial-data-configmap.yaml
+++ b/xos-core/templates/initial-data-configmap.yaml
@@ -2,5 +2,27 @@
kind: ConfigMap
metadata:
name: xos-initial-data
+ labels:
+ {{- include "xos-core.release_labels" . | indent 4 }}
data:
- config: {{ .Values.configs.initial_data_config }}
+ 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
diff --git a/xos-core/templates/tosca-configmap.yaml b/xos-core/templates/tosca-configmap.yaml
index f20b859..2f85692 100644
--- a/xos-core/templates/tosca-configmap.yaml
+++ b/xos-core/templates/tosca-configmap.yaml
@@ -2,5 +2,26 @@
kind: ConfigMap
metadata:
name: xos-tosca
+ labels:
+ {{- include "xos-core.release_labels" . | indent 4 }}
data:
- config: {{ .Values.configs.tosca_config }}
+ 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
diff --git a/xos-core/templates/ws-deployment.yaml b/xos-core/templates/ws-deployment.yaml
index 8b3a41d..fd49a1a 100644
--- a/xos-core/templates/ws-deployment.yaml
+++ b/xos-core/templates/ws-deployment.yaml
@@ -14,7 +14,7 @@
containers:
- name: xos-ws
image: {{ .Values.pull_docker_registry }}{{ .Values.images.xos_ws.repository }}:{{ .Values.images.xos_ws.tag }}
- command: ["npm start -- --config gateway-config.yml"]
+ command: ["npm", "start", "--", "--config", "gateway-config.yml"]
ports:
- containerPort: 3000
port: 3000