Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Make Installation Target objects auto-contained #5

Closed
isutton opened this issue Sep 11, 2018 · 0 comments · Fixed by #114
Closed

Make Installation Target objects auto-contained #5

isutton opened this issue Sep 11, 2018 · 0 comments · Fixed by #114
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@isutton
Copy link

isutton commented Sep 11, 2018

Objectives

The main object is to make the Installation Controller able to converge to an
installation target desired state independent of the role its Release object has
according to the current Application description (past releases, latest
incumbent, contender or currently active).

Another objective is to make the installation target object richer than it
currently is by including all information required to render and install the
Application's associated chart; this would enable a Shipper user to create
standalone installation target objects and Shipper would still try to converge
to its desired state.

Proposed Changes

shipperv1.InstallationTarget Changes

To achieve the objectives stated earlier in this document,
InstallationTargetSpec.Clusters should be changed from []string to a richer
type ClusterInstallationSpec representing each cluster installation target
specification, like the following type specification:

package v1

type ClusterInstallationSpec struct{
   CanOverride bool           `json:"canOverride,omitempty"`
   Chart       v1.Chart       `json:"chart"`
   Values      v1.ChartValues `json:"values,omitempty"`
}
  • canOverride bool: Informs the Installation Controller it should override
    existing Kubernetes objects that were previously created by another installation
    target object. The default value is false.

  • values shipperv1.ChartValues: The values that should be informed when
    rendering the chart. This field should be informed by Shipper at the time the
    installation target object is created.

  • chart shipperv1.Chart: Required chart information that will be used to
    render the objects that will be installed on the application cluster. This field
    should be informed by Shipper at the time the installation object is created.

Installation Controller Changes

When rendering the Kubernetes objects contained in the specified chart, the
Installation Controller should include the shipper-owned-by label with its
value being the identity of the installation target object that resulted on
the installation.

When proceeding to install the rendered Kubernetes objects on a specific
application cluster, the Installation Controller should check a) the identity
of the installation target object that lastly modified the object and b)
whether canOverride is enabled. With this two pieces of information, the
controller can properly decide whether it is allowed to override existing
objects that were lastly modified by another installation target object. In the
case where an installation target object overrides an existing Kubernetes
object in the application cluster that wasn't lastly modified by itself, the
installation controller will replace the shipper-owned-by label's value with
its own identity.

After those changes are implemented, the Installation Controller should not
use any heuristics based on the current installation target object's related
Release role (past releases, incumbent, contender or currently active).

