Skip to content

Commit

Permalink
Merge pull request #115 from zheng1/master
Browse files Browse the repository at this point in the history
Bugfix: when use admin account, the SG of other user is queried
  • Loading branch information
zheng1 authored May 31, 2021
2 parents 34f6c3e + 466c5d1 commit 008ce2c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/default/manager_image_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ spec:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: kubesphere/cloud-controller-manager:v1.4.6
- image: kubesphere/cloud-controller-manager:v1.4.7
name: qingcloud-cloud-controller-manager
imagePullPolicy: IfNotPresent
12 changes: 12 additions & 0 deletions config/default/manager_image_patch.yaml-e
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: cloud-controller-manager
spec:
template:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: kubesphere/cloud-controller-manager:v1.4.6
name: qingcloud-cloud-controller-manager
imagePullPolicy: IfNotPresent
2 changes: 1 addition & 1 deletion deploy/kube-cloud-controller-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ spec:
- -v=3
- --cloud-provider=qingcloud
- --cloud-config=/etc/kubernetes/qingcloud.yaml
image: kubesphere/cloud-controller-manager:v1.4.6
image: kubesphere/cloud-controller-manager:v1.4.7
imagePullPolicy: IfNotPresent
name: qingcloud-cloud-controller-manager
resources:
Expand Down
2 changes: 2 additions & 0 deletions pkg/executor/sg.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package executor

import (
"fmt"

"github.com/davecgh/go-spew/spew"
"github.com/yunify/qingcloud-cloud-controller-manager/pkg/apis"
"github.com/yunify/qingcloud-cloud-controller-manager/pkg/errors"
Expand Down Expand Up @@ -143,6 +144,7 @@ func (q *QingCloudClient) ensureSecurityGroupByName(name string) (*apis.Security
func (q *QingCloudClient) GetSecurityGroupByName(name string) (*apis.SecurityGroup, error) {
input := &qcservice.DescribeSecurityGroupsInput{
SearchWord: &name,
Owner: &q.Config.UserID,
}
output, err := q.securityGroupService.DescribeSecurityGroups(input)
if err != nil || *output.RetCode != 0 {
Expand Down

0 comments on commit 008ce2c

Please sign in to comment.