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

Added a CLI sub-command in noobaa diagnostics to print proxy details #1440

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

achouhan09
Copy link
Member

@achouhan09 achouhan09 commented Sep 12, 2024

Explain the changes

  1. The CLI command checks and logs the values of essential environment variables related to proxy configuration (HTTP_PROXY, HTTPS_PROXY, NO_PROXY). It performs the following actions:

    Checks: Verifies if these proxy environment variables are set and not empty.

This implementation currently focuses on proxy environment variables but is designed with future expansion in mind. Additional checks and diagnostics will be introduced in the future.

Screenshot from 2024-09-17 17-48-53

Issues: Fixed #xxx / Gap #xxx

  1. BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2302136

Testing Instructions:

  1. Try running noobaa cli command noobaa diagnostics report to check the proxy status.

Note: Use the command kubectl set env deployment/noobaa-operator -c noobaa-operator HTTP_PROXY=localhost:8080 to update the proxy vars.

@achouhan09 achouhan09 marked this pull request as ready for review September 16, 2024 15:25
@achouhan09 achouhan09 requested a review from shirady September 16, 2024 15:39
Copy link
Contributor

@shirady shirady left a comment

Choose a reason for hiding this comment

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

LGTM

func CmdReport() *cobra.Command {
cmd := &cobra.Command{
Use: "report",
Short: "Reports the proxy status",
Copy link
Contributor

Choose a reason for hiding this comment

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

The command will not only run a report of the proxy, but it will be extended to other issues as well.

Suggested change
Short: "Reports the proxy status",
Short: "Run reports of the status and setup",

Copy link
Member Author

Choose a reason for hiding this comment

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

updated, Thanks

pkg/diagnostics/report.go Show resolved Hide resolved
@achouhan09 achouhan09 merged commit 20c57d5 into noobaa:master Sep 18, 2024
14 checks passed
@achouhan09 achouhan09 deleted the diagnostics branch September 18, 2024 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants