Updating GitLab Access Token
GitLab access token allows only authorized users to access the Git repository. You must update the Git access token regularly to ensure only authorized users can access the Git repository.
- Execute the flux bootstrap with the new
token:
source /home/opc/siebel/<env_id>/k8sprofile export GITLAB_TOKEN=<gitlab_accesstoken> flux bootstrap gitlab --components-extra=image-reflector-controller,image-automation-controller --hostname=https://<GITLAB_HOSTNAME> --token-auth --owner=<GITLAB_USER> --repository=<NAMESPACE>-cloud-manager --ca-file=<GITLAB_SELFSIGNED_CACERT_PATH> --branch=master --path='flux-crm/clusters/staging' --log-level debug --image-pull-secret ocirsecret --registry phx.ocir.io/siebeldev/fluxcd -n <NAMESPACE> --watch-all-namespaces=falseNote: Here, if you are using SCM development build, the registry will beiad.ocir.io/siebeldev/fluxcd. - Update the GitLab access token in the SCM Git repository:
- Go to the environment directory:
cd /home/opc/siebel/<env_id> - Open the
siebel-config.yamlfile:vi <namespace>-cloud-manager/flux-crm/apps/base/siebel/siebel-config.yaml - Update the value of the
gitlab_accesstokenparameter.
- Go to the environment directory:
- Commit the changes to the remote Git repository:
- Go to the
<namespace>-cloud-managerdirectory:cd /home/opc/siebel/<ENV_ID>/<namespace>-cloud-manager - Commit the changes to the Git
repository:
git add . git commit -m "updated gitlab access token and custom secrets" git config pull.rebase false git pull git push - Perform flux reconcile
manually:
flux reconcile source git <namespace> -n <namespace> flux reconcile kustomization apps -n <namespace>
- Go to the