Allow override of discovery URL via ConfigMap

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

- Seems like the next step is to allow override of the CA bundle; I didn't
  do that here for simplicity of the commit, but seems like it is the right
  thing to do in the future.
This commit is contained in:
Andrew Keesler
2020-08-03 10:17:11 -04:00
parent 548874a641
commit 597408a977
14 changed files with 167 additions and 49 deletions
+11 -1
View File
@@ -7,7 +7,8 @@ package api
// Config contains knobs to setup an instance of placeholder-name.
type Config struct {
WebhookConfig WebhookConfigSpec `json:"webhook"`
WebhookConfig WebhookConfigSpec `json:"webhook"`
DiscoveryConfig DiscoveryConfigSpec `json:"discovery"`
}
// WebhookConfig contains configuration knobs specific to placeholder-name's use
@@ -21,3 +22,12 @@ type WebhookConfigSpec struct {
// to validate TLS connections to the WebhookURL.
CABundle []byte `json:"caBundle"`
}
// DiscoveryConfigSpec contains configuration knobs specific to
// placeholder-name's publishing of discovery information. These values can be
// viewed as overrides, i.e., if these are set, then placeholder-name will
// publish these values in its discovery document instead of the ones it finds.
type DiscoveryConfigSpec struct {
// URL contains the URL at which placeholder-name can be contacted.
URL *string `json:"url,omitempty"`
}