OpenShift deployment with kubernetes & container-image-docker extension does not work
See original GitHub issueDescribe the bug
The combination of both extensions quarkus-kubernetes and quarkus-container-image-docker for deployment-target=openshift does not work out of the box.
The generated openshift.yml file contains some not needed resources and wrong settings for S2I build (S2I is not in place in my configuration).
To get the deployment done I have to go the OpenShift WebConsole and manually delete the wrong deployment-trigger on the DeploymentConfig and start the deployment.
The following resources are generated by the quarkus-kubernetes extension:
- ServiceAccount --> okay
- Service --> okay
- ImageStream as target for the S2I build --> not needed (must be removed)
- ImageStream for S2I builder image --> not needed (must be removed)
- BuildConfig for S2I build --> not needed (must be removed)
- DeploymentConfig --> not okay because invalid deployment-trigger from S2I ImageStream (must be removed)
...
apiVersion: "apps.openshift.io/v1"
kind: "DeploymentConfig"
...
spec:
...
triggers:
- imageChangeParams:
automatic: true
containerNames:
- "quarkus-openshift-deployment"
from:
kind: "ImageStreamTag"
name: "quarkus-openshift-deployment:1.0.0-SNAPSHOT"
type: "ImageChange"
...
- Route --> okay
Expected behavior
The combination of the extensions quarkus-kubernetes and quarkus-container-image-docker for deployment-target=openshift should build a container-image, push it to my docker-registry and then deploy only the needed OpenShift resources with a reference to the container-image in the docker-registry.
Actual behavior
The generated openshift.yml file contains some not needed resources and wrong settings for S2I build (S2I is not in place in my configuration). This prevents the automatic deployment to OpenShift without using S2I.
To Reproduce
- Bootstrap a new quarkus maven project with the extensions: resteasy-jsonb, smallrye-health, container-image-docker, kubernetes
- Add these properties to the application.properties
quarkus.kubernetes-client.trust-certs=true
quarkus.kubernetes.deployment-target=openshift
quarkus.openshift.expose=true
quarkus.openshift.labels.app=quarkus-demo
- Login to your OpenShift cluster
oc login https://my-openshift-cluster --token=...
- Login to your docker-registry
docker login ...
- Start build with deployment
mvn clean package -Dquarkus.kubernetes.deploy=true
- Open OpenShift WebConsole to see that deployment was not successful due to reported bug
Environment
- Quarkus version: 1.5.1-Final
- Build tool: Maven 3.6.3
- OpenShift 3.11
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (15 by maintainers)
OK, sorry I missread it then 😃
@iocanel I really think the Openshift resources generation needs to be decoupled from S2I
Just created https://github.com/quarkusio/quarkus/issues/10875