Skip to content

Reconciliation differences between upstream and origin #15412

Closed

Description

@enj

There are questions about how to handle the differences between reconciliation in Kube and Origin.

Some key differences:

Origin:

  1. Is an oc command
  2. Messes with Subjects
  3. Must be run by the user
  4. Honors the annotation openshift.io/reconcile-protect == true to prevent reconciliation
  5. Reconciles controller and discovery roles at start

Kube:

  1. Is a post start hook
  2. Does not mess with subjects
  3. Runs on every server start
  4. Honors the annotation rbac.authorization.kubernetes.io/autoupdate == false to prevent reconciliation

Some questions:

  1. Should we create a new command with the new behavior? Is it even valuable to have such a command since the server auto reconciles?
  2. What do we do with the old command? How should old command react to a new server and how should a new server react to the old command?
  3. Probably other things I am missing...

Blocks #15021

@openshift/cli-review @openshift/security @sdodson

Activity

  1. added this to the milestone on Jul 21, 2017
  2. enj commented on Jul 25, 2017

    @enj
    ContributorAuthor

    Current proposed steps:

    1. Update conversions to persevere appropriate annotations during the round trip
    2. Use post start hook in Origin to bootstrap cluster via RBAC, honor the RBAC annotation to prevent reconciliation
    3. Current origin command continues to work on origin resources without issue
    4. Take @liggitt WIP PR for an upstream reconcile command to completion
  3. added a commit that references this issue on Aug 17, 2017
  4. adelton commented on Sep 8, 2017

    @adelton
    Contributor

    Update conversions to persevere appropriate annotations during the round trip

    Do we want to preserve openshift.io/reconcile-protect or change it to rbac.authorization.kubernetes.io/autoupdate?

    Use post start hook in Origin to bootstrap cluster via RBAC, honor the RBAC annotation to prevent reconciliation

    How is this different from the post start hook use by Kubernetes?

    Current origin command continues to work on origin resources without issue
    Take @liggitt WIP PR for an upstream reconcile command to completion

    Do you have a link?

  5. enj commented on Sep 8, 2017

    @enj
    ContributorAuthor

    Do we want to preserve openshift.io/reconcile-protect or change it to rbac.authorization.kubernetes.io/autoupdate?

    This is already done, see pkg/authorization/apis/authorization/conversion.go's convert_authorization_Annotations_To_rbac_Annotations and convert_rbac_Annotations_To_authorization_Annotations.

    How is this different from the post start hook use by Kubernetes?

    It uses our custom authz policy data, see pkg/cmd/server/origin/master.go:259 which calls aggregatedAPIServer.GenericAPIServer.AddPostStartHookOrDie("authorization.openshift.io-bootstrapclusterroles", bootstrappolicy.Policy().EnsureRBACPolicy()).

    Do you have a link?

    See kubernetes/kubernetes#51636 - I do not know what @deads2k and @fabianofranz want to do in OpenShift (simple pass through I think). The oc adm policy reconcile-cluster-role* commands continue to work as expected.

  6. deads2k commented on Sep 8, 2017

    @deads2k
    Contributor

    See kubernetes/kubernetes#51636 - I do not know what @deads2k and @fabianofranz want to do in OpenShift (simple pass through I think). The oc adm policy reconcile-cluster-role* commands continue to work as expected.

    We picked the command as-is into openshift 3.7

  7. simo5 commented on Oct 10, 2017

    @simo5

    @enj what is left to do in this issue ?

  8. simo5 commented on Oct 16, 2017

    @simo5

    oc auth reconcile documentation is missing

  9. deads2k commented on Oct 18, 2017

    @deads2k
    Contributor

    oc auth reconcile documentation is missing

    I see it as present in master.

  10. enj commented on Oct 18, 2017

    @enj
    ContributorAuthor

    There are docs?

  11. simo5 commented on Oct 18, 2017

    @simo5

    @deads2k can you please point me to any docs we have ?
    In openshift-docs I found no mention of oc auth reconcile

  12. simo5 commented on Oct 18, 2017

    @simo5

    PR for docs I've opened:
    openshift/openshift-docs#5725

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