Open SeanKilleen opened 10 months ago
Namespace definition -- appears to match the definition with the exception of the name (it previously existed):
Service account: matches definition, with the exception of namespace name:
Cluster Role -- matches definition:
Same for the Cluster Role Binding ([definition]()):
Same with operator deployment (reference) (I omitted managedFields
and status
for brevity)
I'll check the CRD resource deployment and send another update.
And here's the HealthCheck resource for, which appears to match the docs in spirit:
apiVersion: aspnetcore.ui/v1
kind: HealthCheck
metadata:
creationTimestamp: '2024-01-17T14:55:22Z'
generation: 1
name: healthchecks-ui
namespace: observability
resourceVersion: '71841262'
uid: d67be564-06df-4e5e-8e17-ee6f68e78489
spec:
name: healthchecks-ui
scope: Cluster
serviceType: ClusterIP
servicesLabel: HealthChecks
stylesheetContent: " :root { \r\n --primaryColor: #2a3950;\r\n --secondaryColor: #f4f4f4; \r\n --bgMenuActive: #e1b015;\r\n --bgButton: #e1b015;\r\n --logoImageUrl: url('https://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/WoW_icon.svg/1200px-WoW_icon.svg.png');\r\n --bgAside: var(--primaryColor); \r\n }\r\n"
A noticeable difference is that I'm specifying ClusterIP rather than LoadBalancer, but I'd be surprised if this was the issue.
My hunch at this point is that the issue is here: https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/blob/master/src/HealthChecks.UI.K8s.Operator/Operator/KubernetesAddressFactory.cs#L11C1-L11C46
The CreateAddress()
function refers to service.Spec.ClusterIP
for the address. I'm relatively newer to this, but my understanding is that for cross-namespace interaction, you'd really want something that's DNS-compatible, e.g. $"{service.Metadata.Name}.{service.Metadata.Namespace()}.svc.cluster.local"
.
I'd be happy to submit a PR for this if you agree. I'm brand new to contributing but would be happy to work through the process of testing it etc.
First off -- @sungam3r thank you for all the work you've put in and continue to put in on maintaining this. I know you're spread thin these days and I don't have enough familiarity to dig in yet as a contributor but I'm keeping it in mind now that I'm becoming an active user. I'll continue to look into this issue actively.
I followed the directions to setup the K8S operator and UI using the HealthCheck CRD. The operator is deployed in cluster mode.
✅ I see in the operator's logs that the system under monitoring is discovered, using its cluster IP. The The annotations for port and endpoint are correctly discovered (
:8080/healthz
). The endpoint for monitoring is pushed correctly to the UI.Logs from the operator showing success:
✅ When port forwarding the system under monitoring to my local machine, I can get to the health checks via
:8080/healthz
. So I know they're accessible from the app at that URL. ❌ Despite this, the health check UI fails to retrieve the health check:I'm thinking there may be an issue with the service account's permissions when operating in cluster mode. I'll post my kubernetes definitions shortly and will double-check that they match against the docs (I'm using Terraform so will make sure nothing got lost in translation there).
Environment: