Skip to content

Commit

Permalink
Merge pull request #29262 from vespa-engine/jonmv/vespa-cli-does-not-…
Browse files Browse the repository at this point in the history
…support-tokens

Filter out token endpoints in Vespa CLI MERGEOK
  • Loading branch information
jonmv committed Nov 7, 2023
2 parents 2fc631a + 270a494 commit 8e983a1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions client/go/internal/vespa/target_cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ type cloudTarget struct {
}

type deploymentEndpoint struct {
Cluster string `json:"cluster"`
URL string `json:"url"`
Scope string `json:"scope"`
Cluster string `json:"cluster"`
URL string `json:"url"`
Scope string `json:"scope"`
AuthMethod string `json:"authMethod"`
}

type deploymentResponse struct {
Expand Down Expand Up @@ -370,6 +371,9 @@ func (t *cloudTarget) discoverEndpoints(timeout time.Duration) (map[string]strin
if endpoint.Scope != "zone" {
continue
}
if endpoint.AuthMethod == "token" {
continue
}
urlsByCluster[endpoint.Cluster] = endpoint.URL
}
return true, nil
Expand Down

0 comments on commit 8e983a1

Please sign in to comment.