Fix the logger not working (#1166)
This commit is contained in:
@@ -32,6 +32,14 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
svc: logger
|
svc: logger
|
||||||
spec:
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: init
|
||||||
|
image: busybox
|
||||||
|
command: ['mkdir', '-p', '/var/log/fission']
|
||||||
|
volumeMounts:
|
||||||
|
- name: container-log
|
||||||
|
mountPath: /var/log/
|
||||||
|
readOnly: false
|
||||||
containers:
|
containers:
|
||||||
- name: logger
|
- name: logger
|
||||||
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
|
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||||
@@ -78,7 +86,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: container-log
|
- name: container-log
|
||||||
mountPath: /var/log/
|
mountPath: /var/log/
|
||||||
readOnly: true
|
readOnly: false
|
||||||
- name: docker-log
|
- name: docker-log
|
||||||
mountPath: /var/lib/docker/containers
|
mountPath: /var/lib/docker/containers
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
|||||||
@@ -170,6 +170,14 @@ func Start() {
|
|||||||
}
|
}
|
||||||
defer zapLogger.Sync()
|
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)
|
go symlinkReaper(zapLogger)
|
||||||
_, kubernetesClient, _, err := crd.MakeFissionClient()
|
_, kubernetesClient, _, err := crd.MakeFissionClient()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user