We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d2a2ae commit 17c3577Copy full SHA for 17c3577
internal/types/k8s.go
@@ -210,5 +210,8 @@ func GvkOf(obj any) schema.GroupVersionKind {
210
}
211
212
func GetEffectiveIngressClassName(ingress *netv1.Ingress) string {
213
- return ptr.Deref(ingress.Spec.IngressClassName, ingress.GetAnnotations()[IngressClassNameAnnotation])
+ if cls := ptr.Deref(ingress.Spec.IngressClassName, ""); cls != "" {
214
+ return cls
215
+ }
216
+ return ingress.GetAnnotations()[IngressClassNameAnnotation]
217
0 commit comments