Skip to content

Fix selfhosted Helm secret key collisions that broke GitLab PAT auth#431

Open
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-gitlab-pat-issues
Open

Fix selfhosted Helm secret key collisions that broke GitLab PAT auth#431
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-gitlab-pat-issues

Conversation

Copy link
Copy Markdown

Copilot AI commented May 9, 2026

Selfhosted GitLab PATs configured via Helm were not being used when ca_path/insecure were also set. In the generated Secret, those fields were written to the token key, overwriting the PAT and causing registry auth failures.

  • Helm template fix (selfhosted secret keys)

    • Corrected key mapping in templates/secret.yaml:
      • selfhosted.<name>.insecure now stores insecure
      • selfhosted.<name>.ca_path now stores ca_path
    • Previously both were incorrectly emitted as selfhosted.<name>.token.
  • Regression coverage

    • Added a focused chart unit test in tests/secret_test.yaml for a selfhosted entry with:
      • token (GitLab-style PAT)
      • insecure
      • ca_path
    • Asserts all three keys are present and independently encoded in Secret data.
# before (incorrect)
selfhosted.<name>.token: <token>
selfhosted.<name>.token: <insecure>
selfhosted.<name>.token: <ca_path>

# after
selfhosted.<name>.token: <token>
selfhosted.<name>.insecure: <insecure>
selfhosted.<name>.ca_path: <ca_path>

Copilot AI requested review from Copilot and removed request for Copilot May 9, 2026 14:22
Copilot AI linked an issue May 9, 2026 that may be closed by this pull request
@davidcollom davidcollom requested review from Copilot and davidcollom May 9, 2026 14:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI changed the title [WIP] Fix GitLab selfhosted PATs not working Fix selfhosted Helm secret key collisions that broke GitLab PAT auth May 9, 2026
@davidcollom davidcollom marked this pull request as ready for review May 9, 2026 17:53
@davidcollom davidcollom requested a review from maria-reynoso as a code owner May 9, 2026 17:53
Copilot AI review requested due to automatic review settings May 9, 2026 17:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

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.

[BUG] gitlab (selfhosted) PATs not working

3 participants