Skip to content

Conversation

@iaiw3br
Copy link

@iaiw3br iaiw3br commented Feb 21, 2025

Proposed changes

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

Problem: Policies are created manually

Solution: Automatically create policies using a template and the go generate command.
To generate files need to use make generate command

Testing: Manual testing, I ran the command and got the generated files

Please focus on paths of the files or directories which I set.
I pushed this code to know can I use this method to generate policies ?

Closes #ISSUE

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.

NONE

@iaiw3br iaiw3br requested a review from a team as a code owner February 21, 2025 21:09
@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2025

🎉 Thank you for your contribution! It appears you have not yet signed the F5 Contributor License Agreement (CLA), which is required for your changes to be incorporated into an F5 Open Source Software (OSS) project. Please kindly read the F5 CLA and reply on a new comment with the following text to agree:


I have hereby read the F5 CLA and agree to its terms


Artem Ivanov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@iaiw3br
Copy link
Author

iaiw3br commented Feb 22, 2025

I have hereby read the F5 CLA and agree to its terms

Copy link
Collaborator

@sjberman sjberman left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Would you mind also including the issue number in the PR description so that it will be closed when the PR is merged?

}

// Template for generating policy methods
const tmpl = `// Code generated by gen_policies.go; DO NOT EDIT.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's deduplicate the common template and main function that we have in both v1alpha1 and v1alpha2 into a common file, maybe in apis/ top-level. Then we can just include the specific policy lists in each api version directory.

The package version at the top of the template could also be provided as a templated value.

@github-actions
Copy link
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale Pull requests/issues with no activity label Mar 13, 2025
@github-actions
Copy link
Contributor

This PR was closed because it has been stalled for 14 days with no activity.

@github-actions github-actions bot closed this Mar 27, 2025
@github-project-automation github-project-automation bot moved this from External Pull Requests to ✅ Done in NGINX Gateway Fabric Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Pull requests/issues with no activity

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants