This repository has been archived by the owner on May 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Make Installation Target objects auto-contained #5
Comments
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.
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.
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
ChangesTo achieve the objectives stated earlier in this document,
InstallationTargetSpec.Clusters
should be changed from[]string
to a richertype
ClusterInstallationSpec
representing each cluster installation targetspecification, like the following type specification:
canOverride bool
: Informs the Installation Controller it should overrideexisting 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 whenrendering 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 torender 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 itsvalue 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, thecontroller 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 withits 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 tofalse
, andshipper-owned-by
label specifies a different installation target object)the condition's status should be set to
False
, withOverrideNotAllowed
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 appropriatevalues (those operations should be performed per cluster):
canOverride
is set totrue
.canOverride
istrue
, contender's isfalse
.canOverride
isfalse
, contender's istrue
. This transfers the control over to thecontender 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 toTrue
.The text was updated successfully, but these errors were encountered: