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(policies): improve targetRef validation #5174

Merged
merged 1 commit into from
Oct 21, 2022
Merged

Conversation

lahabana
Copy link
Contributor

@lahabana lahabana commented Oct 19, 2022

  • disallow setting name with kind: Mesh as it's unclear what it will mean
  • disallow setting mesh with all kinds as it's unclear what it will mean too
  • disallow using MeshHTTPRoute the thing is not even defined
  • rewrite validator for targetRef to use the same wording everywhere

Fix #5165

Checklist prior to review

  • Link to docs PR or issue --
  • Link to UI issue or PR --
  • Is the issue worked on linked? --
  • The PR does not hardcode values that might break projects that depend on kuma (e.g. "kumahq" as a image registry) --
  • The PR will work for both Linux and Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Unit Tests --
  • E2E Tests --
  • Manual Universal Tests --
  • Manual Kubernetes Tests --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

Changelog: feat(policy): reimplemented matching for new policies

Copy link
Contributor

@michaelbeaumont michaelbeaumont left a comment

Choose a reason for hiding this comment

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

LGTM, title out of date?

@lahabana lahabana changed the title fix(policies): assume missing targetRef as kind: Mesh fix(policies): improve targetRef validation Oct 21, 2022
- disallow setting name with `kind: Mesh` as it's unclear what it will mean
- disallow setting mesh with all kinds as it's unclear what it will mean too
- disallow using `MeshHTTPRoute` the thing is not even defined
- rewrite validator for targetRef to use the same wording everwhere

Fix kumahq#5165

Signed-off-by: Charly Molter <[email protected]>

make targetRef compulsory
@lahabana lahabana enabled auto-merge (squash) October 21, 2022 14:30
@lahabana lahabana merged commit 5c48da6 into kumahq:master Oct 21, 2022
@lahabana lahabana mentioned this pull request Dec 13, 2022
@lahabana lahabana deleted the fix5165 branch March 29, 2024 12:43
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.

kuma-cp crashes with empty top level targetRef
2 participants