[CORD-2978] Using multistructlog in xossh
Change-Id: I04351b89b75d72e75df7e0c049cf9bb8fe9e2f6b
diff --git a/xos-tools/xossh/templates/configmap.yaml b/xos-tools/xossh/templates/configmap.yaml
new file mode 100644
index 0000000..2d98f49
--- /dev/null
+++ b/xos-tools/xossh/templates/configmap.yaml
@@ -0,0 +1,23 @@
+---
+
+# Copyright 2018-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: xossh
+data:
+ xosshConfig: |
+{{ toYaml .Values.xosshConfig | indent 4 }}
diff --git a/xos-tools/xossh/templates/deployment.yaml b/xos-tools/xossh/templates/deployment.yaml
index 635e408..242e302 100644
--- a/xos-tools/xossh/templates/deployment.yaml
+++ b/xos-tools/xossh/templates/deployment.yaml
@@ -39,11 +39,11 @@
- name: {{ .Chart.Name }}
args:
- "-u"
- - "{{ .Values.serviceConfig.accessor.username }}"
+ - "{{ .Values.xosshConfig.accessor.username }}"
- "-p"
- - "{{ .Values.serviceConfig.accessor.password }}"
+ - "{{ .Values.xosshConfig.accessor.password }}"
- "-S"
- - "{{ .Values.serviceConfig.accessor.endpoint }}"
+ - "{{ .Values.xosshConfig.accessor.endpoint }}"
stdin: true
tty: true
image: "{{ .Values.pull_docker_registry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}"
@@ -54,6 +54,9 @@
- name: certchain-volume
mountPath: /usr/local/share/ca-certificates/local_certs.crt
subPath: config/ca_cert_chain.pem
+ - name: xossh-config
+ mountPath: /opt/xos/config.yml
+ subPath: config.yml
volumes:
- name: certchain-volume
configMap:
@@ -61,6 +64,12 @@
items:
- key: chain
path: config/ca_cert_chain.pem
+ - name: xossh-config
+ configMap:
+ name: xossh
+ items:
+ - key: xosshConfig
+ path: config.yml
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
diff --git a/xos-tools/xossh/values.yaml b/xos-tools/xossh/values.yaml
index 18e7226..9fcdf22 100644
--- a/xos-tools/xossh/values.yaml
+++ b/xos-tools/xossh/values.yaml
@@ -27,7 +27,7 @@
image:
repository: xosproject/xos-client
- tag: master
+ tag: candidate
pullPolicy: IfNotPresent
resources: {}
@@ -38,8 +38,25 @@
affinity: {}
-serviceConfig:
+xosshConfig:
+ name: xossh
accessor:
username: admin@opencord.org
password: letmein
endpoint: xos-core:50051
+ 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