Skip to content

Commit b2ea2f8

Browse files
committed
REORG/MINOR: arguments: rename storage-ssl-certs-dir to ssl-certs-dir
storage-ssl-certs-dir renamed to ssl-certs-dir to be consistent in naming with maps-dir and spoe-dir
1 parent b311da4 commit b2ea2f8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

configuration/configuration.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ import (
1919
"encoding/json"
2020
"fmt"
2121
"io/ioutil"
22+
"math/rand"
2223
"os"
2324
"path/filepath"
2425
"strings"
2526
"sync"
26-
27-
"math/rand"
2827
"time"
2928

3029
"github.com/google/renameio"
@@ -53,7 +52,7 @@ type HAProxyConfiguration struct {
5352
UserListFile string `long:"userlist-file" description:"Path to the dataplaneapi userlist file. By default userlist is read from HAProxy conf. When specified userlist would be read from this file"`
5453
NodeIDFile string `long:"fid" description:"Path to file that will dataplaneapi use to write its id (not a pid) that was given to him after joining a cluster"`
5554
MapsDir string `short:"p" long:"maps-dir" description:"Path to directory of map files managed by dataplane" default:"/etc/haproxy/maps"`
56-
StorageSSLCertsDir string `long:"storage-ssl-certs-dir" description:"Path to SSL certificates directory" default:"/etc/haproxy/ssl"`
55+
SSLCertsDir string `long:"ssl-certs-dir" description:"Path to SSL certificates directory" default:"/etc/haproxy/ssl"`
5756
UpdateMapFiles bool `long:"update-map-files" description:"Flag used for syncing map files with runtime maps values"`
5857
UpdateMapFilesPeriod int64 `long:"update-map-files-period" description:"Elapsed time in seconds between two maps syncing operations" default:"10"`
5958
ClusterTLSCertDir string `long:"cluster-tls-dir" description:"Path where cluster tls certificates will be stored. Defaults to same directory as dataplane configuration file"`
@@ -88,6 +87,7 @@ type ClusterConfiguration struct {
8887
Name AtomicString `yaml:"name"`
8988
Description AtomicString `yaml:"description"`
9089
}
90+
9191
type ClusterTLS struct {
9292
Dir AtomicString `yaml:"path"`
9393
Fetched AtomicBool `yaml:"fetched"`
@@ -118,6 +118,7 @@ type NotifyConfiguration struct {
118118
Reload *ChanNotify `yaml:"-"`
119119
Shutdown *ChanNotify `yaml:"-"`
120120
}
121+
121122
type ServiceDiscovery struct {
122123
mu sync.Mutex
123124
Consuls []*models.Consul `yaml:"consuls"`
@@ -139,7 +140,7 @@ type Configuration struct {
139140
MapSync *MapSync `yaml:"-"`
140141
}
141142

142-
//Get returns pointer to configuration
143+
// Get returns pointer to configuration
143144
func Get() *Configuration {
144145
if cfg == nil {
145146
cfg = &Configuration{}

configure_data_plane.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,8 @@ func configureNativeClient(haproxyOptions dataplaneapi_config.HAProxyConfigurati
709709
log.Fatalf("error trying to use empty string for managed map directory")
710710
}
711711

712-
if haproxyOptions.StorageSSLCertsDir != "" {
713-
client.SSLCertStorage, err = storage.New(haproxyOptions.StorageSSLCertsDir, storage.SSLType)
712+
if haproxyOptions.SSLCertsDir != "" {
713+
client.SSLCertStorage, err = storage.New(haproxyOptions.SSLCertsDir, storage.SSLType)
714714
if err != nil {
715715
log.Fatalf("error initializing SSL certs storage: %v", err)
716716
}

0 commit comments

Comments
 (0)