Skip to content

Commit

Permalink
various fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Jasmin Gacic <jasmin.gacic@gmail.com>
  • Loading branch information
jasmingacic committed Apr 4, 2022
1 parent d77d3e3 commit 216664d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions kgw-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
ports:
- port: 8080
targetPort: 8080
type: LoadBalancer
selector:
app: kgwtest
# ---
Expand Down
3 changes: 2 additions & 1 deletion server/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
go/api_fleets_service.go
main.go
go/go.mod
go/Dockerfile
go/Dockerfile
Dockerfile
10 changes: 9 additions & 1 deletion server/go/api_fleets_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ func (s *FleetsApiService) GetEnvoyFleet(ctx context.Context, namespace string,
}

func (s *FleetsApiService) GetEnvoyFleetCRD(ctx context.Context, namespace string, name string) (ImplResponse, error) {
return Response(http.StatusOK, nil), nil
fleet, err := s.kuskClient.GetEnvoyFleet(namespace, name)

if err != nil {
if strings.Contains(err.Error(), fmt.Sprintf(`envoyfleet.gateway.kusk.io "%s" not found`, name)) {
return Response(http.StatusNotFound, err), err
}
return Response(http.StatusInternalServerError, err), err
}
return Response(http.StatusOK, fleet), nil
}

// GetEnvoyFleets - Get a list of envoy fleets
Expand Down

0 comments on commit 216664d

Please sign in to comment.