You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a helm chart to run in a release pipeline in devops with the flag --wait. The build task times out and with --debug flag it continuously shows:
2020-02-03T07:46:29.3015941Z wait.go:182: [debug] Service does not have IP address: ******
But when I check the service in k8s it is running and functioning properly.
Can you check your service inside the cluster to see if it has a clusterIP defined? That particular error points to a section of the code where it checks if a clusterIP is defined. If you found an edge case, would you mind writing a patch and possibly a test case to confirm this? Thanks!
It appears to have a clusterIP. Here's the info I get:
PS C:\Windows\system32> kubectl get svc identityserver
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
identityserver LoadBalancer 10.97.18.188 172.16.253.90 80:31824/TCP,443:30141/TCP 5m24s
The kubernetes reference says: externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.
For that reason, when externalIPs is used and --wait flag is set, helm should not wait for .Status.LoadBalancer.Ingress to be different from nil
Possible solution
Changing the condition of serviceReady function with something similar to the following code should be enough:
// Make sure the service is not explicitly set to "None" before checking the IPifs.Spec.ClusterIP!=corev1.ClusterIPNone&&s.Spec.ClusterIP=="" {
returnfalse
}
// This checks if the service has a LoadBalancer and that balancer has an Ingress definedifs.Spec.Type==corev1.ServiceTypeLoadBalancer {
iflen(s.Spec.ExternalIPs) >0 {
w.log("Service has externaIPs addresses: %s/%s (%v)", s.GetNamespace(), s.GetName(), s.Spec.ExternalIPs)
returntrue
}
ifs.Status.LoadBalancer.Ingress==nil {
w.log("Service does not have IP address: %s/%s", s.GetNamespace(), s.GetName())
returnfalse
}
}
@bacongobbler you labeled the issue as question but I think is a bug, what do you think?
If a PR is welcome I can deal with that in a while.
I am having the same issue with version.BuildInfo{Version:"v3.4.2", GitCommit:"23dd3af5e19a02d4f4baa5b2f242645a1a3af629", GitTreeState:"dirty", GoVersion:"go1.15.5"} on Kubernetes via Docker for Mac.
wait.go:53: [debug] beginning wait for 3 resources with timeout of 5m0s
wait.go:206: [debug] Service does not have load balancer ingress IP address:
Could be unrelated since external-ip stays pending?
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
backend LoadBalancer 10.110.36.195 <pending> 9300:32716/TCP 9m57s
frontend LoadBalancer 10.98.164.228 localhost 9300:31655/TCP 10m
Activity
bacongobbler commentedon Feb 3, 2020
Can you check your service inside the cluster to see if it has a
clusterIPdefined? That particular error points to a section of the code where it checks if aclusterIPis defined. If you found an edge case, would you mind writing a patch and possibly a test case to confirm this? Thanks!Here's the code:
helm/pkg/kube/wait.go
Lines 190 to 196 in d8a32d6
ArieGato commentedon Feb 4, 2020
It appears to have a clusterIP. Here's the info I get:
The failing condition appears to be:
s.Status.LoadBalancer.Ingress == nilI'm unfamiliar with helm. How do I 'write a patch'? Is there a way to get verbose information of object s?
ps. I followed the developers guide, but the make file doesn't seem to work on Windows. Any suggestions?
FedeBev commentedon Feb 5, 2020
I'm facing the same problem.
The kubernetes reference says: externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.
For that reason, when
externalIPsis used and--waitflag is set, helm should not wait for.Status.LoadBalancer.Ingressto be different fromnilPossible solution
Changing the condition of
serviceReadyfunction with something similar to the following code should be enough:@bacongobbler you labeled the issue as question but I think is a bug, what do you think?
If a PR is welcome I can deal with that in a while.
fix(helm): Don't wait for service to be ready when external IP are set
fix(helm): Don't wait for service to be ready when external IP are set
fix(helm): Don't wait for service to be ready when external IP are set
fix(helm): Don't wait for service to be ready when external IP are set
fix(helm): Don't wait for service to be ready when external IP are set
fix(helm): Don't wait for service to be ready when external IP are set
Feat/oci dependencies (#1)
fix(helm): Don't wait for service to be ready when external IP are set
hazcod commentedon Jan 7, 2021
I am having the same issue with
version.BuildInfo{Version:"v3.4.2", GitCommit:"23dd3af5e19a02d4f4baa5b2f242645a1a3af629", GitTreeState:"dirty", GoVersion:"go1.15.5"}on Kubernetes via Docker for Mac.Could be unrelated since external-ip stays pending?