Skip to content

Commit

Permalink
Use generic frequency healthcheck option, adjust README to new defaul…
Browse files Browse the repository at this point in the history
…ts and deprecation
  • Loading branch information
istr committed Oct 8, 2023
1 parent 70e25e7 commit 855e605
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 11 deletions.
43 changes: 33 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,30 @@ ConstellixProvider supports dynamic records.
#### Health Check Options
See https://github.com/octodns/octodns/blob/master/docs/dynamic_records.md#health-checks for information on health checking for dynamic records. ConstellixProvider supports the following options:
See https://github.com/octodns/octodns/blob/master/docs/dynamic_records.md#health-checks for information on health checking for dynamic records.
| Key | Description | Default |
ConstellixProvider supports the following options:
| Key | Description | Default | Notes |
|--|--|--|
| frequency | time between checks in seconds | 60 | rounded up to the next larger possible sonar_interval |
| host | FQDN for host header and SNI in HTTP(S) mode | - | ignored for TCP checks |
| path | path to check in HTTP(S) mode | _dns | ignored for TCP checks |
| port | port to check | 443 | - |
| protocol | HTTP/HTTPS/TCP | HTTPS | - |
ConstellixProvider supports the following provider-specific options:
| Key | Description | Default | Notes |
|--|--|--|
| sonar_interval | Sonar check interval | ONEMINUTE |
| sonar_port | Sonar check port | 80 |
| sonar_interval | Sonar check interval | ONEMINUTE | Deprecated. Use `healthcheck/frequency` instead |
| sonar_port | Sonar check port | 443 | Deprecated. Use `healthcheck/port` instead |
| sonar_regions | Sonar check regions for a check. WORLD or a list of values | WORLD |
| sonar_type | Sonar check type TCP/HTTP | TCP |
| sonar_type | Sonar check type TCP/HTTP | HTTPS | Deprecated. Use `healthcheck/protocol` instead |

Sonar check interval (sonar_interval) possible values:
Sonar check interval (`sonar_interval`) possible values:

* FIVESECONDS
* THIRTYSECONDS
Expand All @@ -80,7 +94,7 @@ Sonar check interval (sonar_interval) possible values:
* HALFDAY
* DAY

Sonar check regions (sonar_regions) possible values:
Sonar check regions (`sonar_regions`) possible values:

* ASIAPAC
* EUROPE
Expand All @@ -93,14 +107,23 @@ Sonar check regions (sonar_regions) possible values:
```yaml
---
octodns:
healthcheck:
frequency: 60
host: my-host-name
path: /dns-health-check
port: 443
protocol: HTTPS
constellix:
healthcheck:
sonar_interval: DAY
sonar_port: 80
# deprecated
# sonar_interval: DAY
# deprecated
# sonar_port: 443
sonar_regions:
- ASIAPAC
- EUROPE
sonar_type: TCP
# deprecated
# sonar_type: HTTPS
```

### Development
Expand Down
2 changes: 1 addition & 1 deletion octodns_constellix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ def _healthcheck_config(self, record):

healthcheck['interval'] = sonar_healthcheck.get(
'sonar_interval', None
) or self._seconds_to_sonar_interval(healthcheck.get('interval', 60))
) or self._seconds_to_sonar_interval(healthcheck.get('frequency', 60))

return healthcheck

Expand Down

0 comments on commit 855e605

Please sign in to comment.