Skip to content

RBAC Migration Followup #17: Discovery based gating #15831

Closed

Description

@enj

Use discovery API based gating instead of hard coding version numbers.

Activity

  1. modified the milestone: on Aug 17, 2017
  2. added
    help wanted
    on Aug 22, 2017
  3. enj commented on Aug 25, 2017

    @enj
    ContributorAuthor

    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.

    @openshift/cli-review any thoughts on this?

  4. enj commented on Aug 29, 2017

    @enj
    ContributorAuthor

    @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.

  5. self-assigned this
    on Sep 7, 2017
  6. removed
    help wanted
    on Sep 8, 2017
  7. removed their assignment
    on Sep 8, 2017
  8. added a commit that references this issue on Sep 16, 2017
    fd8b731
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions