The Drone itself has been of course deployed with :
- name: DRONE_KUBERNETES_ENABLED
value: “true”
- name: DRONE_KUBERNETES_NAMESPACE
value: “drone”
- name: DRONE_KUBERNETES_SERVICE_ACCOUNT
value: “drone”
The services are spawned but when my tests begins :
2019/04/08 18:31:54 connecting to PostgreSQL database
2019/04/08 18:31:54 error when trying to connect to PostgreSQL : dial tcp: lookup postgres on
10.96.0.10:53: no such host
10.96.0.10 is the K8s DNS server.
I’ve I missed something ?
Not sure, but we have a thread that you can use to help debug issues with the Kubernetes runtime and recommend changes/ improvements. See Contributing to Drone for Kubernetes
The spec.ports[0].name and spec.ports[0].name is well filled via func toService(spec *engine.Spec, step *engine.Step) *v1.Service on util.go.
If I take my .chrono.yml file, I translate them with drone-yaml into a json file and I use this json file through drone-runtime and pointing to my current Kubernetes cluster, everything run fine…
But fail on my drone server deployed with the latest docker image available yesterday.
The only suspect could be the old version of k8s.io/client-go (v9) you use, incompatible with my cluster version (v1.13.4).
The only suggestion I can do is to try to build a a docker version that use k8s.io/client-go v11.0.0 (the last available)…
P.S. This only fail for service(s) that had more than one listen port (because in this case, the port name is mandatory in K8s)