Skip to content

Commit

Permalink
fix: client crd update err, issue TencentBlueKing#269
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperJim committed Dec 2, 2019
1 parent aa18ec3 commit 464db63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bcs-services/bcs-client/cmd/update/cutomresourcedefinition.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ func updateCustomResource(c *utils.ClientContext) error {
}
err = scheduler.UpdateCustomResource(c.ClusterID(), version, plural, namespace, name, data)
if err != nil {
return fmt.Errorf("failed to create %s: %v", plural, err)
return fmt.Errorf("failed to update %s: %v", plural, err)
}

fmt.Printf("success to update %s: %s.\n", plural, name)
fmt.Printf("success to update %s: %s\n", plural, name)
return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (bs *bcsScheduler) UpdateCustomResource(clusterID, apiVersion, plural, name
baseURL := fmt.Sprintf(bcsSchedulerCustomResourceURL, bs.bcsAPIAddress)
resp, err := bs.requester.DoForResponse(
fmt.Sprintf("%s/%s/namespaces/%s/%s/%s", baseURL, apiVersion, namespace, plural, name),
http.MethodPost,
http.MethodPut,
data,
getClusterIDHeader(clusterID),
)
Expand Down

0 comments on commit 464db63

Please sign in to comment.