-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Hi,
the defer common.CloseBodyIfValid(httpResponse) call in the containerengine.createKubeconfig function closes the http body which makes impossible to get the content of it.
// createKubeconfig implements the OCIOperation interface (enables retrying operations)
func (client ContainerEngineClient) createKubeconfig(ctx context.Context, request common.OCIRequest) (common.OCIResponse, error) {
httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/kubeconfig/content")
if err != nil {
return nil, err
}var response CreateKubeconfigResponse
var httpResponse *http.Response
httpResponse, err = client.Call(ctx, &httpRequest)
defer common.CloseBodyIfValid(httpResponse)
response.RawResponse = httpResponse
if err != nil {
return response, err
}err = common.UnmarshalResponse(httpResponse, &response)
return response, err
}
Thanks!