mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-07 10:11:08 +00:00
feat: add Gateway analysers (#764)
* feat: add GatewayClass analyser Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com> * chore: add a valid GW class object Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com> * feat: add gw analyzer and switch to controller-runtime client Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com> * chore: add unit tests for gw analyser Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com> * chore: replace constants with condition status Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com> * feat: add httproute analyzer Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com> * feat: add HTTPRoute individual tests. Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com> * docs: add analyzers Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com> --------- Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com> Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io> Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
This commit is contained in:
@@ -219,3 +219,14 @@ func MapToString(m map[string]string) string {
|
||||
}
|
||||
return result[:len(result)-1]
|
||||
}
|
||||
|
||||
func LabelsIncludeAny(predefinedSelector, Labels map[string]string) bool {
|
||||
// Check if any label in the predefinedSelector exists in Labels
|
||||
for key := range predefinedSelector {
|
||||
if _, exists := Labels[key]; exists {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user