Skip to content

fix: consolidate git credential management#3358

Merged
merll merged 62 commits into
mainfrom
APL-1960
Jun 25, 2026
Merged

fix: consolidate git credential management#3358
merll merged 62 commits into
mainfrom
APL-1960

Conversation

@merll

@merll merll commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

📌 Summary

This PR removes the Git credentials from the values store as well as the Helm chart. Instead, Git credentials are stored exclusively in a Secret (apl-secrets/apl-git-config). The ConfigMap (with non-sensitive data as repository url) has been merged into this secret to ensure consistency.
For minimizing impact in templates, otomi.git in the values is populated with the repo URL, branch, and email data.

Note that otomi-api also no longer takes these values in environment variables, but instead reads and writes aforementioned Secret directly.

🔍 Reviewer Notes

Requires testing with linode/apl-api#1018

Currently still breaks when Gitea is used in addition to an external repository, as Gitea admin password is not separated cleanly from internal Git credentials.

🧹 Checklist

  • Code is readable, maintainable, and robust.
  • Unit tests added/updated

@merll merll changed the title WIP: consolidate git credential management fix: consolidate git credential management Jun 18, 2026
@merll merll marked this pull request as draft June 18, 2026 10:58
Comment thread src/common/bootstrap.ts Fixed
Comment thread src/common/values.ts Fixed
Comment thread src/cmd/pull.ts Outdated
Comment thread src/common/repo.ts Outdated

@j-zimnowoda j-zimnowoda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While installing the monitoring-with-team scenario I noticed the following

  1. The otomi-api secret is empty:
# ad 1
# k get secret -n otomi otomi-api -oyaml
apiVersion: v1
kind: Secret
metadata:
  annotations:
    argocd.argoproj.io/tracking-id: otomi-otomi-api:/Secret:otomi/otomi-api
  creationTimestamp: "2026-06-24T13:05:43Z"
  labels:
    app.kubernetes.io/instance: otomi-api
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: otomi-api
    app.kubernetes.io/version: "1.0"
    helm.sh/chart: otomi-api-0.1.0
  name: otomi-api
  namespace: otomi
type: Opaque

@merll

merll commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

While installing the monitoring-with-team scenario I noticed the following

1. The otomi-api secret  is empty:

This is where the credentials used to be inserted. Cleaning this up.

Comment thread src/common/hf.ts Fixed
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Comment thread charts/otomi-api/templates/deployment.yaml

@j-zimnowoda j-zimnowoda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the git-server there the 401 error is logged every second.

2026/06/25 07:03:51 GET /otomi/values.git/info/refs 401 127.0.0.6:57259

I am not sure which actor is doing it.

@merll

merll commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

In the git-server there the 401 error is logged every second.

2026/06/25 07:03:51 GET /otomi/values.git/info/refs 401 127.0.0.6:57259

I am not sure which actor is doing it.

I can confirm it is apl-operator. I see the same in Gitea in the previous release. Something worth looking at, but cannot be a critical issue.

@j-zimnowoda

Copy link
Copy Markdown
Contributor

In the git-server there the 401 error is logged every second.

2026/06/25 07:03:51 GET /otomi/values.git/info/refs 401 127.0.0.6:57259

I am not sure which actor is doing it.

I can confirm it is apl-operator. I see the same in Gitea in the previous release. Something worth looking at, but cannot be a critical issue.

Ok. I recorded it as a follow-up ticket: APL-1966

@merll merll merged commit 41bb7a2 into main Jun 25, 2026
16 checks passed
@merll merll deleted the APL-1960 branch June 25, 2026 12:36
j-zimnowoda added a commit that referenced this pull request Jun 25, 2026
Co-authored-by: svcAPLBot <174728082+svcAPLBot@users.noreply.github.com>
Co-authored-by: jeho <17126497+j-zimnowoda@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
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.

4 participants