-
Notifications
You must be signed in to change notification settings - Fork 33
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: Add policy conflict to dnspolicy validation #995
fix: Add policy conflict to dnspolicy validation #995
Conversation
api/v1/tlspolicy_types.go
Outdated
@@ -191,7 +191,7 @@ func (p *TLSPolicy) GetRulesHostnames() []string { | |||
return make([]string, 0) | |||
} | |||
|
|||
// DEPRECATED: Use GetTargetRefs instead | |||
// Deprecated: kuadrant.Policy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Deprecated:" seems to be the correct way to do this in Go https://go.dev/wiki/Deprecated, linter will fail if this is used anywhere.
We can likely remove all these soon anyway, if not already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, they all are in #992
} | ||
|
||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are pretty much copied from the TLSPolicy, we should probably look at making generic functions that can be used by both.
Updates the dnspolicies validator task to check for polices with conflicting target refs, only one policy can currently target a specific gateway or listener. Uses the same logic as TLS, first policy created is given preference over any created later. Some other small changes to align DNSPolicy and TLSPolicy. Signed-off-by: Michael Nairn <[email protected]>
e40b44b
to
3ca2c69
Compare
Updates the dnspolicies validator task to check for polices with conflicting target refs, only one policy can currently target a specific gateway or listener. Uses the same logic as TLS, first policy created is given preference over any created later. Some other small changes to align DNSPolicy and TLSPolicy. Signed-off-by: Michael Nairn <[email protected]>
Updates the dnspolicies validator task to check for polices with conflicting target refs, only one policy can currently target a specific gateway or listener. Uses the same logic as TLS, first policy created is given preference over any created later.
Some other small changes to align DNSPolicy and TLSPolicy.