gitlab-sync module) of every Ayakaleaf Pro pod. It needs the Git integration. Create the OAuth application and read what each setting does in GitLab Synchronisation; this page puts it into Kubernetes.
Configuration
1
ConfigMap
30-config.yaml (additions)
GIT_BRIDGE_ENABLED: "true" and the git-bridge StatefulSet from Git integration must be in place: without them the account settings and the editor hide GitLab Synchronisation.2
Secret
GITLAB_TOKEN_CIPHER_PASSWORD encrypts the users’ GitLab access and refresh tokens in MongoDB. Every replica must use the same value, and changing it later makes every user link GitLab again.3
Private CA (optional)
If your GitLab has a certificate from your own CA, add the CA to the Secret
overleaf-certs mounted at /var/lib/overleaf/certs (see Certificates and other files) and set NODE_EXTRA_CA_CERTS: /var/lib/overleaf/certs/ca.pem in the ConfigMap.4
Apply, restart and check
000 means it is not.Several replicas
Nothing extra beyond the sharedGITLAB_TOKEN_CIPHER_PASSWORD. A sync takes a lock in Redis, shared with the other Git synchronisations, so two replicas never sync the same project at once. Refreshing a user’s GitLab token also takes a Redis lock, so two replicas do not refresh it at the same time.
Tested on Kubernetes
Against a mock of a self-managed GitLab atGITLAB_SYNC_URL (trusted through NODE_EXTRA_CA_CERTS from overleaf-certs), on Kubernetes 1.37 with one replica and the Git integration on, our end-to-end tests for GitLab Synchronisation pass (40 cases): linking and unlinking the account, refreshing an expiring access token and revoked tokens, exporting into a new private or group project, importing a repository, pulling and pushing, merges, conflicts, deleted and force-pushed branches, binary files, renames and deletions, and what owners, editors and viewers may do.
