rhpam70-prod-immutable-kieserver.yaml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. ---
  2. kind: Template
  3. apiVersion: v1
  4. metadata:
  5. annotations:
  6. description: Application template for an immultable KIE server in a production environment, for Red Hat Process Automation Manager 7.0
  7. iconClass: icon-jboss
  8. tags: rhpam,jboss,xpaas
  9. version: 1.4.0
  10. openshift.io/display-name: Red Hat Process Automation Manager 7.0 immutable production environment
  11. name: rhpam70-prod-immutable-kieserver
  12. labels:
  13. template: rhpam70-prod-immutable-kieserver
  14. xpaas: 1.4.0
  15. message: A new environment has been set up for Red Hat Process Automation Manager 7. The username/password for accessing the KIE server is ${KIE_SERVER_USER}/${KIE_SERVER_PWD}.
  16. parameters:
  17. - displayName: Application Name
  18. description: The name for the application.
  19. name: APPLICATION_NAME
  20. value: myapp
  21. required: true
  22. - displayName: EAP Admin User
  23. description: EAP administrator username
  24. name: ADMIN_USERNAME
  25. value: eapadmin
  26. required: false
  27. - displayName: EAP Admin Password
  28. description: EAP administrator password
  29. name: ADMIN_PASSWORD
  30. from: "[a-zA-Z]{6}[0-9]{1}!"
  31. generate: expression
  32. required: false
  33. - displayName: KIE Admin User
  34. description: KIE administrator username
  35. name: KIE_ADMIN_USER
  36. value: adminUser
  37. required: false
  38. - displayName: KIE Admin Password
  39. description: KIE administrator password
  40. name: KIE_ADMIN_PWD
  41. from: "[a-zA-Z]{6}[0-9]{1}!"
  42. generate: expression
  43. required: false
  44. - displayName: KIE Server User
  45. description: KIE execution server username (Sets the org.kie.server.user system property)
  46. name: KIE_SERVER_USER
  47. value: executionUser
  48. required: false
  49. - displayName: KIE Server Password
  50. description: KIE execution server password, used to connect to KIE servers. Generated value can be a suggestion to use for thew s2i various (Sets the org.kie.server.pwd system property)
  51. name: KIE_SERVER_PWD
  52. from: "[a-zA-Z]{6}[0-9]{1}!"
  53. generate: expression
  54. required: false
  55. - displayName: KIE Server ID
  56. description: The KIE server ID to use, which defaults to ${APPLICATION_NAME}-kieserver if not specified (Sets the org.kie.server.id system property).
  57. name: KIE_SERVER_ID
  58. value: ''
  59. required: false
  60. - displayName: ImageStream Namespace
  61. description: Namespace in which the ImageStreams for Red Hat Middleware images are
  62. installed. These ImageStreams are normally installed in the openshift namespace.
  63. You should only need to modify this if you've installed the ImageStreams in a
  64. different namespace/project.
  65. name: IMAGE_STREAM_NAMESPACE
  66. value: openshift
  67. required: true
  68. - displayName: ImageStream Tag
  69. description: A named pointer to an image in an image stream. Default is "1.0".
  70. name: IMAGE_STREAM_TAG
  71. value: "1.0"
  72. required: false
  73. - displayName: KIE Server Monitor User
  74. description: KIE server monitor username, for optional use of the business-central-monitor (Sets the org.kie.server.controller.user system property)
  75. name: KIE_SERVER_MONITOR_USER
  76. value: monitorUser
  77. required: false
  78. - displayName: KIE Server Monitor Password
  79. description: KIE server monitor password, for optional use of the business-central-monitor (Sets the org.kie.server.controller.pwd system property)
  80. name: KIE_SERVER_MONITOR_PWD
  81. required: false
  82. - displayName: KIE Server Monitor Service
  83. description: The service name for the optional business-central-monitor, where it can be reached and registered with, to allow monitoring console functionality
  84. name: KIE_SERVER_MONITOR_SERVICE
  85. required: false
  86. - displayName: Smart Router Service
  87. description: The service name for the optional smart router, where it can be reached, to allow smart routing
  88. name: KIE_SERVER_ROUTER_SERVICE
  89. required: false
  90. - displayName: Smart Router Host
  91. description: "The host name of the smart router, which could be the service name resolved by OpenShift or a globally resolvable domain name"
  92. name: KIE_SERVER_ROUTER_HOST
  93. example: "myapp-smartrouter"
  94. required: false
  95. - displayName: Smart Router listening port
  96. description: Port in which the smart router server listens (router property org.kie.server.router.port)
  97. name: KIE_SERVER_ROUTER_PORT
  98. example: "9000"
  99. required: false
  100. - displayName: Smart Router protocol
  101. description: KIE server router protocol (Used to build the org.kie.server.router.url.external property)
  102. name: KIE_SERVER_ROUTER_PROTOCOL
  103. example: "http"
  104. required: false
  105. - displayName: KIE Server Persistence DS
  106. description: KIE execution server persistence datasource (Sets the org.kie.server.persistence.ds system property)
  107. name: KIE_SERVER_PERSISTENCE_DS
  108. value: java:/jboss/datasources/rhpam
  109. required: false
  110. ## PostgreSQL database parameters BEGIN
  111. - displayName: PostgreSQL ImageStream Tag
  112. description: The PostgreSQL image version, which is intended to correspond to the PostgreSQL version. Default is "9.6".
  113. name: POSTGRESQL_IMAGE_STREAM_TAG
  114. value: "9.6"
  115. required: false
  116. - displayName: KIE Server PostgreSQL Database User
  117. description: KIE execution server PostgreSQL database username
  118. name: KIE_SERVER_POSTGRESQL_USER
  119. value: rhpam
  120. required: false
  121. - displayName: KIE Server PostgreSQL Database Password
  122. description: KIE execution server PostgreSQL database password
  123. name: KIE_SERVER_POSTGRESQL_PWD
  124. from: "[a-zA-Z]{6}[0-9]{1}!"
  125. generate: expression
  126. required: false
  127. - displayName: KIE Server PostgreSQL Database Name
  128. description: KIE execution server PostgreSQL database name
  129. name: KIE_SERVER_POSTGRESQL_DB
  130. value: rhpam7
  131. required: false
  132. - displayName: PostgreSQL Database max prepared connections
  133. description: Allows the PostgreSQL to handle XA transactions.
  134. name: POSTGRESQL_MAX_PREPARED_TRANSACTIONS
  135. value: '100'
  136. required: true
  137. - displayName: Database Volume Capacity
  138. description: Size of persistent storage for database volume.
  139. name: DB_VOLUME_CAPACITY
  140. value: 1Gi
  141. required: true
  142. ## PostgreSQL database parameters END
  143. - displayName: Drools Server Filter Classes
  144. description: KIE execution server class filtering (Sets the org.drools.server.filter.classes system property)
  145. name: DROOLS_SERVER_FILTER_CLASSES
  146. value: 'true'
  147. required: false
  148. - displayName: KIE MBeans
  149. description: KIE execution server mbeans enabled/disabled (Sets the kie.mbeans and kie.scanner.mbeans system properties)
  150. name: KIE_MBEANS
  151. value: enabled
  152. required: false
  153. - displayName: Execution Server Custom http Route Hostname
  154. description: 'Custom hostname for http service route. Leave blank for default hostname,
  155. e.g.: <application-name>-kieserver-<project>.<default-domain-suffix>'
  156. name: EXECUTION_SERVER_HOSTNAME_HTTP
  157. value: ''
  158. required: false
  159. - displayName: Execution Server Custom https Route Hostname
  160. description: 'Custom hostname for https service route. Leave blank for default
  161. hostname, e.g.: secure-<application-name>-kieserver-<project>.<default-domain-suffix>'
  162. name: EXECUTION_SERVER_HOSTNAME_HTTPS
  163. value: ''
  164. required: false
  165. - displayName: KIE Server Keystore Secret Name
  166. description: The name of the secret containing the keystore file
  167. name: KIE_SERVER_HTTPS_SECRET
  168. example: kieserver-app-secret
  169. required: true
  170. - displayName: KIE Server Keystore Filename
  171. description: The name of the keystore file within the secret
  172. name: KIE_SERVER_HTTPS_KEYSTORE
  173. value: keystore.jks
  174. required: false
  175. - displayName: KIE Server Certificate Name
  176. description: The name associated with the server certificate
  177. name: KIE_SERVER_HTTPS_NAME
  178. value: jboss
  179. required: false
  180. - displayName: KIE Server Keystore Password
  181. description: The password for the keystore and certificate
  182. name: KIE_SERVER_HTTPS_PASSWORD
  183. value: mykeystorepass
  184. required: false
  185. - displayName: KIE Server Bypass Auth User
  186. description: KIE execution server bypass auth user (Sets the org.kie.server.bypass.auth.user system property)
  187. name: KIE_SERVER_BYPASS_AUTH_USER
  188. value: 'false'
  189. required: false
  190. - displayName: KIE Server Container Deployment
  191. description: 'KIE Server Container deployment configuration in format: containerId=groupId:artifactId:version|c2=g2:a2:v2'
  192. name: KIE_SERVER_CONTAINER_DEPLOYMENT
  193. example: rhpam-kieserver-library=org.openshift.quickstarts:rhpam-kieserver-library:1.4.0-SNAPSHOT
  194. required: true
  195. - displayName: Git Repository URL
  196. description: Git source URI for application
  197. name: SOURCE_REPOSITORY_URL
  198. example: https://github.com/jboss-container-images/rhpam-7-openshift-image.git
  199. required: true
  200. - displayName: Git Reference
  201. description: Git branch/tag reference
  202. name: SOURCE_REPOSITORY_REF
  203. example: rhpam70-dev
  204. required: false
  205. - displayName: Context Directory
  206. description: Path within Git project to build; empty for root project directory.
  207. name: CONTEXT_DIR
  208. example: quickstarts/library-process/library
  209. required: false
  210. - displayName: Github Webhook Secret
  211. description: GitHub trigger secret
  212. name: GITHUB_WEBHOOK_SECRET
  213. from: "[a-zA-Z0-9]{8}"
  214. generate: expression
  215. required: true
  216. - displayName: Generic Webhook Secret
  217. description: Generic build trigger secret
  218. name: GENERIC_WEBHOOK_SECRET
  219. from: "[a-zA-Z0-9]{8}"
  220. generate: expression
  221. required: true
  222. - displayName: Maven mirror URL
  223. description: Maven mirror to use for S2I builds
  224. name: MAVEN_MIRROR_URL
  225. value: ''
  226. required: false
  227. - displayName: Maven repository URL
  228. description: Fully qualified URL to a Maven repository.
  229. name: MAVEN_REPO_URL
  230. value: ''
  231. required: false
  232. - displayName: Maven repository username
  233. description: Username to access the Maven repository.
  234. name: MAVEN_REPO_USERNAME
  235. value: ''
  236. required: false
  237. - displayName: Maven repository password
  238. description: Password to access the Maven repository.
  239. name: MAVEN_REPO_PASSWORD
  240. value: ''
  241. required: false
  242. - description: List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.
  243. name: ARTIFACT_DIR
  244. value: ''
  245. required: false
  246. - displayName: "Timer service data store refresh interval (in milliseconds)"
  247. description: "Sets refresh-interval for the EJB timer service database-data-store."
  248. name: TIMER_SERVICE_DATA_STORE_REFRESH_INTERVAL
  249. value: '30000'
  250. required: false
  251. - displayName: Execution Server Container Memory Limit
  252. description: Execution Server Container memory limit
  253. name: EXECUTION_SERVER_MEMORY_LIMIT
  254. value: 1Gi
  255. required: false
  256. - displayName: Disable KIE Server Management
  257. description: "Disable management api and don't allow KIE containers to be deployed/undeployed or started/stopped sets the property org.kie.server.mgmt.api.disabled to true and org.kie.server.startup.strategy to LocalContainersStartupStrategy."
  258. name: KIE_SERVER_MGMT_DISABLED
  259. value: "true"
  260. required: true
  261. - displayName: KIE Server Startup Strategy
  262. description: "When set to LocalContainersStartupStrategy, allows KIE server to start up and function with local config, even when a controller is configured and unavailable."
  263. name: KIE_SERVER_STARTUP_STRATEGY
  264. value: LocalContainersStartupStrategy
  265. required: true
  266. objects:
  267. - kind: Service
  268. apiVersion: v1
  269. spec:
  270. ports:
  271. - name: http
  272. port: 8080
  273. targetPort: 8080
  274. - name: https
  275. port: 8443
  276. targetPort: 8443
  277. selector:
  278. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  279. metadata:
  280. name: "${APPLICATION_NAME}-kieserver"
  281. labels:
  282. application: "${APPLICATION_NAME}"
  283. service: "${APPLICATION_NAME}-kieserver"
  284. annotations:
  285. description: All the KIE server web server's ports.
  286. - kind: Service
  287. apiVersion: v1
  288. spec:
  289. clusterIP: "None"
  290. ports:
  291. - name: "ping"
  292. port: 8888
  293. selector:
  294. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  295. metadata:
  296. name: "${APPLICATION_NAME}-kieserver-ping"
  297. labels:
  298. application: "${APPLICATION_NAME}"
  299. service: "${APPLICATION_NAME}-kieserver"
  300. annotations:
  301. service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
  302. description: "The JGroups ping port for clustering."
  303. ## PostgreSQL service BEGIN
  304. - apiVersion: v1
  305. kind: Service
  306. metadata:
  307. annotations:
  308. description: The database server's port.
  309. labels:
  310. application: ${APPLICATION_NAME}
  311. service: "${APPLICATION_NAME}-postgresql"
  312. name: ${APPLICATION_NAME}-postgresql
  313. spec:
  314. ports:
  315. - port: 5432
  316. targetPort: 5432
  317. selector:
  318. deploymentConfig: ${APPLICATION_NAME}-postgresql
  319. ## PostgreSQL service END
  320. - kind: Route
  321. apiVersion: v1
  322. id: "${APPLICATION_NAME}-kieserver-http"
  323. metadata:
  324. name: "${APPLICATION_NAME}-kieserver"
  325. labels:
  326. application: "${APPLICATION_NAME}"
  327. service: "${APPLICATION_NAME}-kieserver"
  328. annotations:
  329. description: Route for KIE server's http service.
  330. spec:
  331. host: "${EXECUTION_SERVER_HOSTNAME_HTTP}"
  332. to:
  333. name: "${APPLICATION_NAME}-kieserver"
  334. port:
  335. targetPort: http
  336. - kind: Route
  337. apiVersion: v1
  338. id: "${APPLICATION_NAME}-kieserver-https"
  339. metadata:
  340. name: "secure-${APPLICATION_NAME}-kieserver"
  341. labels:
  342. application: "${APPLICATION_NAME}"
  343. service: "${APPLICATION_NAME}-kieserver"
  344. annotations:
  345. description: Route for KIE server's https service.
  346. spec:
  347. host: "${EXECUTION_SERVER_HOSTNAME_HTTPS}"
  348. to:
  349. name: "${APPLICATION_NAME}-kieserver"
  350. port:
  351. targetPort: https
  352. tls:
  353. termination: passthrough
  354. - kind: ImageStream
  355. apiVersion: v1
  356. metadata:
  357. name: "${APPLICATION_NAME}-kieserver"
  358. labels:
  359. application: "${APPLICATION_NAME}"
  360. service: "${APPLICATION_NAME}-kieserver"
  361. - kind: BuildConfig
  362. apiVersion: v1
  363. metadata:
  364. name: "${APPLICATION_NAME}-kieserver"
  365. labels:
  366. application: "${APPLICATION_NAME}"
  367. service: "${APPLICATION_NAME}-kieserver"
  368. spec:
  369. source:
  370. type: Git
  371. git:
  372. uri: "${SOURCE_REPOSITORY_URL}"
  373. ref: "${SOURCE_REPOSITORY_REF}"
  374. contextDir: "${CONTEXT_DIR}"
  375. strategy:
  376. type: Source
  377. sourceStrategy:
  378. env:
  379. - name: KIE_SERVER_CONTAINER_DEPLOYMENT
  380. value: "${KIE_SERVER_CONTAINER_DEPLOYMENT}"
  381. - name: MAVEN_MIRROR_URL
  382. value: "${MAVEN_MIRROR_URL}"
  383. - name: ARTIFACT_DIR
  384. value: "${ARTIFACT_DIR}"
  385. forcePull: true
  386. from:
  387. kind: ImageStreamTag
  388. namespace: "${IMAGE_STREAM_NAMESPACE}"
  389. name: "rhpam70-kieserver-openshift:${IMAGE_STREAM_TAG}"
  390. output:
  391. to:
  392. kind: ImageStreamTag
  393. name: "${APPLICATION_NAME}-kieserver:latest"
  394. triggers:
  395. - type: GitHub
  396. github:
  397. secret: "${GITHUB_WEBHOOK_SECRET}"
  398. - type: Generic
  399. generic:
  400. secret: "${GENERIC_WEBHOOK_SECRET}"
  401. - type: ImageChange
  402. imageChange: {}
  403. - type: ConfigChange
  404. - kind: DeploymentConfig
  405. apiVersion: v1
  406. metadata:
  407. name: "${APPLICATION_NAME}-kieserver"
  408. labels:
  409. application: "${APPLICATION_NAME}"
  410. service: "${APPLICATION_NAME}-kieserver"
  411. spec:
  412. strategy:
  413. type: Recreate
  414. triggers:
  415. - type: ImageChange
  416. imageChangeParams:
  417. automatic: true
  418. containerNames:
  419. - "${APPLICATION_NAME}-kieserver"
  420. from:
  421. kind: ImageStream
  422. name: "${APPLICATION_NAME}-kieserver"
  423. - type: ConfigChange
  424. replicas: 2
  425. selector:
  426. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  427. template:
  428. metadata:
  429. name: "${APPLICATION_NAME}-kieserver"
  430. labels:
  431. deploymentConfig: "${APPLICATION_NAME}-kieserver"
  432. application: "${APPLICATION_NAME}"
  433. service: "${APPLICATION_NAME}-kieserver"
  434. spec:
  435. terminationGracePeriodSeconds: 60
  436. containers:
  437. - name: "${APPLICATION_NAME}-kieserver"
  438. image: "${APPLICATION_NAME}-kieserver"
  439. imagePullPolicy: Always
  440. resources:
  441. limits:
  442. memory: "${EXECUTION_SERVER_MEMORY_LIMIT}"
  443. volumeMounts:
  444. - name: kieserver-keystore-volume
  445. mountPath: "/etc/kieserver-secret-volume"
  446. readOnly: true
  447. livenessProbe:
  448. exec:
  449. command:
  450. - "/bin/bash"
  451. - "-c"
  452. - "curl --fail --silent -u '${KIE_ADMIN_USER}:${KIE_ADMIN_PWD}' http://localhost:8080/services/rest/server/healthcheck"
  453. initialDelaySeconds: 180
  454. timeoutSeconds: 2
  455. periodSeconds: 15
  456. failureThreshold: 3
  457. readinessProbe:
  458. exec:
  459. command:
  460. - "/bin/bash"
  461. - "-c"
  462. - "curl --fail --silent -u '${KIE_ADMIN_USER}:${KIE_ADMIN_PWD}' http://localhost:8080/services/rest/server/readycheck"
  463. initialDelaySeconds: 60
  464. timeoutSeconds: 2
  465. periodSeconds: 30
  466. failureThreshold: 6
  467. ports:
  468. - name: jolokia
  469. containerPort: 8778
  470. protocol: TCP
  471. - name: http
  472. containerPort: 8080
  473. protocol: TCP
  474. - name: https
  475. containerPort: 8443
  476. protocol: TCP
  477. - name: ping
  478. containerPort: 8888
  479. protocol: TCP
  480. env:
  481. - name: DROOLS_SERVER_FILTER_CLASSES
  482. value: "${DROOLS_SERVER_FILTER_CLASSES}"
  483. - name: KIE_ADMIN_USER
  484. value: "${KIE_ADMIN_USER}"
  485. - name: KIE_ADMIN_PWD
  486. value: "${KIE_ADMIN_PWD}"
  487. - name: KIE_MBEANS
  488. value: "${KIE_MBEANS}"
  489. - name: KIE_SERVER_BYPASS_AUTH_USER
  490. value: "${KIE_SERVER_BYPASS_AUTH_USER}"
  491. - name: KIE_SERVER_CONTROLLER_USER
  492. value: "${KIE_SERVER_MONITOR_USER}"
  493. - name: KIE_SERVER_CONTROLLER_PWD
  494. value: "${KIE_SERVER_MONITOR_PWD}"
  495. - name: KIE_SERVER_CONTROLLER_SERVICE
  496. value: "${KIE_SERVER_MONITOR_SERVICE}"
  497. - name: KIE_SERVER_ID
  498. value: "${KIE_SERVER_ID}"
  499. - name: KIE_SERVER_HOST
  500. valueFrom:
  501. fieldRef:
  502. fieldPath: status.podIP
  503. - name: KIE_SERVER_USER
  504. value: "${KIE_SERVER_USER}"
  505. - name: KIE_SERVER_PWD
  506. value: "${KIE_SERVER_PWD}"
  507. - name: KIE_SERVER_CONTAINER_DEPLOYMENT
  508. value: "${KIE_SERVER_CONTAINER_DEPLOYMENT}"
  509. - name: MAVEN_REPO_URL
  510. value: "${MAVEN_REPO_URL}"
  511. - name: MAVEN_REPO_USERNAME
  512. value: "${MAVEN_REPO_USERNAME}"
  513. - name: MAVEN_REPO_PASSWORD
  514. value: "${MAVEN_REPO_PASSWORD}"
  515. - name: MAVEN_REPO_SERVICE
  516. value: ""
  517. - name: MAVEN_REPO_PATH
  518. value: "/maven2/"
  519. - name: KIE_SERVER_ROUTER_SERVICE
  520. value: "${KIE_SERVER_ROUTER_SERVICE}"
  521. - name: KIE_SERVER_ROUTER_HOST
  522. value: "${KIE_SERVER_ROUTER_HOST}"
  523. - name: KIE_SERVER_ROUTER_PORT
  524. value: "${KIE_SERVER_ROUTER_PORT}"
  525. - name: KIE_SERVER_ROUTER_PROTOCOL
  526. value: "${KIE_SERVER_ROUTER_PROTOCOL}"
  527. - name: KIE_SERVER_PERSISTENCE_DS
  528. value: "${KIE_SERVER_PERSISTENCE_DS}"
  529. - name: DATASOURCES
  530. value: "RHPAM"
  531. - name: RHPAM_DATABASE
  532. value: "${KIE_SERVER_POSTGRESQL_DB}"
  533. - name: RHPAM_JNDI
  534. value: "${KIE_SERVER_PERSISTENCE_DS}"
  535. - name: RHPAM_JTA
  536. value: "true"
  537. ## PostgreSQL driver settings BEGIN
  538. - name: RHPAM_DRIVER
  539. value: "postgresql"
  540. - name: KIE_SERVER_PERSISTENCE_DIALECT
  541. value: "org.hibernate.dialect.PostgreSQLDialect"
  542. - name: RHPAM_TX_ISOLATION
  543. value: "TRANSACTION_READ_COMMITTED"
  544. - name: RHPAM_USERNAME
  545. value: "${KIE_SERVER_POSTGRESQL_USER}"
  546. - name: RHPAM_PASSWORD
  547. value: "${KIE_SERVER_POSTGRESQL_PWD}"
  548. - name: RHPAM_SERVICE_HOST
  549. value: "${APPLICATION_NAME}-postgresql"
  550. - name: RHPAM_SERVICE_PORT
  551. value: "5432"
  552. - name: TIMER_SERVICE_DATA_STORE
  553. value: "${APPLICATION_NAME}-postgresql"
  554. ## PostgreSQL driver settings END
  555. - name: TIMER_SERVICE_DATA_STORE_REFRESH_INTERVAL
  556. value: "${TIMER_SERVICE_DATA_STORE_REFRESH_INTERVAL}"
  557. - name: HTTPS_KEYSTORE_DIR
  558. value: "/etc/kieserver-secret-volume"
  559. - name: HTTPS_KEYSTORE
  560. value: "${KIE_SERVER_HTTPS_KEYSTORE}"
  561. - name: HTTPS_NAME
  562. value: "${KIE_SERVER_HTTPS_NAME}"
  563. - name: HTTPS_PASSWORD
  564. value: "${KIE_SERVER_HTTPS_PASSWORD}"
  565. - name: KIE_SERVER_MGMT_DISABLED
  566. value: "${KIE_SERVER_MGMT_DISABLED}"
  567. - name: KIE_SERVER_STARTUP_STRATEGY
  568. value: "${KIE_SERVER_STARTUP_STRATEGY}"
  569. - name: JGROUPS_PING_PROTOCOL
  570. value: "openshift.DNS_PING"
  571. - name: OPENSHIFT_DNS_PING_SERVICE_NAME
  572. value: "${APPLICATION_NAME}-kieserver-ping"
  573. - name: OPENSHIFT_DNS_PING_SERVICE_PORT
  574. value: "8888"
  575. volumes:
  576. - name: kieserver-keystore-volume
  577. secret:
  578. secretName: "${KIE_SERVER_HTTPS_SECRET}"
  579. ## PostgreSQL deployment config BEGIN
  580. - kind: DeploymentConfig
  581. apiVersion: v1
  582. metadata:
  583. name: "${APPLICATION_NAME}-postgresql"
  584. labels:
  585. application: "${APPLICATION_NAME}"
  586. service: "${APPLICATION_NAME}-postgresql"
  587. spec:
  588. strategy:
  589. type: Recreate
  590. triggers:
  591. - type: ImageChange
  592. imageChangeParams:
  593. automatic: true
  594. containerNames:
  595. - "${APPLICATION_NAME}-postgresql"
  596. from:
  597. kind: ImageStreamTag
  598. namespace: "${IMAGE_STREAM_NAMESPACE}"
  599. name: "postgresql:${POSTGRESQL_IMAGE_STREAM_TAG}"
  600. - type: ConfigChange
  601. replicas: 1
  602. selector:
  603. deploymentConfig: "${APPLICATION_NAME}-postgresql"
  604. template:
  605. metadata:
  606. name: "${APPLICATION_NAME}-postgresql"
  607. labels:
  608. deploymentConfig: "${APPLICATION_NAME}-postgresql"
  609. application: "${APPLICATION_NAME}"
  610. service: "${APPLICATION_NAME}-postgresql"
  611. spec:
  612. terminationGracePeriodSeconds: 60
  613. containers:
  614. - name: "${APPLICATION_NAME}-postgresql"
  615. image: postgresql
  616. imagePullPolicy: Always
  617. ports:
  618. - containerPort: 5432
  619. protocol: TCP
  620. volumeMounts:
  621. - mountPath: "/var/lib/postgresql/data"
  622. name: "${APPLICATION_NAME}-postgresql-pvol"
  623. env:
  624. - name: POSTGRESQL_USER
  625. value: "${KIE_SERVER_POSTGRESQL_USER}"
  626. - name: POSTGRESQL_PASSWORD
  627. value: "${KIE_SERVER_POSTGRESQL_PWD}"
  628. - name: POSTGRESQL_DATABASE
  629. value: "${KIE_SERVER_POSTGRESQL_DB}"
  630. - name: POSTGRESQL_MAX_PREPARED_TRANSACTIONS
  631. value: "${POSTGRESQL_MAX_PREPARED_TRANSACTIONS}"
  632. volumes:
  633. - name: "${APPLICATION_NAME}-postgresql-pvol"
  634. persistentVolumeClaim:
  635. claimName: "${APPLICATION_NAME}-postgresql-claim"
  636. ## PostgreSQL deployment config END
  637. ## PostgreSQL persistent volume claim BEGIN
  638. - apiVersion: v1
  639. kind: PersistentVolumeClaim
  640. metadata:
  641. name: "${APPLICATION_NAME}-postgresql-claim"
  642. labels:
  643. application: "${APPLICATION_NAME}"
  644. service: "${APPLICATION_NAME}-postgresql"
  645. spec:
  646. accessModes:
  647. - ReadWriteOnce
  648. resources:
  649. requests:
  650. storage: "${DB_VOLUME_CAPACITY}"
  651. ## PostgreSQL persistent volume claim END