Description
The way you can specify Deployments to start from an ImageStream instead of an image is to specify image: " " and trigger from ImageChange.
"kind": "DeploymentConfig"
...
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"jenkins"
],
"from": {
"kind": "ImageStreamTag",
"name": "jenkins:latest",
"namespace": "openshift"
}
},
...
"template": {
...
"spec": {
"containers": [
{
"name": "jenkins",
"image": " ",
},
...
This will fail at deployment #1 letting you wait about a minute (because of inability to pull image " ") and then re-deploy as #2 from the ImageStream. @smarterclayton said that someone is working on that [1].
The bigger issue comes if you decide to use
"imageChangeParams": { "automatic": false
which is a valid choice if you do not want to re-deploy your Jenkins
master while doing some important tasks.
This way you will end up with failed deployment #1 and you have to
manually deploy #2 but since you are triggering the build manually it
starts from image " " and fails again. You will be stuck in this loop
and never get it deployed this way!
The previous discussion on mailing list is in [1].
Version
$ oc version
oc v1.3.0-alpha.0-588-g665eb4b
kubernetes v1.3.0-alpha.1-331-g0522e63
Steps To Reproduce
- Import template
curl -G https://raw.githubusercontent.com/tnozicka/origin/fix-jenkins-persistent-template/examples/jenkins/jenkins-persistent-template.json | sed 's/"automatic": true/"automatic": false/' | oc create -n openshift -f -- Use that template to run Jenkins
- Push Deploy in web console to re-deploy Jenkins after deployment
#1fails on inability to pull image " "
Current Result
Always deploys from image " "
Expected Result
- Deploys from ImageStream and not from image " "
- Does not fail first time (deployment
#1)
Additional Information
Using ADB 2.0 with latest origin containers
Activity
[-]Deployments from ImageStream does not work for manual deploy[/-][+]Deployments from ImageStream do not work for manual deploy[/+]pweil- commentedon May 19, 2016
cc @Kargakis
0xmichalis commentedon May 19, 2016
Should be fixed by #8937
smarterclayton commentedon May 19, 2016
You mean #8746?
0xmichalis commentedon May 19, 2016
Right.