Skip to content

Conversation

@ncdc
Copy link

@ncdc ncdc commented May 28, 2015

Andy Goldstein added 2 commits May 28, 2015 16:34
The build image change controller was performing the following logic
once it determined a build was needed:

1. Bump the BuildConfig so the ResourceVersion would be updated, in
theory to prevent other image change controllers from being able to
trigger a build for the same BuildConfig revision.
2. Make an API call to instantiate a build (BuildGenerator)
3. The BuildGenerator would try to modify the BuildConfig's LastVersion
4. The BuildGenerator would try to create a Build
5. The image change controller would try to update the BuildConfig to
set the new LastTriggeredImageID value.

If another instance of an image change controller bumped the
BuildConfig's ResourceVersion before 3 above, you could get into an
infinite race loop where 1 controller would keep bumping the
ResourceVersion just before the BuildGenerator tried to update the
config's LastVersion.

This change makes it so the BuildGenerator is the only thing responsible
for both creating a Build and updating the BuildConfig. The Build is
created prior to updating the BuildConfig. If the Build creation fails,
it won't try to update the BuildConfig.

BuildRequest gains a new required field (Image) that the image change
controller sets to tell the BuildGenerator what value to set for
LastTriggeredImageID.
@ncdc
Copy link
Author

ncdc commented May 28, 2015

@liggitt PTAL

Choose a reason for hiding this comment

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

Add JSON descriptions.

mfojtik pushed a commit that referenced this pull request May 28, 2015
Fix build image change controller race
@mfojtik mfojtik merged commit 5a44f6c into mfojtik:service-account-push-secrets May 28, 2015

Choose a reason for hiding this comment

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

These returns mean you'll only process one config.

mfojtik pushed a commit that referenced this pull request Apr 4, 2016
Instantiate the Jenkins template when JenkinsPipelineStrategy is created
mfojtik pushed a commit that referenced this pull request Jul 18, 2016
Sync mode for running independently of PaaS to register nodes
mfojtik pushed a commit that referenced this pull request Jul 12, 2017
mfojtik pushed a commit that referenced this pull request Sep 17, 2017
Building images from RPM takes quite a bit of time, so add service catalog to
the local image build list. A prerequisite for this task is to have the service
catalog binaries compiled, which is done with #1:

1) cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog/hack/build-go.sh
2) hack/build-local-images service-catalog

The first script uses the origin tooling to build in the same way as the RPMs
are built. Note that a new "enable_default" key has been added to the
image_config and set to False for service catalog so that it is not built unless
directly specified (as indicated in #2).
mfojtik pushed a commit that referenced this pull request Feb 8, 2018
Automatic merge from submit-queue.

CLI: add support for deployments in oc status

@smarterclayton this is a long overdue...

current state:
```
$ oc status
In project My Project (myproject) on server https://127.0.0.1:8443

svc/ruby-deploy - 172.30.174.234:8080
  deployment/ruby-deploy deploys istag/ruby-deploy:latest <-
    bc/ruby-deploy source builds https://github.com/openshift/ruby-ex.git on istag/ruby-22-centos7:latest
      build #1 failed 5 hours ago - bbb6701: Merge pull request #18 from durandom/master (Ben Parees <[email protected]>)
    deployment #2 running for 4 hours - 0/1 pods (warning: 53 restarts)
    deployment #1 deployed 5 hours ago
```

TODO:

- [x] Add rollouts similar to deployment configs
- [x] Fix unit tests / Add unit tests
- [x] Deal with HPA
mfojtik pushed a commit that referenced this pull request Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants