Skip to content

Commit ce94341

Browse files
committed
Allow server to be configured with --venafi-cloud
This allows the server URL to be specified in the agent.yaml even when `--venafi-cloud` flag is present. Signed-off-by: Oluwole Fadeyi <[email protected]>
1 parent 0461700 commit ce94341

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)