Skip to content

Commit

Permalink
Fix not using skipGettingCredentials argument (#104)
Browse files Browse the repository at this point in the history
* Fix not using skipGettingCredentials argument

* 0.15.1
  • Loading branch information
baksetercx authored Oct 30, 2024
1 parent d85ea6b commit b5345b7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.15.0
0.15.1
26 changes: 14 additions & 12 deletions pkg/deploy/gke.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,20 @@ func setupGKE(
}
}

gcloudGetCredentialsOutput := gcloudGetCredentialsCommand(
environment,
&GcloudGetCredentialsCommandOptions{
ProjectID: options.ProjectID,
ClusterName: options.ClusterName,
ClusterLocation: options.ClusterLocation,
RunOptions: nil,
},
)

if command.IsError(gcloudGetCredentialsOutput) {
return fmt.Errorf("Failed to get GKE credentials: %w", gcloudGetCredentialsOutput.Error)
if !skipGettingCredentials {
gcloudGetCredentialsOutput := gcloudGetCredentialsCommand(
environment,
&GcloudGetCredentialsCommandOptions{
ProjectID: options.ProjectID,
ClusterName: options.ClusterName,
ClusterLocation: options.ClusterLocation,
RunOptions: nil,
},
)

if command.IsError(gcloudGetCredentialsOutput) {
return fmt.Errorf("Failed to get GKE credentials: %w", gcloudGetCredentialsOutput.Error)
}
}

return nil
Expand Down

0 comments on commit b5345b7

Please sign in to comment.