waiverdb: trigger import-image instead of start-build
Nowadays we have an imagestream, which pulls pre-built waiverdb images from quay.io, and a buildconfig, which then layers some Fedora-infra-specific stuff on top. When we have a new version to deploy, the imagestream should pick up the new image from quay.io, which triggers a build of the buildconfig, which triggers a deploy of the deploymentconfig. So we shouldn't need to explicitly fire off start-build anymore. We *shouldn't* need to explicitly fire off import-image either, because it is set to "scheduled" pull policy. But I am not sure what the schedule is. Right now it says it last polled 5 days ago... that may itself be a bug. Regardless, this gives us a nice way to make it pull the latest image. This patch adds a new, very simple role "import-image" to fire off the oc import-image command, following the precedent of the existing "start-build" role.
This commit is contained in:
parent
95ed4f0420
commit
436ed9eabf
2 changed files with 5 additions and 4 deletions
|
@ -56,14 +56,13 @@
|
|||
app: waiverdb
|
||||
template: imagestream.yml
|
||||
objectname: imagestream.yml
|
||||
- role: openshift/import-image
|
||||
app: waiverdb
|
||||
imagestreamname: waiverdb-upstream
|
||||
- role: openshift/object
|
||||
app: waiverdb
|
||||
template: buildconfig.yml
|
||||
objectname: buildconfig.yml
|
||||
- role: openshift/start-build
|
||||
app: waiverdb
|
||||
buildname: waiverdb-docker-build
|
||||
objectname: waiverdb-docker-build
|
||||
- role: openshift/object
|
||||
app: waiverdb
|
||||
template: configmap.yml
|
||||
|
|
2
roles/openshift/import-image/tasks/main.yml
Normal file
2
roles/openshift/import-image/tasks/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
- name: Run `oc import-image`
|
||||
shell: oc -n {{app}} import-image {{imagestreamname}}
|
Loading…
Add table
Add a link
Reference in a new issue