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

Installed Helm diff plugin may break deploy #669

Closed
psmolkin opened this issue Jan 15, 2024 · 1 comment · Fixed by #670
Closed

Installed Helm diff plugin may break deploy #669

psmolkin opened this issue Jan 15, 2024 · 1 comment · Fixed by #670
Labels
topic/helm Issues relating to helm plugins type/bug Something isn't working

Comments

@psmolkin
Copy link
Contributor

SUMMARY

When you have the Helm Diff plugin installed, the kubernetes.core.helm module run the diff command before deploy. But, the command line generation logic works different and put generated yaml of a [release_]values dict to the first place before values_files, that means that these generated values become hidden.

This is quite similar to the #638 issue.
I'm going to raise a PR.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

kubernetes.core.helm

ANSIBLE VERSION
ansible [core 2.14.11]
COLLECTION VERSION
kubernetes.core 3.0.0
CONFIGURATION
CONFIG_FILE() = /etc/ansible/ansible.cfg
OS / ENVIRONMENT

doesn't matter

STEPS TO REPRODUCE
 kubernetes.core.helm:
    atomic: true
    name: "{{ helm_release_name }}"
    chart_ref: "{{ playbook_dir + '/../helm/my_app/' }}"
    namespace: "{{ namespace }}"
    wait: true
    state: present
    force: true
    values_files: "{{ values_files | select | list }}"
    release_values:
      region: "hidden_one"
  vars:
    values_files:
      - "{{ playbook_dir }}/../helm/my_app/values-commons.yaml"

where values-commons.yaml is:

region: default
EXPECTED RESULTS

The result region: value rendered to hidden_one

ACTUAL RESULTS

The result region value for helm diff upgrade will be default instead of hidden_one

@gravesm gravesm added type/bug Something isn't working topic/helm Issues relating to helm plugins labels Jan 17, 2024
@psmolkin
Copy link
Contributor Author

@gravesm
It seems the #670 is ready to review.

patchback bot pushed a commit that referenced this issue Mar 1, 2024
Align `helmdiff_check` behavior with the `deploy` function

SUMMARY
Align helmdiff_check behavior with the deploy function

Fixes #638
helmdiff_check respects set_values parameter
Fixes #669
helmdiff_check command line parameters sequence aligned to the deploy function

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
kubernetes.core.helm

Reviewed-by: Mike Graves <[email protected]>
(cherry picked from commit 7c4ec3b)
abikouo pushed a commit that referenced this issue Mar 1, 2024
Align `helmdiff_check` behavior with the `deploy` function

SUMMARY
Align helmdiff_check behavior with the deploy function

Fixes #638
helmdiff_check respects set_values parameter
Fixes #669
helmdiff_check command line parameters sequence aligned to the deploy function

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
kubernetes.core.helm

Reviewed-by: Mike Graves <[email protected]>
(cherry picked from commit 7c4ec3b)

Co-authored-by: psmolkin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/helm Issues relating to helm plugins type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants