-
Notifications
You must be signed in to change notification settings - Fork 897
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
Beta support for Package Runtime Config #4744
Conversation
7c6a38c
to
6df0f0b
Compare
bf99872
to
5d6b980
Compare
5d6b980
to
b764108
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @turkenh!
WRT the design changes, I personally would still vote for what I wrote in #4699 (comment). I prefer moving the default values out of code and into a configuration file. I think this makes it more explicit and predictable, and I think that's worth folks potentially having to copy ~30 lines of YAML to make a new config.
That said, I can accept this as a compromise. It satisfies the primary goal of the design, which was to offer a full template for a Deployment (and potentially in future a Service, ServiceAccount, etc) and I think its cleaner than the other alternatives we discussed.
test/e2e/manifests/pkg/deployment-runtime-config/setup/deployment-runtime-config.yaml
Outdated
Show resolved
Hide resolved
ecd2b0b
to
85e3aff
Compare
85e3aff
to
a85fd86
Compare
0a8c6ea
to
e71bd9e
Compare
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Also no RuntimeConfig (yet) Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
e71bd9e
to
ea9694d
Compare
Description of your changes
This PR implements Package Runtime Config (Fixes #4699) as proposed in the design doc with the following exception:
Instead of initializing and maintaining our defaults like
replicas: 1
or pod and runtime containersecurityContext
in theDeploymentRuntimeConfig
nameddefault
, it only initializes an emptyDeploymentRuntimeConfig
named asdefault
only if it does not exist. It was discussed in the issue in details but this is primarily to avoid the following:DeploymentRuntimeConfig
would require duplicating the values from thedefault
one, assuming the user won't want to lose them. If you only intend to include additional labels, you would need to duplicate the entire default configuration and append labels to the newly created one.default
config in time, in the new releases, Crossplane would either overwrite thedefault
DeploymentRuntimeConfig
to reflect changes in defaulting or leave thedefault
as is, which would mean Crossplane losing control over defaults.Considering the above 3 being a degradation over User Experience and Crossplane controlling the defaulting behavior with new releases, I ended up changing it as follows:
default
DeploymentRuntimeConfig
if it does not exist.DeploymentRuntimeConfig
hasn't set them (i.e. unopinionated). For example, if the deploymentreplicas
is not provided in the config, Crossplane will set the value as1
.This way, the
default
DeploymentRuntimeConfig
could also be owned by the user without any maintenance burden.This PR also:
PackageWithRuntime
andPackageRevisionWithRuntime
interfaces.controllerRef
from PackageRevisionStatus.See the manifest in the e2e test to get a sense on how
DeploymentRuntimeConfig
could be customized but still operate properly.I have:
make reviewable
to ensure this PR is ready for review.Addedbackport release-x.y
labels to auto-backport this PR, if necessary.