This article outlines how to use Rancher Secrets to access remote Git Repositories e.g Gitlab
Helm Chart Directory Structure <Helm.Chart.Name> | |_ values.yaml Chart.yaml charts templates | |_ deployment.yaml service.yaml nginx.yaml ....
- Steps to add secret to Rancher to access remote Gitlab Container Registry Image (Docker Build Image)
Below lines from values.yaml:
image: #repository: ubuntu repository: registry-git.orro.dev/docker-image-builds/microsoft-sentinel <--REmote Gitlab Repo Image pullPolicy: Always
tag: "latest" imagePullSecrets:
- name: microsoft-sentinel-orro-registry <--Kubectl secret name (Refer to command below)
Syntax:
kubectl create secret docker-registry --docker-server= --docker-username= --docker-password= --docker-email=
E.g Command
kubectl create secret docker-registry microsoft-sentinel-orro-registry --docker-server=registry-git.orro.dev --docker-username=Shishir-Rancher --docker-password=wnxWasajNHSsenVgEyEB --docker-email=[email protected]