From 1d173f25223074aeddff850d217a91a65396529c Mon Sep 17 00:00:00 2001 From: hedge-sparrow Date: Fri, 29 Nov 2024 15:42:10 +0000 Subject: [PATCH 1/5] add kubernetes system namespaces to generated support bundles --- pkg/supportbundle/spec.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/supportbundle/spec.go b/pkg/supportbundle/spec.go index 17a2782343..d59474951b 100644 --- a/pkg/supportbundle/spec.go +++ b/pkg/supportbundle/spec.go @@ -99,6 +99,11 @@ func CreateRenderedSpec(app *apptypes.App, sequence int64, kotsKinds *kotsutil.K namespacesToCollect = append(namespacesToCollect, util.PodNamespace) namespacesToCollect = append(namespacesToCollect, kotsKinds.KotsApplication.Spec.AdditionalNamespaces...) } + } else { + // re-enable collection of k8s system namespaces + namespacesToCollect = append(namespacesToCollect, "kube-system") + namespacesToCollect = append(namespacesToCollect, "kube-node-lease") + namespacesToCollect = append(namespacesToCollect, "kube-public") } // split the default kotsadm support bundle into multiple support bundles From 5c572a12aa0de5421c489caa91b320ed200ad8d2 Mon Sep 17 00:00:00 2001 From: hedge-sparrow Date: Fri, 29 Nov 2024 16:53:15 +0000 Subject: [PATCH 2/5] move namespaces to kurlspec --- pkg/supportbundle/staticspecs/kurlspec.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/supportbundle/staticspecs/kurlspec.yaml b/pkg/supportbundle/staticspecs/kurlspec.yaml index f944d31129..fd5e07c3ec 100644 --- a/pkg/supportbundle/staticspecs/kurlspec.yaml +++ b/pkg/supportbundle/staticspecs/kurlspec.yaml @@ -5,6 +5,12 @@ metadata: spec: uri: "https://raw.githubusercontent.com/replicatedhq/kots/main/pkg/supportbundle/staticspecs/kurlspec.yaml" collectors: + - clusterResources: + namespaces: + - kube-system + - kube-node-lease + - kube-public + - projectcontour - http: collectorName: replicated.app-health-check get: From a762704e670c07f40e7c55525ee88a317803df9a Mon Sep 17 00:00:00 2001 From: hedge-sparrow Date: Fri, 29 Nov 2024 16:54:15 +0000 Subject: [PATCH 3/5] Revert "add kubernetes system namespaces to generated support bundles" This reverts commit 1d173f25223074aeddff850d217a91a65396529c. --- pkg/supportbundle/spec.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/supportbundle/spec.go b/pkg/supportbundle/spec.go index d59474951b..17a2782343 100644 --- a/pkg/supportbundle/spec.go +++ b/pkg/supportbundle/spec.go @@ -99,11 +99,6 @@ func CreateRenderedSpec(app *apptypes.App, sequence int64, kotsKinds *kotsutil.K namespacesToCollect = append(namespacesToCollect, util.PodNamespace) namespacesToCollect = append(namespacesToCollect, kotsKinds.KotsApplication.Spec.AdditionalNamespaces...) } - } else { - // re-enable collection of k8s system namespaces - namespacesToCollect = append(namespacesToCollect, "kube-system") - namespacesToCollect = append(namespacesToCollect, "kube-node-lease") - namespacesToCollect = append(namespacesToCollect, "kube-public") } // split the default kotsadm support bundle into multiple support bundles From 32331ca3c642f4b2f96ecd8f64234bcd1143e56f Mon Sep 17 00:00:00 2001 From: hedge-sparrow Date: Fri, 29 Nov 2024 17:06:34 +0000 Subject: [PATCH 4/5] more namespaces --- pkg/supportbundle/staticspecs/kurlspec.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/supportbundle/staticspecs/kurlspec.yaml b/pkg/supportbundle/staticspecs/kurlspec.yaml index fd5e07c3ec..b4b00aa3c1 100644 --- a/pkg/supportbundle/staticspecs/kurlspec.yaml +++ b/pkg/supportbundle/staticspecs/kurlspec.yaml @@ -11,6 +11,9 @@ spec: - kube-node-lease - kube-public - projectcontour + - kurl + - minio + - monitoring - http: collectorName: replicated.app-health-check get: @@ -47,6 +50,7 @@ spec: name: kots/kurl/control-plane selector: - tier=control-plane + namespace: kube-system - logs: collectorName: kurl-proxy-kotsadm name: kots/admin_console From 535340556a8a91a14bcd985c8c87b00d8bc37d04 Mon Sep 17 00:00:00 2001 From: Ash <159829404+hedge-sparrow@users.noreply.github.com> Date: Tue, 3 Dec 2024 23:47:48 +0000 Subject: [PATCH 5/5] Update pkg/supportbundle/staticspecs/kurlspec.yaml Co-authored-by: Andrew Lavery --- pkg/supportbundle/staticspecs/kurlspec.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/supportbundle/staticspecs/kurlspec.yaml b/pkg/supportbundle/staticspecs/kurlspec.yaml index b4b00aa3c1..f17c4f7ced 100644 --- a/pkg/supportbundle/staticspecs/kurlspec.yaml +++ b/pkg/supportbundle/staticspecs/kurlspec.yaml @@ -10,10 +10,15 @@ spec: - kube-system - kube-node-lease - kube-public + - kube-flannel - projectcontour - kurl - minio - monitoring + - openebs + - rook-ceph + - longhorn + - velero - http: collectorName: replicated.app-health-check get: