Skip to content

chore: updated k8s base64 strings to remove newlines#8714

Merged
wiersgallak merged 5 commits intomasterfrom
docs/base64-k8s
Mar 13, 2026
Merged

chore: updated k8s base64 strings to remove newlines#8714
wiersgallak merged 5 commits intomasterfrom
docs/base64-k8s

Conversation

@fmartingr
Copy link
Copy Markdown
Contributor

@fmartingr fmartingr commented Feb 4, 2026

Summary

Updated the base64 strings from the deploy to kubernetes example to remove newlines

Closes mattermost/mattermost-operator#342 (comment)

Summary by CodeRabbit

  • Bug Fixes
    • Corrected base64 encoding in PostgreSQL connection configuration to remove trailing newline characters, ensuring proper connection secret handling.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

Newest code from mattermost has been published to preview environment for Git SHA 842752b

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

Newest code from mattermost has been published to preview environment for Git SHA 842752b

Copy link
Copy Markdown
Contributor

@cwarnermm cwarnermm left a comment

Choose a reason for hiding this comment

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

Thanks, @fmartingr!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 6, 2026

Newest code from mattermost has been published to preview environment for Git SHA 1accb86

@cwarnermm cwarnermm requested a review from Combs7th February 17, 2026 20:16
@cwarnermm cwarnermm added the 2: Editor Review Requires review by an editor label Feb 17, 2026
@wiersgallak
Copy link
Copy Markdown
Contributor

@angeloskyratzakos Can you give this the 2nd review it needs to merge?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

Newest code from mattermost has been published to preview environment for Git SHA 66b9d81

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 3, 2026

Newest code from mattermost has been published to preview environment for Git SHA 9fa27e7

@wiersgallak wiersgallak self-requested a review March 13, 2026 15:21
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 13, 2026

📝 Walkthrough

Walkthrough

Three base64-encoded PostgreSQL connection strings in a Kubernetes secret manifest were updated by removing trailing newline characters. The values ending with "MTAK" were changed to end with "MTA=" to correct invalid control character parsing errors. No structural or control flow modifications.

Changes

Cohort / File(s) Summary
Kubernetes Secret Configuration
source/deployment-guide/server/kubernetes/deploy-k8s.rst
Updated three base64-encoded connection string values (DB_CONNECTION_CHECK_URL, DB_CONNECTION_STRING, MM_SQLSETTINGS_DATASOURCEREPLICAS) in the my-postgres-connection secret to remove trailing newline characters, resolving invalid control character parsing errors in Kubernetes v1.26.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating base64 strings in Kubernetes configuration to remove trailing newlines.
Linked Issues check ✅ Passed The PR successfully addresses the linked issue #342 by removing trailing newlines from base64-encoded Postgres connection strings, resolving the 'invalid control character in URL' error.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the stated objective; only three base64 strings in the Kubernetes deployment guide were modified to remove newlines, with no unrelated alterations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/base64-k8s
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.

Add a .trivyignore file to your project to customize which findings Trivy reports.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
source/deployment-guide/server/kubernetes/deploy-k8s.rst (1)

133-135: Add explicit encoding guidance to prevent newline regressions.

Nice fix on Line 133, Line 134, and Line 135. To make this durable for readers, please add a short note near this example showing how to generate base64 without trailing newline (for example, printf %s ... | base64 or echo -n ... | base64), so users don’t reintroduce the issue when creating their own secrets.

Suggested docs patch
   Example for AWS Aurora with PostgreSQL:

   .. code-block:: yaml
@@
     type: Opaque
+
+  .. note::
+
+    When generating secret values, avoid trailing newlines before base64 encoding.
+    Use commands like ``printf %s 'value' | base64`` (or ``echo -n 'value' | base64``)
+    so Kubernetes doesn’t decode an extra ``\n`` into the secret value.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@source/deployment-guide/server/kubernetes/deploy-k8s.rst` around lines 133 -
135, Add a short note next to the shown secret values (DB_CONNECTION_CHECK_URL,
DB_CONNECTION_STRING, MM_SQLSETTINGS_DATASOURCEREPLICAS) explaining how to
generate base64 without a trailing newline (e.g., use printf %s 'value' | base64
or echo -n 'value' | base64) so readers don’t accidentally include a newline
when creating their own secrets; place this guidance immediately above or below
the example lines so it’s visible when copying the commands.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@source/deployment-guide/server/kubernetes/deploy-k8s.rst`:
- Around line 133-135: Add a short note next to the shown secret values
(DB_CONNECTION_CHECK_URL, DB_CONNECTION_STRING,
MM_SQLSETTINGS_DATASOURCEREPLICAS) explaining how to generate base64 without a
trailing newline (e.g., use printf %s 'value' | base64 or echo -n 'value' |
base64) so readers don’t accidentally include a newline when creating their own
secrets; place this guidance immediately above or below the example lines so
it’s visible when copying the commands.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 47142f1c-9db8-4723-8a57-b4258b44dc30

📥 Commits

Reviewing files that changed from the base of the PR and between 741ca93 and 11a892f.

📒 Files selected for processing (1)
  • source/deployment-guide/server/kubernetes/deploy-k8s.rst

@github-actions
Copy link
Copy Markdown
Contributor

Newest code from mattermost has been published to preview environment for Git SHA 11a892f

@wiersgallak wiersgallak merged commit 0cce5d3 into master Mar 13, 2026
8 checks passed
@wiersgallak wiersgallak deleted the docs/base64-k8s branch March 13, 2026 15:23
@amyblais amyblais removed the 2: Editor Review Requires review by an editor label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Postgres connection string invalid control character in URL for secret data in base64

4 participants