-
Notifications
You must be signed in to change notification settings - Fork 4
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
PB-7332 : API Changes for Sharing / Unsharing Clusters to Users and Groups #247
Conversation
OSS Scan Results:
Total issues: 43 |
License Evaluation Results:
Total License Issues: 0 |
pkg/apis/v1/api.proto
Outdated
@@ -1188,6 +1188,22 @@ service Cluster { | |||
body : "*" | |||
}; | |||
} | |||
|
|||
// share cluster add share access of your cluster to another users |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the first word is the functionName itself like
//ShareClsuter shares access to the cluster to the user(s) or group(s).
pkg/apis/v1/api.proto
Outdated
}; | ||
} | ||
|
||
// Unshare cluster remove sharing access of your cluster from another users |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//unshareClsuter removes shared access for the user(s) or group(s) to the cluster
pkg/apis/v1/api.proto
Outdated
message ShareClusterRequest{ | ||
string org_id = 1; | ||
ObjectRef cluster_ref = 2; | ||
// it will share the cluster to all the user and group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//userid of the user to share the cluster with
pkg/apis/v1/api.proto
Outdated
ObjectRef cluster_ref = 2; | ||
// it will share the cluster to all the user and group | ||
repeated string user = 3; | ||
repeated string group = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//groupIDs to share the cluster with
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
groupName it will be..there's nothing called group id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use groups since its an array?
pkg/apis/v1/api.proto
Outdated
string org_id = 1; | ||
ObjectRef cluster_ref = 2; | ||
// it will unshare the cluster from all the user and group | ||
repeated string user = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is array of userID, we need to mention the same and also change user to users
pkg/apis/v1/api.proto
Outdated
// it will share the cluster to all the user and group | ||
repeated string user = 3; | ||
repeated string group = 4; | ||
// share cluster backup is optional, if set to true, it will share the cluster backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// If set to true will additionally share existing backups
pkg/apis/v1/api.proto
Outdated
// it will unshare the cluster from all the user and group | ||
repeated string user = 3; | ||
repeated string group = 4; | ||
// unshare cluster backup is optional, if set to true, it will unshare the cluster backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// if set will unshare shared backups.
OSS Scan Results:
Total issues: 43 |
License Evaluation Results:
Total License Issues: 0 |
pkg/apis/v1/api.proto
Outdated
@@ -1188,6 +1188,22 @@ service Cluster { | |||
body : "*" | |||
}; | |||
} | |||
|
|||
// ShareClsuter shares access to the cluster to the user(s) or group(s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type: ShareClsuter -> ShareCluster, cannot ignore these comments cos they will show up as help in swagger
OSS Scan Results:
Total issues: 43 |
License Evaluation Results:
Total License Issues: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pkg/apis/v1/api.proto
Outdated
// group to share the cluster with | ||
repeated string group = 4; | ||
// unshare_cluster_backup is optional, if set to true, will unshare shared backups. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Extra lines
@@ -1188,6 +1188,22 @@ service Cluster { | |||
body : "*" | |||
}; | |||
} | |||
|
|||
// ShareCluster shares access to the cluster to the user(s) or group(s) | |||
rpc ShareCluster(ShareClusterRequest) returns (ShareClusterResponse) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For existing RBAC object we have UpdateOwnership
and cluster Share is extension of existing RBAC to clusterObject. Any reason we are introducing two new API?
OSS Scan Results:
Total issues: 43 |
License Evaluation Results:
Total License Issues: 0 |
pkg/apis/v1/api.proto
Outdated
string org_id = 1; | ||
ObjectRef cluster_ref = 2; | ||
// it will unshare the cluster from all the user and group | ||
repeated string user = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is array of userID, we need to mention the same and also change user to users
pkg/apis/v1/api.proto
Outdated
// userid of the user to share the cluster with | ||
repeated string user = 3; | ||
// group to share the cluster with | ||
repeated string group = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
group to groups
pkg/apis/v1/api.proto
Outdated
// unshare_cluster_backup is optional, if set to true, will unshare shared backups. | ||
|
||
|
||
bool unshare_cluster_backup = 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unshare_cluster_backups
pkg/apis/v1/api.proto
Outdated
string org_id = 1; | ||
ObjectRef cluster_ref = 2; | ||
// userid of the user to share the cluster with | ||
repeated string user = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
users since its an array
pkg/apis/v1/api.proto
Outdated
ObjectRef cluster_ref = 2; | ||
// it will share the cluster to all the user and group | ||
repeated string user = 3; | ||
repeated string group = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use groups since its an array?
Share Cluster : Share Cluster to users and groups Unshare Cluster: Revoke Shared Clusters from users and groups Signed-off-by: Pallav <[email protected]>
OSS Scan Results:
Total issues: 43 |
License Evaluation Results:
Total License Issues: 0 |
This reverts commit e2486ca.
Share Cluster : Share Cluster to users and groups Unshare Cluster: Revoke Shared Clusters from users and groups Signed-off-by: Pallav <[email protected]>
Share Cluster : Share Cluster to users and groups
Unshare Cluster: Revoke Shared Clusters from users and groups
What this PR does / why we need it:
Which issue(s) this PR fixes (optional)
Closes #
Special notes for your reviewer: