Skip to content

Commit

Permalink
Document new annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
iamasmith committed Mar 10, 2024
1 parent 84d0357 commit 8eb4874
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,45 @@ DNS records are advertised with the format `<hostname/service_name>.<namespace>.
In addition, hostnames for resources in the `-default-namespace` will also be
advertised with a short name of `<hostname/service_name>.local`.

### Additional control for Services

Service discovery is automatic, however, there are some scenarios where one may wish
to directly control names used with a more general service i.e. the service might be
in front of an Ingress Controller but the service you wish to use is not defined with
an Ingress resource such as in the case of non http/https service with nginx.

Other scenarios include non Ingress types that publish a variety of services and act as
an ingress but have configurations far more complex than can be expressed by an Ingress
resource e.g. Istio.

Additionally, one may wish to control in finer detail which services appear directly on
.local MDNS advertisements without either moving services to the default namespace or
enabling the global without-namespace flag.

In this case Service annotations are possible as follows - these annotations have no effect
if applied to an Ingress resource.
```
apiVersion: v1
kind: Service
metadata:
name: myservice
namespace: foospace
annotations:
external-mdns.blakecovarrubias.com/hostnames: foo
external-mdns.blakecovarrubias.com/without-namespace: "true"
...
spec:
type: LoadBalancer
...
```
This example publishes the service using the name foo which will result in the names
foo.foospace.local, foo-foospace.local and, because we have specified the additional
annotation foo.local is also published (unnecessary if using the global option).

We urge you to test with the default behaviours for Services and Ingress before using these
annotations as the automatic nature of external-mdns is good enough for most use cases.


## Deploying External-mDNS

External-mDNS is configured using argument flags. Most flags can be replaced
Expand Down

0 comments on commit 8eb4874

Please sign in to comment.