You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RBAC Migration Followup #17: Discovery based gating #15831
We currently hard code the version number for the gated commands at 3.7.0 (see pkg/cmd/util/clientcmd/gating.go and its callers). A better approach would be to do a discovery call against the API server, and determine if it supports the legacy policy resources. If it does, then we know its safe to run the commands. If it does not, then we know the cluster is too new. This could be useful for other commands in the future.
@simo5 based on a conversation with @jupierce, we actually need to do discovery based gating because we have internal clusters that will be upgraded from 3.7 (pre-RBAC) to 3.7 (post-RBAC). I suppose we could do hacks to make version based gating work, but using discovery seems like the correct approach.
Activity
enj commentedon Aug 25, 2017
We currently hard code the version number for the gated commands at 3.7.0 (see
pkg/cmd/util/clientcmd/gating.goand its callers). A better approach would be to do a discovery call against the API server, and determine if it supports the legacypolicyresources. If it does, then we know its safe to run the commands. If it does not, then we know the cluster is too new. This could be useful for other commands in the future.@openshift/cli-review any thoughts on this?
enj commentedon Aug 29, 2017
@simo5 based on a conversation with @jupierce, we actually need to do discovery based gating because we have internal clusters that will be upgraded from 3.7 (pre-RBAC) to 3.7 (post-RBAC). I suppose we could do hacks to make version based gating work, but using discovery seems like the correct approach.
Merge pull request #16219 from mrogers950/discovery_gating