Merge pull request #688 from loganhz/env-name
Fix Aliyun DNS issue which change env name doesn't trigger DNS update
This commit is contained in:
commit
33b427115d
40
infra-templates/alidns/2/README.md
Normal file
40
infra-templates/alidns/2/README.md
Normal file
@ -0,0 +1,40 @@
|
||||
## Alibaba Cloud DNS
|
||||
|
||||
Rancher External DNS service powered by Alibaba Cloud DNS
|
||||
|
||||
#### Usage
|
||||
|
||||
##### 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.
|
14
infra-templates/alidns/2/docker-compose.yml
Normal file
14
infra-templates/alidns/2/docker-compose.yml
Normal file
@ -0,0 +1,14 @@
|
||||
alidns:
|
||||
image: rancher/external-dns:v0.7.9
|
||||
command: -provider=alidns
|
||||
expose:
|
||||
- 1000
|
||||
environment:
|
||||
ALICLOUD_ACCESS_KEY_ID: ${ALICLOUD_ACCESS_KEY_ID}
|
||||
ALICLOUD_ACCESS_KEY_SECRET: ${ALICLOUD_ACCESS_KEY_SECRET}
|
||||
ROOT_DOMAIN: ${ROOT_DOMAIN}
|
||||
NAME_TEMPLATE: ${NAME_TEMPLATE}
|
||||
TTL: ${TTL}
|
||||
labels:
|
||||
io.rancher.container.create_agent: "true"
|
||||
io.rancher.container.agent.role: "external-dns"
|
48
infra-templates/alidns/2/rancher-compose.yml
Normal file
48
infra-templates/alidns/2/rancher-compose.yml
Normal file
@ -0,0 +1,48 @@
|
||||
# notemplating
|
||||
.catalog:
|
||||
name: "Alibaba Cloud DNS"
|
||||
version: "v0.3.0"
|
||||
description: "Rancher External DNS service powered by Alibaba Cloud"
|
||||
minimum_rancher_version: v1.6.13-rc1
|
||||
questions:
|
||||
- variable: "ALICLOUD_ACCESS_KEY_ID"
|
||||
label: "Access Key ID"
|
||||
description: "Access key id for your Alibaba Cloud account"
|
||||
type: "string"
|
||||
required: true
|
||||
- variable: "ALICLOUD_ACCESS_KEY_SECRET"
|
||||
label: "Access Key Secret"
|
||||
description: "Access key secret for your Alibaba Cloud account"
|
||||
type: "string"
|
||||
required: true
|
||||
- variable: "ROOT_DOMAIN"
|
||||
label: "Domain"
|
||||
description: "The DNS zone (domain) managed by Alibaba Cloud. DNS entries will be created for <service>.<stack>.<environment>.<domain>"
|
||||
type: "string"
|
||||
required: true
|
||||
- variable: "TTL"
|
||||
label: "TTL"
|
||||
description: "The resource record cache time to live (TTL), in seconds"
|
||||
type: "int"
|
||||
default: 600
|
||||
min: 1
|
||||
max: 86400
|
||||
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 '<service>.<stack>.<environment>.<domain>'.
|
||||
type: "string"
|
||||
default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}"
|
||||
required: false
|
||||
|
||||
alidns:
|
||||
health_check:
|
||||
port: 1000
|
||||
interval: 5000
|
||||
unhealthy_threshold: 3
|
||||
request_line: GET / HTTP/1.0
|
||||
healthy_threshold: 2
|
||||
response_timeout: 2000
|
@ -1,7 +1,7 @@
|
||||
name: Alibaba Cloud DNS
|
||||
description: |
|
||||
Rancher External DNS service powered by Alibaba Cloud
|
||||
version: v0.2.0
|
||||
version: v0.3.0
|
||||
category: External DNS
|
||||
labels:
|
||||
io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes'
|
||||
|
Loading…
x
Reference in New Issue
Block a user