Connection to GitLab

For the Lieutenant Operator to be able to connect to the GitLab API, the following configuration needs to be made.

Get GitLab Token

  1. Visit the GitLab instance you’d like to use.

  2. Login with the user that has the permissions necessary to write to the group you want to store your Project Syn repositories.

  3. Visit https://yourgitlab/profile/personal_access_tokens and create a token with the following settings:

    gitlab settings

Add Secret with Endpoint Information

Before any other things can be created we need to specify the Git repository API endpoint first:

sshEndpoint is optional. If omitted, the operator uses the same host as endpoint for SSH. Provide a full SSH URL (for example ssh://gitlab-ssh.example.com) or just a host name.

kubectl -n lieutenant create secret generic lieutenant-secret \
  --from-literal endpoint=http://10.144.1.197:8080 \
  --from-literal sshEndpoint=ssh://gitlab-ssh.example.com \
  --from-literal token=<token>