diff --git a/applications/wg-easy/charts/cert-manager/templates/_supportbundle.tpl b/applications/wg-easy/charts/cert-manager/templates/_supportbundle.tpl new file mode 100644 index 00000000..6e05ee0e --- /dev/null +++ b/applications/wg-easy/charts/cert-manager/templates/_supportbundle.tpl @@ -0,0 +1,12 @@ +{{- define "cert-manager.supportbundle" -}} +apiVersion: troubleshoot.sh/v1beta2 +kind: SupportBundle +metadata: + name: cert-manager-supportbundle +spec: + collectors: + - logs: + namespace: {{ .Release.Namespace }} + selector: + - app.kubernetes.io/instance=cert-manager +{{- end -}} diff --git a/applications/wg-easy/charts/cert-manager/templates/secret-supportbundle.yaml b/applications/wg-easy/charts/cert-manager/templates/secret-supportbundle.yaml new file mode 100644 index 00000000..50c3a085 --- /dev/null +++ b/applications/wg-easy/charts/cert-manager/templates/secret-supportbundle.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: cert-manager-supportbundle + labels: + troubleshoot.sh/kind: support-bundle +type: Opaque +stringData: + support-bundle-spec: | +{{ include "cert-manager.supportbundle" . | indent 4 }} diff --git a/applications/wg-easy/charts/traefik/templates/_supportbundle.tpl b/applications/wg-easy/charts/traefik/templates/_supportbundle.tpl new file mode 100644 index 00000000..c1298d22 --- /dev/null +++ b/applications/wg-easy/charts/traefik/templates/_supportbundle.tpl @@ -0,0 +1,12 @@ +{{- define "traefik.supportbundle" -}} +apiVersion: troubleshoot.sh/v1beta2 +kind: SupportBundle +metadata: + name: traefik-supportbundle +spec: + collectors: + - logs: + namespace: {{ .Release.Namespace }} + selector: + - app.kubernetes.io/name=traefik +{{- end -}} diff --git a/applications/wg-easy/charts/traefik/templates/secret-supportbundle.yaml b/applications/wg-easy/charts/traefik/templates/secret-supportbundle.yaml new file mode 100644 index 00000000..a9100208 --- /dev/null +++ b/applications/wg-easy/charts/traefik/templates/secret-supportbundle.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: traefik-supportbundle + labels: + troubleshoot.sh/kind: support-bundle +type: Opaque +stringData: + support-bundle-spec: | +{{ include "traefik.supportbundle" . | indent 4 }} diff --git a/applications/wg-easy/charts/wg-easy/templates/_supportbundle.tpl b/applications/wg-easy/charts/wg-easy/templates/_supportbundle.tpl new file mode 100644 index 00000000..404932e2 --- /dev/null +++ b/applications/wg-easy/charts/wg-easy/templates/_supportbundle.tpl @@ -0,0 +1,24 @@ +{{- define "wg-easy.supportbundle" -}} +apiVersion: troubleshoot.sh/v1beta2 +kind: SupportBundle +metadata: + name: wg-easy-supportbundle +spec: + collectors: + - logs: + namespace: {{ .Release.Namespace }} + selector: + - app.kubernetes.io/name=wg-easy + - sysctl: + image: debian:buster-slim + analyzers: + - sysctl: + checkName: IP forwarding enabled + outcomes: + - fail: + when: 'net.ipv4.ip_forward == 0' + message: "IP forwarding must be enabled. To enable it, edit /etc/sysctl.conf, add or uncomment the line 'net.ipv4.ip_forward=1', and run 'sudo sysctl -p'." + - pass: + when: 'net.ipv4.ip_forward == 1' + message: "IP forwarding is enabled." +{{- end -}} diff --git a/applications/wg-easy/charts/wg-easy/templates/secret-supportbundle.yaml b/applications/wg-easy/charts/wg-easy/templates/secret-supportbundle.yaml new file mode 100644 index 00000000..b8bbb739 --- /dev/null +++ b/applications/wg-easy/charts/wg-easy/templates/secret-supportbundle.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: wg-easy-supportbundle + labels: + troubleshoot.sh/kind: support-bundle +type: Opaque +stringData: + support-bundle-spec: | +{{ include "wg-easy.supportbundle" . | indent 4 }}