Skip to content

feat: enhance Kubernetes support config to collect cluster data#736

Open
katara-Jayprakash wants to merge 8 commits into
uyuni-project:mainfrom
katara-Jayprakash:mgradm-support-config
Open

feat: enhance Kubernetes support config to collect cluster data#736
katara-Jayprakash wants to merge 8 commits into
uyuni-project:mainfrom
katara-Jayprakash:mgradm-support-config

Conversation

@katara-Jayprakash
Copy link
Copy Markdown

@katara-Jayprakash katara-Jayprakash commented Mar 6, 2026

What does this PR change?

the main objective of this pr is to extends the mgradm support config to collect Kubernetes cluster information when the server runs on Kubernetes.

add description

Codespace

Check if you already have a running container clicking on Running CodeSpace

Create CodeSpace About billing for Github Codespaces CodeSpace Billing Summary CodeSpace Limit

Test coverage

  • No tests: add explanation

  • No tests: already covered

  • Unit tests were added

  • DONE

Links

Issue(s): #126

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Before you merge

Check How to branch and merge properly!

Signed-off-by: katara-Jayprakash <katarajayprakash@icloud.com>
Signed-off-by: katara-Jayprakash <katarajayprakash@icloud.com>
Signed-off-by: katara-Jayprakash <katarajayprakash@icloud.com>
Signed-off-by: katara-Jayprakash <katarajayprakash@icloud.com>
@katara-Jayprakash katara-Jayprakash changed the title Mgradm support config feat: enhance Kubernetes support config to collect cluster data Mar 6, 2026
)

// RunSupportConfigOnKubernetesHost will run supportconfig command on kubernetes machine.
func RunSupportConfigOnKubernetesHost(dir string, namespace string, filter string) ([]string, error) {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't my code but responsible for blocking my pr! should i refactored/fix it sir @cbosdo ?

Copy link
Copy Markdown
Author

@katara-Jayprakash katara-Jayprakash Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok i refactor it and to achieve the complexity reduction, i try to introduce the golang inline if-else method but this leads me to removed the else blocks containing warning logs and seems like it work!

Signed-off-by: katara-Jayprakash <katarajayprakash@icloud.com>
Signed-off-by: katara-Jayprakash <katarajayprakash@icloud.com>
Signed-off-by: katara-Jayprakash <katarajayprakash@icloud.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

@cbosdo cbosdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure how this should look like ATM with the Kubernetes move out of uyuni-tools. We probably want to get inspiration from https://github.com/rancherlabs/support-tools/blob/master/collection/rancher/v2.x/logs-collector/rancher2_logs_collector.sh. In any case, mgradm is not a good idea for Kubernetes as it is meant to run on a cluster node… and this won't be possible.

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants