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

Handle special characters in password sfor Helm Chart #16004

Merged
merged 4 commits into from May 23, 2021

Conversation

mik-laj
Copy link
Member

@mik-laj mik-laj commented May 23, 2021

Close: #16000

I've tried to fix this bug, but I'm afraid the Helm rendering engine is missing the necessary function. Username and Password should be percent-encoded, but Helm doesn't have such a function that does it, but there's an open ticket for it. https://github.com/Masterminds/sprig/issues/248 We also cannot expect users to enter an encoded password, because we use these variables in two contexts, and sometimes it is needed encrypted and raw to others. https://github.com/apache/airflow/blob/b66b54c83cb2efa274ba8040ce22ae719defbe75/chart/templates/_helpers.yaml#L344

I build a new URI using urlJoin and urlquery function, so all characters should be handled correctly.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@mik-laj
Copy link
Member Author

mik-laj commented May 23, 2021

I found a solution. Updated and ready for review.

@mik-laj mik-laj marked this pull request as ready for review May 23, 2021 13:21
@mik-laj mik-laj changed the title Handle at sign in password for Helm Chart Handle special characters in password sfor Helm Chart May 23, 2021
Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Nice one @mik-laj

@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label May 23, 2021
@mik-laj mik-laj merged commit ce358b2 into apache:master May 23, 2021
@kaxil kaxil added this to the Airflow Helm Chart 1.1.0 milestone Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:helm-chart Airflow Helm Chart okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If external postgres password contains '@' then it appends it to host.
3 participants