eap-cd-postgresql-s2i.json 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "iconClass": "icon-eap",
  7. "tags": "eap,javaee,java,jboss,hidden",
  8. "version": "1.5.0",
  9. "openshift.io/display-name": "JBoss EAP CD + PostgreSQL (Ephemeral with https)",
  10. "openshift.io/provider-display-name": "Red Hat, Inc.",
  11. "description": "An example JBoss Enterprise Application Platform continuous delivery application with an PostgreSQL database configured with secure communication using https and ephemeral storage. For more information about using this template, see https://github.com/jboss-container-images/jboss-eap-7-openshift-image/blob/eap-cd/README.adoc",
  12. "template.openshift.io/long-description": "This template defines resources needed to develop a JBoss Enterprise Application Platform continuous delivery based application, including a build configuration, application deployment configuration, database deployment configuration for PostgreSQL using ephemeral (temporary) storage and secure communication using https.",
  13. "template.openshift.io/documentation-url": "https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/",
  14. "template.openshift.io/support-url": "https://access.redhat.com"
  15. },
  16. "name": "eap-cd-postgresql-s2i"
  17. },
  18. "labels": {
  19. "template": "eap-cd-postgresql-s2i",
  20. "xpaas": "1.5.0"
  21. },
  22. "message": "A new JBoss EAP CD and PostgreSQL based application with SSL support has been created in your project. The username/password for accessing the PostgreSQL database \"${DB_DATABASE}\" is ${DB_USERNAME}/${DB_PASSWORD}. Please be sure to create the following secrets: \"${HTTPS_SECRET}\" containing the ${HTTPS_KEYSTORE} file used for serving secure content; \"${JGROUPS_ENCRYPT_SECRET}\" containing the ${JGROUPS_ENCRYPT_KEYSTORE} file used for securing JGroups communications.",
  23. "parameters": [
  24. {
  25. "displayName": "Application Name",
  26. "description": "The name for the application.",
  27. "name": "APPLICATION_NAME",
  28. "value": "eap-app",
  29. "required": true
  30. },
  31. {
  32. "displayName": "Custom https Route Hostname",
  33. "description": "Custom hostname for https service route. Leave blank for default hostname, e.g.: secure-<application-name>-<project>.<default-domain-suffix>",
  34. "name": "HOSTNAME_HTTPS",
  35. "value": "",
  36. "required": false
  37. },
  38. {
  39. "displayName": "Git Repository URL",
  40. "description": "Git source URI for application",
  41. "name": "SOURCE_REPOSITORY_URL",
  42. "value": "https://github.com/jboss-openshift/openshift-quickstarts",
  43. "required": true
  44. },
  45. {
  46. "displayName": "Git Reference",
  47. "description": "Git branch/tag reference",
  48. "name": "SOURCE_REPOSITORY_REF",
  49. "value": "1.3",
  50. "required": false
  51. },
  52. {
  53. "displayName": "Context Directory",
  54. "description": "Path within Git project to build; empty for root project directory.",
  55. "name": "CONTEXT_DIR",
  56. "value": "todolist/todolist-jdbc",
  57. "required": false
  58. },
  59. {
  60. "displayName": "Database JNDI Name",
  61. "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/postgresql",
  62. "name": "DB_JNDI",
  63. "value": "java:jboss/datasources/TodoListDS",
  64. "required": false
  65. },
  66. {
  67. "displayName": "Database Name",
  68. "description": "Database name",
  69. "name": "DB_DATABASE",
  70. "value": "root",
  71. "required": true
  72. },
  73. {
  74. "displayName": "Queues",
  75. "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP. Note that all queues used by the application *must* be specified here in order to be created automatically on the remote AMQ broker.",
  76. "name": "MQ_QUEUES",
  77. "value": "",
  78. "required": false
  79. },
  80. {
  81. "displayName": "Topics",
  82. "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP. Note that all topics used by the application *must* be specified here in order to be created automatically on the remote AMQ broker.",
  83. "name": "MQ_TOPICS",
  84. "value": "",
  85. "required": false
  86. },
  87. {
  88. "displayName": "Server Keystore Secret Name",
  89. "description": "The name of the secret containing the keystore file",
  90. "name": "HTTPS_SECRET",
  91. "value": "eap7-app-secret",
  92. "required": true
  93. },
  94. {
  95. "displayName": "Server Keystore Filename",
  96. "description": "The name of the keystore file within the secret",
  97. "name": "HTTPS_KEYSTORE",
  98. "value": "keystore.jks",
  99. "required": false
  100. },
  101. {
  102. "displayName": "Server Keystore Type",
  103. "description": "The type of the keystore file (JKS or JCEKS)",
  104. "name": "HTTPS_KEYSTORE_TYPE",
  105. "value": "",
  106. "required": false
  107. },
  108. {
  109. "displayName": "Server Certificate Name",
  110. "description": "The name associated with the server certificate",
  111. "name": "HTTPS_NAME",
  112. "value": "",
  113. "required": false
  114. },
  115. {
  116. "displayName": "Server Keystore Password",
  117. "description": "The password for the keystore and certificate",
  118. "name": "HTTPS_PASSWORD",
  119. "value": "",
  120. "required": false
  121. },
  122. {
  123. "displayName": "Datasource Minimum Pool Size",
  124. "description": "Sets xa-pool/min-pool-size for the configured datasource.",
  125. "name": "DB_MIN_POOL_SIZE",
  126. "required": false
  127. },
  128. {
  129. "displayName": "Datasource Maximum Pool Size",
  130. "description": "Sets xa-pool/max-pool-size for the configured datasource.",
  131. "name": "DB_MAX_POOL_SIZE",
  132. "required": false
  133. },
  134. {
  135. "displayName": "Datasource Transaction Isolation",
  136. "description": "Sets transaction-isolation for the configured datasource.",
  137. "name": "DB_TX_ISOLATION",
  138. "required": false
  139. },
  140. {
  141. "displayName": "PostgreSQL Maximum number of connections",
  142. "description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.",
  143. "name": "POSTGRESQL_MAX_CONNECTIONS",
  144. "required": false
  145. },
  146. {
  147. "displayName": "PostgreSQL Shared Buffers",
  148. "description": "Configures how much memory is dedicated to PostgreSQL for caching data.",
  149. "name": "POSTGRESQL_SHARED_BUFFERS",
  150. "required": false
  151. },
  152. {
  153. "displayName": "AMQ cluster password",
  154. "description": "AMQ cluster admin password",
  155. "name": "MQ_CLUSTER_PASSWORD",
  156. "from": "[a-zA-Z0-9]{8}",
  157. "generate": "expression",
  158. "required": true
  159. },
  160. {
  161. "displayName": "Database Username",
  162. "description": "Database user name",
  163. "name": "DB_USERNAME",
  164. "from": "user[a-zA-Z0-9]{3}",
  165. "generate": "expression",
  166. "required": true
  167. },
  168. {
  169. "displayName": "Database Password",
  170. "description": "Database user password",
  171. "name": "DB_PASSWORD",
  172. "from": "[a-zA-Z0-9]{8}",
  173. "generate": "expression",
  174. "required": true
  175. },
  176. {
  177. "displayName": "Github Webhook Secret",
  178. "description": "GitHub trigger secret",
  179. "name": "GITHUB_WEBHOOK_SECRET",
  180. "from": "[a-zA-Z0-9]{8}",
  181. "generate": "expression",
  182. "required": true
  183. },
  184. {
  185. "displayName": "Generic Webhook Secret",
  186. "description": "Generic build trigger secret",
  187. "name": "GENERIC_WEBHOOK_SECRET",
  188. "from": "[a-zA-Z0-9]{8}",
  189. "generate": "expression",
  190. "required": true
  191. },
  192. {
  193. "displayName": "ImageStream Namespace",
  194. "description": "Namespace in which the ImageStreams for Red Hat Middleware images 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.",
  195. "name": "IMAGE_STREAM_NAMESPACE",
  196. "value": "openshift",
  197. "required": true
  198. },
  199. {
  200. "displayName": "JGroups Secret Name",
  201. "description": "The name of the secret containing the keystore file",
  202. "name": "JGROUPS_ENCRYPT_SECRET",
  203. "value": "eap7-app-secret",
  204. "required": false
  205. },
  206. {
  207. "displayName": "JGroups Keystore Filename",
  208. "description": "The name of the keystore file within the secret",
  209. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  210. "value": "jgroups.jceks",
  211. "required": false
  212. },
  213. {
  214. "displayName": "JGroups Certificate Name",
  215. "description": "The name associated with the server certificate",
  216. "name": "JGROUPS_ENCRYPT_NAME",
  217. "value": "",
  218. "required": false
  219. },
  220. {
  221. "displayName": "JGroups Keystore Password",
  222. "description": "The password for the keystore and certificate",
  223. "name": "JGROUPS_ENCRYPT_PASSWORD",
  224. "value": "",
  225. "required": false
  226. },
  227. {
  228. "displayName": "JGroups Cluster Password",
  229. "description": "JGroups cluster password",
  230. "name": "JGROUPS_CLUSTER_PASSWORD",
  231. "from": "[a-zA-Z0-9]{8}",
  232. "generate": "expression",
  233. "required": true
  234. },
  235. {
  236. "displayName": "Deploy Exploded Archives",
  237. "description": "Controls whether exploded deployment content should be automatically deployed",
  238. "name": "AUTO_DEPLOY_EXPLODED",
  239. "value": "false",
  240. "required": false
  241. },
  242. {
  243. "displayName": "Maven mirror URL",
  244. "description": "Maven mirror to use for S2I builds",
  245. "name": "MAVEN_MIRROR_URL",
  246. "value": "",
  247. "required": false
  248. },
  249. {
  250. "displayName": "Maven Additional Arguments",
  251. "description": "Maven additional arguments to use for S2I builds",
  252. "name": "MAVEN_ARGS_APPEND",
  253. "value": "",
  254. "required": false
  255. },
  256. {
  257. "description": "List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.",
  258. "name": "ARTIFACT_DIR",
  259. "value": "",
  260. "required": false
  261. },
  262. {
  263. "displayName": "PostgreSQL Image Stream Tag",
  264. "description": "The tag to use for the \"postgresql\" image stream. Typically, this aligns with the major.minor version of PostgreSQL.",
  265. "name": "POSTGRESQL_IMAGE_STREAM_TAG",
  266. "value": "9.5",
  267. "required": true
  268. },
  269. {
  270. "description": "Container memory limit",
  271. "name": "MEMORY_LIMIT",
  272. "value": "1Gi",
  273. "required": false
  274. }
  275. ],
  276. "objects": [
  277. {
  278. "kind": "Service",
  279. "apiVersion": "v1",
  280. "spec": {
  281. "ports": [
  282. {
  283. "port": 8080,
  284. "targetPort": 8080
  285. }
  286. ],
  287. "selector": {
  288. "deploymentConfig": "${APPLICATION_NAME}"
  289. }
  290. },
  291. "metadata": {
  292. "name": "${APPLICATION_NAME}",
  293. "labels": {
  294. "application": "${APPLICATION_NAME}"
  295. },
  296. "annotations": {
  297. "description": "The web server's http port.",
  298. "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-postgresql\", \"kind\": \"Service\"}]"
  299. }
  300. }
  301. },
  302. {
  303. "kind": "Service",
  304. "apiVersion": "v1",
  305. "spec": {
  306. "ports": [
  307. {
  308. "port": 8443,
  309. "targetPort": 8443
  310. }
  311. ],
  312. "selector": {
  313. "deploymentConfig": "${APPLICATION_NAME}"
  314. }
  315. },
  316. "metadata": {
  317. "name": "secure-${APPLICATION_NAME}",
  318. "labels": {
  319. "application": "${APPLICATION_NAME}"
  320. },
  321. "annotations": {
  322. "description": "The web server's https port.",
  323. "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-postgresql\", \"kind\": \"Service\"}]"
  324. }
  325. }
  326. },
  327. {
  328. "kind": "Service",
  329. "apiVersion": "v1",
  330. "spec": {
  331. "ports": [
  332. {
  333. "port": 5432,
  334. "targetPort": 5432
  335. }
  336. ],
  337. "selector": {
  338. "deploymentConfig": "${APPLICATION_NAME}-postgresql"
  339. }
  340. },
  341. "metadata": {
  342. "name": "${APPLICATION_NAME}-postgresql",
  343. "labels": {
  344. "application": "${APPLICATION_NAME}"
  345. },
  346. "annotations": {
  347. "description": "The database server's port."
  348. }
  349. }
  350. },
  351. {
  352. "kind": "Service",
  353. "apiVersion": "v1",
  354. "spec": {
  355. "clusterIP": "None",
  356. "ports": [
  357. {
  358. "name": "ping",
  359. "port": 8888
  360. }
  361. ],
  362. "selector": {
  363. "deploymentConfig": "${APPLICATION_NAME}"
  364. }
  365. },
  366. "metadata": {
  367. "name": "${APPLICATION_NAME}-ping",
  368. "labels": {
  369. "application": "${APPLICATION_NAME}"
  370. },
  371. "annotations": {
  372. "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true",
  373. "description": "The JGroups ping port for clustering."
  374. }
  375. }
  376. },
  377. {
  378. "kind": "Route",
  379. "apiVersion": "v1",
  380. "id": "${APPLICATION_NAME}-http",
  381. "metadata": {
  382. "name": "${APPLICATION_NAME}",
  383. "labels": {
  384. "application": "${APPLICATION_NAME}"
  385. },
  386. "annotations": {
  387. "description": "Route for application's http service."
  388. }
  389. },
  390. "spec": {
  391. "to": {
  392. "name": "${APPLICATION_NAME}"
  393. }
  394. }
  395. },
  396. {
  397. "kind": "Route",
  398. "apiVersion": "v1",
  399. "id": "${APPLICATION_NAME}-https",
  400. "metadata": {
  401. "name": "secure-${APPLICATION_NAME}",
  402. "labels": {
  403. "application": "${APPLICATION_NAME}"
  404. },
  405. "annotations": {
  406. "description": "Route for application's https service."
  407. }
  408. },
  409. "spec": {
  410. "host": "${HOSTNAME_HTTPS}",
  411. "to": {
  412. "name": "secure-${APPLICATION_NAME}"
  413. },
  414. "tls": {
  415. "termination": "passthrough"
  416. }
  417. }
  418. },
  419. {
  420. "kind": "ImageStream",
  421. "apiVersion": "v1",
  422. "metadata": {
  423. "name": "${APPLICATION_NAME}",
  424. "labels": {
  425. "application": "${APPLICATION_NAME}"
  426. }
  427. }
  428. },
  429. {
  430. "kind": "BuildConfig",
  431. "apiVersion": "v1",
  432. "metadata": {
  433. "name": "${APPLICATION_NAME}",
  434. "labels": {
  435. "application": "${APPLICATION_NAME}"
  436. }
  437. },
  438. "spec": {
  439. "source": {
  440. "type": "Git",
  441. "git": {
  442. "uri": "${SOURCE_REPOSITORY_URL}",
  443. "ref": "${SOURCE_REPOSITORY_REF}"
  444. },
  445. "contextDir": "${CONTEXT_DIR}"
  446. },
  447. "strategy": {
  448. "type": "Source",
  449. "sourceStrategy": {
  450. "env": [
  451. {
  452. "name": "MAVEN_MIRROR_URL",
  453. "value": "${MAVEN_MIRROR_URL}"
  454. },
  455. {
  456. "name": "MAVEN_ARGS_APPEND",
  457. "value": "${MAVEN_ARGS_APPEND}"
  458. },
  459. {
  460. "name": "ARTIFACT_DIR",
  461. "value": "${ARTIFACT_DIR}"
  462. }
  463. ],
  464. "forcePull": true,
  465. "from": {
  466. "kind": "ImageStreamTag",
  467. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  468. "name": "eap-cd-openshift:13"
  469. }
  470. }
  471. },
  472. "output": {
  473. "to": {
  474. "kind": "ImageStreamTag",
  475. "name": "${APPLICATION_NAME}:latest"
  476. }
  477. },
  478. "triggers": [
  479. {
  480. "type": "GitHub",
  481. "github": {
  482. "secret": "${GITHUB_WEBHOOK_SECRET}"
  483. }
  484. },
  485. {
  486. "type": "Generic",
  487. "generic": {
  488. "secret": "${GENERIC_WEBHOOK_SECRET}"
  489. }
  490. },
  491. {
  492. "type": "ImageChange",
  493. "imageChange": {}
  494. },
  495. {
  496. "type": "ConfigChange"
  497. }
  498. ]
  499. }
  500. },
  501. {
  502. "kind": "DeploymentConfig",
  503. "apiVersion": "v1",
  504. "metadata": {
  505. "name": "${APPLICATION_NAME}",
  506. "labels": {
  507. "application": "${APPLICATION_NAME}"
  508. }
  509. },
  510. "spec": {
  511. "strategy": {
  512. "type": "Recreate"
  513. },
  514. "triggers": [
  515. {
  516. "type": "ImageChange",
  517. "imageChangeParams": {
  518. "automatic": true,
  519. "containerNames": [
  520. "${APPLICATION_NAME}"
  521. ],
  522. "from": {
  523. "kind": "ImageStreamTag",
  524. "name": "${APPLICATION_NAME}:latest"
  525. }
  526. }
  527. },
  528. {
  529. "type": "ConfigChange"
  530. }
  531. ],
  532. "replicas": 1,
  533. "selector": {
  534. "deploymentConfig": "${APPLICATION_NAME}"
  535. },
  536. "template": {
  537. "metadata": {
  538. "name": "${APPLICATION_NAME}",
  539. "labels": {
  540. "deploymentConfig": "${APPLICATION_NAME}",
  541. "application": "${APPLICATION_NAME}"
  542. }
  543. },
  544. "spec": {
  545. "terminationGracePeriodSeconds": 75,
  546. "containers": [
  547. {
  548. "name": "${APPLICATION_NAME}",
  549. "image": "${APPLICATION_NAME}",
  550. "imagePullPolicy": "Always",
  551. "resources": {
  552. "limits": {
  553. "memory": "${MEMORY_LIMIT}"
  554. }
  555. },
  556. "volumeMounts": [
  557. {
  558. "name": "eap-keystore-volume",
  559. "mountPath": "/etc/eap-secret-volume",
  560. "readOnly": true
  561. },
  562. {
  563. "name": "eap-jgroups-keystore-volume",
  564. "mountPath": "/etc/jgroups-encrypt-secret-volume",
  565. "readOnly": true
  566. }
  567. ],
  568. "livenessProbe": {
  569. "exec": {
  570. "command": [
  571. "/bin/bash",
  572. "-c",
  573. "/opt/eap/bin/livenessProbe.sh"
  574. ]
  575. },
  576. "initialDelaySeconds": 60
  577. },
  578. "readinessProbe": {
  579. "exec": {
  580. "command": [
  581. "/bin/bash",
  582. "-c",
  583. "/opt/eap/bin/readinessProbe.sh"
  584. ]
  585. }
  586. },
  587. "ports": [
  588. {
  589. "name": "jolokia",
  590. "containerPort": 8778,
  591. "protocol": "TCP"
  592. },
  593. {
  594. "name": "http",
  595. "containerPort": 8080,
  596. "protocol": "TCP"
  597. },
  598. {
  599. "name": "https",
  600. "containerPort": 8443,
  601. "protocol": "TCP"
  602. },
  603. {
  604. "name": "ping",
  605. "containerPort": 8888,
  606. "protocol": "TCP"
  607. }
  608. ],
  609. "env": [
  610. {
  611. "name": "DB_SERVICE_PREFIX_MAPPING",
  612. "value": "${APPLICATION_NAME}-postgresql=DB"
  613. },
  614. {
  615. "name": "DB_JNDI",
  616. "value": "${DB_JNDI}"
  617. },
  618. {
  619. "name": "DB_USERNAME",
  620. "value": "${DB_USERNAME}"
  621. },
  622. {
  623. "name": "DB_PASSWORD",
  624. "value": "${DB_PASSWORD}"
  625. },
  626. {
  627. "name": "DB_DATABASE",
  628. "value": "${DB_DATABASE}"
  629. },
  630. {
  631. "name": "TX_DATABASE_PREFIX_MAPPING",
  632. "value": "${APPLICATION_NAME}-postgresql=DB"
  633. },
  634. {
  635. "name": "DB_MIN_POOL_SIZE",
  636. "value": "${DB_MIN_POOL_SIZE}"
  637. },
  638. {
  639. "name": "DB_MAX_POOL_SIZE",
  640. "value": "${DB_MAX_POOL_SIZE}"
  641. },
  642. {
  643. "name": "DB_TX_ISOLATION",
  644. "value": "${DB_TX_ISOLATION}"
  645. },
  646. {
  647. "name": "JGROUPS_PING_PROTOCOL",
  648. "value": "openshift.DNS_PING"
  649. },
  650. {
  651. "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
  652. "value": "${APPLICATION_NAME}-ping"
  653. },
  654. {
  655. "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
  656. "value": "8888"
  657. },
  658. {
  659. "name": "HTTPS_KEYSTORE_DIR",
  660. "value": "/etc/eap-secret-volume"
  661. },
  662. {
  663. "name": "HTTPS_KEYSTORE",
  664. "value": "${HTTPS_KEYSTORE}"
  665. },
  666. {
  667. "name": "HTTPS_KEYSTORE_TYPE",
  668. "value": "${HTTPS_KEYSTORE_TYPE}"
  669. },
  670. {
  671. "name": "HTTPS_NAME",
  672. "value": "${HTTPS_NAME}"
  673. },
  674. {
  675. "name": "HTTPS_PASSWORD",
  676. "value": "${HTTPS_PASSWORD}"
  677. },
  678. {
  679. "name": "MQ_CLUSTER_PASSWORD",
  680. "value": "${MQ_CLUSTER_PASSWORD}"
  681. },
  682. {
  683. "name": "MQ_QUEUES",
  684. "value": "${MQ_QUEUES}"
  685. },
  686. {
  687. "name": "MQ_TOPICS",
  688. "value": "${MQ_TOPICS}"
  689. },
  690. {
  691. "name": "JGROUPS_ENCRYPT_SECRET",
  692. "value": "${JGROUPS_ENCRYPT_SECRET}"
  693. },
  694. {
  695. "name": "JGROUPS_ENCRYPT_KEYSTORE_DIR",
  696. "value": "/etc/jgroups-encrypt-secret-volume"
  697. },
  698. {
  699. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  700. "value": "${JGROUPS_ENCRYPT_KEYSTORE}"
  701. },
  702. {
  703. "name": "JGROUPS_ENCRYPT_NAME",
  704. "value": "${JGROUPS_ENCRYPT_NAME}"
  705. },
  706. {
  707. "name": "JGROUPS_ENCRYPT_PASSWORD",
  708. "value": "${JGROUPS_ENCRYPT_PASSWORD}"
  709. },
  710. {
  711. "name": "JGROUPS_CLUSTER_PASSWORD",
  712. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  713. },
  714. {
  715. "name": "AUTO_DEPLOY_EXPLODED",
  716. "value": "${AUTO_DEPLOY_EXPLODED}"
  717. },
  718. {
  719. "name": "DEFAULT_JOB_REPOSITORY",
  720. "value": "${APPLICATION_NAME}-postgresql"
  721. },
  722. {
  723. "name": "TIMER_SERVICE_DATA_STORE",
  724. "value": "${APPLICATION_NAME}-postgresql"
  725. }
  726. ]
  727. }
  728. ],
  729. "volumes": [
  730. {
  731. "name": "eap-keystore-volume",
  732. "secret": {
  733. "secretName": "${HTTPS_SECRET}"
  734. }
  735. },
  736. {
  737. "name": "eap-jgroups-keystore-volume",
  738. "secret": {
  739. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  740. }
  741. }
  742. ]
  743. }
  744. }
  745. }
  746. },
  747. {
  748. "kind": "DeploymentConfig",
  749. "apiVersion": "v1",
  750. "metadata": {
  751. "name": "${APPLICATION_NAME}-postgresql",
  752. "labels": {
  753. "application": "${APPLICATION_NAME}"
  754. }
  755. },
  756. "spec": {
  757. "strategy": {
  758. "type": "Recreate"
  759. },
  760. "triggers": [
  761. {
  762. "type": "ImageChange",
  763. "imageChangeParams": {
  764. "automatic": true,
  765. "containerNames": [
  766. "${APPLICATION_NAME}-postgresql"
  767. ],
  768. "from": {
  769. "kind": "ImageStreamTag",
  770. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  771. "name": "postgresql:${POSTGRESQL_IMAGE_STREAM_TAG}"
  772. }
  773. }
  774. },
  775. {
  776. "type": "ConfigChange"
  777. }
  778. ],
  779. "replicas": 1,
  780. "selector": {
  781. "deploymentConfig": "${APPLICATION_NAME}-postgresql"
  782. },
  783. "template": {
  784. "metadata": {
  785. "name": "${APPLICATION_NAME}-postgresql",
  786. "labels": {
  787. "deploymentConfig": "${APPLICATION_NAME}-postgresql",
  788. "application": "${APPLICATION_NAME}"
  789. }
  790. },
  791. "spec": {
  792. "terminationGracePeriodSeconds": 60,
  793. "containers": [
  794. {
  795. "name": "${APPLICATION_NAME}-postgresql",
  796. "image": "postgresql",
  797. "imagePullPolicy": "Always",
  798. "ports": [
  799. {
  800. "containerPort": 5432,
  801. "protocol": "TCP"
  802. }
  803. ],
  804. "readinessProbe": {
  805. "timeoutSeconds": 1,
  806. "initialDelaySeconds": 5,
  807. "exec": {
  808. "command": [ "/bin/sh", "-i", "-c", "psql -h 127.0.0.1 -U $POSTGRESQL_USER -q -d $POSTGRESQL_DATABASE -c 'SELECT 1'"]
  809. }
  810. },
  811. "livenessProbe": {
  812. "timeoutSeconds": 1,
  813. "initialDelaySeconds": 30,
  814. "tcpSocket": {
  815. "port": 5432
  816. }
  817. },
  818. "env": [
  819. {
  820. "name": "POSTGRESQL_USER",
  821. "value": "${DB_USERNAME}"
  822. },
  823. {
  824. "name": "POSTGRESQL_PASSWORD",
  825. "value": "${DB_PASSWORD}"
  826. },
  827. {
  828. "name": "POSTGRESQL_DATABASE",
  829. "value": "${DB_DATABASE}"
  830. },
  831. {
  832. "name": "POSTGRESQL_MAX_CONNECTIONS",
  833. "value": "${POSTGRESQL_MAX_CONNECTIONS}"
  834. },
  835. {
  836. "name": "POSTGRESQL_MAX_PREPARED_TRANSACTIONS",
  837. "value": "${POSTGRESQL_MAX_CONNECTIONS}"
  838. },
  839. {
  840. "name": "POSTGRESQL_SHARED_BUFFERS",
  841. "value": "${POSTGRESQL_SHARED_BUFFERS}"
  842. }
  843. ],
  844. "volumeMounts": [
  845. {
  846. "mountPath": "/var/lib/pgsql/data",
  847. "name": "${APPLICATION_NAME}-data"
  848. }
  849. ]
  850. }
  851. ],
  852. "volumes": [
  853. {
  854. "emptyDir": {
  855. "medium": ""
  856. },
  857. "name": "${APPLICATION_NAME}-data"
  858. }
  859. ]
  860. }
  861. }
  862. }
  863. }
  864. ]
  865. }