Skip to content

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

Merged
aayushchouhan09 merged 1 commit intonoobaa:masterfrom
aayushchouhan09:diagnostics
Sep 18, 2024
Merged

Added a CLI sub-command in noobaa diagnostics to print proxy details#1440
aayushchouhan09 merged 1 commit intonoobaa:masterfrom
aayushchouhan09:diagnostics

Conversation

@aayushchouhan09
Copy link
Member

@aayushchouhan09 aayushchouhan09 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.

@aayushchouhan09 aayushchouhan09 marked this pull request as ready for review September 16, 2024 15:25
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

Signed-off-by: Aayush Chouhan <achouhan@redhat.com>
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