eap70-postgresql-s2i.json 33 KB

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