Apply suggestions from code review

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
This commit is contained in:
Arnaud Lefray 2023-05-05 08:37:12 +02:00 committed by GitHub
parent e9fd86035d
commit e3842a4be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -273,7 +273,7 @@ Note: the `--ingress-class` flag cannot be used at the same time as a `kubernete
If you use annotations to indicate different ingress classes in your cluster, you can instead use an `--annotation-filter` flag to restrict which objects ExternalDNS considers; for example, `--annotation-filter=kubernetes.io/ingress.class in (public,dmz)`. If you use annotations to indicate different ingress classes in your cluster, you can instead use an `--annotation-filter` flag to restrict which objects ExternalDNS considers; for example, `--annotation-filter=kubernetes.io/ingress.class in (public,dmz)`.
However, beware when using annotation filters with multiple sources, e.g. `--source=service --source=ingress`, since `--annotation-filter` will filter every given source objects. However, beware when using annotation filters with multiple sources, e.g. `--source=service --source=ingress`, since `--annotation-filter` will filter every given source object.
If you need to use annotation filters against a specific source you have to run a separated external dns service containing only the wanted `--source` and `--annotation-filter`. If you need to use annotation filters against a specific source you have to run a separated external dns service containing only the wanted `--source` and `--annotation-filter`.
**Note:** Filtering based on annotation or ingress class name means that the external-dns controller will receive all resources of that kind and then filter on the client-side. **Note:** Filtering based on annotation or ingress class name means that the external-dns controller will receive all resources of that kind and then filter on the client-side.

View File

@ -242,8 +242,6 @@ spec:
- --registry=txt - --registry=txt
- --txt-owner-id=external-dns - --txt-owner-id=external-dns
- --ingress-class=external-ingress - --ingress-class=external-ingress
# ... or, if you use annotations for ingress classes
# - --annotation-filter=kubernetes.io/ingress.class in (external-ingress)
- --aws-zone-type=public - --aws-zone-type=public
image: registry.k8s.io/external-dns/external-dns:v0.13.4 image: registry.k8s.io/external-dns/external-dns:v0.13.4
name: external-dns-public name: external-dns-public
@ -293,7 +291,7 @@ spec:
For this setup to work, you need to create two Ingress definitions for your application. For this setup to work, you need to create two Ingress definitions for your application.
At first, create public Ingress definition (make sure to un-comment either the `annotations` or `ingressClassName` lines): At first, create a public Ingress definition (make sure to un-comment either the `annotations` or `ingressClassName` lines):
```yaml ```yaml
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
@ -320,7 +318,7 @@ spec:
pathType: Prefix pathType: Prefix
``` ```
Then create private Ingress definition (again, make sure to un-comment either the `annotations` or `ingressClassName` lines): Then create a private Ingress definition (again, make sure to un-comment either the `annotations` or `ingressClassName` lines):
```yaml ```yaml
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1