The installation target object Ready condition should be updated accordingly:
in case of partial installation (canOverride is set to false, and
shipper-owned-by label specifies a different installation target object)
the condition's status should be set to False, with OverrideNotAllowed
as reason. This should be used to block any further actions using the
installation target as input (for example, proceeding to the next slice on the
current Release strategy's step).

Strategy Controller Changes

The Strategy Controller should orchestrate transitions by updating the related
installation target's ClusterInstallationSpec.canOverride to the appropriate
values (those operations should be performed per cluster):

  • Initial Release: canOverride is set to true.
  • Before transition: incumbent's canOverride is true, contender's is false.
  • After contender's installation is finished: incumbent's canOverride is
    false, contender's is true. This transfers the control over to the
    contender Release's installation target object, allowing the Installation
    Controller to override any offending objects.

The Strategy Controller's "installation, capacity and traffic" loop should now
respect the "installation" aspect of it; this means that a strategy step can
potentially be stuck until the Ready condition is set to True.

@isutton isutton added the enhancement New feature or request label Sep 11, 2018
@juliogreff juliogreff added this to the release-0.5 milestone May 13, 2019
@juliogreff juliogreff self-assigned this Jun 14, 2019
juliogreff added a commit that referenced this issue Jul 9, 2019
Closes #5. You can read all of the context there too.

We want InstallationTarget objects to be self-contained, independent
from releases and applications. We're making them so by applying a few
changes:

1. The installation controller loses its smarts in regards to finding
out if the InstallationTarget is part of an incumbent or contender
release. This logic now belongs entiretly to the release controller.

2. The InstallationTarget becomes a richer object, by containing the
chart and values specified by the Application object at the time of the
creation of the release.

This commit takes a slightly different approach than the one described
in #5, though. Since we currently don't support installing different
things (either different charts or different values) per cluster with
the same InstallationTarget, we chose not to implement it here. That's
mostly in case YAGNI, and the cost of doing so in the future is roughly
the same as doing it now, so we took the call to punt it to future us.

We also decided to continue completely skipping InstallationTargets that
do not belong to a contender release (or that have CanOverride = false,
now), because that would slow down the installation controller too much
before #77 is closed. We captured that requirement in #110 though.
juliogreff added a commit that referenced this issue Jul 10, 2019
Closes #5. You can read all of the context there too.

We want InstallationTarget objects to be self-contained, independent
from releases and applications. We're making them so by applying a few
changes:

1. The installation controller loses its smarts in regards to finding
out if the InstallationTarget is part of an incumbent or contender
release. This logic now belongs entiretly to the release controller.

2. The InstallationTarget becomes a richer object, by containing the
chart and values specified by the Application object at the time of the
creation of the release.

This commit takes a slightly different approach than the one described
in #5, though. Since we currently don't support installing different
things (either different charts or different values) per cluster with
the same InstallationTarget, we chose not to implement it here. That's
mostly in case YAGNI, and the cost of doing so in the future is roughly
the same as doing it now, so we took the call to punt it to future us.

We also decided to continue completely skipping InstallationTargets that
do not belong to a contender release (or that have CanOverride = false,
now), because that would slow down the installation controller too much
before #77 is closed. We captured that requirement in #110 though.
juliogreff added a commit that referenced this issue Jul 11, 2019
Closes #5. You can read all of the context there too.

We want InstallationTarget objects to be self-contained, independent
from releases and applications. We're making them so by applying a few
changes:

1. The installation controller loses its smarts in regards to finding
out if the InstallationTarget is part of an incumbent or contender
release. This logic now belongs entiretly to the release controller.

2. The InstallationTarget becomes a richer object, by containing the
chart and values specified by the Application object at the time of the
creation of the release.

This commit takes a slightly different approach than the one described
in #5, though. Since we currently don't support installing different
things (either different charts or different values) per cluster with
the same InstallationTarget, we chose not to implement it here. That's
mostly in case YAGNI, and the cost of doing so in the future is roughly
the same as doing it now, so we took the call to punt it to future us.

We also decided to continue completely skipping InstallationTargets that
do not belong to a contender release (or that have CanOverride = false,
now), because that would slow down the installation controller too much
before #77 is closed. We captured that requirement in #110 though.
juliogreff added a commit that referenced this issue Jul 23, 2019
Closes #5. You can read all of the context there too.

We want InstallationTarget objects to be self-contained, independent
from releases and applications. We're making them so by applying a few
changes:

1. The installation controller loses its smarts in regards to finding
out if the InstallationTarget is part of an incumbent or contender
release. This logic now belongs entiretly to the release controller.

2. The InstallationTarget becomes a richer object, by containing the
chart and values specified by the Application object at the time of the
creation of the release.

This commit takes a slightly different approach than the one described
in #5, though. Since we currently don't support installing different
things (either different charts or different values) per cluster with
the same InstallationTarget, we chose not to implement it here. That's
mostly in case YAGNI, and the cost of doing so in the future is roughly
the same as doing it now, so we took the call to punt it to future us.

We also decided to continue completely skipping InstallationTargets that
do not belong to a contender release (or that have CanOverride = false,
now), because that would slow down the installation controller too much
before #77 is closed. We captured that requirement in #110 though.
@juliogreff juliogreff modified the milestones: release-0.5, release-0.6 Jul 23, 2019
parhamdoustdar pushed a commit that referenced this issue Aug 28, 2019
Closes #5. You can read all of the context there too.

We want InstallationTarget objects to be self-contained, independent
from releases and applications. We're making them so by applying a few
changes:

1. The installation controller loses its smarts in regards to finding
out if the InstallationTarget is part of an incumbent or contender
release. This logic now belongs entiretly to the release controller.

2. The InstallationTarget becomes a richer object, by containing the
chart and values specified by the Application object at the time of the
creation of the release.

This commit takes a slightly different approach than the one described
in #5, though. Since we currently don't support installing different
things (either different charts or different values) per cluster with
the same InstallationTarget, we chose not to implement it here. That's
mostly in case YAGNI, and the cost of doing so in the future is roughly
the same as doing it now, so we took the call to punt it to future us.

We also decided to continue completely skipping InstallationTargets that
do not belong to a contender release (or that have CanOverride = false,
now), because that would slow down the installation controller too much
before #77 is closed. We captured that requirement in #110 though.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants