mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2025-07-31 19:08:07 +00:00
combine logic of label and providerId in isAKS function
This commit is contained in:
parent
db04033730
commit
fc04edab9e
@ -505,6 +505,10 @@ func IsAKS(ctx context.Context, k8sClient kubernetes.Interface) (bool, error) {
|
||||
}
|
||||
|
||||
node := nodes.Items[0]
|
||||
labels := node.Labels
|
||||
if _, exists := labels["kubernetes.azure.com/cluster"]; exists {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
if strings.HasPrefix(node.Spec.ProviderID, "azure://") {
|
||||
return true, nil
|
||||
|
Loading…
Reference in New Issue
Block a user