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

fix(policy): improve targetRef name and tags validation #7972

Merged
merged 12 commits into from
Oct 19, 2023

Conversation

alparslanavci
Copy link
Contributor

@alparslanavci alparslanavci commented Oct 5, 2023

Added validation for targetRef name and tags as required. Also, MeshGateway and MeshHTTPRoute kind validations are included.

Fix #7912

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues --
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label) --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

@alparslanavci alparslanavci requested a review from a team as a code owner October 5, 2023 22:58
@alparslanavci alparslanavci requested review from Automaat and bartsmykla and removed request for a team October 5, 2023 22:58
Added validation for targetRef name and tags as required. Also, MeshGateway and MeshHTTPRoute kind validations are included.

Signed-off-by: alparslanavci <alparslanavci@gmail.com>
@slonka
Copy link
Contributor

slonka commented Oct 9, 2023

@bartsmykla @Automaat can you take a look at this? also @lobkovilya might be interested

Copy link
Contributor

@bartsmykla bartsmykla left a comment

Choose a reason for hiding this comment

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

few nits but lgtm overall

@alparslanavci
Copy link
Contributor Author

Thanks for the review, @bartsmykla!

Copy link
Contributor

@lahabana lahabana left a comment

Choose a reason for hiding this comment

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

I think we're reintroducing things that already exists.

Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
@bartsmykla
Copy link
Contributor

@alparslanavci I allowed myself to address @lahabana remarks. Please have a look if everything is ok for you and I would merge it then.

bartsmykla and others added 3 commits October 19, 2023 10:38
Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: alparslanavci <alparslanavci@gmail.com>
This reverts commit 75e2a38.

Signed-off-by: alparslanavci <alparslanavci@gmail.com>
@alparslanavci
Copy link
Contributor Author

Thanks for the help, @bartsmykla! I was a bit busy in the last few days, couldn't find a chance to address the comments. I am ok to go ahead 👍

(I think we tried to fix the failing tests at the same time, thus I reverted my latest commit.)

@bartsmykla bartsmykla enabled auto-merge (squash) October 19, 2023 08:59
@bartsmykla bartsmykla merged commit 95ab5c4 into kumahq:master Oct 19, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

validation on name for targetRef is too weak
4 participants