feat: delete /var/log/pods/ (#2556)

Signed-off-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
liujian 2025-05-07 17:41:00 +08:00 committed by GitHub
parent 9502ac5391
commit 1dbc59cf2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,13 @@ name: GolangCILint
on:
pull_request:
types: [opened, edited, synchronize, reopened]
paths:
- 'pkg/**'
- 'cmd/**'
- 'version/**'
- 'go.mod'
- 'go.sum'
- 'api/**'
# Remove all permissions from GITHUB_TOKEN except metadata.
permissions: {}

View File

@ -14,6 +14,8 @@
command: |
rm -rf /usr/local/bin/kubeadm && rm -rf /usr/local/bin/kubelet && rm -rf /usr/local/bin/kubectl
rm -rf /var/lib/kubelet/
# If /var/log/pods/ is not cleaned up, static pods may accumulate unexpected restarts due to lingering log files interfering with their lifecycle.
rm -rf /var/log/pods/
rm -rf /etc/kubernetes/
rm -rf .kube/config