I am importing the following template in the OpenShift web client to create ImageStream, DeploymentConfig & Service.
ImageStream is created from a Docker Image available on an External Docker Registry.
Everything seems to be working fine apart from the fact that whenever the Docker Image changes in the external registry redeployment doesn't take place.
Is it possible with Openshift & External Registry to trigger auto deployments when Docker Image is changed in the external registry.
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "test-100"
},
"objects": [
{
"kind": "ImageStream",
"apiVersion": "image.openshift.io/v1",
"metadata": {
"name": "test-100",
"creationTimestamp": null,
"labels": {
"app": "test-100"
},
"annotations": {
"openshift.io/generated-by": "OpenShiftNewApp"
}
},
"spec": {
"lookupPolicy": {
"local": false
},
"tags": [
{
"name": "latest",
"annotations": {
"openshift.io/imported-from": "artifactory.company.com/docker-dev-local/test/dev/test:latest"
},
"from": {
"kind": "DockerImage",
"name": "artifactory.company.com/docker-dev-local/test/dev/test:latest"
},
"generation": null,
"importPolicy": {},
"referencePolicy": {
"type": ""
}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "apps.openshift.io/v1",
"metadata": {
"name": "test-100",
"creationTimestamp": null,
"labels": {
"app": "test-100"
},
"annotations": {
"openshift.io/generated-by": "OpenShiftNewApp"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": [
{
"type": "ConfigChange"
},
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"test-100"
],
"from": {
"kind": "ImageStreamTag",
"name": "test-100:latest"
}
}
}
],
"replicas": 1,
"test": false,
"selector": {
"app": "test-100",
"deploymentconfig": "test-100"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "test-100",
"deploymentconfig": "test-100"
},
"annotations": {
"openshift.io/generated-by": "OpenShiftNewApp"
}
},
"spec": {
"containers": [
{
"name": "test-100",
"image": "artifactory.company.com/docker-dev-local/test/dev/test:latest",
"ports": [
{
"containerPort": 8080,
"protocol": "TCP"
},
{
"containerPort": 8443,
"protocol": "TCP"
},
{
"containerPort": 8778,
"protocol": "TCP"
}
],
"resources": {}
}
]
}
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "test-100",
"creationTimestamp": null,
"labels": {
"app": "test-100"
},
"annotations": {
"openshift.io/generated-by": "OpenShiftNewApp"
}
},
"spec": {
"ports": [
{
"name": "8080-tcp",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
},
{
"name": "8443-tcp",
"protocol": "TCP",
"port": 8443,
"targetPort": 8443
},
{
"name": "8778-tcp",
"protocol": "TCP",
"port": 8778,
"targetPort": 8778
}
],
"selector": {
"app": "test-100",
"deploymentconfig": "test-100"
}
}
}
]
}