Skip to content
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

Rework reconcile loop for workspace controller #36

Merged
merged 12 commits into from
Apr 7, 2020

Commits on Apr 7, 2020

  1. Rework reconcile loop for workspace controller

    This commit represents an almost-complete overhaul of the main
    reconcile loop in the workspace controller.
    
    A high level overview of changes:
    
    - All controllers do full reconciling of all objects they are
      responsible for; this means deleting a route or the workspace
      deployment means it will be recreated
      - The main workspace controller now watches all resources it creates
        to trigger reconciles
    - The main reconcile loop is split into phases with subcontrollers; it
      only progresses based on status of earlier steps (i.e. if components
      aren't ready, we don't try to create routing)
    - All service/ingress/route creation is delegated to WorkspaceRouting
    - The openshift-oauth routingClass results in the openshift oauth-proxy
      container running in the main workspace deployment
    - There's a cleaner separation between elements in `pkg/controller` --
      no imports across controllers (i.e. WorkspaceRouting imports nothing
      from Workspace)
      - All shared structs are extracted to `apis` folder
    - One service is created for all workspace endpoints (except
      discoverable endpoints)
    - Add Component subcontroller that converts devfile components into
      k8s objects
    
    A design doc and more detailed history for these changes is found at
    https://github.com/amisevsk/che-workspace-operator-rework
    
    Signed-off-by: Angel Misevski <amisevsk@redhat.com>
    amisevsk committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    6b35225 View commit details
    Browse the repository at this point in the history
  2. Add protocol to status URL

    Signed-off-by: Angel Misevski <amisevsk@redhat.com>
    amisevsk committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    076730d View commit details
    Browse the repository at this point in the history
  3. Disable aliases for plugins and editors

    It's currently difficult to support aliases for chePlugin and cheEditor
    components, since the component name no longer matches the container
    that is created. This means that we cannot match endpoints to plugins
    when they have an alias that is different from container name.
    
    Signed-off-by: Angel Misevski <amisevsk@redhat.com>
    amisevsk committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    677505a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    80b89b4 View commit details
    Browse the repository at this point in the history
  5. Provision USE_BEARER_TOKEN env var

    Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
    sleshchenko authored and amisevsk committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    82baa16 View commit details
    Browse the repository at this point in the history
  6. Propagate token with openshift-oauth proxy

    Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
    sleshchenko authored and amisevsk committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    b7798f1 View commit details
    Browse the repository at this point in the history
  7. Do not link strongly volume to secret

    Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
    sleshchenko authored and amisevsk committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    48f5d55 View commit details
    Browse the repository at this point in the history
  8. fixups: don't reuse proxy-tls, use namespace in SAR

    - Name secret used for oauth proxy with workspaceId to prevent name
    conflicts when running more than one workspace
    - Add workspace namespace to SAR request with oauth proxy
    - Use bearer token if webhooks are enabled
    - Set default webhooks enabled to false
    
    Signed-off-by: Angel Misevski <amisevsk@redhat.com>
    amisevsk committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    93390c3 View commit details
    Browse the repository at this point in the history
  9. Fixup: double protocol; no dockerimage workspaces

    - Avoid errors when workspace doesn't contain any dockerimage (or
    plugin/editor) components
    - Fix double protocol for URLs in runtime annotation
    - Fix import alias naming
    
    Signed-off-by: Angel Misevski <amisevsk@redhat.com>
    amisevsk committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    88c0554 View commit details
    Browse the repository at this point in the history
  10. Fix usage of command in makefile on Ubuntu

    Make will try to avoid launching a shell to execute simple commands
    this breaks for shell builtins, such as 'command'.
    
    Signed-off-by: Angel Misevski <amisevsk@redhat.com>
    amisevsk committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    b27a48d View commit details
    Browse the repository at this point in the history
  11. Include components CRD in makefile uninstall

    Signed-off-by: Angel Misevski <amisevsk@redhat.com>
    amisevsk committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    9e6f26b View commit details
    Browse the repository at this point in the history
  12. Add printing of env vars to makefile commands

    Add dependency to relevant rules in makefile to print current env var
    settings, to avoid accidentally reverting changes in e.g. the configmap
    
    Signed-off-by: Angel Misevski <amisevsk@redhat.com>
    amisevsk committed Apr 7, 2020
    Configuration menu
    Copy the full SHA
    01d1773 View commit details
    Browse the repository at this point in the history