Hello,
I filed an issue https://github.com/haproxytech/hcl-converter/issues/1
to have the hcl-converter handle the keepalived section of the
dataplaneapi.hcl file and developed a fix for consideration. Please let
me know if I need to modify it or if it's good as is then merge it in as
time permits.
Author: Nathan Wehrman <n....@haproxy.com>
Date: Wed, 20 Dec 2023 16:05:55 -0800
Subject: MINOR: Added keepalived struct type
---
configuration/storage.go | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/configuration/storage.go b/configuration/storage.go
index 9993a0e..0ecaecc 100644
--- a/configuration/storage.go
+++ b/configuration/storage.go
@@ -15,6 +15,7 @@ type StorageDataplaneAPIConfiguration struct {
Haproxy *configTypeHaproxy
`yaml:"haproxy,omitempty" hcl:"haproxy,omitempty"`
Cluster *configTypeCluster
`yaml:"cluster,omitempty" hcl:"cluster,omitempty"`
ServiceDiscovery *configTypeServiceDiscovery
`yaml:"service_discovery,omitempty" hcl:"service_discovery,omitempty"`
+ KeepAlived *configTypeKeepAlived
`yaml:"keepalived,omitempty" hcl:"keepalived,omitempty"`
Log *configTypeLog
`yaml:"log,omitempty" hcl:"log,omitempty"`
LogTargets *Targets
`yaml:"log_targets,omitempty" hcl:"log_targets,omitempty"`
}
@@ -116,6 +117,20 @@ type configTypeTransaction struct {
MaxOpenTransactions *int64 `yaml:"max_open_transactions,omitempty"
hcl:"max_open_transactions,omitempty"`
}
+type configTypeKeepAlived struct {
+ ConfigFile *string `yaml:"config_file,omitempty"
hcl:"config_file,omitempty"`
+ StartCmd *string `yaml:"start_cmd,omitempty"
hcl:"start_cmd,omitempty"`
+ ReloadCmd *string `yaml:"reload_cmd,omitempty"
hcl:"reload_cmd,omitempty"`
+ RestartCmd *string `yaml:"restart_cmd,omitempty"
hcl:"restart_cmd,omitempty"`
+ StopCmd *string `yaml:"stop_cmd,omitempty"
hcl:"stop_cmd,omitempty"`
+ StatusCmd *string `yaml:"status_cmd,omitempty"
hcl:"status_cmd,omitempty"`
+ ValidateCmd *string `yaml:"validate_cmd,omitempty"
hcl:"validate_cmd,omitempty"`
+ ReloadDelay *int `yaml:"reload_delay,omitempty"
hcl:"reload_delay,omitempty"`
+ TransactionDir *string `yaml:"transaction_dir,omitempty"
hcl:"transaction_dir,omitempty"`
+ BackupsDir *string `yaml:"backups_dir,omitempty"
hcl:"backups_dir,omitempty"`
+ BackupsNumber *int `yaml:"backups_number,omitempty"
hcl:"backups_number,omitempty"`
+}
+
type configTypeResources struct {
MapsDir *string `yaml:"maps_dir,omitempty"
hcl:"maps_dir,omitempty"`
SSLCertsDir *string `yaml:"ssl_certs_dir,omitempty"
hcl:"ssl_certs_dir,omitempty"`
--
2.34.1
Thanks,
Nathan Wehrman
Sr. Systems Engineer
https://www.haproxy.com