From a5f10c3ce5a1729fbcd45958c4554965772889a9 Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 09:38:25 -0700 Subject: [PATCH 01/13] add max versions for existing templates --- infra-templates/cloudflare/0/rancher-compose.yml | 1 + infra-templates/cloudflare/1/rancher-compose.yml | 1 + infra-templates/cloudflare/2/rancher-compose.yml | 1 + infra-templates/cloudflare/3/rancher-compose.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/infra-templates/cloudflare/0/rancher-compose.yml b/infra-templates/cloudflare/0/rancher-compose.yml index 18053a4..9ca5703 100644 --- a/infra-templates/cloudflare/0/rancher-compose.yml +++ b/infra-templates/cloudflare/0/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.1.9-rancher1" description: "Rancher External DNS service powered by CloudFlare. Requires Rancher version 0.44.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "CLOUDFLARE_EMAIL" label: "CloudFlare email address" diff --git a/infra-templates/cloudflare/1/rancher-compose.yml b/infra-templates/cloudflare/1/rancher-compose.yml index 57749e1..5f8f265 100644 --- a/infra-templates/cloudflare/1/rancher-compose.yml +++ b/infra-templates/cloudflare/1/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.2.1-rancher1" description: "Rancher External DNS service powered by CloudFlare. Requires Rancher version 0.44.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "CLOUDFLARE_EMAIL" label: "CloudFlare email address" diff --git a/infra-templates/cloudflare/2/rancher-compose.yml b/infra-templates/cloudflare/2/rancher-compose.yml index 8753d40..cf90dba 100644 --- a/infra-templates/cloudflare/2/rancher-compose.yml +++ b/infra-templates/cloudflare/2/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.4.0-rancher1" description: "Rancher External DNS service powered by CloudFlare. Requires Rancher version 0.44.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "CLOUDFLARE_EMAIL" label: "CloudFlare email address" diff --git a/infra-templates/cloudflare/3/rancher-compose.yml b/infra-templates/cloudflare/3/rancher-compose.yml index 73ec3f3..50d766a 100644 --- a/infra-templates/cloudflare/3/rancher-compose.yml +++ b/infra-templates/cloudflare/3/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.0-rancher1" description: "Rancher External DNS service powered by CloudFlare. Requires Rancher version v1.1.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.5.99 questions: - variable: "CLOUDFLARE_EMAIL" label: "CloudFlare email address" From 923442c9cb4bbf1bc4f00e5dcffc8669169f3859 Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 09:38:49 -0700 Subject: [PATCH 02/13] base copy of folder 3 to folder 4 for cloudflare --- infra-templates/cloudflare/4/README.md | 36 ++++++++++++++ .../cloudflare/4/docker-compose.yml | 14 ++++++ .../cloudflare/4/rancher-compose.yml | 48 +++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 infra-templates/cloudflare/4/README.md create mode 100644 infra-templates/cloudflare/4/docker-compose.yml create mode 100644 infra-templates/cloudflare/4/rancher-compose.yml diff --git a/infra-templates/cloudflare/4/README.md b/infra-templates/cloudflare/4/README.md new file mode 100644 index 0000000..84dba81 --- /dev/null +++ b/infra-templates/cloudflare/4/README.md @@ -0,0 +1,36 @@ +## CloudFlare DNS + +Rancher External DNS service powered by CloudFlare DNS + +#### Changelog + +##### v0.6.0 + +* Reduces the overall rate of API requests to the DNS provider +* Adds support for custom DNS naming convention +* Stack, service and environment names used in service DNS names are now sanitized to conform with RFC 1123. Characters other than `a-z`, `A-Z`, `0-9` or `dash` are replaced by dashes. +* For internal use the service creates TXT records to track the FQDNs it manages. These TXT records are named `external-dns-.` and should not be deleted. + +#### Usage + +##### Upgrade Notes +While upgrading from a version lower than v0.6.0 the TTL configuration value should not be changed. You may change it once the upgrade has been completed. + +##### 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. + +##### Custom DNS name template + +By default DNS entries are named `...`. +You can specify a custom name template used to construct the subdomain part (left of the domain 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 are allowed by your provider in DNS names. diff --git a/infra-templates/cloudflare/4/docker-compose.yml b/infra-templates/cloudflare/4/docker-compose.yml new file mode 100644 index 0000000..0632413 --- /dev/null +++ b/infra-templates/cloudflare/4/docker-compose.yml @@ -0,0 +1,14 @@ +cloudflare: + image: rancher/external-dns:v0.6.0 + command: -provider=cloudflare + expose: + - 1000 + environment: + CLOUDFLARE_EMAIL: ${CLOUDFLARE_EMAIL} + CLOUDFLARE_KEY: ${CLOUDFLARE_KEY} + ROOT_DOMAIN: ${ROOT_DOMAIN} + NAME_TEMPLATE: ${NAME_TEMPLATE} + TTL: ${TTL} + labels: + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" diff --git a/infra-templates/cloudflare/4/rancher-compose.yml b/infra-templates/cloudflare/4/rancher-compose.yml new file mode 100644 index 0000000..50d766a --- /dev/null +++ b/infra-templates/cloudflare/4/rancher-compose.yml @@ -0,0 +1,48 @@ +.catalog: + name: "CloudFlare DNS" + version: "v0.6.0-rancher1" + description: "Rancher External DNS service powered by CloudFlare. Requires Rancher version v1.1.0" + minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.5.99 + questions: + - variable: "CLOUDFLARE_EMAIL" + label: "CloudFlare email address" + description: "Email address associated with your CloudFlare account" + type: "string" + required: true + - variable: "CLOUDFLARE_KEY" + label: "CloudFlare API key" + description: "API key for your CloudFlare account" + type: "string" + required: true + - variable: "ROOT_DOMAIN" + label: "Domain Name" + description: "The domain name managed by CloudFlare." + type: "string" + required: true + - variable: "TTL" + label: "TTL" + description: "The resource record cache time to live (TTL), in seconds (minimum 120)" + type: "int" + default: 120 + min: 120 + max: 3600 + required: false + - 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 '...'. + type: "string" + default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}" + required: false + +cloudflare: + health_check: + port: 1000 + interval: 5000 + unhealthy_threshold: 3 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 From 9a63fcf08ddd4b0663a08b53208c823709e2c627 Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 09:39:49 -0700 Subject: [PATCH 03/13] updates for new template for notemplating --- infra-templates/cloudflare/4/docker-compose.yml | 3 ++- infra-templates/cloudflare/4/rancher-compose.yml | 6 +++--- infra-templates/cloudflare/config.yml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/infra-templates/cloudflare/4/docker-compose.yml b/infra-templates/cloudflare/4/docker-compose.yml index 0632413..83eac5f 100644 --- a/infra-templates/cloudflare/4/docker-compose.yml +++ b/infra-templates/cloudflare/4/docker-compose.yml @@ -1,7 +1,8 @@ +# notemplating cloudflare: image: rancher/external-dns:v0.6.0 command: -provider=cloudflare - expose: + expose: - 1000 environment: CLOUDFLARE_EMAIL: ${CLOUDFLARE_EMAIL} diff --git a/infra-templates/cloudflare/4/rancher-compose.yml b/infra-templates/cloudflare/4/rancher-compose.yml index 50d766a..40a4fdf 100644 --- a/infra-templates/cloudflare/4/rancher-compose.yml +++ b/infra-templates/cloudflare/4/rancher-compose.yml @@ -1,9 +1,9 @@ +# notemplating .catalog: name: "CloudFlare DNS" - version: "v0.6.0-rancher1" + version: "v0.6.0-rancher2" description: "Rancher External DNS service powered by CloudFlare. Requires Rancher version v1.1.0" - minimum_rancher_version: v1.2.0-pre4-rc1 - maximum_rancher_version: v1.5.99 + minimum_rancher_version: v1.6.0-rc1 questions: - variable: "CLOUDFLARE_EMAIL" label: "CloudFlare email address" diff --git a/infra-templates/cloudflare/config.yml b/infra-templates/cloudflare/config.yml index 45af600..deb2170 100644 --- a/infra-templates/cloudflare/config.yml +++ b/infra-templates/cloudflare/config.yml @@ -1,7 +1,7 @@ name: CloudFlare DNS description: | Rancher External DNS service powered by CloudFlare -version: v0.6.0-rancher1 +version: v0.6.0-rancher2 category: External DNS labels: io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes' From 8a314ae2a385109d460b33f24cc2a93cb1c9b378 Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 11:06:18 -0700 Subject: [PATCH 04/13] max versions on digitalocean dns --- infra-templates/digitalocean-dns/1/rancher-compose.yml | 1 + infra-templates/digitalocean-dns/2/rancher-compose.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/infra-templates/digitalocean-dns/1/rancher-compose.yml b/infra-templates/digitalocean-dns/1/rancher-compose.yml index f3329e8..4666dd7 100644 --- a/infra-templates/digitalocean-dns/1/rancher-compose.yml +++ b/infra-templates/digitalocean-dns/1/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.3" description: "Rancher External DNS service powered by DigitalOcean" minimum_rancher_version: v1.5.0 + maximum_rancher_version: v1.5.0 questions: - variable: "DO_PAT" label: "DigitalOcean Personal Access Token" diff --git a/infra-templates/digitalocean-dns/2/rancher-compose.yml b/infra-templates/digitalocean-dns/2/rancher-compose.yml index 233510c..a7949fc 100644 --- a/infra-templates/digitalocean-dns/2/rancher-compose.yml +++ b/infra-templates/digitalocean-dns/2/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.4" description: "Rancher External DNS service powered by DigitalOcean" minimum_rancher_version: v1.5.0 + maximum_rancher_version: v1.5.99 questions: - variable: "DO_PAT" label: "DigitalOcean Personal Access Token" From 0cf4554a33aeba6f85cf4b99f8e897cdcd4b91dc Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 11:06:41 -0700 Subject: [PATCH 05/13] base copy of folder 2 to 3 of digitalocean-dns --- infra-templates/digitalocean-dns/3/README.md | 53 +++++++++++++++++++ .../digitalocean-dns/3/docker-compose.yml | 13 +++++ .../digitalocean-dns/3/rancher-compose.yml | 35 ++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 infra-templates/digitalocean-dns/3/README.md create mode 100644 infra-templates/digitalocean-dns/3/docker-compose.yml create mode 100644 infra-templates/digitalocean-dns/3/rancher-compose.yml diff --git a/infra-templates/digitalocean-dns/3/README.md b/infra-templates/digitalocean-dns/3/README.md new file mode 100644 index 0000000..013559c --- /dev/null +++ b/infra-templates/digitalocean-dns/3/README.md @@ -0,0 +1,53 @@ +## DigitalOcean DNS + +Rancher External DNS service powered by DigitalOcean + +#### Changelog + +##### v0.6.4 + +* Adds support for overriding name template for specific services by setting io.rancher.service.external_dns_name_template label to it in docker-compose.yml + +#### Usage + +##### DigitalOcean DNS record TTL +The DigitalOcean API currently does not support per-record TTL setting. You should configure the global TTL setting for the domain manually and set it to a low value (e.g. 60). + +##### 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 `...`. +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. diff --git a/infra-templates/digitalocean-dns/3/docker-compose.yml b/infra-templates/digitalocean-dns/3/docker-compose.yml new file mode 100644 index 0000000..1564ee2 --- /dev/null +++ b/infra-templates/digitalocean-dns/3/docker-compose.yml @@ -0,0 +1,13 @@ +digitalocean: + image: rancher/external-dns:v0.6.4 + command: -provider=digitalocean + expose: + - 1000 + environment: + DO_PAT: ${DO_PAT} + ROOT_DOMAIN: ${ROOT_DOMAIN} + NAME_TEMPLATE: ${NAME_TEMPLATE} + TTL: 300 + labels: + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" diff --git a/infra-templates/digitalocean-dns/3/rancher-compose.yml b/infra-templates/digitalocean-dns/3/rancher-compose.yml new file mode 100644 index 0000000..a7949fc --- /dev/null +++ b/infra-templates/digitalocean-dns/3/rancher-compose.yml @@ -0,0 +1,35 @@ +.catalog: + name: "DigitalOcean DNS" + version: "v0.6.4" + description: "Rancher External DNS service powered by DigitalOcean" + minimum_rancher_version: v1.5.0 + maximum_rancher_version: v1.5.99 + questions: + - variable: "DO_PAT" + label: "DigitalOcean Personal Access Token" + description: "Enter your personal access token" + type: "string" + required: true + - variable: "ROOT_DOMAIN" + label: "Domain Name" + description: "The domain name managed by DigitalOcean." + 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 '...'. + type: "string" + default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}" + required: false + +digitalocean: + health_check: + port: 1000 + interval: 5000 + unhealthy_threshold: 3 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 From 210de964aaea1fa2040a87187dadb59ac72d3339 Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 11:08:30 -0700 Subject: [PATCH 06/13] updates for new version with notemplating for digitaloceandns --- infra-templates/digitalocean-dns/3/docker-compose.yml | 1 + infra-templates/digitalocean-dns/3/rancher-compose.yml | 6 +++--- infra-templates/digitalocean-dns/config.yml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/infra-templates/digitalocean-dns/3/docker-compose.yml b/infra-templates/digitalocean-dns/3/docker-compose.yml index 1564ee2..5863e6b 100644 --- a/infra-templates/digitalocean-dns/3/docker-compose.yml +++ b/infra-templates/digitalocean-dns/3/docker-compose.yml @@ -1,3 +1,4 @@ +# notemplating digitalocean: image: rancher/external-dns:v0.6.4 command: -provider=digitalocean diff --git a/infra-templates/digitalocean-dns/3/rancher-compose.yml b/infra-templates/digitalocean-dns/3/rancher-compose.yml index a7949fc..64d5f43 100644 --- a/infra-templates/digitalocean-dns/3/rancher-compose.yml +++ b/infra-templates/digitalocean-dns/3/rancher-compose.yml @@ -1,9 +1,9 @@ +# notemplating .catalog: name: "DigitalOcean DNS" - version: "v0.6.4" + version: "v0.6.4.1" description: "Rancher External DNS service powered by DigitalOcean" - minimum_rancher_version: v1.5.0 - maximum_rancher_version: v1.5.99 + minimum_rancher_version: v1.6.0-rc1 questions: - variable: "DO_PAT" label: "DigitalOcean Personal Access Token" diff --git a/infra-templates/digitalocean-dns/config.yml b/infra-templates/digitalocean-dns/config.yml index 2f29acd..315392e 100644 --- a/infra-templates/digitalocean-dns/config.yml +++ b/infra-templates/digitalocean-dns/config.yml @@ -1,7 +1,7 @@ name: DigitalOcean DNS description: | Rancher External DNS service powered by DigitalOcean -version: v0.6.4 +version: v0.6.4.1 category: External DNS labels: io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes' From 32f254cd13aa3c71cfaec054981f737658a3fee7 Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 11:09:48 -0700 Subject: [PATCH 07/13] max versions for dnsimple --- infra-templates/dnsimple/0/rancher-compose.yml | 1 + infra-templates/dnsimple/1/rancher-compose.yml | 1 + infra-templates/dnsimple/2/rancher-compose.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/infra-templates/dnsimple/0/rancher-compose.yml b/infra-templates/dnsimple/0/rancher-compose.yml index 43f9cab..7a1ff09 100644 --- a/infra-templates/dnsimple/0/rancher-compose.yml +++ b/infra-templates/dnsimple/0/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.1.9-rancher1" description: "Rancher External DNS service powered by DNSimple. Requires Rancher version 0.44.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "DNSIMPLE_EMAIL" label: "DNSimple account email address" diff --git a/infra-templates/dnsimple/1/rancher-compose.yml b/infra-templates/dnsimple/1/rancher-compose.yml index 65fe19f..1a9473b 100644 --- a/infra-templates/dnsimple/1/rancher-compose.yml +++ b/infra-templates/dnsimple/1/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.2.1-rancher1" description: "Rancher External DNS service powered by DNSimple. Requires Rancher version 0.44.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "DNSIMPLE_EMAIL" label: "DNSimple account email address" diff --git a/infra-templates/dnsimple/2/rancher-compose.yml b/infra-templates/dnsimple/2/rancher-compose.yml index e2eb9ea..12a01d2 100644 --- a/infra-templates/dnsimple/2/rancher-compose.yml +++ b/infra-templates/dnsimple/2/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.0-rancher1" description: "Rancher External DNS service powered by DNSimple. Requires Rancher version v1.1.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.5.99 questions: - variable: "DNSIMPLE_EMAIL" label: "DNSimple Account Email Address" From c3db25bc27e93f1a8aa81a581a3fdf97f3478d7f Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 11:10:33 -0700 Subject: [PATCH 08/13] basecopy of folder 2 to 3 for dnsimple --- infra-templates/dnsimple/3/README.md | 36 +++++++++++++++ infra-templates/dnsimple/3/docker-compose.yml | 14 ++++++ .../dnsimple/3/rancher-compose.yml | 45 +++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 infra-templates/dnsimple/3/README.md create mode 100644 infra-templates/dnsimple/3/docker-compose.yml create mode 100644 infra-templates/dnsimple/3/rancher-compose.yml diff --git a/infra-templates/dnsimple/3/README.md b/infra-templates/dnsimple/3/README.md new file mode 100644 index 0000000..97b1559 --- /dev/null +++ b/infra-templates/dnsimple/3/README.md @@ -0,0 +1,36 @@ +## DNSimple DNS + +Rancher External DNS service powered by DNSimple DNS + +#### Changelog + +##### v0.6.0 + +* Reduces the overall rate of API requests to the DNS provider +* Adds support for custom DNS naming convention +* Stack, service and environment names used in service DNS names are now sanitized to conform with RFC 1123. Characters other than `a-z`, `A-Z`, `0-9` or `dash` are replaced by dashes. +* For internal use the service creates TXT records to track the FQDNs it manages. These TXT records are named `external-dns-.` and should not be deleted. + +#### Usage + +##### Upgrade Notes +While upgrading from a version lower than v0.6.0 the TTL configuration value should not be changed. You may change it once the upgrade has been completed. + +##### 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. + +##### Custom DNS name template + +By default DNS entries are named `...`. +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. diff --git a/infra-templates/dnsimple/3/docker-compose.yml b/infra-templates/dnsimple/3/docker-compose.yml new file mode 100644 index 0000000..1b0f3b3 --- /dev/null +++ b/infra-templates/dnsimple/3/docker-compose.yml @@ -0,0 +1,14 @@ +dnsimple: + image: rancher/external-dns:v0.6.0 + command: -provider=dnsimple + expose: + - 1000 + environment: + DNSIMPLE_TOKEN: ${DNSIMPLE_TOKEN} + DNSIMPLE_EMAIL: ${DNSIMPLE_EMAIL} + ROOT_DOMAIN: ${ROOT_DOMAIN} + NAME_TEMPLATE: ${NAME_TEMPLATE} + TTL: ${TTL} + labels: + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" diff --git a/infra-templates/dnsimple/3/rancher-compose.yml b/infra-templates/dnsimple/3/rancher-compose.yml new file mode 100644 index 0000000..bb62217 --- /dev/null +++ b/infra-templates/dnsimple/3/rancher-compose.yml @@ -0,0 +1,45 @@ +.catalog: + name: "DNSimple DNS" + version: "v0.6.0-rancher1" + description: "Rancher External DNS service powered by DNSimple. Requires Rancher version v1.1.0" + minimum_rancher_version: v1.6.0-rc1 + questions: + - variable: "DNSIMPLE_EMAIL" + label: "DNSimple Account Email Address" + description: "Email address associated with your DNSimple account" + type: "string" + required: true + - variable: "DNSIMPLE_TOKEN" + label: "DNSimple API Token" + description: "API token for your DNSimple account" + type: "string" + required: true + - variable: "ROOT_DOMAIN" + label: "Root Domain" + description: "The domain name managed by DNSimple." + type: "string" + required: true + - variable: "TTL" + label: "TTL" + description: "The resource record cache time to live (TTL), in seconds" + type: "int" + default: 60 + required: false + - variable: "NAME_TEMPLATE" + label: "DNS Name Template" + description: | + Name template used to construct the subdomain part (left of the root domain name) of the DNS record names. + Supported placeholders: %{{service_name}}, %{{stack_name}}, %{{environment_name}}. + By default DNS entries will be named '...'. + type: "string" + default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}" + required: false + +dnsimple: + health_check: + port: 1000 + interval: 15000 + unhealthy_threshold: 2 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 From d7bd43efb11caa8c653001ac8a32f9fa5dc5aafe Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 11:11:44 -0700 Subject: [PATCH 09/13] updates for notemplating for dnsimple --- infra-templates/dnsimple/3/docker-compose.yml | 3 ++- infra-templates/dnsimple/3/rancher-compose.yml | 3 ++- infra-templates/dnsimple/config.yml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/infra-templates/dnsimple/3/docker-compose.yml b/infra-templates/dnsimple/3/docker-compose.yml index 1b0f3b3..df0293d 100644 --- a/infra-templates/dnsimple/3/docker-compose.yml +++ b/infra-templates/dnsimple/3/docker-compose.yml @@ -1,7 +1,8 @@ +# notemplating dnsimple: image: rancher/external-dns:v0.6.0 command: -provider=dnsimple - expose: + expose: - 1000 environment: DNSIMPLE_TOKEN: ${DNSIMPLE_TOKEN} diff --git a/infra-templates/dnsimple/3/rancher-compose.yml b/infra-templates/dnsimple/3/rancher-compose.yml index bb62217..462cc64 100644 --- a/infra-templates/dnsimple/3/rancher-compose.yml +++ b/infra-templates/dnsimple/3/rancher-compose.yml @@ -1,6 +1,7 @@ +# notemplating .catalog: name: "DNSimple DNS" - version: "v0.6.0-rancher1" + version: "v0.6.0-rancher2" description: "Rancher External DNS service powered by DNSimple. Requires Rancher version v1.1.0" minimum_rancher_version: v1.6.0-rc1 questions: diff --git a/infra-templates/dnsimple/config.yml b/infra-templates/dnsimple/config.yml index 0f1b5e0..ddb531e 100644 --- a/infra-templates/dnsimple/config.yml +++ b/infra-templates/dnsimple/config.yml @@ -1,7 +1,7 @@ name: DNSimple DNS description: | Rancher External DNS service powered by DNSimple -version: v0.6.0-rancher1 +version: v0.6.0-rancher2 category: External DNS labels: io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes' From 2cc97eeda820ab325392b6151abfdba5f1a22912 Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 11:13:48 -0700 Subject: [PATCH 10/13] add max versions to dnsupdate-rfc2136 --- infra-templates/dnsupdate-rfc2136/0/rancher-compose.yml | 1 + infra-templates/dnsupdate-rfc2136/1/rancher-compose.yml | 1 + infra-templates/dnsupdate-rfc2136/2/rancher-compose.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/infra-templates/dnsupdate-rfc2136/0/rancher-compose.yml b/infra-templates/dnsupdate-rfc2136/0/rancher-compose.yml index f22e043..d9f8fec 100644 --- a/infra-templates/dnsupdate-rfc2136/0/rancher-compose.yml +++ b/infra-templates/dnsupdate-rfc2136/0/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.5.0-rancher1" description: "Rancher External DNS service powered by any RFC2136 compatible DNS" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "RFC2136_HOST" label: "Domain Name Server IP" diff --git a/infra-templates/dnsupdate-rfc2136/1/rancher-compose.yml b/infra-templates/dnsupdate-rfc2136/1/rancher-compose.yml index fb43d3e..c57a32f 100644 --- a/infra-templates/dnsupdate-rfc2136/1/rancher-compose.yml +++ b/infra-templates/dnsupdate-rfc2136/1/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.0-rancher1" description: "Rancher External DNS service powered by any RFC2136 compatible DNS server. Requires Rancher version v1.1.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "RFC2136_HOST" label: "DNS Server IP" diff --git a/infra-templates/dnsupdate-rfc2136/2/rancher-compose.yml b/infra-templates/dnsupdate-rfc2136/2/rancher-compose.yml index a6e60dc..3e782ca 100644 --- a/infra-templates/dnsupdate-rfc2136/2/rancher-compose.yml +++ b/infra-templates/dnsupdate-rfc2136/2/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.2-rancher1" description: "Rancher External DNS service powered by any RFC2136 compatible DNS server. Requires Rancher version v1.1.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.5.99 questions: - variable: "RFC2136_HOST" label: "DNS Server IP" From c871857703a0c618886c2a86100e253477fa4c55 Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 11:14:41 -0700 Subject: [PATCH 11/13] base copy of folder 2 to 3 for dnsupdate-rfc2136 --- infra-templates/dnsupdate-rfc2136/3/README.md | 52 +++++++++++++++ .../dnsupdate-rfc2136/3/docker-compose.yml | 17 +++++ .../dnsupdate-rfc2136/3/rancher-compose.yml | 63 +++++++++++++++++++ 3 files changed, 132 insertions(+) create mode 100644 infra-templates/dnsupdate-rfc2136/3/README.md create mode 100644 infra-templates/dnsupdate-rfc2136/3/docker-compose.yml create mode 100644 infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml diff --git a/infra-templates/dnsupdate-rfc2136/3/README.md b/infra-templates/dnsupdate-rfc2136/3/README.md new file mode 100644 index 0000000..fdae2e7 --- /dev/null +++ b/infra-templates/dnsupdate-rfc2136/3/README.md @@ -0,0 +1,52 @@ +## DNS Update (RFC2136) + +Rancher External DNS service powered by any RFC2136 compatible DNS server + +#### Changelog + +##### v0.6.2 + +* Adds support for disabling/enforcing external DNS on the host and service level using labels +* Adds support for insecure DNS Updates +* Fixes an issue with lingering TCP keep-alive connections to the Rancher Metadata service + +#### Usage + +##### Upgrade Notes +While upgrading from a version lower than v0.6.0 the TTL configuration value should not be changed. You may change it once the upgrade has been completed. + +##### 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 + +##### Custom DNS name template + +By default DNS entries are named `...`. +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. diff --git a/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml b/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml new file mode 100644 index 0000000..b5d7215 --- /dev/null +++ b/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml @@ -0,0 +1,17 @@ +rfc2136dns: + image: rancher/external-dns:v0.6.2 + command: -provider=rfc2136 + expose: + - 1000 + environment: + RFC2136_HOST: ${RFC2136_HOST} + RFC2136_PORT: ${RFC2136_PORT} + RFC2136_TSIG_KEYNAME: ${RFC2136_TSIG_KEYNAME} + RFC2136_TSIG_SECRET: ${RFC2136_TSIG_SECRET} + RFC2136_INSECURE: ${RFC2136_INSECURE} + ROOT_DOMAIN: ${ROOT_DOMAIN} + NAME_TEMPLATE: ${NAME_TEMPLATE} + TTL: ${TTL} + labels: + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" diff --git a/infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml b/infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml new file mode 100644 index 0000000..3e782ca --- /dev/null +++ b/infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml @@ -0,0 +1,63 @@ +.catalog: + name: "DNS Update (RFC2136)" + version: "v0.6.2-rancher1" + description: "Rancher External DNS service powered by any RFC2136 compatible DNS server. Requires Rancher version v1.1.0" + minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.5.99 + questions: + - variable: "RFC2136_HOST" + label: "DNS Server IP" + description: "Server IP or Hostname" + type: "string" + required: true + - variable: "RFC2136_PORT" + label: "DNS Server Port" + description: "Server port" + type: "string" + required: true + default: "53" + - variable: "RFC2136_INSECURE" + description: "Disables TSIG authentication for DNS Update requests" + label: "Insecure DNS Update" + required: true + default: false + type: "boolean" + - variable: "RFC2136_TSIG_KEYNAME" + label: "TSIG Key Name" + description: "Name of the TSIG key used for authenticating with the DNS server" + type: "string" + required: false + - variable: "RFC2136_TSIG_SECRET" + label: "TSIG Key" + description: "TSIG secret key used for authenticating with the DNS server (HMAC-MD5, base64 encoded)" + type: "string" + required: false + - variable: "TTL" + label: "TTL" + description: "The resource record cache time to live (TTL), in seconds" + type: "int" + default: 60 + required: false + - variable: "ROOT_DOMAIN" + label: "Zone name" + description: "The name of an existing zone in which to create the records." + type: "string" + required: true + - variable: "NAME_TEMPLATE" + label: "DNS Name Template" + description: | + Name template used to construct the subdomain part (left of the zone/domain name) of the DNS record names. + Supported placeholders: %{{service_name}}, %{{stack_name}}, %{{environment_name}}. + By default DNS entries will be named '...'. + type: "string" + default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}" + required: false + +rfc2136dns: + health_check: + port: 1000 + interval: 5000 + unhealthy_threshold: 3 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 From 97050ebbbf54b1387d285bc7029d64a088a0133c Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 11:16:11 -0700 Subject: [PATCH 12/13] updates for notemplating for dnsupdate-rfc2136 --- infra-templates/dnsupdate-rfc2136/3/docker-compose.yml | 1 + infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml | 6 +++--- infra-templates/dnsupdate-rfc2136/config.yml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml b/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml index b5d7215..829961c 100644 --- a/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml +++ b/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml @@ -1,3 +1,4 @@ +# notemplating rfc2136dns: image: rancher/external-dns:v0.6.2 command: -provider=rfc2136 diff --git a/infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml b/infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml index 3e782ca..b3f2441 100644 --- a/infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml +++ b/infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml @@ -1,9 +1,9 @@ +# notemplating .catalog: name: "DNS Update (RFC2136)" - version: "v0.6.2-rancher1" + version: "v0.6.2-rancher2" description: "Rancher External DNS service powered by any RFC2136 compatible DNS server. Requires Rancher version v1.1.0" - minimum_rancher_version: v1.2.0-pre4-rc1 - maximum_rancher_version: v1.5.99 + minimum_rancher_version: v1.6.0-rc1 questions: - variable: "RFC2136_HOST" label: "DNS Server IP" diff --git a/infra-templates/dnsupdate-rfc2136/config.yml b/infra-templates/dnsupdate-rfc2136/config.yml index 38b9a9d..cfe0d5f 100644 --- a/infra-templates/dnsupdate-rfc2136/config.yml +++ b/infra-templates/dnsupdate-rfc2136/config.yml @@ -1,7 +1,7 @@ name: DNS Update (RFC2136) description: | Rancher External DNS service powered by any RFC2136 compatible DNS -version: v0.6.2-rancher1 +version: v0.6.2-rancher2 category: External DNS labels: io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes' From 2a026e6cbd38df1bfe85e7eebc1eccb336ab738f Mon Sep 17 00:00:00 2001 From: deniseschannon Date: Wed, 10 May 2017 12:12:42 -0700 Subject: [PATCH 13/13] remove notemplating from docker-compose.yml --- infra-templates/cloudflare/4/docker-compose.yml | 1 - infra-templates/digitalocean-dns/3/docker-compose.yml | 1 - infra-templates/dnsimple/3/docker-compose.yml | 1 - infra-templates/dnsupdate-rfc2136/3/docker-compose.yml | 1 - 4 files changed, 4 deletions(-) diff --git a/infra-templates/cloudflare/4/docker-compose.yml b/infra-templates/cloudflare/4/docker-compose.yml index 83eac5f..bc46199 100644 --- a/infra-templates/cloudflare/4/docker-compose.yml +++ b/infra-templates/cloudflare/4/docker-compose.yml @@ -1,4 +1,3 @@ -# notemplating cloudflare: image: rancher/external-dns:v0.6.0 command: -provider=cloudflare diff --git a/infra-templates/digitalocean-dns/3/docker-compose.yml b/infra-templates/digitalocean-dns/3/docker-compose.yml index 5863e6b..1564ee2 100644 --- a/infra-templates/digitalocean-dns/3/docker-compose.yml +++ b/infra-templates/digitalocean-dns/3/docker-compose.yml @@ -1,4 +1,3 @@ -# notemplating digitalocean: image: rancher/external-dns:v0.6.4 command: -provider=digitalocean diff --git a/infra-templates/dnsimple/3/docker-compose.yml b/infra-templates/dnsimple/3/docker-compose.yml index df0293d..95041b7 100644 --- a/infra-templates/dnsimple/3/docker-compose.yml +++ b/infra-templates/dnsimple/3/docker-compose.yml @@ -1,4 +1,3 @@ -# notemplating dnsimple: image: rancher/external-dns:v0.6.0 command: -provider=dnsimple diff --git a/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml b/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml index 829961c..b5d7215 100644 --- a/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml +++ b/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml @@ -1,4 +1,3 @@ -# notemplating rfc2136dns: image: rancher/external-dns:v0.6.2 command: -provider=rfc2136