diff --git a/Deploy.md b/Deploy.md index cc8835bad8484c26268c2be3c6d2cec117503f62..3152e408891fe4957613a6845c4302ab4a826ddc 100644 --- a/Deploy.md +++ b/Deploy.md @@ -40,10 +40,10 @@ docker pull goharbor/harbor-jobservice:v1.7.5 && \ docker tag goharbor/harbor-jobservice:v1.7.5 registry-vpc.cn-qingdao.aliyuncs.com/wod/harbor-jobservice:v1.7.5 && \ docker push registry-vpc.cn-qingdao.aliyuncs.com/wod/harbor-jobservice:v1.7.5 -# goharbor/registry-photon -docker pull goharbor/registry-photon:v2.6.2-v1.7.5 && \ -docker tag goharbor/registry-photon:v2.6.2-v1.7.5 registry-vpc.cn-qingdao.aliyuncs.com/wod/registry-photon:v2.6.2-v1.7.5 && \ -docker push registry-vpc.cn-qingdao.aliyuncs.com/wod/registry-photon:v2.6.2-v1.7.5 +# registry +docker pull registry:2.7.1 && \ +docker tag registry:2.7.1 registry-vpc.cn-qingdao.aliyuncs.com/wod/registry:2.7.1 && \ +docker push registry-vpc.cn-qingdao.aliyuncs.com/wod/registry:2.7.1 # goharbor/harbor-registryctl docker pull goharbor/harbor-registryctl:v1.7.5 && \ diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index 9021d29df6307d4a62f971223684fb4ab49b3da0..80cf78a9c2e50e41b0bdf51fcee76227f24a2961 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -13,7 +13,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this */}} {{- define "harbor.fullname" -}} {{- $name := default "harbor" .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- printf "%s" .Release.Name | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Helm required labels */}} @@ -21,13 +21,11 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this heritage: {{ .Release.Service }} release: {{ .Release.Name }} chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" {{- end -}} {{/* matchLabels */}} {{- define "harbor.matchLabels" -}} release: {{ .Release.Name }} -app: "{{ template "harbor.name" . }}" {{- end -}} {{- define "harbor.autoGenCert" -}} diff --git a/templates/chartmuseum/chartmuseum-dpl.yaml b/templates/chartmuseum/chartmuseum-dpl.yaml index 69579787a48953a0c2bf8757ced14a9e66bdd6ce..801e72287290989a550bc4d3d774fb006203c560 100644 --- a/templates/chartmuseum/chartmuseum-dpl.yaml +++ b/templates/chartmuseum/chartmuseum-dpl.yaml @@ -5,18 +5,18 @@ metadata: name: "{{ template "harbor.chartmuseum" . }}" labels: {{ include "harbor.labels" . | indent 4 }} - component: chartmuseum + app: chartmuseum spec: replicas: {{ .Values.chartmuseum.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} - component: chartmuseum + app: chartmuseum template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} - component: chartmuseum + app: chartmuseum annotations: checksum/configmap: {{ include (print $.Template.BasePath "/chartmuseum/chartmuseum-cm.yaml") . | sha256sum }} checksum/secret: {{ include (print $.Template.BasePath "/chartmuseum/chartmuseum-secret.yaml") . | sha256sum }} diff --git a/templates/chartmuseum/chartmuseum-svc.yaml b/templates/chartmuseum/chartmuseum-svc.yaml index 49a3bb51dd2b8d85c50cea1624ccb20fae9d05c2..bbbfece15fb7b86e19d9582eb34ccce5180e4827 100644 --- a/templates/chartmuseum/chartmuseum-svc.yaml +++ b/templates/chartmuseum/chartmuseum-svc.yaml @@ -11,5 +11,5 @@ spec: targetPort: 9999 selector: {{ include "harbor.matchLabels" . | indent 4 }} - component: chartmuseum + app: chartmuseum {{- end }} \ No newline at end of file diff --git a/templates/clair/clair-cm.yaml b/templates/clair/clair-cm.yaml index f2ada30f309e13f417fc36b9a90ddd9cb1b14854..c929ea3e73247a7463a518209b2e930a4b357248 100644 --- a/templates/clair/clair-cm.yaml +++ b/templates/clair/clair-cm.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "harbor.clair" . }} labels: {{ include "harbor.labels" . | indent 4 }} - component: clair + app: clair data: config.yaml: | clair: diff --git a/templates/clair/clair-dpl.yaml b/templates/clair/clair-dpl.yaml index 4893477241dc6a60d103ab27df02301f9f61d029..7d5f134bf0575fcf7dcdbc5180de2aec6dab2b9b 100644 --- a/templates/clair/clair-dpl.yaml +++ b/templates/clair/clair-dpl.yaml @@ -5,18 +5,18 @@ metadata: name: {{ template "harbor.clair" . }} labels: {{ include "harbor.labels" . | indent 4 }} - component: clair + app: clair spec: replicas: {{ .Values.clair.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} - component: clair + app: clair template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} - component: clair + app: clair annotations: checksum/configmap: {{ include (print $.Template.BasePath "/clair/clair-cm.yaml") . | sha256sum }} {{- if .Values.clair.podAnnotations }} diff --git a/templates/clair/clair-svc.yaml b/templates/clair/clair-svc.yaml index c4923bff170139d40c6b4397b6936cd408ed098d..ced23e032e6ae645f6ebeabafc78e5263fde6e91 100644 --- a/templates/clair/clair-svc.yaml +++ b/templates/clair/clair-svc.yaml @@ -13,5 +13,5 @@ spec: port: 6061 selector: {{ include "harbor.matchLabels" . | indent 4 }} - component: clair + app: clair {{ end }} diff --git a/templates/core/core-dpl.yaml b/templates/core/core-dpl.yaml index 5d4d8d03a73f79c969d137c0795fbde43f286102..18e3f6986fed285a9adbbdafca9fddabfc5914db 100644 --- a/templates/core/core-dpl.yaml +++ b/templates/core/core-dpl.yaml @@ -4,18 +4,18 @@ metadata: name: {{ template "harbor.core" . }} labels: {{ include "harbor.labels" . | indent 4 }} - component: core + app: core spec: replicas: {{ .Values.core.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} - component: core + app: core template: metadata: labels: {{ include "harbor.matchLabels" . | indent 8 }} - component: core + app: core annotations: checksum/configmap: {{ include (print $.Template.BasePath "/core/core-cm.yaml") . | sha256sum }} checksum/secret: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} diff --git a/templates/core/core-svc.yaml b/templates/core/core-svc.yaml index 84b68f6c0365cdc6cb539b5387f60c14d39076b1..c2aee808cb045800410f929bdd52ade0cd4edc4b 100644 --- a/templates/core/core-svc.yaml +++ b/templates/core/core-svc.yaml @@ -13,4 +13,4 @@ spec: targetPort: 8080 selector: {{ include "harbor.matchLabels" . | indent 4 }} - component: core + app: core diff --git a/templates/database/database-ss.yaml b/templates/database/database-ss.yaml index 0565b6a7b8d0a6d78c9704c2c3df7a242e21bb33..f0020634c0a3e2e4d30f86fac5f6fde7fab50e40 100644 --- a/templates/database/database-ss.yaml +++ b/templates/database/database-ss.yaml @@ -6,19 +6,19 @@ metadata: name: "{{ template "harbor.database" . }}" labels: {{ include "harbor.labels" . | indent 4 }} - component: database + app: database spec: replicas: 1 serviceName: "{{ template "harbor.database" . }}" selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} - component: database + app: database template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} - component: database + app: database annotations: checksum/secret: {{ include (print $.Template.BasePath "/database/database-secret.yaml") . | sha256sum }} {{- if .Values.database.podAnnotations }} diff --git a/templates/database/database-svc.yaml b/templates/database/database-svc.yaml index 6475048cd97a2945919fcf0558d3fba3d44b4b2b..a75b468432f9c130ba09ae838cdd95977ce0b464 100644 --- a/templates/database/database-svc.yaml +++ b/templates/database/database-svc.yaml @@ -10,5 +10,5 @@ spec: - port: 5432 selector: {{ include "harbor.matchLabels" . | indent 4 }} - component: database + app: database {{- end -}} \ No newline at end of file diff --git a/templates/jobservice/jobservice-dpl.yaml b/templates/jobservice/jobservice-dpl.yaml index 58d492a8a253e12c9d9f1a8a40f126152584085f..8721d166656ccb137dc52f4aeed41554ba68e44e 100644 --- a/templates/jobservice/jobservice-dpl.yaml +++ b/templates/jobservice/jobservice-dpl.yaml @@ -4,18 +4,18 @@ metadata: name: "{{ template "harbor.jobservice" . }}" labels: {{ include "harbor.labels" . | indent 4 }} - component: jobservice + app: jobservice spec: replicas: {{ .Values.jobservice.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} - component: jobservice + app: jobservice template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} - component: jobservice + app: jobservice annotations: checksum/configmap: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm.yaml") . | sha256sum }} checksum/secret: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} diff --git a/templates/jobservice/jobservice-svc.yaml b/templates/jobservice/jobservice-svc.yaml index 2b5d47fd3708f7be81b0c16f31707fd3750f703f..7a45860598d80330d79993b12a6f5d2f1e37afb8 100644 --- a/templates/jobservice/jobservice-svc.yaml +++ b/templates/jobservice/jobservice-svc.yaml @@ -10,4 +10,4 @@ spec: targetPort: 8080 selector: {{ include "harbor.matchLabels" . | indent 4 }} - component: jobservice + app: jobservice diff --git a/templates/nginx/deployment.yaml b/templates/nginx/deployment.yaml index f8cd6ffcea05caa260bcc0b085a5bd0952f65f72..d1705e81ba4965c974883885c57041edf2a60682 100644 --- a/templates/nginx/deployment.yaml +++ b/templates/nginx/deployment.yaml @@ -5,18 +5,18 @@ metadata: name: {{ template "harbor.nginx" . }} labels: {{ include "harbor.labels" . | indent 4 }} - component: nginx + app: nginx spec: replicas: 1 selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} - component: nginx + app: nginx template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} - component: nginx + app: nginx annotations: {{- if not .Values.expose.tls.enabled }} checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-http.yaml") . | sha256sum }} diff --git a/templates/nginx/service.yaml b/templates/nginx/service.yaml index d919d78faa04d6da9f0764e25d8a66d89b7fef85..24fad89dc757f8507eed0f0596262e5117ec91b6 100644 --- a/templates/nginx/service.yaml +++ b/templates/nginx/service.yaml @@ -59,5 +59,5 @@ spec: {{- end }} selector: {{ include "harbor.matchLabels" . | indent 4 }} - component: nginx + app: nginx {{- end }} \ No newline at end of file diff --git a/templates/notary/notary-cm.yaml b/templates/notary/notary-cm.yaml index 4ba8a3bbbc69cb2fb29f0ac14a9940f81cd6ed48..0ced91d12544456105001dc85061d733adfc36c5 100644 --- a/templates/notary/notary-cm.yaml +++ b/templates/notary/notary-cm.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "harbor.notary-server" . }} labels: {{ include "harbor.labels" . | indent 4 }} - component: notary + app: notary data: {{ $ca := genCA "harbor-notary-ca" 365 }} {{ $cert := genSignedCert (include "harbor.notary-signer" .) nil nil 365 $ca }} diff --git a/templates/notary/notary-server.yaml b/templates/notary/notary-server.yaml index b96c9dff5b8ebfc332f47a2b0b4699839e4e4c89..6c3be0528af180f25c7e976310542265c1fd92e6 100644 --- a/templates/notary/notary-server.yaml +++ b/templates/notary/notary-server.yaml @@ -5,18 +5,18 @@ metadata: name: {{ template "harbor.notary-server" . }} labels: {{ include "harbor.labels" . | indent 4 }} - component: notary-server + app: notary-server spec: replicas: {{ .Values.notary.server.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} - component: notary-server + app: notary-server template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} - component: notary-server + app: notary-server annotations: checksum/configmap: {{ include (print $.Template.BasePath "/notary/notary-cm.yaml") . | sha256sum }} checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} diff --git a/templates/notary/notary-signer.yaml b/templates/notary/notary-signer.yaml index 5af3fbe59db36edb8bf602e026c910d67bc4260f..ba3b11a46bad67721bee480178bbfb41dd16f391 100644 --- a/templates/notary/notary-signer.yaml +++ b/templates/notary/notary-signer.yaml @@ -5,18 +5,18 @@ metadata: name: {{ template "harbor.notary-signer" . }} labels: {{ include "harbor.labels" . | indent 4 }} - component: notary-signer + app: notary-signer spec: replicas: {{ .Values.notary.signer.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} - component: notary-signer + app: notary-signer template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} - component: notary-signer + app: notary-signer annotations: checksum/configmap: {{ include (print $.Template.BasePath "/notary/notary-cm.yaml") . | sha256sum }} spec: diff --git a/templates/notary/notary-svc.yaml b/templates/notary/notary-svc.yaml index f02ba3c14de5a7615db985d2bd38377556af1361..c5ea13e90fed91a62d4f3b3469b534b28c75d773 100644 --- a/templates/notary/notary-svc.yaml +++ b/templates/notary/notary-svc.yaml @@ -13,7 +13,7 @@ spec: - port: 4443 selector: {{ include "harbor.matchLabels" . | indent 4 }} - component: notary-server + app: notary-server --- apiVersion: v1 @@ -27,5 +27,5 @@ spec: - port: 7899 selector: {{ include "harbor.matchLabels" . | indent 4 }} - component: notary-signer + app: notary-signer {{ end }} \ No newline at end of file diff --git a/templates/portal/deployment.yaml b/templates/portal/deployment.yaml index 7ddef5448d11e72b5350953fd72c35ae1683919e..350f536d030dad5d57fc03bdad9345bf9f5f8020 100644 --- a/templates/portal/deployment.yaml +++ b/templates/portal/deployment.yaml @@ -4,18 +4,18 @@ metadata: name: "{{ template "harbor.portal" . }}" labels: {{ include "harbor.labels" . | indent 4 }} - component: portal + app: portal spec: replicas: {{ .Values.portal.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} - component: portal + app: portal template: metadata: labels: {{ include "harbor.matchLabels" . | indent 8 }} - component: portal + app: portal annotations: {{- if .Values.portal.podAnnotations }} {{ toYaml .Values.portal.podAnnotations | indent 8 }} diff --git a/templates/portal/service.yaml b/templates/portal/service.yaml index 045de36f21f1870cdd7b12dfd7bee3d9c4477102..25bed608df39970efc7981dcc59ae5a56d243ac8 100644 --- a/templates/portal/service.yaml +++ b/templates/portal/service.yaml @@ -13,4 +13,4 @@ spec: targetPort: 80 selector: {{ include "harbor.matchLabels" . | indent 4 }} - component: portal + app: portal diff --git a/templates/redis/service.yaml b/templates/redis/service.yaml index 79c95c3e0561844fc590bc3943620af6d45785d4..add6963aa2bb920f0530185827733e373c8abfbd 100644 --- a/templates/redis/service.yaml +++ b/templates/redis/service.yaml @@ -10,5 +10,5 @@ spec: - port: 6379 selector: {{ include "harbor.matchLabels" . | indent 4 }} - component: redis + app: redis {{- end -}} \ No newline at end of file diff --git a/templates/redis/statefulset.yaml b/templates/redis/statefulset.yaml index 712efdeb82207e9bea232f6cc117b158bd741b41..ab1ed6b4d0e30834f1155f92e3e7fe190236840a 100644 --- a/templates/redis/statefulset.yaml +++ b/templates/redis/statefulset.yaml @@ -5,19 +5,19 @@ metadata: name: {{ template "harbor.redis" . }} labels: {{ include "harbor.labels" . | indent 4 }} - component: redis + app: redis spec: replicas: 1 serviceName: {{ template "harbor.redis" . }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} - component: redis + app: redis template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} - component: redis + app: redis {{- if .Values.redis.podAnnotations }} annotations: {{ toYaml .Values.redis.podAnnotations | indent 8 }} diff --git a/templates/registry/registry-dpl.yaml b/templates/registry/registry-dpl.yaml index 7ac36389df4722d2e391c25095a984b5b91536e5..0a0cd506ae6a4cc8ec03b6a5cdbb440f3445cc5f 100644 --- a/templates/registry/registry-dpl.yaml +++ b/templates/registry/registry-dpl.yaml @@ -4,18 +4,18 @@ metadata: name: "{{ template "harbor.registry" . }}" labels: {{ include "harbor.labels" . | indent 4 }} - component: registry + app: registry spec: replicas: {{ .Values.registry.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} - component: registry + app: registry template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} - component: registry + app: registry annotations: checksum/configmap: {{ include (print $.Template.BasePath "/registry/registry-cm.yaml") . | sha256sum }} checksum/secret: {{ include (print $.Template.BasePath "/registry/registry-secret.yaml") . | sha256sum }} diff --git a/templates/registry/registry-svc.yaml b/templates/registry/registry-svc.yaml index 6ec6ada9956875b3a1f76c9efccd4db092a95c0a..50067aa68e76f76a21f8ebae9f5cca540c8dcafc 100644 --- a/templates/registry/registry-svc.yaml +++ b/templates/registry/registry-svc.yaml @@ -12,4 +12,4 @@ spec: port: 8080 selector: {{ include "harbor.matchLabels" . | indent 4 }} - component: registry \ No newline at end of file + app: registry \ No newline at end of file diff --git a/values-aliyun.yaml b/values-aliyun.yaml index cc2837d78263b82d346d827d299490bde2e76527..d8265bfb9ff1815745b8121bcf9caaa07568f994 100644 --- a/values-aliyun.yaml +++ b/values-aliyun.yaml @@ -3,13 +3,13 @@ expose: tls: enabled: false ingress: - host: harbor.wodcloud.local + host: hub.wodcloud.local controller: default annotations: ingress.kubernetes.io/ssl-redirect: "true" rewriteAnnotation: traefik.ingress.kubernetes.io/rewrite-target -externalURL: https://harbor.wodcloud.local +externalURL: https://hub.wodcloud.local persistence: enabled: false @@ -44,7 +44,7 @@ registry: registry: image: repository: registry.cn-qingdao.aliyuncs.com/wod/registry - tag: v2.7.1 + tag: 2.7.1 resources: limits: memory: 4Gi