{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "s2i-fuse74-spring-boot-camel-xml"
    },
    "metadata": {
        "annotations": {
            "description": "Spring Boot and Camel Xml QuickStart. This example demonstrates how you can use Apache Camel with Spring Boot on OpenShift. The quickstart uses Spring Boot to configure an application which includes a Camel route (in Spring xml) that triggers a message every 5th second, and routes the message to a log.",
            "iconClass": "icon-rh-integration",
            "openshift.io/display-name": "Red Hat Fuse 7.4 Camel XML DSL with Spring Boot",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "tags": "quickstart,java,springboot,fis,jboss-fuse",
            "version": "1.4"
        },
        "name": "s2i-fuse74-spring-boot-camel-xml"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "creationTimestamp": null,
                "labels": {
                    "app": "${APP_NAME}",
                    "component": "${APP_NAME}",
                    "group": "quickstarts",
                    "provider": "s2i",
                    "version": "${APP_VERSION}"
                },
                "name": "${APP_NAME}"
            },
            "spec": {},
            "status": {
                "dockerImageRepository": ""
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "creationTimestamp": null,
                "labels": {
                    "app": "${APP_NAME}",
                    "component": "${APP_NAME}",
                    "group": "quickstarts",
                    "provider": "s2i",
                    "version": "${APP_VERSION}"
                },
                "name": "${APP_NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${APP_NAME}:latest"
                    }
                },
                "resources": {
                    "limits": {
                        "memory": "${BUILD_MEMORY_LIMIT}"
                    },
                    "requests": {
                        "memory": "${BUILD_MEMORY_REQUEST}"
                    }
                },
                "source": {
                    "git": {
                        "ref": "${GIT_REF}",
                        "uri": "${GIT_REPO}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "BUILD_LOGLEVEL",
                                "value": "5"
                            },
                            {
                                "name": "ARTIFACT_DIR",
                                "value": "${ARTIFACT_DIR}"
                            },
                            {
                                "name": "MAVEN_ARGS",
                                "value": "${MAVEN_ARGS}"
                            },
                            {
                                "name": "MAVEN_ARGS_APPEND",
                                "value": "${MAVEN_ARGS_APPEND}"
                            }
                        ],
                        "forcePull": true,
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "fuse7-java-openshift:${BUILDER_VERSION}",
                            "namespace": "${IMAGE_STREAM_NAMESPACE}"
                        },
                        "incremental": true
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "github": {
                            "secret": "${BUILD_SECRET}"
                        },
                        "type": "GitHub"
                    },
                    {
                        "generic": {
                            "secret": "${BUILD_SECRET}"
                        },
                        "type": "Generic"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "imageChange": {},
                        "type": "ImageChange"
                    }
                ]
            },
            "status": {
                "lastVersion": 0
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "creationTimestamp": null,
                "labels": {
                    "app": "${APP_NAME}",
                    "component": "${APP_NAME}",
                    "group": "quickstarts",
                    "provider": "s2i",
                    "version": "${APP_VERSION}"
                },
                "name": "${APP_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "app": "${APP_NAME}",
                    "component": "${APP_NAME}",
                    "deploymentconfig": "${APP_NAME}",
                    "group": "quickstarts",
                    "provider": "s2i",
                    "version": "${APP_VERSION}"
                },
                "template": {
                    "metadata": {
                        "creationTimestamp": null,
                        "labels": {
                            "app": "${APP_NAME}",
                            "component": "${APP_NAME}",
                            "deploymentconfig": "${APP_NAME}",
                            "group": "quickstarts",
                            "provider": "s2i",
                            "version": "${APP_VERSION}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "KUBERNETES_NAMESPACE",
                                        "valueFrom": {
                                            "fieldRef": {
                                                "fieldPath": "metadata.namespace"
                                            }
                                        }
                                    }
                                ],
                                "image": "library/${APP_NAME}:latest",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8081
                                    },
                                    "initialDelaySeconds": 180
                                },
                                "name": "${APP_NAME}",
                                "ports": [
                                    {
                                        "containerPort": 8778,
                                        "name": "jolokia"
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8081
                                    },
                                    "initialDelaySeconds": 10
                                },
                                "resources": {
                                    "limits": {
                                        "cpu": "${CPU_LIMIT}",
                                        "memory": "${MEMORY_LIMIT}"
                                    },
                                    "requests": {
                                        "cpu": "${CPU_REQUEST}",
                                        "memory": "${MEMORY_REQUEST}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "${APP_NAME}"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${APP_NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to the application.",
            "displayName": "Application Name",
            "name": "APP_NAME",
            "required": true,
            "value": "s2i-fuse74-spring-boot-camel-xml"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "GIT_REPO",
            "required": true,
            "value": "https://github.com/fabric8-quickstarts/spring-boot-camel-xml.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "GIT_REF",
            "value": "spring-boot-camel-xml-1.0.0.fuse-740014-redhat-00003"
        },
        {
            "description": "The version of the FIS S2I builder image to use.",
            "displayName": "Builder version",
            "name": "BUILDER_VERSION",
            "value": "1.4"
        },
        {
            "description": "The application version.",
            "displayName": "Application Version",
            "name": "APP_VERSION",
            "value": "1.0.0.fuse-740014-redhat-00003"
        },
        {
            "description": "Arguments passed to mvn in the build.",
            "displayName": "Maven Arguments",
            "name": "MAVEN_ARGS",
            "value": "package -DskipTests -Dfabric8.skip -e -B"
        },
        {
            "description": "Extra arguments passed to mvn, e.g. for multi-module builds.",
            "displayName": "Extra Maven Arguments",
            "name": "MAVEN_ARGS_APPEND"
        },
        {
            "description": "Directory of the artifact to be built, e.g. for multi-module builds.",
            "displayName": "Maven build directory",
            "name": "ARTIFACT_DIR"
        },
        {
            "description": "Namespace in which the Fuse ImageStreams are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
            "displayName": "Image Stream Namespace",
            "name": "IMAGE_STREAM_NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "The secret needed to trigger a build.",
            "displayName": "Git Build Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "BUILD_SECRET"
        },
        {
            "description": "The amount of CPU to request.",
            "displayName": "CPU request",
            "name": "CPU_REQUEST",
            "required": true,
            "value": "0.2"
        },
        {
            "description": "The amount of memory required for the container to run.",
            "displayName": "Memory request",
            "name": "MEMORY_REQUEST",
            "required": true,
            "value": "256Mi"
        },
        {
            "description": "The amount of CPU the container is limited to use.",
            "displayName": "CPU limit",
            "name": "CPU_LIMIT",
            "required": true,
            "value": "1.0"
        },
        {
            "description": "The amount of memory the container is limited to use.",
            "displayName": "Memory limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "256Mi"
        },
        {
            "description": "The amount of memory to request for builds.",
            "displayName": "Build Memory request",
            "name": "BUILD_MEMORY_REQUEST",
            "required": true,
            "value": "0.7G"
        },
        {
            "description": "The amount of memory the build container is limited to use.",
            "displayName": "Build Memory limit",
            "name": "BUILD_MEMORY_LIMIT",
            "required": true,
            "value": "0.8G"
        }
    ]
}