Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
harbor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
market
harbor
Commits
ed6bd29f
Commit
ed6bd29f
authored
May 29, 2019
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d4707dd6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
40 deletions
+76
-40
templates/database/database-ss.yaml
templates/database/database-ss.yaml
+25
-11
templates/registry/registry-ss.yaml
templates/registry/registry-ss.yaml
+35
-24
values-aliyun.yaml
values-aliyun.yaml
+16
-5
No files found.
templates/database/database-ss.yaml
View file @
ed6bd29f
...
...
@@ -29,7 +29,7 @@ spec:
image
:
{{
.Values.database.internal.image.repository
}}
:{{ .Values.database.internal.image.tag }}
command
:
[
"
rm"
,
"
-Rf"
,
"
/var/lib/postgresql/data/lost+found"
]
volumeMounts
:
-
name
:
data
base-data
-
name
:
data
mountPath
:
/var/lib/postgresql/data
containers
:
-
name
:
database
...
...
@@ -53,17 +53,10 @@ spec:
-
secretRef
:
name
:
"
{{
template
"harbor.database" . }}"
volumeMounts
:
-
name
:
data
base-data
-
name
:
data
mountPath
:
/var/lib/postgresql/data
-
name
:
etc-localtime
mountPath
:
/etc/localtime
volumes
:
-
name
:
etc-localtime
hostPath
:
path
:
/etc/localtime
-
name
:
"
database-data"
hostPath
:
path
:
/data/{{ .Release.Namespace }}/{{ .Release.Name }}/database
{{
- with .Values.database.internal.nodeSelector
}}
nodeSelector
:
{{
toYaml . | indent 8
}}
...
...
@@ -75,5 +68,26 @@ spec:
{{
- with .Values.database.internal.tolerations
}}
tolerations
:
{{
toYaml . | indent 8
}}
{{
- end
}}
{{
- end -
}}
{{
- end
}}
volumes
:
-
name
:
etc-localtime
hostPath
:
path
:
/etc/localtime
{{
- if .Values.database.internal.storageSpec.hostPath
}}
-
name
:
data
hostPath
:
path
:
/{{.Values.database.internal.storageSpec.hostPath.root | default "data" | quote}}/{{ .Release.Namespace }}/{{ .Release.Name }}/database
{{
- else if .Values.database.internal.storageSpec.emptyDir
}}
-
name
:
data
emptyDir
:
{}
{{
- else if .Values.database.internal.storageSpec.volumeClaimTemplate
}}
volumeClaimTemplates
:
-
metadata
:
name
:
"
data"
labels
:
{{
include "harbor.labels" . | indent 8
}}
app
:
database
spec
:
{{
toYaml $.Values.database.internal.storageSpec.volumeClaimTemplate.spec | indent 6
}}
{{
- end
}}
{{
- end -
}}
templates/registry/registry-
dpl
.yaml
→
templates/registry/registry-
ss
.yaml
View file @
ed6bd29f
{{
- $storage
:
= .Values.registry.storage
}}
apiVersion
:
apps/v1
kind
:
Deploymen
t
kind
:
StatefulSe
t
metadata
:
name
:
"
{{
template
"harbor.registry" . }}"
labels
:
...
...
@@ -8,6 +8,7 @@ metadata:
app
:
registry
spec
:
replicas
:
{{
.Values.registry.replicas
}}
serviceName
:
"
{{
template
"harbor.registry" . }}"
selector
:
matchLabels
:
{{
include "harbor.matchLabels" . | indent 6
}}
...
...
@@ -51,7 +52,7 @@ spec:
-
containerPort
:
5001
volumeMounts
:
{{
- if eq $storage.type "filesystem"
}}
-
name
:
registry-
data
-
name
:
data
mountPath
:
/data
{{
- end
}}
-
name
:
registry-root-certificate
...
...
@@ -98,7 +99,7 @@ spec:
-
containerPort
:
8080
volumeMounts
:
{{
- if eq $storage.type "filesystem"
}}
-
name
:
registry-
data
-
name
:
data
mountPath
:
/data
{{
- end
}}
-
name
:
registry-config
...
...
@@ -108,26 +109,7 @@ spec:
mountPath
:
/etc/registryctl/config.yml
subPath
:
ctl-config.yml
-
name
:
etc-localtime
mountPath
:
/etc/localtime
volumes
:
-
name
:
etc-localtime
hostPath
:
path
:
/etc/localtime
-
name
:
registry-root-certificate
secret
:
secretName
:
{{
template "harbor.core" .
}}
-
name
:
registry-config
configMap
:
name
:
"
{{
template
"harbor.registry" . }}"
{{
- if eq $storage.type "filesystem"
}}
-
name
:
registry-data
hostPath
:
{{
- if .Values.registry.hostPath
}}
path
:
{{
.Values.registry.hostPath
}}
{{
- else
}}
path
:
/data/{{ .Release.Namespace }}/{{ .Release.Name }}/registry
{{
- end
}}
{{
- end
}}
mountPath
:
/etc/localtime
{{
- with .Values.registry.nodeSelector
}}
nodeSelector
:
{{
toYaml . | indent 8
}}
...
...
@@ -139,4 +121,33 @@ spec:
{{
- with .Values.registry.tolerations
}}
tolerations
:
{{
toYaml . | indent 8
}}
{{
- end
}}
{{
- end
}}
volumes
:
-
name
:
etc-localtime
hostPath
:
path
:
/etc/localtime
-
name
:
registry-root-certificate
secret
:
secretName
:
{{
template "harbor.core" .
}}
-
name
:
registry-config
configMap
:
name
:
"
{{
template
"harbor.registry" . }}"
{{
- if eq $storage.type "filesystem"
}}
{{
- if .Values.registry.storageSpec.hostPath
}}
-
name
:
data
hostPath
:
path
:
/{{.Values.registry.storageSpec.hostPath.root | default "data" | quote}}/{{ .Release.Namespace }}/{{ .Release.Name }}/database
{{
- else if .Values.registry.storageSpec.emptyDir
}}
-
name
:
data
emptyDir
:
{}
{{
- else if .Values.registry.storageSpec.volumeClaimTemplate
}}
volumeClaimTemplates
:
-
metadata
:
name
:
"
data"
labels
:
{{
include "harbor.labels" . | indent 8
}}
app
:
registry
spec
:
{{
toYaml $.Values.registry.storageSpec.volumeClaimTemplate.spec | indent 6
}}
{{
- end
}}
{{
- end
}}
values-aliyun.yaml
View file @
ed6bd29f
...
...
@@ -73,10 +73,18 @@ registry:
v4auth
:
true
chunksize
:
5242880
rootdirectory
:
/
# hostPath , 设置改变存储registry本地路径
# 注释后将使用默认存储位置
# hostPath: /data/registry
storageSpec
:
# 不用hostPath,则注释
hostPath
:
root
:
/data
volumeClaimTemplate
:
spec
:
storageClassName
:
rook-ceph-block
accessModes
:
[
"
ReadWriteOnce"
]
resources
:
requests
:
storage
:
100Gi
selector
:
{}
controller
:
image
:
...
...
@@ -129,6 +137,9 @@ database:
nodeSelector
:
harbor
:
enabled
storageSpec
:
# 不用hostPath,则注释
hostPath
:
root
:
/data
volumeClaimTemplate
:
spec
:
storageClassName
:
rook-ceph-block
...
...
@@ -136,7 +147,7 @@ database:
resources
:
requests
:
storage
:
20Gi
selector
:
{}
selector
:
{}
redis
:
type
:
internal
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment