Refactor into dual Rancher API/Metadata providers
Introduces Rancher's metadata service as an optional provider source for Traefik, enabled by setting `rancher.MetadataService`. The provider uses a long polling technique to watch the metadata service and obtain near instantaneous updates. Alternatively it can be configured to poll the metadata service every `rancher.RefreshSeconds` by setting `rancher.MetadataPoll`. The refactor splits API and metadata service code into separate source files respectively, and specific configuration is deferred to sub-structs. Incorporates bugfix #1414
This commit is contained in:
parent
984ea1040f
commit
9cb07d026f
14 changed files with 1006 additions and 272 deletions
|
@ -1098,28 +1098,59 @@
|
|||
#
|
||||
# ExposedByDefault = false
|
||||
|
||||
# Filter services with unhealthy states and health states
|
||||
# Filter services with unhealthy states and inactive states
|
||||
#
|
||||
# Optional
|
||||
# Default: false
|
||||
#
|
||||
# EnableServiceHealthFilter = false
|
||||
# EnableServiceHealthFilter = true
|
||||
|
||||
# Endpoint to use when connecting to Rancher
|
||||
# Enable Rancher API configuration backend
|
||||
#
|
||||
# Optional
|
||||
# Default: true
|
||||
#
|
||||
# [rancher.api]
|
||||
|
||||
# Endpoint to use when connecting to the Rancher API
|
||||
#
|
||||
# Required
|
||||
# Endpoint = "http://rancherserver.example.com/v1"
|
||||
|
||||
# AccessKey to use when connecting to Rancher
|
||||
# AccessKey to use when connecting to the Rancher API
|
||||
#
|
||||
# Required
|
||||
# AccessKey = "XXXXXXXXXXXXXXXXXXXX"
|
||||
|
||||
# SecretKey to use when connecting to Rancher
|
||||
# SecretKey to use when connecting to the Rancher API
|
||||
#
|
||||
# Required
|
||||
# SecretKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
# Enable Rancher metadata service configuration backend instead of the API
|
||||
# configuration backend
|
||||
#
|
||||
# Optional
|
||||
# Default: false
|
||||
#
|
||||
# [rancher.metadataservice]
|
||||
|
||||
# Poll the Rancher metadata service for changes every `rancher.RefreshSeconds`
|
||||
# NOTE: this is less accurate than the default long polling technique which
|
||||
# will provide near instantaneous updates to Traefik
|
||||
#
|
||||
# Optional
|
||||
# Default: false
|
||||
#
|
||||
# IntervalPoll = true
|
||||
|
||||
# Prefix used for accessing the Rancher metadata service
|
||||
#
|
||||
# Optional
|
||||
# Default: "/latest"
|
||||
#
|
||||
# Prefix = "/2016-07-29"
|
||||
|
||||
# Constraints
|
||||
#
|
||||
# Optional
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue