Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adds endpoint to support get-binding response for OSB v2.16 #321

Merged
merged 6 commits into from
Jul 11, 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
1 change: 1 addition & 0 deletions domain/apiresponses/responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ type BindingResponse struct {
RouteServiceURL string `json:"route_service_url,omitempty"`
VolumeMounts []domain.VolumeMount `json:"volume_mounts,omitempty"`
BackupAgentURL string `json:"backup_agent_url,omitempty"`
Endpoints []domain.Endpoint `json:"endpoints,omitempty"`
}

type GetBindingResponse struct {
Expand Down
8 changes: 8 additions & 0 deletions domain/service_broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ type Binding struct {
RouteServiceURL string `json:"route_service_url"`
BackupAgentURL string `json:"backup_agent_url,omitempty"`
VolumeMounts []VolumeMount `json:"volume_mounts"`
Endpoints []Endpoint `json:"endpoints,omitempty"`
}

type GetBindingSpec struct {
Expand All @@ -206,6 +207,13 @@ type GetBindingSpec struct {
RouteServiceURL string
VolumeMounts []VolumeMount
Parameters any
Endpoints []Endpoint
}

type Endpoint struct {
Host string `json:"host"`
Ports []string `json:"ports"`
Protocol string `json:"protocol,omitempty"`
}

func (d ProvisionDetails) GetRawContext() json.RawMessage {
Expand Down
2 changes: 2 additions & 0 deletions handlers/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ func (h APIHandler) Bind(w http.ResponseWriter, req *http.Request) {
RouteServiceURL: binding.RouteServiceURL,
VolumeMounts: binding.VolumeMounts,
BackupAgentURL: binding.BackupAgentURL,
Endpoints: binding.Endpoints,
})
return
}
Expand Down Expand Up @@ -138,5 +139,6 @@ func (h APIHandler) Bind(w http.ResponseWriter, req *http.Request) {
RouteServiceURL: binding.RouteServiceURL,
VolumeMounts: binding.VolumeMounts,
BackupAgentURL: binding.BackupAgentURL,
Endpoints: binding.Endpoints,
})
}
1 change: 1 addition & 0 deletions handlers/get_binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func (h APIHandler) GetBinding(w http.ResponseWriter, req *http.Request) {
SyslogDrainURL: binding.SyslogDrainURL,
RouteServiceURL: binding.RouteServiceURL,
VolumeMounts: binding.VolumeMounts,
Endpoints: binding.Endpoints,
},
Parameters: binding.Parameters,
})
Expand Down
Loading