sso71-mysql-persistent.json 34 KB

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