jws31-tomcat7-mongodb-persistent-s2i.json 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "iconClass": "icon-rh-tomcat",
  7. "openshift.io/provider-display-name": "Red Hat, Inc.",
  8. "tags": "tomcat,tomcat7,java,jboss",
  9. "version": "1.4.14",
  10. "openshift.io/display-name": "JBoss Web Server 3.1 Apache Tomcat 7 + MongoDB (with https)",
  11. "description": "An example JBoss Web Server application with a MongoDB 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 JBoss Web Server 3.1 Apache Tomcat 7 based application, including a build configuration, application deployment configuration, database deployment configuration for MongoDB using persistence and secure communication using https.",
  13. "template.openshift.io/documentation-url": "https://access.redhat.com/documentation/en/red-hat-jboss-web-server/",
  14. "template.openshift.io/support-url": "https://access.redhat.com"
  15. },
  16. "name": "jws31-tomcat7-mongodb-persistent-s2i"
  17. },
  18. "labels": {
  19. "template": "jws31-tomcat7-mongodb-persistent-s2i",
  20. "xpaas": "1.4.14"
  21. },
  22. "message": "A new persistent JWS application for Apache Tomcat 7 (using MongoDB) has been created in your project. The username/password for administering your JWS is ${JWS_ADMIN_USERNAME}/${JWS_ADMIN_PASSWORD}. For accessing the MongoDB database \"${DB_DATABASE}\" use the credentials ${DB_USERNAME}/${DB_PASSWORD} (Admin password is \"${DB_ADMIN_PASSWORD}\"). Please be sure to create the secret named \"${JWS_HTTPS_SECRET}\" containing the ${JWS_HTTPS_CERTIFICATE} file used for serving secure content.",
  23. "parameters": [
  24. {
  25. "displayName": "Application Name",
  26. "description": "The name for the application.",
  27. "name": "APPLICATION_NAME",
  28. "value": "jws-app",
  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.: secure-<application-name>-<project>.<default-domain-suffix>",
  41. "name": "HOSTNAME_HTTPS",
  42. "value": "",
  43. "required": false
  44. },
  45. {
  46. "displayName": "Git Repository URL",
  47. "description": "Git source URI for application",
  48. "name": "SOURCE_REPOSITORY_URL",
  49. "value": "https://github.com/jboss-openshift/openshift-quickstarts",
  50. "required": true
  51. },
  52. {
  53. "displayName": "Git Reference",
  54. "description": "Git branch/tag reference",
  55. "name": "SOURCE_REPOSITORY_REF",
  56. "value": "1.2",
  57. "required": false
  58. },
  59. {
  60. "displayName": "Context Directory",
  61. "description": "Path within Git project to build; empty for root project directory.",
  62. "name": "CONTEXT_DIR",
  63. "value": "todolist/todolist-mongodb",
  64. "required": false
  65. },
  66. {
  67. "displayName": "Database JNDI Name",
  68. "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
  69. "name": "DB_JNDI",
  70. "value": "",
  71. "required": false
  72. },
  73. {
  74. "displayName": "Database Name",
  75. "description": "Database name",
  76. "name": "DB_DATABASE",
  77. "value": "root",
  78. "required": true
  79. },
  80. {
  81. "displayName": "Database Volume Capacity",
  82. "description": "Size of persistent storage for database volume.",
  83. "name": "VOLUME_CAPACITY",
  84. "value": "1Gi",
  85. "required": true
  86. },
  87. {
  88. "displayName": "Secret Name",
  89. "description": "The name of the secret containing the certificate files",
  90. "name": "JWS_HTTPS_SECRET",
  91. "value": "jws-app-secret",
  92. "required": true
  93. },
  94. {
  95. "displayName": "Certificate Name",
  96. "description": "The name of the certificate file within the secret",
  97. "name": "JWS_HTTPS_CERTIFICATE",
  98. "value": "server.crt",
  99. "required": false
  100. },
  101. {
  102. "displayName": "Certificate Key Name",
  103. "description": "The name of the certificate key file within the secret",
  104. "name": "JWS_HTTPS_CERTIFICATE_KEY",
  105. "value": "server.key",
  106. "required": false
  107. },
  108. {
  109. "displayName": "Certificate Password",
  110. "description": "The certificate password",
  111. "name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
  112. "value": "",
  113. "required": false
  114. },
  115. {
  116. "displayName": "Datasource Minimum Pool Size",
  117. "description": "Sets xa-pool/min-pool-size for the configured datasource.",
  118. "name": "DB_MIN_POOL_SIZE",
  119. "required": false
  120. },
  121. {
  122. "displayName": "Datasource Maximum Pool Size",
  123. "description": "Sets xa-pool/max-pool-size for the configured datasource.",
  124. "name": "DB_MAX_POOL_SIZE",
  125. "required": false
  126. },
  127. {
  128. "displayName": "Datasource Transaction Isolation",
  129. "description": "Sets transaction-isolation for the configured datasource.",
  130. "name": "DB_TX_ISOLATION",
  131. "required": false
  132. },
  133. {
  134. "displayName": "MongoDB No Preallocation",
  135. "description": "Disable data file preallocation.",
  136. "name": "MONGODB_NOPREALLOC",
  137. "required": false
  138. },
  139. {
  140. "displayName": "MongoDB Small Files",
  141. "description": "Set MongoDB to use a smaller default data file size.",
  142. "name": "MONGODB_SMALLFILES",
  143. "required": false
  144. },
  145. {
  146. "displayName": "MongoDB Quiet",
  147. "description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
  148. "name": "MONGODB_QUIET",
  149. "required": false
  150. },
  151. {
  152. "displayName": "Database Username",
  153. "description": "Database user name",
  154. "name": "DB_USERNAME",
  155. "from": "user[a-zA-Z0-9]{3}",
  156. "generate": "expression",
  157. "required": true
  158. },
  159. {
  160. "displayName": "Database Password",
  161. "description": "Database user password",
  162. "name": "DB_PASSWORD",
  163. "from": "[a-zA-Z0-9]{8}",
  164. "generate": "expression",
  165. "required": true
  166. },
  167. {
  168. "displayName": "Database admin password",
  169. "description": "Database admin password",
  170. "name": "DB_ADMIN_PASSWORD",
  171. "from": "[a-zA-Z0-9]{8}",
  172. "generate": "expression",
  173. "required": true
  174. },
  175. {
  176. "displayName": "JWS Admin Username",
  177. "description": "JWS Admin User",
  178. "name": "JWS_ADMIN_USERNAME",
  179. "from": "[a-zA-Z0-9]{8}",
  180. "generate": "expression",
  181. "required": true
  182. },
  183. {
  184. "displayName": "JWS Admin Password",
  185. "description": "JWS Admin Password",
  186. "name": "JWS_ADMIN_PASSWORD",
  187. "from": "[a-zA-Z0-9]{8}",
  188. "generate": "expression",
  189. "required": true
  190. },
  191. {
  192. "displayName": "Github Webhook Secret",
  193. "description": "GitHub trigger secret",
  194. "name": "GITHUB_WEBHOOK_SECRET",
  195. "from": "[a-zA-Z0-9]{8}",
  196. "generate": "expression",
  197. "required": true
  198. },
  199. {
  200. "displayName": "Generic Webhook Secret",
  201. "description": "Generic build trigger secret",
  202. "name": "GENERIC_WEBHOOK_SECRET",
  203. "from": "[a-zA-Z0-9]{8}",
  204. "generate": "expression",
  205. "required": true
  206. },
  207. {
  208. "displayName": "ImageStream Namespace",
  209. "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.",
  210. "name": "IMAGE_STREAM_NAMESPACE",
  211. "value": "openshift",
  212. "required": true
  213. },
  214. {
  215. "displayName": "Maven mirror URL",
  216. "description": "Maven mirror to use for S2I builds",
  217. "name": "MAVEN_MIRROR_URL",
  218. "value": "",
  219. "required": false
  220. },
  221. {
  222. "description": "List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.",
  223. "name": "ARTIFACT_DIR",
  224. "value": "",
  225. "required": false
  226. },
  227. {
  228. "displayName": "MongoDB Image Stream Tag",
  229. "description": "The tag to use for the \"mongodb\" image stream. Typically, this aligns with the major.minor version of MongoDB.",
  230. "name": "MONGODB_IMAGE_STREAM_TAG",
  231. "value": "3.2",
  232. "required": true
  233. }
  234. ],
  235. "objects": [
  236. {
  237. "kind": "Service",
  238. "apiVersion": "v1",
  239. "spec": {
  240. "ports": [
  241. {
  242. "port": 8080,
  243. "targetPort": 8080
  244. }
  245. ],
  246. "selector": {
  247. "deploymentConfig": "${APPLICATION_NAME}"
  248. }
  249. },
  250. "metadata": {
  251. "name": "${APPLICATION_NAME}",
  252. "labels": {
  253. "application": "${APPLICATION_NAME}"
  254. },
  255. "annotations": {
  256. "description": "The web server's http port.",
  257. "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-mongodb\", \"kind\": \"Service\"}]"
  258. }
  259. }
  260. },
  261. {
  262. "kind": "Service",
  263. "apiVersion": "v1",
  264. "spec": {
  265. "ports": [
  266. {
  267. "port": 8443,
  268. "targetPort": 8443
  269. }
  270. ],
  271. "selector": {
  272. "deploymentConfig": "${APPLICATION_NAME}"
  273. }
  274. },
  275. "metadata": {
  276. "name": "secure-${APPLICATION_NAME}",
  277. "labels": {
  278. "application": "${APPLICATION_NAME}"
  279. },
  280. "annotations": {
  281. "description": "The web server's https port.",
  282. "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-mongodb\", \"kind\": \"Service\"}]"
  283. }
  284. }
  285. },
  286. {
  287. "kind": "Service",
  288. "apiVersion": "v1",
  289. "spec": {
  290. "ports": [
  291. {
  292. "port": 27017,
  293. "targetPort": 27017
  294. }
  295. ],
  296. "selector": {
  297. "deploymentConfig": "${APPLICATION_NAME}-mongodb"
  298. }
  299. },
  300. "metadata": {
  301. "name": "${APPLICATION_NAME}-mongodb",
  302. "labels": {
  303. "application": "${APPLICATION_NAME}"
  304. },
  305. "annotations": {
  306. "description": "The database server's port."
  307. }
  308. }
  309. },
  310. {
  311. "kind": "Route",
  312. "apiVersion": "v1",
  313. "id": "${APPLICATION_NAME}-http",
  314. "metadata": {
  315. "name": "${APPLICATION_NAME}",
  316. "labels": {
  317. "application": "${APPLICATION_NAME}"
  318. },
  319. "annotations": {
  320. "description": "Route for application's http service."
  321. }
  322. },
  323. "spec": {
  324. "host": "${HOSTNAME_HTTP}",
  325. "to": {
  326. "name": "${APPLICATION_NAME}"
  327. }
  328. }
  329. },
  330. {
  331. "kind": "Route",
  332. "apiVersion": "v1",
  333. "id": "${APPLICATION_NAME}-https",
  334. "metadata": {
  335. "name": "secure-${APPLICATION_NAME}",
  336. "labels": {
  337. "application": "${APPLICATION_NAME}"
  338. },
  339. "annotations": {
  340. "description": "Route for application's https service."
  341. }
  342. },
  343. "spec": {
  344. "host": "${HOSTNAME_HTTPS}",
  345. "to": {
  346. "name": "secure-${APPLICATION_NAME}"
  347. },
  348. "tls": {
  349. "termination": "passthrough"
  350. }
  351. }
  352. },
  353. {
  354. "kind": "ImageStream",
  355. "apiVersion": "v1",
  356. "metadata": {
  357. "name": "${APPLICATION_NAME}",
  358. "labels": {
  359. "application": "${APPLICATION_NAME}"
  360. }
  361. }
  362. },
  363. {
  364. "kind": "BuildConfig",
  365. "apiVersion": "v1",
  366. "metadata": {
  367. "name": "${APPLICATION_NAME}",
  368. "labels": {
  369. "application": "${APPLICATION_NAME}"
  370. }
  371. },
  372. "spec": {
  373. "source": {
  374. "type": "Git",
  375. "git": {
  376. "uri": "${SOURCE_REPOSITORY_URL}",
  377. "ref": "${SOURCE_REPOSITORY_REF}"
  378. },
  379. "contextDir": "${CONTEXT_DIR}"
  380. },
  381. "strategy": {
  382. "type": "Source",
  383. "sourceStrategy": {
  384. "env": [
  385. {
  386. "name": "MAVEN_MIRROR_URL",
  387. "value": "${MAVEN_MIRROR_URL}"
  388. },
  389. {
  390. "name": "ARTIFACT_DIR",
  391. "value": "${ARTIFACT_DIR}"
  392. }
  393. ],
  394. "forcePull": true,
  395. "from": {
  396. "kind": "ImageStreamTag",
  397. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  398. "name": "jboss-webserver31-tomcat7-openshift:1.2"
  399. }
  400. }
  401. },
  402. "output": {
  403. "to": {
  404. "kind": "ImageStreamTag",
  405. "name": "${APPLICATION_NAME}:latest"
  406. }
  407. },
  408. "triggers": [
  409. {
  410. "type": "GitHub",
  411. "github": {
  412. "secret": "${GITHUB_WEBHOOK_SECRET}"
  413. }
  414. },
  415. {
  416. "type": "Generic",
  417. "generic": {
  418. "secret": "${GENERIC_WEBHOOK_SECRET}"
  419. }
  420. },
  421. {
  422. "type": "ImageChange",
  423. "imageChange": {}
  424. },
  425. {
  426. "type": "ConfigChange"
  427. }
  428. ]
  429. }
  430. },
  431. {
  432. "kind": "DeploymentConfig",
  433. "apiVersion": "v1",
  434. "metadata": {
  435. "name": "${APPLICATION_NAME}",
  436. "labels": {
  437. "application": "${APPLICATION_NAME}"
  438. }
  439. },
  440. "spec": {
  441. "strategy": {
  442. "type": "Recreate"
  443. },
  444. "triggers": [
  445. {
  446. "type": "ImageChange",
  447. "imageChangeParams": {
  448. "automatic": true,
  449. "containerNames": [
  450. "${APPLICATION_NAME}"
  451. ],
  452. "from": {
  453. "kind": "ImageStreamTag",
  454. "name": "${APPLICATION_NAME}:latest"
  455. }
  456. }
  457. },
  458. {
  459. "type": "ConfigChange"
  460. }
  461. ],
  462. "replicas": 1,
  463. "selector": {
  464. "deploymentConfig": "${APPLICATION_NAME}"
  465. },
  466. "template": {
  467. "metadata": {
  468. "name": "${APPLICATION_NAME}",
  469. "labels": {
  470. "deploymentConfig": "${APPLICATION_NAME}",
  471. "application": "${APPLICATION_NAME}"
  472. }
  473. },
  474. "spec": {
  475. "terminationGracePeriodSeconds": 60,
  476. "containers": [
  477. {
  478. "name": "${APPLICATION_NAME}",
  479. "image": "${APPLICATION_NAME}",
  480. "imagePullPolicy": "Always",
  481. "readinessProbe": {
  482. "exec": {
  483. "command": [
  484. "/bin/bash",
  485. "-c",
  486. "curl --noproxy '*' -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'"
  487. ]
  488. }
  489. },
  490. "volumeMounts": [
  491. {
  492. "name": "jws-certificate-volume",
  493. "mountPath": "/etc/jws-secret-volume",
  494. "readOnly": true
  495. }
  496. ],
  497. "ports": [
  498. {
  499. "name": "jolokia",
  500. "containerPort": 8778,
  501. "protocol": "TCP"
  502. },
  503. {
  504. "name": "http",
  505. "containerPort": 8080,
  506. "protocol": "TCP"
  507. },
  508. {
  509. "name": "https",
  510. "containerPort": 8443,
  511. "protocol": "TCP"
  512. }
  513. ],
  514. "env": [
  515. {
  516. "name": "DB_SERVICE_PREFIX_MAPPING",
  517. "value": "${APPLICATION_NAME}-mongodb=DB"
  518. },
  519. {
  520. "name": "DB_JNDI",
  521. "value": "${DB_JNDI}"
  522. },
  523. {
  524. "name": "DB_USERNAME",
  525. "value": "${DB_USERNAME}"
  526. },
  527. {
  528. "name": "DB_PASSWORD",
  529. "value": "${DB_PASSWORD}"
  530. },
  531. {
  532. "name": "DB_DATABASE",
  533. "value": "${DB_DATABASE}"
  534. },
  535. {
  536. "name": "DB_ADMIN_PASSWORD",
  537. "value": "${DB_ADMIN_PASSWORD}"
  538. },
  539. {
  540. "name": "DB_MIN_POOL_SIZE",
  541. "value": "${DB_MIN_POOL_SIZE}"
  542. },
  543. {
  544. "name": "DB_MAX_POOL_SIZE",
  545. "value": "${DB_MAX_POOL_SIZE}"
  546. },
  547. {
  548. "name": "DB_TX_ISOLATION",
  549. "value": "${DB_TX_ISOLATION}"
  550. },
  551. {
  552. "name": "JWS_HTTPS_CERTIFICATE_DIR",
  553. "value": "/etc/jws-secret-volume"
  554. },
  555. {
  556. "name": "JWS_HTTPS_CERTIFICATE",
  557. "value": "${JWS_HTTPS_CERTIFICATE}"
  558. },
  559. {
  560. "name": "JWS_HTTPS_CERTIFICATE_KEY",
  561. "value": "${JWS_HTTPS_CERTIFICATE_KEY}"
  562. },
  563. {
  564. "name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
  565. "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}"
  566. },
  567. {
  568. "name": "JWS_ADMIN_USERNAME",
  569. "value": "${JWS_ADMIN_USERNAME}"
  570. },
  571. {
  572. "name": "JWS_ADMIN_PASSWORD",
  573. "value": "${JWS_ADMIN_PASSWORD}"
  574. }
  575. ]
  576. }
  577. ],
  578. "volumes": [
  579. {
  580. "name": "jws-certificate-volume",
  581. "secret": {
  582. "secretName": "${JWS_HTTPS_SECRET}"
  583. }
  584. }
  585. ]
  586. }
  587. }
  588. }
  589. },
  590. {
  591. "kind": "DeploymentConfig",
  592. "apiVersion": "v1",
  593. "metadata": {
  594. "name": "${APPLICATION_NAME}-mongodb",
  595. "labels": {
  596. "application": "${APPLICATION_NAME}"
  597. }
  598. },
  599. "spec": {
  600. "strategy": {
  601. "type": "Recreate"
  602. },
  603. "triggers": [
  604. {
  605. "type": "ImageChange",
  606. "imageChangeParams": {
  607. "automatic": true,
  608. "containerNames": [
  609. "${APPLICATION_NAME}-mongodb"
  610. ],
  611. "from": {
  612. "kind": "ImageStreamTag",
  613. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  614. "name": "mongodb:${MONGODB_IMAGE_STREAM_TAG}"
  615. }
  616. }
  617. },
  618. {
  619. "type": "ConfigChange"
  620. }
  621. ],
  622. "replicas": 1,
  623. "selector": {
  624. "deploymentConfig": "${APPLICATION_NAME}-mongodb"
  625. },
  626. "template": {
  627. "metadata": {
  628. "name": "${APPLICATION_NAME}-mongodb",
  629. "labels": {
  630. "deploymentConfig": "${APPLICATION_NAME}-mongodb",
  631. "application": "${APPLICATION_NAME}"
  632. }
  633. },
  634. "spec": {
  635. "terminationGracePeriodSeconds": 60,
  636. "containers": [
  637. {
  638. "name": "${APPLICATION_NAME}-mongodb",
  639. "image": "mongodb",
  640. "imagePullPolicy": "Always",
  641. "ports": [
  642. {
  643. "containerPort": 27017,
  644. "protocol": "TCP"
  645. }
  646. ],
  647. "readinessProbe": {
  648. "timeoutSeconds": 1,
  649. "initialDelaySeconds": 3,
  650. "exec": {
  651. "command": [ "/bin/sh", "-i", "-c", "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\""]
  652. }
  653. },
  654. "livenessProbe": {
  655. "timeoutSeconds": 1,
  656. "initialDelaySeconds": 30,
  657. "tcpSocket": {
  658. "port": 27017
  659. }
  660. },
  661. "volumeMounts": [
  662. {
  663. "mountPath": "/var/lib/mongodb/data",
  664. "name": "${APPLICATION_NAME}-mongodb-pvol"
  665. }
  666. ],
  667. "env": [
  668. {
  669. "name": "MONGODB_USER",
  670. "value": "${DB_USERNAME}"
  671. },
  672. {
  673. "name": "MONGODB_PASSWORD",
  674. "value": "${DB_PASSWORD}"
  675. },
  676. {
  677. "name": "MONGODB_DATABASE",
  678. "value": "${DB_DATABASE}"
  679. },
  680. {
  681. "name": "MONGODB_ADMIN_PASSWORD",
  682. "value": "${DB_ADMIN_PASSWORD}"
  683. },
  684. {
  685. "name": "MONGODB_NOPREALLOC",
  686. "value": "${MONGODB_NOPREALLOC}"
  687. },
  688. {
  689. "name": "MONGODB_SMALLFILES",
  690. "value": "${MONGODB_SMALLFILES}"
  691. },
  692. {
  693. "name": "MONGODB_QUIET",
  694. "value": "${MONGODB_QUIET}"
  695. }
  696. ]
  697. }
  698. ],
  699. "volumes": [
  700. {
  701. "name": "${APPLICATION_NAME}-mongodb-pvol",
  702. "persistentVolumeClaim": {
  703. "claimName": "${APPLICATION_NAME}-mongodb-claim"
  704. }
  705. }
  706. ]
  707. }
  708. }
  709. }
  710. },
  711. {
  712. "apiVersion": "v1",
  713. "kind": "PersistentVolumeClaim",
  714. "metadata": {
  715. "name": "${APPLICATION_NAME}-mongodb-claim",
  716. "labels": {
  717. "application": "${APPLICATION_NAME}"
  718. }
  719. },
  720. "spec": {
  721. "accessModes": [
  722. "ReadWriteOnce"
  723. ],
  724. "resources": {
  725. "requests": {
  726. "storage": "${VOLUME_CAPACITY}"
  727. }
  728. }
  729. }
  730. }
  731. ]
  732. }