Skip to content

Conversation

@yxxhero
Copy link
Collaborator

@yxxhero yxxhero commented Feb 11, 2026

Summary

Fixes #894

For Helm v4, --dry-run=server should be used by default to get the correct .Capabilities.APIVersions.Has behavior. Without this, conditions like {{ if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PrometheusRule" }} are incorrectly evaluated by helm-diff when using Helm v4.0.0.

Changes

  • Modified cmd/helm.go to use --dry-run=server by default for Helm v4 when the user hasn't explicitly set --dry-run=client
  • Avoided duplicate --dry-run arguments for Helm v4

Testing

All existing tests pass.

….APIVersions

For Helm v4, --dry-run=server should be used by default to get the correct
.Capabilities.APIVersions.Has behavior. This is only applied when the user
hasn't explicitly set --dry-run=client.

Fixes #894

Signed-off-by: yxxhero <aiopsclub@163.com>
Signed-off-by: yxxhero <aiopsclub@163.com>
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.

.Capabilities.APIVersions.Has incorrectly filled when using helm v4.0.0

1 participant