diff --git a/sysdump/constants.go b/sysdump/constants.go index 7cce3d0103..3c68edaf98 100644 --- a/sysdump/constants.go +++ b/sysdump/constants.go @@ -21,6 +21,7 @@ const ( ciliumConfigMapName = defaults.ConfigMapName ciliumEtcdSecretsSecretName = "cilium-etcd-secrets" ciliumOperatorDeploymentName = defaults.OperatorDeploymentName + ciliumOperatorContainerName = defaults.OperatorContainerName ciliumSPIREServerStatefulSetName = defaults.SPIREServerStatefulSetName ciliumSPIREAgentDaemonSetName = defaults.SPIREAgentDaemonSetName ciliumSPIREServerConfigMapName = defaults.SPIREServerConfigMapName diff --git a/sysdump/sysdump.go b/sysdump/sysdump.go index 5c427052e4..a37f0a09a2 100644 --- a/sysdump/sysdump.go +++ b/sysdump/sysdump.go @@ -1127,6 +1127,23 @@ func (c *Collector) Run() error { return nil }, }, + { + CreatesSubtasks: true, + Description: "Collecting gops stats from Cilium-operator pods", + Quick: true, + Task: func(ctx context.Context) error { + p, err := c.Client.ListPods(ctx, c.Options.CiliumNamespace, metav1.ListOptions{ + LabelSelector: c.Options.CiliumOperatorLabelSelector, + }) + if err != nil { + return fmt.Errorf("failed to get cilium-operator pods: %w", err) + } + if err := c.SubmitGopsSubtasks(FilterPods(p, c.NodeList), ciliumOperatorContainerName); err != nil { + return fmt.Errorf("failed to collect Cilium gops: %w", err) + } + return nil + }, + }, { CreatesSubtasks: true, Description: "Collecting gops stats from Hubble pods",