Skip to content

Commit

Permalink
Ability to add custom labels to Ingresses
Browse files Browse the repository at this point in the history
Update README accordingly

Signed-off-by: Michele Azzolari <[email protected]>
  • Loading branch information
macno committed Feb 9, 2022
1 parent ad922a6 commit 0a4299d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ The following table lists the configurable parameters of the Harbor chart and th
| `expose.ingress.kubeVersionOverride` | Allows the ability to override the kubernetes version used while templating the ingress | |
| `expose.ingress.annotations` | The annotations used commonly for ingresses | |
| `expose.ingress.harbor.annotations` | The annotations specific to harbor ingress | {} |
| `expose.ingress.harbor.labels` | The labels specific to harbor ingress | {} |
| `expose.ingress.notary.annotations` | The annotations specific to notary ingress | {} |
| `expose.ingress.notary.labels` | The labels specific to notary ingress | {} |
| `expose.clusterIP.name` | The name of ClusterIP service | `harbor` |
| `expose.clusterIP.annotations` | The annotations attached to the ClusterIP service | {} |
| `expose.clusterIP.ports.httpPort` | The service port Harbor listens on when serving with HTTP | `80` |
Expand Down
6 changes: 6 additions & 0 deletions templates/ingress/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ metadata:
name: "{{ template "harbor.ingress" . }}"
labels:
{{ include "harbor.labels" . | indent 4 }}
{{- if $ingress.harbor.labels }}
{{ toYaml $ingress.harbor.labels | indent 4 }}
{{- end }}
annotations:
{{ toYaml $ingress.annotations | indent 4 }}
{{- if .Values.internalTLS.enabled }}
Expand Down Expand Up @@ -156,6 +159,9 @@ metadata:
name: "{{ template "harbor.ingress-notary" . }}"
labels:
{{ include "harbor.labels" . | indent 4 }}
{{- if $ingress.notary.labels }}
{{ toYaml $ingress.notary.labels | indent 4 }}
{{- end }}
annotations:
{{ toYaml $ingress.annotations | indent 4 }}
{{- if eq .Values.expose.ingress.controller "ncp" }}
Expand Down
6 changes: 5 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ expose:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-body-size: "0"
notary:
# notary-specific annotations
# notary ingress-specific annotations
annotations: {}
# notary ingress-specific labels
labels: {}
harbor:
# harbor ingress-specific annotations
annotations: {}
# harbor ingress-specific labels
labels: {}
clusterIP:
# The name of ClusterIP service
name: harbor
Expand Down

0 comments on commit 0a4299d

Please sign in to comment.