aboutsummaryrefslogtreecommitdiff
path: root/plugin/grpc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-03-11Enable Prometheus native histograms (#6524)Gravatar Ben Kochie 1-5/+6
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>
2023-12-08plugin/tls: respect the path specified by root plugin (#6138)Gravatar Marius Kimmina 1-0/+6
* plugin/tls: respect the path specified by root plugin Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com> * improve readme Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com> --------- Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com>
2023-06-17test: use `t.TempDir` to create temporary test directory (#6164)Gravatar Eng Zer Jun 1-6/+1
2023-06-01Revert "plugin/tls: respect the path specified by root plugin (#5944)" (#6136)Gravatar Chris O'Haver 1-6/+1
This reverts commit d0375bc0269eccb1966ccf38a9b43263d551dee4.
2023-06-01plugin/tls: respect the path specified by root plugin (#5944)Gravatar Marius Kimmina 1-1/+6
Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com>
2023-05-26add support unix socket for GRPC (#5943)Gravatar junhwong 3-1/+69
2022-07-10add golangci-lint linter (#5499)Gravatar Ondřej Benkovský 2-2/+2
2022-03-16Update to avoid pseudo-random number (#5225)Gravatar Yong Tang 1-3/+7
* Update to avoid pseudo-random number This PR update the usage of rand so that non-global seed is used. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Add concurrency-safe random source See https://stackoverflow.com/questions/48958886/how-to-create-a-thread-safe-rand-source Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2022-02-10dont panic when from-zone cannot be normalized (#5171)Gravatar Chris O'Haver 2-1/+6
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-02-10fix healthy proxy error case (#5168)Gravatar Chris O'Haver 1-8/+8
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-10-13cleanup deprecated package io/ioutil (#4920)Gravatar Zou Nengren 1-2/+1
Signed-off-by: zounengren <zouyee1989@gmail.com>
2021-05-27deprecate Normalize and MustNormalize (#4648)Gravatar Chris O'Haver 1-2/+2
* deprecate normalize and mustnormalize Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add runtime warning Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * elaborate runtime warning Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * include caller info Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-17reverse zone: fix Normalize (#4621)Gravatar Miek Gieben 1-3/+2
Make normalize return multiple "hosts" (= reverse zones) when a non-octet boundary cidr is given. Added pkg/cidr package that holds the cidr calculation routines; felt they didn't really fit dnsutil. This change means the IPNet return parameter isn't needed, the hosts are all correct. The tests that tests this is also removed: TestSplitHostPortReverse The fallout was that zoneAddr _also_ doesn't need the IPNet member, that in turn make it visible that zoneAddr in address.go duplicated a bunch of stuff from register.go; removed/refactored that too. Created a plugin.OriginsFromArgsOrServerBlock to help plugins do the right things, by consuming ZONE arguments; this now expands reverse zones correctly. This is mostly mechanical. Remove the reverse test in plugin/kubernetes which is a copy-paste from a core test (which has since been fixed). Remove MustNormalize as it has no plugin users. This change is not backwards compatible to plugins that have a ZONE argument that they parse in the setup util. All in-tree plugins have been updated. Signed-off-by: Miek Gieben <miek@miek.nl>
2020-09-24For caddy v1 in our org (#4018)Gravatar Miek Gieben 3-4/+3
* For caddy v1 in our org This RP changes all imports for caddyserver/caddy to coredns/caddy. This is the v1 code of caddy. For the coredns/caddy repo the following changes have been made: * anything not needed by us is deleted * all `telemetry` stuff is deleted * all its import paths are also changed to point to coredns/caddy * the v1 branch has been moved to the master branch * a v1.1.0 tag has been added to signal the latest release Signed-off-by: Miek Gieben <miek@miek.nl> * Fix imports Signed-off-by: Miek Gieben <miek@miek.nl> * Group coredns/caddy with out plugins Signed-off-by: Miek Gieben <miek@miek.nl> * remove this file Signed-off-by: Miek Gieben <miek@miek.nl> * Relax import ordering github.com/coredns is now also a coredns dep, this makes github.com/coredns/caddy fit more natural in the list. Signed-off-by: Miek Gieben <miek@miek.nl> * Fix final import Signed-off-by: Miek Gieben <miek@miek.nl>
2020-07-25using promauto package to ensure all created metrics are properly registered ↵Gravatar Zou Nengren 2-9/+4
(#4025) Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-07-15Improve gRPC Plugin when backend is not available (#3966)Gravatar Ricardo Katz 1-5/+17
* Improve gRPC Plugin when backend is not available Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br> * Improve gRPC Plugin when backend is not available Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br>
2020-05-29plugin/forward/grpc: Revert forward/grpc policy dedup (#3919)Gravatar Chris O'Haver 3-13/+70
* revert de-dup Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * unit test Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * use roundrobin policy in test Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-03-26Cleanup metrics (#3776)Gravatar Miek Gieben 2-4/+4
Cleanup a variety of metric issues. * Eliminate department of redundancy "count_total" naming. * Use the plural of the unit when appropriate. (ex, "requests") * Remove label names from metric names where appropriate. (ex, "rcode") * Simplify request metrics by consolidating type label in to the base request counter. * Re-generate man pages. Signed-off-by: Ben Kochie <superq@gmail.com> Co-authored-by: Ben Kochie <superq@gmail.com>
2019-12-17Dedup policy implement between grpc and proxy plugin (#3537)Gravatar Zou Nengren 3-70/+13
Signed-off-by: zouyee <zounengren@cmss.chinamobile.com>
2019-11-29Move to CODEOWNERS (#3489)Gravatar Miek Gieben 1-6/+0
* Move to CODEOWNERS No change in who own what; just a move to CODEOWNERS. This allows dreck cleanups. Added .dreck.yaml for alias and exec. Fixes: #3486 Signed-off-by: Miek Gieben <miek@miek.nl> * stickler bot Signed-off-by: Miek Gieben <miek@miek.nl> * sort the file Signed-off-by: Miek Gieben <miek@miek.nl>
2019-10-08Directive -> plugin (#3363)Gravatar Miek Gieben 1-1/+1
Caught my eye, we name things directive still, esp when talking about the prometheus *plugin*. Rename everything that needs to be plugin to 'plugin'. Also make sure Metrics is a H2 section (not H1). Signed-off-by: Miek Gieben <miek@miek.nl>
2019-09-28plugins: calling Dispenser itself is a mistake (#3323)Gravatar Miek Gieben 1-4/+3
Remove all these uses and just make them work on caddy.Controller. Also don't export parsing functions as their should be private to the plugin. Signed-off-by: Miek Gieben <miek@miek.nl>
2019-09-20all: simply registering plugins (#3287)Gravatar Miek Gieben 1-6/+1
Abstract the caddy call and make it simpler. See #3261 for some part of the discussion. Go from: ~~~ go func init() { caddy.RegisterPlugin("any", caddy.Plugin{ ServerType: "dns", Action: setup, }) } ~~~ To: ~~~ go func init() { plugin.Register("any", setup) } ~~~ This requires some external documents in coredns.io to be updated as well; the old way still works, so it's backwards compatible. Signed-off-by: Miek Gieben <miek@miek.nl>
2019-07-23Fix response_rcode_count_total metric (#3029)Gravatar Mat Lowery 1-1/+1
2019-07-03Update Caddy to 1.0.1, and update import path (#2961)Gravatar Yong Tang 3-4/+4
* Update Caddy to 1.0.1, and update import path This fix updates caddy to 1.0.1 and also updates the import path to github.com/caddyserver/caddy This fix fixes 2959 Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Also update plugin.cfg Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Update and bump zplugin.go Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-04-29Remove trailing whitespaces (#2806)Gravatar Yong Tang 1-1/+1
While running make notices the following: ``` ** presubmit/trailing-whitespace plugin/grpc/README.md:Multiple upstreams are randomized (see `policy`) on first use. When a proxy returns an error plugin/pprof/setup_test.go: {`pprof :1234 { plugin/pprof/setup_test.go: {`pprof { ** presubmit/trailing-whitespace: please remove any trailing white space ``` This fix removes the whitespaces Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-03-24request.Request: remove useless function (#2714)Gravatar Miek Gieben 1-1/+2
ErrorMessage was a very shallow function that didn't add anything. Remove it and remove its usage. Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-15plugin/grpc: bugfix setup parser (#2697)Gravatar Iñigo 2-9/+6
Fix setup parser. Config params are not being setting.
2019-03-14plugin/grpc: New gRPC plugin (#2667)Gravatar Iñigo 11-0/+948
* plugin/grpc: New gRPC plugin * some changes after the first review: - remove healthcheck. gRPC already has this implicitly implemented - some naming and stetic changes - fix some comments - other minor fixes * plugin/grpc: New gRPC plugin * some changes after the first review: - remove healthcheck. gRPC already has this implicitly implemented - some naming and stetic changes - fix some comments - other minor fixes * add OWNERS file and change plugin order * remove Rcode checker