bugfix:TSG-18246:添加log-dir-hook容器以防止host上log目录在pod运行过程中被tmpfile.d清除掉
This commit is contained in:
@@ -140,6 +140,20 @@ spec:
|
||||
ports:
|
||||
- containerPort: 9010
|
||||
|
||||
- name: log-dir-hook
|
||||
image: "registry.gdnt-cloud.website/tsg-firewall:{{ .Chart.AppVersion }}"
|
||||
imagePullPolicy: Never
|
||||
command:
|
||||
- "bash"
|
||||
- "-ec"
|
||||
- |
|
||||
while true; do touch /opt/tsg/sapp/log/.log_dir_hook; sleep 600; done
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: firewall-log
|
||||
mountPath: /opt/tsg/sapp/log
|
||||
|
||||
initContainers:
|
||||
- name: firewall-init
|
||||
image: "registry.gdnt-cloud.website/tsg-init:{{ .Chart.AppVersion }}"
|
||||
|
||||
@@ -160,6 +160,22 @@ spec:
|
||||
subPath: "etc/profile.d/device_id.sh"
|
||||
{{ template "traffic-engine.mount.localtime" . }}
|
||||
|
||||
- name: log-dir-hook
|
||||
image: "registry.gdnt-cloud.website/tsg-proxy:{{ .Chart.AppVersion }}"
|
||||
imagePullPolicy: Never
|
||||
command:
|
||||
- "bash"
|
||||
- "-ec"
|
||||
- |
|
||||
while true; do touch /opt/tsg/tfe/log/.log_dir_hook; touch /opt/tsg/certstore/logs/.log_dir_hook; sleep 600; done
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: proxy-log
|
||||
mountPath: /opt/tsg/tfe/log
|
||||
- name: certstore-log
|
||||
mountPath: /opt/tsg/certstore/logs
|
||||
|
||||
initContainers:
|
||||
- name: proxy-init
|
||||
image: "registry.gdnt-cloud.website/tsg-init:{{ .Chart.AppVersion }}"
|
||||
|
||||
@@ -150,6 +150,22 @@ spec:
|
||||
subPath: "etc/profile.d/device_id.sh"
|
||||
{{ template "traffic-engine.mount.localtime" . }}
|
||||
|
||||
- name: log-dir-hook
|
||||
image: "registry.gdnt-cloud.website/tsg-sce:{{ .Chart.AppVersion }}"
|
||||
imagePullPolicy: Never
|
||||
command:
|
||||
- "bash"
|
||||
- "-ec"
|
||||
- |
|
||||
while true; do touch /opt/tsg/bfdd/log/.log_dir_hook; touch /opt/tsg/sce/log/.log_dir_hook; sleep 600; done
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: bfdd-log
|
||||
mountPath: /opt/tsg/bfdd/log
|
||||
- name: sce-log
|
||||
mountPath: /opt/tsg/sce/log
|
||||
|
||||
initContainers:
|
||||
- name: service-chaining-init
|
||||
image: "registry.gdnt-cloud.website/tsg-init:{{ .Chart.AppVersion }}"
|
||||
|
||||
@@ -123,6 +123,20 @@ spec:
|
||||
subPath: "etc/profile.d/device_id.sh"
|
||||
{{ template "traffic-engine.mount.localtime" . }}
|
||||
|
||||
- name: log-dir-hook
|
||||
image: "registry.gdnt-cloud.website/tsg-shaping:{{ .Chart.AppVersion }}"
|
||||
imagePullPolicy: Never
|
||||
command:
|
||||
- "bash"
|
||||
- "-ec"
|
||||
- |
|
||||
while true; do touch /opt/tsg/shaping/log/.log_dir_hook; sleep 600; done
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: shaping-log
|
||||
mountPath: /opt/tsg/shaping/log
|
||||
|
||||
initContainers:
|
||||
- name: shaping-init
|
||||
image: "registry.gdnt-cloud.website/tsg-init:{{ .Chart.AppVersion }}"
|
||||
|
||||
Reference in New Issue
Block a user