Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysdump: Gather gops from cilium-operator #2693

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sysdump/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions sysdump/sysdump.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down