[CORD-2909] Flatten and parameterize charts
Change-Id: I695c1df063b0f6f6ccf280254d54cc701292348f
diff --git a/xos-services/volt/templates/_helpers.tpl b/xos-services/volt/templates/_helpers.tpl
index 08e04cc..6b6791d 100644
--- a/xos-services/volt/templates/_helpers.tpl
+++ b/xos-services/volt/templates/_helpers.tpl
@@ -45,3 +45,37 @@
{{- define "volt.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
+
+{{- define "volt.serviceConfig" -}}
+name: volt
+accessor:
+ username: {{ .Values.xosAdminUser | quote }}
+ password: {{ .Values.xosAdminPassword | quote }}
+ endpoint: xos-core:50051
+required_models:
+ - VOLTService
+ - VOLTServiceInstance
+ - ServiceInstanceLink
+ - OLTDevice
+dependency_graph: "/opt/xos/synchronizers/volt/model-deps"
+model_policies_dir: "/opt/xos/synchronizers/volt/model_policies"
+models_dir: "/opt/xos/synchronizers/volt/models"
+steps_dir: "/opt/xos/synchronizers/volt/steps"
+pull_steps_dir: "/opt/xos/synchronizers/volt/pull_steps"
+logging:
+ version: 1
+ handlers:
+ console:
+ class: logging.StreamHandler
+ file:
+ class: logging.handlers.RotatingFileHandler
+ filename: /var/log/xos.log
+ maxBytes: 10485760
+ backupCount: 5
+ loggers:
+ 'multistructlog':
+ handlers:
+ - console
+ - file
+ level: DEBUG
+{{- end -}}
diff --git a/xos-services/volt/templates/configmap.yaml b/xos-services/volt/templates/configmap.yaml
index 0d039ee..37dbd8d 100644
--- a/xos-services/volt/templates/configmap.yaml
+++ b/xos-services/volt/templates/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: volt
data:
serviceConfig: |
-{{ toYaml .Values.serviceConfig | indent 4 }}
+{{ include "volt.serviceConfig" . | indent 4 }}
diff --git a/xos-services/volt/templates/deployment.yaml b/xos-services/volt/templates/deployment.yaml
index 9ae92fe..f285b6d 100644
--- a/xos-services/volt/templates/deployment.yaml
+++ b/xos-services/volt/templates/deployment.yaml
@@ -39,16 +39,17 @@
spec:
containers:
- name: {{ .Chart.Name }}
- image: "{{ .Values.pull_docker_registry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}"
- imagePullPolicy: {{ .Values.image.pullPolicy }}
+ image: {{ .Values.volt_synchronizerImage | quote }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
resources:
{{ toYaml .Values.resources | indent 12 }}
volumeMounts:
- name: volt-config
mountPath: /opt/xos/synchronizers/volt/volt_config.yaml
subPath: volt_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: volt-config
configMap:
@@ -56,9 +57,12 @@
items:
- key: serviceConfig
path: volt_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
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}