Commit 0527bd0c authored by 舒成's avatar 舒成

update

parent c078824d
......@@ -12,8 +12,15 @@ data:
fields:
service: registry
storage:
{{- $storage := .Values.registry.storage }}
{{- $type := $storage.type }}
{{- if eq $type "filesystem" }}
filesystem:
rootdirectory: /data
{{ toYaml $storage.filesystem | indent 8 }}
{{- else if eq $type "s3" }}
s3:
{{ toYaml $storage.s3 | indent 8 }}
{{- end }}
cache:
layerinfo: redis
maintenance:
......
{{- $storage := .Values.registry.storage }}
apiVersion: apps/v1
kind: Deployment
metadata:
......@@ -49,8 +50,10 @@ spec:
- containerPort: 5000
- containerPort: 5001
volumeMounts:
{{- if eq $storage.type "filesystem" }}
- name: registry-data
mountPath: /data
{{- end }}
- name: registry-root-certificate
mountPath: /etc/registry/root.crt
subPath: tokenServiceRootCertBundle
......@@ -94,8 +97,10 @@ spec:
ports:
- containerPort: 8080
volumeMounts:
{{- if eq $storage.type "filesystem" }}
- name: registry-data
mountPath: /data
{{- end }}
- name: registry-config
mountPath: /etc/registry/config.yml
subPath: config.yml
......@@ -114,6 +119,7 @@ spec:
- name: registry-config
configMap:
name: "{{ template "harbor.registry" . }}"
{{- if eq $storage.type "filesystem" }}
- name: registry-data
hostPath:
{{- if .Values.registry.hostPath }}
......@@ -121,6 +127,7 @@ spec:
{{- else }}
path: /data/{{ .Release.Namespace }}/{{ .Release.Name }}/registry
{{- end }}
{{- end }}
{{- with .Values.registry.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
......
......@@ -58,6 +58,21 @@ registry:
memory: 256Mi
nodeSelector:
harbor: enabled
storage:
# 存储类型,filesystem-本地文件存储,s3-minio s3存储
type: filesystem
filesystem:
rootdirectory: /data
s3:
accesskey: AKIAIOSFODNN7EXAMPLE
secretkey: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
region: us-east-1
regionendpoint: http://minio.wodcloud.local
bucket: registry
encrypt: false
v4auth: true
chunksize: 5242880
rootdirectory: /
# hostPath , 设置改变存储registry本地路径
# 注释后将使用默认存储位置
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment