{ "kind": "Template", "apiVersion": "v1", "metadata": { "name": "fuse-karaf", "annotations": { "description": "This example shows how to create an S2I based Karaf based Fuse application", "tags": "instant-app,fuse,karaf", "iconClass": "icon-java" }, "creationTimestamp": null }, "labels": { "template": "application-template-stibuild" }, "parameters": [{ "name": "APP_NAME", "value": "camel-hello-world", "description": "Application Name" }, { "name": "GIT_REPO", "value": "https://github.com/dhirajsb/camel-hello-world.git", "description": "git repository" }, { "name": "MAVEN_ARGS", "value": "install karaf:assembly karaf:archive -DskipTests -e -X", "description": "Arguments passed to mvn in the build" }, { "generate": "expression", "name": "BUILD_SECRET", "description": "The secret needed to trigger a build", "from": "[a-zA-Z0-9]{8}" }], "objects": [ { "kind": "ImageStream", "apiVersion": "v1", "metadata": { "name": "fuse-sti-${APP_NAME}", "creationTimestamp": null, "labels": { "app": "${APP_NAME}" } }, "spec": { "dockerImageRepository": "dhirajsb/fuse-sti" }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "v1", "metadata": { "name": "${APP_NAME}", "creationTimestamp": null, "labels": { "app": "${APP_NAME}" } }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "v1", "metadata": { "name": "${APP_NAME}", "creationTimestamp": null, "labels": { "app": "${APP_NAME}" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "${BUILD_SECRET}" } }, { "type": "Generic", "generic": { "secret": "${BUILD_SECRET}" } }, { "type": "ImageChange", "imageChange": {} } ], "source": { "type": "Git", "git": { "uri": "${GIT_REPO}" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "ImageStreamTag", "name": "fuse-sti-${APP_NAME}:latest" }, "incremental": true, "forcePull": true, "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" }, { "name": "MAVEN_ARGS", "value": "${MAVEN_ARGS}" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "${APP_NAME}:latest" } }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { "name": "${APP_NAME}", "creationTimestamp": null, "labels": { "app": "${APP_NAME}" } }, "spec": { "strategy": { "resources": {} }, "triggers": [ { "type": "ConfigChange" }, { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "${APP_NAME}" ], "from": { "kind": "ImageStreamTag", "name": "${APP_NAME}:latest" } } } ], "replicas": 1, "selector": { "deploymentconfig": "${APP_NAME}" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "deploymentconfig": "${APP_NAME}" } }, "spec": { "containers": [ { "name": "${APP_NAME}", "image": "library/${APP_NAME}:latest", "resources": {}, "ports" : [ { "containerPort" : 8778, "name" : "jolokia", "protocol" : "TCP" } ], "env" : [ { "name":"JOLOKIA_PORT", "value":"8778"} ] } ] } } }, "status": {} } ] }