From 33960e6c92da2598a838462221539bf7f254e339 Mon Sep 17 00:00:00 2001 From: nepomucen Date: Tue, 4 Feb 2025 12:59:28 +0100 Subject: [PATCH 1/5] template annotations for harbor-core deployment Signed-off-by: nepomucen --- templates/core/core-dpl.yaml | 4 ++++ values.yaml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/templates/core/core-dpl.yaml b/templates/core/core-dpl.yaml index 4705c5f6e..c566c6980 100644 --- a/templates/core/core-dpl.yaml +++ b/templates/core/core-dpl.yaml @@ -3,6 +3,10 @@ kind: Deployment metadata: name: {{ template "harbor.core" . }} namespace: {{ .Release.Namespace | quote }} + {{- with .Values.core.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} labels: {{ include "harbor.labels" . | indent 4 }} component: core diff --git a/values.yaml b/values.yaml index 98206b0f4..478f6e275 100644 --- a/values.yaml +++ b/values.yaml @@ -559,6 +559,11 @@ core: serviceAccountName: "" # mount the service account token automountServiceAccountToken: false + # Annotations to add to the harbor-core deployment's. Optional. + # + # If you are using reloader use the following annotation with your HABROR_SECRET_NAME + annotations: {} + # secret.reloader.stakater.com/reload: "" replicas: 1 revisionHistoryLimit: 10 ## Startup probe values From db955d3f305f5c55c4f6ee65cfb604ffb09e2153 Mon Sep 17 00:00:00 2001 From: nepomucen Date: Tue, 4 Feb 2025 13:07:31 +0100 Subject: [PATCH 2/5] template annotations for the other deployments Signed-off-by: nepomucen --- templates/exporter/exporter-dpl.yaml | 4 ++++ templates/jobservice/jobservice-dpl.yaml | 4 ++++ templates/portal/deployment.yaml | 4 ++++ templates/registry/registry-dpl.yaml | 4 ++++ values.yaml | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/templates/exporter/exporter-dpl.yaml b/templates/exporter/exporter-dpl.yaml index 32fac20ac..2de08cac7 100644 --- a/templates/exporter/exporter-dpl.yaml +++ b/templates/exporter/exporter-dpl.yaml @@ -4,6 +4,10 @@ kind: Deployment metadata: name: {{ template "harbor.exporter" . }} namespace: {{ .Release.Namespace | quote }} + {{- with .Values.exporter.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} labels: {{ include "harbor.labels" . | indent 4 }} component: exporter diff --git a/templates/jobservice/jobservice-dpl.yaml b/templates/jobservice/jobservice-dpl.yaml index 3e426694b..ec563cb3b 100644 --- a/templates/jobservice/jobservice-dpl.yaml +++ b/templates/jobservice/jobservice-dpl.yaml @@ -3,6 +3,10 @@ kind: Deployment metadata: name: "{{ template "harbor.jobservice" . }}" namespace: {{ .Release.Namespace | quote }} + {{- with .Values.jobservice.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} labels: {{ include "harbor.labels" . | indent 4 }} component: jobservice diff --git a/templates/portal/deployment.yaml b/templates/portal/deployment.yaml index 88bcd4979..b6dc6940a 100644 --- a/templates/portal/deployment.yaml +++ b/templates/portal/deployment.yaml @@ -3,6 +3,10 @@ kind: Deployment metadata: name: "{{ template "harbor.portal" . }}" namespace: {{ .Release.Namespace | quote }} + {{- with .Values.portal.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} labels: {{ include "harbor.labels" . | indent 4 }} component: portal diff --git a/templates/registry/registry-dpl.yaml b/templates/registry/registry-dpl.yaml index a86e2eee0..164be8bd5 100644 --- a/templates/registry/registry-dpl.yaml +++ b/templates/registry/registry-dpl.yaml @@ -5,6 +5,10 @@ kind: Deployment metadata: name: "{{ template "harbor.registry" . }}" namespace: {{ .Release.Namespace | quote }} + {{- with .Values.registry.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} labels: {{ include "harbor.labels" . | indent 4 }} component: registry diff --git a/values.yaml b/values.yaml index 478f6e275..4a213fc85 100644 --- a/values.yaml +++ b/values.yaml @@ -519,6 +519,7 @@ portal: serviceAccountName: "" # mount the service account token automountServiceAccountToken: false + annotations: {} replicas: 1 revisionHistoryLimit: 10 # resources: @@ -653,6 +654,7 @@ jobservice: serviceAccountName: "" # mount the service account token automountServiceAccountToken: false + annotations: {} replicas: 1 revisionHistoryLimit: 10 # resources: @@ -730,6 +732,7 @@ registry: serviceAccountName: "" # mount the service account token automountServiceAccountToken: false + annotations: {} replicas: 1 revisionHistoryLimit: 10 nodeSelector: {} @@ -1040,6 +1043,7 @@ exporter: serviceAccountName: "" # mount the service account token automountServiceAccountToken: false + annotations: {} replicas: 1 revisionHistoryLimit: 10 # resources: From 28f47ac9d1181cb74e1aad9c7ab74cd3fa3f5d12 Mon Sep 17 00:00:00 2001 From: nepomucen Date: Tue, 11 Feb 2025 16:38:22 +0100 Subject: [PATCH 3/5] Update doc Signed-off-by: nepomucen --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 39b880c07..3862d76ee 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +# dummy change # Helm Chart for Harbor **Notes:** The master branch is in heavy development, please use the other stable versions instead. A highly available solution for Harbor based on chart can be found [here](docs/High%20Availability.md). And refer to the [guide](docs/Upgrade.md) to upgrade the existing deployment. @@ -218,6 +219,7 @@ The following table lists the configurable parameters of the Harbor chart and th | `portal.priorityClassName` | The priority class to run the pod as | | | `portal.initContainers` | Init containers to be run before the controller's container starts. | `[]` | | **Core** | | | +| `core.annotations` | Annotations to add to the core Deployment image | `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` | | `core.image.tag` | Tag for Harbor core image | `dev` | | `core.replicas` | The replica count | `1` | From 63f427c916b8dd4e3ab70df02552819f4b57cec9 Mon Sep 17 00:00:00 2001 From: Szymon Janczy Date: Tue, 11 Feb 2025 16:58:26 +0100 Subject: [PATCH 4/5] Update README.md Signed-off-by: nepomucen --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3862d76ee..bbb22de4e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -# dummy change # Helm Chart for Harbor **Notes:** The master branch is in heavy development, please use the other stable versions instead. A highly available solution for Harbor based on chart can be found [here](docs/High%20Availability.md). And refer to the [guide](docs/Upgrade.md) to upgrade the existing deployment. @@ -204,6 +203,7 @@ The following table lists the configurable parameters of the Harbor chart and th | `nginx.podAnnotations` | Annotations to add to the nginx pod | `{}` | | `nginx.priorityClassName` | The priority class to run the pod as | | | **Portal** | | | +| `portal.annotations` | Annotations to add to the portal Deployment | `{}` | | `portal.image.repository` | Repository for portal image | `goharbor/harbor-portal` | | `portal.image.tag` | Tag for portal image | `dev` | | `portal.replicas` | The replica count | `1` | @@ -219,7 +219,7 @@ The following table lists the configurable parameters of the Harbor chart and th | `portal.priorityClassName` | The priority class to run the pod as | | | `portal.initContainers` | Init containers to be run before the controller's container starts. | `[]` | | **Core** | | | -| `core.annotations` | Annotations to add to the core Deployment image +| `core.annotations` | Annotations to add to the core Deployment | `{}` | | `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` | | `core.image.tag` | Tag for Harbor core image | `dev` | | `core.replicas` | The replica count | `1` | @@ -246,6 +246,7 @@ The following table lists the configurable parameters of the Harbor chart and th | `core.gdpr.auditLogsCompliant` | Enable GDPR compliant for audit logs by changing username to its CRC32 value if that user was deleted from the system | `false` | | `core.initContainers` | Init containers to be run before the controller's container starts. | `[]` | | **Jobservice** | | | +| `jobservice.annotations` | Annotations to add to the jobservice Deployment | `{}` | | `jobservice.image.repository` | Repository for jobservice image | `goharbor/harbor-jobservice` | | `jobservice.image.tag` | Tag for jobservice image | `dev` | | `jobservice.replicas` | The replica count | `1` | @@ -268,6 +269,7 @@ The following table lists the configurable parameters of the Harbor chart and th | `jobservice.secret` | Secret is used when job service communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | | `jobservice.initContainers` | Init containers to be run before the controller's container starts. | `[]` | | **Registry** | | | +| `registry.annotations` | Annotations to add to the registry Deployment | `{}` | | `registry.registry.image.repository` | Repository for registry image | `goharbor/registry-photon` | | `registry.registry.image.tag` | Tag for registry image | `dev` | | `registry.registry.resources` | The [resources] to allocate for container | undefined | From bd1dafe520bdb3a691d0919396d2970e69ec9504 Mon Sep 17 00:00:00 2001 From: nepomucen Date: Tue, 12 Aug 2025 12:53:02 +0200 Subject: [PATCH 5/5] Template annotations for nginx component as well Signed-off-by: nepomucen --- README.md | 1 + templates/nginx/deployment.yaml | 4 ++++ values.yaml | 1 + 3 files changed, 6 insertions(+) diff --git a/README.md b/README.md index bbb22de4e..72b667ff0 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,7 @@ The following table lists the configurable parameters of the Harbor chart and th | `proxy.components` | The component list that the proxy settings apply to | core, jobservice, trivy | | `enableMigrateHelmHook` | Run the migration job via helm hook, if it is true, the database migration will be separated from harbor-core, run with a preupgrade job migration-job | `false` | | **Nginx** (if service exposed via `ingress`, Nginx will not be used) | | | +| `nginx.annotations` | Annotations to add to the nginx Deployment | `{}` | | `nginx.image.repository` | Image repository | `goharbor/nginx-photon` | | `nginx.image.tag` | Image tag | `dev` | | `nginx.replicas` | The replica count | `1` | diff --git a/templates/nginx/deployment.yaml b/templates/nginx/deployment.yaml index 04faa3735..d26aea2a9 100644 --- a/templates/nginx/deployment.yaml +++ b/templates/nginx/deployment.yaml @@ -4,6 +4,10 @@ kind: Deployment metadata: name: {{ template "harbor.nginx" . }} namespace: {{ .Release.Namespace | quote }} + {{- with .Values.nginx.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} labels: {{ include "harbor.labels" . | indent 4 }} component: nginx diff --git a/values.yaml b/values.yaml index 4a213fc85..35c293e9f 100644 --- a/values.yaml +++ b/values.yaml @@ -489,6 +489,7 @@ nginx: # mount the service account token automountServiceAccountToken: false replicas: 1 + annotations: {} revisionHistoryLimit: 10 # resources: # requests: