Skip to content

Align AccessPolicy condition comments and constants with Gateway API#232

Open
haiyanmeng wants to merge 1 commit intokubernetes-sigs:mainfrom
haiyanmeng:update-policy-condition-comment
Open

Align AccessPolicy condition comments and constants with Gateway API#232
haiyanmeng wants to merge 1 commit intokubernetes-sigs:mainfrom
haiyanmeng:update-policy-condition-comment

Conversation

@haiyanmeng
Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

  • Update comments for PolicyConditionAccepted in accesspolicy_types.go to explicitly list valid reasons for True and False states, matching Gateway API style.
  • Define PolicyReasonAccepted as a PolicyConditionReason constant to avoid hardcoding "Accepted".
  • Update pkg/controller/accesspolicy.go and pkg/translator/common_test.go to use the new PolicyReasonAccepted constant instead of literal strings.
  • Refine comments for reasons to use "This reason is used..." phrasing.

Does this PR introduce a user-facing change?:

NONE

- Update comments for `PolicyConditionAccepted` in
  `accesspolicy_types.go` to explicitly list valid reasons for True and
  False states, matching Gateway API style.
- Define `PolicyReasonAccepted` as a `PolicyConditionReason` constant to
  avoid hardcoding `"Accepted"`.
- Update `pkg/controller/accesspolicy.go` and
  `pkg/translator/common_test.go` to use the new `PolicyReasonAccepted`
  constant instead of literal strings.
- Refine comments for reasons to use "This reason is used..." phrasing.
@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Apr 8, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 8, 2026

Deploy Preview for kube-agentic-networking ready!

Name Link
🔨 Latest commit d58c3d3
🔍 Latest deploy log https://app.netlify.com/projects/kube-agentic-networking/deploys/69d65c8927d3440008ad3ee3
😎 Deploy Preview https://deploy-preview-232--kube-agentic-networking.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 8, 2026
@LiorLieberman
Copy link
Copy Markdown
Member

/approve

/cc @guicassolato for lgtm

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@LiorLieberman: GitHub didn't allow me to request PR reviews from the following users: lgtm, for.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/approve

/cc @guicassolato for lgtm

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.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haiyanmeng, LiorLieberman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants