Skip to content

Commit

Permalink
feat: support custom labels for internal service
Browse files Browse the repository at this point in the history
This change allows configuring labels specifically for the internal
service without affecting the main controller service, useful for
external-dns configuration.
  • Loading branch information
samuelarogbonlo committed Jan 15, 2025
1 parent 8da3423 commit 2e25b63
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ controller:
enabled: true
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: "true"
labels:
external-dns.alpha.kubernetes.io/hostname: internal.example.com

Check failure on line 16 in charts/ingress-nginx/ci/controller-service-internal-values.yaml

View workflow job for this annotation

GitHub Actions / Chart / Lint

16:1 [trailing-spaces] trailing spaces
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
{{- if .Values.controller.service.labels }}
{{- toYaml .Values.controller.service.labels | nindent 4 }}
{{- end }}
{{- if .Values.controller.service.internal.labels }}
{{- toYaml .Values.controller.service.internal.labels | nindent 4 }}
{{- end }}
name: {{ include "ingress-nginx.controller.fullname" . }}-internal
namespace: {{ include "ingress-nginx.namespace" . }}
spec:
Expand Down
2 changes: 2 additions & 0 deletions charts/ingress-nginx/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,8 @@ controller:
# -- Type of the internal controller service.
# Defaults to the value of `controller.service.type`.
# Ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
labels: {}
# -- Type of the internal controller service.
type: ""
# -- Pre-defined cluster internal IP address of the internal controller service. Take care of collisions with existing services.
# This value is immutable. Set once, it can not be changed without deleting and re-creating the service.
Expand Down

0 comments on commit 2e25b63

Please sign in to comment.