Gcore
Configuration
To use this provider, add an entry to creds.json
with TYPE
set to GCORE
along with a Gcore account API token.
Example:
Metadata
This provider supports the following metadata fields specific to Gcore, to support Gcore's GeoDNS and failover features.
All metadata values are a string, instead of a number/int or a boolean value. If you want to set a number or a boolean value, you must specify them in their string forms.
Record level metadata
These metadata fields can be set on each individual record:
gcore_asn
: Comma separated string of ASNs the record should be served to.gcore_continents
: Comma separated string of continents the record should be served to. Valid values are:as,na,an,sa,oc,eu,af
.gcore_countries
: Comma separated string of countries and regions the record should be served to. Countries and regions are represented by their two-letter code (ISO 3166-1 alpha-2).gcore_latitude
andgcore_longitude
: Coordinate of the server's location the record is pointing to. Used for GeoDistance feature.gcore_notes
: Arbitrary notes for the record.gcore_weight
: Weight of the record, used in load balancing.gcore_ip
: Comma separated string of IPs/CIDRs the record should be served to.
Failover (Healthcheck) metadata
These metadata fields are shared within the same RRSet (record name and type combo). The failover metadata MUST be set on all the records within the RRSet, and MUST be exactly the same across all records.
gcore_failover_protocol
: Protocol to perform healthcheck on the server the record is pointing to. Valid values:HTTP, TCP, UDP, ICMP
gcore_failover_port
: The port (as a string) to connect to the server.gcore_failover_frequency
: How often healthcheck should be performed, in seconds as a string. Valid values: 10-3600gcore_failover_timeout
: How long healthcheck should wait for server's response, in seconds as a string. Valid values: 1-10gcore_failover_method
: HTTP method used in the healthcheck. Only applies ifgcore_failover_protocol
is set toHTTP
.gcore_failover_command
: Bytes to be sent to the server in the healthcheck. Only applies ifgcore_failover_protocol
is set toTCP
orUDP
.gcore_failover_url
: Relative URL to be requested, e.g./
. Only applies ifgcore_failover_protocol
is set toHTTP
.gcore_failover_tls
: If SSL/TLS should be used when connecting to origin server. Can be eithertrue
orfalse
as a string.gcore_failover_regexp
: Regular expression of expected contents in the response.gcore_failover_http_status_code
: Expected HTTP status code as a string. Only applies ifgcore_failover_protocol
is set toHTTP
.gcore_failover_host
: Host field in the HTTP request header. Only applies ifgcore_failover_protocol
is set toHTTP
.
Filters
The gcore_filters
metadata is a semicolon delimited string of several "filter" values.
Each filter is a comma separated string of 2 or 3 fields:
2 fields:
type,strict
.3 fields:
type,strict,limit
.
As for the meaning of the fields:
type
is the type of the filter, e.g.healthcheck
,geodistance
.strict
specifies what happens if the filter returns no records. Ifstrict
isfalse
, then all records will be returned. Ifstrict
istrue
, then no records will be returned.limit
specifies the maximum number of records to be returned. This is an optional field.
Let's take an example gcore_filters
value: healthcheck,false;geodistance,false;first_n,false,2
This example filter specifies 3 filters: healthcheck
, geodistance
, first_n
. For all three filters, the strict
field is set to false
. For first_n
filter, the max number of records to return is 2.
But this is too complicated for me! (Generating metadata with GCore itself)
GCore provider will also display the record metadata in the corrections list. If you're overwhelmed by the instructions above, you can do the following instead:
Add your records manually on Gcore's DNS control panel, and set all the metadata/filters you need.
Run
dnscontrol preview
. You will see DNSControl wants to delete your records:Here DNSControl has generated all the metadata above based on your existing records.
Copy the metadata into your
dnsconfig.js
file.
Usage
An example configuration:
Example with metadata
An example configuration with metadata set:
Activation
DNSControl depends on a Gcore account API token.
You can obtain your API token on this page: https://accounts.gcore.com/profile/api-tokens
Last updated