-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
feat: add support for internal service specific labels #12704
base: main
Are you sure you want to change the base?
feat: add support for internal service specific labels #12704
Conversation
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: samuelarogbonlo The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @samuelarogbonlo! |
Hi @samuelarogbonlo. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
✅ Deploy Preview for kubernetes-ingress-nginx canceled.
|
1f89703
to
17827d8
Compare
17827d8
to
66edf87
Compare
charts/ingress-nginx/ci/controller-service-internal-labels-values.yaml
Outdated
Show resolved
Hide resolved
charts/ingress-nginx/templates/controller-service-internal.yaml
Outdated
Show resolved
Hide resolved
charts/ingress-nginx/templates/controller-service-internal.yaml
Outdated
Show resolved
Hide resolved
/hold |
66edf87
to
13f3e6c
Compare
8a66548
to
2e25b63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better! Thank you! Please also consider adding unit tests in the tests/
directory.
labels: {} | ||
# -- Type of the internal controller service. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess something went wrong here, right?
{{- if .Values.controller.service.internal.labels }} | ||
{{- toYaml .Values.controller.service.internal.labels | nindent 4 }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better! Could you now also add such a field to the external service?
@@ -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 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2e25b63
to
53ff818
Compare
This change allows configuring labels specifically for the internal service without affecting the main controller service, useful for external-dns configuration. The commit also includes minor YAML indentation fixes in the deployment template.
53ff818
to
748a1eb
Compare
Add support for internal service specific labels
Fixes #12428
Description
This PR adds the ability to specify labels specifically for the internal ingress-nginx service without affecting the main controller service. This is particularly useful for use cases like external-dns configuration where labels need to be set only on the internal service.
Changes
Code Changes
From
{{- if and .Values.controller.service.enabled .Values.controller.service.internal.enabled .Values.controller.service.internal.annotations -}}
To
{{- if and .Values.controller.service.enabled .Values.controller.service.internal.enabled -}}
Testing Performed
Tested the following scenarios:
Test configuration added in:
charts/ingress-nginx/ci/controller-service-internal-labels-values.yaml
Usage Example
Backward Compatibility
This change maintains backward compatibility by:
Checklist