Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Implement externalK8sProxyUrl field in Metadata API #2062

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ type Metadata struct {
Version string `json:"version"`
Revision string `json:"revision"`
KAS struct {
Enabled bool `json:"enabled"`
ExternalURL string `json:"externalUrl"`
Version string `json:"version"`
Enabled bool `json:"enabled"`
ExternalURL string `json:"externalUrl"`
ExternalK8SProxyURL string `json:"externalK8sProxyUrl"`
Version string `json:"version"`
} `json:"kas"`
Enterprise bool `json:"enterprise"`
}
Expand Down
17 changes: 10 additions & 7 deletions metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ func TestGetMetadata(t *testing.T) {
"enterprise": true,
"kas": {
"enabled": true,
"externalUrl": "wss://kas.gitlab.com",
"externalUrl": "wss://kas.gitlab.example.com",
"externalK8sProxyUrl": "https://kas.gitlab.example.com/k8s-proxy",
"version": "15.6.0-rc2"
}
}`)
Expand All @@ -48,13 +49,15 @@ func TestGetMetadata(t *testing.T) {

want := &Metadata{
Version: "15.6.0-pre", Revision: "016e8d8bdc3", KAS: struct {
Enabled bool `json:"enabled"`
ExternalURL string `json:"externalUrl"`
Version string `json:"version"`
Enabled bool `json:"enabled"`
ExternalURL string `json:"externalUrl"`
ExternalK8SProxyURL string `json:"externalK8sProxyUrl"`
Version string `json:"version"`
}{
Enabled: true,
ExternalURL: "wss://kas.gitlab.com",
Version: "15.6.0-rc2",
Enabled: true,
ExternalURL: "wss://kas.gitlab.example.com",
ExternalK8SProxyURL: "https://kas.gitlab.example.com/k8s-proxy",
Version: "15.6.0-rc2",
},
Enterprise: true,
}
Expand Down