helm-harbor版本:1.6.2
源码地址:https://github.com/goharbor/harbor-helm/archive/refs/tags/v1.6.2.tar.gz
修改values.yaml
-
expose.tls.certSource: secret
-
expose.tls.secret.secretName: "harbor-secret" // secret生成命令:kubectl create secret tls harbor-secret -n default --cert=harbor.kylincloud.me.crt --key=harbor.kylincloud.me.key --dry-run -o yaml > harbor-ssl-secret.yaml // kubectl apply -f secret.yaml
-
expose.ingress.hosts.core: harbor.kylincloud.me //主机名
-
externalURL: https://harbor.kylincloud.me:30004 //和主机名一致,端口为nodePort的端口,不加端口harbor oidc认证callback的时候有问题
-
auth_mode: oidc_auth //如果不用oidc可以不加此行
-
harborAdminPassword: "xxxxxxx"
-
replicas: //自己设置每个pod的副本数
-
persistence.persistentVolumeClaim.xxx.size: 20G //自定义,前提需要有默认StorageClass
修改templates/core/core-dpl.yaml
注:这是一个bug,helm install的时候会报错 删除以下内容:
{{- if .Values.core.startupProbe.enabled }} startupProbe: httpGet: path: /api/v2.0/ping scheme: {{ include "harbor.component.scheme" . | upper }} port: {{ template "harbor.core.containerPort" . }} failureThreshold: 360 initialDelaySeconds: {{ .Values.core.startupProbe.initialDelaySeconds }} periodSeconds: 10 {{- end }}