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

Pulumi Helm Deployments: Allow Null Values in Configs #2220

Merged
merged 17 commits into from
Nov 8, 2022

Conversation

cdibble
Copy link
Contributor

@cdibble cdibble commented Oct 27, 2022

Proposed changes

I need to be able to pass ingress.tls=[] to the Apache Superset helm chart, which won't deploy unless that config is populated, even if it is with a null entry. At this time, null values like that are scrubbed out of helm configs in the mergeMaps function, so you can not pass a null value to your helm deployment.

This PR would add a boolean to allow null values through mergeMaps in helm_release.go and expose that option in the SDKs.

Related issues (optional)

Addresses #2089

@github-actions
Copy link

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@cdibble
Copy link
Contributor Author

cdibble commented Oct 27, 2022

@lblackstone I went ahead and opened this PR after merging it in my fork (cdibble#1). Please LMK if you need additional input from me :)

@lblackstone
Copy link
Member

/run-acceptance-tests

@pulumi-bot
Copy link
Contributor

Copy link
Member

@lblackstone lblackstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I think the code changes look good, and I've kicked off the CI tests to make sure that's passing. Just one minor update needed on the changelog, and I think this will be ready to merge.

CHANGELOG.md Outdated Show resolved Hide resolved
@github-actions
Copy link

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@github-actions
Copy link

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@cdibble
Copy link
Contributor Author

cdibble commented Oct 31, 2022

Thanks for the PR! I think the code changes look good, and I've kicked off the CI tests to make sure that's passing. Just one minor update needed on the changelog, and I think this will be ready to merge.

@lblackstone Just resolved that comment- thank you! Please feel free to ping me if you need anything else from me. Thanks for the quick review :)

@lblackstone
Copy link
Member

/run-acceptance-tests

@pulumi-bot
Copy link
Contributor

@lblackstone
Copy link
Member

@cdibble The CI tests caught an issue: https://github.com/pulumi/pulumi-kubernetes/actions/runs/3342207244/jobs/5534197567#step:20:477

Looks like you'll need to update the function signature in a test.

@github-actions
Copy link

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@cdibble
Copy link
Contributor Author

cdibble commented Oct 31, 2022

@cdibble The CI tests caught an issue: https://github.com/pulumi/pulumi-kubernetes/actions/runs/3342207244/jobs/5534197567#step:20:477

Looks like you'll need to update the function signature in a test.

@lblackstone Ok I just updated that test, hopefully that takes care of it. This does just maintain the previous test coverage, rather than extending it to include coverage of this functionality. I imagine the latter is preferable- I'll take a closer look to see if I can work out how to do that and put another commit on here.

@github-actions
Copy link

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@cdibble
Copy link
Contributor Author

cdibble commented Oct 31, 2022

@lblackstone I just pushed a commit that adds one more test with this functionality turned on. We can revert that if it's not desired of course. TBH I am not totally confident I got the patterns right and don't have a dev environment to try it out locally. Let me know if you have any comments :)

@lblackstone
Copy link
Member

/run-acceptance-tests

@pulumi-bot
Copy link
Contributor

@github-actions
Copy link

github-actions bot commented Nov 2, 2022

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@lblackstone
Copy link
Member

/run-acceptance-tests

@pulumi-bot
Copy link
Contributor

@cdibble
Copy link
Contributor Author

cdibble commented Nov 4, 2022

FYI I see the error and will try to revise this to get it working. Might take a minute as I think I need to improve my understanding of Go fundamentals and figure out how to run these tests locally.

@github-actions
Copy link

github-actions bot commented Nov 7, 2022

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

Copy link
Member

@lblackstone lblackstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see the problem. I think my suggested change should fix it.

provider/pkg/provider/helm_release.go Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Nov 7, 2022

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@lblackstone
Copy link
Member

/run-acceptance-tests

@pulumi-bot
Copy link
Contributor

@cdibble
Copy link
Contributor Author

cdibble commented Nov 7, 2022

@lblackstone Alrighty- I've enjoyed getting to know Go a bit better and I think that the latest commit should allow these tests to pass with the expected merged map. Please let me know if you have a moment to re-run those CI tests and I'd as always be happy to address any questions or comments.

IsValid was erroneously skipping nil values, so inverted the check
@github-actions
Copy link

github-actions bot commented Nov 7, 2022

PR is now waiting for a maintainer to run the acceptance tests.
Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@lblackstone
Copy link
Member

/run-acceptance-tests

@pulumi-bot
Copy link
Contributor

@lblackstone
Copy link
Member

@lblackstone Alrighty- I've enjoyed getting to know Go a bit better and I think that the latest commit should allow these tests to pass with the expected merged map. Please let me know if you have a moment to re-run those CI tests and I'd as always be happy to address any questions or comments.

Thanks for your patience on this. I couldn't figure out why the test was still failing, so I went ahead and debugged it. Turns out that the IsValid function returns false for nil values, so it still wasn't working quite right. I pushed a new commit that passes the tests.

@cdibble
Copy link
Contributor Author

cdibble commented Nov 8, 2022

Thanks for your patience on this. I couldn't figure out why the test was still failing, so I went ahead and debugged it. Turns out that the IsValid function returns false for nil values, so it still wasn't working quite right. I pushed a new commit that passes the tests.

No problem at all. Thanks for your help. Hopefully we're good to go now but please do tag me if this needs any further attention.

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.

None yet

3 participants