karaf2-camel-log-template.json 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. {
  2. "apiVersion": "v1",
  3. "kind": "Template",
  4. "metadata": {
  5. "annotations": {
  6. "description": "A simple Camel route in Karaf container.",
  7. "tags": "quickstart,java,karaf,fis",
  8. "iconClass": "icon-jboss",
  9. "version": "2.0"
  10. },
  11. "name": "s2i-karaf2-camel-log"
  12. },
  13. "labels": {
  14. "template": "s2i-karaf2-camel-log"
  15. },
  16. "parameters": [
  17. {
  18. "name": "APP_NAME",
  19. "displayName": "Application Name",
  20. "required": true,
  21. "value": "s2i-karaf2-camel-log",
  22. "description": "The name assigned to the application."
  23. },
  24. {
  25. "name": "GIT_REPO",
  26. "displayName": "Git Repository URL",
  27. "value": "https://github.com/fabric8-quickstarts/karaf2-camel-log.git",
  28. "required": true,
  29. "description": "The URL of the repository with your application source code."
  30. },
  31. {
  32. "name": "GIT_REF",
  33. "displayName": "Git Reference",
  34. "value": "karaf2-camel-log-1.0.0.redhat-000010",
  35. "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch."
  36. },
  37. {
  38. "name": "SERVICE_NAME",
  39. "displayName": "Service Name",
  40. "value": "s2i-karaf2-camel-log",
  41. "description": "Exposed Service name."
  42. },
  43. {
  44. "name": "BUILDER_VERSION",
  45. "displayName": "Builder version",
  46. "value": "2.0",
  47. "description": "The version of the FIS S2I builder image to use."
  48. },
  49. {
  50. "name": "APP_VERSION",
  51. "displayName": "Application Version",
  52. "value": "1.0.0.redhat-000010",
  53. "description": "The application version."
  54. },
  55. {
  56. "name": "MAVEN_ARGS",
  57. "displayName": "Maven Arguments",
  58. "value": "install -DskipTests -Dfabric8.skip -e -B",
  59. "description": "Arguments passed to mvn in the build."
  60. },
  61. {
  62. "name": "MAVEN_ARGS_APPEND",
  63. "displayName": "Extra Maven Arguments",
  64. "description": "Extra arguments passed to mvn, e.g. for multi-module builds."
  65. },
  66. {
  67. "name": "ARTIFACT_DIR",
  68. "displayName": "Maven build directory",
  69. "description": "Directory of the artifact to be built, e.g. for multi-module builds."
  70. },
  71. {
  72. "name": "IMAGE_STREAM_NAMESPACE",
  73. "displayName": "Image Stream Namespace",
  74. "value": "openshift",
  75. "required": true,
  76. "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."
  77. },
  78. {
  79. "name": "BUILD_SECRET",
  80. "displayName": "Git Build Secret",
  81. "generate": "expression",
  82. "description": "The secret needed to trigger a build.",
  83. "from": "[a-zA-Z0-9]{40}"
  84. },
  85. {
  86. "name": "CPU_REQUEST",
  87. "displayName": "CPU request",
  88. "value": "0.2",
  89. "required": true,
  90. "description": "The amount of CPU to requests."
  91. },
  92. {
  93. "name": "MEMORY_REQUEST",
  94. "displayName": "Memory request",
  95. "value": "1.5G",
  96. "required": true,
  97. "description": "The amount of memory required for the container to run."
  98. },
  99. {
  100. "name": "CPU_LIMIT",
  101. "displayName": "CPU limit",
  102. "value": "1.0",
  103. "required": true,
  104. "description": "The amount of CPU the container is limited to use."
  105. },
  106. {
  107. "name": "MEMORY_LIMIT",
  108. "displayName": "Memory limit",
  109. "value": "2G",
  110. "required": true,
  111. "description": "The amount of memory the container is limited to use."
  112. }
  113. ],
  114. "objects": [
  115. {
  116. "kind": "ImageStream",
  117. "apiVersion": "v1",
  118. "metadata": {
  119. "name": "${APP_NAME}",
  120. "creationTimestamp": null,
  121. "labels": {
  122. "component": "${APP_NAME}",
  123. "container": "karaf",
  124. "group": "quickstarts",
  125. "project": "${APP_NAME}",
  126. "provider": "s2i",
  127. "version": "${APP_VERSION}"
  128. }
  129. },
  130. "spec": {},
  131. "status": {
  132. "dockerImageRepository": ""
  133. }
  134. },
  135. {
  136. "kind": "BuildConfig",
  137. "apiVersion": "v1",
  138. "metadata": {
  139. "name": "${APP_NAME}",
  140. "creationTimestamp": null,
  141. "labels": {
  142. "component": "${APP_NAME}",
  143. "container": "karaf",
  144. "group": "quickstarts",
  145. "project": "${APP_NAME}",
  146. "provider": "s2i",
  147. "version": "${APP_VERSION}"
  148. }
  149. },
  150. "spec": {
  151. "triggers": [
  152. {
  153. "type": "GitHub",
  154. "github": {
  155. "secret": "${BUILD_SECRET}"
  156. }
  157. },
  158. {
  159. "type": "Generic",
  160. "generic": {
  161. "secret": "${BUILD_SECRET}"
  162. }
  163. },
  164. {
  165. "type": "ConfigChange"
  166. },
  167. {
  168. "type": "ImageChange",
  169. "imageChange": {}
  170. }
  171. ],
  172. "source": {
  173. "type": "Git",
  174. "git": {
  175. "uri": "${GIT_REPO}",
  176. "ref": "${GIT_REF}"
  177. }
  178. },
  179. "strategy": {
  180. "type": "Source",
  181. "sourceStrategy": {
  182. "from": {
  183. "kind": "ImageStreamTag",
  184. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  185. "name": "fis-karaf-openshift:${BUILDER_VERSION}"
  186. },
  187. "forcePull": true,
  188. "incremental": true,
  189. "env": [
  190. {
  191. "name": "BUILD_LOGLEVEL",
  192. "value": "5"
  193. },
  194. {
  195. "name": "ARTIFACT_DIR",
  196. "value": "${ARTIFACT_DIR}"
  197. },
  198. {
  199. "name": "MAVEN_ARGS",
  200. "value": "${MAVEN_ARGS}"
  201. },
  202. {
  203. "name": "MAVEN_ARGS_APPEND",
  204. "value": "${MAVEN_ARGS_APPEND}"
  205. }
  206. ]
  207. }
  208. },
  209. "output": {
  210. "to": {
  211. "kind": "ImageStreamTag",
  212. "name": "${APP_NAME}:latest"
  213. }
  214. },
  215. "resources": {}
  216. },
  217. "status": {
  218. "lastVersion": 0
  219. }
  220. },
  221. {
  222. "kind": "DeploymentConfig",
  223. "apiVersion": "v1",
  224. "metadata": {
  225. "name": "${APP_NAME}",
  226. "creationTimestamp": null,
  227. "labels": {
  228. "component": "${APP_NAME}",
  229. "container": "karaf",
  230. "group": "quickstarts",
  231. "project": "${APP_NAME}",
  232. "provider": "s2i",
  233. "version": "${APP_VERSION}"
  234. }
  235. },
  236. "spec": {
  237. "strategy": {
  238. "resources": {}
  239. },
  240. "triggers": [
  241. {
  242. "type": "ConfigChange"
  243. },
  244. {
  245. "type": "ImageChange",
  246. "imageChangeParams": {
  247. "automatic": true,
  248. "containerNames": [
  249. "${APP_NAME}"
  250. ],
  251. "from": {
  252. "kind": "ImageStreamTag",
  253. "name": "${APP_NAME}:latest"
  254. }
  255. }
  256. }
  257. ],
  258. "replicas": 1,
  259. "selector": {
  260. "component": "${APP_NAME}",
  261. "container": "karaf",
  262. "deploymentconfig": "${APP_NAME}",
  263. "group": "quickstarts",
  264. "project": "${APP_NAME}",
  265. "provider": "s2i",
  266. "version": "${APP_VERSION}"
  267. },
  268. "template": {
  269. "metadata": {
  270. "creationTimestamp": null,
  271. "labels": {
  272. "component": "${APP_NAME}",
  273. "container": "karaf",
  274. "deploymentconfig": "${APP_NAME}",
  275. "group": "quickstarts",
  276. "project": "${APP_NAME}",
  277. "provider": "s2i",
  278. "version": "${APP_VERSION}"
  279. }
  280. },
  281. "spec": {
  282. "containers": [
  283. {
  284. "name": "${APP_NAME}",
  285. "image": "library/${APP_NAME}:latest",
  286. "readinessProbe" : {
  287. "httpGet" : {
  288. "path" : "/readiness-check",
  289. "port" : 8181
  290. },
  291. "initialDelaySeconds" : 10
  292. },
  293. "livenessProbe" : {
  294. "httpGet" : {
  295. "path" : "/health-check",
  296. "port" : 8181
  297. },
  298. "initialDelaySeconds" : 180
  299. },
  300. "ports": [
  301. {
  302. "containerPort": 8181,
  303. "name": "http"
  304. },
  305. {
  306. "containerPort": 8778,
  307. "name": "jolokia"
  308. }
  309. ],
  310. "env" : [ {
  311. "name" : "KUBERNETES_NAMESPACE",
  312. "valueFrom" : {
  313. "fieldRef" : {
  314. "fieldPath" : "metadata.namespace"
  315. }
  316. }
  317. } ],
  318. "resources": {
  319. "requests": {
  320. "cpu": "${CPU_REQUEST}",
  321. "memory": "${MEMORY_REQUEST}"
  322. },
  323. "limits": {
  324. "cpu": "${CPU_LIMIT}",
  325. "memory": "${MEMORY_LIMIT}"
  326. }
  327. }
  328. }
  329. ]
  330. }
  331. }
  332. },
  333. "status": {}
  334. }
  335. ]
  336. }