Skip to content

fix: password URL-encoding + chart-created datamate-conf Secret - #532

Merged
hhhhsc701 merged 2 commits into
mainfrom
fix/rolback
Aug 24, 2026
Merged

fix: password URL-encoding + chart-created datamate-conf Secret#532
hhhhsc701 merged 2 commits into
mainfrom
fix/rolback

Conversation

@MoeexT

@MoeexT MoeexT commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

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.pybuild_database_url() now uses SQLAlchemy URL.create(...).render_as_string(hide_password=False) instead of f-string concatenation.

  • Root cause: a password like Huawei@321 was concatenated directly into the URL, so the first @ was parsed as the userinfo/host separator, yielding a wrong host (321@datamate-database) and a Name or service not known DNS 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.yamlpublic.secrets.create: false → true so the chart's secret.yaml template generates the datamate-conf Secret from secrets.data. The install script writes secrets into this block via sed before helm install.

Verification

  • URL.create() tested with Huawei@321 and other reserved chars.
  • Confirmed datamate-conf Secret consumers (DB_PASSWORD, HOME_PAGE_URL, JWT_SECRET, LABEL_STUDIO_PASSWORD/TOKEN, CERT_PASS, DOMAIN) all resolve via secretKeyRef.

Note

The matching install-script changes live in ModelEngine-Group/DataMate-Deploy.

MoeexT added 2 commits August 24, 2026 15:05
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.
@hhhhsc701
hhhhsc701 merged commit 17d6578 into main Aug 24, 2026
8 checks passed
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.

2 participants