Node selection for fully qualified node-names fails (--node=ip-xx-xx-xx-xx.myzone.com) #2374
Labels
kind/bug
Categorizes issue or PR as related to a bug.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What happened:
I’m trying to use the
kube-state-metrics
pods in the DaemonSet mode with--resources=pods
and--node=$(NODE_NAME)
… in my local testing on a Kind environment, it worked fine. However when I run it in a real EKS cluster to test, I get an odd behavior. We see the fieldSelector get created with the node-name … but it’s missing the.
's:eg:
and then we see this:
We can verify that we are passing
ip-100-80-189-206.us-west-2.compute.internal
into the CLI arg properly:The reason we looked into it is because the pod is coming up - but it’s not reporting any metrics:
After digging, I found #2217 which introduced a Regex Pattern that only matches hostnames, and not FQDNs at
kube-state-metrics/pkg/options/types.go
Lines 142 to 154 in d1f04c2
What you expected to happen:
I expect that the input we pass in will be the input that is used - whether it is correct or not. I was completely thrown to see the code mutating my input, and effectively making the fieldSelector invalid.
Anything else we need to know?:
Environment:
kubectl version
): 1.28.4The text was updated successfully, but these errors were encountered: