Skip to content

Commit

Permalink
Merge pull request #48 from kube-tarian/cassandra-ssl-fix
Browse files Browse the repository at this point in the history
argocd initialization fixed to read from fetcher
  • Loading branch information
share2kanna authored Jan 29, 2023
2 parents a927f89 + e98c7a2 commit d6e7381
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion charts/kad/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.10
version: 0.1.11

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
40 changes: 21 additions & 19 deletions integrator/common-pkg/plugins/argocd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,26 +106,28 @@ func fetchConfiguration(log logging.Logger) (*Configuration, error) {
// Else it uses fetched to get the plugin details and prepares the configuration
cfg := &Configuration{}
err := envconfig.Process("", cfg)
if err == nil {
return cfg, err
}

fetcherClient, err := fetcher.NewCredentialFetcher(log)
if err != nil {
fetcherClient, err := fetcher.NewCredentialFetcher(log)
if err != nil {
log.Errorf("fetcher client initialization failed: %v", err)
return nil, err
}

response, err := fetcherClient.FetchPluginDetails(&fetcher.PluginRequest{
PluginName: "argocd",
})
if err != nil {
log.Errorf("Failed to get the plugin details: %v", err)
return nil, err
}
cfg = &Configuration{
ServiceURL: response.ServiceURL,
IsSSLEnabled: response.IsSSLEnabled,
Username: response.Username,
Password: response.Password,
}
log.Errorf("fetcher client initialization failed: %v", err)
return nil, err
}

response, err := fetcherClient.FetchPluginDetails(&fetcher.PluginRequest{
PluginName: "argocd",
})
if err != nil {
log.Errorf("Failed to get the plugin details: %v", err)
return nil, err
}
cfg = &Configuration{
ServiceURL: response.ServiceURL,
IsSSLEnabled: response.IsSSLEnabled,
Username: response.Username,
Password: response.Password,
}
return cfg, err
}
Expand Down

0 comments on commit d6e7381

Please sign in to comment.