From e1e04d4825ecf2cac65452a9bfd05b0f58c3f1c3 Mon Sep 17 00:00:00 2001 From: mengkzhaoyun Date: Sun, 7 Apr 2019 00:57:28 +0800 Subject: [PATCH] update --- Deploy.md | 8 ++++---- templates/_helpers.tpl | 4 +--- templates/chartmuseum/chartmuseum-dpl.yaml | 6 +++--- templates/chartmuseum/chartmuseum-svc.yaml | 2 +- templates/clair/clair-cm.yaml | 2 +- templates/clair/clair-dpl.yaml | 6 +++--- templates/clair/clair-svc.yaml | 2 +- templates/core/core-dpl.yaml | 6 +++--- templates/core/core-svc.yaml | 2 +- templates/database/database-ss.yaml | 6 +++--- templates/database/database-svc.yaml | 2 +- templates/jobservice/jobservice-dpl.yaml | 6 +++--- templates/jobservice/jobservice-svc.yaml | 2 +- templates/nginx/deployment.yaml | 6 +++--- templates/nginx/service.yaml | 2 +- templates/notary/notary-cm.yaml | 2 +- templates/notary/notary-server.yaml | 6 +++--- templates/notary/notary-signer.yaml | 6 +++--- templates/notary/notary-svc.yaml | 4 ++-- templates/portal/deployment.yaml | 6 +++--- templates/portal/service.yaml | 2 +- templates/redis/service.yaml | 2 +- templates/redis/statefulset.yaml | 6 +++--- templates/registry/registry-dpl.yaml | 6 +++--- templates/registry/registry-svc.yaml | 2 +- values-aliyun.yaml | 6 +++--- 26 files changed, 54 insertions(+), 56 deletions(-) diff --git a/Deploy.md b/Deploy.md index cc8835b..3152e40 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 9021d29..80cf78a 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 6957978..801e722 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 49a3bb5..bbbfece 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 f2ada30..c929ea3 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 4893477..7d5f134 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 c4923bf..ced23e0 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 5d4d8d0..18e3f69 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 84b68f6..c2aee80 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 0565b6a..f002063 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 6475048..a75b468 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 58d492a..8721d16 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 2b5d47f..7a45860 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 f8cd6ff..d1705e8 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 d919d78..24fad89 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 4ba8a3b..0ced91d 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 b96c9df..6c3be05 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 5af3fbe..ba3b11a 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 f02ba3c..c5ea13e 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 7ddef54..350f536 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 045de36..25bed60 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 79c95c3..add6963 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 712efde..ab1ed6b 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 7ac3638..0a0cd50 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 6ec6ada..50067aa 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 cc2837d..d8265bf 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 -- 2.26.0