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

add service/secret eventHandler for ingress #1471

Merged
merged 1 commit into from
Oct 8, 2020
Merged

add service/secret eventHandler for ingress #1471

merged 1 commit into from
Oct 8, 2020

Conversation

M00nF1sh
Copy link
Collaborator

@M00nF1sh M00nF1sh commented Oct 8, 2020

add service/secret eventHandler for ingress.

how it works

The service eventHandler watches for Service changes and enqueue Ingress that using this service as backend.
The secret eventHandler watches for Secret changes and push event to IngressEventHandler or ServiceEventHandler when the secret is used as OIDC secret on ingress or service.

  • when secret is used as OIDC secret on ingress, it will push a generic Ingress event to IngressEventHandler.
  • when secret is used as OIDC secret on service, it will push a generic Service event to ServiceEventHandler, which in turn will push a generic Ingress event to IngressEventHandler.

additional changes

  1. adjust MaxConcurrentReconciles to 3 for all controllers.
  2. adjust code styles

test done

  1. tested by trigger annotation changes on service and observed desired changes.
  2. tested by trigger secret changes on secret used as OIDC secret by service, and observed desired changes.
  3. tested by trigger secret changes on secret used as OIDC secret by ingress, and observed desired changes.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: M00nF1sh
To complete the pull request process, please assign after the PR has been reviewed.
You can assign the PR to them by writing /assign in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 8, 2020
@@ -52,6 +58,7 @@ func (h *enqueueRequestsForIngressEvent) Delete(e event.DeleteEvent, queue workq
}

func (h *enqueueRequestsForIngressEvent) Generic(e event.GenericEvent, queue workqueue.RateLimitingInterface) {
h.enqueueIfBelongsToGroup(queue, e.Object.(*networking.Ingress))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why we are handling this event?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the service eventHandler will enqueue a generic Ingress event if there is a OIDC secret change happens

@M00nF1sh M00nF1sh merged commit 77eba68 into kubernetes-sigs:v2_ga Oct 8, 2020
Timothy-Dougherty pushed a commit to adammw/aws-load-balancer-controller that referenced this pull request Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants