Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of annotations on services exposing metrics #1522

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ The following table lists the configurable parameters of the Harbor chart and th
| `jobservice.tolerations` | Tolerations for pod assignment | `[]` |
| `jobservice.affinity` | Node/Pod affinities | `{}` |
| `jobservice.podAnnotations` | Annotations to add to the jobservice pod | `{}` |
| `jobservice.serviceAnnotations` | Annotations to add to the jobservice service | `{}` |
| `jobservice.priorityClassName` | The priority class to run the pod as | |
| `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. | |
| **Registry** | | |
Expand All @@ -264,6 +265,7 @@ The following table lists the configurable parameters of the Harbor chart and th
| `registry.affinity` | Node/Pod affinities | `{}` |
| `registry.middleware` | Middleware is used to add support for a CDN between backend storage and `docker pull` recipient. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#middleware). | |
| `registry.podAnnotations` | Annotations to add to the registry pod | `{}` |
| `registry.serviceAnnotations` | Annotations to add to the registry service | `{}` |
| `registry.priorityClassName` | The priority class to run the pod as | |
| `registry.secret` | Secret is used to secure the upload state from client and registry storage backend. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#http). If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | |
| `registry.credentials.username` | The username that harbor core uses internally to access the registry instance. Together with the `registry.credentials.password`, a htpasswd  is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). | `harbor_registry_user` |
Expand Down Expand Up @@ -343,6 +345,7 @@ The following table lists the configurable parameters of the Harbor chart and th
| `exporter.replicas` | The replica count | `1` |
| `exporter.revisionHistoryLimit` | The revision history limit | `10` |
| `exporter.podAnnotations` | Annotations to add to the exporter pod | `{}` |
| `exporter.serviceAnnotations` | Annotations to add to the exporter service | `{}` |
| `exporter.image.repository` | Repository for redis image | `goharbor/harbor-exporter` |
| `exporter.image.tag` | Tag for exporter image | `dev` |
| `exporter.nodeSelector` | Node labels for pod assignment | `{}` |
Expand Down
4 changes: 4 additions & 0 deletions templates/exporter/exporter-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
name: "{{ template "harbor.exporter" . }}"
labels:
{{ include "harbor.labels" . | indent 4 }}
{{- with .Values.exporter.serviceAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ports:
- name: {{ template "harbor.metricsPortName" . }}
Expand Down
4 changes: 4 additions & 0 deletions templates/jobservice/jobservice-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: "{{ template "harbor.jobservice" . }}"
labels:
{{ include "harbor.labels" . | indent 4 }}
{{- with .Values.jobservice.serviceAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ports:
- name: {{ ternary "https-jobservice" "http-jobservice" .Values.internalTLS.enabled }}
Expand Down
4 changes: 4 additions & 0 deletions templates/registry/registry-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: "{{ template "harbor.registry" . }}"
labels:
{{ include "harbor.labels" . | indent 4 }}
{{- with .Values.registry.serviceAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ports:
- name: {{ ternary "https-registry" "http-registry" .Values.internalTLS.enabled }}
Expand Down
8 changes: 8 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,8 @@ jobservice:
affinity: {}
## Additional deployment annotations
podAnnotations: {}
## Additional service annotations
serviceAnnotations: {}
## Additional deployment labels
podLabels: {}
# Secret is used when job service communicates with other components.
Expand Down Expand Up @@ -558,6 +560,8 @@ registry:
affinity: {}
## Additional deployment annotations
podAnnotations: {}
## Additional service annotations
serviceAnnotations: {}
## Additional deployment labels
podLabels: {}
## The priority class to run the pod as
Expand Down Expand Up @@ -788,6 +792,8 @@ redis:
existingSecret: ""
## Additional deployment annotations
podAnnotations: {}
## Additional service annotations
serviceAnnotations: {}
## Additional deployment labels
podLabels: {}

Expand All @@ -800,6 +806,8 @@ exporter:
# cpu: 100m
extraEnvVars: []
podAnnotations: {}
## Additional service annotations
serviceAnnotations: {}
## Additional deployment labels
podLabels: {}
serviceAccountName: ""
Expand Down