Add OVH provider for external DNS

This commit is contained in:
Monnot Stéphane
2018-04-07 09:30:47 +02:00
parent 1c93cde62e
commit 1c8a18dfdd
5 changed files with 190 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
## OVH DNS
Rancher External DNS service powered by OVH
#### Usage
##### Limitation when running the service on multiple Rancher servers
When running multiple instances of the External DNS service configured to use the same domain name, then only one of them can run in the "Default" environment of a Rancher server instance.
##### Supported host labels
`io.rancher.host.external_dns_ip`
Override the IP address used in DNS records for containers running on the host. Defaults to the IP address the host is registered with in Rancher.
`io.rancher.host.external_dns`
Accepts 'true' (default) or 'false'
When this is set to 'false' no DNS records will ever be created for containers running on this host.
##### Supported service labels
`io.rancher.service.external_dns`
Accepts 'always', 'never' or 'auto' (default)
- `always`: Always create DNS records for this service
- `never`: Never create DNS records for this service
- `auto`: Create DNS records for this service if it exposes ports on the host
`io.rancher.service.external_dns_name_template`
Custom DNS name template that overrides global custom DNS name template (see below) of default DNS name template for a specific service
##### Custom DNS name template
By default DNS entries are named `<service>.<stack>.<environment>.<domain>`.
You can specify a custom name template used to construct the subdomain part (left of the domain/zone name) of the DNS records. The following placeholders are supported:
* `%{{service_name}}`
* `%{{stack_name}}`
* `%{{environment_name}}`
**Example:**
`%{{stack_name}}-%{{service_name}}.statictext`
Make sure to only use characters in static text and separators that your provider allows in DNS names.
@@ -0,0 +1,16 @@
ovh:
image: rancher/external-dns:v0.7.10
command: -provider=ovh
expose:
- 1000
environment:
OVH_ENDPOINT: ${OVH_ENDPOINT}
OVH_APPLICATION_KEY: ${OVH_APPLICATION_KEY}
OVH_APPLICATION_SECRET: ${OVH_APPLICATION_SECRET}
OVH_CONSUMER_KEY: ${OVH_CONSUMER_KEY}
ROOT_DOMAIN: ${ROOT_DOMAIN}
NAME_TEMPLATE: ${NAME_TEMPLATE}
TTL: 300
labels:
io.rancher.container.create_agent: "true"
io.rancher.container.agent.role: "external-dns"
@@ -0,0 +1,50 @@
# notemplating
.catalog:
name: "OVH DNS"
version: "v0.1.0"
description: "Rancher External DNS service powered by OVH"
minimum_rancher_version: v1.6.0-rc1
questions:
- variable: "OVH_ENDPOINT"
label: "OVH Endpoint"
description: "Enter your endpoint"
type: "string"
required: true
- variable: "OVH_APPLICATION_KEY"
label: "OVH Application Key"
description: "Enter your application key"
type: "string"
required: true
- variable: "OVH_APPLICATION_SECRET"
label: "OVH Application Secret"
description: "Enter your application secret"
type: "string"
required: true
- variable: "OVH_CONSUMER_KEY"
label: "OVH Consumer Key"
description: "Enter your consumer key"
type: "string"
required: true
- variable: "ROOT_DOMAIN"
label: "Domain Name"
description: "The domain name managed by OVH."
type: "string"
required: true
- variable: "NAME_TEMPLATE"
label: "DNS Name Template"
description: |
Name template used to construct the subdomain part (left of the domain) of the DNS record names.
Supported placeholders: %{{service_name}}, %{{stack_name}}, %{{environment_name}}.
By default DNS entries will be named '<service>.<stack>.<environment>.<domain>'.
type: "string"
default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}"
required: false
ovh:
health_check:
port: 1000
interval: 5000
unhealthy_threshold: 3
request_line: GET / HTTP/1.0
healthy_threshold: 2
response_timeout: 2000