-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Implement deployments without Deployment #584
Implement deployments without Deployment #584
Conversation
@smarterclayton @pmorie Still tracking down some issue in the e2e test preventing the image change trigger from causing a new deployment, but I think the bulk of the work is ready for general review. |
@jwforres Can you evaluate this for UI impact? |
The e2e test failure was fixed by pulling the latest registry image. |
@ironcladlou Does the deployment resource still have any meaning? It seems like part of this refactor should be to introduce the 'virtual resource' that we discussed for deployments. |
@ironcladlou UI can work against this with some minimal changes. All the key bits from deployment are there (what triggered me and what deploymentConfig I came from). I've got it working locally, can tweak as needed based on any updates to this PR. |
The Deployment resource becomes vestigial with this PR. We could potentially adapt ReplicationControllers/Deployments, but that would be more design and work. Is it worth it? |
There's something I forgot to point out which is subtle but probably relevant: Previously, the ReplicationControllers were related to a point in time snapshot of a DeploymentConfig via Deployment. To replace that, I have to serialize the DeploymentConfig on which the RC is based into an annotation ( Now that I've said it, I wonder how exactly you're going to access old versions of DeploymentConfigs and ReplicationControllers to display history... @smarterclayton ? |
@ironcladlou So, does 'list deployments' do anything? |
If we make the name of the rc deterministic (deployment config name + version) we can live with the convention for now |
It will continue to function as usual: The API object still exists and is plumbed throughout the REST API and storage, but no deployment controllers make use of the object. |
That was the convention used for Deployment.Name, and I carried that over to ReplicationControllers. The main concern I have from my previous comment is how the UI is going to present history of any kind without the capability to List or Get old ReplicationControllers or DeploymentConfigs via the REST API pending upstream work for obtaining resources by ResourceVersion. Is there anything we have aside from implementing certain List/Get interfaces with direct etcd access where necessary? |
Why do we need to see old versions of replication controllers? Deployment configs we can just identify as a gap that we want to fill
|
You're right, there's no reason to see the old ReplicationControllers. I just want to confirm that this will be a regression (as we're effectively losing the ability to see old deployments). Having access to the history is also required for rollbacks, so this could introduce speed bumps for that feature. |
Rollbacks are almost always correlated in time with a deployment, so I don't think we'll lose much, except that the client needs to figure out what the proper RC is based on deployment config and name, and as we discussed that's more complex today. ----- Original Message -----
|
22e96cd
to
02123e9
Compare
[test] |
Origin Test Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_openshift3/699/) |
8dab37b
to
02123e9
Compare
Before I go revamp the godocs and such, this is ready for a review. |
[test] again |
@ironcladlou as we discussed earlier I think it would be best to re-implement the read-only operations for the Otherwise, the implementation you have here LGTM. |
To recap offline talks: the Deployment resource will be deprecated, and no attempts will be made with this PR to virtualize access to RCs via Deployment. We'll decide at a later time whether to remove it outright or use it as an API abstraction. |
6bd61c4
to
39efec2
Compare
@jwforres, please review the UI commit. |
ui commit LGTM |
39efec2
to
0eb0234
Compare
@smarterclayton I now use the |
0eb0234
to
2dc416b
Compare
@smarterclayton Improved the annotation docs, and added a |
@pmorie @smarterclayton AFAIK all feedback is addressed, please give it another look. |
Also: I'm revamping the documentation for a separate PR, since it's a lot of work and will require its own discussion. |
Hope to finish review by tonight. It's in pretty good shape - what's your confidence on tests and e2e and general use? |
Pizazz levels are way up. e2e is fine, and I did manual testing with the console including builds and deployments. I can give it one last round of manual testing in the console tomorrow morning. |
General use is fine except for the lack of documentation, which I'm trying to address. We also have followup cards coming up immediately for nicer CLI and console stuff around deployments and rollbacks. There will be a period of discomfort dealing with RC's from the CLI, as annotations aren't rendered which are what you need to correlate stuff, but I consider that minor at the moment. |
@ironcladlou @smarterclayton pizzazz levels check out on this PR. going to use the PKE meter next 👻 |
Follow-on for updated documentation: #631 |
@@ -100,9 +104,9 @@ func TestHandleNewDeploymentCreatePodFail(t *testing.T) { | |||
return nil, fmt.Errorf("Failed to create pod %s", pod.Name) | |||
}, | |||
}, | |||
NextDeployment: func() *deployapi.Deployment { | |||
NextDeployment: func() *kapi.ReplicationController { | |||
deployment := basicDeployment() |
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.
Can you not use the OkDeployment
method here?
2dc416b
to
1964dfe
Compare
Deprecate the Deployment resource and remplement deployment mechanics using ReplicationControllers instead of Deployment. The result is a deployment subsystem which adds fewer new concepts to Kubernetes while providing the same functionality as the former subsystem.
LGTM [merge] |
What's the worst that can happen? |
@pmorie didn't finish his PKE readings... the PR could be haunted |
LGTM |
Origin Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/583/) (Image: devenv-fedora_524) |
Evaluated for origin up to 1964dfe |
Dan, he's been dead the whole movie.
|
What?
This PR implements deployments without using the Deployment API object. ReplicationControllers are used as a replacement for Deployment.
Why?
Since the metadata represented by Deployment can also be represented by ReplicationController annotations, the Deployment resource is a potentially unnecessary and complicating layer of indirection. Removing the resource would reduce the API surface area and bring tighter upstream integration. The original design discussion took place in #507.
Note that this PR does not actually remove Deployment from the public or internal API- that structure can be deprecated and removed separately.
TODO