Skip to main content

Update GitLab API Token

When a GitLab API token expires or approaches expiration, request a new token from the OLIVE team (olive-support@boc-group.com).

The method to update the token depends on how OLIVE is deployed in your environment. The following examples show common approaches for different deployment scenarios.

OLIVE Helm registry​

If deployed with Argo CD​

For deployments using Argo CD, update the Helm OCI registry credentials by one of these approaches:

  • Delete the Argo CD repository entry and create a new one with the updated API token, or
  • Locate the corresponding Secret on the cluster (Rancher or CLI; look for OCI registry annotations), or
  • Create a new Secret via CLI and remove the old connection (recommended).

Example Argo CD Secret:

apiVersion: v1
kind: Secret
metadata:
name: olive-helm-oci
namespace: argocd
labels:
argocd.argoproj.io/secret-type: repository
type: Opaque
stringData:
type: helm
name: olive-helm-oci
url: registry.gitlab.com/olive6224315/helm-charts/charts
enableOCI: "true"
username: olive-team
password: <GITLAB_TOKEN>

For all deployments​

Adapt the olive-regcred Secret. No chart creates it — it is the image-pull Secret you create by hand in each namespace; see Infrastructure Prerequisites.

On the local cluster, update the Kubernetes Secret olive-regcred manually.

For other clusters, update the HashiCorp Vault entry used for all namespaces via VaultStaticSecret so rotating the initial Vault secret propagates automatically:

kubectl exec -it oli-vault-0 -n oli-hashicorp-vault -- vault kv put secret/shared-secrets/olive-regcred \
.dockerconfigjson='{"auths": {"registry.gitlab.com": {"username": "olive-team", "password": "<GITLAB_TOKEN>"}}}'

Replace <GITLAB_TOKEN> with the newly requested token before running the command.