mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 13:23:09 +01:00
chore: add server data
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
This commit is contained in:
parent
c5f9869c16
commit
1bd96b0126
@ -55,9 +55,15 @@ func main() {
|
||||
Namespace: namespace,
|
||||
Name: boName,
|
||||
},
|
||||
// TODO: improve
|
||||
PGDataPath: os.Getenv("PGDATA"),
|
||||
PGWALPath: os.Getenv("PGWAL"),
|
||||
SpoolDirectory: os.Getenv("SPOOL_DIRECTORY"),
|
||||
ServerCertPath: os.Getenv("SERVER_CERT"),
|
||||
ServerKeyPath: os.Getenv("SERVER_KEY"),
|
||||
ClientCertPath: os.Getenv("CLIENT_CERT"),
|
||||
ServerAddress: os.Getenv("SERVER_ADDRESS"),
|
||||
PluginPath: os.Getenv("PLUGIN_PATH"),
|
||||
}); err != nil {
|
||||
setupLog.Error(err, "unable to create CNPGI runnable")
|
||||
os.Exit(1)
|
||||
|
||||
@ -15,6 +15,13 @@ type CNPGI struct {
|
||||
PGDataPath string
|
||||
PGWALPath string
|
||||
SpoolDirectory string
|
||||
ServerCertPath string
|
||||
ServerKeyPath string
|
||||
ClientCertPath string
|
||||
// mutually exclusive with pluginPath
|
||||
ServerAddress string
|
||||
// mutually exclusive with serverAddress
|
||||
PluginPath string
|
||||
}
|
||||
|
||||
func (c *CNPGI) Start(ctx context.Context) error {
|
||||
@ -31,14 +38,13 @@ func (c *CNPGI) Start(ctx context.Context) error {
|
||||
}
|
||||
|
||||
srv := http.Server{
|
||||
IdentityImpl: IdentityImplementation{},
|
||||
Enrichers: []http.ServerEnricher{enrich},
|
||||
// TODO: fille
|
||||
ServerCertPath: "",
|
||||
ServerKeyPath: "",
|
||||
ClientCertPath: "",
|
||||
ServerAddress: "",
|
||||
PluginPath: "",
|
||||
IdentityImpl: IdentityImplementation{},
|
||||
Enrichers: []http.ServerEnricher{enrich},
|
||||
ServerCertPath: c.ServerCertPath,
|
||||
ServerKeyPath: c.ServerKeyPath,
|
||||
ClientCertPath: c.ClientCertPath,
|
||||
ServerAddress: c.ServerAddress,
|
||||
PluginPath: c.PluginPath,
|
||||
}
|
||||
|
||||
return srv.Start(ctx)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user