eap71-postgresql-persistent-s2i.json 35 KB

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