* kubernetes: add multicluster support
Add multicluster support via Multi-Cluster Services API (MCS-API) via a
new option `multiclusterZones` in the kubernetes plugin.
When some multicluster zones are passed to the kubernetes plugin, it
will start watching the ServiceImport objects and its associated
EndpointSlices.
Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
* kubernetes: implement xfr support for multicluster zones
Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
---------
Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
Don't explicitly set `RetryOnError` to `false`. It won't exist in the
next version of the k8s api and it won't make a difference in this code
since the struct would default to that.
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
Forward information that a upstream response is truncated when rewriting
a CNAME. Otherwise, the cache plugin stores the truncated resonse,
making it impossible to receive the full response as a client via TCP.
Signed-off-by: Yannick Epstein <yannicke@spotify.com>
Use the functionality provided by the Go standard library slices package
since Go 1.21 instead of the deprecated functions in the
k8s.io/utils/strings/slices package.
Signed-off-by: Tobias Klauser <tobias@isovalent.com>
* add zone for link-local IPv6 instead of skipping
Signed-off-by: Till Riedel <riedel@teco.edu>
* revert changed error handling for IPs
Signed-off-by: Till Riedel <riedel@teco.edu>
---------
Signed-off-by: Till Riedel <riedel@teco.edu>
In kubernetes' audit logs you'll see:
"userAgent":"coredns/v0.0.0 (linux/amd64) kubernetes/$Format"
This change adds a userAgent to the requests made by CoreDNS against the kubernetes API:
"userAgent":"CoreDNS/v1.11.1 git_commit:ae2bbc29be1aaae0b3ded5d188968a6c97bb3144 (linux/amd64/go1.22)"
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
* Update build
* Update Go to 1.23.0
* Update minimum Go version to 1.22.
* Update golangci-lint to v1.60.1.
* Make GitHub action version hash/tag consistent.
* Increase dependabot open PRs from 5 to 20.
Signed-off-by: SuperQ <superq@gmail.com>
* Fixup lint issue.
Signed-off-by: SuperQ <superq@gmail.com>
---------
Signed-off-by: SuperQ <superq@gmail.com>
* Upgrade antonmedv/expr to expr-lang/expr
The project has moved. This also upgrades from 1.15.5 to 1.16.9.
The expr project lacks a changelog but tests pass and the changes don't
seem to change it much - but there were a lot of changes.
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
* Upgrade build image
In reviewing the build results I see the old build image was deprecated so
upgrading to something newer.
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
---------
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
Allows the forward plugin to execute the next plugin based on the return code. Similar to the externally mainted alternate plugin https://github.com/coredns/alternate
Based on the idea of chrisohaver@ in #6549 (comment)
Also incoperated the request to rename `alternate` to `next` as an option
I am having issues adding a proper test for functionality. Primarily, I do not know the code base enough and having multiple `dnstest.NewServer` with ResponseWriter does not work. From my testing these are "Singletons'' and only the last defined response writer is used for all servers
Signed-off-by: Jasper Bernhardt <jasper.bernhardt@live.de>
If using a coredns config with only the dns64 plugin specified, the
`Next` plugin that dns64 will attempt to call will be nil, resulting in
a nil pointer dereference. We should return an error instead of
crashing.
Signed-off-by: Jared Baur <jaredbaur@fastmail.com>
Add a NativeHistogramBucketFactor parameter to the use of
`NewHistogramVec` in order to enable use of Prometheus Native
Histograms.
This will store automatically computed sparse buckets in CoreDNS.
If a compatible Prometeus requests native histograms this data will
returned instead of the static buckets.
The default factor of 1.05 should provide high quality resolution data.
Signed-off-by: SuperQ <superq@gmail.com>