From 3dd3418f1d923be71bfd69f43db10ded487d395d Mon Sep 17 00:00:00 2001 From: Aiwantaozi Date: Wed, 20 Sep 2017 18:32:05 +0800 Subject: [PATCH] add infoblox dns provider support --- infra-templates/infoblox/0/README.md | 40 +++++++++++ infra-templates/infoblox/0/docker-compose.yml | 16 +++++ .../infoblox/0/rancher-compose.yml | 63 ++++++++++++++++++ .../infoblox/catalogIcon-infoblox.png | Bin 0 -> 5951 bytes infra-templates/infoblox/config.yml | 7 ++ 5 files changed, 126 insertions(+) create mode 100644 infra-templates/infoblox/0/README.md create mode 100644 infra-templates/infoblox/0/docker-compose.yml create mode 100644 infra-templates/infoblox/0/rancher-compose.yml create mode 100644 infra-templates/infoblox/catalogIcon-infoblox.png create mode 100644 infra-templates/infoblox/config.yml diff --git a/infra-templates/infoblox/0/README.md b/infra-templates/infoblox/0/README.md new file mode 100644 index 0000000..3f3636b --- /dev/null +++ b/infra-templates/infoblox/0/README.md @@ -0,0 +1,40 @@ +## Infoblox DNS + +Rancher External DNS service powered by Infoblox 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 `...`. +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. \ No newline at end of file diff --git a/infra-templates/infoblox/0/docker-compose.yml b/infra-templates/infoblox/0/docker-compose.yml new file mode 100644 index 0000000..fb89ebc --- /dev/null +++ b/infra-templates/infoblox/0/docker-compose.yml @@ -0,0 +1,16 @@ +infoblox: + image: rancher/external-dns:v0.7.5 + command: -provider=infoblox + expose: + - 1000 + environment: + INFOBLOX_URL: ${INFOBLOX_URL} + INFOBLOX_USER_NAME: ${INFOBLOX_USER_NAME} + INFOBLOX_PASSWORD: ${INFOBLOX_PASSWORD} + ROOT_DOMAIN: ${ROOT_DOMAIN} + SSL_VERIFY: ${SSL_VERIFY} + USE_COOKIES: ${USE_COOKIES} + TTL: ${TTL} + labels: + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" diff --git a/infra-templates/infoblox/0/rancher-compose.yml b/infra-templates/infoblox/0/rancher-compose.yml new file mode 100644 index 0000000..0ddd99d --- /dev/null +++ b/infra-templates/infoblox/0/rancher-compose.yml @@ -0,0 +1,63 @@ +# notemplating +.catalog: + name: "Infoblox DNS" + version: "v0.1.0" + description: "Rancher External DNS service powered by Infoblox" + minimum_rancher_version: v1.6.0 + questions: + - variable: "INFOBLOX_URL" + label: "Infoblox url" + description: "Infoblox url for your Infoblox service" + type: "string" + required: true + - variable: "INFOBLOX_USER_NAME" + label: "Infoblox user name" + description: "Infoblox user name for your Infoblox service" + type: "string" + required: true + - variable: "INFOBLOX_PASSWORD" + label: "Infoblox password" + description: "Infoblox password for your Infoblox service" + type: "string" + required: true + - variable: "SSL_VERIFY" + label: "Ssl verify" + description: "Infoblox Ssl verify for your Infoblox service" + type: "boolean" + required: true + - variable: "USE_COOKIES" + label: "Use cookies" + description: "Uses cookies if specified, re-creating the request and falling back to basic auth if a cookie is not present" + type: "boolean" + required: true + - variable: "ROOT_DOMAIN" + label: "Domain" + description: "The DNS zone name (root domain) managed by Infoblox. DNS entries will be created for ..." + 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 '...'. + type: "string" + default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}" + required: false + +infoblox: + health_check: + port: 1000 + interval: 5000 + unhealthy_threshold: 3 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 \ No newline at end of file diff --git a/infra-templates/infoblox/catalogIcon-infoblox.png b/infra-templates/infoblox/catalogIcon-infoblox.png new file mode 100644 index 0000000000000000000000000000000000000000..62ac6a964ed9b8a6e71ffcb9c3050024de91539c GIT binary patch literal 5951 zcmaJ_XH-*Lx1|%RAYCb;cS0zk29P2kz2g-`N`%l7l1N8sQU#=mBE5qY1q2kNgMuO* zX_8O^2n3X_p*+0bz4v=R-hF4Bb9NbX&b9VhYmc$di8nXZXP~`8OF}}zU}&IgdC~S= zJW2qni+7t#^3p}ah0(LeSRw9W0-RAWl51`V7Z}jc$Jrfb33GM}@*9AulaP=Lz^&~u z_9n)vt_U9)=ieBaKp*4IK69U108TU#P%NYli?3?gkaGQ#6q^LF&Lf z;0D1cm{qW;wQI1KtBRX|rUp*BE)4C8f+I0-gfH;7qO%L)9tJ9K;pu;t;Dh`})))O(m@Wba3Uo$-z%sJGm-IK# z#N_{n`uO~VMq?~t|MmC(6h>PIAz>g(7#eX8<$960yMn(>AysuyFlP(`WsN|1{~bkh z4+I8*_CO$kI#v*%m>t~L4H1AA{}XRwqH5@i#yI=B!VGnx0v8H0aJZYQwz9k&L_tLs ztZ+>k4Az6FKp+Y_DmvF8I(m94a!NXXb9E7}_k3W!n7_Gh|K)=JmHWFCe2^EGbzvyD zKg{hq3gH9%bIGdkfAvLK?_c%);=28-FUr^dl?%FX2J}0z|0~gdPhC{c@9sZkdolQ@ z@L|3e)sDI-YiDG#6A1}RgQ4y<>%iG9N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}M-+)Z zHQ=YNa4O>xQf_jNE+jOaF!$bK!Az|yOJlWx%Pa&Tued3uT?CG?_`^rqnowaANzP|$ zFMD{|vjI1Zx!y4RwPl^*JJW1YnQd>bol#H!{*~@zYUNSvQUPY=Kz}dfOP-_pBUji@FQmT~3)8kRMOC;ho45rJT16Y#rP@j)}fmz5O473AB;!j)6 zSw1Iu>_Ou-MfS{cdJpe!*7k>48*a~-$YdLZh<^`+nn=IuddX5-&fyN&DVFCb?7Q49 zxy=J_d#yB5p;@^4W~%|mB~uKszXtf8ps-NiLT(plb8jD4( literal 0 HcmV?d00001 diff --git a/infra-templates/infoblox/config.yml b/infra-templates/infoblox/config.yml new file mode 100644 index 0000000..46f51e2 --- /dev/null +++ b/infra-templates/infoblox/config.yml @@ -0,0 +1,7 @@ +name: Infoblox DNS +description: | + Rancher External DNS service powered by Infoblox +version: v0.1.0 +category: External DNS +labels: + io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes'