Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control coredns hosts config map #9

Merged
merged 2 commits into from
Dec 17, 2019
Merged

Control coredns hosts config map #9

merged 2 commits into from
Dec 17, 2019

Conversation

ytsarev
Copy link
Member

@ytsarev ytsarev commented Dec 16, 2019

  • Collect IPs of healthy worker nodes
  • Collect ingress hostnames with healthy services in the backend
  • Update gslb.hosts data section of coredns config map
  • Enhance health status resolution - rely on healthy EndpointSubset.Addresses
  • Associated test suite extension/refactoring

* Collect IPs of healthy worker nodes
* Collect ingress hostnames with healthy services in the backend
* Update `gslb.hosts` data section of coredns config map
* Enhance health status resolution - rely on healthy `EndpointSubset.Addresses`
* Associated test suite extension/refactoring
@ytsarev
Copy link
Member Author

ytsarev commented Dec 16, 2019

Most recent spec/status example:

Spec:
  Ingress:
    Rules:
      Host:  app.cloud.absa.internal
      Http:
        Paths:
          Backend:
            Service Name:  app
            Service Port:  http
          Path:            /
      Host:                app1.cloud.absa.external
      Http:
        Paths:
          Backend:
            Service Name:  unhealthy-nginx
            Service Port:  http
          Path:            /
      Host:                app2.cloud.absa.external
      Http:
        Paths:
          Backend:
            Service Name:  healthy-nginx
            Service Port:  http
          Path:            /
  Strategy:                roundRobin
Status:
  Healthy Workers:
    Kind - Control - Plane:  172.17.0.2
  Managed Hosts:
    app.cloud.absa.internal
    app1.cloud.absa.external
    app2.cloud.absa.external
  Service Health:
    app.cloud.absa.internal:   NotFound
    app1.cloud.absa.external:  Unhealthy
    app2.cloud.absa.external:  Healthy

@ytsarev
Copy link
Member Author

ytsarev commented Dec 17, 2019

@donovanmuller While being distracted on status function fixes I forgot to provide core example for this PR :)

$ kubectl get svc gslb-coredns-coredns
NAME                   TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)                     AGE
gslb-coredns-coredns   NodePort   10.98.255.208   <none>        53:30649/UDP,53:32411/TCP   4d17h
kubectl get ing
NAME           HOSTS                                                                       ADDRESS   PORTS   AGE
example-gslb   app.cloud.absa.internal,app1.cloud.absa.external,app2.cloud.absa.external             80      19h
$ kubectl run -it --rm --restart=Never --image=infoblox/dnstools:latest dnstools
If you don't see a command prompt, try pressing enter.

dnstools# dig +short @10.98.255.208 app.cloud.absa.internal
dnstools# dig +short @10.98.255.208 app1.cloud.absa.external
dnstools# dig +short @10.98.255.208 app2.cloud.absa.external
172.17.0.2

In the above example only healthy host/service is getting resolved by coredns

@ytsarev ytsarev merged commit a6a3a1f into master Dec 17, 2019
@ytsarev ytsarev deleted the corednsconfigmap branch December 17, 2019 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants