[CORD-2909] Flatten and parameterize charts
Change-Id: I695c1df063b0f6f6ccf280254d54cc701292348f
diff --git a/xos-profiles/rcord-lite/templates/_helpers.tpl b/xos-profiles/rcord-lite/templates/_helpers.tpl
index 0d74e8b..7d070a9 100644
--- a/xos-profiles/rcord-lite/templates/_helpers.tpl
+++ b/xos-profiles/rcord-lite/templates/_helpers.tpl
@@ -45,3 +45,20 @@
{{- define "rcord-lite.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
+
+{{/*
+The R-CORD synchronizer loads R-CORD-specific models into the core
+*/}}
+
+{{- define "rcord.serviceConfig" -}}
+name: rcord
+accessor:
+ username: {{ .Values.xosAdminUser | quote }}
+ password: {{ .Values.xosAdminPassword | quote }}
+ endpoint: xos-core:50051
+dependency_graph: "/opt/xos/synchronizers/rcord/model-deps"
+sys_dir: "/opt/xos/synchronizers/rcord/sys"
+models_dir: "/opt/xos/synchronizers/rcord/models"
+model_policies_dir: "/opt/xos/synchronizers/rcord/model_policies"
+{{- end -}}
+
diff --git a/xos-profiles/rcord-lite/templates/rcord-models-configmap.yaml b/xos-profiles/rcord-lite/templates/rcord-models-configmap.yaml
index e32b876..ffaf1d6 100644
--- a/xos-profiles/rcord-lite/templates/rcord-models-configmap.yaml
+++ b/xos-profiles/rcord-lite/templates/rcord-models-configmap.yaml
@@ -1,5 +1,4 @@
---
-
# Copyright 2018-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,4 +19,4 @@
name: rcord-lite-config
data:
serviceConfig: |
-{{ toYaml .Values.serviceConfig | indent 4 }}
+{{ include "rcord.serviceConfig" . | indent 4 }}
diff --git a/xos-profiles/rcord-lite/templates/rcord-models-deployment.yaml b/xos-profiles/rcord-lite/templates/rcord-models-deployment.yaml
index 71a4ad0..ed01549 100644
--- a/xos-profiles/rcord-lite/templates/rcord-models-deployment.yaml
+++ b/xos-profiles/rcord-lite/templates/rcord-models-deployment.yaml
@@ -1,5 +1,4 @@
---
-
# Copyright 2018-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,14 +38,15 @@
spec:
containers:
- name: {{ .Chart.Name }}-rcord
- image: "{{ .Values.pull_docker_registry }}{{ .Values.image.rcordSynchronizer.repository }}:{{ .Values.image.rcordSynchronizer.tag }}"
- imagePullPolicy: {{ .Values.image.rcordSynchronizer.pullPolicy }}
+ image: {{ .Values.rcord_synchronizerImage | quote }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
volumeMounts:
- name: rcord-lite-config
mountPath: /opt/xos/synchronizers/rcord/rcord_config.yaml
subPath: rcord_config.yaml
- - name: cert-chain-secret
- mountPath: /usr/local/share/ca-certificates
+ - name: certchain-volume
+ mountPath: /usr/local/share/ca-certificates/local_certs.crt
+ subPath: config/ca_cert_chain.pem
volumes:
- name: rcord-lite-config
configMap:
@@ -54,6 +54,9 @@
items:
- key: serviceConfig
path: rcord_config.yaml
- - name: cert-chain-secret
- secret:
- secretName: cert-chain-secret
+ - name: certchain-volume
+ configMap:
+ name: ca-certificates
+ items:
+ - key: chain
+ path: config/ca_cert_chain.pem
diff --git a/xos-profiles/rcord-lite/templates/tosca-deployment.yaml b/xos-profiles/rcord-lite/templates/tosca-deployment.yaml
index f9bf00c..c5a0f71 100644
--- a/xos-profiles/rcord-lite/templates/tosca-deployment.yaml
+++ b/xos-profiles/rcord-lite/templates/tosca-deployment.yaml
@@ -39,8 +39,8 @@
spec:
containers:
- name: {{ .Chart.Name }}-tosca-loader
- image: "{{ .Values.pull_docker_registry }}{{ .Values.image.toscaLoader.repository }}:{{ .Values.image.toscaLoader.tag }}"
- imagePullPolicy: {{ .Values.image.toscaLoader.pullPolicy }}
+ image: {{ .Values.httpieImage | quote }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
command: ["/bin/sh"]
args:
- "-c"