Skip to content

Commit

Permalink
Merge pull request #61 from replicatedhq/rrpolanco/collect-apiserver-…
Browse files Browse the repository at this point in the history
…logs

collect apiserver audit logs
  • Loading branch information
adamancini authored Apr 12, 2023
2 parents 660009c + 54355b9 commit 6291931
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions host/cluster-down.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,16 @@ spec:
echo "hostname = $(hostname)"
echo "/proc/sys/kernel/hostname = $(cat /proc/sys/kernel/hostname)"
echo "uname -n = $(uname -n)"
# Collect apiserver audit logs
# Note: apiserver logs are owned by root so for this collector
# to succeed it requires sudo privileges for the user
- copy:
collectorName: "apiserver-audit-logs"
path: /var/log/apiserver/k8s-audit*
# Collect kURL installer logs
- copy:
collectorName: "kurl-logs"
path: /var/log/kurl/*
hostAnalyzers:
- certificate:
collectorName: k8s-api-keypair
Expand Down
8 changes: 7 additions & 1 deletion in-cluster/default-kurl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ metadata:
name: default
spec:
collectors:
- copyFromHost:
collectorName: "copy apiserver audit logs"
image: alpine
hostPath: "/var/log/apiserver/"
name: "logs"
extractArchive: true
- copyFromHost:
collectorName: "copy kURL logs"
image: busybox:1
image: alpine
hostPath: "/var/log/kurl/"
name: "logs"
extractArchive: true
Expand Down

0 comments on commit 6291931

Please sign in to comment.