ori-edge / k8s_gateway

A CoreDNS plugin to resolve all types of external Kubernetes resources
Apache License 2.0
289 stars 61 forks source link

feat(gateway-apis) - v1.0.0 GA #249

Closed larivierec closed 7 months ago

larivierec commented 7 months ago

This PR is an updated version based on the current master and is tested and working in local cluster. Keep in mind that v1alpha2 is still relevant as the experimental crds are still applied at that level.

I am aware that there is another PR, however, I had already done the work previously anyway.

Feel free to close this if it's not required.

Logs:

k8s-gateway svc ip is important

(⎈|colima:kube-system)➜  unifi git:(feature/add-unifi-tf) ✗ k get svc
NAME                    TYPE           CLUSTER-IP     EXTERNAL-IP      PORT(S)                      AGE
kube-dns                ClusterIP      10.43.0.10     <none>           53/UDP,53/TCP,9153/TCP       17m
metrics-server          ClusterIP      10.43.18.223   <none>           443/TCP                      17m
hubble-peer             ClusterIP      10.43.21.104   <none>           443/TCP                      14m
excoredns-k8s-gateway   NodePort       10.43.34.18    <none>           53:32553/UDP                 13m
cilium-ingress          LoadBalancer   10.43.155.94   198.51.100.112   80:32339/TCP,443:30932/TCP   14m

queries:

christopher@colima:/Users/christopher$ dig myservicegrpc.gw.foo.org @10.43.34.18

; <<>> DiG 9.18.18-0ubuntu2-Ubuntu <<>> myservicegrpc.gw.foo.org @10.43.34.18
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26660
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 09ae29d11d938612 (echoed)
;; QUESTION SECTION:
;myservicegrpc.gw.foo.org.  IN  A

;; ANSWER SECTION:
myservicegrpc.gw.foo.org. 300   IN  A   198.51.100.4

; <<>> DiG 9.18.18-0ubuntu2-Ubuntu <<>> myserviceb.gw.foo.org @10.43.34.18 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47827 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ; COOKIE: fd039059af29633a (echoed) ;; QUESTION SECTION: ;myserviceb.gw.foo.org. IN A

;; ANSWER SECTION: myserviceb.gw.foo.org. 300 IN A 198.51.100.4

;; Query time: 0 msec ;; SERVER: 10.43.34.18#53(10.43.34.18) (UDP) ;; WHEN: Wed Nov 22 14:25:57 UTC 2023 ;; MSG SIZE rcvd: 99

christopher@colima:/Users/christopher$ dig myserviced.gw.foo.org @10.43.34.18

; <<>> DiG 9.18.18-0ubuntu2-Ubuntu <<>> myserviced.gw.foo.org @10.43.34.18 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30098 ;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1 ;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ; COOKIE: a8adb7e67e66206c (echoed) ;; QUESTION SECTION: ;myserviced.gw.foo.org. IN A

;; ANSWER SECTION: myserviced.gw.foo.org. 300 IN A 198.51.100.4 myserviced.gw.foo.org. 300 IN A 198.51.100.179

;; Query time: 0 msec ;; SERVER: 10.43.34.18#53(10.43.34.18) (UDP) ;; WHEN: Wed Nov 22 14:26:02 UTC 2023 ;; MSG SIZE rcvd: 136

larivierec commented 7 months ago

Any updates on this?

networkop commented 7 months ago

I'll cut a new release tomorrow

networkop commented 7 months ago

@larivierec looks like the readme is still not updated with gwAPI CRD version. Do you want to send a PR?

larivierec commented 7 months ago

Oops, yeah, I'll do that this morning

@networkop #250 for next release cut. :)