Commit Graph

570 Commits

Author SHA1 Message Date
Michel Loiseleur
5561d916b1 refactor test following review 2025-01-19 12:16:41 +01:00
Michel Loiseleur
cc546820dc chore(ci): fix failing test, upgrade to go 1.23.5 and linter to v1.63 2025-01-17 21:05:08 +01:00
Kubernetes Prow Robot
36478f1fc5
Merge pull request #4856 from dtuck9/avoid-merging-cname-records
fix:  do not merge CNAME with multiple targets
2025-01-14 09:06:33 -08:00
foyerunix
bf8c4c0ba6 Allow to register all pods and their associated PTR record
Add two new options:
- --ignore-non-host-network-pods
- --pod-source-domain

Combined toghether, they can be used to register the IPs
of all pods with their associated PTR record.

Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2025-01-14 07:23:38 +00:00
Diana Tuck
fe420f43e5 Move block outside of parent if/else 2025-01-13 12:37:25 -08:00
Diana Tuck
c3225c7cf1 Add debug logging for CNAME with multiple targets 2025-01-13 12:14:38 -08:00
Mikael Johansson
9368a24a75
fix(f5-virtualserver): skip endpoint creation when VirtualServer is not ready (#4996)
* Skip endpoint creation if VirtualServer is not considered ready

Signed-off-by: Mikael Johansson <mik.json@gmail.com>

* Change to warning instead

Signed-off-by: Mikael Johansson <mik.json@gmail.com>

* Earlier return

---------

Signed-off-by: Mikael Johansson <mik.json@gmail.com>
2025-01-13 07:56:33 -08:00
visokoo
deac6f916e
Merge branch 'kubernetes-sigs:master' into add-f5-transport-server-source 2024-12-30 13:47:11 -08:00
Vivian Ta
6907ced44b fix: Update documentation for f5-transportserver with examples 2024-12-25 01:07:09 -08:00
Steven Kreitzer
449d27b00e
fix: allow ipv4-mapped ipv6 addresses
Signed-off-by: Steven Kreitzer <skre@skre.me>
2024-12-21 14:16:23 -06:00
Vivian Ta
2ea4a15075 feat: Add F5 TransportServer source 2024-11-28 22:51:18 -08:00
James Szalay
adb4a4fbb2 Fixes issue #4888. Include record type in dedupe key. 2024-11-20 02:27:46 +00:00
Diana Tuck
7e10c80323
Do not merge CNAME targets into one endpoint per RFC-1034 2024-11-07 11:23:50 -08:00
n-Arno
326ee0be69 source node: Skip unschedulable nodes 2024-09-20 21:17:01 +02:00
Kubernetes Prow Robot
848e309ad4
Merge pull request #4593 from johannwagner/feature/nat64
feat: NAT64 network source
2024-09-05 14:34:29 +01:00
Kubernetes Prow Robot
ccab9a95c5
Merge pull request #4469 from thameezb/feat-support-dual-stack-gateway-api
feat: support dual stack for gateway api
2024-09-01 18:40:45 +01:00
Kyle
38178940a3
feat: add annotation and label filters to Ambassador Host Source (#2633)
* Add annotation filter to Ambassador Host Source

This change makes the Ambassador Host source respect the External-DNS annotationFilter allowing for an Ambassador Host resource to specify what External-DNS deployment to use when there are multiple External-DNS deployments within the same cluster. Before this change if you had two External-DNS deployments within the cluster and used the Ambassador Host source the first External-DNS to process the resource will create the record and not the one that was specified in the filter annotation.

I added the `filterByAnnotations` function so that it matched the same way the other sources have implemented annotation filtering. I didn't add the controller check only because I wanted to keep this change to implementing the annotationFilter.

Example: Create two External-DNS deployments 1 public and 1 private and set the Ambassador Host to use the public External-DNS using the annotation filter.

```
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns-private
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: external-dns-private
  template:
    metadata:
      labels:
        app: external-dns-private
      annotations:
        iam.amazonaws.com/role: {ARN} # AWS ARN role
    spec:
      serviceAccountName: external-dns
      containers:
      - name: external-dns
        image: k8s.gcr.io/external-dns/external-dns:latest
        args:
        - --source=ambassador-host
        - --domain-filter=example.net # will make ExternalDNS see only the hosted zones matching provided domain, omit to process all available hosted zones
        - --provider=aws
        - --policy=upsert-only # would prevent ExternalDNS from deleting any records, omit to enable full synchronization
        - --aws-zone-type=private # only look at public hosted zones (valid values are public, private or no value for both)
        - --registry=txt
        - --txt-owner-id= {Hosted Zone ID} # Insert Route53 Hosted Zone ID here
        - --annotation-filter=kubernetes.io/ingress.class in (private)
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns-public
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: external-dns-public
  template:
    metadata:
      labels:
        app: external-dns-public
      annotations:
        iam.amazonaws.com/role: {ARN} # AWS ARN role
    spec:
      serviceAccountName: external-dns
      containers:
      - name: external-dns
        image: k8s.gcr.io/external-dns/external-dns:latest
        args:
        - --source=ambassador-host
        - --domain-filter=example.net # will make ExternalDNS see only the hosted zones matching provided domain, omit to process all available hosted zones
        - --provider=aws
        - --policy=upsert-only # would prevent ExternalDNS from deleting any records, omit to enable full synchronization
        - --aws-zone-type= # only look at public hosted zones (valid values are public, private or no value for both)
        - --registry=txt
        - --txt-owner-id= {Hosted Zone ID} # Insert Route53 Hosted Zone ID here
        - --annotation-filter=kubernetes.io/ingress.class in (public)
---
apiVersion: getambassador.io/v3alpha1
  kind: Host
  metadata:
    name: your-hostname
    annotations:
      external-dns.ambassador-service: emissary-ingress/emissary
      kubernetes.io/ingress.class: public
  spec:
		acmeProvider:
      authority: none
		hostname: your-hostname.example.com
```

Fixes kubernetes-sigs/external-dns#2632

* Add Label filltering for Ambassador Host source

Currently the `--label-filter` flag can only be used to filter CRDs, Ingress, Service and Openshift Route objects which match the label selector passed through that flag. This change extends the functionality to the Ambassador Host type object.

When the flag is not specified the default value is `labels.Everything()` which is an empty string, the same as before. An annotation based filter is inefficient because the filtering has to be done in the controller instead of the API server like with label filtering. The Annotation based filtering has been left in for legacy reasons so the Ambassador Host source can be used inconjunction with the other sources that don't yet support label filltering.

It is possible to use label based filltering with annotation based filltering so you can initially filter by label then filter the returned hosts by annotation. This is not recomended

* Update Ambassador Host source docs

Add that the Ambassador Host source now supports both annotation and label filltering.
2024-08-28 18:02:57 +01:00
Johann Wagner
b8e018caaf Introduced NAT64 prefix rewriting 2024-08-19 08:00:18 +02:00
Andy Bursavich
29f1f3a19d source/gateway-api: revert v1.HTTPRoute to v1beta1.HTTPRoute 2024-07-14 09:06:35 -07:00
Andy Bursavich
0100b6637a source/gateway-api: revert v1.Gateway to v1beta1.Gateway 2024-07-14 09:06:35 -07:00
ThameezBo
ea1ff95711
feat: update GRPCRoute client to stable 2024-06-20 13:30:18 +02:00
Kubernetes Prow Robot
8245b89891
Merge pull request #4283 from angeloxx/feature/rfc-2136-ptr
feat(rfc2136): add PTR optional support
2024-06-20 00:44:17 -07:00
Lukas Wöhrl
25eac69705 fix: use informer for istio gateways
Signed-off-by: Lukas Wöhrl <lukas.woehrl@plentymarkets.com>
2024-06-03 11:44:38 +02:00
Kris Budde
865f177561
fix(traefik): Nil pointer exception if legacy traefik is disabled 2024-05-25 11:07:49 +02:00
Kubernetes Prow Robot
b4eea99efe
Merge pull request #4458 from Raffo/webhook-annotations
feat(webhooks): pass webhook-* annotations to webhook providers
2024-05-24 08:51:11 -07:00
Michel Loiseleur
971c91d2cf review with Raffo 2024-05-16 10:51:13 +02:00
Michel Loiseleur
9597d257a7 fix: linter on unused parameter 2024-05-16 08:44:06 +02:00
Michel Loiseleur
ae2978527a fix: Gateway API upgrade 2024-05-16 08:37:41 +02:00
ThameezBo
4fcc726863
fix: do not expose vars 2024-05-15 14:25:03 +02:00
ThameezBo
bd33e5e277
feat: support dualstack Gateway route resources 2024-05-13 22:41:42 +02:00
Raffaele Di Fazio
c375899f91 test
Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
2024-05-10 20:11:38 +02:00
Raffaele Di Fazio
761d6551d3 Initial support for forwarding wildcard annotations to webhook providers 2024-04-28 14:05:45 +02:00
Michel Loiseleur
cbd281f81b fix: use current local dns resolution 2024-04-19 17:35:27 +02:00
Michel Loiseleur
9ff2223625 chore(ci): fix failing test 2024-04-19 16:57:14 +02:00
angeloxx
cd2088dff3 Merged from master and tested. 2024-03-19 13:27:17 +01:00
Kubernetes Prow Robot
3a2da65e36
Merge pull request #4120 from fad3t/feat-amb-provider-specific
feat(ambassador): add support for provider specific annotations
2024-03-12 07:17:27 -07:00
Eric Bailey
3fac88bd64 fix(service): omit nil endpoints and prefer endpointsForHostname()
Also add a test with an invalid hostname.
2024-03-04 17:38:29 +01:00
Eric Bailey
1eec428bf7 chore(ingress): add test with invalid hostname 2024-03-04 15:53:53 +01:00
Eric Bailey
36a6e19dd5 fix(source): use NewEndpointWithTTL and omit nil Endpoints 2024-03-04 15:53:47 +01:00
Kubernetes Prow Robot
4dc15d917e
Merge pull request #4212 from jstudler/master
Fixing NAPTR support
2024-02-29 10:00:59 -08:00
Frederic Mereu
13f6df502d
test: fix test with LB hostname 2024-02-12 13:13:31 +01:00
Frederic Mereu
131501118b
fix: update test with LB hostname 2024-02-12 11:40:28 +01:00
Frederic Mereu
d9606dea3f
test: add tests 2024-02-12 11:40:28 +01:00
Frederic Mereu
6cec5dd7df
feat(ambassador): add support for provider specific annotations 2024-02-12 11:40:28 +01:00
Joel Studler
45579e14b1 Implement proposed change by mloiseleur 2024-02-09 17:23:29 +01:00
Kristoffer
c787846f56
Update comment to state reason 2024-01-29 14:49:51 +01:00
Joel Studler
0c43e808bb Change test names to match better with variable names and log messages of crd.go 2024-01-27 13:20:12 +01:00
Joel Studler
2fdc7354c0 Add unit tests for NAPTR and invalid endpoints 2024-01-27 13:16:53 +01:00
zs-ko
4d99b7db2d Fix Gateway API TLS TCP Route 2024-01-27 00:41:15 +01:00
Joel Studler
b716b764af Fixing NAPTR support (https://github.com/kubernetes-sigs/external-dns/issues/3979) 2024-01-26 18:27:28 +01:00
Kubernetes Prow Robot
fb85418d03
Merge pull request #4094 from KarstenSiemer/fix/istio_gateway/AppendExternalIPsToTargets
fix(istio): support for ExternalIPs in Istio resources
2024-01-05 20:04:56 +01:00
Kubernetes Prow Robot
99ef39e99d
Merge pull request #4092 from fad3t/fix-ambassador-resolve-hostname
fix(ambassador): don't resolve LB hostname
2023-12-30 13:13:16 +01:00
Kubernetes Prow Robot
97a8fa3195
Merge pull request #4076 from k8r-io/fix-hangs-on-traefik-listeners
Fix timeout for traefik-proxy source
2023-12-27 17:22:52 +01:00
Kristopher Kirkland
f80f00688d Lint fix 2023-12-20 22:17:10 -06:00
Andy Bursavich
a50a4f9aba gateway-api: make wildcards suffix matchers (e.g. match multiple labels) 2023-12-20 14:12:24 -08:00
Andy Bursavich
5da9393b58 gateway-api: upgrade from v0.7.1 to v1.0.0 2023-12-18 16:35:07 -08:00
Karsten Siemer
87a53778a8
fix(istio): support for ExternalIPs in Istio resources
 Add support for ExternalIPs in Istio Gateway and VirtualService
ℹ️ This commit extends Istio Gateway and VirtualService resources
to support ExternalIPs. The changes include:
- Checking if service has ExternalIPs defined
- If yes, adding them to the list of targets
- If not, continuing with the existing process

👌 Now you can have your Istio resources use `externalIPs` too! 🎉

Not to be `ip`-percritical, but don't we all love an `ip`grade! 🎈

Signed-off-by: Karsten Siemer <karsten.siemer@sda.se>
2023-12-06 08:52:35 +01:00
Frederic Mereu
fecd4273af
fix(ambassador): don't resolve LB hostname
Signed-off-by: Frederic Mereu <frederic.mereu@gaming1.com>
2023-12-05 09:56:32 +01:00
Kristopher Kirkland
21398ecb7f Add test cases for Traefik API group flags 2023-11-29 12:14:59 -06:00
Kristopher Kirkland
9015377c12 Add flags to disable each of the Traefik API groups 2023-11-29 12:14:59 -06:00
Mikkel Oscar Lyderik Larsen
b48bb26c5f Make routegroup client IPv6 compatible
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2023-11-27 11:53:42 +01:00
Kubernetes Prow Robot
e1adc9079b
Merge pull request #3978 from nefelim4ag/master
fix(httpProxy): drop status==valid filter
2023-11-15 13:37:57 +01:00
Kubernetes Prow Robot
fc87eaff72
Merge pull request #4048 from siliconsheep/fix-google-srv-records
fix(google): ensure trailing dot for SRV records
2023-11-15 13:12:45 +01:00
Kubernetes Prow Robot
c2eb6747f7
Merge pull request #4007 from nokia/master
service source uses externalIPs in ExternalName type if available
2023-11-15 13:12:27 +01:00
Kubernetes Prow Robot
04c4b505a6
Merge pull request #3964 from johngmyers/ignore-host-ann
Make --ignore-hostname-annotation flag more consistent
2023-11-15 13:12:18 +01:00
Dieter Bocklandt
6a3e97083c
fix(google): ensure trailing dot for SRV records 2023-11-14 17:12:56 +01:00
Nandor Galambosi
04e92c5556 Testcase for dualstack externalIPs added 2023-11-09 21:48:36 +01:00
Christopher Larivière
6d78df4388
add initial support for gw apis 1.0.0 GA
Signed-off-by: Christopher Larivière <lariviere.c@gmail.com>
2023-11-06 09:32:31 -05:00
Nandor Galambosi
d7b0dfd781 service source uses externalIPs in ExternalName type if available 2023-10-29 10:58:46 +01:00
Kubernetes Prow Robot
d8f408b8a5
Merge pull request #3734 from fad3t/ambassador-external-ip
feat: add support for external IP in ambassador host source
2023-10-27 13:22:02 +02:00
Timofey Titovets
42aaa58232 fix(httpProxy): drop status==valid filter 2023-10-14 14:29:15 +02:00
John Gardiner Myers
76a2ea17aa Make --ignore-hostname-annotation flag more consistent 2023-10-02 23:51:43 -07:00
John Gardiner Myers
17e9637f11
Refactor getTTLFromAnnotations() to not return error (#3939)
* Refactor getTTLFromAnnotations() to not return error

* Improve log messages
2023-10-02 03:56:45 -07:00
John Gardiner Myers
4a32aaec01 Implement target annotation for more sources 2023-09-27 23:16:14 -07:00
Kubernetes Prow Robot
f0b6260012
Merge pull request #3940 from johngmyers/node-filter
Support --label-filter for node source
2023-09-26 16:55:44 -07:00
Kubernetes Prow Robot
9ad15cf76f
Merge pull request #3938 from johngmyers/internal-service
Use ServiceIP for ClusterIP Services with internal-hostname annotation
2023-09-26 16:55:37 -07:00
John Gardiner Myers
75639b759c Support --label-filter for node source 2023-09-20 08:56:26 -07:00
Kubernetes Prow Robot
ed78d02793
Merge pull request #3762 from johngmyers/endpoint-label
Refactor setting the "resource" label into endpointsForHostname
2023-09-19 08:11:08 -07:00
John Gardiner Myers
7044fdf040 Use ServiceIP for ClusterIP Services with internal-hostname annotation 2023-09-16 17:33:30 -07:00
Kubernetes Prow Robot
d54fa589c2
Merge pull request #3480 from Megum1n/gloo-multiple-namespaces
Add support for multiple gloo namespaces in one External DNS instance
2023-09-15 22:10:13 -07:00
Kubernetes Prow Robot
fa332e9ed3
Merge pull request #3913 from johngmyers/doc-service
Document the Service source
2023-09-15 14:10:14 -07:00
Kubernetes Prow Robot
65db0c73ec
Merge pull request #3452 from BadLiveware/feature/allow-target-annotation-gateway
Allow annotation target override on gateway
2023-09-14 22:08:12 -07:00
Kubernetes Prow Robot
a10a80e9e5
Merge pull request #3451 from BadLiveware/fix/filter-endpoints-without-targets
Filter out entire endpoint if it ends up without targets after filtering in targetFilterSource
2023-09-14 21:52:11 -07:00
Kubernetes Prow Robot
435eb2056f
Merge pull request #3447 from Nefelim4ag/fix-node-ports
fix: nodePort #2704 - publish ready endpoints
2023-09-14 19:12:12 -07:00
John Gardiner Myers
da3fe0463c Document the Service source 2023-09-04 11:44:08 -07:00
Kubernetes Prow Robot
6a53959385
Merge pull request #3806 from johngmyers/doc-sources
Document the Ingress source
2023-09-04 01:03:48 -07:00
John Gardiner Myers
50e456997f Create the "resource" label for Ambassador Host 2023-08-29 11:36:30 -07:00
John Gardiner Myers
39955e556e Refactor setting the "resource" label into endpointsForHostname 2023-08-29 11:36:27 -07:00
Timofey Titovets
2a1f7a4de7 fix(source_test.go): add missing pod status tests 2023-08-29 19:16:51 +02:00
Timofey Titovets
f696c514db fix: nodePort #2704 - publish ready endpoints
fix: lowercase local functions
chore: reuse nodes, cut logs
2023-08-29 19:16:51 +02:00
Frederic Mereu
73862a802b
chore: reuse existing extractLoadBalancerTargets function 2023-08-12 13:49:17 +02:00
David Pait
1a5249af5e fix go conventions and ehance error messages 2023-08-09 08:41:50 -04:00
David Pait
bd989eeac4 fix imports 2023-08-09 08:35:00 -04:00
David Pait
0354d76ce0 add unit tests for gateway ingress source annotation 2023-08-08 11:51:42 -04:00
David Pait
f9600b7b35 move ingress annotation and parseIngress to gateway source 2023-08-08 11:51:42 -04:00
David Pait
08b592d2fd update istio gateway ingress source annotation constant 2023-08-08 11:51:42 -04:00
David Pait
cb2772c6ae add istio gateway ingress annotation support to gateway source 2023-08-08 08:05:42 -04:00
David Pait
362b233833 update istio gateway annotation name and docs 2023-08-08 08:04:51 -04:00
David Pait
1253afa11e add supoort for ingress backed istio gateways 2023-08-06 16:57:42 -04:00
John Gardiner Myers
0eb91e358d Document the Ingress source 2023-08-04 04:06:02 -07:00