signalfx / maestro-ng

Orchestration of Docker-based, multi-host environments
https://signalfx.com
Apache License 2.0
685 stars 83 forks source link

Ship provider should support ship defaults for TLS parameters init #185

Closed ac111 closed 7 years ago

ac111 commented 7 years ago

We have common TLS parameters for all ships in a deployment, which we define in ship defaults section of our orchestration YAML file. The StaticShipProvider does not currently use the ship defaults, which need to be duplicated across the ship definitions (violating DRY). I'm proposing that the tls_* parameters in container ship init use ship or defaults, eg:

tls=self._from_ship_or_defaults(v, 'tls'), tls_cert=self._from_ship_or_defaults(v, 'tls_cert'), tls_key=self._from_ship_or_defaults(v, 'tls_key'), tls_verify=self._from_ship_or_defaults(v, 'tls_verify'), tls_ca_cert=self._from_ship_or_defaults(v, 'tls_ca_cert'), ssl_version=self._from_ship_or_defaults(v, 'ssl_version')

mpetazzoni commented 7 years ago

Sounds great! Can you send a PR with this change (and unit test)? Thanks!