sso71-mysql-persistent.json 34 KB

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