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 controller to snippetsFilter status #2570

Conversation

salonichf5
Copy link
Contributor

@salonichf5 salonichf5 commented Sep 17, 2024

Proposed changes

Write a clear and concise description that helps reviewers understand the purpose and impact of your changes. Use the
following format:

Problem: Users want to ensure controller name is added when condition is added to SnippetsFilter.

Solution: Modify the SnippetsFilterStatus to include controller name writing status.

Testing: Unit tests

Manual Testing with two installations of NGF using different controllers

k describe snippetsfilters.gateway.nginx.org access-control
Name:         access-control
Namespace:    default
Labels:       <none>
Annotations:  <none>
API Version:  gateway.nginx.org/v1alpha1
Kind:         SnippetsFilter
Metadata:
  Creation Timestamp:  2024-09-18T16:05:05Z
  Generation:          2
  Resource Version:    599427
  UID:                 0da2968d-396e-4677-bf5f-b17be5ca4e12
Spec:
  Snippets:
    Context:  http
    Value:    limit_req_zone $binary_remote_addr zone=myzone:10m rate=1r/s;
    Context:  http.server.location
    Value:    limit_req zone=myzone burst=3;
Status:
  Controllers:
    Conditions:
      Last Transition Time:  2024-09-18T20:42:58Z
      Message:               SnippetsFilter is accepted
      Observed Generation:   2
      Reason:                Accepted
      Status:                True
      Type:                  Accepted
    Controller Name:         gateway.nginx.org/nginx-gateway-controller
    Conditions:
      Last Transition Time:  2024-09-18T20:43:20Z
      Message:               SnippetsFilter is accepted
      Observed Generation:   2
      Reason:                Accepted
      Status:                True
      Type:                  Accepted
    Controller Name:         gateway.nginx.org/nginx-gateway-controller-2
Events:                      <none>
sa.choudhary@N9939CQ4P0 ~ %

Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide
specific feedback, add them here.

Closes #2542

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.


@salonichf5 salonichf5 requested review from a team as code owners September 17, 2024 18:54
@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 17, 2024
@kate-osborn
Copy link
Contributor

@salonichf5 did you manually test this?

@salonichf5
Copy link
Contributor Author

@salonichf5 did you manually test this?

working on it :)

Copy link
Contributor

@ADubhlaoich ADubhlaoich left a comment

Choose a reason for hiding this comment

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

LGTM from a docs perspective but as the docs changes are minimal I will not give an approval in the context of the PR mostly being code.

Copy link
Contributor

@kate-osborn kate-osborn left a comment

Choose a reason for hiding this comment

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

Looks good @salonichf5

Just make sure to add the issue number to the pull request so it will be linked to the PR

@bjee19
Copy link
Contributor

bjee19 commented Sep 19, 2024

LGTM!

Just make sure to follow Kate's comment and add the issue number to the PR.

@salonichf5 salonichf5 merged commit 7a3725c into nginxinc:feature/snippets-filter Sep 19, 2024
23 of 24 checks passed
kate-osborn pushed a commit that referenced this pull request Sep 24, 2024
Add controller to snippetsFilter status

Problem: Users want to ensure controller name is added when condition is added to SnippetsFilter.

Solution: Modify the SnippetsFilterStatus to include controller name writing status.
salonichf5 added a commit that referenced this pull request Oct 8, 2024
Add controller to snippetsFilter status

Problem: Users want to ensure controller name is added when condition is added to SnippetsFilter.

Solution: Modify the SnippetsFilterStatus to include controller name writing status.
salonichf5 added a commit that referenced this pull request Oct 8, 2024
Add controller to snippetsFilter status

Problem: Users want to ensure controller name is added when condition is added to SnippetsFilter.

Solution: Modify the SnippetsFilterStatus to include controller name writing status.
sjberman pushed a commit that referenced this pull request Oct 8, 2024
Add controller to snippetsFilter status

Problem: Users want to ensure controller name is added when condition is added to SnippetsFilter.

Solution: Modify the SnippetsFilterStatus to include controller name writing status.
salonichf5 added a commit that referenced this pull request Oct 8, 2024
Add controller to snippetsFilter status

Problem: Users want to ensure controller name is added when condition is added to SnippetsFilter.

Solution: Modify the SnippetsFilterStatus to include controller name writing status.
sjberman pushed a commit that referenced this pull request Oct 9, 2024
Add controller to snippetsFilter status

Problem: Users want to ensure controller name is added when condition is added to SnippetsFilter.

Solution: Modify the SnippetsFilterStatus to include controller name writing status.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants