Commit Graph

904 Commits

Author SHA1 Message Date
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
Kubernetes Prow Robot
cb89c0efdd
Merge pull request #4698 from mloiseleur/chore/go1.23
chore: upgrade ExternalDNS to go 1.23
2024-08-26 13:59:08 +01:00
Michel Loiseleur
50672d66b9
chore: upgrade ExternalDNS to go 1.23 2024-08-22 09:10:10 +02:00
Michael Shen
3ee7771195
Emphasize the dynamodb registry in the rate limits doc
Signed-off-by: Michael Shen <mishen@umich.edu>
2024-08-21 19:36:41 -04:00
Michael Shen
b43ad1c432
Add tutorial to DynamoDB registry docs
The existing docs described how to configure the DynamoDB registry, but
didn't have a tutorial for someone to walk through.

Signed-off-by: Michael Shen <mishen@umich.edu>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2024-08-21 19:36:31 -04:00
Michael Shen
4595e0d5ef
Annotation key/value pairs must be strings
As-is, following the docs results in the following error:

```
json: cannot unmarshal number into Go struct field ObjectMeta.metadata.annotations of type string
```

Signed-off-by: Michael Shen <mishen@umich.edu>
2024-08-15 22:39:29 -04:00
Thibault Jamet
a6ab2badce
Update docs/tutorials/aws.md 2024-08-14 11:36:47 +02:00
Thibault Jamet
ef0dd29cf5
Apply suggestions from code review
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2024-08-14 10:21:00 +02:00
Thibault Jamet
309f34f4f5
Add an advanced topic about rate limits 2024-08-14 10:21:00 +02:00
Thibault Jamet
2955e5d456
Apply suggestions from code review
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2024-08-14 10:21:00 +02:00
Thibault Jamet
089744c6ff
Add cache at provider level
**Description**

In the current implementation, DNS providers are called to list all
records on every loop. This is expensive in terms of number of requests
to the provider and may result in being rate limited, as reported in 1293
and 3397.

In our case, we have approximately 20,000 records in our AWS Hosted Zone.
The ListResourceRecordSets API call allows a maximum of 300 items per call.
That requires 67 API calls per external-dns deployment during every sync period

With this, we introduce an optional generic caching mechanism at the provider
level, that re-uses the latest known list of records for a given time.

This prevents from expensive Provider calls to list all records for each
object modification that does not change the actual record (annotations,
statuses, ingress routing, ...)

This introduces 2 trade-offs:

1. Any changes or corruption directly on the provider side will be
longer to detect and to resolve, up to the cache time

2. Any conflicting records in the DNS provider (such as a different
external-dns instance) injected during the cache validity will cause
the first iteration of the next reconcile loop to fail, and hence add a
delay until the next retry

**Checklist**

- [X] Unit tests updated
- [X] End user documentation updated

Change-Id: I0bdcfa994ac1b76acedb05d458a97c080284c5aa
2024-08-14 10:20:56 +02:00
Kubernetes Prow Robot
c875e65d8d
Merge pull request #3400 from tjamet/min-event-sync
Improve MinEventInterval compliance with docs
2024-08-13 06:22:13 -07:00
Kubernetes Prow Robot
852087e21c
Merge pull request #4577 from pier-oliviert/helm-route-53-docs
AWS: Change documentation to use Helm values
2024-08-09 02:57:44 -07:00
Kubernetes Prow Robot
1ceaf798ae
Merge pull request #4663 from orgads/patch-1
azure-private-dns: Fix LoadBalancer example
2024-08-07 07:48:53 -07:00
Orgad Shaneh
f7e8ca19b3
azure-private-dns: Fix LoadBalancer example
annotations should be inside the metadata object.
2024-08-07 08:05:06 +03:00
Massimiliano Donini
53f4465823
Nit: Fix hyperlink
PR #4365 changed the anchor in the readme, this change fixes few outdated links
2024-08-07 06:53:56 +02:00
Thibault Jamet
1b5ed44e48
Improve documentation 2024-08-06 08:52:30 +02:00
Kubernetes Prow Robot
4da484b7e4
Merge pull request #4610 from abursavich/gateway-api
Gateway API: Revert Gateway and HTTPRoute objects from v1 to v1beta1
2024-07-27 01:33:34 -07:00
Andy Bursavich
2daa842eb7 docs/gateway-api: update supported API versions 2024-07-14 09:07:17 -07:00
ThameezBo
e9968d839c
fix: update docs as per review 2024-07-14 14:17:55 +02:00
Thomas Hopkins
9f29d3c188
docs(annotations): note how to set multiple hostnames
Setting multiple hostnames through this annotation has been possible since #256, but this behavior has not been sufficiently documented before.
2024-07-10 11:07:22 -04:00
Tobia Bocchi
8728b25f71
Update cloudflare.md
Hey! I was trying out external-dns using cloudflare. I followed your docs and managed to deploy it successfully on my k3s cluster. While reading the docs and copying pasting the yaml files I noticed there was some inconsistencies with the indentation.. 
I am no kubernetes expert, I just fixed the problems that were not allowing me to deploy this service and checked the files using yamllint.com
While I was at it I also noticed a few errors on the syntax highlighting for code blocks, some had shell where the content was yaml, I fixed those too.. 
I hope this helps, thank you for this amazing project!
2024-06-29 15:39:52 +02:00
Pier-Olivier Thibault
bbaa3eb290 Attempts at making the docs more clear with secret volume
The secret includes keys/value pair and a secret, when mounted as a
volume, will generate a file for each of the pair where the name of the
file is the key and the content of the file, the value.

This hopefully makes the doc clear on how to configured credentials.
2024-06-27 12:14:05 -04:00
Pier-Olivier Thibault
4c86e53d01
Update docs/tutorials/aws.md
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2024-06-27 11:48:45 -04:00
Pier-Olivier Thibault
e49c141ced
Update docs/tutorials/aws.md
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2024-06-27 11:48:41 -04:00
Pier-Olivier Thibault
edb2513a06 Add configuration option for non-eks with Helm 2024-06-27 09:59:40 -04:00
Pier-Olivier Thibault
dd0667849c Change header to be consistent within the section 2024-06-27 09:56:44 -04:00
Pier-Olivier Thibault
c7138b8a15
Update docs/tutorials/aws.md
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2024-06-27 09:44:32 -04:00
Pier-Olivier Thibault
ebd3a7eafb AWS: Change documentation to use Helm values
The Helm section includes templates files that aren't needed as those
values can all be generated from the values.yaml file. It seems that the
current documentation also missed the role arn annotation so it was
added as well.
2024-06-26 10:46:34 -04: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
Kubernetes Prow Robot
b84fc93843
Merge pull request #4378 from mloiseleur/docs/upgrade-mkdocs
docs: upgrade mkdocs and fix broken links
2024-06-11 00:26:01 -07:00
Kubernetes Prow Robot
0ba14d8873
Merge pull request #3973 from c445/roehrijn/aws-profiles
feat(aws): use AWS profiles using .credentials file
2024-06-10 13:59:23 -07:00
Alessandro Zanatta
cd4ad36873 Add documentation about etcd HTTPS for CoreDNS provider 2024-06-09 08:53:27 +02:00
Michel Loiseleur
233c46e83e mkdocs on root level 2024-06-07 08:16:15 +02:00
Michel Loiseleur
3773411a5a docs: upgrade mkdocs and fix warnings 2024-06-07 08:15:44 +02:00
Kubernetes Prow Robot
e608c9e9d1
Merge pull request #4516 from mloiseleur/feat/drop-infobox-provider
chore!: Remove infoblox in-tree provider
2024-06-06 10:00:17 -07:00
Maria Salcedo
00910b1cfc docs(footer): Add trademark disclaimer 2024-06-05 10:47:00 +02:00
Michel Loiseleur
84da6be1dd chore: Remove infoblox in-tree provider 2024-05-29 16:01:45 +02:00
matthieugouel
57c351b66f feat(coredns): etcd authentication 2024-05-27 11:36:17 +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
Raffaele Di Fazio
bfa4e0620d
custom metrics docs 2024-05-24 17:31:44 +02:00
Morre
c0a183b006
fix: re-add api-approved.kubernetes.io annotation 2024-05-21 09:27:03 +02:00
Raffaele Di Fazio
226dbb931f update docs to v0.14.2 2024-05-18 18:32:35 +02:00
Robert Jensen
5084f3e234
changed documentation to include more details description when using api tokens 2024-05-15 13:42:43 +02:00
ThameezBo
fdb2475892
fix: docs 2024-05-13 22:42:16 +02:00
ThameezBo
bd33e5e277
feat: support dualstack Gateway route resources 2024-05-13 22:41:42 +02:00
Kubernetes Prow Robot
551ee96c23
Merge pull request #4456 from DrFaust92/gke-docs
docs: lint gke docs + make terraform config more secure
2024-05-13 00:19:45 -07:00
Stefan Lasiewski
d3212c36a9
Fix headings, whitespace
Fixed headings around "Secure Updates" .
Also fixed a couple of whitespace issues.
2024-05-10 18:51:11 -07:00
Kubernetes Prow Robot
6b510682ed
Merge pull request #4449 from mfreeman451/patch-1
Update cloudflare.md
2024-05-10 04:31:27 -07:00