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

Support helm diff with --dry-run=server #862

Open
Javex opened this issue Jan 19, 2025 · 1 comment
Open

Support helm diff with --dry-run=server #862

Javex opened this issue Jan 19, 2025 · 1 comment
Labels
type/proposal Proposal for a new feature, process or initiative

Comments

@Javex
Copy link

Javex commented Jan 19, 2025

SUMMARY

Add support for the helm diff upgrade --dry-run=server argument which produces better diffs as it can do a server lookup. Otherwise, it will produce diffs, particularly for secrets, that don't actually produce a change as no new values will be generates by the server.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

Module: helm
https://github.com/ansible-collections/kubernetes.core/blob/main/plugins/modules/helm.py#L632

ADDITIONAL INFORMATION

The proposal would be to add a new argument insecure_server_side_dry_run. The context for when this is a security issue is nuanced and depends on who controls the helm chart vs. who is running the helm chart. It's possible that this is less likely in the context of Ansible and the insecure prefix might not be necessary. I'm no expert on this issue though.

As a workaround, it is currently possible to use the HELM_DIFF_USE_INSECURE_SERVER_SIDE_DRY_RUN environment variable:

- name: Install Helm chart
  environment:
    HELM_DIFF_USE_INSECURE_SERVER_SIDE_DRY_RUN: "true"
  kubernetes.core.helm:
    name: test
    chart_ref: grafana/grafana
    chart_version: 8.8.4
    release_namespace: test
Javex added a commit to Javex/ansible-kubernetes that referenced this issue Jan 19, 2025
See ansible-collections/kubernetes.core#862
Currently, there's an issue with the Cilium helm chart's diff though:
cilium/cilium#37065
@gravesm gravesm added the type/proposal Proposal for a new feature, process or initiative label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/proposal Proposal for a new feature, process or initiative
Projects
None yet
Development

No branches or pull requests

3 participants