Skip to content

Commit f8d8b5a

Browse files
authored
Merge pull request #459 from jetstack/fix-venafi-config
Allow server to be configured even with `--venafi-cloud` present
2 parents 0461700 + ce94341 commit f8d8b5a

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

pkg/agent/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func ParseConfig(data []byte, isVenafiCloudMode bool) (Config, error) {
177177

178178
if config.Server == "" && config.Endpoint.Host == "" && config.Endpoint.Path == "" {
179179
config.Server = "https://preflight.jetstack.io"
180-
if config.VenafiCloud != nil {
180+
if config.VenafiCloud != nil || isVenafiCloudMode {
181181
config.Server = client.VenafiCloudProdURL
182182
}
183183
}

pkg/agent/run.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,6 @@ func getConfiguration() (Config, client.Client) {
203203
log.Fatalf("Failed to parse config file: %s", err)
204204
}
205205

206-
if VenafiCloudMode {
207-
// if the venafi-cloud mode is enabled override config.Server
208-
config.Server = client.VenafiCloudProdURL
209-
}
210-
211206
baseURL := config.Server
212207
if baseURL == "" {
213208
log.Printf("Using deprecated Endpoint configuration. User Server instead.")

0 commit comments

Comments
 (0)