The --api-versions flag was undocumented in the template command's
help text. This adds usage documentation and examples showing both
comma-separated and multiple flag usage patterns.
Fixes#13198
Signed-off-by: majiayu000 <1835304752@qq.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: majiayu000 <1835304752@qq.com>
Tests were failing for cli-utils watcher because upstream k8s made
changes that impacted cli-utils. In k8s WatchListClient is now
enabled by default. Fake clients used for testing don't know this
semantic. cli-utils leverages reflection in k8s to handle this.
The Helm tests didn't handle this well.
The tests are updated to use PrependReactor and PrependWatchReactor
in the same way that cli-utils does for testing. This works without
wrapping the client.
Signed-off-by: Matt Farina <matt.farina@suse.com>
The negation pattern logic in Ignore() was broken in two ways:
1. Inverted logic: when a file did NOT match a negation pattern, the
function incorrectly returned true (ignore the file)
2. Early termination: the function returned immediately on the first
matching rule, preventing later negation rules from overriding
earlier exclusion rules
This caused critical files like Chart.yaml to be incorrectly ignored
when any negation pattern existed in .helmignore, breaking helm lint,
helm template, and helm install with 'Chart.yaml file is missing'.
The fix rewrites Ignore() to follow proper gitignore semantics:
- Process all rules in order, tracking the ignore state
- The last matching rule wins
- Negation patterns set ignored=false when they match
- Regular patterns set ignored=true when they match
Example .helmignore that now works correctly:
*.md
!README.md
Before: Chart.yaml was incorrectly ignored
After: Only .md files (except README.md) are ignored
Signed-off-by: Mats Willemsen <mats.willemsen@ah.nl>
add missing coverage for the positive case where cluster-scoped resources (like ClusterRole or Namespace) should work correctly
Signed-off-by: Mohsen Mottaghi <mohsenmottaghi@outlook.com>
Adding some tests for multi namespace deployment, simulate restrcited rbac access and mixed namespace scope and cluster scope resources
Signed-off-by: Mohsen Mottaghi <mohsenmottaghi@outlook.com>
In GoLang, using the == operator to check for a certain error will not
unwrap the error chain, and therefore may hide the problem.
Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
When running `helm upgrade --install` on a non-existent release, the
--server-side flag was not being passed to the install action. This
caused the install to always use server-side apply (the default),
ignoring --server-side=false.
Copy ServerSideApply and ForceConflicts from the upgrade client to the
install client when falling back to install.
Fixes#31627
Signed-off-by: Evans Mungai <mbuevans@gmail.com>