安装
helm repo add gitlab-operator https://gitlab.com/api/v4/projects/18899486/packages/helm/stable
helm repo update
helm install gitlab-operator gitlab-operator/gitlab-operator --create-namespace --namespace gitlab-system
镜像处理
如果是离线环境,需要对镜像进行处理,不然无法进行pull。有两种途径:
第一种:使用helm template的方式过滤出所有的image
helm template gitlab-operator --set metrics.enabled=true | grep 'image: ' | sed 's/^.*image: //g' | sed "s/^\([\"']\)\(.*\)\1\$$/\2/g" | uniq > images.txt
第二种:人工查找gitlab-operator/templates/manager/deployment.yaml
中的image
镜像,进行离线处理。
上面两种方式都是将镜像下载到本地之后然后上传到离线环境中的harbor仓库之中,然后修改yaml文件将image指向离线环境中的image地址即可。
参考链接:https://docs.gitlab.com/operator/installation.html