Open rwlove opened 2 months ago
This code assumes there is a tls.SecretName, my individual ingresses don't have a SecretName because they use the default TLS secret provided by ingress-nginx. I think there should be a NULL pointer check and break statement here, but I'm not proficient in Go.
for _, tls := range ing.Spec.TLS {
_, err := a.Client.GetClient().CoreV1().Secrets(ing.Namespace).Get(a.Context, tls.SecretName, metav1.GetOptions{})
if err != nil {
doc := apiDoc.GetApiDocV2("spec.tls.secretName")
failures = append(failures, common.Failure{
Text: fmt.Sprintf("Ingress uses the secret %s/%s as a TLS certificate which does not exist.", ing.Namespace, tls.SecretName)\
,
Checklist
Affected Components
K8sGPT Version
0.1.3
Kubernetes Version
v1.29.2
Host OS and its Version
CentOS / upstream K8S
Steps to reproduce
K8sGPT Operator, LocalAI backend.
Expected behaviour
No reported issues with Ingresses.
Actual behaviour
Failures with most, if not all, ingresses.
K8sGPT tells me that many of my ingresses are using an invalid TLS. Everything is working and I can access my services through the ingress without any problems, but I'm trying to cleanup these errors - everything looks fine to me.
In my ingress-nginx definition.
and
kubectl -n radio edit ingress snapserver
Additional Information
As far as I can tell there is no spec.tls.secretName, for my ingresses, so the failure is a false positive.