halkyonio / operator

Kubernetes Operator simplifying the development of microservices on k8s !
Apache License 2.0
40 stars 14 forks source link

Add a step0 in order to collect s2i image label #46

Open cmoulliard opened 5 years ago

cmoulliard commented 5 years ago

Feature

The Tekton Task responsible to perform the step buildah bud uses a hard coded value to specify the path to execute the command s2i. This parameter should be externalised like also the following s2i images labels using a step0 to correctly let s2i build --as-dockerfile to populate the dockerfile - see discussion

io.openshift.s2i.destination /tmp
io.openshift.s2i.scripts-url image:///usr/local/s2i
io.fabric8.s2i.version.maven 3.5
org.jboss.container.deployments-dir /deployments
...

Info coming from : https://access.redhat.com/containers/?tab=tech-details&get-method=red-hat-login#/registry.access.redhat.com/openjdk/openjdk-8-rhel8

The go containers image tool used by skopeo, buildah, ... provides a parse image function which can be used to collect such info from the s2i image selected

cmoulliard commented 5 years ago

Example of code implementation which is working to get the image labels : https://gist.github.com/cmoulliard/225a7e23900e2b056e738ad27611d19a

cmoulliard commented 4 years ago

As we have now a Runtime CRD definition, then I dont think that we still need such step0 task for tekton and we could use the Runtime CRD to include additional METADATA such as:

WDYT @metacosm