Skip to content

Commit

Permalink
Add in cluster logs collector back, but with a different configmap na…
Browse files Browse the repository at this point in the history
…me (#182)

* Add in-cluster k0s logs collector

* Limit host log collection to 2 days

* update logs collector spec name
  • Loading branch information
danj-replicated authored May 24, 2024
1 parent 33aecbd commit dc49536
Showing 1 changed file with 75 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: embedded-cluster-logs-collector
labels:
troubleshoot.sh/kind: support-bundle
{{- with (include "embedded-cluster-operator.labels" $ | fromYaml) }}
{{- toYaml . | nindent 4 }}
{{- end }}
data:
support-bundle-spec: |
apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
name: embedded-cluster-logs-collector
labels:
troubleshoot.sh/kind: support-bundle
spec:
collectors:
- runDaemonSet:
name: "k0scontroller"
namespace: default
podSpec:
containers:
- image: {{ .Values.utilsImage }}
imagePullPolicy: Always
args: ["chroot","/host","journalctl","-u","k0scontroller","--no-pager","--since","2 days ago"]
name: debugger
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /host
name: host-root
dnsPolicy: ClusterFirst
enableServiceLinks: true
hostIPC: true
hostNetwork: true
hostPID: true
securityContext: {}
tolerations:
- operator: Exists
volumes:
- hostPath:
path: /
type: ""
name: host-root
- runDaemonSet:
name: "k0sworker"
namespace: default
podSpec:
containers:
- image: {{ .Values.utilsImage }}
imagePullPolicy: Always
args: ["chroot","/host","journalctl","-u","k0scontroller","--no-pager","--since","2 days ago"]
name: debugger
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /host
name: host-root
dnsPolicy: ClusterFirst
enableServiceLinks: true
hostIPC: true
hostNetwork: true
hostPID: true
securityContext: {}
tolerations:
- operator: Exists
volumes:
- hostPath:
path: /
type: ""
name: host-root

0 comments on commit dc49536

Please sign in to comment.