Fix the logger not working (#1166)

This commit is contained in:
Chia-Chun Tai
2019-04-26 14:03:51 +05:30
committed by Vishal
parent 47c5cee459
commit 3cbb02465b
2 changed files with 17 additions and 1 deletions
+9 -1
View File
@@ -32,6 +32,14 @@ spec:
labels:
svc: logger
spec:
initContainers:
- name: init
image: busybox
command: ['mkdir', '-p', '/var/log/fission']
volumeMounts:
- name: container-log
mountPath: /var/log/
readOnly: false
containers:
- name: logger
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
@@ -78,7 +86,7 @@ spec:
volumeMounts:
- name: container-log
mountPath: /var/log/
readOnly: true
readOnly: false
- name: docker-log
mountPath: /var/lib/docker/containers
readOnly: true
+8
View File
@@ -170,6 +170,14 @@ func Start() {
}
defer zapLogger.Sync()
if _, err := os.Stat(fissionSymlinkPath); os.IsNotExist(err) {
zapLogger.Info("symlink path not exist, create it",
zap.String("fissionSymlinkPath", fissionSymlinkPath))
err = os.Mkdir(fissionSymlinkPath, 0755)
if err != nil {
zapLogger.Fatal("error creating fissionSymlinkPath", zap.Error(err))
}
}
go symlinkReaper(zapLogger)
_, kubernetesClient, _, err := crd.MakeFissionClient()
if err != nil {