Repository navigation
Conversation
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #31031
What this PR does / why we need it:
This PR introduces ANSI color support to Helm CLI output to improve human readability and align Helm with modern CLI UX practices. The implementation addresses the feature request in #31031 for colorful CLI output, which is now standard in many popular DevOps tools (e.g., kubectl, docker, git, terraform).
Key Features:
term.IsTerminal()--no-colorflag orNO_COLORenvironment variableImplementation Details:
pkg/cli/output/color.go) with functions for colorizing status, headers, and namespaces--no-colorflag support in the CLI environment settingshelm status,helm list,helm install,helm upgrade,helm get all, andhelm testfatih/colorlibrary for ANSI color supportBenefits:
Special notes for your reviewer:
The current implementation provides a foundation for color support with the following color scheme:
The implementation respects terminal capabilities through TTY detection and honors the
NO_COLORenvironment variable standard. All color output can be disabled using the--no-colorflag or by setting theNO_COLORenvironment variable, ensuring full backward compatibility for automation and scripting use cases.Note: While issue #31031 mentioned opt-in colors (disabled by default), this implementation enables colors by default for interactive terminals, following the pattern of modern CLI tools. The opt-out mechanism via
--no-colorflag provides the necessary control for users who prefer no colors.If applicable:
docs neededlabel should be applied if so)