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

Instantiate endpoint for deploymentconfigs #9349

Merged
merged 8 commits into from
Oct 4, 2016
Merged

Instantiate endpoint for deploymentconfigs #9349

merged 8 commits into from
Oct 4, 2016

Conversation

0xmichalis
Copy link
Contributor

@0xmichalis 0xmichalis commented Jun 15, 2016

Add an instantiate endpoint for processing deployment configs and plug it in the trigger controller. The trigger controller has been reconciling deployment configs on image stream updates since #9485 meaning the image change controller is obsolete now.

Partially fixes #6980.
Fixes #4359

@mfojtik @smarterclayton @ironcladlou

@0xmichalis
Copy link
Contributor Author

@openshift/api-review

@@ -277,7 +277,7 @@ func GetBootstrapClusterRoles() []authorizationapi.ClusterRole {

authorizationapi.NewRule(read...).Groups(buildGroup).Resources("builds", "buildconfigs", "buildconfigs/webhooks").RuleOrDie(),
authorizationapi.NewRule(read...).Groups(buildGroup).Resources("builds/log").RuleOrDie(),

// Why the View role has generatedeploymentconfigs, deploymentconfigrollbacks ?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oversight. If they aren't needed, remove them.

@0xmichalis
Copy link
Contributor Author

0xmichalis commented Jun 16, 2016

@deads2k any idea why I am getting a 405 ("the server does not allow this method on the requested resource") when hitting the new endpoint?

Fixed, I had to switch from POST to PUT...

@0xmichalis
Copy link
Contributor Author

So I've got this working fine but the trigger controller needs image stream caches if it's going to use the endpoint and process the config without the need for the image change controller. I will work on a separate pull that adds those caches.

@0xmichalis 0xmichalis changed the title [WIP] Instantiate endpoint for deploymentconfigs Instantiate endpoint for deploymentconfigs Jun 16, 2016
@0xmichalis 0xmichalis closed this Jun 20, 2016
@0xmichalis 0xmichalis reopened this Jun 20, 2016
@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 23, 2016

// Tag references are already validated
name, tag, _ := imageapi.SplitImageStreamTag(params.From.Name)
istag, err := r.istn.ImageStreamTags(params.From.Namespace).Get(name, tag)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smarterclayton @miminar @soltysh is there any reason not to use the image stream tag client instead of the image stream client?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know of any, unless you already work with image stream client on some other place.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, switched back to an image stream client.

@0xmichalis
Copy link
Contributor Author

[test]

@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 24, 2016
@0xmichalis 0xmichalis added this to the 1.3.0 milestone Jun 25, 2016
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 25, 2016
@0xmichalis
Copy link
Contributor Author

@openshift/api-review I want to move forward with this. Can I get a review for the API?

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 1, 2016
// Manual should always try to force a new deployment to run. This is meant to be used
// by all clients.
Manual bool
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably prefer "ForceDeployment" - "If true, a deployment is always created by incrementing the generation ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What generation has to do with this? We increment generation on any spec change (and on latestVersion changes)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This is forcing a generation / latestVersion change, which is why we want to explicitly state that in the godoc and have the name reflect the change. manual doesn't mean anything and we try not to use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the name, how about Force (that's what I was using before switching to Manual) ? In a similar fashion to not making Name (and any field name for that matter) verbose since they are namescoped by DeploymentRequest.

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 4, 2016
@0xmichalis
Copy link
Contributor Author

@tnozicka this is the pull we talked about. oc rollout latest will be added in a separate as soon as this merges. Ref #9298

@smarterclayton
Copy link
Contributor

API approved.

@0xmichalis
Copy link
Contributor Author

@deads2k ptal in 66fec4c

@mfojtik
Copy link
Contributor

mfojtik commented Sep 27, 2016

@Kargakis

@deads2k ptal in 66fec4c

404 :-(

@deads2k
Copy link
Contributor

deads2k commented Sep 27, 2016

@deads2k ptal in 66fec4c

Yeah, that makes me happier. Thanks.

@0xmichalis
Copy link
Contributor Author

@0xmichalis
Copy link
Contributor Author

Still can't get past protobuf generation - @smarterclayton do I need to use the same protoc version as the one used in Jenkins? Are there any other pitfalls I need to be aware of for generating protobuf (used to work in the past, not sure why this time is a special one) ?

@smarterclayton
Copy link
Contributor

Run:

OS_BUILD_ENV_PRESERVE=. hack/env hack/update-generated-protobuf.sh

On Tue, Sep 27, 2016 at 6:53 PM, Michail Kargakis notifications@github.com
wrote:

Still can't get past protobuf generation - @smarterclayton
https://github.com/smarterclayton do I need to use the same protoc
version as the one used in Jenkins? Are there any other pitfalls I need to
be aware of for generating protobuf (used to work in the past, not sure why
this time is a special one) ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#9349 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_p6Hvut9tncxouLg48yw_ZJ9r9Sawks5quZ6EgaJpZM4I2lSD
.

@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 28, 2016
@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 2f86bfa

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/9498/)

@0xmichalis
Copy link
Contributor Author

@mfojtik @smarterclayton any final comments

@0xmichalis
Copy link
Contributor Author

I will merge this later today if there are no other comments, need to leave room for merging the Conditions PR until Wednesday (devcut)

@mfojtik
Copy link
Contributor

mfojtik commented Oct 4, 2016

LGTM

@mfojtik mfojtik added the lgtm Indicates that a PR is ready to be merged. label Oct 4, 2016
@0xmichalis
Copy link
Contributor Author

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 2f86bfa

@openshift-bot
Copy link
Contributor

openshift-bot commented Oct 4, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/9612/) (Image: devenv-rhel7_5128)

@openshift-bot openshift-bot merged commit 6eafc1d into openshift:master Oct 4, 2016
@0xmichalis 0xmichalis deleted the instantiate-endpoint branch October 4, 2016 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-approved lgtm Indicates that a PR is ready to be merged. priority/P2
Projects
None yet
9 participants