fix: password URL-encoding + chart-created datamate-conf Secret - #532
Merged
Conversation
Remove sealed-secrets dependency: set public.secrets.create=true so the chart's secret.yaml template generates the datamate-conf Secret from values.yaml. The install script now writes secrets into secrets.data via sed before helm install (cert-pass via kmc, db-password user input, tokens auto-random), matching the original non-sealed delivery path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the database password special-character bug and remove the sealed-secrets dependency, restoring the original non-sealed secret delivery path.
Changes
1. Password URL-encoding (commit bc15af7)
runtime/datamate-python/app/core/config.py—build_database_url()now uses SQLAlchemyURL.create(...).render_as_string(hide_password=False)instead of f-string concatenation.Huawei@321was concatenated directly into the URL, so the first@was parsed as the userinfo/host separator, yielding a wrong host (321@datamate-database) and aName or service not knownDNS error.URL.create()percent-encodes reserved characters in the password automatically (@→%40), and handles all reserved chars (:,/,#,?,&,=,+, etc.), not just@.2. Chart-created datamate-conf Secret (commit b056f3c)
deployment/helm/datamate/values.yaml—public.secrets.create: false → trueso the chart'ssecret.yamltemplate generates thedatamate-confSecret fromsecrets.data. The install script writes secrets into this block via sed beforehelm install.Verification
URL.create()tested withHuawei@321and other reserved chars.datamate-confSecret consumers (DB_PASSWORD, HOME_PAGE_URL, JWT_SECRET, LABEL_STUDIO_PASSWORD/TOKEN, CERT_PASS, DOMAIN) all resolve viasecretKeyRef.Note
The matching install-script changes live in
ModelEngine-Group/DataMate-Deploy.