processserver64-postgresql-s2i.json 30 KB

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