diff --git a/mongodb-pmm-credentials-secret.yaml b/mongodb-pmm-credentials-secret.yaml new file mode 100644 index 0000000..104cc1c --- /dev/null +++ b/mongodb-pmm-credentials-secret.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: mongodb-pmm-credentials +data: + pmm-mongodb-username: cG1t + pmm-mongodb-password: azhQRUJBTUs1TFl0akt2WVJaWVE= + pmm-agent-server-username: cG1t + pmm-agent-server-password: c1h4ZWZtdnR6YVNKNEpiMDFnak0= +type: Opaque diff --git a/mongodb-sharded/.helmignore b/mongodb-sharded/.helmignore new file mode 100644 index 0000000..1833c1b --- /dev/null +++ b/mongodb-sharded/.helmignore @@ -0,0 +1,25 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +# img folder +img/ +# Changelog +CHANGELOG.md diff --git a/mongodb-sharded/CHANGELOG.md b/mongodb-sharded/CHANGELOG.md new file mode 100644 index 0000000..28588dc --- /dev/null +++ b/mongodb-sharded/CHANGELOG.md @@ -0,0 +1,1467 @@ +# Changelog + +## 9.4.12 (2025-08-21) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references ([#36167](https://github.com/bitnami/charts/pull/36167)) + +## 9.4.11 (2025-08-15) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#35990) ([9142685](https://github.com/bitnami/charts/commit/91426851b498a46bf6b1aa120479d689043077fd)), closes [#35990](https://github.com/bitnami/charts/issues/35990) + +## 9.4.10 (2025-08-13) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#35819) ([45b0ce5](https://github.com/bitnami/charts/commit/45b0ce5ded33857ec0e09238be9fb00ae25eb489)), closes [#35819](https://github.com/bitnami/charts/issues/35819) + +## 9.4.9 (2025-08-08) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#35704) ([471d0c7](https://github.com/bitnami/charts/commit/471d0c79dfc6841dcbd02ba3328b4d057cbe4848)), closes [#35704](https://github.com/bitnami/charts/issues/35704) + +## 9.4.8 (2025-08-07) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#35623) ([e9ea8d6](https://github.com/bitnami/charts/commit/e9ea8d61cf462837749fce2c9451af44d257df32)), closes [#35623](https://github.com/bitnami/charts/issues/35623) + +## 9.4.7 (2025-08-07) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#35595) ([3ea04e8](https://github.com/bitnami/charts/commit/3ea04e8e9baa055d386366aed6529d67b1770f2e)), closes [#35595](https://github.com/bitnami/charts/issues/35595) + +## 9.4.6 (2025-08-07) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#35507) ([82aeffb](https://github.com/bitnami/charts/commit/82aeffb315ba75da60f5fb800d0b2c1b5bbb63a3)), closes [#35507](https://github.com/bitnami/charts/issues/35507) + +## 9.4.5 (2025-07-31) + +* [bitnami/*] docs: update BSI warning on charts' notes (#35340) ([07483a5](https://github.com/bitnami/charts/commit/07483a5ed964b409266dc025e4b55bf2eb0f621c)), closes [#35340](https://github.com/bitnami/charts/issues/35340) +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#35367) ([fabdf0b](https://github.com/bitnami/charts/commit/fabdf0b5acb5b69eec68bbfb558d770e0db284e7)), closes [#35367](https://github.com/bitnami/charts/issues/35367) + +## 9.4.4 (2025-07-23) + +* [bitnami/*] Adapt main README and change ascii (#35173) ([73d15e0](https://github.com/bitnami/charts/commit/73d15e03e04647efa902a1d14a09ea8657429cd0)), closes [#35173](https://github.com/bitnami/charts/issues/35173) +* [bitnami/*] Adapt welcome message to BSI (#35170) ([e1c8146](https://github.com/bitnami/charts/commit/e1c8146831516fb35de736a6f3fd10e5e7a44286)), closes [#35170](https://github.com/bitnami/charts/issues/35170) +* [bitnami/*] Add BSI to charts' READMEs (#35174) ([4973fd0](https://github.com/bitnami/charts/commit/4973fd08dd7e95398ddcc4054538023b542e19f2)), closes [#35174](https://github.com/bitnami/charts/issues/35174) +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#35267) ([1c7c0c4](https://github.com/bitnami/charts/commit/1c7c0c4bb955c4f607b9a407c1b1ea929052afdd)), closes [#35267](https://github.com/bitnami/charts/issues/35267) + +## 9.4.3 (2025-07-15) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#35105) ([8883884](https://github.com/bitnami/charts/commit/8883884c66f2935edde0ece1f486ed7cf35aa810)), closes [#35105](https://github.com/bitnami/charts/issues/35105) + +## 9.4.2 (2025-07-09) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#34937) ([c476b81](https://github.com/bitnami/charts/commit/c476b81fc612ddc6ed2b7256f77eacf34915013a)), closes [#34937](https://github.com/bitnami/charts/issues/34937) + +## 9.4.1 (2025-06-27) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#34698) ([d5864a5](https://github.com/bitnami/charts/commit/d5864a5e45ef67acfc09fc4d94c1ef38838cd4f1)), closes [#34698](https://github.com/bitnami/charts/issues/34698) + +## 9.4.0 (2025-06-24) + +* [bitnami/mongodb-sharded] predictable port number for metrics (#34439) ([0ec66e0](https://github.com/bitnami/charts/commit/0ec66e0712cea64de3afbc6e433664a2d8e9672c)), closes [#34439](https://github.com/bitnami/charts/issues/34439) + +## 9.3.6 (2025-06-16) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#34470) ([48aee76](https://github.com/bitnami/charts/commit/48aee76d89b5bbaebcc6d4a9d585b3599e0892ed)), closes [#34470](https://github.com/bitnami/charts/issues/34470) + +## 9.3.5 (2025-06-06) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#34197) ([4eb7b44](https://github.com/bitnami/charts/commit/4eb7b44a3f4ca9ac2c35a0897db2c8641b28f214)), closes [#34197](https://github.com/bitnami/charts/issues/34197) + +## 9.3.4 (2025-06-05) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#34115) ([bf8cd69](https://github.com/bitnami/charts/commit/bf8cd69e4e9fabee42eabdad3d0f4d50e9c2ad5e)), closes [#34115](https://github.com/bitnami/charts/issues/34115) + +## 9.3.3 (2025-06-04) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#34084) ([c24f869](https://github.com/bitnami/charts/commit/c24f869dc90c0ba2030304aa06b60b5c4f1244c6)), closes [#34084](https://github.com/bitnami/charts/issues/34084) + +## 9.3.2 (2025-06-03) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#34055) ([c1d1d77](https://github.com/bitnami/charts/commit/c1d1d77cb2671c03736fc534bac36b4889038bac)), closes [#34055](https://github.com/bitnami/charts/issues/34055) + +## 9.3.1 (2025-06-02) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#34033) ([d4f0675](https://github.com/bitnami/charts/commit/d4f067510c7eab577a1f02f4158603c90770f767)), closes [#34033](https://github.com/bitnami/charts/issues/34033) + +## 9.3.0 (2025-05-23) + +* [bitnami/mongodb-sharded] allow selector definitions for volumeClaimTemplates (#33574) ([8250811](https://github.com/bitnami/charts/commit/82508118e303da80196874242fb82d2ca32c1add)), closes [#33574](https://github.com/bitnami/charts/issues/33574) + +## 9.2.7 (2025-05-22) + +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#33820) ([933035b](https://github.com/bitnami/charts/commit/933035b248eec8383069a4601616545c24066ed6)), closes [#33820](https://github.com/bitnami/charts/issues/33820) + +## 9.2.6 (2025-05-15) + +* [bitnami/kubeapps] Deprecation followup (#33579) ([77e312c](https://github.com/bitnami/charts/commit/77e312c1772d4d7c4dc5d3ac0e80f4e452e3a062)), closes [#33579](https://github.com/bitnami/charts/issues/33579) +* [bitnami/mongodb-sharded] :zap: :arrow_up: Update dependency references (#33638) ([3e654df](https://github.com/bitnami/charts/commit/3e654dfd3e3d86723b6f56ae14418b0dbd649559)), closes [#33638](https://github.com/bitnami/charts/issues/33638) + +## 9.2.5 (2025-05-06) + +* [bitnami/mongodb-sharded] chore: :recycle: :arrow_up: Update common and remove k8s < 1.23 references ([07e1ed1](https://github.com/bitnami/charts/commit/07e1ed1be815ad1edd28babc745ef230ece66c31)), closes [#33406](https://github.com/bitnami/charts/issues/33406) + +## 9.2.4 (2025-05-01) + +* [bitnami/mongodb-sharded] Release 9.2.4 (#33285) ([7f09123](https://github.com/bitnami/charts/commit/7f0912397bd85bef38951545f9fefd1b15a815a0)), closes [#33285](https://github.com/bitnami/charts/issues/33285) + +## 9.2.3 (2025-04-14) + +* [bitnami/mongodb-sharded] Release 9.2.3 (#32994) ([0217276](https://github.com/bitnami/charts/commit/0217276dd5d063a65c8b327c3641cdcc44e185eb)), closes [#32994](https://github.com/bitnami/charts/issues/32994) + +## 9.2.2 (2025-04-02) + +* [bitnami/mongodb-sharded] Release 9.2.2 (#32751) ([828a6e1](https://github.com/bitnami/charts/commit/828a6e12d079ff09cc34f1ec26f4c2a929f04e7c)), closes [#32751](https://github.com/bitnami/charts/issues/32751) + +## 9.2.1 (2025-03-21) + +* [bitnami/*] Add tanzuCategory annotation (#32409) ([a8fba5c](https://github.com/bitnami/charts/commit/a8fba5cb01f6f4464ca7f69c50b0fbe97d837a95)), closes [#32409](https://github.com/bitnami/charts/issues/32409) +* [bitnami/mongodb-sharded] Release 9.2.1 (#32550) ([73a090e](https://github.com/bitnami/charts/commit/73a090eab45cd85a0623bb50906b3ae4d1d3c366)), closes [#32550](https://github.com/bitnami/charts/issues/32550) + +## 9.2.0 (2025-02-27) + +* [bitnami/mongodb-sharded] Set `usePasswordFiles=true` by default (#32112) ([6c1ce79](https://github.com/bitnami/charts/commit/6c1ce79e1f9dcd194f101ee60b85fd41b16971f2)), closes [#32112](https://github.com/bitnami/charts/issues/32112) + +## 9.1.3 (2025-02-21) + +* [bitnami/*] Use CDN url for the Bitnami Application Icons (#31881) ([d9bb11a](https://github.com/bitnami/charts/commit/d9bb11a9076b9bfdcc70ea022c25ef50e9713657)), closes [#31881](https://github.com/bitnami/charts/issues/31881) +* [bitnami/mongodb-sharded] Release 9.1.3 (#32134) ([65a30fa](https://github.com/bitnami/charts/commit/65a30fab023ed5b9d85d9bf80b435237c7a04226)), closes [#32134](https://github.com/bitnami/charts/issues/32134) + +## 9.1.2 (2025-02-03) + +* [bitnami/mongodb-sharded] Release 9.1.2 (#31698) ([ae3a2f2](https://github.com/bitnami/charts/commit/ae3a2f21844f4a2f585800ae5b21e7c731fa96fa)), closes [#31698](https://github.com/bitnami/charts/issues/31698) +* Update copyright year (#31682) ([e9f02f5](https://github.com/bitnami/charts/commit/e9f02f5007068751f7eb2270fece811e685c99b6)), closes [#31682](https://github.com/bitnami/charts/issues/31682) + +## 9.1.1 (2025-01-15) + +* [bitnami/*] Fix typo in README (#31052) ([b41a51d](https://github.com/bitnami/charts/commit/b41a51d1bd04841fc108b78d3b8357a5292771c8)), closes [#31052](https://github.com/bitnami/charts/issues/31052) +* [bitnami/mongodb-sharded] Release 9.1.1 (#31389) ([3792427](https://github.com/bitnami/charts/commit/379242754da4f52c1d5cecfa6746124c75341fe5)), closes [#31389](https://github.com/bitnami/charts/issues/31389) + +## 9.1.0 (2024-12-10) + +* [bitnami/*] Add Bitnami Premium to NOTES.txt (#30854) ([3dfc003](https://github.com/bitnami/charts/commit/3dfc00376df6631f0ce54b8d440d477f6caa6186)), closes [#30854](https://github.com/bitnami/charts/issues/30854) +* [bitnami/mongodb-sharded] Detect non-standard images (#30927) ([3c8ef42](https://github.com/bitnami/charts/commit/3c8ef421a131f3c69c1bf6b95bbae8d1c7ef6b31)), closes [#30927](https://github.com/bitnami/charts/issues/30927) + +## 9.0.5 (2024-12-06) + +* [bitnami/mongodb-sharded] Release 9.0.5 (#30821) ([c926860](https://github.com/bitnami/charts/commit/c926860fff55e3718ed34b0b99b9196fd4331917)), closes [#30821](https://github.com/bitnami/charts/issues/30821) + +## 9.0.4 (2024-12-04) + +* [bitnami/*] docs: :memo: Add "Backup & Restore" section (#30711) ([35ab536](https://github.com/bitnami/charts/commit/35ab5363741e7548f4076f04da6e62d10153c60c)), closes [#30711](https://github.com/bitnami/charts/issues/30711) +* [bitnami/*] docs: :memo: Add "Prometheus metrics" (batch 4) (#30669) ([a4ec006](https://github.com/bitnami/charts/commit/a4ec00624589023a70a7094fcfb9f12e382bc280)), closes [#30669](https://github.com/bitnami/charts/issues/30669) +* [bitnami/*] docs: :memo: Add "Update Credentials" (batch 3) (#30688) ([10a49f9](https://github.com/bitnami/charts/commit/10a49f9ff2db1d9d11a6edd1c40a9f61803241bc)), closes [#30688](https://github.com/bitnami/charts/issues/30688) +* [bitnami/*] Remove wrong comment about imagePullPolicy (#30107) ([a51f9e4](https://github.com/bitnami/charts/commit/a51f9e4bb0fbf77199512d35de7ac8abe055d026)), closes [#30107](https://github.com/bitnami/charts/issues/30107) +* [bitnami/mongodb-sharded] Release 9.0.4 (#30787) ([c3af04c](https://github.com/bitnami/charts/commit/c3af04cdff0ee39614f9da280ab4731aec555968)), closes [#30787](https://github.com/bitnami/charts/issues/30787) + +## 9.0.3 (2024-10-26) + +* [bitnami/mongodb-sharded] Release 9.0.3 (#30088) ([a54742d](https://github.com/bitnami/charts/commit/a54742d636d66d841a3be0133f0ae2f368ae416b)), closes [#30088](https://github.com/bitnami/charts/issues/30088) +* Update documentation links to techdocs.broadcom.com (#29931) ([f0d9ad7](https://github.com/bitnami/charts/commit/f0d9ad78f39f633d275fc576d32eae78ded4d0b8)), closes [#29931](https://github.com/bitnami/charts/issues/29931) + +## 9.0.2 (2024-10-09) + +* [bitnami/mongodb-sharded] Release 9.0.2 (#29854) ([1eff071](https://github.com/bitnami/charts/commit/1eff071db3ea82d88961566d4120a9b51bb3887d)), closes [#29854](https://github.com/bitnami/charts/issues/29854) + +## 9.0.1 (2024-10-08) + +* [bitnami/mongodb-sharded] Release 9.0.1 (#29829) ([98bbc94](https://github.com/bitnami/charts/commit/98bbc94cbf695b84dacd75bcf6110fefd00244a6)), closes [#29829](https://github.com/bitnami/charts/issues/29829) +* [bitnami/mongodb] Update README (#29812) ([6f8a1bf](https://github.com/bitnami/charts/commit/6f8a1bf241a0032a3e44a2ea47f9574f6786d436)), closes [#29812](https://github.com/bitnami/charts/issues/29812) + +## 9.0.0 (2024-10-07) + +* [bitnami/mongodb-sharded] Release 9.0.0 (#29802) ([0f15049](https://github.com/bitnami/charts/commit/0f15049eae01dd4fb989546e1627a96dd0008359)), closes [#29802](https://github.com/bitnami/charts/issues/29802) + +## 8.3.9 (2024-10-05) + +* [bitnami/mongodb-sharded] Release 8.3.9 (#29785) ([e23d06a](https://github.com/bitnami/charts/commit/e23d06a7a7e4b30f4eadcb8bc35ea47ae621342e)), closes [#29785](https://github.com/bitnami/charts/issues/29785) + +## 8.3.8 (2024-09-30) + +* [bitnami/mongodb-sharded] Fix uncapacity to disable persistence (#29599) ([9666bc1](https://github.com/bitnami/charts/commit/9666bc1ffe5959f3ddee62d124f79ad1aee71769)), closes [#29599](https://github.com/bitnami/charts/issues/29599) + +## 8.3.7 (2024-09-11) + +* [bitnami/mongodb-sharded] Changed to use namespaceOverride value when defining primaryhost in config ([2244aef](https://github.com/bitnami/charts/commit/2244aefaff5e48f8b708c2d0b9592e6802ceb6b1)), closes [#29145](https://github.com/bitnami/charts/issues/29145) + +## 8.3.6 (2024-08-26) + +* [bitnami/mongodb-sharded] Release 8.3.6 (#29028) ([bc3ab9f](https://github.com/bitnami/charts/commit/bc3ab9fbfc042c1c4a17fe069b284bf0616c42dc)), closes [#29028](https://github.com/bitnami/charts/issues/29028) + +## 8.3.5 (2024-08-20) + +* [bitnami/mongodb-sharded]Ginkgo tests: Use rollout instead of scale down (#28937) ([698baac](https://github.com/bitnami/charts/commit/698baac23bdd0f35da136ed7386b26ad7a6ea3bc)), closes [#28937](https://github.com/bitnami/charts/issues/28937) + +## 8.3.4 (2024-07-25) + +* [bitnami/mongodb-sharded] Release 8.3.4 (#28476) ([a0f15d4](https://github.com/bitnami/charts/commit/a0f15d4092aab507d6a2e98f457bda516f5caf80)), closes [#28476](https://github.com/bitnami/charts/issues/28476) + +## 8.3.3 (2024-07-24) + +* [bitnami/mongodb-sharded] Release 8.3.3 (#28324) ([cc102ed](https://github.com/bitnami/charts/commit/cc102ed5dc00e4e755c7c467214debb4a8c31dc6)), closes [#28324](https://github.com/bitnami/charts/issues/28324) + +## 8.3.2 (2024-07-16) + +* [bitnami/mongodb-sharded] Global StorageClass as default value (#28062) ([d432ce0](https://github.com/bitnami/charts/commit/d432ce00fd96cc8b19f482467543dee2519e1b1d)), closes [#28062](https://github.com/bitnami/charts/issues/28062) + +## 8.3.1 (2024-06-29) + +* [bitnami/mongodb-sharded] Release 8.3.1 (#27591) ([d572425](https://github.com/bitnami/charts/commit/d57242503ec47daca1a284e6cbdaa039383347db)), closes [#27591](https://github.com/bitnami/charts/issues/27591) + +## 8.3.0 (2024-06-28) + +* [bitnami/*] Update README changing TAC wording (#27530) ([52dfed6](https://github.com/bitnami/charts/commit/52dfed6bac44d791efabfaf06f15daddc4fefb0c)), closes [#27530](https://github.com/bitnami/charts/issues/27530) +* [bitnami/mongodb-sharded] Support for persistent volume retention policies (#27512) ([df93121](https://github.com/bitnami/charts/commit/df93121fb40abcdaf4b3b12cd213c27d9f1b4e3f)), closes [#27512](https://github.com/bitnami/charts/issues/27512) + +## 8.2.8 (2024-06-18) + +* [bitnami/mongodb-sharded] Release 8.2.8 (#27383) ([99030f3](https://github.com/bitnami/charts/commit/99030f353001393d321297c9295105b7c5c56ffb)), closes [#27383](https://github.com/bitnami/charts/issues/27383) + +## 8.2.7 (2024-06-17) + +* [bitnami/mongodb-sharded] Release 8.2.7 (#27316) ([89ef0cf](https://github.com/bitnami/charts/commit/89ef0cf930a22e4338ecf36fbb29221f00ca08cc)), closes [#27316](https://github.com/bitnami/charts/issues/27316) + +## 8.2.6 (2024-06-17) + +* [bitnami/mongodb-sharded] Release 8.2.6 (#27252) ([cd07b41](https://github.com/bitnami/charts/commit/cd07b41777df273758467d3e3b8406d84650459e)), closes [#27252](https://github.com/bitnami/charts/issues/27252) + +## 8.2.5 (2024-06-06) + +* [bitnami/mongodb-sharded] Release 8.2.5 (#26986) ([52cc943](https://github.com/bitnami/charts/commit/52cc943e0c09b75180611b2613a121ed724457dc)), closes [#26986](https://github.com/bitnami/charts/issues/26986) + +## 8.2.4 (2024-06-04) + +* [bitnami/mongodb-sharded] Bump chart version (#26651) ([36e571f](https://github.com/bitnami/charts/commit/36e571fecd941a118f5605ba0ab9280cd4f67977)), closes [#26651](https://github.com/bitnami/charts/issues/26651) + +## 8.2.3 (2024-05-31) + +* [bitnami/mongodb-sharded] Fix mongos livenessProbe (#26566) ([274aecb](https://github.com/bitnami/charts/commit/274aecb28ebecabbe5c7eaeb9fa7695af3d5b89f)), closes [#26566](https://github.com/bitnami/charts/issues/26566) + +## 8.2.2 (2024-05-28) + +* [bitnami/mongodb-sharded] Release 8.2.2 (#26480) ([673962c](https://github.com/bitnami/charts/commit/673962cb934f1899372497ae3964a5c6913b42df)), closes [#26480](https://github.com/bitnami/charts/issues/26480) + +## 8.2.1 (2024-05-22) + +* [bitnami/mongodb-sharded] Use different liveness/readiness probes (#26153) ([6fb0875](https://github.com/bitnami/charts/commit/6fb0875eeac4a0a8ff184b1fa7c1d9c382d5ef64)), closes [#26153](https://github.com/bitnami/charts/issues/26153) + +## 8.2.0 (2024-05-21) + +* [bitnami/mongodb-sharded] feat: :sparkles: :lock: Add warning when original images are replaced (#26 ([462a80f](https://github.com/bitnami/charts/commit/462a80fb8fbad62899d601a91efed3f40cb26321)), closes [#26248](https://github.com/bitnami/charts/issues/26248) + +## 8.1.0 (2024-05-21) + +* [bitnami/*] ci: :construction_worker: Add tag and changelog support (#25359) ([91c707c](https://github.com/bitnami/charts/commit/91c707c9e4e574725a09505d2d313fb93f1b4c0a)), closes [#25359](https://github.com/bitnami/charts/issues/25359) +* [bitnami/mongodb-sharded] PDB review (#26156) ([e2584c8](https://github.com/bitnami/charts/commit/e2584c81c1c286e4cf2df77318fd9517d16755af)), closes [#26156](https://github.com/bitnami/charts/issues/26156) + +## 8.0.8 (2024-05-18) + +* [bitnami/mongodb-sharded] Release 8.0.8 updating components versions (#26049) ([d9ab530](https://github.com/bitnami/charts/commit/d9ab5305f6bbb1a8d59f04209340708f50aa773d)), closes [#26049](https://github.com/bitnami/charts/issues/26049) + +## 8.0.7 (2024-05-14) + +* [bitnami/*] Change non-root and rolling-tags doc URLs (#25628) ([b067c94](https://github.com/bitnami/charts/commit/b067c94f6bcde427863c197fd355f0b5ba12ff5b)), closes [#25628](https://github.com/bitnami/charts/issues/25628) +* [bitnami/*] Set new header/owner (#25558) ([8d1dc11](https://github.com/bitnami/charts/commit/8d1dc11f5fb30db6fba50c43d7af59d2f79deed3)), closes [#25558](https://github.com/bitnami/charts/issues/25558) +* [bitnami/mongodb-sharded] Release 8.0.7 updating components versions (#25848) ([10394ca](https://github.com/bitnami/charts/commit/10394ca55ce6ba0d29332b824a78b9973cc407ec)), closes [#25848](https://github.com/bitnami/charts/issues/25848) + +## 8.0.6 (2024-04-27) + +* [bitnami/mongodb-sharded] Release 8.0.6 updating components versions (#25432) ([56a8692](https://github.com/bitnami/charts/commit/56a8692dc464dbd0c6e56496b0695d92c4395cce)), closes [#25432](https://github.com/bitnami/charts/issues/25432) +* [bitnami/multiple charts] Fix typo: "NetworkPolice" vs "NetworkPolicy" (#25348) ([6970c1b](https://github.com/bitnami/charts/commit/6970c1ba245873506e73d459c6eac1e4919b778f)), closes [#25348](https://github.com/bitnami/charts/issues/25348) +* Replace VMware by Broadcom copyright text (#25306) ([a5e4bd0](https://github.com/bitnami/charts/commit/a5e4bd0e35e419203793976a78d9d0a13de92c76)), closes [#25306](https://github.com/bitnami/charts/issues/25306) + +## 8.0.5 (2024-04-09) + +* [bitnami/mongodb-sharded] Release 8.0.5 updating components versions (#25083) ([a692196](https://github.com/bitnami/charts/commit/a692196dc30ba8e6fcd5a540f3f4311b41beba3d)), closes [#25083](https://github.com/bitnami/charts/issues/25083) + +## 8.0.4 (2024-04-05) + +* [bitnami/mongodb-sharded] Release 8.0.4 updating components versions (#24954) ([7a9b6c8](https://github.com/bitnami/charts/commit/7a9b6c84a71cda6838c76cb8f8edd32aa10125b4)), closes [#24954](https://github.com/bitnami/charts/issues/24954) + +## 8.0.3 (2024-04-04) + +* [bitnami/mongodb-sharded] Release 8.0.3 (#24906) ([0e46acf](https://github.com/bitnami/charts/commit/0e46acfa761e5422d1bde12358841259e7c982c3)), closes [#24906](https://github.com/bitnami/charts/issues/24906) +* Update resourcesPreset comments (#24467) ([92e3e8a](https://github.com/bitnami/charts/commit/92e3e8a507326d2a20a8f10ab3e7746a2ec5c554)), closes [#24467](https://github.com/bitnami/charts/issues/24467) + +## 8.0.2 (2024-03-19) + +* [bitnami/mongodb-sharded] Release 8.0.2 (#24524) ([b447d4c](https://github.com/bitnami/charts/commit/b447d4c957efc786c31a7ea4c453275f36cd9855)), closes [#24524](https://github.com/bitnami/charts/issues/24524) + +## 8.0.1 (2024-03-18) + +* [bitnami/*] Reorder Chart sections (#24455) ([0cf4048](https://github.com/bitnami/charts/commit/0cf4048e8743f70a9753d460655bd030cbff6824)), closes [#24455](https://github.com/bitnami/charts/issues/24455) +* [bitnami/mongodb-sharded] Mount emptyDir volume to mongosh directory (#24494) ([30102ae](https://github.com/bitnami/charts/commit/30102ae6e90ed94d42f4e2b6c7f3f83bc40f8a1f)), closes [#24494](https://github.com/bitnami/charts/issues/24494) + +## 8.0.0 (2024-03-14) + +* [bitnami/mongodb-sharded] feat!: :lock: :boom: Improve security defaults (#24375) ([3239c75](https://github.com/bitnami/charts/commit/3239c75863bd801179c8c84c95084840d42d1522)), closes [#24375](https://github.com/bitnami/charts/issues/24375) + +## 7.9.1 (2024-03-11) + +* [bitnami/mongodb-sharded] fix: correct indention (#24315) ([2187b3c](https://github.com/bitnami/charts/commit/2187b3c478afd3c66439aea4031f6988267acc90)), closes [#24315](https://github.com/bitnami/charts/issues/24315) + +## 7.9.0 (2024-03-06) + +* [bitnami/mongodb-sharded] feat: :sparkles: :lock: Add automatic adaptation for Openshift restricted- ([a745214](https://github.com/bitnami/charts/commit/a745214b88f10fc942c22c53304f13cede2ecbe3)), closes [#24125](https://github.com/bitnami/charts/issues/24125) + +## 7.8.1 (2024-02-28) + +* [bitnami/mongodb-sharded] Release 7.8.1 updating components versions (#23974) ([6634479](https://github.com/bitnami/charts/commit/6634479875f2f10bcb503878afecdef65df857ee)), closes [#23974](https://github.com/bitnami/charts/issues/23974) + +## 7.8.0 (2024-02-22) + +* [bitnami/mongodb-sharded] feat: :sparkles: :lock: Add readOnlyRootFilesystem support (#23747) ([d1384e5](https://github.com/bitnami/charts/commit/d1384e535560a2d4c81293541e0f280166d51f42)), closes [#23747](https://github.com/bitnami/charts/issues/23747) + +## 7.7.3 (2024-02-22) + +* Add missing version, kind to volumeClaimTemplates (#23772) ([7546e63](https://github.com/bitnami/charts/commit/7546e632977dbcfd742444e376c4d71a85a3c8b1)), closes [#23772](https://github.com/bitnami/charts/issues/23772) + +## 7.7.2 (2024-02-21) + +* [bitnami/mongodb-sharded] Release 7.7.2 updating components versions (#23742) ([996f6a6](https://github.com/bitnami/charts/commit/996f6a640c9ef485d567f3893b582b35a2e31c2f)), closes [#23742](https://github.com/bitnami/charts/issues/23742) + +## 7.7.1 (2024-02-21) + +* [bitnami/mongodb-sharded] Release 7.7.1 updating components versions (#23729) ([df51210](https://github.com/bitnami/charts/commit/df51210f9df9ad251c0c231b72de60e6786b5dcb)), closes [#23729](https://github.com/bitnami/charts/issues/23729) + +## 7.7.0 (2024-02-20) + +* [bitnami/*] Bump all versions (#23602) ([b70ee2a](https://github.com/bitnami/charts/commit/b70ee2a30e4dc256bf0ac52928fb2fa7a70f049b)), closes [#23602](https://github.com/bitnami/charts/issues/23602) + +## 7.6.0 (2024-02-15) + +* [bitnami/mongodb-sharded] feat: :sparkles: :lock: Add resource preset support (#23492) ([bf21338](https://github.com/bitnami/charts/commit/bf213387bfd750539bb9cc06d45bb0b28a6fb434)), closes [#23492](https://github.com/bitnami/charts/issues/23492) + +## 7.5.1 (2024-02-03) + +* [bitnami/mongodb-sharded] Release 7.5.1 updating components versions (#23110) ([7848f7b](https://github.com/bitnami/charts/commit/7848f7ba8f04d4b6c070138491af37bb138645ea)), closes [#23110](https://github.com/bitnami/charts/issues/23110) + +## 7.5.0 (2024-02-01) + +* [bitnami/mongodb-sharded] feat: :lock: Enable networkPolicy (#22878) ([66237d0](https://github.com/bitnami/charts/commit/66237d001e93f07fccec2490dcc36cdcafcc33bb)), closes [#22878](https://github.com/bitnami/charts/issues/22878) + +## 7.4.2 (2024-01-31) + +* [bitnami/mongodb-sharded] Release 7.4.2 updating components versions (#22942) ([871f3c9](https://github.com/bitnami/charts/commit/871f3c91bf9454c8870a04bfd920b461a3ac62a4)), closes [#22942](https://github.com/bitnami/charts/issues/22942) + +## 7.4.1 (2024-01-26) + +* [bitnami/*] Move documentation sections from docs.bitnami.com back to the README (#22203) ([7564f36](https://github.com/bitnami/charts/commit/7564f36ca1e95ff30ee686652b7ab8690561a707)), closes [#22203](https://github.com/bitnami/charts/issues/22203) +* [bitnami/mongodb-sharded] fix: :bug: Set seLinuxOptions to null for Openshift compatibility (#22629) ([7e27bca](https://github.com/bitnami/charts/commit/7e27bcadbd4856216ee470b13da5608f807fdce4)), closes [#22629](https://github.com/bitnami/charts/issues/22629) + +## 7.4.0 (2024-01-19) + +* [bitnami/mongodb-sharded] fix: :lock: Move service-account token auto-mount to pod declaration (#224 ([249edde](https://github.com/bitnami/charts/commit/249eddea3fc72bb10662683fcda0f1bfb69b276e)), closes [#22438](https://github.com/bitnami/charts/issues/22438) + +## 7.3.1 (2024-01-18) + +* [bitnami/mongodb-sharded] Release 7.3.1 updating components versions (#22306) ([45eaedd](https://github.com/bitnami/charts/commit/45eaedd2e6f49fb311e7f6b73b6a17e11ed2c041)), closes [#22306](https://github.com/bitnami/charts/issues/22306) + +## 7.3.0 (2024-01-16) + +* [bitnami/mongodb-sharded] fix: :lock: Improve podSecurityContext and containerSecurityContext with e ([3840178](https://github.com/bitnami/charts/commit/3840178435d56c7fe5e93ed9c5db58b955787815)), closes [#22160](https://github.com/bitnami/charts/issues/22160) + +## 7.2.2 (2024-01-15) + +* [bitnami/*] Fix docs.bitnami.com broken links (#21901) ([f35506d](https://github.com/bitnami/charts/commit/f35506d2dadee4f097986e7792df1f53ab215b5d)), closes [#21901](https://github.com/bitnami/charts/issues/21901) +* [bitnami/*] Fix ref links (in comments) (#21822) ([e4fa296](https://github.com/bitnami/charts/commit/e4fa296106b225cf8c82445727c675c7c725e380)), closes [#21822](https://github.com/bitnami/charts/issues/21822) +* [bitnami/mongodb-sharded] fix: :lock: Do not use the default service account (#22023) ([b69e5a7](https://github.com/bitnami/charts/commit/b69e5a732b972aaf1842a3363dfd92602db1fe13)), closes [#22023](https://github.com/bitnami/charts/issues/22023) + +## 7.2.1 (2024-01-06) + +* [bitnami/mongodb-sharded] Release 7.2.1 updating components versions (#21871) ([d7de0a0](https://github.com/bitnami/charts/commit/d7de0a02b961eab0e9bee99a0c4d6265abb5175c)), closes [#21871](https://github.com/bitnami/charts/issues/21871) + +## 7.2.0 (2024-01-02) + +* [bitnami/*] Update copyright: Year and company (#21815) ([6c4bf75](https://github.com/bitnami/charts/commit/6c4bf75dec58fc7c9aee9f089777b1a858c17d5b)), closes [#21815](https://github.com/bitnami/charts/issues/21815) +* [bitnami/mongodb-sharded] Init retry configuration (#21819) ([359aaee](https://github.com/bitnami/charts/commit/359aaee671d15c45a58e67fe73c9f6d97fad21f4)), closes [#21819](https://github.com/bitnami/charts/issues/21819) + +## 7.1.6 (2023-12-07) + +* [bitnami/mongodb-sharded] Release 7.1.6 updating components versions (#21471) ([07cfc42](https://github.com/bitnami/charts/commit/07cfc42ebdd28d8ebf97804096da3fa855717d3d)), closes [#21471](https://github.com/bitnami/charts/issues/21471) + +## 7.1.5 (2023-11-27) + +* [bitnami/*] Rename solutions to "Bitnami package for ..." (#21038) ([b82f979](https://github.com/bitnami/charts/commit/b82f979e4fb63423fe6e2192c946d09d79c944fc)), closes [#21038](https://github.com/bitnami/charts/issues/21038) +* [bitnami/mongodb-sharded] Release 7.1.5 updating components versions (#21275) ([bf72160](https://github.com/bitnami/charts/commit/bf7216007eaf1c5815b6e808801b14242c5e71d6)), closes [#21275](https://github.com/bitnami/charts/issues/21275) + +## 7.1.4 (2023-11-17) + +* [bitnami/mongodb-sharded] Release 7.1.4 updating components versions (#21042) ([e64e3ef](https://github.com/bitnami/charts/commit/e64e3ef535e75d19c6c18afe5dca3914abb12ac1)), closes [#21042](https://github.com/bitnami/charts/issues/21042) + +## 7.1.3 (2023-11-17) + +* [bitnami/*] Remove relative links to non-README sections, add verification for that and update TL;DR ([1103633](https://github.com/bitnami/charts/commit/11036334d82df0490aa4abdb591543cab6cf7d7f)), closes [#20967](https://github.com/bitnami/charts/issues/20967) +* [bitnami/mongodb-sharded] Release 7.1.3 updating components versions (#21022) ([23dc892](https://github.com/bitnami/charts/commit/23dc892295b5ebbb674e322c33e8013ad3ea3334)), closes [#21022](https://github.com/bitnami/charts/issues/21022) + +## 7.1.2 (2023-11-10) + +* [bitnami/mongodb-sharded] Release 7.1.2 updating components versions (#20888) ([6b9c5f1](https://github.com/bitnami/charts/commit/6b9c5f1be91a0b062c8b3357c0c4185f981bb43e)), closes [#20888](https://github.com/bitnami/charts/issues/20888) + +## 7.1.1 (2023-11-08) + +* [bitnami/mongodb-sharded] Release 7.1.1 updating components versions (#20757) ([9214a08](https://github.com/bitnami/charts/commit/9214a086f0687f7b7ffb80aa666c59116af09b69)), closes [#20757](https://github.com/bitnami/charts/issues/20757) + +## 7.1.0 (2023-11-06) + +* [bitnami/*] Rename VMware Application Catalog (#20361) ([3acc734](https://github.com/bitnami/charts/commit/3acc73472beb6fb56c4d99f929061001205bc57e)), closes [#20361](https://github.com/bitnami/charts/issues/20361) +* [bitnami/mongodb-sharded] feat: :sparkles: Add support for PSA restricted policy (#20508) ([85ff2e7](https://github.com/bitnami/charts/commit/85ff2e75abe705677f7d56ea2818e9197d44a9cb)), closes [#20508](https://github.com/bitnami/charts/issues/20508) + +## 7.0.5 (2023-10-21) + +* [bitnami/*] Skip image's tag in the README files of the Bitnami Charts (#19841) ([bb9a01b](https://github.com/bitnami/charts/commit/bb9a01b65911c87e48318db922cc05eb42785e42)), closes [#19841](https://github.com/bitnami/charts/issues/19841) +* [bitnami/*] Standardize documentation (#19835) ([af5f753](https://github.com/bitnami/charts/commit/af5f7530c1bc8c5ded53a6c4f7b8f384ac1804f2)), closes [#19835](https://github.com/bitnami/charts/issues/19835) +* [bitnami/mongodb-sharded] Release 7.0.5 updating components versions (#20343) ([785d8e9](https://github.com/bitnami/charts/commit/785d8e9c3b6760fe4e9c10dd726248c758beed70)), closes [#20343](https://github.com/bitnami/charts/issues/20343) + +## 7.0.4 (2023-10-12) + +* [bitnami/mongodb-sharded] Release 7.0.4 (#20153) ([a372460](https://github.com/bitnami/charts/commit/a372460144e5a6b1e325a2fdf30629f108bf56b9)), closes [#20153](https://github.com/bitnami/charts/issues/20153) + +## 7.0.3 (2023-10-09) + +* [bitnami/mongodb-sharded] Release 7.0.3 (#19895) ([baecaf8](https://github.com/bitnami/charts/commit/baecaf833a2549a83bae2b2bd8cedce9ee9dff64)), closes [#19895](https://github.com/bitnami/charts/issues/19895) + +## 7.0.2 (2023-10-09) + +* [bitnami/*] Update Helm charts prerequisites (#19745) ([eb755dd](https://github.com/bitnami/charts/commit/eb755dd36a4dd3cf6635be8e0598f9a7f4c4a554)), closes [#19745](https://github.com/bitnami/charts/issues/19745) +* [bitnami/mongodb-sharded] Release 7.0.2 (#19868) ([ba821b3](https://github.com/bitnami/charts/commit/ba821b321a384927e4623ea739cdd172a5595586)), closes [#19868](https://github.com/bitnami/charts/issues/19868) + +## 7.0.1 (2023-09-30) + +* [bitnami/mongodb-sharded] Release 7.0.1 (#19659) ([fadf220](https://github.com/bitnami/charts/commit/fadf220d2eb6e0bbb66fd2f5ac8e732f6cbd909a)), closes [#19659](https://github.com/bitnami/charts/issues/19659) + +## 7.0.0 (2023-09-28) + +* [bitnami/mongodb-sharded] Bump major version not bumped at #19575 (#19591) ([d838a7f](https://github.com/bitnami/charts/commit/d838a7fa6fd8f1d45c458ada794a8c45e369a6f8)), closes [#19575](https://github.com/bitnami/charts/issues/19575) [#19591](https://github.com/bitnami/charts/issues/19591) [#19575](https://github.com/bitnami/charts/issues/19575) + +## 6.6.8 (2023-09-27) + +* [bitnami/mongodb-sharded] Release 6.6.8 (#19575) ([17b916e](https://github.com/bitnami/charts/commit/17b916ec07cdc523c68f23f465914e1a75b13e7b)), closes [#19575](https://github.com/bitnami/charts/issues/19575) + +## 6.6.7 (2023-09-21) + +* [bitnami/mongodb-sharded] Release 6.6.7 (#19459) ([ec882a7](https://github.com/bitnami/charts/commit/ec882a7cdb056d182d1aa8753f8fdbc2a21428a8)), closes [#19459](https://github.com/bitnami/charts/issues/19459) +* Revert "Autogenerate schema files (#19194)" (#19335) ([73d80be](https://github.com/bitnami/charts/commit/73d80be525c88fb4b8a54451a55acd506e337062)), closes [#19194](https://github.com/bitnami/charts/issues/19194) [#19335](https://github.com/bitnami/charts/issues/19335) + +## 6.6.6 (2023-09-15) + +* [bitnami/mongodb-sharded] test: :white_check_mark: Bump timeouts (#19293) ([ba1f396](https://github.com/bitnami/charts/commit/ba1f396b415bdb3d6a8464f42fd5f462234663c3)), closes [#19293](https://github.com/bitnami/charts/issues/19293) + +## 6.6.5 (2023-09-14) + +* [bitnami/mongodb-sharded] Release 6.6.5 (#19270) ([989a8bc](https://github.com/bitnami/charts/commit/989a8bc7299ee0420e120c179b2a651d4ed25990)), closes [#19270](https://github.com/bitnami/charts/issues/19270) + +## 6.6.4 (2023-09-12) + +* [bitnami/mongodb-sharded] test: :construction_worker: Set serial verification (#19234) ([cddcbed](https://github.com/bitnami/charts/commit/cddcbede41404ae7717ce180280bd250702be82c)), closes [#19234](https://github.com/bitnami/charts/issues/19234) +* Autogenerate schema files (#19194) ([a2c2090](https://github.com/bitnami/charts/commit/a2c2090b5ac97f47b745c8028c6452bf99739772)), closes [#19194](https://github.com/bitnami/charts/issues/19194) + +## 6.6.3 (2023-09-06) + +* [bitnami/mongodb-sharded]: Use merge helper (#19083) ([ba14a62](https://github.com/bitnami/charts/commit/ba14a625f6b3acf0aec9e79476e329e35b2d532c)), closes [#19083](https://github.com/bitnami/charts/issues/19083) + +## 6.6.2 (2023-08-25) + +* [bitnami/mongodb-sharded] Release 6.6.2 (#18864) ([1fd7628](https://github.com/bitnami/charts/commit/1fd76288015fcecd04b9c83ca43e7b35830f3df4)), closes [#18864](https://github.com/bitnami/charts/issues/18864) + +## 6.6.1 (2023-08-25) + +* [bitnami/mongodb-sharded] test: :white_check_mark: Add persistence tests (#18777) ([357b5a8](https://github.com/bitnami/charts/commit/357b5a8d7c831125bd7ec7d672ee74e139fee497)), closes [#18777](https://github.com/bitnami/charts/issues/18777) + +## 6.6.0 (2023-08-24) + +* [bitnami/mongodb-sharded] Support for customizing standard labels (#18353) ([7287c87](https://github.com/bitnami/charts/commit/7287c8766de50d61952594d00c79481bc5c0a61f)), closes [#18353](https://github.com/bitnami/charts/issues/18353) + +## 6.5.8 (2023-08-17) + +* [bitnami/mongodb-sharded] Release 6.5.8 (#18552) ([82e33b4](https://github.com/bitnami/charts/commit/82e33b4d774290197369896d5153cc27c319ed52)), closes [#18552](https://github.com/bitnami/charts/issues/18552) + +## 6.5.7 (2023-07-26) + +* [bitnami/mongodb-sharded] Release 6.5.7 (#17925) ([c3f288e](https://github.com/bitnami/charts/commit/c3f288edf80d1cc53d3fd42f08c535d048e82728)), closes [#17925](https://github.com/bitnami/charts/issues/17925) + +## 6.5.6 (2023-07-15) + +* [bitnami/mongodb-sharded] Release 6.5.6 (#17703) ([3e976e1](https://github.com/bitnami/charts/commit/3e976e1fcbe32b73644a7bfd304caf81a81cec4c)), closes [#17703](https://github.com/bitnami/charts/issues/17703) + +## 6.5.5 (2023-07-01) + +* [bitnami/mongodb-sharded] Release 6.5.5 (#17442) ([bebf9e1](https://github.com/bitnami/charts/commit/bebf9e1130b548ff69d3b7783e6d0f448833b867)), closes [#17442](https://github.com/bitnami/charts/issues/17442) +* Add copyright header (#17300) ([da68be8](https://github.com/bitnami/charts/commit/da68be8e951225133c7dfb572d5101ca3d61c5ae)), closes [#17300](https://github.com/bitnami/charts/issues/17300) +* Update charts readme (#17217) ([31b3c0a](https://github.com/bitnami/charts/commit/31b3c0afd968ff4429107e34101f7509e6a0e913)), closes [#17217](https://github.com/bitnami/charts/issues/17217) + +## 6.5.4 (2023-06-20) + +* [bitnami/*] Change copyright section in READMEs (#17006) ([ef986a1](https://github.com/bitnami/charts/commit/ef986a1605241102b3dcafe9fd8089e6fc1201ad)), closes [#17006](https://github.com/bitnami/charts/issues/17006) +* [bitnami/mongodb-sharded] Release 6.5.4 (#17225) ([950b655](https://github.com/bitnami/charts/commit/950b65587046c30ad5cccdf0cf534bdf6b939fda)), closes [#17225](https://github.com/bitnami/charts/issues/17225) +* [bitnami/several] Change copyright section in READMEs (#16989) ([5b6a5cf](https://github.com/bitnami/charts/commit/5b6a5cfb7625a751848a2e5cd796bd7278f406ca)), closes [#16989](https://github.com/bitnami/charts/issues/16989) + +## 6.5.3 (2023-05-21) + +* [bitnami/mongodb-sharded] Release 6.5.3 (#16802) ([c8642ab](https://github.com/bitnami/charts/commit/c8642abff4b44ad55d551b76950e2bab76254769)), closes [#16802](https://github.com/bitnami/charts/issues/16802) + +## 6.5.2 (2023-05-12) + +* [bitnami/mongodb-sharded] Release 6.5.2 (#16628) ([8a64717](https://github.com/bitnami/charts/commit/8a64717958134d1df7808cd61c1403c37e522e65)), closes [#16628](https://github.com/bitnami/charts/issues/16628) + +## 6.5.1 (2023-05-11) + +* fix: allow mongodb to template existing secret (#16564) ([224b0c6](https://github.com/bitnami/charts/commit/224b0c6353571b420af4b1d3e371a1ccaaafed83)), closes [#16564](https://github.com/bitnami/charts/issues/16564) +* Add wording for enterprise page (#16560) ([8f22774](https://github.com/bitnami/charts/commit/8f2277440b976d52785ba9149762ad8620a73d1f)), closes [#16560](https://github.com/bitnami/charts/issues/16560) + +## 6.5.0 (2023-05-09) + +* [bitnami/several] Adapt Chart.yaml to set desired OCI annotations (#16546) ([fc9b18f](https://github.com/bitnami/charts/commit/fc9b18f2e98805d4df629acbcde696f44f973344)), closes [#16546](https://github.com/bitnami/charts/issues/16546) + +## 6.4.2 (2023-05-09) + +* [bitnami/mongodb-sharded] Release 6.4.2 (#16473) ([73f176c](https://github.com/bitnami/charts/commit/73f176cb4dbde5a6023ea53e0e94d18b5ceb7169)), closes [#16473](https://github.com/bitnami/charts/issues/16473) + +## 6.4.1 (2023-05-01) + +* [bitnami/mongodb-sharded] Release 6.4.1 (#16304) ([d01d7c6](https://github.com/bitnami/charts/commit/d01d7c6ae14479fe1ce5aedd80eca00e334f4b44)), closes [#16304](https://github.com/bitnami/charts/issues/16304) + +## 6.4.0 (2023-04-20) + +* [bitnami/*] Make Helm charts 100% OCI (#15998) ([8841510](https://github.com/bitnami/charts/commit/884151035efcbf2e1b3206e7def85511073fb57d)), closes [#15998](https://github.com/bitnami/charts/issues/15998) + +## 6.3.3 (2023-04-01) + +* [bitnami/mongodb-sharded] Release 6.3.3 (#15875) ([014328d](https://github.com/bitnami/charts/commit/014328dd40a7505b96c2a70b7361241d9b9417f5)), closes [#15875](https://github.com/bitnami/charts/issues/15875) + +## 6.3.2 (2023-03-21) + +* [bitnami/mongodb-sharded] Release 6.3.2 (#15651) ([ff8731f](https://github.com/bitnami/charts/commit/ff8731fb71ef4853dc3af4887ea016fd264ad952)), closes [#15651](https://github.com/bitnami/charts/issues/15651) + +## 6.3.1 (2023-03-14) + +* [bitnami/mongodb-sharded] Release 6.3.1 (#15485) ([5947cf1](https://github.com/bitnami/charts/commit/5947cf1cc31d8315e485e4f1ed369dccb9a51ec8)), closes [#15485](https://github.com/bitnami/charts/issues/15485) + +## 6.3.0 (2023-03-10) + +* [bitnami/charts] Apply linter to README files (#15357) ([0e29e60](https://github.com/bitnami/charts/commit/0e29e600d3adc8b1b46e506eccb3decfab3b4e63)), closes [#15357](https://github.com/bitnami/charts/issues/15357) +* [bitnami/mongodb-sharded] Add support for service.headless.annotations (#15436) ([34a0322](https://github.com/bitnami/charts/commit/34a0322cfd661066df9e9c4f499ff457854a1c6a)), closes [#15436](https://github.com/bitnami/charts/issues/15436) +* fix(mongodbshared): fixing doc comment (#15089) ([e979121](https://github.com/bitnami/charts/commit/e979121ef56fc02ea219d12961024d3dc086dbf6)), closes [#15089](https://github.com/bitnami/charts/issues/15089) + +## 6.2.5 (2023-03-01) + +* [bitnami/mongodb-sharded] Release 6.2.5 (#15263) ([983c6d9](https://github.com/bitnami/charts/commit/983c6d91d36a60bd1175a349d516416fdbec19b4)), closes [#15263](https://github.com/bitnami/charts/issues/15263) + +## 6.2.4 (2023-02-17) + +* [bitnami/*] Change copyright date (#14682) ([add4ec7](https://github.com/bitnami/charts/commit/add4ec701108ac36ed4de2dffbdf407a0d091067)), closes [#14682](https://github.com/bitnami/charts/issues/14682) +* [bitnami/*] Fix markdown linter issues (#14874) ([a51e0e8](https://github.com/bitnami/charts/commit/a51e0e8d35495b907f3e70dd2f8e7c3bcbf4166a)), closes [#14874](https://github.com/bitnami/charts/issues/14874) +* [bitnami/*] Fix markdown linter issues 2 (#14890) ([aa96572](https://github.com/bitnami/charts/commit/aa9657237ee8df4a46db0d7fdf8a23230dd6902a)), closes [#14890](https://github.com/bitnami/charts/issues/14890) +* [bitnami/*] Unify READMEs (#14472) ([2064fb8](https://github.com/bitnami/charts/commit/2064fb8dcc78a845cdede8211af8c3cc52551161)), closes [#14472](https://github.com/bitnami/charts/issues/14472) +* [bitnami/mongodb-sharded] Release 6.2.4 (#14994) ([8f8692f](https://github.com/bitnami/charts/commit/8f8692f1becb76e7732d1a83980ed821a029fcb3)), closes [#14994](https://github.com/bitnami/charts/issues/14994) + +## 6.2.3 (2023-01-19) + +* [bitnami/*] Change licenses annotation format (#14377) ([0ab7608](https://github.com/bitnami/charts/commit/0ab760862c660fcc78cffadf8e1d8cdd70881473)), closes [#14377](https://github.com/bitnami/charts/issues/14377) +* [bitnami/mongodb-sharded] Release 6.2.3 (#14442) ([cce758c](https://github.com/bitnami/charts/commit/cce758c7135d488c8b3eebde7be8211d6b9a2a8a)), closes [#14442](https://github.com/bitnami/charts/issues/14442) + +## 6.2.2 (2023-01-14) + +* [bitnami/*] Add license annotation and remove obsolete engine parameter (#14293) ([da2a794](https://github.com/bitnami/charts/commit/da2a7943bae95b6e9b5b4ed972c15e990b69fdb0)), closes [#14293](https://github.com/bitnami/charts/issues/14293) +* [bitnami/mongodb-sharded] Release 6.2.2 (#14361) ([d5f3fc9](https://github.com/bitnami/charts/commit/d5f3fc9acb97ed81936e4ef26d848b8badda0b2e)), closes [#14361](https://github.com/bitnami/charts/issues/14361) + +## 6.2.1 (2022-12-15) + +* [bitnami/mongodb-sharded] Release 6.2.1 (#13973) ([87efc77](https://github.com/bitnami/charts/commit/87efc771e8b5525ce85e8d0964b6eff223ad048c)), closes [#13973](https://github.com/bitnami/charts/issues/13973) + +## 6.2.0 (2022-11-29) + +* [bitnami/mongodb-sharded] Evaluate *.persistence.subPath as a template (#13584) ([d6610ae](https://github.com/bitnami/charts/commit/d6610ae391ac703ec2a737b424f83ac5eee8fc31)), closes [#13584](https://github.com/bitnami/charts/issues/13584) + +## 6.1.14 (2022-11-25) + +* [bitnami/mongodb-sharded] fix rendering topologySpreadConstraints (#13646) ([0964a40](https://github.com/bitnami/charts/commit/0964a401e6b4daef38330ceedfa445db412bc4ac)), closes [#13646](https://github.com/bitnami/charts/issues/13646) + +## 6.1.13 (2022-11-15) + +* [bitnami/mongodb-sharded] Release 6.1.13 updating components versions (#13526) ([21f4d51](https://github.com/bitnami/charts/commit/21f4d51b2661f0087f80f07a53dc482ca2644adc)), closes [#13526](https://github.com/bitnami/charts/issues/13526) + +## 6.1.12 (2022-11-14) + +* [bitnami/mongodb-sharded]Fixed a few errors in the templates that support monitoring, PDB, etc (#134 ([c2d5b43](https://github.com/bitnami/charts/commit/c2d5b434d5e4ab1c3feb4c4c7221b1cb2fdab578)), closes [#13482](https://github.com/bitnami/charts/issues/13482) + +## 6.1.11 (2022-11-09) + +* [bitnami/mongodb-sharded] enable all collectors in mongodb_exporter (#13385) ([35da722](https://github.com/bitnami/charts/commit/35da7227d9d8519cac7154ee5ab86b253eee7d88)), closes [#13385](https://github.com/bitnami/charts/issues/13385) + +## 6.1.10 (2022-10-31) + +* [bitnami/mongodb-sharded] Release 6.1.10 (#13257) ([0adb24d](https://github.com/bitnami/charts/commit/0adb24d5bbcdf5ffd83a882267962cd8c8605938)), closes [#13257](https://github.com/bitnami/charts/issues/13257) + +## 6.1.9 (2022-10-25) + +* fix render topologySpreadConstraints for shard data statefulset (#13109) ([ec572fa](https://github.com/bitnami/charts/commit/ec572fa8901116b689c8c5689831d7538e390526)), closes [#13109](https://github.com/bitnami/charts/issues/13109) + +## 6.1.8 (2022-10-24) + +* fix render topologySpreadConstraints (#13084) ([dd746d4](https://github.com/bitnami/charts/commit/dd746d494fba81c5d7a136e742e751bdb31ffb9d)), closes [#13084](https://github.com/bitnami/charts/issues/13084) + +## 6.1.7 (2022-10-17) + +* [bitnami/*] Use new default branch name in links (#12943) ([a529e02](https://github.com/bitnami/charts/commit/a529e02597d49d944eba1eb0f190713293247176)), closes [#12943](https://github.com/bitnami/charts/issues/12943) +* [bitnami/mongodb-sharded] Fix missing $ in data StatefulSet (#12941) ([b8620a9](https://github.com/bitnami/charts/commit/b8620a94d9ca352217226547a9c5cdecc8877b14)), closes [#12941](https://github.com/bitnami/charts/issues/12941) +* Generic README instructions related to the repo (#12792) ([3cf6b10](https://github.com/bitnami/charts/commit/3cf6b10e10e60df4b3e191d6b99aa99a9f597755)), closes [#12792](https://github.com/bitnami/charts/issues/12792) + +## 6.1.6 (2022-10-01) + +* [bitnami/mongodb-sharded] Release 6.1.6 (#12780) ([0b63445](https://github.com/bitnami/charts/commit/0b634450fff73723425700690c9507dd1bf134d7)), closes [#12780](https://github.com/bitnami/charts/issues/12780) + +## 6.1.5 (2022-09-30) + +* [bitnami/mongodb-sharded] Force new version publishing (#12774) ([e114fed](https://github.com/bitnami/charts/commit/e114fedb35a8a28055cb099b5c6b4865b0a82ee8)), closes [#12774](https://github.com/bitnami/charts/issues/12774) + +## 6.1.4 (2022-09-30) + +* [bitnami/mongodb-sharded] Release 6.1.4 (#12746) ([7e73521](https://github.com/bitnami/charts/commit/7e73521cbb6fd948a018f983125f5154157ed3c0)), closes [#12746](https://github.com/bitnami/charts/issues/12746) + +## 6.1.3 (2022-09-20) + +* [bitnami/mongodb-sharded] Use custom probes if given (#12529) ([b469868](https://github.com/bitnami/charts/commit/b469868e7f50591d50e5aef726aa4f5a7eec67d5)), closes [#12529](https://github.com/bitnami/charts/issues/12529) [#12354](https://github.com/bitnami/charts/issues/12354) + +## 6.1.2 (2022-09-19) + +* [bitnami/mongodb-sharded] Release 6.1.2 updating components versions ([b58bc0e](https://github.com/bitnami/charts/commit/b58bc0e52531d934e987ce6225fff2411d0e2a65)) + +## 6.1.1 (2022-08-23) + +* [bitnami/mongodb-sharded] Update Chart.lock (#12044) ([5cf48d2](https://github.com/bitnami/charts/commit/5cf48d2698ca285e17d0e517a17092f9f56e9ad2)), closes [#12044](https://github.com/bitnami/charts/issues/12044) + +## 6.1.0 (2022-08-22) + +* [bitnami/mongodb-sharded] Add support for image digest apart from tag (#11913) ([31abd3a](https://github.com/bitnami/charts/commit/31abd3a9b8185298984e5f565936271fbf1908f7)), closes [#11913](https://github.com/bitnami/charts/issues/11913) + +## 6.0.4 (2022-08-20) + +* [bitnami/mongodb-sharded] Release 6.0.4 updating components versions ([8ea66e5](https://github.com/bitnami/charts/commit/8ea66e537fd26d94f065d8222c722d81a7088ae2)) + +## 6.0.3 (2022-08-17) + +* [bitnami/mongodb-sharded] Fix incorrect references when setting shardsvr persistence configuration ( ([36f8647](https://github.com/bitnami/charts/commit/36f864759abe7ce8a0143ab719efc2348a39d705)), closes [#11455](https://github.com/bitnami/charts/issues/11455) + +## 6.0.2 (2022-08-16) + +* [bitnami/mongodb-sharded] Release 6.0.2 updating components versions ([604e277](https://github.com/bitnami/charts/commit/604e277d83314c9255b32029ecfff6a485ab14b4)) + +## 6.0.1 (2022-08-05) + +* [bitnami/mongodb-sharded] Fixed incorrect permissions when using (#11452) ([8782ae0](https://github.com/bitnami/charts/commit/8782ae0c3c9d4cb679399d702bf900d6e058300c)), closes [#11452](https://github.com/bitnami/charts/issues/11452) + +## 6.0.0 (2022-08-05) + +* [bitnami/mongodb-sharded] Release 6.0.0 updating components versions ([fa05b70](https://github.com/bitnami/charts/commit/fa05b70378a7c494e4653ff7aafcdb31427a2da2)) + +## 5.1.4 (2022-08-04) + +* [bitnami/mongodb-sharded] Release 5.1.4 updating components versions ([02e4139](https://github.com/bitnami/charts/commit/02e4139692332f3f9b7b7a6b3c826bfb0109f2be)) + +## 5.1.3 (2022-08-02) + +* [bitnami/mongodb-sharded] Release 5.1.3 updating components versions ([25ed652](https://github.com/bitnami/charts/commit/25ed652526f8708692a9ab801e2067386f213fae)) + +## 5.1.2 (2022-07-27) + +* [bitnami/*] Update URLs to point to the new bitnami/containers monorepo (#11352) ([d665af0](https://github.com/bitnami/charts/commit/d665af0c708846192d8d5fb2f5f9ea65dd464ab0)), closes [#11352](https://github.com/bitnami/charts/issues/11352) +* [bitnami/mongodb-sharded] Release 5.1.2 updating components versions ([7854da8](https://github.com/bitnami/charts/commit/7854da8370c6f8c89cc4c67ada15f57427c18b63)) + +## 5.1.1 (2022-07-20) + +* [bitnami/mongodb-sharded] Release 5.1.1 updating components versions ([03216f2](https://github.com/bitnami/charts/commit/03216f2404b54d7776423b5d3e17e83b463b33fd)) + +## 5.1.0 (2022-07-14) + +* [bitnami/mongodb-sharded] Use common helper to manage app secrets (#10828) ([9892db1](https://github.com/bitnami/charts/commit/9892db1bda0af04af478562eba112acbedbad4f9)), closes [#10828](https://github.com/bitnami/charts/issues/10828) + +## 5.0.17 (2022-07-09) + +* [bitnami/mongodb-sharded] Release 5.0.17 updating components versions ([963e4f9](https://github.com/bitnami/charts/commit/963e4f996c9bb3d43a31c89e240ebe57db7eaa17)) + +## 5.0.16 (2022-07-05) + +* [bitnami/mongodb-sharded] Release 5.0.16 updating components versions ([87d4cc0](https://github.com/bitnami/charts/commit/87d4cc08752d8fa305d391e7fead87e33f292931)) + +## 5.0.15 (2022-07-04) + +* [bitnami/mongodb-sharded] Release 5.0.15 updating components versions ([b2d8f6a](https://github.com/bitnami/charts/commit/b2d8f6a2f74eb5c4c98ee0e75e7d5c0d8ac51417)) + +## 5.0.14 (2022-06-30) + +* [bitnami/mongodb-sharded] Release 5.0.14 updating components versions ([12a6824](https://github.com/bitnami/charts/commit/12a6824ced6b2988580216f1274e5fcbb48d81eb)) + +## 5.0.13 (2022-06-27) + +* [bitnami/mongodb-sharded] Fixed calls for render values and extraEnvVarsSecret calls (#10868) ([32282c8](https://github.com/bitnami/charts/commit/32282c823a92b2520e9ed8599822730c372f01be)), closes [#10868](https://github.com/bitnami/charts/issues/10868) + +## 5.0.12 (2022-06-15) + +* [bitnami/mongodb-sharded] Release 5.0.12 updating components versions ([8b7378d](https://github.com/bitnami/charts/commit/8b7378d1ddf1180365610a29ca244ca0e7d87246)) + +## 5.0.11 (2022-06-08) + +* [bitnami/mongodb-sharded] Release 5.0.11 updating components versions ([1fc24cc](https://github.com/bitnami/charts/commit/1fc24cc0e2cc69645a43a62ca4636ecb915a647a)) + +## 5.0.10 (2022-06-07) + +* [bitnami/*] Replace Kubeapps URL in READMEs (and kubeapps Chart.yaml) and remove BKPR references (#1 ([c6a7914](https://github.com/bitnami/charts/commit/c6a7914361e5aea6016fb45bf4d621edfd111d32)), closes [#10600](https://github.com/bitnami/charts/issues/10600) +* Fix tolerations and topologySpreadConstraints default values (#10636) ([5df5573](https://github.com/bitnami/charts/commit/5df55739d6cd86459e8320cc48047646c6029add)), closes [#10636](https://github.com/bitnami/charts/issues/10636) + +## 5.0.9 (2022-06-06) + +* [bitnami/mongodb-sharded] Fixed typo for custom probes (#10571) ([5065a0a](https://github.com/bitnami/charts/commit/5065a0a3a457fe7c7a364c96d17cee9dc446aeac)), closes [#10571](https://github.com/bitnami/charts/issues/10571) + +## 5.0.8 (2022-06-01) + +* [bitnami/several] Replace maintainers email by url (#10523) ([ff3cf61](https://github.com/bitnami/charts/commit/ff3cf617a1680509b0f3855d17c4ccff7b29a0ff)), closes [#10523](https://github.com/bitnami/charts/issues/10523) + +## 5.0.7 (2022-05-30) + +* [bitnami/several] Replace base64 --decode with base64 -d (#10495) ([099286a](https://github.com/bitnami/charts/commit/099286ae7a87784cf809df0b64ab24f7ff0144c8)), closes [#10495](https://github.com/bitnami/charts/issues/10495) + +## 5.0.6 (2022-05-26) + +* [bitnami/mongodb-sharded] Release 5.0.6 updating components versions ([a4b5f42](https://github.com/bitnami/charts/commit/a4b5f420d81f806c1bc3df6cfd85098f32236bf2)) + +## 5.0.5 (2022-05-22) + +* [bitnami/mongodb-sharded] Release 5.0.5 updating components versions ([efdf648](https://github.com/bitnami/charts/commit/efdf6481c2fd431291ca94346e0a1f03daf104e7)) + +## 5.0.4 (2022-05-19) + +* [bitnami/mongodb-sharded] Release 5.0.4 updating components versions ([cba25d3](https://github.com/bitnami/charts/commit/cba25d3e18820e465419c31efb1565364a72da45)) + +## 5.0.3 (2022-05-18) + +* [bitnami/mongodb-sharded] Fix bug in arbiter statefulset (#10068) ([d53cba2](https://github.com/bitnami/charts/commit/d53cba2be93997b8151cdf765270d5a5778a52ea)), closes [#10068](https://github.com/bitnami/charts/issues/10068) +* [bitnami/mongodb-sharded] Release 5.0.3 updating components versions ([a2da8ac](https://github.com/bitnami/charts/commit/a2da8acac8b9452793d33855a9b5c8009bb2e98c)) + +## 5.0.2 (2022-05-13) + +* [bitnami/*] Unify k8s directives separators (#10185) ([2650214](https://github.com/bitnami/charts/commit/26502141d146ca3bdfb3bf744fcdec8ca5cece44)), closes [#10185](https://github.com/bitnami/charts/issues/10185) + +## 5.0.1 (2022-05-05) + +* [bitnami/mongodb-sharded] Remove unused variables (again) (#10025) ([ae0c043](https://github.com/bitnami/charts/commit/ae0c043d0c520d1b2d6159f41e2dcca637cc8c32)), closes [#10025](https://github.com/bitnami/charts/issues/10025) + +## 5.0.0 (2022-04-29) + +* [bitnami/mongodb-sharded] MongoDB sharded standarization (#9829) ([88c4054](https://github.com/bitnami/charts/commit/88c4054537c38e0cb97adf13e877195947c4f2ec)), closes [#9829](https://github.com/bitnami/charts/issues/9829) + +## 4.1.1 (2022-04-27) + +* [bitnami/mongodb-sharded] Bump failureThresholds ([b4a2551](https://github.com/bitnami/charts/commit/b4a2551acc360df958a8a2f093b0129a2901072e)) + +## 4.1.0 (2022-04-26) + +* [bitnami/mongodb-sharded] chore: :wastebasket: Remove reference to mongo command (#9917) ([74e7106](https://github.com/bitnami/charts/commit/74e71061844630ebd89901f9176987d18633af13)), closes [#9917](https://github.com/bitnami/charts/issues/9917) + +## 4.0.21 (2022-04-22) + +* [bitnami/mongodb-sharded] Release 4.0.21 updating components versions ([9fecca5](https://github.com/bitnami/charts/commit/9fecca57689556d807654aa091f9877c433b257f)) + +## 4.0.20 (2022-04-20) + +* [bitnami/mongodb-sharded] Release 4.0.20 updating components versions ([dc13fd4](https://github.com/bitnami/charts/commit/dc13fd4f1f2a381765278faa8aa3002c62c75609)) + +## 4.0.19 (2022-04-19) + +* [bitnami/mongodb-sharded] Release 4.0.19 updating components versions ([2dad215](https://github.com/bitnami/charts/commit/2dad2151cdbc13915c2adcd19a842426bdc25202)) + +## 4.0.18 (2022-04-18) + +* [bitnami/mongodb-sharded] Release 4.0.18 updating components versions ([afff42f](https://github.com/bitnami/charts/commit/afff42f03300f118173ac9239aed43984b0dfbbd)) + +## 4.0.17 (2022-04-02) + +* [bitnami/mongodb-sharded] Release 4.0.17 updating components versions ([f89ce77](https://github.com/bitnami/charts/commit/f89ce7727f39d4a76019c8eeedfee052dc9296b8)) + +## 4.0.16 (2022-04-01) + +* [bitnami/mongodb-sharded] Fix typo in shard-data-poddisruptionbudget (#9578) ([68d0639](https://github.com/bitnami/charts/commit/68d0639142927dee63ad5e1f20da0ba3275734ae)), closes [#9578](https://github.com/bitnami/charts/issues/9578) + +## 4.0.15 (2022-03-28) + +* [bitnami/mongodb-sharded] Release 4.0.15 updating components versions ([902d8b7](https://github.com/bitnami/charts/commit/902d8b785905c70c16effc3c64351a49546f9117)) + +## 4.0.14 (2022-03-27) + +* [bitnami/mongodb-sharded] Release 4.0.14 updating components versions ([203b733](https://github.com/bitnami/charts/commit/203b7332c7f284f84b6605a04264a1b54ec36e65)) + +## 4.0.13 (2022-03-25) + +* [bitnami/mongodb-sharded] Allow externalIP on all service type (#9565) ([478715e](https://github.com/bitnami/charts/commit/478715e448f7ae082f3039150d96d048732561fc)), closes [#9565](https://github.com/bitnami/charts/issues/9565) [#9562](https://github.com/bitnami/charts/issues/9562) + +## 4.0.12 (2022-03-24) + +* [bitnami/mongodb-sharded] Add externalIP in mongos service (#9542) ([ea66cef](https://github.com/bitnami/charts/commit/ea66cef362033d0cdb7889ade863c4422e4a84af)), closes [#9542](https://github.com/bitnami/charts/issues/9542) + +## 4.0.11 (2022-03-16) + +* [bitnami/mongodb-sharded] Release 4.0.11 updating components versions ([3dbb1f5](https://github.com/bitnami/charts/commit/3dbb1f5107402d8030b98518bf4658d52ff04a58)) + +## 4.0.10 (2022-03-07) + +* [bitnami/mongodb-sharded] Release 4.0.10 updating components versions ([42d2adc](https://github.com/bitnami/charts/commit/42d2adcd31729c8102fb5e32ef627b9d09a378ba)) + +## 4.0.9 (2022-03-02) + +* [bitnami/mongodb-sharded] Release 4.0.9 updating components versions ([daeab7a](https://github.com/bitnami/charts/commit/daeab7a63dae9b6754ad19864bf123a603ad85e5)) + +## 4.0.8 (2022-03-01) + +* [bitnami/mongodb-sharded] Release 4.0.8 updating components versions ([c663316](https://github.com/bitnami/charts/commit/c663316c03498a34dae614de937ff81d12a07ace)) + +## 4.0.7 (2022-02-27) + +* [bitnami/mongodb-sharded] Release 4.0.7 updating components versions ([80fe14a](https://github.com/bitnami/charts/commit/80fe14a05456237a7e1365d92d9cdf655f103649)) + +## 4.0.6 (2022-02-23) + +* Merge branch 'master' of https://github.com/bitnami/charts (#9163) ([7413cdb](https://github.com/bitnami/charts/commit/7413cdb88d22c2f158b6f47285c2ebdb653b9896)) + +## 4.0.5 (2022-02-21) + +* [bitnami/mongodb-sharded] Do not hardcode PDB apiVersion (#9104) ([69de5c6](https://github.com/bitnami/charts/commit/69de5c60c493e70fad71abfabbc233c8170cdad0)), closes [#9104](https://github.com/bitnami/charts/issues/9104) + +## 4.0.4 (2022-02-20) + +* [bitnami/mongodb-sharded] Release 4.0.4 updating components versions ([7929fdf](https://github.com/bitnami/charts/commit/7929fdf551dcc3c071bcaacf851450c7a12ee273)) + +## 4.0.3 (2022-02-01) + +* [bitnami/mongodb-sharded] Release 4.0.3 updating components versions ([1ecf077](https://github.com/bitnami/charts/commit/1ecf077bbfed67ef2b37996b6503827400ee15db)) + +## 4.0.2 (2022-01-30) + +* [bitnami/*] Fix non-utf8 characters (#8826) ([aebe0ed](https://github.com/bitnami/charts/commit/aebe0ed63d845e1e2b38751103810adf200b18f5)), closes [#8826](https://github.com/bitnami/charts/issues/8826) +* [bitnami/mongodb-sharded] Release 4.0.2 updating components versions ([58fb31b](https://github.com/bitnami/charts/commit/58fb31b0a0f118ff0be689eab24ce0ca1c79a1ff)) + +## 4.0.1 (2022-01-28) + +* [bitnami/mongodb-sharded] Release 4.0.1 updating components versions ([2b86626](https://github.com/bitnami/charts/commit/2b8662601dd1cfc7e112edd4d2a856afad58ba7f)) + +## 4.0.0 (2022-01-27) + +* [bitnami/mongodb*] New major version using 0.30.X for the exporter (#8818) ([282d315](https://github.com/bitnami/charts/commit/282d315386d6f7f20a65ea3b7a46bb26cc95fa15)), closes [#8818](https://github.com/bitnami/charts/issues/8818) + +## 3.12.0 (2022-01-24) + +* [bitnami/mongodb-sharded] add option to use tls for metrics exporter (#8733) ([19f67fe](https://github.com/bitnami/charts/commit/19f67fedcb5bbce4035572baef756f442721f659)), closes [#8733](https://github.com/bitnami/charts/issues/8733) + +## 3.11.2 (2022-01-20) + +* [bitnami/*] Readme automation (#8579) ([78d1938](https://github.com/bitnami/charts/commit/78d193831c900d178198491ffd08fa2217a64ecd)), closes [#8579](https://github.com/bitnami/charts/issues/8579) +* [bitnami/*] Update READMEs (#8716) ([b9a9533](https://github.com/bitnami/charts/commit/b9a953337590eb2979453385874a267bacf50936)), closes [#8716](https://github.com/bitnami/charts/issues/8716) +* [bitnami/several] Change prerequisites (#8725) ([8d740c5](https://github.com/bitnami/charts/commit/8d740c566cfdb7e2d933c40128b4e919fce953a5)), closes [#8725](https://github.com/bitnami/charts/issues/8725) + +## 3.11.1 (2022-01-14) + +* [bitnami/mongodb-sharded] Release 3.11.1 updating components versions ([1625f7b](https://github.com/bitnami/charts/commit/1625f7b8f9e9ae230d5f242abd62ef961c33dd4c)) +* Update README.md (#8621) ([626ac12](https://github.com/bitnami/charts/commit/626ac128ef8f57289c488084cc50384b83e16bdb)), closes [#8621](https://github.com/bitnami/charts/issues/8621) + +## 3.11.0 (2022-01-05) + +* [bitnami/several] Adapt templating format (#8562) ([8cad18a](https://github.com/bitnami/charts/commit/8cad18aed9966a6f0208e5ad6cee46cb217f47ab)), closes [#8562](https://github.com/bitnami/charts/issues/8562) + +## 3.10.2 (2022-01-04) + +* [bitnami/several] Add license to the README ([05f7633](https://github.com/bitnami/charts/commit/05f763372501d596e57db713dd53ff4ff3027cc4)) +* [bitnami/several] Add license to the README ([32fb238](https://github.com/bitnami/charts/commit/32fb238e60a0affc6debd3142eaa3c3d9089ec2a)) +* [bitnami/several] Add license to the README ([b87c2f7](https://github.com/bitnami/charts/commit/b87c2f7899d48a8b02c506765e6ae82937e9ba3f)) +* [bitnami/several] Fix issue with quote when followed by }} (#8561) ([58077af](https://github.com/bitnami/charts/commit/58077af58f40e74e7af41485bcca493e38523537)), closes [#8561](https://github.com/bitnami/charts/issues/8561) + +## 3.10.1 (2021-12-29) + +* [bitnami/mongodb-sharded] Release 3.10.1 updating components versions ([3fd0013](https://github.com/bitnami/charts/commit/3fd001334cbca94eb93ed81b69def8b1aeb2e93e)) +* [bitnami/several] Regenerate README tables ([8150149](https://github.com/bitnami/charts/commit/8150149f0bb746e86ff0029fc375d43775bdf15a)) + +## 3.10.0 (2021-11-30) + +* [bitnami/mongodb-sharded] feat: :bug: Allow setting container ports (#8248) ([20c692f](https://github.com/bitnami/charts/commit/20c692fb8eb2cc59d69c7e0ac600f81ffd362cf1)), closes [#8248](https://github.com/bitnami/charts/issues/8248) + +## 3.9.18 (2021-11-29) + +* [bitnami/mongodb-sharded] Release 3.9.18 updating components versions ([4b72fd7](https://github.com/bitnami/charts/commit/4b72fd7d89de643dc3a6a65ce0dc57b122069e3f)) + +## 3.9.17 (2021-11-29) + +* [bitnami/several] Replace HTTP by HTTPS when possible (#8259) ([eafb5bd](https://github.com/bitnami/charts/commit/eafb5bd5a2cc3aaf04fc1e8ebedd73f420d76864)), closes [#8259](https://github.com/bitnami/charts/issues/8259) + +## 3.9.16 (2021-11-28) + +* [bitnami/mongodb-sharded] Release 3.9.16 updating components versions ([fb4f3c6](https://github.com/bitnami/charts/commit/fb4f3c67f241a746a144278940ce385e0b6d8e8c)) +* [bitnami/several] Fix deadlinks in README.md (#8215) ([99e90d2](https://github.com/bitnami/charts/commit/99e90d244b3244e059a42f72dcbecd3cda2b66bb)), closes [#8215](https://github.com/bitnami/charts/issues/8215) + +## 3.9.15 (2021-11-17) + +* [bitnami/several] Add extraDeploy feature to the pending charts (#8164) ([d812a24](https://github.com/bitnami/charts/commit/d812a243cb1bba69c67ac22cfce1f7999848ef74)), closes [#8164](https://github.com/bitnami/charts/issues/8164) +* [bitnami/several] Regenerate README tables ([3cefed3](https://github.com/bitnami/charts/commit/3cefed3ef961fbd7596242b1165bcfa229a9cadb)) + +## 3.9.14 (2021-10-28) + +* [bitnami/mongodb-sharded] Release 3.9.14 updating components versions ([4a1d9ce](https://github.com/bitnami/charts/commit/4a1d9ce7bb5f0cd84ec73245bdd3fe8731c90d78)) +* [bitnami/several] Regenerate README tables ([412cf6a](https://github.com/bitnami/charts/commit/412cf6a513cb0c03444a6e7811c6f27193239a10)) + +## 3.9.13 (2021-10-27) + +* [bitnami/mongodb-sharded] Release 3.9.13 updating components versions ([ddecda9](https://github.com/bitnami/charts/commit/ddecda9047db14997dac9147bf83a0f83095781b)) + +## 3.9.12 (2021-10-22) + +* [bitnami/several] Add chart info to NOTES.txt (#7889) ([a6751cd](https://github.com/bitnami/charts/commit/a6751cdd33c461fabbc459fbea6f219ec64ab6b2)), closes [#7889](https://github.com/bitnami/charts/issues/7889) + +## 3.9.11 (2021-10-19) + +* [bitnami/several] Change pullPolicy for bitnami-shell image (#7852) ([9711a33](https://github.com/bitnami/charts/commit/9711a33c6eec72ea79143c4b7574dbe6a148d6b2)), closes [#7852](https://github.com/bitnami/charts/issues/7852) +* [bitnami/several] Regenerate README tables ([dd25873](https://github.com/bitnami/charts/commit/dd2587368d006bcca6149be74d846752a15344b9)) + +## 3.9.10 (2021-10-14) + +* [bitnami/*] Generate READMEs (#7790) ([0833a8c](https://github.com/bitnami/charts/commit/0833a8c16300d68abf6030639c3479d8fb031e25)), closes [#7790](https://github.com/bitnami/charts/issues/7790) +* [bitnami/mongodb-sharded] Release 3.9.10 updating components versions ([f559caf](https://github.com/bitnami/charts/commit/f559cafd86cf5ede47033044e4971e9a56e72780)) + +## 3.9.9 (2021-10-13) + +* [bitnami/mongodb-sharded] Release 3.9.9 updating components versions ([d61b18f](https://github.com/bitnami/charts/commit/d61b18f2bc01c7a08d677bf9d6f5d788d85d6ec6)) + +## 3.9.8 (2021-10-01) + +* [bitnami/*] Generate READMEs with new generator version (#7614) ([e5ab2e6](https://github.com/bitnami/charts/commit/e5ab2e6ecdd6bce800863f154cda524ff9f6c117)), closes [#7614](https://github.com/bitnami/charts/issues/7614) +* [bitnami/rabbitmq-cluster-operator & mongodb-sharded] Fix Chart.yaml format (#7672) ([732b749](https://github.com/bitnami/charts/commit/732b74986440835a93a75ef0fc93b105d0418cfe)), closes [#7672](https://github.com/bitnami/charts/issues/7672) +* [bitnami/several] Regenerate README tables ([fa939b3](https://github.com/bitnami/charts/commit/fa939b373a54c01c20aa28cdd4e7cfb2953ce2a4)) + +## 3.9.7 (2021-09-19) + +* [bitnami/mongodb-sharded] Release 3.9.7 updating components versions ([6561763](https://github.com/bitnami/charts/commit/6561763c3d87e2c04cd7bf968f242e19db8ae047)) +* [bitnami/several] Regenerate README tables ([5c79422](https://github.com/bitnami/charts/commit/5c7942235d3169332e8dadb380cd757416f28946)) + +## 3.9.6 (2021-09-14) + +* [bitnami/mongodb-sharded] Release 3.9.6 updating components versions ([0b62bd2](https://github.com/bitnami/charts/commit/0b62bd23cb7875ec05f2c86b2c203eac935d0c6e)) + +## 3.9.5 (2021-09-14) + +* [bitnami/mongodb-sharded] Release 3.9.5 updating components versions ([c6834e8](https://github.com/bitnami/charts/commit/c6834e8af77986ced610c1520bfae49b10883c94)) + +## 3.9.4 (2021-09-14) + +* [bitnami/mongodb-sharded] Release 3.9.4 updating components versions ([41aba03](https://github.com/bitnami/charts/commit/41aba03f6cfe70cf8594e807833a1ba7aac22852)) +* [bitnami/several] Regenerate README tables ([9c82ba2](https://github.com/bitnami/charts/commit/9c82ba295d70b1cac50ab4d8d494fdbefc1ec0ac)) + +## 3.9.3 (2021-09-02) + +* [bitnami/mongodb-sharded] Release 3.9.3 updating components versions ([62a828b](https://github.com/bitnami/charts/commit/62a828bf8e78b33ef84363d6f9c6e2424a53a8a1)) +* [bitnami/several] Regenerate README tables ([da2513b](https://github.com/bitnami/charts/commit/da2513bf0a33819f3b1151d387c631a9ffdb03e2)) + +## 3.9.2 (2021-08-24) + +* [bitnami/mongodb-sharded] Release 3.9.2 updating components versions ([9484164](https://github.com/bitnami/charts/commit/9484164a859b1f15a4e198bf70f40d80fefc5316)) +* [bitnami/several] Regenerate README tables ([6c107e8](https://github.com/bitnami/charts/commit/6c107e835d6caf8db2e8b17dcd48c5971637e013)) + +## 3.9.1 (2021-08-11) + +* [bitnami/mongodb-sharded] Release 3.9.1 updating components versions ([77f00cf](https://github.com/bitnami/charts/commit/77f00cf18e3ee515806434818b70c8c308f7a505)) + +## 3.9.0 (2021-08-02) + +* [bitnami/mongodb-sharded] numactl flag for numa hardware (#7083) ([fab2792](https://github.com/bitnami/charts/commit/fab2792662969543bff3a616efb272c938fe7ff4)), closes [#7083](https://github.com/bitnami/charts/issues/7083) + +## 3.8.6 (2021-08-01) + +* [bitnami/mongodb-sharded] Release 3.8.6 updating components versions ([3515638](https://github.com/bitnami/charts/commit/35156388b3fb3722a517ab1f319ae05b60fd9917)) +* [bitnami/several] Update READMEs (#7108) ([44961d9](https://github.com/bitnami/charts/commit/44961d9cdfae1b0d06808124c4b47e8adc3de146)), closes [#7108](https://github.com/bitnami/charts/issues/7108) + +## 3.8.5 (2021-07-30) + +* [bitnami/mongodb-sharded] Release 3.8.5 updating components versions ([cff5375](https://github.com/bitnami/charts/commit/cff5375fad7b173a5de22c9094e60e84f030a43d)) + +## 3.8.4 (2021-07-29) + +* [bitnami/mongodb-sharded] Fix helm error in arbiter statefulset (#7094) ([faf30c4](https://github.com/bitnami/charts/commit/faf30c45506b32d84a6764545232073b83257d00)), closes [#7094](https://github.com/bitnami/charts/issues/7094) + +## 3.8.3 (2021-07-28) + +* [bitnami/several] Fix default values and regenerate README (III) (#7000) ([4d4fe83](https://github.com/bitnami/charts/commit/4d4fe8320775922d17c88abc6e16d146a4dabdae)), closes [#7000](https://github.com/bitnami/charts/issues/7000) + +## 3.8.2 (2021-07-27) + +* [bitnami/several] Bump version and update READMEs (#7069) ([6340bff](https://github.com/bitnami/charts/commit/6340bff66f93c8c797bda3ca0842e4bf770059f1)), closes [#7069](https://github.com/bitnami/charts/issues/7069) + +## 3.8.1 (2021-07-27) + +* Replace strings with ™ in the README files (#7066) ([d298b49](https://github.com/bitnami/charts/commit/d298b4996da33c9580c2594e6dc8ad665dd0ebab)), closes [#7066](https://github.com/bitnami/charts/issues/7066) + +## 3.8.0 (2021-07-27) + +* [bitnami/several] Add diagnostic mode (#7012) ([f1344b0](https://github.com/bitnami/charts/commit/f1344b0361c5a93bf971d08f0fc64d3c8588cbf9)), closes [#7012](https://github.com/bitnami/charts/issues/7012) + +## 3.7.6 (2021-07-24) + +* [bitnami/mongodb-sharded] Release 3.7.6 updating components versions ([61c3eea](https://github.com/bitnami/charts/commit/61c3eea6e28ac463517ff43858f95759d30d6f37)) + +## 3.7.5 (2021-07-22) + +* [bitnami/mongodb-sharded] Fix index in service per replicas context (#7033) ([59af7fd](https://github.com/bitnami/charts/commit/59af7fde250f37d713116563585b859eb9377a97)), closes [#7033](https://github.com/bitnami/charts/issues/7033) + +## 3.7.4 (2021-07-19) + +* [bitnami/mongodb-sharded] Release 3.7.4 updating components versions ([07c8e1f](https://github.com/bitnami/charts/commit/07c8e1f793bf2e664f1ab3db10822ccfd73e26fc)) + +## 3.7.3 (2021-07-16) + +* [bitnami/*] Adapt values.yaml of MongoDB Sharded, Moodle and MXNet charts (#6901) ([7a0b468](https://github.com/bitnami/charts/commit/7a0b468e04a794695acc64510f1db9f850c4f866)), closes [#6901](https://github.com/bitnami/charts/issues/6901) + +## 3.7.2 (2021-07-15) + +* [bitnami/mongodb-sharded] Release 3.7.2 updating components versions ([c6915fe](https://github.com/bitnami/charts/commit/c6915fef08b3fb9da0e15a4247696719de8a68a6)) + +## 3.7.1 (2021-07-07) + +* [bitnami/mongodb-sharded] Fix issue when setting a custom service name (#6829) ([ef3e26b](https://github.com/bitnami/charts/commit/ef3e26bf76738aecef55ee1edbd16d348f58e498)), closes [#6829](https://github.com/bitnami/charts/issues/6829) + +## 3.7.0 (2021-06-22) + +* [bitnami/mongodb-sharded] Enabled support for priorityClassName (#6706) ([a29650a](https://github.com/bitnami/charts/commit/a29650a8485bbfdfc5b584e1aea9e6ee3527b7d1)), closes [#6706](https://github.com/bitnami/charts/issues/6706) + +## 3.6.1 (2021-06-21) + +* [bitnami/mongodb-sharded] Release 3.6.1 updating components versions ([055f260](https://github.com/bitnami/charts/commit/055f26088070aefe4f4e6d128da4684f63b552aa)) + +## 3.6.0 (2021-06-11) + +* [bitnami/mongodb-sharded] Added `dataNodeSelectorLoopId` and `dataNodeTolerationLoopId` to /shard/sh ([ccae74f](https://github.com/bitnami/charts/commit/ccae74f2316acf0fe879b10a914739047a874178)), closes [#6601](https://github.com/bitnami/charts/issues/6601) + +## 3.5.0 (2021-06-09) + +* [bitnami/mongodb-sharded] add per mongos replica service support (#6569) ([f1fb7ac](https://github.com/bitnami/charts/commit/f1fb7ac15e144a0ae2037898aabde943cbd678f0)), closes [#6569](https://github.com/bitnami/charts/issues/6569) + +## 3.4.7 (2021-05-28) + +* [bitnami/mongodb-sharded] Release 3.4.7 updating components versions ([3f352df](https://github.com/bitnami/charts/commit/3f352dff97d8d0de167c00a2b3efe5a543876e3a)) + +## 3.4.6 (2021-05-07) + +* [bitnami/mongodb-sharded] Release 3.4.6 updating components versions ([08c37c7](https://github.com/bitnami/charts/commit/08c37c77b034c4f71d9a7486142faf91b5307cac)) + +## 3.4.5 (2021-04-07) + +* [bitnami/mongodb-sharded] Release 3.4.5 updating components versions ([9aeb25d](https://github.com/bitnami/charts/commit/9aeb25df7738e51ab2843b36790fc656e9e9b0ac)) + +## 3.4.4 (2021-03-19) + +* [bitnami/mongodb-sharded] Release 3.4.4 updating components versions ([02a3f8d](https://github.com/bitnami/charts/commit/02a3f8dc6f7d79008cba0d302f809271460013c0)) + +## 3.4.3 (2021-03-14) + +* [bitnami/mongodb-sharded] Release 3.4.3 updating components versions ([ff9c87b](https://github.com/bitnami/charts/commit/ff9c87bc7323be139dd099d7b5953e7d5ac40e16)) + +## 3.4.2 (2021-03-08) + +* [bitnami/mongodb-sharded] Add affinity option dataNodeLoopId to arbiter statefulset (#5680) ([c5001d3](https://github.com/bitnami/charts/commit/c5001d384329da27530054045427a56255bf4ee4)), closes [#5680](https://github.com/bitnami/charts/issues/5680) + +## 3.4.1 (2021-03-04) + +* [bitnami/*] Remove minideb mentions (#5677) ([870bc4d](https://github.com/bitnami/charts/commit/870bc4dba1fc3aa55dd157da6687b25e8d352206)), closes [#5677](https://github.com/bitnami/charts/issues/5677) + +## 3.4.0 (2021-02-12) + +* [bitnami/mongodb-sharded] Add metrics.containerPort (#5482) ([d99d0c8](https://github.com/bitnami/charts/commit/d99d0c88965769f11e1e2a08633181dee0ee1456)), closes [#5482](https://github.com/bitnami/charts/issues/5482) + +## 3.3.5 (2021-02-12) + +* [bitnami/mongodb-sharded] Release 3.3.5 updating components versions ([bdd6032](https://github.com/bitnami/charts/commit/bdd6032e353502d145e044afb877a0ba2afbd6b9)) + +## 3.3.4 (2021-02-11) + +* [bitnami/sharded,fluentd,kibana] Unify global section in values (#5458) ([05bcf10](https://github.com/bitnami/charts/commit/05bcf103092567a3cfa5475fdd5ad8e5c874e564)), closes [#5458](https://github.com/bitnami/charts/issues/5458) + +## 3.3.3 (2021-02-09) + +* [bitnami/mongodb-sharded] Release 3.3.3 updating components versions ([a23f2d5](https://github.com/bitnami/charts/commit/a23f2d5ea5a566b0911e45e48dbd27d764b50473)) + +## 3.3.2 (2021-02-09) + +* Add registered icon to all the MongoDB references (#5426) ([56f2088](https://github.com/bitnami/charts/commit/56f20884267e56175695b2917f7704b9510f4ba6)), closes [#5426](https://github.com/bitnami/charts/issues/5426) + +## 3.3.1 (2021-02-05) + +* [bitnami/mongodb-sharded] Release 3.3.1 updating components versions ([8408c4c](https://github.com/bitnami/charts/commit/8408c4cfc1c4cecc4f16b7ad6e75b506c38152f9)) + +## 3.3.0 (2021-01-28) + +* [bitnami/mongodb-sharded] Add hostAliases (#5272) ([a632890](https://github.com/bitnami/charts/commit/a6328900b1ef664bc9bba51c1b46a5f589ff72dc)), closes [#5272](https://github.com/bitnami/charts/issues/5272) + +## 3.2.13 (2021-01-26) + +* [bitnami/mongodb-sharded] Release 3.2.13 updating components versions ([078235e](https://github.com/bitnami/charts/commit/078235e5a45897ee42f6854d187afbda60b359aa)) + +## 3.2.12 (2021-01-22) + +* [bitnami/mongodb-sharded] Release 3.2.12 updating components versions ([da21d90](https://github.com/bitnami/charts/commit/da21d90ee1ac4cb1cf32e8de6780867b8280341e)) + +## 3.2.11 (2021-01-19) + +* [bitnami/*] Change helm version in the prerequisites (#5090) ([c5e67a3](https://github.com/bitnami/charts/commit/c5e67a388743cbee28439d2cabca27884b9daf97)), closes [#5090](https://github.com/bitnami/charts/issues/5090) +* [bitnami/mongodb-sharded] Drop values-production.yaml support (#5120) ([22e4ba3](https://github.com/bitnami/charts/commit/22e4ba34f76398ce9735e27299e1e037046dc445)), closes [#5120](https://github.com/bitnami/charts/issues/5120) + +## 3.2.10 (2021-01-11) + +* [bitnami/mongodb-sharded] Add again removed affinity option (dataNodeLoopId) (#4934) ([5d25492](https://github.com/bitnami/charts/commit/5d25492a7e1b78dc954c6a5e88914ffeb502d165)), closes [#4934](https://github.com/bitnami/charts/issues/4934) +* [bitnami/mongodb-sharded] Release 3.2.10 updating components versions ([d504676](https://github.com/bitnami/charts/commit/d504676bbadaf70d21f41c6a0c45d869893fb542)) + +## 3.2.9 (2021-01-11) + +* [bitnami/mongodb-sharded] Release 3.2.9 updating components versions ([c7291db](https://github.com/bitnami/charts/commit/c7291dbc6ecc3eed53cfb812aef63924cabb609d)) + +## 3.2.8 (2021-01-10) + +* Fix probe error messages (#4876) ([79889dc](https://github.com/bitnami/charts/commit/79889dc9fd37828317d4dc1698bcd5e428510665)), closes [#4876](https://github.com/bitnami/charts/issues/4876) + +## 3.2.7 (2020-12-23) + +* [bitnami/mongodb-sharded] fix for #4536 (#4766) ([00927f0](https://github.com/bitnami/charts/commit/00927f0a12eca8e6f9b9379fc6944d56a568dc49)), closes [#4536](https://github.com/bitnami/charts/issues/4536) [#4766](https://github.com/bitnami/charts/issues/4766) +* [bitnami/mongodb-sharded] Fix missing chart name & values in values-production.yaml (#4812) ([dd20da4](https://github.com/bitnami/charts/commit/dd20da4d4a939071c0acd9b57f0586ac51d5ac24)), closes [#4812](https://github.com/bitnami/charts/issues/4812) + +## 3.2.6 (2020-12-22) + +* [bitnami/mongodb-sharded] Release 3.2.6 updating components versions ([bd037e2](https://github.com/bitnami/charts/commit/bd037e2bcf01861b2e14521cf4c5e25bea98f585)) + +## 3.2.5 (2020-12-16) + +* [bitnami/mongodb-sharded] Release 3.2.5 updating components versions ([6281d55](https://github.com/bitnami/charts/commit/6281d556884f2abe6ff377db928c28f6983a56c8)) + +## 3.2.4 (2020-12-14) + +* [bitnami/*] fix typos (#4699) ([49adc63](https://github.com/bitnami/charts/commit/49adc63b672da976c55af2e077aa5648a357b77f)), closes [#4699](https://github.com/bitnami/charts/issues/4699) +* [bitnami/mongodb-sharded] Changed mongos kind to statefulset (#4629) ([a3c4f5e](https://github.com/bitnami/charts/commit/a3c4f5ebc4db569a102e461274f57b60c1b5b856)), closes [#4629](https://github.com/bitnami/charts/issues/4629) + +## 3.2.3 (2020-12-11) + +* [bitnami/mongodb-sharded] fix for ConfigMaps (#4688) ([c9feab4](https://github.com/bitnami/charts/commit/c9feab4c1ed294412ae1a98e2d92a62930b007e5)), closes [#4688](https://github.com/bitnami/charts/issues/4688) + +## 3.2.2 (2020-12-11) + +* [bitnami/*] Update dependencies (#4694) ([2826c12](https://github.com/bitnami/charts/commit/2826c125b42505f28431301e3c1bbe5366e47a01)), closes [#4694](https://github.com/bitnami/charts/issues/4694) + +## 3.2.1 (2020-12-11) + +* [bitnami/mongodb-sharded] fix for #4684 (#4685) ([0a25172](https://github.com/bitnami/charts/commit/0a251728055c57025a5a642e964e989e7af21308)), closes [#4684](https://github.com/bitnami/charts/issues/4684) [#4685](https://github.com/bitnami/charts/issues/4685) + +## 3.2.0 (2020-12-09) + +* [bitnami/mongodb-sharded] Use PodMonitor instead of ServiceMonitor to configure Prom. Operator to sc ([80d2bee](https://github.com/bitnami/charts/commit/80d2beeb75436e21781257ab1107a3d9121277a7)), closes [#4662](https://github.com/bitnami/charts/issues/4662) + +## 3.1.1 (2020-12-02) + +* [bitnami/mongodb-sharded] Add missing extraEnvs to statefulsets (#4573) ([b51fb8a](https://github.com/bitnami/charts/commit/b51fb8aa512e0c9c2d6447b4fe1c52698259e811)), closes [#4573](https://github.com/bitnami/charts/issues/4573) + +## 3.1.0 (2020-11-26) + +* [bitnami/*] Affinity based on common presets (v) (#4494) ([f5abfb8](https://github.com/bitnami/charts/commit/f5abfb8e423872199518733bde449d57392eab0a)), closes [#4494](https://github.com/bitnami/charts/issues/4494) + +## 3.0.4 (2020-11-24) + +* [bitnami/mongodb-sharded] Delete initScripts from mongos deployment (#4458) ([be58a83](https://github.com/bitnami/charts/commit/be58a83cdc91b53d998a4deeda9fd3360db64053)), closes [#4458](https://github.com/bitnami/charts/issues/4458) +* Update README.md ([c0555c1](https://github.com/bitnami/charts/commit/c0555c1c11728a930597af2fa10ba7682331c57b)) + +## 3.0.3 (2020-11-17) + +* [bitnami/mongodb-sharded] Release 3.0.3 updating components versions ([1c60534](https://github.com/bitnami/charts/commit/1c60534e750fb1e849f419e884ceb79e3418170e)) + +## 3.0.2 (2020-11-14) + +* [bitnami/mongodb-sharded] Release 3.0.2 updating components versions ([d144144](https://github.com/bitnami/charts/commit/d14414463732130f804620ceb085459d0597baec)) + +## 3.0.1 (2020-11-13) + +* [bitnami/mongodb-sharded] Release 3.0.1 updating components versions ([ec78a6f](https://github.com/bitnami/charts/commit/ec78a6fa86b3bc3959e1aa3d170c817fd2764842)) + +## 3.0.0 (2020-11-11) + +* [bitnami/*] Include link to Troubleshootin guide on README.md (#4136) ([c08a20e](https://github.com/bitnami/charts/commit/c08a20e3db004215383004ff023a73fcc2522e72)), closes [#4136](https://github.com/bitnami/charts/issues/4136) +* [bitnami/mongodb-sharded] Major version. Adapt Chart to apiVersion: v2 (#4268) ([a72cfea](https://github.com/bitnami/charts/commit/a72cfea4a298c4d107c3cefd4f30eb0346e88892)), closes [#4268](https://github.com/bitnami/charts/issues/4268) + +## 2.1.5 (2020-10-27) + +* [bitnami/mongodb-sharded] fix: do not create secret when existingSecret (#4084) ([c4e157c](https://github.com/bitnami/charts/commit/c4e157c06017bbd47ea40172881bf1cf1db31941)), closes [#4084](https://github.com/bitnami/charts/issues/4084) + +## 2.1.4 (2020-10-21) + +* [bitnami/mongodb-sharded] Release 2.1.4 updating components versions ([3f96b12](https://github.com/bitnami/charts/commit/3f96b120eb4bb7c6792231f2da30c8eb3e47a165)) + +## 2.1.3 (2020-10-01) + +* [bitnami/mongodb-sharded] Add annotation to service (#3709) ([97c3ca4](https://github.com/bitnami/charts/commit/97c3ca4fc9a197d88fb0b6fed16c53302b7a2a71)), closes [#3709](https://github.com/bitnami/charts/issues/3709) [#3695](https://github.com/bitnami/charts/issues/3695) +* bump chart version number (#3828) ([ad31ac7](https://github.com/bitnami/charts/commit/ad31ac720ebc10e7b3b17f84b0b5813cdb90110f)), closes [#3828](https://github.com/bitnami/charts/issues/3828) + +## 2.1.2 (2020-09-21) + +* [bitnami/mongodb-sharded] Release 2.1.2 updating components versions ([3b91082](https://github.com/bitnami/charts/commit/3b910825b044d69ddb8438d0bc1793c421de10c1)) + +## 2.1.1 (2020-09-09) + +* [bitnami/metrics-server] Add source repo (#3577) ([1ed12f9](https://github.com/bitnami/charts/commit/1ed12f96af75322b46afdb2b3d9907c11b13f765)), closes [#3577](https://github.com/bitnami/charts/issues/3577) +* [bitnami/mongodb-sharded] Release 2.1.1 updating components versions ([186df7a](https://github.com/bitnami/charts/commit/186df7ad5855ddd65ac6e8f55dadfc2e158ab08f)) + +## 2.1.0 (2020-09-01) + +* [bitnami/mongodb-sharded] Add ServiceAccount (#3432) (#3442) ([32bf844](https://github.com/bitnami/charts/commit/32bf8448baa08c14b80b834efa58b071d1a21963)), closes [#3432](https://github.com/bitnami/charts/issues/3432) [#3442](https://github.com/bitnami/charts/issues/3442) + +## 2.0.0 (2020-08-28) + +* Update Chart.yaml (#3541) ([6b8bff3](https://github.com/bitnami/charts/commit/6b8bff3ddf2e4fdba6fafdf095750cc351edd79f)), closes [#3541](https://github.com/bitnami/charts/issues/3541) + +## 1.6.7 (2020-08-27) + +* [bitnami/mongodb-sharded] Add notes to upgrade to 2.0.0 (#3512) ([614949f](https://github.com/bitnami/charts/commit/614949fff2e5a2fa96ca20c9a02dbff7498f0476)), closes [#3512](https://github.com/bitnami/charts/issues/3512) +* [bitnami/mongodb-sharded] Release 1.6.7 updating components versions ([1831136](https://github.com/bitnami/charts/commit/18311369fa24d3c220ba1d4386d023cd2dd1f923)) + +## 1.6.6 (2020-08-26) + +* [bitnami/mongodb-sharded] Update example for multiple variables in --set (#3500) ([b0d78f1](https://github.com/bitnami/charts/commit/b0d78f1c93c8d459e21757652b30eac7fdaeb9f0)), closes [#3500](https://github.com/bitnami/charts/issues/3500) + +## 1.6.5 (2020-08-21) + +* [bitnami/mongodb-sharded] Release 1.6.5 updating components versions ([a3f7a07](https://github.com/bitnami/charts/commit/a3f7a078a4d19878e0837d406d59939671307708)) + +## 1.6.4 (2020-08-19) + +* update ReadME by correcting configs parms (#3458) ([16aa05a](https://github.com/bitnami/charts/commit/16aa05a3f3d7c238cdf1254061caeeb482f4dd0c)), closes [#3458](https://github.com/bitnami/charts/issues/3458) + +## 1.6.3 (2020-08-07) + +* [bitnami/mongodb-sharded] Release 1.6.3 updating components versions ([72250e1](https://github.com/bitnami/charts/commit/72250e13a3f409d876144ff5b0182b4ae7debc1d)) + +## 1.6.2 (2020-08-05) + +* [bitnami/*] Fix TL;DR typo in READMEs (#3280) ([3d7ab40](https://github.com/bitnami/charts/commit/3d7ab406fecd64f1af25f53e7d27f03ec95b29a4)), closes [#3280](https://github.com/bitnami/charts/issues/3280) +* [bitnami/mongodb-sharded] Release 1.6.2 updating components versions ([32b5be3](https://github.com/bitnami/charts/commit/32b5be3e66cc15bb33e0309394efaac7a530bb3f)) + +## 1.6.1 (2020-07-28) + +* [bitnami/mongodb-sharded] Fix default image and tag in README.md. (#3184) ([06ffb6e](https://github.com/bitnami/charts/commit/06ffb6ec8ddbaecaf782dcf5e5ca22c5e9936266)), closes [#3184](https://github.com/bitnami/charts/issues/3184) + +## 1.6.0 (2020-07-27) + +* [bitnami/mongodb-sharded] add podManagementPolicy config for statefulsets to enable parallel startup ([80fdb51](https://github.com/bitnami/charts/commit/80fdb51b501324c284955d7a5a23635d57da2ce3)), closes [#3234](https://github.com/bitnami/charts/issues/3234) + +## 1.5.9 (2020-07-27) + +* Fix bad scope (#3215) ([4b2fb6a](https://github.com/bitnami/charts/commit/4b2fb6a7c246699060f3950a8163421f3b4fe18e)), closes [#3215](https://github.com/bitnami/charts/issues/3215) +* Fix missing templating to generate initcontainers for mongodb-sharded components (#3211) ([75b1877](https://github.com/bitnami/charts/commit/75b1877e0e85daf8ed09216e43cf723a3cdae270)), closes [#3211](https://github.com/bitnami/charts/issues/3211) + +## 1.5.8 (2020-07-27) + +* Fix bad cm name ref (#3229) ([ab3367a](https://github.com/bitnami/charts/commit/ab3367a104538acc7be2d15d44724af6f2b6d6cf)), closes [#3229](https://github.com/bitnami/charts/issues/3229) + +## 1.5.7 (2020-07-22) + +* [bitnami/mongodb-sharded] Release 1.5.7 updating components versions ([442635c](https://github.com/bitnami/charts/commit/442635c30773d0c9d56cf3cc01a011266cb97680)) + +## 1.5.6 (2020-07-21) + +* [bitnami/all] Add categories (#3075) ([63bde06](https://github.com/bitnami/charts/commit/63bde066b87a140fab52264d0522401ab3d63509)), closes [#3075](https://github.com/bitnami/charts/issues/3075) +* [bitnami/mongodb-sharded] Fix initscriptsCM and initScriptsSecret usage (#3002) ([b44b082](https://github.com/bitnami/charts/commit/b44b08288e1f94c43b07dc60c0d608c0cfbce93a)), closes [#3002](https://github.com/bitnami/charts/issues/3002) + +## 1.5.5 (2020-07-03) + +* [bitnami/mongodb-sharded] Release 1.5.5 updating components versions ([2e34c04](https://github.com/bitnami/charts/commit/2e34c04b3099c905c32758a0cb9da9680e864337)) + +## 1.5.4 (2020-07-03) + +* fix PPRIMARY in ENV VARS (#3022) ([a9a2b64](https://github.com/bitnami/charts/commit/a9a2b64a358b0b78b92e52d4a5947ecacbd49506)), closes [#3022](https://github.com/bitnami/charts/issues/3022) + +## 1.5.3 (2020-06-30) + +* [bitnami/mongodb-sharded] Release 1.5.3 updating components versions ([b8faa7f](https://github.com/bitnami/charts/commit/b8faa7ffd32fd5286808999dc2509f10c6a52624)) + +## 1.5.2 (2020-06-30) + +* [bitnami/mongodb-sharded] Adapt env. variables (#2969) ([00f8fce](https://github.com/bitnami/charts/commit/00f8fcea69a0fa357ac63a6cc9b52b3776303bf5)), closes [#2969](https://github.com/bitnami/charts/issues/2969) + +## 1.5.1 (2020-06-24) + +* [bitnami/mongodb-sharded] Release 1.5.1 updating components versions ([bf88b0b](https://github.com/bitnami/charts/commit/bf88b0beb7b1d57f8c56f167727488cac5953af0)) + +## 1.5.0 (2020-06-24) + +* [bitnami/mongodb-sharded] Allow only deploying mongos. (#2901) ([ea945f2](https://github.com/bitnami/charts/commit/ea945f2f5ccfcecb62ae26c88944246ff3c0ed21)), closes [#2901](https://github.com/bitnami/charts/issues/2901) + +## 1.4.4 (2020-06-15) + +* [bitnami/mongodb-sharded] Release 1.4.4 updating components versions ([d917f8f](https://github.com/bitnami/charts/commit/d917f8fecdc357cb686b439e13c79fcefaadac2b)) + +## 1.4.3 (2020-06-15) + +* [bitnami/mongodb-sharded] Fix metric collection when using a password file (#2800) ([896208e](https://github.com/bitnami/charts/commit/896208ea4fd121c7b01be79cefb30c3e3f9cdc08)), closes [#2800](https://github.com/bitnami/charts/issues/2800) + +## 1.4.2 (2020-06-11) + +* [bitnami/mongodb-sharded] Release 1.4.2 updating components versions ([cdaf6b1](https://github.com/bitnami/charts/commit/cdaf6b123d05aca3b5dca82618e786711948b97b)) +* [bitnami/several] Add instructions about how to use different branches (#2785) ([c315cb0](https://github.com/bitnami/charts/commit/c315cb078a4cef97ff53cf2066b34add3f2926ba)), closes [#2785](https://github.com/bitnami/charts/issues/2785) + +## 1.4.1 (2020-06-04) + +* [bitnami/mongodb-sharded] Release 1.4.1 updating components versions ([dc4ad22](https://github.com/bitnami/charts/commit/dc4ad223c68c87f066a498f72f1b1c6a22802519)) + +## 1.4.0 (2020-06-04) + +* mongodb-sharded: Add pod disruption budgets (#2663) ([071c4df](https://github.com/bitnami/charts/commit/071c4dfe66f060306595ba6e3e68be24a401f290)), closes [#2663](https://github.com/bitnami/charts/issues/2663) + +## 1.3.3 (2020-06-02) + +* [bitnami/mongodb-sharded] Release 1.3.3 updating components versions ([980b6c8](https://github.com/bitnami/charts/commit/980b6c8e2b8376680ce1c5ffa68fcd013950ce9b)) + +## 1.3.2 (2020-05-21) + +* [bitnami/mongodb-sharded] Release 1.3.2 updating components versions ([409ad4d](https://github.com/bitnami/charts/commit/409ad4d10fa150d0f5c8563ecf8e746f533fecf7)) +* update bitnami/common to be compatible with helm v2.12+ (#2615) ([c7751eb](https://github.com/bitnami/charts/commit/c7751eb5764e468e1854b58a1b8491d2b13e0a4a)), closes [#2615](https://github.com/bitnami/charts/issues/2615) + +## 1.3.1 (2020-04-29) + +* [bitnami/mongodb-sharded] Release 1.3.1 updating components versions ([a0f9f97](https://github.com/bitnami/charts/commit/a0f9f97ed0a05ad6e26ee6ad492326830afb9f67)) + +## 1.3.0 (2020-04-29) + +* [bitnami/mongodb-sharded] Add metrics exporter for shard arbiter (#2424) ([ad91d98](https://github.com/bitnami/charts/commit/ad91d9802bb79e835308e0c172a23aba7a383fd4)), closes [#2424](https://github.com/bitnami/charts/issues/2424) + +## 1.2.0 (2020-04-24) + +* [bitnami/mongodb-sharded] add sessionAffinity setting for k8s service (#2375) ([105b955](https://github.com/bitnami/charts/commit/105b955611cd3098eda0c40bc860daac87acab5a)), closes [#2375](https://github.com/bitnami/charts/issues/2375) + +## 1.1.6 (2020-04-23) + +* [bitnami/mongodb-sharded] Release 1.1.6 updating components versions ([5e268b3](https://github.com/bitnami/charts/commit/5e268b3cb3c6daa31b5fd83c73eb0f2618e6d8ec)) + +## 1.1.5 (2020-04-22) + +* [bitnami/mongodb-sharded] Release 1.1.5 updating components versions ([8832a7f](https://github.com/bitnami/charts/commit/8832a7fb471a44c0d1e3b725dd9118c7adc2e697)) + +## 1.1.4 (2020-04-17) + +* [bitnami/mongodb-sharded] Release 1.1.4 updating components versions ([7f2ad96](https://github.com/bitnami/charts/commit/7f2ad96c41d2819ad943f73d9b1f2d4fd4ce12ea)) + +## 1.1.3 (2020-04-16) + +* [bitnami/mongodb-sharded] Release 1.1.3 updating components versions ([49d0bef](https://github.com/bitnami/charts/commit/49d0befe2d9631d1a479eb83edb3be9ff90ce066)) + +## 1.1.2 (2020-04-14) + +* [bitnami/mongodb-sharded ]- Add full support of sidecar containers. (#2229) ([75aa09a](https://github.com/bitnami/charts/commit/75aa09ab6c444431e98398482870f48445edf17f)), closes [#2229](https://github.com/bitnami/charts/issues/2229) + +## 1.1.1 (2020-04-06) + +* [bitnami/mongodb-sharded] Release 1.1.1 updating components versions ([4781a8c](https://github.com/bitnami/charts/commit/4781a8c12e8ee04e2da925e1f07cccf59f04010f)) + +## 1.1.0 (2020-04-06) + +* [bitnami/mongodb-sharded] add shard index as a label (#2166) ([8d676ab](https://github.com/bitnami/charts/commit/8d676ab2873639be8593a6e4cc75e7c63c48bbdd)), closes [#2166](https://github.com/bitnami/charts/issues/2166) + +## 1.0.17 (2020-04-03) + +* [bitnami/mongodb-sharded] Release 1.0.17 updating components versions ([283256b](https://github.com/bitnami/charts/commit/283256b2173d649b117de18d22968230b87d9f34)) + +## 1.0.16 (2020-03-26) + +* [bitnami/mongodb-sharded] Release 1.0.16 updating components versions ([bb28a54](https://github.com/bitnami/charts/commit/bb28a547637d99c1c621659ed78331028f0422d5)) + +## 1.0.15 (2020-03-24) + +* [bitnami/mongodb-sharded] Release 1.0.15 updating components versions ([e0bfee9](https://github.com/bitnami/charts/commit/e0bfee916c9294cf8228dd62ed07f5fdb675db3e)) +* [bitnami/mongodb] Issue 2096. Encode @ : in username / password when connect to mongo (#2099) ([39ec8d6](https://github.com/bitnami/charts/commit/39ec8d6dec88339da666abf036c78e7fdd41a3cd)), closes [#2099](https://github.com/bitnami/charts/issues/2099) + +## 1.0.14 (2020-03-12) + +* [bitnami/mongodb-sharded] Release 1.0.14 updating components versions ([20ecfbd](https://github.com/bitnami/charts/commit/20ecfbd4de30b473d91059d409830c0fc705074a)) + +## 1.0.13 (2020-03-11) + +* Move charts from upstreamed folder to bitnami (#2032) ([a0e44f7](https://github.com/bitnami/charts/commit/a0e44f7d6a10b8b5643186130ea420887cb72c7c)), closes [#2032](https://github.com/bitnami/charts/issues/2032) + +## 1.0.12 (2020-03-10) + +* [bitnami/mongodb-sharded] Release 1.0.12 updating components versions ([82fb046](https://github.com/bitnami/charts/commit/82fb0462333fe5ee5fd7ecceb4d95bde731f6828)) + +## 1.0.11 (2020-02-26) + +* [bitnami/mongodb-sharded] Release 1.0.11 updating components versions ([394a1a5](https://github.com/bitnami/charts/commit/394a1a5fef8d05b10dc1e7507ac393e0667f2930)) + +## 1.0.10 (2020-02-25) + +* [bitnami/mongodb-sharded] Fix port for service type LoadBalancer in NOTES.txt (#1972) ([3d0fcb8](https://github.com/bitnami/charts/commit/3d0fcb89530bb752018e8c74ea996109b66adf1a)), closes [#1972](https://github.com/bitnami/charts/issues/1972) + +## 1.0.9 (2020-02-25) + +* [bitnami/mongodb-sharded] Template kubectl run in NOTES.txt to take registry/repo overrides into acc ([4ca5d7c](https://github.com/bitnami/charts/commit/4ca5d7caa6e4250902660b84d5728da14698fa1b)), closes [#1967](https://github.com/bitnami/charts/issues/1967) + +## 1.0.8 (2020-02-18) + +* [bitnami/mongodb-sharded] Release 1.0.8 updating components versions ([3bae98b](https://github.com/bitnami/charts/commit/3bae98b46af8d0534a7f1aefff0a08b5be06152b)) +* [bitnami/several] Adapt READMEs and helpers to Helm 3 (#1911) ([40ee57c](https://github.com/bitnami/charts/commit/40ee57cf5164717357e1627b55bf25f59c40fbd1)), closes [#1911](https://github.com/bitnami/charts/issues/1911) + +## 1.0.7 (2020-02-10) + +* [bitnami/several] Replace stretch by buster in minideb secondary containers (#1900) ([678febc](https://github.com/bitnami/charts/commit/678febc237594606f2505ba98c651a8ab8f484ab)), closes [#1900](https://github.com/bitnami/charts/issues/1900) + +## 1.0.6 (2020-02-06) + +* [bitnami/mongodb-sharded] Remove unused vars (#1883) ([9697e3d](https://github.com/bitnami/charts/commit/9697e3d4488a962f9ba548bc9f8696cd93e040e3)), closes [#1883](https://github.com/bitnami/charts/issues/1883) + +## 1.0.5 (2020-01-24) + +* [bitnami/mongodb-sharded] Release 1.0.5 updating components versions ([119236e](https://github.com/bitnami/charts/commit/119236ef7e239d23d76c7ecbe8599bd634e6620e)) +* Update README.md ([c6ee209](https://github.com/bitnami/charts/commit/c6ee209d14c3eb9048e888a1c98df8274ca493e5)) + +## 1.0.4 (2020-01-15) + +* Fix install instructions for mongodb-sharded ([266f3dd](https://github.com/bitnami/charts/commit/266f3dd6dacef52751c19ccb56c30d6356f3aeb8)) + +## 1.0.3 (2020-01-15) + +* [bitnami/mongodb-sharded] Release 1.0.3 updating components versions ([cae86bc](https://github.com/bitnami/charts/commit/cae86bcffe5c8ad89b0fb6c79c958007c3c48b57)) + +## 1.0.2 (2019-12-17) + +* [bitnami/mongodb-sharded] Release 1.0.2 updating components versions ([f9c8264](https://github.com/bitnami/charts/commit/f9c8264c1ed4722e1d4f09664951ee14423f543a)) + +## 1.0.1 (2019-12-06) + +* [bitnami/mongodb-sharded] Release 1.0.1 updating components versions ([91d26b4](https://github.com/bitnami/charts/commit/91d26b4be5db93c8ef82de0cb8627239085970aa)) + +## 1.0.0 (2019-12-03) + +* [bitnami/mongodb-sharded] Set persistence settings separate in data nodes and config servers ([8d89bbe](https://github.com/bitnami/charts/commit/8d89bbe37309b02d1664cc70f9cd73b901f82f47)) + +## 0.1.4 (2019-12-03) + +* [bitnami/mongodb-sharded] Fix incorrect resource allocation in data nodes ([738d6fb](https://github.com/bitnami/charts/commit/738d6fbc8ae2ad801a4200849840780c8caa150f)) + +## 0.1.3 (2019-11-26) + +* [bitnami/mongodb-sharded] Fix system log verbosity ([47740e7](https://github.com/bitnami/charts/commit/47740e7226bc67910f04fd98f770d6ee04aec789)) + +## 0.1.2 (2019-11-26) + +* [bitnami/mongodb-sharded] 0.1.1 -> 0.1.2 ([6d7c776](https://github.com/bitnami/charts/commit/6d7c77698f7f51602b45b539c4f560a5fdfdbbde)) +* Use named port for mongodb-sharded ServiceMonitor ([80e1c4d](https://github.com/bitnami/charts/commit/80e1c4d2ff93973dcd8a4c6241cf55a8de4cfa3d)) + +## 0.1.1 (2019-11-08) + +* [bitnami/mongodb-sharded] Fix incorrect nindent in volumePermissions ([8982222](https://github.com/bitnami/charts/commit/89822223131e020690d250bd4c2c0959051058b5)) +* Add image pull secrets ([2fdf854](https://github.com/bitnami/charts/commit/2fdf854d1b87a2493d4d7be694c388cb6c0e0ec9)) +* Add runAsNonRoot ([0e28779](https://github.com/bitnami/charts/commit/0e287798f4c276c8db2c00ab12a0dffd60d5503e)) +* change tag ([a07c313](https://github.com/bitnami/charts/commit/a07c313f0433bf1a7227e2a2f61a55e4f7a514ef)) +* Typo ([ba7d2df](https://github.com/bitnami/charts/commit/ba7d2df3a9dbc14d7dbf5160475b737414288255)) +* Update values-production.yaml ([174b16a](https://github.com/bitnami/charts/commit/174b16a97ed69762316b7f558b43170cbfb4839e)) +* Update values.yaml ([a384f62](https://github.com/bitnami/charts/commit/a384f6280e471493a0c6e4c675a73514b52a1586)) +* Use 4.0 branch to be consistent ([f5d5ab3](https://github.com/bitnami/charts/commit/f5d5ab374999c351fb2065150b42bc4e2166ccfd)) + +## 0.1.0 (2019-10-31) + +* Apply suggestions ([b97e655](https://github.com/bitnami/charts/commit/b97e655946c6d1b938e1ceace5f2bbc486f4817a)) +* Fix notes ([e0924cc](https://github.com/bitnami/charts/commit/e0924cc5d5f93e14ec9183bccf9831661411df20)) +* Production conf explanation ([6b3310b](https://github.com/bitnami/charts/commit/6b3310b1f5cf2ebfff73c4212445a894836bef0a)) +* values prod ([e921362](https://github.com/bitnami/charts/commit/e921362977983da54a23cb80d1dc7a49b3ecd215)) + +## 0.0.1 (2019-10-30) + +* [bitnami/mongodb-sharded] Add MongoDB Sharded chart ([99c45a7](https://github.com/bitnami/charts/commit/99c45a7d3940d7b5cabb38b21a6a61b2e911f9aa)) diff --git a/mongodb-sharded/Chart.lock b/mongodb-sharded/Chart.lock new file mode 100644 index 0000000..d67020f --- /dev/null +++ b/mongodb-sharded/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: oci://registry-1.docker.io/bitnamicharts + version: 2.31.4 +digest: sha256:fc442e77200e1914dd46fe26490dcf62f44caa51db673c2f8e67d5319cd4c163 +generated: "2025-08-13T16:31:57.435877752Z" diff --git a/mongodb-sharded/Chart.yaml b/mongodb-sharded/Chart.yaml new file mode 100644 index 0000000..0694d07 --- /dev/null +++ b/mongodb-sharded/Chart.yaml @@ -0,0 +1,40 @@ +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +annotations: + images: | + - name: mongodb-exporter + image: docker.io/bitnami/mongodb-exporter:0.47.0-debian-12-r1 + - name: mongodb-sharded + image: docker.io/bitnami/mongodb-sharded:8.0.13-debian-12-r0 + - name: os-shell + image: docker.io/bitnami/os-shell:12-debian-12-r51 + licenses: Apache-2.0 + tanzuCategory: service +apiVersion: v2 +appVersion: 8.0.13 +dependencies: +- name: common + repository: oci://registry-1.docker.io/bitnamicharts + tags: + - bitnami-common + version: 2.x.x +description: MongoDB(R) is an open source NoSQL database that uses JSON for data storage. + MongoDB(TM) Sharded improves scalability and reliability for large datasets by distributing + data across multiple machines. +home: https://bitnami.com +icon: https://dyltqmyl993wv.cloudfront.net/assets/stacks/mongodb/img/mongodb-stack-220x234.png +keywords: +- mongodb +- database +- nosql +- cluster +- replicaset +- replication +maintainers: +- name: Broadcom, Inc. All Rights Reserved. + url: https://github.com/bitnami/charts +name: mongodb-sharded +sources: +- https://github.com/bitnami/charts/tree/main/bitnami/mongodb-sharded +version: 9.4.29 diff --git a/mongodb-sharded/README.md b/mongodb-sharded/README.md new file mode 100644 index 0000000..44df123 --- /dev/null +++ b/mongodb-sharded/README.md @@ -0,0 +1,850 @@ + + +# MongoDB® Sharded packaged by Bitnami + +MongoDB® is an open source NoSQL database that uses JSON for data storage. MongoDB™ Sharded improves scalability and reliability for large datasets by distributing data across multiple machines. + +[Overview of MongoDB® Sharded](http://www.mongodb.org) + +Disclaimer: The respective trademarks mentioned in the offering are owned by the respective companies. We do not provide a commercial license for any of these products. This listing has an open-source license. MongoDB® is run and maintained by MongoDB, which is a completely separate project from Bitnami. + +## TL;DR + +```console +helm install my-release oci://registry-1.docker.io/bitnamicharts/mongodb-sharded +``` + +## Why use Bitnami Secure Images? + +Those are hardened, minimal CVE images built and maintained by Bitnami. Bitnami Secure Images are based on the cloud-optimized, security-hardened enterprise [OS Photon Linux](https://vmware.github.io/photon/). Why choose BSI images? + +- Hardened secure images of popular open source software with Near-Zero Vulnerabilities +- Vulnerability Triage & Prioritization with VEX Statements, KEV and EPSS Scores +- Compliance focus with FIPS, STIG, and air-gap options, including secure bill of materials (SBOM) +- Software supply chain provenance attestation through in-toto +- First class support for the internet’s favorite Helm charts + +Each image comes with valuable security metadata. You can view the metadata in [our public catalog here](https://app-catalog.vmware.com/bitnami/apps). Note: Some data is only available with [commercial subscriptions to BSI](https://bitnami.com/). + +![Alt text](https://github.com/bitnami/containers/blob/main/BSI%20UI%201.png?raw=true "Application details") +![Alt text](https://github.com/bitnami/containers/blob/main/BSI%20UI%202.png?raw=true "Packaging report") + +If you are looking for our previous generation of images based on Debian Linux, please see the [Bitnami Legacy registry](https://hub.docker.com/u/bitnamilegacy). + +## Introduction + +This chart bootstraps a [MongoDB(®) Sharded](https://github.com/bitnami/containers/tree/main/bitnami/mongodb-sharded) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Classified as a NoSQL database, MongoDB® eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas, making the integration of data in certain types of applications easier and faster. + +This chart uses the [sharding method](https://docs.mongodb.com/manual/sharding/) for distributing data across multiple machines. This is meant for deployments with very large data sets and high throughput operations. + +## Prerequisites + +- Kubernetes 1.23+ +- Helm 3.8.0+ +- PV provisioner support in the underlying infrastructure +- ReadWriteMany volumes for deployment scaling + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/mongodb-sharded +``` + +> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`. + +The command deploys MongoDB® on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Configuration and installation details + +### Resource requests and limits + +Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the `resources` value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case. + +To make this process easier, the chart contains the `resourcesPreset` values, which automatically sets the `resources` section according to different presets. Check these presets in [the bitnami/common chart](https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15). However, in production workloads using `resourcesPreset` is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the [official Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). + +### Update credentials + +Bitnami charts configure credentials at first boot. Any further change in the secrets or credentials require manual intervention. Follow these instructions: + +- Update the user password following [the upstream documentation](https://www.mongodb.com/docs/manual/reference/method/db.changeUserPassword/) +- Update the password secret with the new values (replace the SECRET_NAME, ROOT_PASSWORD and REPLICA_SET_KEY placeholders) + +```shell +kubectl create secret generic SECRET_NAME --from-literal=mongodb-root-password=ROOT_PASSWORD --from-literal=mongodb-replica-set-key=REPLICA_SET_KEY --dry-run -o yaml | kubectl apply -f - +``` + +### Prometheus metrics + +This chart can be integrated with Prometheus by setting `metrics.enabled` to `true`. This will deploy a sidecar container with [mongodb_exporter](https://github.com/percona/mongodb_exporter) in all pods. The pods will have the necessary annotations to be automatically scraped by Prometheus. + +#### Prometheus requirements + +It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the [Bitnami Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/prometheus) or the [Bitnami Kube Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus) to easily have a working Prometheus in your cluster. + +#### Integration with Prometheus Operator + +The chart can deploy `PodMonitor` objects for integration with Prometheus Operator installations. To do so, set the value `metrics.podMonitor.enabled=true`. Ensure that the Prometheus Operator `CustomResourceDefinitions` are installed in the cluster or it will fail with the following error: + +```text +no matches for kind "PodMonitor" in version "monitoring.coreos.com/v1" +``` + +Install the [Bitnami Kube Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus) for having the necessary CRDs and the Prometheus Operator. + +### [Rolling VS Immutable tags](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Change MongoDB® version + +To modify the MongoDB® version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mongodb-sharded/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Sharding + +This chart deploys a sharded cluster by default. Some characteristics of this chart are: + +- It allows HA by enabling replication on the shards and the config servers. The mongos instances can be scaled horizontally as well. +- The number of secondary and arbiter nodes can be scaled out independently. + +### Initialize a fresh instance + +The [Bitnami MongoDB®](https://github.com/bitnami/containers/tree/main/bitnami/mongodb-sharded) image allows you to use your custom scripts to initialize a fresh instance. You can create a custom config map and give it via `initScriptsCM`(check options for more details). + +The allowed extensions are `.sh`, and `.js`. + +### Sidecars and Init Containers + +If you have a need for additional containers to run within the same pod as Kibana (e.g. an additional metrics or logging exporter), you can do so via the `sidecars` config parameter (available in the `mongos`, `shardsvr.dataNode`, `shardsvr.arbiter`, `configsvr` and `common` sections). Simply define your container according to the Kubernetes container spec. + +```yaml +sidecars: +- name: your-image-name + image: your-image + imagePullPolicy: Always + ports: + - name: portname + containerPort: 1234 +``` + +Similarly, you can add extra init containers using the `initContainers` parameter. + +```yaml +initContainers: +- name: your-image-name + image: your-image + imagePullPolicy: Always + ports: + - name: portname + containerPort: 1234 +``` + +### Adding extra environment variables + +In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` (available in the `mongos`, `shardsvr.dataNode`, `shardsvr.arbiter`, `configsvr` and `common` sections) property. + +```yaml +extraEnvVars: + - name: MONGODB_VERSION + value: 4.0 +``` + +Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` values. + +### Using an external config server + +It is possible to not deploy any shards or a config server. For example, it is possible to simply deploy `mongos` instances that point to an external MongoDB® sharded database. If that is the case, set the `configsvr.external.host` and `configsvr.external.replicasetName` for the mongos instances to connect. For authentication, set the `configsvr.external.rootPassword` and `configsvr.external.replicasetKey` values. + +### Setting Pod's affinity + +This chart allows you to set your custom affinity using the `XXX.affinity` parameter(s). Find more information about Pod's affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity). + +As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/main/bitnami/common#affinities) chart. To do so, set the `XXX.podAffinityPreset`, `XXX.podAntiAffinityPreset`, or `XXX.nodeAffinityPreset` parameters. + +### Backup and restore + +To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using [Velero](https://velero.io/), a Kubernetes backup/restore tool. Find the instructions for using Velero in [this guide](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-backup-restore-deployments-velero-index.html). + +## Persistence + +The [Bitnami MongoDB®](https://github.com/bitnami/containers/tree/main/bitnami/mongodb-sharded) image stores the MongoDB® data and configurations at the `/bitnami/mongodb` path of the container. + +The chart mounts a [Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) at this location. The volume is created using dynamic volume provisioning. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +### Adding extra volumes + +The Bitnami Kibana chart supports mounting extra volumes (either PVCs, secrets or configmaps) by using the `extraVolumes` and `extraVolumeMounts` properties (available in the `mongos`, `shardsvr.dataNode`, `shardsvr.arbiter`, `configsvr` and `common` sections). This can be combined with advanced operations like adding extra init containers and sidecars. + +## Parameters + +### Global parameters + +| Name | Description | Value | +| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `global.imageRegistry` | Global Docker image registry | `""` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` | +| `global.defaultStorageClass` | Global default StorageClass for Persistent Volume(s) | `""` | +| `global.storageClass` | DEPRECATED: use global.defaultStorageClass instead | `""` | +| `global.security.allowInsecureImages` | Allows skipping image verification | `false` | +| `global.compatibility.openshift.adaptSecurityContext` | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | `auto` | + +### Common parameters + +| Name | Description | Value | +| ------------------------ | --------------------------------------------------------------------------------------- | --------------- | +| `kubeVersion` | Override Kubernetes version | `""` | +| `nameOverride` | String to partially override common.names.name | `""` | +| `fullnameOverride` | String to fully override common.names.fullname | `""` | +| `namespaceOverride` | String to fully override common.names.namespace | `""` | +| `commonLabels` | Labels to add to all deployed objects | `{}` | +| `commonAnnotations` | Annotations to add to all deployed objects | `{}` | +| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` | +| `extraDeploy` | Array of extra objects to deploy with the release | `[]` | +| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` | +| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` | +| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` | + +### MongoDB(®) Sharded parameters + +| Name | Description | Value | +| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | +| `image.registry` | MongoDB(®) Sharded image registry | `REGISTRY_NAME` | +| `image.repository` | MongoDB(®) Sharded Image name | `REPOSITORY_NAME/mongodb-sharded` | +| `image.digest` | MongoDB(®) Sharded image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | +| `image.pullPolicy` | MongoDB(®) Sharded image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `auth.enabled` | Enable authentication | `true` | +| `auth.rootUser` | MongoDB(®) root user | `root` | +| `auth.rootPassword` | MongoDB(®) root password | `""` | +| `auth.replicaSetKey` | Key used for authentication in the replicaset | `""` | +| `auth.existingSecret` | Existing secret with MongoDB(®) credentials (keys: `mongodb-password`, `mongodb-root-password`, `mongodb-replica-set-key`) | `""` | +| `auth.usePasswordFiles` | Mount credentials as files instead of using environment variables | `true` | +| `shards` | Number of shards to be created | `2` | +| `common.mongodbEnableNumactl` | Enable launch MongoDB instance prefixed with "numactl --interleave=all" | `false` | +| `common.useHostnames` | Enable DNS hostnames in the replica set config | `true` | +| `common.mongodbEnableIPv6` | Switch to enable/disable IPv6 on MongoDB® | `false` | +| `common.mongodbDirectoryPerDB` | Switch to enable/disable DirectoryPerDB on MongoDB® | `false` | +| `common.mongodbSystemLogVerbosity` | MongoDB® system log verbosity level | `0` | +| `common.mongodbDisableSystemLog` | Whether to disable MongoDB® system log or not | `false` | +| `common.mongodbInitRetryAttempts` | Maximum retries for checking the MongoDB® initialization status | `24` | +| `common.mongodbInitRetryDelay` | Time (in seconds) to wait between retries for checking the MongoDB® initialization status | `5` | +| `common.initScriptsCM` | Configmap with init scripts to execute | `""` | +| `common.initScriptsSecret` | Secret with init scripts to execute (for sensitive data) | `""` | +| `common.extraEnvVars` | An array to add extra env vars | `[]` | +| `common.extraEnvVarsCM` | Name of a ConfigMap containing extra env vars | `""` | +| `common.extraEnvVarsSecret` | Name of a Secret containing extra env vars | `""` | +| `common.sidecars` | Add sidecars to the pod | `[]` | +| `common.initContainers` | Add init containers to the pod | `[]` | +| `common.podAnnotations` | Additional pod annotations | `{}` | +| `common.podLabels` | Additional pod labels | `{}` | +| `common.extraVolumes` | Array to add extra volumes | `[]` | +| `common.extraVolumeMounts` | Array to add extra mounts (normally used with extraVolumes) | `[]` | +| `common.containerPorts.mongodb` | MongoDB container port | `27017` | +| `common.serviceAccount.create` | Whether to create a Service Account for all pods automatically | `true` | +| `common.serviceAccount.name` | Name of a Service Account to be used by all Pods | `""` | +| `common.serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` | +| `common.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `false` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `REGISTRY_NAME` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `REPOSITORY_NAME/os-shell` | +| `volumePermissions.image.digest` | Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `IfNotPresent` | +| `volumePermissions.image.pullSecrets` | Init container volume-permissions image pull secrets | `[]` | +| `volumePermissions.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production). | `nano` | +| `volumePermissions.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` | +| `service.name` | Specify an explicit service name | `""` | +| `service.annotations` | Additional service annotations (evaluate as a template) | `{}` | +| `service.type` | Service type | `ClusterIP` | +| `service.externalTrafficPolicy` | External traffic policy | `Cluster` | +| `service.ports.mongodb` | MongoDB® service port | `27017` | +| `service.clusterIP` | Static clusterIP or None for headless services | `""` | +| `service.nodePorts.mongodb` | Specify the nodePort value for the LoadBalancer and NodePort service types. | `""` | +| `service.nodePorts.metrics` | Specify the metrics nodePort value for the LoadBalancer and NodePort service types. | `""` | +| `service.externalIPs` | External IP list to use with ClusterIP service type | `[]` | +| `service.loadBalancerIP` | Static IP Address to use for LoadBalancer service type | `""` | +| `service.loadBalancerSourceRanges` | List of IP ranges allowed access to load balancer (if supported) | `[]` | +| `service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` | +| `service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` | +| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` | +| `service.headless.annotations` | Annotations for the headless service. | `{}` | +| `networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` | +| `networkPolicy.allowExternal` | Don't require server label for connections | `true` | +| `networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` | +| `networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` | +| `networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy | `[]` | +| `networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces | `{}` | +| `networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces | `{}` | + +### Config Server parameters + +| Name | Description | Value | +| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| `configsvr.replicaCount` | Number of nodes in the replica set (the first node will be primary) | `1` | +| `configsvr.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if configsvr.resources is set (configsvr.resources is recommended for production). | `small` | +| `configsvr.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` | +| `configsvr.automountServiceAccountToken` | Mount Service Account token in pod | `false` | +| `configsvr.hostAliases` | Deployment pod host aliases | `[]` | +| `configsvr.mongodbExtraFlags` | MongoDB® additional command line flags | `[]` | +| `configsvr.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` | +| `configsvr.priorityClassName` | Pod priority class name | `""` | +| `configsvr.podAffinityPreset` | Config Server Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `configsvr.podAntiAffinityPreset` | Config Server Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` | +| `configsvr.nodeAffinityPreset.type` | Config Server Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `configsvr.nodeAffinityPreset.key` | Config Server Node label key to match Ignored if `affinity` is set. | `""` | +| `configsvr.nodeAffinityPreset.values` | Config Server Node label values to match. Ignored if `affinity` is set. | `[]` | +| `configsvr.affinity` | Config Server Affinity for pod assignment | `{}` | +| `configsvr.nodeSelector` | Config Server Node labels for pod assignment | `{}` | +| `configsvr.tolerations` | Config Server Tolerations for pod assignment | `[]` | +| `configsvr.podManagementPolicy` | Statefulset's pod management policy, allows parallel startup of pods | `OrderedReady` | +| `configsvr.updateStrategy.type` | updateStrategy for MongoDB® Primary, Secondary and Arbiter statefulsets | `RollingUpdate` | +| `configsvr.config` | MongoDB® configuration file | `""` | +| `configsvr.configCM` | ConfigMap name with Config Server configuration file (cannot be used with configsvr.config) | `""` | +| `configsvr.extraEnvVars` | An array to add extra env vars | `[]` | +| `configsvr.extraEnvVarsCM` | Name of a ConfigMap containing extra env vars | `""` | +| `configsvr.extraEnvVarsSecret` | Name of a Secret containing extra env vars | `""` | +| `configsvr.sidecars` | Add sidecars to the pod | `[]` | +| `configsvr.initContainers` | Add init containers to the pod | `[]` | +| `configsvr.podAnnotations` | Additional pod annotations | `{}` | +| `configsvr.podLabels` | Additional pod labels | `{}` | +| `configsvr.extraVolumes` | Array to add extra volumes. Requires setting `extraVolumeMounts` | `[]` | +| `configsvr.extraVolumeMounts` | Array to add extra mounts (normally used with extraVolumes). Normally used with `extraVolumes` | `[]` | +| `configsvr.schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` | +| `configsvr.pdb.create` | Enable pod disruption budget | `true` | +| `configsvr.pdb.minAvailable` | Minimum number of available config pods allowed (`0` to disable) | `0` | +| `configsvr.pdb.maxUnavailable` | Maximum number of unavailable config pods allowed (`0` to disable) | `1` | +| `configsvr.persistence.enabled` | Use a PVC to persist data | `true` | +| `configsvr.persistence.mountPath` | Path to mount the volume at | `/bitnami/mongodb` | +| `configsvr.persistence.subPath` | Subdirectory of the volume to mount at (evaluated as a template) | `""` | +| `configsvr.persistence.storageClass` | Storage class of backing PVC | `""` | +| `configsvr.persistence.accessModes` | Use volume as ReadOnly or ReadWrite | `["ReadWriteOnce"]` | +| `configsvr.persistence.size` | PersistentVolumeClaim size | `8Gi` | +| `configsvr.persistence.annotations` | Persistent Volume annotations | `{}` | +| `configsvr.persistence.selector` | Selector to match an existing Persistent Volume for Config Server data PVC | `{}` | +| `configsvr.persistentVolumeClaimRetentionPolicy.enabled` | Enable Persistent volume retention policy for Config Server StatefulSet | `false` | +| `configsvr.persistentVolumeClaimRetentionPolicy.whenScaled` | Volume retention behavior when the replica count of the StatefulSet is reduced | `Retain` | +| `configsvr.persistentVolumeClaimRetentionPolicy.whenDeleted` | Volume retention behavior that applies when the StatefulSet is deleted | `Retain` | +| `configsvr.serviceAccount.create` | Specifies whether a ServiceAccount should be created for Config Server | `true` | +| `configsvr.serviceAccount.name` | Name of a Service Account to be used by Config Server | `""` | +| `configsvr.serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` | +| `configsvr.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `false` | +| `configsvr.external.host` | Primary node of an external Config Server replicaset | `""` | +| `configsvr.external.rootPassword` | Root password of the external Config Server replicaset | `""` | +| `configsvr.external.replicasetName` | Replicaset name of an external Config Server | `""` | +| `configsvr.external.replicasetKey` | Replicaset key of an external Config Server | `""` | +| `configsvr.podSecurityContext.enabled` | Enable security context | `true` | +| `configsvr.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` | +| `configsvr.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` | +| `configsvr.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` | +| `configsvr.podSecurityContext.fsGroup` | Group ID for the container | `1001` | +| `configsvr.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` | +| `configsvr.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` | +| `configsvr.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` | +| `configsvr.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` | +| `configsvr.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` | +| `configsvr.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` | +| `configsvr.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` | +| `configsvr.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` | +| `configsvr.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` | +| `configsvr.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` | +| `configsvr.command` | Override default container command (useful when using custom images) | `["/bin/bash","/entrypoint/replicaset-entrypoint.sh"]` | +| `configsvr.args` | Override default container args (useful when using custom images) | `[]` | +| `configsvr.terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` | +| `configsvr.lifecycleHooks` | for the Config Server container(s) to automate configuration before or after startup | `{}` | +| `configsvr.livenessProbe.enabled` | Enable livenessProbe | `true` | +| `configsvr.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `60` | +| `configsvr.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `30` | +| `configsvr.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `20` | +| `configsvr.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `2` | +| `configsvr.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | +| `configsvr.readinessProbe.enabled` | Enable readinessProbe | `true` | +| `configsvr.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` | +| `configsvr.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `30` | +| `configsvr.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `20` | +| `configsvr.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` | +| `configsvr.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | +| `configsvr.startupProbe.enabled` | Enable startupProbe | `true` | +| `configsvr.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `0` | +| `configsvr.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | +| `configsvr.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` | +| `configsvr.startupProbe.failureThreshold` | Failure threshold for startupProbe | `30` | +| `configsvr.startupProbe.successThreshold` | Success threshold for startupProbe | `1` | +| `configsvr.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | +| `configsvr.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | +| `configsvr.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | + +### Mongos parameters + +| Name | Description | Value | +| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | +| `mongos.replicaCount` | Number of replicas | `1` | +| `mongos.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if mongos.resources is set (mongos.resources is recommended for production). | `small` | +| `mongos.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` | +| `mongos.automountServiceAccountToken` | Mount Service Account token in pod | `false` | +| `mongos.hostAliases` | Deployment pod host aliases | `[]` | +| `mongos.mongodbExtraFlags` | MongoDB® additional command line flags | `[]` | +| `mongos.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` | +| `mongos.priorityClassName` | Pod priority class name | `""` | +| `mongos.podAffinityPreset` | Mongos Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `mongos.podAntiAffinityPreset` | Mongos Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` | +| `mongos.nodeAffinityPreset.type` | Mongos Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `mongos.nodeAffinityPreset.key` | Mongos Node label key to match Ignored if `affinity` is set. | `""` | +| `mongos.nodeAffinityPreset.values` | Mongos Node label values to match. Ignored if `affinity` is set. | `[]` | +| `mongos.affinity` | Mongos Affinity for pod assignment | `{}` | +| `mongos.nodeSelector` | Mongos Node labels for pod assignment | `{}` | +| `mongos.tolerations` | Mongos Tolerations for pod assignment | `[]` | +| `mongos.podManagementPolicy` | Statefulsets pod management policy, allows parallel startup of pods | `OrderedReady` | +| `mongos.updateStrategy.type` | updateStrategy for MongoDB® Primary, Secondary and Arbiter statefulsets | `RollingUpdate` | +| `mongos.config` | MongoDB® configuration file | `""` | +| `mongos.configCM` | ConfigMap name with MongoDB® configuration file (cannot be used with mongos.config) | `""` | +| `mongos.extraEnvVars` | An array to add extra env vars | `[]` | +| `mongos.extraEnvVarsCM` | Name of a ConfigMap containing extra env vars | `""` | +| `mongos.extraEnvVarsSecret` | Name of a Secret containing extra env vars | `""` | +| `mongos.sidecars` | Add sidecars to the pod | `[]` | +| `mongos.initContainers` | Add init containers to the pod | `[]` | +| `mongos.podAnnotations` | Additional pod annotations | `{}` | +| `mongos.podLabels` | Additional pod labels | `{}` | +| `mongos.extraVolumes` | Array to add extra volumes. Requires setting `extraVolumeMounts` | `[]` | +| `mongos.extraVolumeMounts` | Array to add extra volume mounts. Normally used with `extraVolumes`. | `[]` | +| `mongos.schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` | +| `mongos.useStatefulSet` | Use StatefulSet instead of Deployment | `false` | +| `mongos.servicePerReplica.enabled` | Create one service per mongos replica (must be used with statefulset) | `false` | +| `mongos.servicePerReplica.annotations` | Additional service annotations (evaluate as a template) | `{}` | +| `mongos.servicePerReplica.type` | Service type | `ClusterIP` | +| `mongos.servicePerReplica.externalTrafficPolicy` | External traffic policy | `Cluster` | +| `mongos.servicePerReplica.port` | MongoDB® service port | `27017` | +| `mongos.servicePerReplica.clusterIPs` | Array of static clusterIPs for each MongoDB@reg; replica. Length must be the same as mongos.replicaCount | `[]` | +| `mongos.servicePerReplica.nodePorts` | Array of node ports used for each MongoDB@reg; replica. Length must be the same as mongos.replicaCount | `[]` | +| `mongos.servicePerReplica.externalIPs` | External IP list to use with ClusterIP service type | `[]` | +| `mongos.servicePerReplica.loadBalancerIPs` | Array of static IP Address to use for each replica LoadBalancer service type. Length must be the same as mongos.replicaCount | `[]` | +| `mongos.servicePerReplica.loadBalancerSourceRanges` | List of IP ranges allowed access to load balancer (if supported) | `[]` | +| `mongos.servicePerReplica.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` | +| `mongos.servicePerReplica.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` | +| `mongos.servicePerReplica.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` | +| `mongos.pdb.create` | Enable pod disruption budget | `true` | +| `mongos.pdb.minAvailable` | Minimum number of available mongo pods allowed (`0` to disable) | `0` | +| `mongos.pdb.maxUnavailable` | Maximum number of unavailable mongo pods allowed (`0` to disable) | `1` | +| `mongos.serviceAccount.create` | Whether to create a Service Account for mongos automatically | `true` | +| `mongos.serviceAccount.name` | Name of a Service Account to be used by mongos | `""` | +| `mongos.serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` | +| `mongos.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `false` | +| `mongos.podSecurityContext.enabled` | Enable security context | `true` | +| `mongos.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` | +| `mongos.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` | +| `mongos.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` | +| `mongos.podSecurityContext.fsGroup` | Group ID for the container | `1001` | +| `mongos.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` | +| `mongos.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` | +| `mongos.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` | +| `mongos.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` | +| `mongos.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` | +| `mongos.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` | +| `mongos.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` | +| `mongos.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` | +| `mongos.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` | +| `mongos.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` | +| `mongos.command` | Override default container command (useful when using custom images) | `[]` | +| `mongos.args` | Override default container args (useful when using custom images) | `[]` | +| `mongos.terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` | +| `mongos.lifecycleHooks` | for the Mongo container(s) to automate configuration before or after startup | `{}` | +| `mongos.livenessProbe.enabled` | Enable livenessProbe | `true` | +| `mongos.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `60` | +| `mongos.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `30` | +| `mongos.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `20` | +| `mongos.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `2` | +| `mongos.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | +| `mongos.readinessProbe.enabled` | Enable readinessProbe | `true` | +| `mongos.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` | +| `mongos.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `30` | +| `mongos.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `20` | +| `mongos.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` | +| `mongos.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | +| `mongos.startupProbe.enabled` | Enable startupProbe | `false` | +| `mongos.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `0` | +| `mongos.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | +| `mongos.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` | +| `mongos.startupProbe.failureThreshold` | Failure threshold for startupProbe | `30` | +| `mongos.startupProbe.successThreshold` | Success threshold for startupProbe | `1` | +| `mongos.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | +| `mongos.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | +| `mongos.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | + +### Shard configuration: Data node parameters + +| Name | Description | Value | +| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| `shardsvr.dataNode.replicaCount` | Number of nodes in each shard replica set (the first node will be primary) | `1` | +| `shardsvr.dataNode.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if shardsvr.dataNode.resources is set (shardsvr.dataNode.resources is recommended for production). | `medium` | +| `shardsvr.dataNode.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` | +| `shardsvr.dataNode.mongodbExtraFlags` | MongoDB® additional command line flags | `[]` | +| `shardsvr.dataNode.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` | +| `shardsvr.dataNode.priorityClassName` | Pod priority class name | `""` | +| `shardsvr.dataNode.podAffinityPreset` | Data nodes Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `shardsvr.dataNode.podAntiAffinityPreset` | Data nodes Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` | +| `shardsvr.dataNode.nodeAffinityPreset.type` | Data nodes Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `shardsvr.dataNode.nodeAffinityPreset.key` | Data nodes Node label key to match Ignored if `affinity` is set. | `""` | +| `shardsvr.dataNode.nodeAffinityPreset.values` | Data nodes Node label values to match. Ignored if `affinity` is set. | `[]` | +| `shardsvr.dataNode.affinity` | Data nodes Affinity for pod assignment | `{}` | +| `shardsvr.dataNode.nodeSelector` | Data nodes Node labels for pod assignment | `{}` | +| `shardsvr.dataNode.tolerations` | Data nodes Tolerations for pod assignment | `[]` | +| `shardsvr.dataNode.podManagementPolicy` | podManagementPolicy for the statefulset, allows parallel startup of pods | `OrderedReady` | +| `shardsvr.dataNode.updateStrategy.type` | updateStrategy for MongoDB® Primary, Secondary and Arbiter statefulsets | `RollingUpdate` | +| `shardsvr.dataNode.automountServiceAccountToken` | Mount Service Account token in pod | `false` | +| `shardsvr.dataNode.hostAliases` | Deployment pod host aliases | `[]` | +| `shardsvr.dataNode.config` | Entries for the MongoDB® config file | `""` | +| `shardsvr.dataNode.configCM` | ConfigMap name with MongoDB® configuration (cannot be used with shardsvr.dataNode.config) | `""` | +| `shardsvr.dataNode.extraEnvVars` | An array to add extra env vars | `[]` | +| `shardsvr.dataNode.extraEnvVarsCM` | Name of a ConfigMap containing extra env vars | `""` | +| `shardsvr.dataNode.extraEnvVarsSecret` | Name of a Secret containing extra env vars | `""` | +| `shardsvr.dataNode.sidecars` | Attach additional containers (evaluated as a template) | `[]` | +| `shardsvr.dataNode.initContainers` | Add init containers to the pod | `[]` | +| `shardsvr.dataNode.podAnnotations` | Additional pod annotations | `{}` | +| `shardsvr.dataNode.podLabels` | Additional pod labels | `{}` | +| `shardsvr.dataNode.extraVolumes` | Array to add extra volumes. Requires setting `extraVolumeMounts` | `[]` | +| `shardsvr.dataNode.extraVolumeMounts` | Array to add extra mounts. Normally used with `extraVolumes` | `[]` | +| `shardsvr.dataNode.schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` | +| `shardsvr.dataNode.pdb.create` | Enable pod disruption budget | `true` | +| `shardsvr.dataNode.pdb.minAvailable` | Minimum number of available data pods allowed (`0` to disable) | `0` | +| `shardsvr.dataNode.pdb.maxUnavailable` | Maximum number of unavailable data pods allowed (`0` to disable) | `1` | +| `shardsvr.dataNode.serviceAccount.create` | Specifies whether a ServiceAccount should be created for shardsvr | `true` | +| `shardsvr.dataNode.serviceAccount.name` | Name of a Service Account to be used by shardsvr data pods | `""` | +| `shardsvr.dataNode.serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` | +| `shardsvr.dataNode.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `false` | +| `shardsvr.dataNode.podSecurityContext.enabled` | Enable security context | `true` | +| `shardsvr.dataNode.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` | +| `shardsvr.dataNode.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` | +| `shardsvr.dataNode.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` | +| `shardsvr.dataNode.podSecurityContext.fsGroup` | Group ID for the container | `1001` | +| `shardsvr.dataNode.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` | +| `shardsvr.dataNode.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` | +| `shardsvr.dataNode.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` | +| `shardsvr.dataNode.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` | +| `shardsvr.dataNode.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` | +| `shardsvr.dataNode.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` | +| `shardsvr.dataNode.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` | +| `shardsvr.dataNode.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` | +| `shardsvr.dataNode.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` | +| `shardsvr.dataNode.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` | +| `shardsvr.dataNode.command` | Override default container command (useful when using custom images) | `["/bin/bash","/entrypoint/replicaset-entrypoint.sh"]` | +| `shardsvr.dataNode.args` | Override default container args (useful when using custom images) | `[]` | +| `shardsvr.dataNode.terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` | +| `shardsvr.dataNode.lifecycleHooks` | for the Data container(s) to automate configuration before or after startup | `{}` | +| `shardsvr.dataNode.livenessProbe.enabled` | Enable livenessProbe | `true` | +| `shardsvr.dataNode.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `60` | +| `shardsvr.dataNode.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `30` | +| `shardsvr.dataNode.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `20` | +| `shardsvr.dataNode.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `2` | +| `shardsvr.dataNode.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | +| `shardsvr.dataNode.readinessProbe.enabled` | Enable readinessProbe | `true` | +| `shardsvr.dataNode.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` | +| `shardsvr.dataNode.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `30` | +| `shardsvr.dataNode.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `20` | +| `shardsvr.dataNode.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` | +| `shardsvr.dataNode.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | +| `shardsvr.dataNode.startupProbe.enabled` | Enable startupProbe | `false` | +| `shardsvr.dataNode.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `0` | +| `shardsvr.dataNode.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | +| `shardsvr.dataNode.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` | +| `shardsvr.dataNode.startupProbe.failureThreshold` | Failure threshold for startupProbe | `30` | +| `shardsvr.dataNode.startupProbe.successThreshold` | Success threshold for startupProbe | `1` | +| `shardsvr.dataNode.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | +| `shardsvr.dataNode.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | +| `shardsvr.dataNode.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | + +### Shard configuration: Persistence parameters + +| Name | Description | Value | +| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ------------------- | +| `shardsvr.persistence.enabled` | Use a PVC to persist data | `true` | +| `shardsvr.persistence.mountPath` | The path the volume will be mounted at, useful when using different MongoDB® images. | `/bitnami/mongodb` | +| `shardsvr.persistence.subPath` | Subdirectory of the volume to mount at (evaluated as a template) | `""` | +| `shardsvr.persistence.storageClass` | Storage class of backing PVC | `""` | +| `shardsvr.persistence.accessModes` | Use volume as ReadOnly or ReadWrite | `["ReadWriteOnce"]` | +| `shardsvr.persistence.size` | PersistentVolumeClaim size | `8Gi` | +| `shardsvr.persistence.annotations` | Additional volume annotations | `{}` | +| `shardsvr.persistence.selector` | Selector to match an existing Persistent Volume for Shard data PVC | `{}` | +| `shardsvr.persistentVolumeClaimRetentionPolicy.enabled` | Enable Persistent volume retention policy for Shard replicas StatefulSet | `false` | +| `shardsvr.persistentVolumeClaimRetentionPolicy.whenScaled` | Volume retention behavior when the replica count of the StatefulSet is reduced | `Retain` | +| `shardsvr.persistentVolumeClaimRetentionPolicy.whenDeleted` | Volume retention behavior that applies when the StatefulSet is deleted | `Retain` | + +### Shard configuration: Arbiter parameters + +| Name | Description | Value | +| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | +| `shardsvr.arbiter.replicaCount` | Number of arbiters in each shard replica set (the first node will be primary) | `0` | +| `shardsvr.arbiter.automountServiceAccountToken` | Mount Service Account token in pod | `false` | +| `shardsvr.arbiter.hostAliases` | Deployment pod host aliases | `[]` | +| `shardsvr.arbiter.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if shardsvr.arbiter.resources is set (shardsvr.arbiter.resources is recommended for production). | `small` | +| `shardsvr.arbiter.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` | +| `shardsvr.arbiter.mongodbExtraFlags` | MongoDB® additional command line flags | `[]` | +| `shardsvr.arbiter.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` | +| `shardsvr.arbiter.priorityClassName` | Pod priority class name | `""` | +| `shardsvr.arbiter.podAffinityPreset` | Arbiter's Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `shardsvr.arbiter.podAntiAffinityPreset` | Arbiter's Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` | +| `shardsvr.arbiter.nodeAffinityPreset.type` | Arbiter's Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | +| `shardsvr.arbiter.nodeAffinityPreset.key` | Arbiter's Node label key to match Ignored if `affinity` is set. | `""` | +| `shardsvr.arbiter.nodeAffinityPreset.values` | Arbiter's Node label values to match. Ignored if `affinity` is set. | `[]` | +| `shardsvr.arbiter.affinity` | Arbiter's Affinity for pod assignment | `{}` | +| `shardsvr.arbiter.nodeSelector` | Arbiter's Node labels for pod assignment | `{}` | +| `shardsvr.arbiter.tolerations` | Arbiter's Tolerations for pod assignment | `[]` | +| `shardsvr.arbiter.podManagementPolicy` | Statefulset's pod management policy, allows parallel startup of pods | `OrderedReady` | +| `shardsvr.arbiter.updateStrategy.type` | updateStrategy for MongoDB® Primary, Secondary and Arbiter statefulsets | `RollingUpdate` | +| `shardsvr.arbiter.config` | MongoDB® configuration file | `""` | +| `shardsvr.arbiter.configCM` | ConfigMap name with MongoDB® configuration file (cannot be used with shardsvr.arbiter.config) | `""` | +| `shardsvr.arbiter.extraEnvVars` | An array to add extra env vars | `[]` | +| `shardsvr.arbiter.extraEnvVarsCM` | Name of a ConfigMap containing extra env vars | `""` | +| `shardsvr.arbiter.extraEnvVarsSecret` | Name of a Secret containing extra env vars | `""` | +| `shardsvr.arbiter.sidecars` | Add sidecars to the pod | `[]` | +| `shardsvr.arbiter.initContainers` | Add init containers to the pod | `[]` | +| `shardsvr.arbiter.podAnnotations` | Additional pod annotations | `{}` | +| `shardsvr.arbiter.podLabels` | Additional pod labels | `{}` | +| `shardsvr.arbiter.extraVolumes` | Array to add extra volumes | `[]` | +| `shardsvr.arbiter.extraVolumeMounts` | Array to add extra mounts (normally used with extraVolumes) | `[]` | +| `shardsvr.arbiter.schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` | +| `shardsvr.arbiter.serviceAccount.create` | Specifies whether a ServiceAccount should be created for shardsvr arbiter nodes | `true` | +| `shardsvr.arbiter.serviceAccount.name` | Name of a Service Account to be used by shardsvr arbiter pods | `""` | +| `shardsvr.arbiter.serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` | +| `shardsvr.arbiter.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `false` | +| `shardsvr.arbiter.podSecurityContext.enabled` | Enable security context | `true` | +| `shardsvr.arbiter.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` | +| `shardsvr.arbiter.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` | +| `shardsvr.arbiter.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` | +| `shardsvr.arbiter.podSecurityContext.fsGroup` | Group ID for the container | `1001` | +| `shardsvr.arbiter.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` | +| `shardsvr.arbiter.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` | +| `shardsvr.arbiter.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` | +| `shardsvr.arbiter.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` | +| `shardsvr.arbiter.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` | +| `shardsvr.arbiter.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` | +| `shardsvr.arbiter.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` | +| `shardsvr.arbiter.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` | +| `shardsvr.arbiter.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` | +| `shardsvr.arbiter.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` | +| `shardsvr.arbiter.command` | Override default container command (useful when using custom images) | `[]` | +| `shardsvr.arbiter.args` | Override default container args (useful when using custom images) | `[]` | +| `shardsvr.arbiter.terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` | +| `shardsvr.arbiter.lifecycleHooks` | for the arbiter container(s) to automate configuration before or after startup | `{}` | +| `shardsvr.arbiter.livenessProbe.enabled` | Enable livenessProbe | `true` | +| `shardsvr.arbiter.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `60` | +| `shardsvr.arbiter.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `30` | +| `shardsvr.arbiter.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `20` | +| `shardsvr.arbiter.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `2` | +| `shardsvr.arbiter.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | +| `shardsvr.arbiter.readinessProbe.enabled` | Enable readinessProbe | `true` | +| `shardsvr.arbiter.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` | +| `shardsvr.arbiter.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `30` | +| `shardsvr.arbiter.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `20` | +| `shardsvr.arbiter.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` | +| `shardsvr.arbiter.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | +| `shardsvr.arbiter.startupProbe.enabled` | Enable startupProbe | `false` | +| `shardsvr.arbiter.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `0` | +| `shardsvr.arbiter.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | +| `shardsvr.arbiter.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` | +| `shardsvr.arbiter.startupProbe.failureThreshold` | Failure threshold for startupProbe | `30` | +| `shardsvr.arbiter.startupProbe.successThreshold` | Success threshold for startupProbe | `1` | +| `shardsvr.arbiter.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | +| `shardsvr.arbiter.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | +| `shardsvr.arbiter.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | + +### Metrics parameters + +| Name | Description | Value | +| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | MongoDB® exporter image registry | `REGISTRY_NAME` | +| `metrics.image.repository` | MongoDB® exporter image name | `REPOSITORY_NAME/mongodb-exporter` | +| `metrics.image.digest` | MongoDB® exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | +| `metrics.image.pullPolicy` | MongoDB® exporter image pull policy | `Always` | +| `metrics.image.pullSecrets` | MongoDB® exporter image pull secrets | `[]` | +| `metrics.useTLS` | Whether to connect to MongoDB® with TLS | `false` | +| `metrics.extraArgs` | String with extra arguments to the metrics exporter | `""` | +| `metrics.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production). | `nano` | +| `metrics.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` | +| `metrics.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` | +| `metrics.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` | +| `metrics.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` | +| `metrics.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` | +| `metrics.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` | +| `metrics.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` | +| `metrics.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` | +| `metrics.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` | +| `metrics.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` | +| `metrics.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` | +| `metrics.livenessProbe.enabled` | Enable livenessProbe | `false` | +| `metrics.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `15` | +| `metrics.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `5` | +| `metrics.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | +| `metrics.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` | +| `metrics.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | +| `metrics.readinessProbe.enabled` | Enable readinessProbe | `false` | +| `metrics.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` | +| `metrics.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `5` | +| `metrics.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` | +| `metrics.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` | +| `metrics.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | +| `metrics.startupProbe.enabled` | Enable startupProbe | `false` | +| `metrics.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `0` | +| `metrics.startupProbe.periodSeconds` | Period seconds for startupProbe | `5` | +| `metrics.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `2` | +| `metrics.startupProbe.failureThreshold` | Failure threshold for startupProbe | `15` | +| `metrics.startupProbe.successThreshold` | Success threshold for startupProbe | `1` | +| `metrics.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | +| `metrics.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | +| `metrics.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | +| `metrics.containerPorts.metrics` | Port of the Prometheus metrics container | `9216` | +| `metrics.podAnnotations` | Metrics exporter pod Annotation | `{}` | +| `metrics.podMonitor.enabled` | Create PodMonitor Resource for scraping metrics using PrometheusOperator | `false` | +| `metrics.podMonitor.namespace` | Namespace where podmonitor resource should be created | `monitoring` | +| `metrics.podMonitor.interval` | Specify the interval at which metrics should be scraped | `30s` | +| `metrics.podMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `""` | +| `metrics.podMonitor.additionalLabels` | Additional labels that can be used so PodMonitors will be discovered by Prometheus | `{}` | + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```console +helm install my-release \ + --set shards=4,configsvr.replicaCount=3,shardsvr.dataNode.replicaCount=2 \ + oci://REGISTRY_NAME/REPOSITORY_NAME/mongodb-sharded +``` + +> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`. + +The above command sets the number of shards to 4, the number of replicas for the config servers to 3 and number of replicas for data nodes to 2. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```console +helm install my-release -f values.yaml oci://REGISTRY_NAME/REPOSITORY_NAME/mongodb-sharded +``` + +> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`. +> **Tip**: You can use the default [values.yaml](https://github.com/bitnami/charts/tree/main/bitnami/mongodb-sharded/values.yaml) + +## Troubleshooting + +Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues). + +## Upgrading + +### To 9.1.0 + +This version introduces image verification for security purposes. To disable it, set `global.security.allowInsecureImages` to `true`. More details at [GitHub issue](https://github.com/bitnami/charts/issues/30850). + +If authentication is enabled, it's necessary to set the `auth.rootPassword` and `auth.replicaSetKey` when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use. Please note down the password, and run the command below to upgrade your chart: + +```console +helm upgrade my-release oci://REGISTRY_NAME/REPOSITORY_NAME/mongodb-sharded --set auth.rootPassword=[PASSWORD] (--set auth.replicaSetKey=[auth.replicaSetKey]) +``` + +> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`. +> Note: you need to substitute the placeholders [PASSWORD] and [auth.replicaSetKey] with the values obtained in the installation notes. + +### To 9.0.0 + +To upgrade to MongoDB `8.0` from a `7.0` deployment, the `7.0` deployment must have `featureCompatibilityVersion` set to `7.0`. Please refer to the [official documentation](https://www.mongodb.com/docs/manual/release-notes/8.0/#upgrade-procedures). + +### To 8.0.0 + +This major bump changes the following security defaults: + +- `runAsGroup` is changed from `0` to `1001` +- `readOnlyRootFilesystem` is set to `true` +- `resourcesPreset` is changed from `none` to the minimum size working in our test suites (NOTE: `resourcesPreset` is not meant for production usage, but `resources` adapted to your use case). +- `global.compatibility.openshift.adaptSecurityContext` is changed from `disabled` to `auto`. + +This could potentially break any customization or init scripts used in your deployment. If this is the case, change the default values to the previous ones. + +### To 7.0.0 + +This major version updates the MongoDB® container image version used from 6.0 to 7.0, the new stable version. There are no major changes in the chart, but we recommend checking the [MongoDB® 7.0 release notes](https://www.mongodb.com/docs/manual/release-notes/7.0/) before upgrading. + +> Note: Due to an error in our release process, the latest version in the previous major branch (6.6.8) already uses 7.0 by default, see [PR#19575](https://github.com/bitnami/charts/pull/19575) + +### To 5.0.0 + +This major release renames several values in this chart and adds missing features, in order to be inline with the rest of assets in the Bitnami charts repository. + +Affected values: + +- Authentication parameters are reorganized under the `auth.*` parameter: + - `usePassword` is renamed to `auth.enabled`. + - `mongodbRootPassword`, `replicaSetKey`, `existingSecret` and `usePasswordFile` are now `auth.rootPassword`, `auth.replicaSetKey`, `auth.existingSecret` and `auth.usePasswordFile` respectively. +- `common.containerPorts.mongo` is renamed to `common.containerPorts.mongodb` +- `pdb.enabled` is renamed to `pdb.create` +- `XXX.replicas` is renamed to `XXX.replicaCount` +- `service.port` is renamed to `service.ports.mongodb` +- `metrics.containerPort` is renamed to `metrics.containerPorts.metrics` +- `service.nodePort` is renamed to `service.nodePorts.mongodb` +- `securityContext` is splitted into `podSecurityContext` and `containerSecurityContext` and moved into the different sections (`mongos`, `shardsvr.dataNode`, `shardsvr.arbiter`and `configsvr`): + - `securityContext.fsGroup` is renamed to `XXX.podSecurityContext.fsGroup` + - `securityContext.runAsUser` is renamed to `XXX.containerSecurityContext.runAsUser` + - `securityContext.runAsNonRoot` is renamed to `XXX.containerSecurityContext.runAsNonRoot` +- `redinessProbe`, `livenessProbe` and `startupProbe` are moved to the different sections (`mongos`, `shardsvr.dataNode`, `shardsvr.arbiter`and `configsvr`) + +### To 4.0.0 + +In this version, the mongodb-exporter bundled as part of this Helm chart was updated to a new version which, even it is not a major change, can contain breaking changes (from `0.11.X` to `0.30.X`). +Please visit the release notes from the upstream project at + +### To 3.1.0 + +This version introduces `bitnami/common`, a [library chart](https://helm.sh/docs/topics/library_charts/#helm) as a dependency. More documentation about this new utility could be found [here](https://github.com/bitnami/charts/tree/main/bitnami/common#bitnami-common-library-chart). Please, make sure that you have updated the chart dependencies before executing any upgrade. + +### To 3.0.0 + +[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL. + +#### What changes were introduced in this major version? + +- Previous versions of this Helm Chart use `apiVersion: v1` (installable by both Helm 2 and 3), this Helm Chart was updated to `apiVersion: v2` (installable by Helm 3 only). [Here](https://helm.sh/docs/topics/charts/#the-apiversion-field) you can find more information about the `apiVersion` field. +- The different fields present in the *Chart.yaml* file has been ordered alphabetically in a homogeneous way for all the Bitnami Helm Charts + +#### Considerations when upgrading to this version + +- If you want to upgrade to this version from a previous one installed with Helm v3, you shouldn't face any issues +- If you want to upgrade to this version using Helm v2, this scenario is not supported as this version doesn't support Helm v2 anymore +- If you installed the previous version with Helm v2 and wants to upgrade to this version with Helm v3, please refer to the [official Helm documentation](https://helm.sh/docs/topics/v2_v3_migration/#migration-use-cases) about migrating from Helm v2 to v3 + +#### Useful links + +- +- +- + +### To 2.0.0 + +MongoDB® container images were updated to `4.4.x` and it can affect compatibility with older versions of MongoDB®. Refer to the following guide to upgrade your applications: + +- [Upgrade a Sharded Cluster to 4.4](https://docs.mongodb.com/manual/release-notes/4.4-upgrade-sharded-cluster/) + +## License + +Copyright © 2025 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/mongodb-sharded/charts/common/.helmignore b/mongodb-sharded/charts/common/.helmignore new file mode 100644 index 0000000..abea1f4 --- /dev/null +++ b/mongodb-sharded/charts/common/.helmignore @@ -0,0 +1,26 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# img folder +img/ +# Changelog +CHANGELOG.md diff --git a/mongodb-sharded/charts/common/CHANGELOG.md b/mongodb-sharded/charts/common/CHANGELOG.md new file mode 100644 index 0000000..a122dcd --- /dev/null +++ b/mongodb-sharded/charts/common/CHANGELOG.md @@ -0,0 +1,682 @@ +# Changelog + +## 2.31.7 (2025-10-03) + +* [bitnami/common] Replace "+" to "_" in value of app.kubernetes.io/version ([#36324](https://github.com/bitnami/charts/pull/36324)) + +## 2.31.6 (2025-09-22) + +* [bitnami/*] Remove annotations.category (#36224) ([2abc0f9](https://github.com/bitnami/charts/commit/2abc0f9d7e89a5453e57f029c66f581b3d5855ef)), closes [#36224](https://github.com/bitnami/charts/issues/36224) +* [bitnami/common] Replace "+" to "_" in value of app.kubernetes.io/version… (#36272) ([f25c8f4](https://github.com/bitnami/charts/commit/f25c8f4fbabdf66fa9094311cb94304a16fb698d)), closes [#36272](https://github.com/bitnami/charts/issues/36272) + +## 2.31.4 (2025-08-12) + +* [bitnami/*] Add BSI to charts' READMEs (#35174) ([4973fd0](https://github.com/bitnami/charts/commit/4973fd08dd7e95398ddcc4054538023b542e19f2)), closes [#35174](https://github.com/bitnami/charts/issues/35174) +* [bitnami/common] docs: remove references to deprecated helpers on README (#35412) ([6239867](https://github.com/bitnami/charts/commit/623986710e3b80f11076d3ded1dc1681d8df62c5)), closes [#35412](https://github.com/bitnami/charts/issues/35412) +* [bitnami/common] feat: adapt common.errors.insecureImages for BSI (#35751) ([c6bc598](https://github.com/bitnami/charts/commit/c6bc59845497f84f740e47075f8af840f150536e)), closes [#35751](https://github.com/bitnami/charts/issues/35751) + +## 2.31.3 (2025-06-12) + +* [bitnami/common] bugfix: common.capabilities.vpa.apiVersion context (#34372) ([440d610](https://github.com/bitnami/charts/commit/440d6101d0be6e4a37b5f04c6c1ced414d632bfb)), closes [#34372](https://github.com/bitnami/charts/issues/34372) + +## 2.31.2 (2025-05-20) + +* [bitnami/common] Prevent release name from breaking DNS naming specification (#33773) ([07f5233](https://github.com/bitnami/charts/commit/07f523329cad2dfe999b62dc45aa0072541f90be)), closes [#33773](https://github.com/bitnami/charts/issues/33773) +* [bitnami/kubeapps] Deprecation followup (#33579) ([77e312c](https://github.com/bitnami/charts/commit/77e312c1772d4d7c4dc5d3ac0e80f4e452e3a062)), closes [#33579](https://github.com/bitnami/charts/issues/33579) + +## 2.31.1 (2025-05-07) + +* [bitnami/common] chore: :recycle: Remove unused helpers (#33496) ([d96e16a](https://github.com/bitnami/charts/commit/d96e16aa1e2f1d42de829330f5c0dbc1c4666493)), closes [#33496](https://github.com/bitnami/charts/issues/33496) + +## 2.31.0 (2025-05-05) + +* [bitnami/common] chore: :recycle: Remove deprecated APIs (<1.23.0) (#33320) ([3826a9e](https://github.com/bitnami/charts/commit/3826a9e1488c12545f11cf8cb1a11d23daf90602)), closes [#33320](https://github.com/bitnami/charts/issues/33320) + +## 2.30.2 (2025-04-30) + +* [bitnami/common] add namespaces to extraPodAffinityTerms for affinities (#33173) ([4e35d60](https://github.com/bitnami/charts/commit/4e35d6016945db7b9fd4eef72b177d4826d69ece)), closes [#33173](https://github.com/bitnami/charts/issues/33173) + +## 2.30.1 (2025-04-30) + +* [bitnami/common] Allows tpl in provided passwords "common.secrets.passwords.manage" (#33196) ([1f53dd8](https://github.com/bitnami/charts/commit/1f53dd862f2aca1071f5734c3ba825e3ff4fa383)), closes [#33196](https://github.com/bitnami/charts/issues/33196) +* [bitnami/common] Restore 'Paremeters' section of the README (#32861) ([72f3f35](https://github.com/bitnami/charts/commit/72f3f353e35da99060a1662770655a12a2253887)), closes [#32861](https://github.com/bitnami/charts/issues/32861) + +## 2.30.0 (2025-02-19) + +* [bitnami/*] Use CDN url for the Bitnami Application Icons (#31881) ([d9bb11a](https://github.com/bitnami/charts/commit/d9bb11a9076b9bfdcc70ea022c25ef50e9713657)), closes [#31881](https://github.com/bitnami/charts/issues/31881) +* [bitnami/common] Add helper to check API versions (#31969) ([5ba89c5](https://github.com/bitnami/charts/commit/5ba89c5afc3d57e36f90364638d9beabb32499f4)), closes [#31969](https://github.com/bitnami/charts/issues/31969) +* Update copyright year (#31682) ([e9f02f5](https://github.com/bitnami/charts/commit/e9f02f5007068751f7eb2270fece811e685c99b6)), closes [#31682](https://github.com/bitnami/charts/issues/31682) + +## 2.29.1 (2025-01-23) + +* [bitnami/common] Removing seLinuxOptions from omission (#31279) ([e7cb168](https://github.com/bitnami/charts/commit/e7cb168ca2bccd57e28bb985e099953a4f7e3b38)), closes [#31279](https://github.com/bitnami/charts/issues/31279) [#31278](https://github.com/bitnami/charts/issues/31278) + +## 2.29.0 (2025-01-03) + +* [bitnami/common] Add "common.capabilities.job.apiVersion" template (#31164) ([2ca979a](https://github.com/bitnami/charts/commit/2ca979a6add279384d60e6b35199eaf13553cefa)), closes [#31164](https://github.com/bitnami/charts/issues/31164) + +## 2.28.0 (2024-12-10) + +* [bitnami/common] New helper to detect non-standard images (#30851) ([ae33d01](https://github.com/bitnami/charts/commit/ae33d01968e8a353a569785f9867827153c797dc)), closes [#30851](https://github.com/bitnami/charts/issues/30851) + +## 2.27.2 (2024-11-27) + +* [bitnami/common] Fix appVersion (#30628) ([b87d39e](https://github.com/bitnami/charts/commit/b87d39e27a0889c74b20c3d2fe5ae0c4a2417bfd)), closes [#30628](https://github.com/bitnami/charts/issues/30628) +* [bitnami/common]: bump patch version (#30639) ([623e584](https://github.com/bitnami/charts/commit/623e5846ff827b7ecbcffa2dc51e2e94b14ef8fd)), closes [#30639](https://github.com/bitnami/charts/issues/30639) + +## 2.27.1 (2024-11-26) + +* [bitnami/common] Fix VPA apiVersion (#30625) ([8c24438](https://github.com/bitnami/charts/commit/8c24438a2f6e8ec646cad9901ed82d71d4196e3e)), closes [#30625](https://github.com/bitnami/charts/issues/30625) + +## 2.27.0 (2024-11-07) + +* [bitnami/*] Remove wrong comment about imagePullPolicy (#30107) ([a51f9e4](https://github.com/bitnami/charts/commit/a51f9e4bb0fbf77199512d35de7ac8abe055d026)), closes [#30107](https://github.com/bitnami/charts/issues/30107) +* [bitnami/common] feat: :sparkles: Add honorProvidedValues in common.secrets.manage (#30243) ([3d76a49](https://github.com/bitnami/charts/commit/3d76a4955c11fa4d2464da2c4d2096e1e3c6fa37)), closes [#30243](https://github.com/bitnami/charts/issues/30243) +* Update documentation links to techdocs.broadcom.com (#29931) ([f0d9ad7](https://github.com/bitnami/charts/commit/f0d9ad78f39f633d275fc576d32eae78ded4d0b8)), closes [#29931](https://github.com/bitnami/charts/issues/29931) + +## 2.26.0 (2024-10-14) + +* [bitnami/common] Drop unused custom empty password validators (#29432) ([5fb0e97](https://github.com/bitnami/charts/commit/5fb0e97d9336d40d86c3295637d4233218b8afea)), closes [#29432](https://github.com/bitnami/charts/issues/29432) + +## 2.25.0 (2024-10-11) + +* [bitnami/common] Add the ability to specify namespaces for affinity (#29479) ([005e0d6](https://github.com/bitnami/charts/commit/005e0d696004dd972915f290b7caffb2bc332400)), closes [#29479](https://github.com/bitnami/charts/issues/29479) + +## 2.24.0 (2024-10-03) + +* [bitnami/common] Add common.tplvalues.merge-overwrite helper (#29668) ([611b2a5](https://github.com/bitnami/charts/commit/611b2a59e06feaac878b3b218fd848a687216158)), closes [#29668](https://github.com/bitnami/charts/issues/29668) + +## 2.23.0 (2024-09-13) + +* [bitnami/common] Add option to remove empty seLinuxOptions from securityContext in non OpenShift env ([7e44e64](https://github.com/bitnami/charts/commit/7e44e64626f5b1fc6d56889cdfdeadc1f62c7cf1)), closes [#28945](https://github.com/bitnami/charts/issues/28945) + +## 2.22.0 (2024-08-08) + +* [bitnami/common] Fallback to chart appVersion in common.images.image (#28764) ([b4aa0a6](https://github.com/bitnami/charts/commit/b4aa0a685a21c50ca10e41e3eb2023bbd4282cf7)), closes [#28764](https://github.com/bitnami/charts/issues/28764) + +## 2.21.0 (2024-08-05) + +* [bitnami/common] Allow handling of new secrets after initial installation (#28581) ([07062ee](https://github.com/bitnami/charts/commit/07062ee01382e24b8204b27083ff3e8102110c2f)), closes [#28581](https://github.com/bitnami/charts/issues/28581) + +## 2.20.5 (2024-07-16) + +* [bitnami/common] [bitnami/wordpress] Use global.storageClass for fallback, not override (#24863) ([2b78e13](https://github.com/bitnami/charts/commit/2b78e137ac278cdf9d54523e8d37833a4ff0cd5b)), closes [#24863](https://github.com/bitnami/charts/issues/24863) + +## 2.20.4 (2024-07-11) + +* [bitnami/*] Update README changing TAC wording (#27530) ([52dfed6](https://github.com/bitnami/charts/commit/52dfed6bac44d791efabfaf06f15daddc4fefb0c)), closes [#27530](https://github.com/bitnami/charts/issues/27530) +* [bitnami/common] Increase ephemeral-storage default limits (#27902) ([dc0000d](https://github.com/bitnami/charts/commit/dc0000d7b56f68991bb8d8fff473103ed9026f5f)), closes [#27902](https://github.com/bitnami/charts/issues/27902) + +## 2.20.3 (2024-06-17) + +* [bitnami/common] chore: :wrench: Relax large and xlarge presets resource requests (#27312) ([6ca69f6](https://github.com/bitnami/charts/commit/6ca69f6769d0f65acc850fa0bcc08506de50cc41)), closes [#27312](https://github.com/bitnami/charts/issues/27312) + +## 2.20.2 (2024-06-10) + +* [bitnami/common] remove trailing spaces from imagePullSecrets rendering (#26882) ([362d4ac](https://github.com/bitnami/charts/commit/362d4ac94dd69be1b607fc531ceac4d67d8d57ef)), closes [#26882](https://github.com/bitnami/charts/issues/26882) + +## 2.20.1 (2024-06-10) + +* [bitnami/common] improve renderSecurityContext (#27053) ([5f0bdde](https://github.com/bitnami/charts/commit/5f0bdde77cf05afa20cb4a800090748a8d102d02)), closes [#27053](https://github.com/bitnami/charts/issues/27053) + +## 2.20.0 (2024-06-05) + +* [bitnami/*] ci: :construction_worker: Add tag and changelog support (#25359) ([91c707c](https://github.com/bitnami/charts/commit/91c707c9e4e574725a09505d2d313fb93f1b4c0a)), closes [#25359](https://github.com/bitnami/charts/issues/25359) +* [bitnami/common] Capabilities to return latest apiVersion if kubeVersion is undefined (#26758) ([6582c32](https://github.com/bitnami/charts/commit/6582c3237b772af9cb379f7eaceddb2d64b507f0)), closes [#26758](https://github.com/bitnami/charts/issues/26758) +* [bitnami/common] docs: :memo: Add changelog ([23349c9](https://github.com/bitnami/charts/commit/23349c99b70313f3e19ebcf9d3e0c154836b2cc0)) + +## 2.19.3 (2024-05-20) + +* [bitnami/*] Change non-root and rolling-tags doc URLs (#25628) ([b067c94](https://github.com/bitnami/charts/commit/b067c94f6bcde427863c197fd355f0b5ba12ff5b)), closes [#25628](https://github.com/bitnami/charts/issues/25628) +* [bitnami/*] Set new header/owner (#25558) ([8d1dc11](https://github.com/bitnami/charts/commit/8d1dc11f5fb30db6fba50c43d7af59d2f79deed3)), closes [#25558](https://github.com/bitnami/charts/issues/25558) +* [bitnami/common] feat: :sparkles: Show warning when original images are replaced (#25952) ([855045a](https://github.com/bitnami/charts/commit/855045a1a62618154c1216e8da31a4d2c14c7586)), closes [#25952](https://github.com/bitnami/charts/issues/25952) + +## 2.19.2 (2024-04-29) + +* [bitnami/common] Simplify syntax to deal with nullable objects (#25446) ([7dcea6a](https://github.com/bitnami/charts/commit/7dcea6aeb7c45d56bd6175b457bb8a2cddf8defc)), closes [#25446](https://github.com/bitnami/charts/issues/25446) +* Replace VMware by Broadcom copyright text (#25306) ([a5e4bd0](https://github.com/bitnami/charts/commit/a5e4bd0e35e419203793976a78d9d0a13de92c76)), closes [#25306](https://github.com/bitnami/charts/issues/25306) + +## 2.19.1 (2024-03-27) + +* [bitnami/common] chore: :wrench: Relax preset resource requests xlarge and 2xlarge instances (#24713 ([fdd93bb](https://github.com/bitnami/charts/commit/fdd93bb2a2f73a7df3e498b5072736a54610a908)), closes [#24713](https://github.com/bitnami/charts/issues/24713) + +## 2.19.0 (2024-03-08) + +* [bitnami/common] feat: :sparkles: Remove empty seLinuxOptions in adapted Openshift rendered security ([1f2f5ef](https://github.com/bitnami/charts/commit/1f2f5ef476efba7f284df0c36c265216325ffda9)), closes [#24268](https://github.com/bitnami/charts/issues/24268) + +## 2.18.0 (2024-03-04) + +* [bitnami/common] feat: :sparkles: :lock: Add compatibility support for securityContext in Openshift ([8fb0dd4](https://github.com/bitnami/charts/commit/8fb0dd48b6d7ec69bb59db2376365f6d76b26d97)), closes [#24040](https://github.com/bitnami/charts/issues/24040) + +## 2.17.0 (2024-02-20) + +* [bitnami/*] Bump all versions (#23602) ([b70ee2a](https://github.com/bitnami/charts/commit/b70ee2a30e4dc256bf0ac52928fb2fa7a70f049b)), closes [#23602](https://github.com/bitnami/charts/issues/23602) + +## 2.16.1 (2024-02-19) + +* [bitnami/common] chore: :wrench: Bump ephemeral storage limits (#23564) ([18c4d88](https://github.com/bitnami/charts/commit/18c4d88f7d4ae93f36d0896fa66dbe872bba1c48)), closes [#23564](https://github.com/bitnami/charts/issues/23564) + +## 2.16.0 (2024-02-15) + +* [bitnami/common] feat: :sparkles: Add ephemeral-storage to resources preset (#23544) ([23b6856](https://github.com/bitnami/charts/commit/23b68563a0e2e721aa07864cff1b877e1d074388)), closes [#23544](https://github.com/bitnami/charts/issues/23544) + +## 2.15.3 (2024-02-14) + +* [bitnami/common] chore: :pencil2: Fix typo in comment ([d07fb32](https://github.com/bitnami/charts/commit/d07fb324bd6455bf8607f66c642ff346443199ba)) + +## 2.15.2 (2024-02-14) + +* [bitnami/common] fix: :children_crossing: Improve resource warning message (#23425) ([7593e4f](https://github.com/bitnami/charts/commit/7593e4fc69fb8c50f7d626cc305c5adc56d23f48)), closes [#23425](https://github.com/bitnami/charts/issues/23425) + +## 2.15.1 (2024-02-13) + +* [bitnami/common] fix: :bug: Check if section is enabled before printing resource warning ([262b6ee](https://github.com/bitnami/charts/commit/262b6ee64c57a5293333879ec423ad41c44f162c)) + +## 2.15.0 (2024-02-13) + +* [bitnami/*] Fix docs.bitnami.com broken links (#21901) ([f35506d](https://github.com/bitnami/charts/commit/f35506d2dadee4f097986e7792df1f53ab215b5d)), closes [#21901](https://github.com/bitnami/charts/issues/21901) +* [bitnami/*] Move documentation sections from docs.bitnami.com back to the README (#22203) ([7564f36](https://github.com/bitnami/charts/commit/7564f36ca1e95ff30ee686652b7ab8690561a707)), closes [#22203](https://github.com/bitnami/charts/issues/22203) +* [bitnami/*] Update copyright: Year and company (#21815) ([6c4bf75](https://github.com/bitnami/charts/commit/6c4bf75dec58fc7c9aee9f089777b1a858c17d5b)), closes [#21815](https://github.com/bitnami/charts/issues/21815) +* [bitnami/common] feat: :sparkles: Add support for resource presets (#23410) ([310d9f9](https://github.com/bitnami/charts/commit/310d9f9e44cb913a2e482f57107970ed5bde9a69)), closes [#23410](https://github.com/bitnami/charts/issues/23410) + +## 2.14.1 (2023-12-19) + +* [bitnami/common] Fix typo with new line in common.secrets.passwords.manage (#21653) ([7e70463](https://github.com/bitnami/charts/commit/7e704634ef564adac330f1e0a67feb2a40a271dc)), closes [#21653](https://github.com/bitnami/charts/issues/21653) + +## 2.14.0 (2023-12-19) + +* [bitnami/common] add params skipB64enc and skipQuote to common.secrets.passwords.manage (#21595) ([2070eeb](https://github.com/bitnami/charts/commit/2070eeb30bbf48639e0177a42f65a1d13f42a180)), closes [#21595](https://github.com/bitnami/charts/issues/21595) + +## 2.13.4 (2023-12-15) + +* [bitnami/*] Remove relative links to non-README sections, add verification for that and update TL;DR ([1103633](https://github.com/bitnami/charts/commit/11036334d82df0490aa4abdb591543cab6cf7d7f)), closes [#20967](https://github.com/bitnami/charts/issues/20967) +* [bitnami/*] Rename VMware Application Catalog (#20361) ([3acc734](https://github.com/bitnami/charts/commit/3acc73472beb6fb56c4d99f929061001205bc57e)), closes [#20361](https://github.com/bitnami/charts/issues/20361) +* [bitnami/common] fix failOnNew implementation in common.secrets.passwords.manage (#21342) ([76a5f24](https://github.com/bitnami/charts/commit/76a5f248fbceb3d1d948c7e60fbba74fd7eb3200)), closes [#21342](https://github.com/bitnami/charts/issues/21342) +* [bitnami/common] Standardize documentation (#20334) ([3af2426](https://github.com/bitnami/charts/commit/3af242606877aea25c623b4185e6fcd285b7308d)), closes [#20334](https://github.com/bitnami/charts/issues/20334) + +## 2.13.3 (2023-10-17) + +* [bitnami/*] Update Helm charts prerequisites (#19745) ([eb755dd](https://github.com/bitnami/charts/commit/eb755dd36a4dd3cf6635be8e0598f9a7f4c4a554)), closes [#19745](https://github.com/bitnami/charts/issues/19745) +* [bitnami/common]: Address admission configuration typo (#19840) ([9a936f1](https://github.com/bitnami/charts/commit/9a936f158646e101c2507421fdcb85b787bbaf64)), closes [#19840](https://github.com/bitnami/charts/issues/19840) + +## 2.13.2 (2023-10-05) + +* [bitnami/common] update imagePullSecrets to handle map and list format (#19702) ([1d30563](https://github.com/bitnami/charts/commit/1d30563bf53d4c0ac898cf1070af57aa28a039f1)), closes [#19702](https://github.com/bitnami/charts/issues/19702) + +## 2.13.1 (2023-10-04) + +* [bitnami/common] render labels correctly when they contains templates (#19680) ([3cb44e3](https://github.com/bitnami/charts/commit/3cb44e376a472ca6721866b09f6d0ab412338cbc)), closes [#19680](https://github.com/bitnami/charts/issues/19680) + +## 2.13.0 (2023-09-29) + +* [bitnami/common]: Add capabilities macros to manage Pod Security Standard objects (#19428) ([322b76d](https://github.com/bitnami/charts/commit/322b76d6450840f08d53ecfddb5e151cac5c9e88)), closes [#19428](https://github.com/bitnami/charts/issues/19428) + +## 2.12.1 (2023-09-29) + +* [bitnami/common] allow for empty appVersion (#19467) ([8b46a33](https://github.com/bitnami/charts/commit/8b46a3366abc7d216d16ace89675f3fc42691e8f)), closes [#19467](https://github.com/bitnami/charts/issues/19467) + +## 2.12.0 (2023-09-22) + +* [bitnami/common] new macro to checksum config resources (#19261) ([73945fe](https://github.com/bitnami/charts/commit/73945fedfa2acff03fe172430fcc4b8bcf55282f)), closes [#19261](https://github.com/bitnami/charts/issues/19261) +* Revert "Autogenerate schema files (#19194)" (#19335) ([73d80be](https://github.com/bitnami/charts/commit/73d80be525c88fb4b8a54451a55acd506e337062)), closes [#19194](https://github.com/bitnami/charts/issues/19194) [#19335](https://github.com/bitnami/charts/issues/19335) + +## 2.11.1 (2023-09-15) + +* Common - Adding app.kubernetes.io/version to common labels (#17201) ([9c497be](https://github.com/bitnami/charts/commit/9c497be9d99a98a20cd01e5858014e097ebe0eaa)), closes [#17201](https://github.com/bitnami/charts/issues/17201) + +## 2.11.0 (2023-09-12) + +* [bitnami/common] New helper to return image version (#19223) ([db46696](https://github.com/bitnami/charts/commit/db466964c6cfb3368ab87be6bb4d16f74d5c6fd0)), closes [#19223](https://github.com/bitnami/charts/issues/19223) +* Autogenerate schema files (#19194) ([a2c2090](https://github.com/bitnami/charts/commit/a2c2090b5ac97f47b745c8028c6452bf99739772)), closes [#19194](https://github.com/bitnami/charts/issues/19194) + +## 2.10.1 (2023-09-08) + +* [bitnami/common]: Compatiblity with Helm 3.2.0+ (#19177) ([e4fc03d](https://github.com/bitnami/charts/commit/e4fc03d96bef6ab0318d642fb65ba508c49844f1)), closes [#19177](https://github.com/bitnami/charts/issues/19177) + +## 2.10.0 (2023-09-04) + +* [bitnami/common] new macro to merge a list of values with rendering (#18889) ([0fb66f2](https://github.com/bitnami/charts/commit/0fb66f2c6f6828a240a0c1e6857c337bf9f4202a)), closes [#18889](https://github.com/bitnami/charts/issues/18889) + +## 2.9.2 (2023-08-31) + +* Avoid using a tpl when there is no template (#18792) ([134924a](https://github.com/bitnami/charts/commit/134924a260fe2cd758a954f34e89ccb14012f348)), closes [#18792](https://github.com/bitnami/charts/issues/18792) + +## 2.9.1 (2023-08-29) + +* [bitnami/common] Add extraLabelSelectors to affinities templates (#18127) ([b9ecfdb](https://github.com/bitnami/charts/commit/b9ecfdb3421a057b76e6f35f58c26e631c74e686)), closes [#18127](https://github.com/bitnami/charts/issues/18127) + +## 2.9.0 (2023-08-22) + +* [bitnami/common] Add support for customizing standard labels (#18154) ([9a20483](https://github.com/bitnami/charts/commit/9a20483cfd1daa6bfe08fd8116516a9bb5cd9754)), closes [#18154](https://github.com/bitnami/charts/issues/18154) + +## 2.8.0 (2023-08-07) + +* [bitnami/common] Delete app kubernetes version field (#18240) ([5fe3ee4](https://github.com/bitnami/charts/commit/5fe3ee44eed88e9b6843c70cbeb6378194b2276b)), closes [#18240](https://github.com/bitnami/charts/issues/18240) + +## 2.7.0 (2023-08-07) + +* Add app.kubernetes.io/version based on AppVersion (#18194) ([4f698f8](https://github.com/bitnami/charts/commit/4f698f8ac54fc68cd8dab433b7c2d8ffb77a4067)), closes [#18194](https://github.com/bitnami/charts/issues/18194) + +## 2.6.0 (2023-07-04) + +* [bitnami/common] Add scope for common.tplvalues.render (#17033) ([daf1b54](https://github.com/bitnami/charts/commit/daf1b5445a5e1c961ab78673899dd8007b4f1000)), closes [#17033](https://github.com/bitnami/charts/issues/17033) + +## 2.5.0 (2023-06-30) + +* [bitnami/*] Change copyright section in READMEs (#17006) ([ef986a1](https://github.com/bitnami/charts/commit/ef986a1605241102b3dcafe9fd8089e6fc1201ad)), closes [#17006](https://github.com/bitnami/charts/issues/17006) +* [bitnami/common] Update common.secrets.passwords.manage and common.secrets.lookup (#17397) ([5a73cf1](https://github.com/bitnami/charts/commit/5a73cf19f92b93d88ee766669a947375135db903)), closes [#17397](https://github.com/bitnami/charts/issues/17397) +* [bitnami/several] Change copyright section in READMEs (#16989) ([5b6a5cf](https://github.com/bitnami/charts/commit/5b6a5cfb7625a751848a2e5cd796bd7278f406ca)), closes [#16989](https://github.com/bitnami/charts/issues/16989) +* Add copyright header (#17300) ([da68be8](https://github.com/bitnami/charts/commit/da68be8e951225133c7dfb572d5101ca3d61c5ae)), closes [#17300](https://github.com/bitnami/charts/issues/17300) +* Update charts readme (#17217) ([31b3c0a](https://github.com/bitnami/charts/commit/31b3c0afd968ff4429107e34101f7509e6a0e913)), closes [#17217](https://github.com/bitnami/charts/issues/17217) + +## 2.4.0 (2023-05-18) + +* [bitnami/common] feat: :sparkles: Add apiVersions for DaemonSet and VPA ([a86cfaf](https://github.com/bitnami/charts/commit/a86cfaf0acb7cc26a7a91256f4b76db8f31797ef)) + +## 2.3.0 (2023-05-12) + +* Add wording for enterprise page (#16560) ([8f22774](https://github.com/bitnami/charts/commit/8f2277440b976d52785ba9149762ad8620a73d1f)), closes [#16560](https://github.com/bitnami/charts/issues/16560) +* Remove duplicate in image pull secrets (#16529) ([ddfea70](https://github.com/bitnami/charts/commit/ddfea70831875639cb298a555ad6dd5e68f059e4)), closes [#16529](https://github.com/bitnami/charts/issues/16529) + +## 2.2.6 (2023-05-09) + +* [bitnami/several] Adapt Chart.yaml to set desired OCI annotations (#16546) ([fc9b18f](https://github.com/bitnami/charts/commit/fc9b18f2e98805d4df629acbcde696f44f973344)), closes [#16546](https://github.com/bitnami/charts/issues/16546) + +## 2.2.5 (2023-05-02) + +* [bitnami/*] Make Helm charts 100% OCI (#15998) ([8841510](https://github.com/bitnami/charts/commit/884151035efcbf2e1b3206e7def85511073fb57d)), closes [#15998](https://github.com/bitnami/charts/issues/15998) +* [bitnami/common] Fix typo in README.md to test chart publishing from GitHub (#16143) ([5b05ec3](https://github.com/bitnami/charts/commit/5b05ec32caa73240d38135e19501ab2658397d2e)), closes [#16143](https://github.com/bitnami/charts/issues/16143) + +## 2.2.4 (2023-03-07) + +* [bitnami/*] Fix markdown linter issues (#14874) ([a51e0e8](https://github.com/bitnami/charts/commit/a51e0e8d35495b907f3e70dd2f8e7c3bcbf4166a)), closes [#14874](https://github.com/bitnami/charts/issues/14874) +* [bitnami/*] Fix markdown linter issues 2 (#14890) ([aa96572](https://github.com/bitnami/charts/commit/aa9657237ee8df4a46db0d7fdf8a23230dd6902a)), closes [#14890](https://github.com/bitnami/charts/issues/14890) +* [bitnami/common] Allow empty registry name (#15296) ([f13df7b](https://github.com/bitnami/charts/commit/f13df7b00f38e5fce67eab7a1b78afb0b064344e)), closes [#15296](https://github.com/bitnami/charts/issues/15296) + +## 2.2.3 (2023-02-03) + +* [bitnami/*] Add license annotation and remove obsolete engine parameter (#14293) ([da2a794](https://github.com/bitnami/charts/commit/da2a7943bae95b6e9b5b4ed972c15e990b69fdb0)), closes [#14293](https://github.com/bitnami/charts/issues/14293) +* [bitnami/*] Change copyright date (#14682) ([add4ec7](https://github.com/bitnami/charts/commit/add4ec701108ac36ed4de2dffbdf407a0d091067)), closes [#14682](https://github.com/bitnami/charts/issues/14682) +* [bitnami/*] Change licenses annotation format (#14377) ([0ab7608](https://github.com/bitnami/charts/commit/0ab760862c660fcc78cffadf8e1d8cdd70881473)), closes [#14377](https://github.com/bitnami/charts/issues/14377) +* [bitnami/*] Unify READMEs (#14472) ([2064fb8](https://github.com/bitnami/charts/commit/2064fb8dcc78a845cdede8211af8c3cc52551161)), closes [#14472](https://github.com/bitnami/charts/issues/14472) +* [bitnami/common] chore: Correct common.images.image global in example (#14735) ([69ada7d](https://github.com/bitnami/charts/commit/69ada7da0c9c6b7ce718faef6920c61e3632fd02)), closes [#14735](https://github.com/bitnami/charts/issues/14735) + +## 2.2.2 (2022-12-12) + +* [bitnami/common] resolve namespace using common.names.namespace macro (#13481) ([35b84e8](https://github.com/bitnami/charts/commit/35b84e8ba209681d4f160ca102188af61307fccf)), closes [#13481](https://github.com/bitnami/charts/issues/13481) + +## 2.2.1 (2022-11-25) + +* [bitnami/common] fix common topology key affinity function (#13593) ([f95dec8](https://github.com/bitnami/charts/commit/f95dec803bd138b76d67a296545974c5a644d63e)), closes [#13593](https://github.com/bitnami/charts/issues/13593) + +## 2.2.0 (2022-11-14) + +* [bitnami/common] affinity topologyKey override (#13435) ([624c14e](https://github.com/bitnami/charts/commit/624c14e7121557e6a29ff0e814cb800c2f3cf619)), closes [#13435](https://github.com/bitnami/charts/issues/13435) +* [bitnami/common] Fixed naming of common.secrets.passwords.manage function in README (#13250) ([39a8bcb](https://github.com/bitnami/charts/commit/39a8bcbb1b606cc165643ae4ddcdc15f05e91583)), closes [#13250](https://github.com/bitnami/charts/issues/13250) + +## 2.1.2 (2022-10-31) + +* [bitnami/common] Do not explicitly specify namespace in affinity term. (#12932) ([638a48e](https://github.com/bitnami/charts/commit/638a48e4d3ec7b5d160f4b525ec40218512c464b)), closes [#12932](https://github.com/bitnami/charts/issues/12932) [#12668](https://github.com/bitnami/charts/issues/12668) + +## 2.1.1 (2022-10-27) + +* [bitnami/common] Fix appVersion mismatch (#13189) ([42b3b3e](https://github.com/bitnami/charts/commit/42b3b3e6c68e6af8ba19f7ec42be0d71b4c21852)), closes [#13189](https://github.com/bitnami/charts/issues/13189) + +## 2.1.0 (2022-10-27) + +* [bitnami/common] Add new function 'common.secrets.lookup' (#13150) ([e848934](https://github.com/bitnami/charts/commit/e84893410321b88adbd7d2e40b891685a15ce640)), closes [#13150](https://github.com/bitnami/charts/issues/13150) + +## 2.0.4 (2022-10-24) + +* [bitnami/*] Use new default branch name in links (#12943) ([a529e02](https://github.com/bitnami/charts/commit/a529e02597d49d944eba1eb0f190713293247176)), closes [#12943](https://github.com/bitnami/charts/issues/12943) +* [bitnami/common] kubernetes.io/tls-acme Ingress annotation triggers IngressTLS array (#13054) ([2008857](https://github.com/bitnami/charts/commit/200885790b34afd6fd04ea45949c887a907b6b38)), closes [#13054](https://github.com/bitnami/charts/issues/13054) +* [bitnami/common] quote secret value when lookup (#11276) ([c8e3019](https://github.com/bitnami/charts/commit/c8e301965f05996a2ae18e0fc8dbfcbe64428356)), closes [#11276](https://github.com/bitnami/charts/issues/11276) + +## 2.0.3 (2022-09-12) + +* [bitnami/common] Revert changes in HPA context from #12282 (#12372) ([55fdc3a](https://github.com/bitnami/charts/commit/55fdc3aff3e32502abfd8f0607ac2be54e585744)), closes [#12282](https://github.com/bitnami/charts/issues/12282) [#12372](https://github.com/bitnami/charts/issues/12372) + +## 2.0.2 (2022-09-05) + +* fix context for HPA util (#12282) ([ccd54a0](https://github.com/bitnami/charts/commit/ccd54a0d47a96903f499fbcdb52a336863020efe)), closes [#12282](https://github.com/bitnami/charts/issues/12282) + +## 2.0.1 (2022-08-23) + +* [bitnami/common] Digest/Tag new approach backward compatible (#12029) ([f1c27dc](https://github.com/bitnami/charts/commit/f1c27dc5d9540c2ea192abf1245da67f5b4f8916)), closes [#12029](https://github.com/bitnami/charts/issues/12029) + +## 2.0.0 (2022-08-18) + +* [bitnami/common] MAJOR: Add support for image digest apart from tag (#11830) ([e3fee4e](https://github.com/bitnami/charts/commit/e3fee4e41d34a6584660c3b77b8521922603ccab)), closes [#11830](https://github.com/bitnami/charts/issues/11830) + +## 1.17.1 (2022-08-18) + +* Revert changes from #11797 (#11829) ([22bb033](https://github.com/bitnami/charts/commit/22bb033224176c498920596c8d8b25b5f60a277d)), closes [#11797](https://github.com/bitnami/charts/issues/11797) [#11829](https://github.com/bitnami/charts/issues/11829) + +## 1.17.0 (2022-08-18) + +* [bitnami/common] Add support for image digest apart from tag (#11797) ([b069345](https://github.com/bitnami/charts/commit/b0693450f653318ac7da64575dac389d7041b69f)), closes [#11797](https://github.com/bitnami/charts/issues/11797) + +## 1.16.1 (2022-07-13) + +* [bitnami/*] Replace Kubeapps URL in READMEs (and kubeapps Chart.yaml) and remove BKPR references (#1 ([c6a7914](https://github.com/bitnami/charts/commit/c6a7914361e5aea6016fb45bf4d621edfd111d32)), closes [#10600](https://github.com/bitnami/charts/issues/10600) +* [bitnami/common] Affinities section does not use common.names.namespace (#11137) ([b70c24c](https://github.com/bitnami/charts/commit/b70c24c82c7a9112a4288441ad1fa8c035bb68b4)), closes [#11137](https://github.com/bitnami/charts/issues/11137) + +## 1.16.0 (2022-06-03) + +* [bitnami/common] Add mysql validation (#10565) ([75ae79a](https://github.com/bitnami/charts/commit/75ae79a434137694fd82198abe1f861d6e5a04ba)), closes [#10565](https://github.com/bitnami/charts/issues/10565) + +## 1.15.2 (2022-06-02) + +* Update Redis trademark references ([2cada87](https://github.com/bitnami/charts/commit/2cada87ed4967d5cb578b0409a0bb1edee79029a)) + +## 1.15.1 (2022-06-01) + +* [bitnami/several] Replace maintainers email by url (#10523) ([ff3cf61](https://github.com/bitnami/charts/commit/ff3cf617a1680509b0f3855d17c4ccff7b29a0ff)), closes [#10523](https://github.com/bitnami/charts/issues/10523) + +## 1.15.0 (2022-06-01) + +* Add common function common.names.fullname.namespace (#10462) ([96f447c](https://github.com/bitnami/charts/commit/96f447cd8654b6db51d9301c841bacb3a13089b3)), closes [#10462](https://github.com/bitnami/charts/issues/10462) + +## 1.14.2 (2022-05-30) + +* [bitnami/common] use -d flag for base64 (#10491) ([ca8d588](https://github.com/bitnami/charts/commit/ca8d5886a1bc0fb37d1bc770ad2333acdffd7996)), closes [#10491](https://github.com/bitnami/charts/issues/10491) [#10486](https://github.com/bitnami/charts/issues/10486) + +## 1.14.1 (2022-05-20) + +* Differentiate between autoscaling v1beta1 and v1beta2 (#10331) ([16d8a4e](https://github.com/bitnami/charts/commit/16d8a4ee73705ee6db2191d84e03a2ba3ea95deb)), closes [#10331](https://github.com/bitnami/charts/issues/10331) + +## 1.14.0 (2022-05-13) + +* [bitnami/common] Add common function for HPA api version (#10174) ([4379ab5](https://github.com/bitnami/charts/commit/4379ab56bd8f4d7f7b7817bf302c683bf9087e81)), closes [#10174](https://github.com/bitnami/charts/issues/10174) + +## 1.13.1 (2022-04-19) + +* Fix affinities identifier in README.md for common chart (#9821) ([fe95640](https://github.com/bitnami/charts/commit/fe95640ce3f5ddfb0458f440959ceda3a849a3a4)), closes [#9821](https://github.com/bitnami/charts/issues/9821) + +## 1.13.0 (2022-03-24) + +* [bitnami/common] Add apiService.apiVersion function to common.capabilities (#9562) ([bba2272](https://github.com/bitnami/charts/commit/bba227223e15937bb1f29f77425f6bd7d9238c02)), closes [#9562](https://github.com/bitnami/charts/issues/9562) + +## 1.12.0 (2022-03-16) + +* [bitnami/common] Helper to allow overriding namespace name (#9396) ([794fecb](https://github.com/bitnami/charts/commit/794fecb8cb112e8e5e9d55420451752e8bd21431)), closes [#9396](https://github.com/bitnami/charts/issues/9396) + +## 1.11.3 (2022-03-03) + +* [bitnami/common] Improve docs for passwords.manage (#9269) ([0d06114](https://github.com/bitnami/charts/commit/0d061147a5b7c7cf2bf44d2b61603ffeb48a0b51)), closes [#9269](https://github.com/bitnami/charts/issues/9269) + +## 1.11.2 (2022-02-28) + +* [bitnami/common] README: Fixed the desscription for `common.labels.matchLabels` (#9062) ([7f17db7](https://github.com/bitnami/charts/commit/7f17db7e9bcdd7918bde322b3b76a62c6a86e752)), closes [#9062](https://github.com/bitnami/charts/issues/9062) [bitnami/charts#9060](https://github.com/bitnami/charts/issues/9060) [bitnami/charts#9060](https://github.com/bitnami/charts/issues/9060) + +## 1.11.1 (2022-02-02) + +* [bitnami/common] Improve "common.secrets.passwords.manage" helper (#8861) ([01477b4](https://github.com/bitnami/charts/commit/01477b42f2be362388d69da913879c52f2250ac1)), closes [#8861](https://github.com/bitnami/charts/issues/8861) + +## 1.11.0 (2022-02-01) + +* [bitnami/common] Add ingress helper to detect cert-manager annotations (#8857) ([c0c986f](https://github.com/bitnami/charts/commit/c0c986f8d5c911c09dc84d289d2993ae1779a6ca)), closes [#8857](https://github.com/bitnami/charts/issues/8857) + +## 1.10.4 (2022-01-20) + +* [bitnami/several] Add license to the README ([05f7633](https://github.com/bitnami/charts/commit/05f763372501d596e57db713dd53ff4ff3027cc4)) +* [bitnami/several] Add license to the README ([32fb238](https://github.com/bitnami/charts/commit/32fb238e60a0affc6debd3142eaa3c3d9089ec2a)) +* [bitnami/several] Add license to the README ([b87c2f7](https://github.com/bitnami/charts/commit/b87c2f7899d48a8b02c506765e6ae82937e9ba3f)) +* [bitnami/several] Change prerequisites (#8725) ([8d740c5](https://github.com/bitnami/charts/commit/8d740c566cfdb7e2d933c40128b4e919fce953a5)), closes [#8725](https://github.com/bitnami/charts/issues/8725) + +## 1.10.3 (2021-11-29) + +* [bitnami/common] fix: :bug: Add extra check for "\"\"" values in existing secrets (#8266) ([de27be6](https://github.com/bitnami/charts/commit/de27be6e649472608f076a04a36be3674fe3b84e)), closes [#8266](https://github.com/bitnami/charts/issues/8266) + +## 1.10.2 (2021-11-29) + +* [bitnami/several] Replace HTTP by HTTPS when possible (#8259) ([eafb5bd](https://github.com/bitnami/charts/commit/eafb5bd5a2cc3aaf04fc1e8ebedd73f420d76864)), closes [#8259](https://github.com/bitnami/charts/issues/8259) + +## 1.10.1 (2021-10-27) + +* [bitnami/*] Mark PodSecurityPolicy resources as deprecated (#7948) ([5cac753](https://github.com/bitnami/charts/commit/5cac7539dcb6c3baef06ed6676bfa99c16fdb5fe)), closes [#7948](https://github.com/bitnami/charts/issues/7948) + +## 1.10.0 (2021-09-30) + +* [bitnami/common] Add new capability helper for Network Policies (#7658) ([3efb1ca](https://github.com/bitnami/charts/commit/3efb1cac924409cbda3216a2300cce031c56a1f5)), closes [#7658](https://github.com/bitnami/charts/issues/7658) + +## 1.9.1 (2021-09-22) + +* [bitnami/common] fix readme for common chart (#7577) ([3f06bdd](https://github.com/bitnami/charts/commit/3f06bdd8df1c00dbdf27230bcdf925c337826abb)), closes [#7577](https://github.com/bitnami/charts/issues/7577) +* Fix typo in bitname/common README (#7529) ([fccffb3](https://github.com/bitnami/charts/commit/fccffb33391751a1bf84c53184cffe0dcac83fd6)), closes [#7529](https://github.com/bitnami/charts/issues/7529) + +## 1.9.0 (2021-09-13) + +* [bitnami/common] Add new dependency fullname template (#7471) ([7ca2a4b](https://github.com/bitnami/charts/commit/7ca2a4bb917ac6a276a6b30be12538f4c7c3a63d)), closes [#7471](https://github.com/bitnami/charts/issues/7471) + +## 1.8.0 (2021-08-04) + +* Add cronjob apiVersion capability (#7122) ([7b84a67](https://github.com/bitnami/charts/commit/7b84a674ae99fd8ddac3b5b3c859c816b87aaf51)), closes [#7122](https://github.com/bitnami/charts/issues/7122) + +## 1.7.1 (2021-07-27) + +* [bitnami/*] Adapt values.yaml of common library, Tomcat, Wavefront and ZooKeeper charts (#6970) ([fb2693b](https://github.com/bitnami/charts/commit/fb2693bfe67a154b159d3998232cc613e1706c70)), closes [#6970](https://github.com/bitnami/charts/issues/6970) +* [bitnami/several] Bump version and update READMEs (#7069) ([6340bff](https://github.com/bitnami/charts/commit/6340bff66f93c8c797bda3ca0842e4bf770059f1)), closes [#7069](https://github.com/bitnami/charts/issues/7069) +* Replace strings with ™ in the README files (#7066) ([d298b49](https://github.com/bitnami/charts/commit/d298b4996da33c9580c2594e6dc8ad665dd0ebab)), closes [#7066](https://github.com/bitnami/charts/issues/7066) + +## 1.7.0 (2021-07-02) + +* [bitnami/common] Add supportIngressClassname (#6828) ([0c8a455](https://github.com/bitnami/charts/commit/0c8a45546a219b4b4cd370daf0643543c92739b0)), closes [#6828](https://github.com/bitnami/charts/issues/6828) + +## 1.6.1 (2021-06-16) + +* [bitnami/common] extend common.labels.matchLabels with .Values.extraMatchLabels (#6589) ([66edf04](https://github.com/bitnami/charts/commit/66edf04e3e244c343a845f9c684edf4c8ea04406)), closes [#6589](https://github.com/bitnami/charts/issues/6589) + +## 1.6.0 (2021-06-15) + +* bitnami/common: add version detection for policy api (#6662) ([dcacf06](https://github.com/bitnami/charts/commit/dcacf06f6f2b6d622e2226935db22d5b8efa20b3)), closes [#6662](https://github.com/bitnami/charts/issues/6662) + +## 1.5.2 (2021-05-21) + +* [bitnami/common] Update _ingress.tpl (#6437) ([9048150](https://github.com/bitnami/charts/commit/90481508542c4da588e0d71944592e6c4e8d36e4)), closes [#6437](https://github.com/bitnami/charts/issues/6437) + +## 1.5.1 (2021-05-14) + +* Node affinity values must be quoted. (#6348) ([f73efbe](https://github.com/bitnami/charts/commit/f73efbe074436eda6276bbf32c781fa913c6a17a)), closes [#6348](https://github.com/bitnami/charts/issues/6348) + +## 1.5.0 (2021-05-13) + +* [bitnami/common] pull secrets rendering (#6286) ([dfffe74](https://github.com/bitnami/charts/commit/dfffe74c212a28e27f537dbee54c3b5a81c7d572)), closes [#6286](https://github.com/bitnami/charts/issues/6286) + +## 1.4.3 (2021-04-26) + +* [bitnami/common] Update Redis validation's helper (#6192) ([1e3bf03](https://github.com/bitnami/charts/commit/1e3bf03e3aad56fd4dc159744626e25ec24c5772)), closes [#6192](https://github.com/bitnami/charts/issues/6192) + +## 1.4.2 (2021-03-25) + +* [bitnami/common] Common credential error (#5884) ([328ca86](https://github.com/bitnami/charts/commit/328ca863515f6ef9fe188c71110be7b951719d66)), closes [#5884](https://github.com/bitnami/charts/issues/5884) + +## 1.4.1 (2021-02-23) + +* [bitnami/common] Add possibility to pull images without giving registry name (#5582) ([15ca275](https://github.com/bitnami/charts/commit/15ca27520a16b590101fa39195f55017e2935a90)), closes [#5582](https://github.com/bitnami/charts/issues/5582) + +## 1.4.0 (2021-02-22) + +* [bitnami/common] Add RBAC/CRD apiVersion support for versions 1.22+ (#5583) ([fda87aa](https://github.com/bitnami/charts/commit/fda87aabcd004f9a67549f5d22d273dd9fff6836)), closes [#5583](https://github.com/bitnami/charts/issues/5583) + +## 1.3.9 (2021-02-09) + +* Add registered icon to all the MongoDB references (#5426) ([56f2088](https://github.com/bitnami/charts/commit/56f20884267e56175695b2917f7704b9510f4ba6)), closes [#5426](https://github.com/bitnami/charts/issues/5426) + +## 1.3.8 (2021-02-03) + +* fix(common): quote namespace name (#5363) ([d27fb5e](https://github.com/bitnami/charts/commit/d27fb5e0b327728bb4304503376aaa4d2ab50619)), closes [#5363](https://github.com/bitnami/charts/issues/5363) + +## 1.3.7 (2021-01-20) + +* [bitnami/*] Change helm version in the prerequisites (#5090) ([c5e67a3](https://github.com/bitnami/charts/commit/c5e67a388743cbee28439d2cabca27884b9daf97)), closes [#5090](https://github.com/bitnami/charts/issues/5090) +* [bitnami/common] Remove helm version checker from secret helper (#5156) ([20231b1](https://github.com/bitnami/charts/commit/20231b138fae524371e6b29504acd4cbd19ce697)), closes [#5156](https://github.com/bitnami/charts/issues/5156) + +## 1.3.6 (2021-01-18) + +* [bitnami/common] same behavior with empty string when the secret obje… (#5057) ([0bae2bb](https://github.com/bitnami/charts/commit/0bae2bbb9b42c5a8dd2b8a144ffa55ace1c8a936)), closes [#5057](https://github.com/bitnami/charts/issues/5057) + +## 1.3.5 (2021-01-17) + +* [bitnami/common] fix wrong include reference (#5056) ([11efd59](https://github.com/bitnami/charts/commit/11efd59177419d4177e59800f04b4f26ab7243f8)), closes [#5056](https://github.com/bitnami/charts/issues/5056) + +## 1.3.4 (2021-01-15) + +* [bitnami/common] Fix lookup function backward compatibility and README (#5018) ([14a0042](https://github.com/bitnami/charts/commit/14a0042dc90c01fd38f814e1e43559384a3baa9f)), closes [#5018](https://github.com/bitnami/charts/issues/5018) + +## 1.3.3 (2021-01-14) + +* [bitnami/several] Add Redis trademark (#5023) ([dfa89b8](https://github.com/bitnami/charts/commit/dfa89b865989da26a3c73f397fd3c402dd56ebe8)), closes [#5023](https://github.com/bitnami/charts/issues/5023) + +## 1.3.2 (2021-01-13) + +* [bitnami/common] Add missing else statement to ingress apiversion ([22ab07a](https://github.com/bitnami/charts/commit/22ab07ac7d39d4153cc839de2b714086e99cfc04)) + +## 1.3.1 (2021-01-13) + +* [bitnami/common] Fix cases where ingress is not at the root (#4984) ([e447d9d](https://github.com/bitnami/charts/commit/e447d9d2205fc3f2f6cd990386a691fd9204b214)), closes [#4984](https://github.com/bitnami/charts/issues/4984) + +## 1.3.0 (2021-01-13) + +* [bitnami/*] POC Lookup function implementation (#4831) ([240dc1b](https://github.com/bitnami/charts/commit/240dc1bea80a3e121fd595636496d7941bdbc5e0)), closes [#4831](https://github.com/bitnami/charts/issues/4831) + +## 1.2.3 (2020-12-31) + +* [bitnami/common] Fix incorrect backend calculation for networking/v1beta1 ([c59b869](https://github.com/bitnami/charts/commit/c59b86919f47504bc8fd06f75a024f55e58ace77)) + +## 1.2.2 (2020-12-30) + +* [bitnami/common] Fix typo in common.capabilities.kubeVersion ([a371b73](https://github.com/bitnami/charts/commit/a371b734b854aa81a7dec16c40d061f5e9a14875)) + +## 1.2.1 (2020-12-30) + +* [bitnami/common] Fix issue with global kubeversion calculation ([0bbb339](https://github.com/bitnami/charts/commit/0bbb339d60b41ab978e759863709ebb1451d07a4)) + +## 1.2.0 (2020-12-30) + +* [bitnami/common] Make ingress rules compatible with all Kubernetes versions (#4859) ([2b22a21](https://github.com/bitnami/charts/commit/2b22a217020fe3d16ef98fdcdd4a562c43f9824a)), closes [#4859](https://github.com/bitnami/charts/issues/4859) + +## 1.1.4 (2020-12-23) + +* [bitnami/common] fix: moving kube version comparison (#4804) ([cdb6ae8](https://github.com/bitnami/charts/commit/cdb6ae8f00d114f0998c604416b79f62dc27f19d)), closes [#4804](https://github.com/bitnami/charts/issues/4804) + +## 1.1.3 (2020-12-18) + +* [bitnami/*] fix typos (#4699) ([49adc63](https://github.com/bitnami/charts/commit/49adc63b672da976c55af2e077aa5648a357b77f)), closes [#4699](https://github.com/bitnami/charts/issues/4699) +* [bitnami/common] Adding networking apiVersion support for versions 1.19+ (#4776) ([5ed8c54](https://github.com/bitnami/charts/commit/5ed8c54f5e0a905effc4c1ae5c4931e6669cec30)), closes [#4776](https://github.com/bitnami/charts/issues/4776) + +## 1.1.2 (2020-12-11) + +* [bitnami/common] Fix node affinity templates (#4692) ([5b51a5c](https://github.com/bitnami/charts/commit/5b51a5c004b062282849a4abaaffd6840bb6c95f)), closes [#4692](https://github.com/bitnami/charts/issues/4692) + +## 1.1.1 (2020-11-26) + +* fix: mongodb validation auth (#4506) ([ca3fdfb](https://github.com/bitnami/charts/commit/ca3fdfbeebeba5bd7dfa4805e1ca2411e5950b09)), closes [#4506](https://github.com/bitnami/charts/issues/4506) + +## 1.1.0 (2020-11-26) + +* [bitnami/common] Add mongodb validation template (#4497) ([14ece96](https://github.com/bitnami/charts/commit/14ece96c801a7326935b6269423d8854fed3a49e)), closes [#4497](https://github.com/bitnami/charts/issues/4497) + +## 1.0.1 (2020-11-19) + +* [bitnami/common] existingSecret is in auth map (#4389) ([de9b217](https://github.com/bitnami/charts/commit/de9b2177465e1c56ca2aa1c4c486bd37a7104d7a)), closes [#4389](https://github.com/bitnami/charts/issues/4389) + +## 1.0.0 (2020-11-10) + +* bitnami/common Major version. Adapt Chart to apiVersion: v2 (#4258) ([09dbc45](https://github.com/bitnami/charts/commit/09dbc45d11c5e8fe65d6eb64dbf51571ad2c7464)), closes [#4258](https://github.com/bitnami/charts/issues/4258) + +## 0.10.0 (2020-10-27) + +* [bitnami/common] feat: add cassandra passwords validations (#4110) ([b4923d4](https://github.com/bitnami/charts/commit/b4923d48018dff1673a32eefcc0d62eb484b36da)), closes [#4110](https://github.com/bitnami/charts/issues/4110) + +## 0.9.0 (2020-10-21) + +* [bitnami/common] feat: add redis passwords validations (#4070) ([0daa8d5](https://github.com/bitnami/charts/commit/0daa8d580c06e18d94dbc0e88467347a34418596)), closes [#4070](https://github.com/bitnami/charts/issues/4070) + +## 0.8.2 (2020-10-14) + +* [bitnami/common] Allow backward compatibility for existingSecret (#4006) ([aa2b3a1](https://github.com/bitnami/charts/commit/aa2b3a18610c69b2f5c76b839483db43fa3c093c)), closes [#4006](https://github.com/bitnami/charts/issues/4006) + +## 0.8.1 (2020-10-05) + +* [bitnami/common] Fix secret name bug with defaulNameSuffix. (#3888) ([d114d44](https://github.com/bitnami/charts/commit/d114d446ef86cb6e7a72de6542905ec3b07d3684)) + +## 0.8.0 (2020-10-02) + +* [bitnami/common] Add statefulset capabilities and prepare MariaDB passwords validation for new forma ([1eb4436](https://github.com/bitnami/charts/commit/1eb44366a72e39e84e33bed1a4940c1b2c6025fc)), closes [#3859](https://github.com/bitnami/charts/issues/3859) + +## 0.7.1 (2020-09-22) + +* [bitnami/common] fix: evaluate enabled as string (#3733) ([048cdae](https://github.com/bitnami/charts/commit/048cdae5488cfcfe83ec698afaa8318aa3b1d0ca)), closes [#3733](https://github.com/bitnami/charts/issues/3733) + +## 0.7.0 (2020-09-22) + +* [bitnami/metrics-server] Add source repo (#3577) ([1ed12f9](https://github.com/bitnami/charts/commit/1ed12f96af75322b46afdb2b3d9907c11b13f765)), closes [#3577](https://github.com/bitnami/charts/issues/3577) +* PoC for pods' affinity (#3713) ([9e6a915](https://github.com/bitnami/charts/commit/9e6a915392979f0c0148875f34cca1c27e399b59)), closes [#3713](https://github.com/bitnami/charts/issues/3713) + +## 0.6.2 (2020-09-01) + +* [bitnami/common] fix: wrong use of append function (#3566) ([c912fd0](https://github.com/bitnami/charts/commit/c912fd0b7378bf2d5d56182e6d2fa6bbd74df46f)), closes [#3566](https://github.com/bitnami/charts/issues/3566) + +## 0.6.1 (2020-08-31) + +* [bitnami/common] fix: mariadb checks secret fields after check enabled (#3565) ([498056a](https://github.com/bitnami/charts/commit/498056ad16a6e89aa3b7cc231da7467ab5bd3986)), closes [#3565](https://github.com/bitnami/charts/issues/3565) + +## 0.6.0 (2020-08-19) + +* [bitnami/mariadb] Require password option at secret resource (#3411) ([a8d2464](https://github.com/bitnami/charts/commit/a8d24643756470d0280fc585b01397358c1c242d)), closes [#3411](https://github.com/bitnami/charts/issues/3411) + +## 0.5.2 (2020-08-19) + +* [bitnami/common] fix: add global parameters to postgres validation (#3460) ([1c52a2a](https://github.com/bitnami/charts/commit/1c52a2a48ea65024a753eb5b32deadd46650fb18)), closes [#3460](https://github.com/bitnami/charts/issues/3460) + +## 0.5.1 (2020-08-10) + +* fix(common): missing $ in required values helpers (#3376) ([c972152](https://github.com/bitnami/charts/commit/c972152762c14c5ab5e3847a4870f4f4f2a31224)), closes [#3376](https://github.com/bitnami/charts/issues/3376) + +## 0.5.0 (2020-08-10) + +* [bitnami/common] add psql and mysql required password validations (#3374) ([1a4419e](https://github.com/bitnami/charts/commit/1a4419e15d985f67413beff98c9fc9b9f69108fb)), closes [#3374](https://github.com/bitnami/charts/issues/3374) + +## 0.4.0 (2020-08-04) + +* [bitnami/*] Fix TL;DR typo in READMEs (#3280) ([3d7ab40](https://github.com/bitnami/charts/commit/3d7ab406fecd64f1af25f53e7d27f03ec95b29a4)), closes [#3280](https://github.com/bitnami/charts/issues/3280) +* [bitnami/all] Add categories (#3075) ([63bde06](https://github.com/bitnami/charts/commit/63bde066b87a140fab52264d0522401ab3d63509)), closes [#3075](https://github.com/bitnami/charts/issues/3075) +* Add common helpers to check secrets when upgrade (#3150) ([5a5807c](https://github.com/bitnami/charts/commit/5a5807c1b1db1f2337f6aa5308d3ff73a4329e6a)), closes [#3150](https://github.com/bitnami/charts/issues/3150) + +## 0.3.1 (2020-06-05) + +* [bitnami/several] Fix table rendering in some hubs (#2770) ([fe9fd8c](https://github.com/bitnami/charts/commit/fe9fd8c261195385aae73e165ac6c1a666fef08e)), closes [#2770](https://github.com/bitnami/charts/issues/2770) + +## 0.3.0 (2020-06-02) + +* [bitnami/common]: add template function for ingress apiVersion (#2732) ([a968a50](https://github.com/bitnami/charts/commit/a968a50916ed9fa6f823a5a3ef6e4b98d615322f)), closes [#2732](https://github.com/bitnami/charts/issues/2732) + +## 0.2.4 (2020-05-29) + +* [bitnami/common] Bump chart version (#2707) ([ff2c37a](https://github.com/bitnami/charts/commit/ff2c37a576191f4523c7f69504aea669ab68aba8)), closes [#2707](https://github.com/bitnami/charts/issues/2707) +* [bitnami/several] Fix trailing spaces to make helm lint work on all of them (#2705) ([bafba3f](https://github.com/bitnami/charts/commit/bafba3fc8b8949897ad2d99d437bd8fc975223e4)), closes [#2705](https://github.com/bitnami/charts/issues/2705) + +## 0.2.3 (2020-05-26) + +* fix(common): add name attribute to imagePullSecrets helper (#2664) ([1ea21a9](https://github.com/bitnami/charts/commit/1ea21a92a8f44bd0d82d0fd4ed30108a89cf5b34)), closes [#2664](https://github.com/bitnami/charts/issues/2664) + +## 0.2.2 (2020-05-19) + +* update bitnami/common to be compatible with helm v2.12+ (#2615) ([c7751eb](https://github.com/bitnami/charts/commit/c7751eb5764e468e1854b58a1b8491d2b13e0a4a)), closes [#2615](https://github.com/bitnami/charts/issues/2615) + +## 0.2.1 (2020-05-13) + +* bump bitnami/common version number (#2580) ([1bd1e7b](https://github.com/bitnami/charts/commit/1bd1e7bc776614b6ae10f21e9c8b23fe15db5ff4)), closes [#2580](https://github.com/bitnami/charts/issues/2580) + +## 0.2.0 (2020-04-17) + +* [bitnami/common] add secrets and warnings helpers (#2347) ([a748ff8](https://github.com/bitnami/charts/commit/a748ff82259d6553a0d4ca56ca6d7d050de859f4)), closes [#2347](https://github.com/bitnami/charts/issues/2347) + +## 0.1.1 (2020-04-08) + +* [bitnami/common] bitnami common add values yaml (#2267) ([a88c902](https://github.com/bitnami/charts/commit/a88c90212021771eacc562dd38c04381e2f63d6f)), closes [#2267](https://github.com/bitnami/charts/issues/2267) + +## 0.1.0 (2020-04-03) + +* [bitnami/common]: add initial functions (#2188) ([9401e13](https://github.com/bitnami/charts/commit/9401e13316992c36b0e33de75d5f249645a2924e)), closes [#2188](https://github.com/bitnami/charts/issues/2188) diff --git a/mongodb-sharded/charts/common/Chart.yaml b/mongodb-sharded/charts/common/Chart.yaml new file mode 100644 index 0000000..d9b57fe --- /dev/null +++ b/mongodb-sharded/charts/common/Chart.yaml @@ -0,0 +1,25 @@ +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +annotations: + licenses: Apache-2.0 +apiVersion: v2 +# Please make sure that version and appVersion are always the same. +appVersion: 2.31.7 +description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself. +home: https://bitnami.com +icon: https://dyltqmyl993wv.cloudfront.net/downloads/logos/bitnami-mark.png +keywords: + - common + - helper + - template + - function + - bitnami +maintainers: + - name: Broadcom, Inc. All Rights Reserved. + url: https://github.com/bitnami/charts +name: common +sources: + - https://github.com/bitnami/charts/tree/main/bitnami/common +type: library +version: 2.31.7 diff --git a/mongodb-sharded/charts/common/README.md b/mongodb-sharded/charts/common/README.md new file mode 100644 index 0000000..caf7fe3 --- /dev/null +++ b/mongodb-sharded/charts/common/README.md @@ -0,0 +1,391 @@ +# Bitnami Common Library Chart + +A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for grouping common logic between Bitnami charts. + +## TL;DR + +```yaml +dependencies: + - name: common + version: 2.x.x + repository: oci://registry-1.docker.io/bitnamicharts +``` + +```console +helm dependency update +``` + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.names.fullname" . }} +data: + myvalue: "Hello World" +``` + +## Why use Bitnami Secure Images? + +Those are hardened, minimal CVE images built and maintained by Bitnami. Bitnami Secure Images are based on the cloud-optimized, security-hardened enterprise [OS Photon Linux](https://vmware.github.io/photon/). Why choose BSI images? + +- Hardened secure images of popular open source software with Near-Zero Vulnerabilities +- Vulnerability Triage & Prioritization with VEX Statements, KEV and EPSS Scores +- Compliance focus with FIPS, STIG, and air-gap options, including secure bill of materials (SBOM) +- Software supply chain provenance attestation through in-toto +- First class support for the internet’s favorite Helm charts + +Each image comes with valuable security metadata. You can view the metadata in [our public catalog here](https://app-catalog.vmware.com/bitnami/apps). Note: Some data is only available with [commercial subscriptions to BSI](https://bitnami.com/). + +![Alt text](https://github.com/bitnami/containers/blob/main/BSI%20UI%201.png?raw=true "Application details") +![Alt text](https://github.com/bitnami/containers/blob/main/BSI%20UI%202.png?raw=true "Packaging report") + +If you are looking for our previous generation of images based on Debian Linux, please see the [Bitnami Legacy registry](https://hub.docker.com/u/bitnamilegacy). + +## Introduction + +This chart provides a common template helpers which can be used to develop new charts using [Helm](https://helm.sh) package manager. + +## Prerequisites + +- Kubernetes 1.23+ +- Helm 3.8.0+ + +## Parameters + +The following table lists the helpers available in the library which are scoped in different sections. + +### Affinities + +| Helper identifier | Description | Expected Input | +| ------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------ | +| `common.affinities.nodes.soft` | Return a soft nodeAffinity definition | `dict "key" "FOO" "values" (list "BAR" "BAZ")` | +| `common.affinities.nodes.hard` | Return a hard nodeAffinity definition | `dict "key" "FOO" "values" (list "BAR" "BAZ")` | +| `common.affinities.nodes` | Return a nodeAffinity definition | `dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")` | +| `common.affinities.topologyKey` | Return a topologyKey definition | `dict "topologyKey" "FOO"` | +| `common.affinities.pods.soft` | Return a soft podAffinity/podAntiAffinity definition | `dict "component" "FOO" "context" $` | +| `common.affinities.pods.hard` | Return a hard podAffinity/podAntiAffinity definition | `dict "component" "FOO" "context" $` | +| `common.affinities.pods` | Return a podAffinity/podAntiAffinity definition | `dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")` | + +### Capabilities + +| Helper identifier | Description | Expected Input | +| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------- | +| `common.capabilities.kubeVersion` | Return the target Kubernetes version (using client default if .Values.kubeVersion is not set). | `.` Chart context | +| `common.capabilities.apiVersions.has` | Return true if the apiVersion is supported | `dict "version" "batch/v1" "context" $` | +| `common.capabilities.job.apiVersion` | Return the appropriate apiVersion for job. | `.` Chart context | +| `common.capabilities.cronjob.apiVersion` | Return the appropriate apiVersion for cronjob. | `.` Chart context | +| `common.capabilities.daemonset.apiVersion` | Return the appropriate apiVersion for daemonset. | `.` Chart context | +| `common.capabilities.deployment.apiVersion` | Return the appropriate apiVersion for deployment. | `.` Chart context | +| `common.capabilities.statefulset.apiVersion` | Return the appropriate apiVersion for statefulset. | `.` Chart context | +| `common.capabilities.ingress.apiVersion` | Return the appropriate apiVersion for ingress. | `.` Chart context | +| `common.capabilities.rbac.apiVersion` | Return the appropriate apiVersion for RBAC resources. | `.` Chart context | +| `common.capabilities.crd.apiVersion` | Return the appropriate apiVersion for CRDs. | `.` Chart context | +| `common.capabilities.policy.apiVersion` | Return the appropriate apiVersion for podsecuritypolicy. | `.` Chart context | +| `common.capabilities.networkPolicy.apiVersion` | Return the appropriate apiVersion for networkpolicy. | `.` Chart context | +| `common.capabilities.apiService.apiVersion` | Return the appropriate apiVersion for APIService. | `.` Chart context | +| `common.capabilities.hpa.apiVersion` | Return the appropriate apiVersion for Horizontal Pod Autoscaler | `.` Chart context | +| `common.capabilities.vpa.apiVersion` | Return the appropriate apiVersion for Vertical Pod Autoscaler. | `.` Chart context | +| `common.capabilities.psp.supported` | Returns true if PodSecurityPolicy is supported | `.` Chart context | +| `common.capabilities.supportsHelmVersion` | Returns true if the used Helm version is 3.3+ | `.` Chart context | +| `common.capabilities.admissionConfiguration.supported` | Returns true if AdmissionConfiguration is supported | `.` Chart context | +| `common.capabilities.admissionConfiguration.apiVersion` | Return the appropriate apiVersion for AdmissionConfiguration. | `.` Chart context | +| `common.capabilities.podSecurityConfiguration.apiVersion` | Return the appropriate apiVersion for PodSecurityConfiguration. | `.` Chart context | + +### Compatibility + +| Helper identifier | Description | Expected Input | +| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | +| `common.compatibility.isOpenshift` | Return true if the detected platform is Openshift | `.` Chart context | +| `common.compatibility.renderSecurityContext` | Render a compatible securityContext depending on the platform. By default it is maintained as it is. In other platforms like Openshift we remove default user/group values that do not work out of the box with the restricted-v1 SCC | `dict "secContext" .Values.containerSecurityContext "context" $` | + +### Errors + +| Helper identifier | Description | Expected Input | +| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `common.errors.upgrade.passwords.empty` | It will ensure required passwords are given when we are upgrading a chart. If `validationErrors` is not empty it will throw an error and will stop the upgrade action. | `dict "validationErrors" (list $validationError00 $validationError01) "context" $` | +| `common.errors.insecureImages` | Throw error when original container images are replaced. The error can be bypassed by setting the `global.security.allowInsecureImages` to true. | `dict "images" (list .Values.path.to.the.imageRoot) "context" $` | + +### Images + +| Helper identifier | Description | Expected Input | +| --------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | +| `common.images.image` | Return the proper and full image name | `dict "imageRoot" .Values.path.to.the.image "global" $`, see [ImageRoot](#imageroot) for the structure. | +| `common.images.pullSecrets` | Return the proper Docker Image Registry Secret Names (deprecated: use common.images.renderPullSecrets instead) | `dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global` | +| `common.images.renderPullSecrets` | Return the proper Docker Image Registry Secret Names (evaluates values as templates) | `dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $` | +| `common.images.version` | Return the proper image version | `dict "imageRoot" .Values.path.to.the.image "chart" .Chart` , see [ImageRoot](#imageroot) for the structure. | + +### Ingress + +| Helper identifier | Description | Expected Input | +| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `common.ingress.backend` | Generate a proper Ingress backend entry depending on the API version | `dict "serviceName" "foo" "servicePort" "bar"`, see the [Ingress deprecation notice](https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/) for the syntax differences | +| `common.ingress.certManagerRequest` | Prints "true" if required cert-manager annotations for TLS signed certificates are set in the Ingress annotations | `dict "annotations" .Values.path.to.the.ingress.annotations` | + +### Labels + +| Helper identifier | Description | Expected Input | +| --------------------------- | --------------------------------------------------------------------------- | ----------------- | +| `common.labels.standard` | Return Kubernetes standard labels | `.` Chart context | +| `common.labels.matchLabels` | Labels to use on `deploy.spec.selector.matchLabels` and `svc.spec.selector` | `.` Chart context | + +### Names + +| Helper identifier | Description | Expected Input | +| ---------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `common.names.name` | Expand the name of the chart or use `.Values.nameOverride` | `.` Chart context | +| `common.names.fullname` | Create a default fully qualified app name. | `.` Chart context | +| `common.names.namespace` | Allow the release namespace to be overridden | `.` Chart context | +| `common.names.fullname.namespace` | Create a fully qualified app name adding the installation's namespace | `.` Chart context | +| `common.names.chart` | Chart name plus version | `.` Chart context | +| `common.names.dependency.fullname` | Create a default fully qualified dependency name. | `dict "chartName" "dependency-chart-name" "chartValues" .Values.dependency-chart "context" $` | + +### Resources + +| Helper identifier | Description | Expected Input | +| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | +| `common.resources.preset` | Return a resource request/limit object based on a given preset. These presets are for basic testing and not meant to be used in production. | `dict "type" "nano"` | + +### Secrets + +| Helper identifier | Description | Expected Input | +| --------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `common.secrets.name` | Generate the name of the secret. | `dict "existingSecret" .Values.path.to.the.existingSecret "defaultNameSuffix" "mySuffix" "context" $` see [ExistingSecret](#existingsecret) for the structure. | +| `common.secrets.key` | Generate secret key. | `dict "existingSecret" .Values.path.to.the.existingSecret "key" "keyName"` see [ExistingSecret](#existingsecret) for the structure. | +| `common.secrets.passwords.manage` | Generate secret password or retrieve one if already created. | `dict "secret" "secret-name" "key" "keyName" "providedValues" (list "path.to.password1" "path.to.password2") "length" 10 "strong" false "chartName" "chartName" "honorProvidedValues" false "context" $`, length, strong, honorProvidedValues and chartName fields are optional. | +| `common.secrets.exists` | Returns whether a previous generated secret already exists. | `dict "secret" "secret-name" "context" $` | +| `common.secrets.lookup` | Reuses the value from an existing secret, otherwise sets its value to a default value. | `dict "secret" "secret-name" "key" "keyName" "defaultValue" .Values.myValue "context" $` | + +### Storage + +| Helper identifier | Description | Expected Input | +| ---------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `common.storage.class` | Return the proper Storage Class | `dict "persistence" .Values.path.to.the.persistence "global" $`, see [Persistence](#persistence) for the structure. | + +### TplValues + +| Helper identifier | Description | Expected Input | +| ---------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `common.tplvalues.render` | Renders a value that contains template | `dict "value" .Values.path.to.the.Value "context" $`, value is the value should rendered as template, context frequently is the chart context `$` or `.` | +| `common.tplvalues.merge` | Merge a list of values that contains template after rendering them. | `dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $` | +| `common.tplvalues.merge-overwrite` | Merge a list of values that contains template after rendering them. | `dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $` | + +### Utils + +| Helper identifier | Description | Expected Input | +| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `common.utils.fieldToEnvVar` | Build environment variable name given a field. | `dict "field" "my-password"` | +| `common.utils.secret.getvalue` | Print instructions to get a secret value. | `dict "secret" "secret-name" "field" "secret-value-field" "context" $` | +| `common.utils.getValueFromKey` | Gets a value from `.Values` object given its key path | `dict "key" "path.to.key" "context" $` | +| `common.utils.getKeyFromList` | Returns first `.Values` key with a defined value or first of the list if all non-defined | `dict "keys" (list "path.to.key1" "path.to.key2") "context" $` | +| `common.utils.checksumTemplate` | Checksum a template at "path" containing a *single* resource (ConfigMap,Secret) for use in pod annotations, excluding the metadata (see #18376) | `dict "path" "/configmap.yaml" "context" $` | + +### Validations + +| Helper identifier | Description | Expected Input | +| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `common.validations.values.single.empty` | Validate a value must not be empty. | `dict "valueKey" "path.to.value" "secret" "secret.name" "field" "my-password" "subchart" "subchart" "context" $` secret, field and subchart are optional. In case they are given, the helper will generate a how to get instruction. See [ValidateValue](#validatevalue) | +| `common.validations.values.multiple.empty` | Validate a multiple values must not be empty. It returns a shared error for all the values. | `dict "required" (list $validateValueConf00 $validateValueConf01) "context" $`. See [ValidateValue](#validatevalue) | +| `common.validations.values.mariadb.passwords` | This helper will ensure required password for MariaDB are not empty. It returns a shared error for all the values. | `dict "secret" "mariadb-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use mariadb chart and the helper. | + +### Warnings + +| Helper identifier | Description | Expected Input | +| -------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------- | +| `common.warnings.rollingTag` | Warning about using rolling tag. | `ImageRoot` see [ImageRoot](#imageroot) for the structure. | +| `common.warnings.modifiedImages` | Warning about replaced images from the original. | `ImageRoot` see [ImageRoot](#imageroot) for the structure. | +| `common.warnings.resources` | Warning about not setting the resource object in all deployments. | `dict "sections" (list "path1" "path2") context $` | + +## Special input schemas + +### ImageRoot + +```yaml +registry: + type: string + description: Docker registry where the image is located + example: docker.io + +repository: + type: string + description: Repository and image name + example: bitnami/nginx + +tag: + type: string + description: image tag + example: 1.16.1-debian-10-r63 + +pullPolicy: + type: string + description: Specify a imagePullPolicy.' + +pullSecrets: + type: array + items: + type: string + description: Optionally specify an array of imagePullSecrets (evaluated as templates). + +debug: + type: boolean + description: Set to true if you would like to see extra information on logs + example: false + +## An instance would be: +# registry: docker.io +# repository: bitnami/nginx +# tag: 1.16.1-debian-10-r63 +# pullPolicy: IfNotPresent +# debug: false +``` + +### Persistence + +```yaml +enabled: + type: boolean + description: Whether enable persistence. + example: true + +storageClass: + type: string + description: Ghost data Persistent Volume Storage Class, If set to "-", storageClassName: "" which disables dynamic provisioning. + example: "-" + +accessMode: + type: string + description: Access mode for the Persistent Volume Storage. + example: ReadWriteOnce + +size: + type: string + description: Size the Persistent Volume Storage. + example: 8Gi + +path: + type: string + description: Path to be persisted. + example: /bitnami + +## An instance would be: +# enabled: true +# storageClass: "-" +# accessMode: ReadWriteOnce +# size: 8Gi +# path: /bitnami +``` + +### ExistingSecret + +```yaml +name: + type: string + description: Name of the existing secret. + example: mySecret +keyMapping: + description: Mapping between the expected key name and the name of the key in the existing secret. + type: object + +## An instance would be: +# name: mySecret +# keyMapping: +# password: myPasswordKey +``` + +#### Example of use + +When we store sensitive data for a deployment in a secret, some times we want to give to users the possibility of using theirs existing secrets. + +```yaml +# templates/secret.yaml +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.names.fullname" . }} + labels: + app: {{ include "common.names.fullname" . }} +type: Opaque +data: + password: {{ .Values.password | b64enc | quote }} + +# templates/dpl.yaml +--- +... + env: + - name: PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "common.secrets.name" (dict "existingSecret" .Values.existingSecret "context" $) }} + key: {{ include "common.secrets.key" (dict "existingSecret" .Values.existingSecret "key" "password") }} +... + +# values.yaml +--- +name: mySecret +keyMapping: + password: myPasswordKey +``` + +### ValidateValue + +#### NOTES.txt + +```console +{{- $validateValueConf00 := (dict "valueKey" "path.to.value00" "secret" "secretName" "field" "password-00") -}} +{{- $validateValueConf01 := (dict "valueKey" "path.to.value01" "secret" "secretName" "field" "password-01") -}} + +{{ include "common.validations.values.multiple.empty" (dict "required" (list $validateValueConf00 $validateValueConf01) "context" $) }} +``` + +If we force those values to be empty we will see some alerts + +```console +helm install test mychart --set path.to.value00="",path.to.value01="" + 'path.to.value00' must not be empty, please add '--set path.to.value00=$PASSWORD_00' to the command. To get the current value: + + export PASSWORD_00=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-00}" | base64 -d) + + 'path.to.value01' must not be empty, please add '--set path.to.value01=$PASSWORD_01' to the command. To get the current value: + + export PASSWORD_01=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-01}" | base64 -d) +``` + +## Upgrading + +### To 1.0.0 + +[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL. + +#### What changes were introduced in this major version? + +- Previous versions of this Helm Chart use `apiVersion: v1` (installable by both Helm 2 and 3), this Helm Chart was updated to `apiVersion: v2` (installable by Helm 3 only). [Here](https://helm.sh/docs/topics/charts/#the-apiversion-field) you can find more information about the `apiVersion` field. +- Use `type: library`. [Here](https://v3.helm.sh/docs/faq/#library-chart-support) you can find more information. +- The different fields present in the *Chart.yaml* file has been ordered alphabetically in a homogeneous way for all the Bitnami Helm Charts + +#### Considerations when upgrading to this version + +- If you want to upgrade to this version from a previous one installed with Helm v3, you shouldn't face any issues +- If you want to upgrade to this version using Helm v2, this scenario is not supported as this version doesn't support Helm v2 anymore +- If you installed the previous version with Helm v2 and wants to upgrade to this version with Helm v3, please refer to the [official Helm documentation](https://helm.sh/docs/topics/v2_v3_migration/#migration-use-cases) about migrating from Helm v2 to v3 + +#### Useful links + +- +- +- + +## License + +Copyright © 2025 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/mongodb-sharded/charts/common/templates/_affinities.tpl b/mongodb-sharded/charts/common/templates/_affinities.tpl new file mode 100644 index 0000000..2082591 --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_affinities.tpl @@ -0,0 +1,169 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} + +{{/* +Return a soft nodeAffinity definition +{{ include "common.affinities.nodes.soft" (dict "key" "FOO" "values" (list "BAR" "BAZ")) -}} +*/}} +{{- define "common.affinities.nodes.soft" -}} +preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: {{ .key }} + operator: In + values: + {{- range .values }} + - {{ . | quote }} + {{- end }} + weight: 1 +{{- end -}} + +{{/* +Return a hard nodeAffinity definition +{{ include "common.affinities.nodes.hard" (dict "key" "FOO" "values" (list "BAR" "BAZ")) -}} +*/}} +{{- define "common.affinities.nodes.hard" -}} +requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: {{ .key }} + operator: In + values: + {{- range .values }} + - {{ . | quote }} + {{- end }} +{{- end -}} + +{{/* +Return a nodeAffinity definition +{{ include "common.affinities.nodes" (dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")) -}} +*/}} +{{- define "common.affinities.nodes" -}} + {{- if eq .type "soft" }} + {{- include "common.affinities.nodes.soft" . -}} + {{- else if eq .type "hard" }} + {{- include "common.affinities.nodes.hard" . -}} + {{- end -}} +{{- end -}} + +{{/* +Return a topologyKey definition +{{ include "common.affinities.topologyKey" (dict "topologyKey" "BAR") -}} +*/}} +{{- define "common.affinities.topologyKey" -}} +{{ .topologyKey | default "kubernetes.io/hostname" -}} +{{- end -}} + +{{/* +Return a soft podAffinity/podAntiAffinity definition +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}} +*/}} +{{- define "common.affinities.pods.soft" -}} +{{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} +{{- $extraMatchLabels := default (dict) .extraMatchLabels -}} +{{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}} +{{- $extraNamespaces := default (list) .extraNamespaces -}} +preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} + {{- if not (empty $component) }} + {{ printf "app.kubernetes.io/component: %s" $component }} + {{- end }} + {{- range $key, $value := $extraMatchLabels }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- if $extraNamespaces }} + namespaces: + - {{ .context.Release.Namespace }} + {{- with $extraNamespaces }} + {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} + {{- end }} + {{- end }} + topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} + weight: 1 + {{- range $extraPodAffinityTerms }} + - podAffinityTerm: + labelSelector: + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" $.context )) | nindent 10 }} + {{- if not (empty $component) }} + {{ printf "app.kubernetes.io/component: %s" $component }} + {{- end }} + {{- range $key, $value := .extraMatchLabels }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- if .namespaces }} + namespaces: + - {{ $.context.Release.Namespace }} + {{- with .namespaces }} + {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} + {{- end }} + {{- end }} + topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} + weight: {{ .weight | default 1 -}} + {{- end -}} +{{- end -}} + +{{/* +Return a hard podAffinity/podAntiAffinity definition +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}} +*/}} +{{- define "common.affinities.pods.hard" -}} +{{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} +{{- $extraMatchLabels := default (dict) .extraMatchLabels -}} +{{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}} +{{- $extraNamespaces := default (list) .extraNamespaces -}} +requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} + {{- if not (empty $component) }} + {{ printf "app.kubernetes.io/component: %s" $component }} + {{- end }} + {{- range $key, $value := $extraMatchLabels }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- if $extraNamespaces }} + namespaces: + - {{ .context.Release.Namespace }} + {{- with $extraNamespaces }} + {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 6 }} + {{- end }} + {{- end }} + topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} + {{- range $extraPodAffinityTerms }} + - labelSelector: + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" $.context )) | nindent 8 }} + {{- if not (empty $component) }} + {{ printf "app.kubernetes.io/component: %s" $component }} + {{- end }} + {{- range $key, $value := .extraMatchLabels }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- if .namespaces }} + namespaces: + - {{ $.context.Release.Namespace }} + {{- with .namespaces }} + {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 6 }} + {{- end }} + {{- end }} + topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} + {{- end -}} +{{- end -}} + +{{/* +Return a podAffinity/podAntiAffinity definition +{{ include "common.affinities.pods" (dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")) -}} +*/}} +{{- define "common.affinities.pods" -}} + {{- if eq .type "soft" }} + {{- include "common.affinities.pods.soft" . -}} + {{- else if eq .type "hard" }} + {{- include "common.affinities.pods.hard" . -}} + {{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_capabilities.tpl b/mongodb-sharded/charts/common/templates/_capabilities.tpl new file mode 100644 index 0000000..6572a1f --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_capabilities.tpl @@ -0,0 +1,178 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} + +{{/* +Return the target Kubernetes version +*/}} +{{- define "common.capabilities.kubeVersion" -}} +{{- default (default .Capabilities.KubeVersion.Version .Values.kubeVersion) ((.Values.global).kubeVersion) -}} +{{- end -}} + +{{/* +Return true if the apiVersion is supported +Usage: +{{ include "common.capabilities.apiVersions.has" (dict "version" "batch/v1" "context" $) }} +*/}} +{{- define "common.capabilities.apiVersions.has" -}} +{{- $providedAPIVersions := default .context.Values.apiVersions ((.context.Values.global).apiVersions) -}} +{{- if and (empty $providedAPIVersions) (.context.Capabilities.APIVersions.Has .version) -}} + {{- true -}} +{{- else if has .version $providedAPIVersions -}} + {{- true -}} +{{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for poddisruptionbudget. +*/}} +{{- define "common.capabilities.policy.apiVersion" -}} +{{- print "policy/v1" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for networkpolicy. +*/}} +{{- define "common.capabilities.networkPolicy.apiVersion" -}} +{{- print "networking.k8s.io/v1" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for job. +*/}} +{{- define "common.capabilities.job.apiVersion" -}} +{{- print "batch/v1" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for cronjob. +*/}} +{{- define "common.capabilities.cronjob.apiVersion" -}} +{{- print "batch/v1" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for daemonset. +*/}} +{{- define "common.capabilities.daemonset.apiVersion" -}} +{{- print "apps/v1" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for deployment. +*/}} +{{- define "common.capabilities.deployment.apiVersion" -}} +{{- print "apps/v1" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for statefulset. +*/}} +{{- define "common.capabilities.statefulset.apiVersion" -}} +{{- print "apps/v1" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for ingress. +*/}} +{{- define "common.capabilities.ingress.apiVersion" -}} +{{- print "networking.k8s.io/v1" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for RBAC resources. +*/}} +{{- define "common.capabilities.rbac.apiVersion" -}} +{{- print "rbac.authorization.k8s.io/v1" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for CRDs. +*/}} +{{- define "common.capabilities.crd.apiVersion" -}} +{{- print "apiextensions.k8s.io/v1" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for APIService. +*/}} +{{- define "common.capabilities.apiService.apiVersion" -}} +{{- print "apiregistration.k8s.io/v1" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for Horizontal Pod Autoscaler. +*/}} +{{- define "common.capabilities.hpa.apiVersion" -}} +{{- $kubeVersion := include "common.capabilities.kubeVersion" .context -}} +{{- print "autoscaling/v2" -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for Vertical Pod Autoscaler. +*/}} +{{- define "common.capabilities.vpa.apiVersion" -}} +{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}} +{{- if and (not (empty $kubeVersion)) (semverCompare "<1.25-0" $kubeVersion) -}} +{{- print "autoscaling/v1beta2" -}} +{{- else -}} +{{- print "autoscaling/v1" -}} +{{- end -}} +{{- end -}} + +{{/* +Returns true if PodSecurityPolicy is supported +*/}} +{{- define "common.capabilities.psp.supported" -}} +{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}} +{{- if or (empty $kubeVersion) (semverCompare "<1.25-0" $kubeVersion) -}} + {{- true -}} +{{- end -}} +{{- end -}} + +{{/* +Returns true if AdmissionConfiguration is supported +*/}} +{{- define "common.capabilities.admissionConfiguration.supported" -}} +{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}} + {{- true -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for AdmissionConfiguration. +*/}} +{{- define "common.capabilities.admissionConfiguration.apiVersion" -}} +{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}} +{{- if and (not (empty $kubeVersion)) (semverCompare "<1.25-0" $kubeVersion) -}} +{{- print "apiserver.config.k8s.io/v1beta1" -}} +{{- else -}} +{{- print "apiserver.config.k8s.io/v1" -}} +{{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for PodSecurityConfiguration. +*/}} +{{- define "common.capabilities.podSecurityConfiguration.apiVersion" -}} +{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}} +{{- if and (not (empty $kubeVersion)) (semverCompare "<1.25-0" $kubeVersion) -}} +{{- print "pod-security.admission.config.k8s.io/v1beta1" -}} +{{- else -}} +{{- print "pod-security.admission.config.k8s.io/v1" -}} +{{- end -}} +{{- end -}} + +{{/* +Returns true if the used Helm version is 3.3+. +A way to check the used Helm version was not introduced until version 3.3.0 with .Capabilities.HelmVersion, which contains an additional "{}}" structure. +This check is introduced as a regexMatch instead of {{ if .Capabilities.HelmVersion }} because checking for the key HelmVersion in <3.3 results in a "interface not found" error. +**To be removed when the catalog's minimun Helm version is 3.3** +*/}} +{{- define "common.capabilities.supportsHelmVersion" -}} +{{- if regexMatch "{(v[0-9])*[^}]*}}$" (.Capabilities | toString ) }} + {{- true -}} +{{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_compatibility.tpl b/mongodb-sharded/charts/common/templates/_compatibility.tpl new file mode 100644 index 0000000..6f821e7 --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_compatibility.tpl @@ -0,0 +1,46 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} + +{{/* +Return true if the detected platform is Openshift +Usage: +{{- include "common.compatibility.isOpenshift" . -}} +*/}} +{{- define "common.compatibility.isOpenshift" -}} +{{- if .Capabilities.APIVersions.Has "security.openshift.io/v1" -}} +{{- true -}} +{{- end -}} +{{- end -}} + +{{/* +Render a compatible securityContext depending on the platform. By default it is maintained as it is. In other platforms like Openshift we remove default user/group values that do not work out of the box with the restricted-v1 SCC +Usage: +{{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" $) -}} +*/}} +{{- define "common.compatibility.renderSecurityContext" -}} +{{- $adaptedContext := .secContext -}} + +{{- if (((.context.Values.global).compatibility).openshift) -}} + {{- if or (eq .context.Values.global.compatibility.openshift.adaptSecurityContext "force") (and (eq .context.Values.global.compatibility.openshift.adaptSecurityContext "auto") (include "common.compatibility.isOpenshift" .context)) -}} + {{/* Remove incompatible user/group values that do not work in Openshift out of the box */}} + {{- $adaptedContext = omit $adaptedContext "fsGroup" "runAsUser" "runAsGroup" -}} + {{- if not .secContext.seLinuxOptions -}} + {{/* If it is an empty object, we remove it from the resulting context because it causes validation issues */}} + {{- $adaptedContext = omit $adaptedContext "seLinuxOptions" -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{/* Remove empty seLinuxOptions object if global.compatibility.omitEmptySeLinuxOptions is set to true */}} +{{- if and (((.context.Values.global).compatibility).omitEmptySeLinuxOptions) (not .secContext.seLinuxOptions) -}} + {{- $adaptedContext = omit $adaptedContext "seLinuxOptions" -}} +{{- end -}} +{{/* Remove fields that are disregarded when running the container in privileged mode */}} +{{- if $adaptedContext.privileged -}} + {{- $adaptedContext = omit $adaptedContext "capabilities" -}} +{{- end -}} +{{- omit $adaptedContext "enabled" | toYaml -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_errors.tpl b/mongodb-sharded/charts/common/templates/_errors.tpl new file mode 100644 index 0000000..53db35c --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_errors.tpl @@ -0,0 +1,92 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Throw error when upgrading using empty passwords values that must not be empty. + +Usage: +{{- $validationError00 := include "common.validations.values.single.empty" (dict "valueKey" "path.to.password00" "secret" "secretName" "field" "password-00") -}} +{{- $validationError01 := include "common.validations.values.single.empty" (dict "valueKey" "path.to.password01" "secret" "secretName" "field" "password-01") -}} +{{ include "common.errors.upgrade.passwords.empty" (dict "validationErrors" (list $validationError00 $validationError01) "context" $) }} + +Required password params: + - validationErrors - String - Required. List of validation strings to be return, if it is empty it won't throw error. + - context - Context - Required. Parent context. +*/}} +{{- define "common.errors.upgrade.passwords.empty" -}} + {{- $validationErrors := join "" .validationErrors -}} + {{- if and $validationErrors .context.Release.IsUpgrade -}} + {{- $errorString := "\nPASSWORDS ERROR: You must provide your current passwords when upgrading the release." -}} + {{- $errorString = print $errorString "\n Note that even after reinstallation, old credentials may be needed as they may be kept in persistent volume claims." -}} + {{- $errorString = print $errorString "\n Further information can be obtained at https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues/#credential-errors-while-upgrading-chart-releases" -}} + {{- $errorString = print $errorString "\n%s" -}} + {{- printf $errorString $validationErrors | fail -}} + {{- end -}} +{{- end -}} + +{{/* +Throw error when original container images are replaced. +The error can be bypassed by setting the "global.security.allowInsecureImages" to true. In this case, +a warning message will be shown instead. + +Usage: +{{ include "common.errors.insecureImages" (dict "images" (list .Values.path.to.the.imageRoot) "context" $) }} +*/}} +{{- define "common.errors.insecureImages" -}} +{{- $relocatedImages := list -}} +{{- $replacedImages := list -}} +{{- $bitnamiLegacyImages := list -}} +{{- $retaggedImages := list -}} +{{- $globalRegistry := ((.context.Values.global).imageRegistry) -}} +{{- $originalImages := .context.Chart.Annotations.images -}} +{{- range .images -}} + {{- $registryName := default .registry $globalRegistry -}} + {{- $fullImageNameNoTag := printf "%s/%s" $registryName .repository -}} + {{- $fullImageName := printf "%s:%s" $fullImageNameNoTag .tag -}} + {{- if not (contains $fullImageNameNoTag $originalImages) -}} + {{- if not (contains $registryName $originalImages) -}} + {{- $relocatedImages = append $relocatedImages $fullImageName -}} + {{- else if not (contains .repository $originalImages) -}} + {{- $replacedImages = append $replacedImages $fullImageName -}} + {{- if contains "docker.io/bitnamilegacy/" $fullImageNameNoTag -}} + {{- $bitnamiLegacyImages = append $bitnamiLegacyImages $fullImageName -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- if not (contains (printf "%s:%s" .repository .tag) $originalImages) -}} + {{- $retaggedImages = append $retaggedImages $fullImageName -}} + {{- end -}} +{{- end -}} + +{{- if and (or (gt (len $relocatedImages) 0) (gt (len $replacedImages) 0)) (((.context.Values.global).security).allowInsecureImages) -}} + {{- print "\n\nâš  SECURITY WARNING: Verifying original container images was skipped. Please note this Helm chart was designed, tested, and validated on multiple platforms using a specific set of Bitnami and Bitnami Secure Images containers. Substituting other containers is likely to cause degraded security and performance, broken chart features, and missing environment variables.\n" -}} +{{- else if (or (gt (len $relocatedImages) 0) (gt (len $replacedImages) 0)) -}} + {{- $errorString := "Original containers have been substituted for unrecognized ones. Deploying this chart with non-standard containers is likely to cause degraded security and performance, broken chart features, and missing environment variables." -}} + {{- $errorString = print $errorString "\n\nUnrecognized images:" -}} + {{- range (concat $relocatedImages $replacedImages) -}} + {{- $errorString = print $errorString "\n - " . -}} + {{- end -}} + {{- if and (eq (len $relocatedImages) 0) (eq (len $replacedImages) (len $bitnamiLegacyImages)) -}} + {{- $errorString = print "\n\nâš  WARNING: " $errorString -}} + {{- print $errorString -}} + {{- else if or (contains "docker.io/bitnami/" $originalImages) (contains "docker.io/bitnamiprem/" $originalImages) (contains "docker.io/bitnamisecure/" $originalImages) -}} + {{- $errorString = print "\n\nâš  ERROR: " $errorString -}} + {{- $errorString = print $errorString "\n\nIf you are sure you want to proceed with non-standard containers, you can skip container image verification by setting the global parameter 'global.security.allowInsecureImages' to true." -}} + {{- $errorString = print $errorString "\nFurther information can be obtained at https://github.com/bitnami/charts/issues/30850" -}} + {{- print $errorString | fail -}} + {{- else if gt (len $replacedImages) 0 -}} + {{- $errorString = print "\n\nâš  WARNING: " $errorString -}} + {{- print $errorString -}} + {{- end -}} +{{- else if gt (len $retaggedImages) 0 -}} + {{- $warnString := "\n\nâš  WARNING: Original containers have been retagged. Please note this Helm chart was tested, and validated on multiple platforms using a specific set of Bitnami and Bitnami Secure Images containers. Substituting original image tags could cause unexpected behavior." -}} + {{- $warnString = print $warnString "\n\nRetagged images:" -}} + {{- range $retaggedImages -}} + {{- $warnString = print $warnString "\n - " . -}} + {{- end -}} + {{- print $warnString -}} +{{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_images.tpl b/mongodb-sharded/charts/common/templates/_images.tpl new file mode 100644 index 0000000..9344d0d --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_images.tpl @@ -0,0 +1,115 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Return the proper image name. +If image tag and digest are not defined, termination fallbacks to chart appVersion. +{{ include "common.images.image" ( dict "imageRoot" .Values.path.to.the.image "global" .Values.global "chart" .Chart ) }} +*/}} +{{- define "common.images.image" -}} +{{- $registryName := default .imageRoot.registry ((.global).imageRegistry) -}} +{{- $repositoryName := .imageRoot.repository -}} +{{- $separator := ":" -}} +{{- $termination := .imageRoot.tag | toString -}} + +{{- if not .imageRoot.tag }} + {{- if .chart }} + {{- $termination = .chart.AppVersion | toString -}} + {{- end -}} +{{- end -}} +{{- if .imageRoot.digest }} + {{- $separator = "@" -}} + {{- $termination = .imageRoot.digest | toString -}} +{{- end -}} +{{- if $registryName }} + {{- printf "%s/%s%s%s" $registryName $repositoryName $separator $termination -}} +{{- else -}} + {{- printf "%s%s%s" $repositoryName $separator $termination -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names (deprecated: use common.images.renderPullSecrets instead) +{{ include "common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global) }} +*/}} +{{- define "common.images.pullSecrets" -}} + {{- $pullSecrets := list }} + + {{- range ((.global).imagePullSecrets) -}} + {{- if kindIs "map" . -}} + {{- $pullSecrets = append $pullSecrets .name -}} + {{- else -}} + {{- $pullSecrets = append $pullSecrets . -}} + {{- end }} + {{- end -}} + + {{- range .images -}} + {{- range .pullSecrets -}} + {{- if kindIs "map" . -}} + {{- $pullSecrets = append $pullSecrets .name -}} + {{- else -}} + {{- $pullSecrets = append $pullSecrets . -}} + {{- end -}} + {{- end -}} + {{- end -}} + + {{- if (not (empty $pullSecrets)) -}} +imagePullSecrets: + {{- range $pullSecrets | uniq }} + - name: {{ . }} + {{- end }} + {{- end }} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names evaluating values as templates +{{ include "common.images.renderPullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $) }} +*/}} +{{- define "common.images.renderPullSecrets" -}} + {{- $pullSecrets := list }} + {{- $context := .context }} + + {{- range (($context.Values.global).imagePullSecrets) -}} + {{- if kindIs "map" . -}} + {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" .name "context" $context)) -}} + {{- else -}} + {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}} + {{- end -}} + {{- end -}} + + {{- range .images -}} + {{- range .pullSecrets -}} + {{- if kindIs "map" . -}} + {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" .name "context" $context)) -}} + {{- else -}} + {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}} + {{- end -}} + {{- end -}} + {{- end -}} + + {{- if (not (empty $pullSecrets)) -}} +imagePullSecrets: + {{- range $pullSecrets | uniq }} + - name: {{ . }} + {{- end }} + {{- end }} +{{- end -}} + +{{/* +Return the proper image version (ingores image revision/prerelease info & fallbacks to chart appVersion) +{{ include "common.images.version" ( dict "imageRoot" .Values.path.to.the.image "chart" .Chart ) }} +*/}} +{{- define "common.images.version" -}} +{{- $imageTag := .imageRoot.tag | toString -}} +{{/* regexp from https://github.com/Masterminds/semver/blob/23f51de38a0866c5ef0bfc42b3f735c73107b700/version.go#L41-L44 */}} +{{- if regexMatch `^([0-9]+)(\.[0-9]+)?(\.[0-9]+)?(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?$` $imageTag -}} + {{- $version := semver $imageTag -}} + {{- printf "%d.%d.%d" $version.Major $version.Minor $version.Patch -}} +{{- else -}} + {{- print .chart.AppVersion -}} +{{- end -}} +{{- end -}} + diff --git a/mongodb-sharded/charts/common/templates/_ingress.tpl b/mongodb-sharded/charts/common/templates/_ingress.tpl new file mode 100644 index 0000000..ccfdea5 --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_ingress.tpl @@ -0,0 +1,41 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} + +{{/* +Generate backend entry that is compatible with all Kubernetes API versions. + +Usage: +{{ include "common.ingress.backend" (dict "serviceName" "backendName" "servicePort" "backendPort" "context" $) }} + +Params: + - serviceName - String. Name of an existing service backend + - servicePort - String/Int. Port name (or number) of the service. It will be translated to different yaml depending if it is a string or an integer. + - context - Dict - Required. The context for the template evaluation. +*/}} +{{- define "common.ingress.backend" -}} +service: + name: {{ .serviceName }} + port: + {{- if typeIs "string" .servicePort }} + name: {{ .servicePort }} + {{- else if or (typeIs "int" .servicePort) (typeIs "float64" .servicePort) }} + number: {{ .servicePort | int }} + {{- end }} +{{- end -}} + +{{/* +Return true if cert-manager required annotations for TLS signed +certificates are set in the Ingress annotations +Ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations +Usage: +{{ include "common.ingress.certManagerRequest" ( dict "annotations" .Values.path.to.the.ingress.annotations ) }} +*/}} +{{- define "common.ingress.certManagerRequest" -}} +{{ if or (hasKey .annotations "cert-manager.io/cluster-issuer") (hasKey .annotations "cert-manager.io/issuer") (hasKey .annotations "kubernetes.io/tls-acme") }} + {{- true -}} +{{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_labels.tpl b/mongodb-sharded/charts/common/templates/_labels.tpl new file mode 100644 index 0000000..da6e3fe --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_labels.tpl @@ -0,0 +1,46 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} + +{{/* +Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} +*/}} +{{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{- $default := dict "app.kubernetes.io/name" (include "common.names.name" .context) "helm.sh/chart" (include "common.names.chart" .context) "app.kubernetes.io/instance" .context.Release.Name "app.kubernetes.io/managed-by" .context.Release.Service -}} +{{- with .context.Chart.AppVersion -}} +{{- $_ := set $default "app.kubernetes.io/version" . -}} +{{- end -}} +{{ template "common.tplvalues.merge" (dict "values" (list .customLabels $default) "context" .context) }} +{{- else -}} +app.kubernetes.io/name: {{ include "common.names.name" . }} +helm.sh/chart: {{ include "common.names.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- with .Chart.AppVersion }} +app.kubernetes.io/version: {{ . | replace "+" "_" | quote }} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. +*/}} +{{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") (dict "app.kubernetes.io/name" (include "common.names.name" .context) "app.kubernetes.io/instance" .context.Release.Name ) | toYaml }} +{{- else -}} +app.kubernetes.io/name: {{ include "common.names.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_names.tpl b/mongodb-sharded/charts/common/templates/_names.tpl new file mode 100644 index 0000000..c9e26f0 --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_names.tpl @@ -0,0 +1,72 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "common.names.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "common.names.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "common.names.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- $releaseName := regexReplaceAll "(-?[^a-z\\d\\-])+-?" (lower .Release.Name) "-" -}} +{{- if contains $name $releaseName -}} +{{- $releaseName | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" $releaseName $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create a default fully qualified dependency name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +Usage: +{{ include "common.names.dependency.fullname" (dict "chartName" "dependency-chart-name" "chartValues" .Values.dependency-chart "context" $) }} +*/}} +{{- define "common.names.dependency.fullname" -}} +{{- if .chartValues.fullnameOverride -}} +{{- .chartValues.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .chartName .chartValues.nameOverride -}} +{{- if contains $name .context.Release.Name -}} +{{- .context.Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .context.Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Allow the release namespace to be overridden for multi-namespace deployments in combined charts. +*/}} +{{- define "common.names.namespace" -}} +{{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a fully qualified app name adding the installation's namespace. +*/}} +{{- define "common.names.fullname.namespace" -}} +{{- printf "%s-%s" (include "common.names.fullname" .) (include "common.names.namespace" .) | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_resources.tpl b/mongodb-sharded/charts/common/templates/_resources.tpl new file mode 100644 index 0000000..53bd4ba --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_resources.tpl @@ -0,0 +1,50 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} + +{{/* +Return a resource request/limit object based on a given preset. +These presets are for basic testing and not meant to be used in production +{{ include "common.resources.preset" (dict "type" "nano") -}} +*/}} +{{- define "common.resources.preset" -}} +{{/* The limits are the requests increased by 50% (except ephemeral-storage and xlarge/2xlarge sizes)*/}} +{{- $presets := dict + "nano" (dict + "requests" (dict "cpu" "100m" "memory" "128Mi" "ephemeral-storage" "50Mi") + "limits" (dict "cpu" "150m" "memory" "192Mi" "ephemeral-storage" "2Gi") + ) + "micro" (dict + "requests" (dict "cpu" "250m" "memory" "256Mi" "ephemeral-storage" "50Mi") + "limits" (dict "cpu" "375m" "memory" "384Mi" "ephemeral-storage" "2Gi") + ) + "small" (dict + "requests" (dict "cpu" "500m" "memory" "512Mi" "ephemeral-storage" "50Mi") + "limits" (dict "cpu" "750m" "memory" "768Mi" "ephemeral-storage" "2Gi") + ) + "medium" (dict + "requests" (dict "cpu" "500m" "memory" "1024Mi" "ephemeral-storage" "50Mi") + "limits" (dict "cpu" "750m" "memory" "1536Mi" "ephemeral-storage" "2Gi") + ) + "large" (dict + "requests" (dict "cpu" "1.0" "memory" "2048Mi" "ephemeral-storage" "50Mi") + "limits" (dict "cpu" "1.5" "memory" "3072Mi" "ephemeral-storage" "2Gi") + ) + "xlarge" (dict + "requests" (dict "cpu" "1.0" "memory" "3072Mi" "ephemeral-storage" "50Mi") + "limits" (dict "cpu" "3.0" "memory" "6144Mi" "ephemeral-storage" "2Gi") + ) + "2xlarge" (dict + "requests" (dict "cpu" "1.0" "memory" "3072Mi" "ephemeral-storage" "50Mi") + "limits" (dict "cpu" "6.0" "memory" "12288Mi" "ephemeral-storage" "2Gi") + ) + }} +{{- if hasKey $presets .type -}} +{{- index $presets .type | toYaml -}} +{{- else -}} +{{- printf "ERROR: Preset key '%s' invalid. Allowed values are %s" .type (join "," (keys $presets)) | fail -}} +{{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_secrets.tpl b/mongodb-sharded/charts/common/templates/_secrets.tpl new file mode 100644 index 0000000..a7dfece --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_secrets.tpl @@ -0,0 +1,192 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Generate secret name. + +Usage: +{{ include "common.secrets.name" (dict "existingSecret" .Values.path.to.the.existingSecret "defaultNameSuffix" "mySuffix" "context" $) }} + +Params: + - existingSecret - ExistingSecret/String - Optional. The path to the existing secrets in the values.yaml given by the user + to be used instead of the default one. Allows for it to be of type String (just the secret name) for backwards compatibility. + +info: https://github.com/bitnami/charts/tree/main/bitnami/common#existingsecret + - defaultNameSuffix - String - Optional. It is used only if we have several secrets in the same deployment. + - context - Dict - Required. The context for the template evaluation. +*/}} +{{- define "common.secrets.name" -}} +{{- $name := (include "common.names.fullname" .context) -}} + +{{- if .defaultNameSuffix -}} +{{- $name = printf "%s-%s" $name .defaultNameSuffix | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- with .existingSecret -}} +{{- if not (typeIs "string" .) -}} +{{- with .name -}} +{{- $name = . -}} +{{- end -}} +{{- else -}} +{{- $name = . -}} +{{- end -}} +{{- end -}} + +{{- printf "%s" $name -}} +{{- end -}} + +{{/* +Generate secret key. + +Usage: +{{ include "common.secrets.key" (dict "existingSecret" .Values.path.to.the.existingSecret "key" "keyName") }} + +Params: + - existingSecret - ExistingSecret/String - Optional. The path to the existing secrets in the values.yaml given by the user + to be used instead of the default one. Allows for it to be of type String (just the secret name) for backwards compatibility. + +info: https://github.com/bitnami/charts/tree/main/bitnami/common#existingsecret + - key - String - Required. Name of the key in the secret. +*/}} +{{- define "common.secrets.key" -}} +{{- $key := .key -}} + +{{- if .existingSecret -}} + {{- if not (typeIs "string" .existingSecret) -}} + {{- if .existingSecret.keyMapping -}} + {{- $key = index .existingSecret.keyMapping $.key -}} + {{- end -}} + {{- end }} +{{- end -}} + +{{- printf "%s" $key -}} +{{- end -}} + +{{/* +Generate secret password or retrieve one if already created. + +Usage: +{{ include "common.secrets.passwords.manage" (dict "secret" "secret-name" "key" "keyName" "providedValues" (list "path.to.password1" "path.to.password2") "length" 10 "strong" false "chartName" "chartName" "honorProvidedValues" false "context" $) }} + +Params: + - secret - String - Required - Name of the 'Secret' resource where the password is stored. + - key - String - Required - Name of the key in the secret. + - providedValues - List - Required - The path to the validating value in the values.yaml, e.g: "mysql.password". Will pick first parameter with a defined value. + - length - int - Optional - Length of the generated random password. + - strong - Boolean - Optional - Whether to add symbols to the generated random password. + - chartName - String - Optional - Name of the chart used when said chart is deployed as a subchart. + - context - Context - Required - Parent context. + - failOnNew - Boolean - Optional - Default to true. If set to false, skip errors adding new keys to existing secrets. + - skipB64enc - Boolean - Optional - Default to false. If set to true, no the secret will not be base64 encrypted. + - skipQuote - Boolean - Optional - Default to false. If set to true, no quotes will be added around the secret. + - honorProvidedValues - Boolean - Optional - Default to false. If set to true, the values in providedValues have higher priority than an existing secret +The order in which this function returns a secret password: + 1. Password provided via the values.yaml if honorProvidedValues = true + (If one of the keys passed to the 'providedValues' parameter to this function is a valid path to a key in the values.yaml and has a value, the value of the first key with a value will be returned) + 2. Already existing 'Secret' resource + (If a 'Secret' resource is found under the name provided to the 'secret' parameter to this function and that 'Secret' resource contains a key with the name passed as the 'key' parameter to this function then the value of this existing secret password will be returned) + 3. Password provided via the values.yaml if honorProvidedValues = false + (If one of the keys passed to the 'providedValues' parameter to this function is a valid path to a key in the values.yaml and has a value, the value of the first key with a value will be returned) + 4. Randomly generated secret password + (A new random secret password with the length specified in the 'length' parameter will be generated and returned) + +*/}} +{{- define "common.secrets.passwords.manage" -}} + +{{- $password := "" }} +{{- $subchart := "" }} +{{- $chartName := default "" .chartName }} +{{- $passwordLength := default 10 .length }} +{{- $providedPasswordKey := include "common.utils.getKeyFromList" (dict "keys" .providedValues "context" $.context) }} +{{- $providedPasswordValue := include "common.utils.getValueFromKey" (dict "key" $providedPasswordKey "context" $.context) }} +{{- $secretData := (lookup "v1" "Secret" (include "common.names.namespace" .context) .secret).data }} +{{- if $secretData }} + {{- if hasKey $secretData .key }} + {{- $password = index $secretData .key | b64dec }} + {{- else if not (eq .failOnNew false) }} + {{- printf "\nPASSWORDS ERROR: The secret \"%s\" does not contain the key \"%s\"\n" .secret .key | fail -}} + {{- end -}} +{{- end }} + +{{- if and $providedPasswordValue .honorProvidedValues }} + {{- $password = tpl ($providedPasswordValue | toString) .context }} +{{- end }} + +{{- if not $password }} + {{- if $providedPasswordValue }} + {{- $password = tpl ($providedPasswordValue | toString) .context }} + {{- else }} + {{- if .context.Values.enabled }} + {{- $subchart = $chartName }} + {{- end -}} + + {{- if not (eq .failOnNew false) }} + {{- $requiredPassword := dict "valueKey" $providedPasswordKey "secret" .secret "field" .key "subchart" $subchart "context" $.context -}} + {{- $requiredPasswordError := include "common.validations.values.single.empty" $requiredPassword -}} + {{- $passwordValidationErrors := list $requiredPasswordError -}} + {{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $.context) -}} + {{- end }} + + {{- if .strong }} + {{- $subStr := list (lower (randAlpha 1)) (randNumeric 1) (upper (randAlpha 1)) | join "_" }} + {{- $password = randAscii $passwordLength }} + {{- $password = regexReplaceAllLiteral "\\W" $password "@" | substr 5 $passwordLength }} + {{- $password = printf "%s%s" $subStr $password | toString | shuffle }} + {{- else }} + {{- $password = randAlphaNum $passwordLength }} + {{- end }} + {{- end -}} +{{- end -}} +{{- if not .skipB64enc }} +{{- $password = $password | b64enc }} +{{- end -}} +{{- if .skipQuote -}} +{{- printf "%s" $password -}} +{{- else -}} +{{- printf "%s" $password | quote -}} +{{- end -}} +{{- end -}} + +{{/* +Reuses the value from an existing secret, otherwise sets its value to a default value. + +Usage: +{{ include "common.secrets.lookup" (dict "secret" "secret-name" "key" "keyName" "defaultValue" .Values.myValue "context" $) }} + +Params: + - secret - String - Required - Name of the 'Secret' resource where the password is stored. + - key - String - Required - Name of the key in the secret. + - defaultValue - String - Required - The path to the validating value in the values.yaml, e.g: "mysql.password". Will pick first parameter with a defined value. + - context - Context - Required - Parent context. + +*/}} +{{- define "common.secrets.lookup" -}} +{{- $value := "" -}} +{{- $secretData := (lookup "v1" "Secret" (include "common.names.namespace" .context) .secret).data -}} +{{- if and $secretData (hasKey $secretData .key) -}} + {{- $value = index $secretData .key -}} +{{- else if .defaultValue -}} + {{- $value = .defaultValue | toString | b64enc -}} +{{- end -}} +{{- if $value -}} +{{- printf "%s" $value -}} +{{- end -}} +{{- end -}} + +{{/* +Returns whether a previous generated secret already exists + +Usage: +{{ include "common.secrets.exists" (dict "secret" "secret-name" "context" $) }} + +Params: + - secret - String - Required - Name of the 'Secret' resource where the password is stored. + - context - Context - Required - Parent context. +*/}} +{{- define "common.secrets.exists" -}} +{{- $secret := (lookup "v1" "Secret" (include "common.names.namespace" .context) .secret) }} +{{- if $secret }} + {{- true -}} +{{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_storage.tpl b/mongodb-sharded/charts/common/templates/_storage.tpl new file mode 100644 index 0000000..f544c47 --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_storage.tpl @@ -0,0 +1,21 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} + +{{/* +Return the proper Storage Class +{{ include "common.storage.class" ( dict "persistence" .Values.path.to.the.persistence "global" $) }} +*/}} +{{- define "common.storage.class" -}} +{{- $storageClass := (.global).storageClass | default .persistence.storageClass | default (.global).defaultStorageClass | default "" -}} +{{- if $storageClass -}} + {{- if (eq "-" $storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else -}} + {{- printf "storageClassName: %s" $storageClass -}} + {{- end -}} +{{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_tplvalues.tpl b/mongodb-sharded/charts/common/templates/_tplvalues.tpl new file mode 100644 index 0000000..e3c9078 --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_tplvalues.tpl @@ -0,0 +1,52 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Renders a value that contains template perhaps with scope if the scope is present. +Usage: +{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }} +{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }} +*/}} +{{- define "common.tplvalues.render" -}} +{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }} +{{- if contains "{{" (toJson .value) }} + {{- if .scope }} + {{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }} + {{- else }} + {{- tpl $value .context }} + {{- end }} +{{- else }} + {{- $value }} +{{- end }} +{{- end -}} + +{{/* +Merge a list of values that contains template after rendering them. +Merge precedence is consistent with http://masterminds.github.io/sprig/dicts.html#merge-mustmerge +Usage: +{{ include "common.tplvalues.merge" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }} +*/}} +{{- define "common.tplvalues.merge" -}} +{{- $dst := dict -}} +{{- range .values -}} +{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | merge $dst -}} +{{- end -}} +{{ $dst | toYaml }} +{{- end -}} + +{{/* +Merge a list of values that contains template after rendering them. +Merge precedence is consistent with https://masterminds.github.io/sprig/dicts.html#mergeoverwrite-mustmergeoverwrite +Usage: +{{ include "common.tplvalues.merge-overwrite" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }} +*/}} +{{- define "common.tplvalues.merge-overwrite" -}} +{{- $dst := dict -}} +{{- range .values -}} +{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | mergeOverwrite $dst -}} +{{- end -}} +{{ $dst | toYaml }} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_utils.tpl b/mongodb-sharded/charts/common/templates/_utils.tpl new file mode 100644 index 0000000..cd1379f --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_utils.tpl @@ -0,0 +1,77 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Print instructions to get a secret value. +Usage: +{{ include "common.utils.secret.getvalue" (dict "secret" "secret-name" "field" "secret-value-field" "context" $) }} +*/}} +{{- define "common.utils.secret.getvalue" -}} +{{- $varname := include "common.utils.fieldToEnvVar" . -}} +export {{ $varname }}=$(kubectl get secret --namespace {{ include "common.names.namespace" .context | quote }} {{ .secret }} -o jsonpath="{.data.{{ .field }}}" | base64 -d) +{{- end -}} + +{{/* +Build env var name given a field +Usage: +{{ include "common.utils.fieldToEnvVar" dict "field" "my-password" }} +*/}} +{{- define "common.utils.fieldToEnvVar" -}} + {{- $fieldNameSplit := splitList "-" .field -}} + {{- $upperCaseFieldNameSplit := list -}} + + {{- range $fieldNameSplit -}} + {{- $upperCaseFieldNameSplit = append $upperCaseFieldNameSplit ( upper . ) -}} + {{- end -}} + + {{ join "_" $upperCaseFieldNameSplit }} +{{- end -}} + +{{/* +Gets a value from .Values given +Usage: +{{ include "common.utils.getValueFromKey" (dict "key" "path.to.key" "context" $) }} +*/}} +{{- define "common.utils.getValueFromKey" -}} +{{- $splitKey := splitList "." .key -}} +{{- $value := "" -}} +{{- $latestObj := $.context.Values -}} +{{- range $splitKey -}} + {{- if not $latestObj -}} + {{- printf "please review the entire path of '%s' exists in values" $.key | fail -}} + {{- end -}} + {{- $value = ( index $latestObj . ) -}} + {{- $latestObj = $value -}} +{{- end -}} +{{- printf "%v" (default "" $value) -}} +{{- end -}} + +{{/* +Returns first .Values key with a defined value or first of the list if all non-defined +Usage: +{{ include "common.utils.getKeyFromList" (dict "keys" (list "path.to.key1" "path.to.key2") "context" $) }} +*/}} +{{- define "common.utils.getKeyFromList" -}} +{{- $key := first .keys -}} +{{- $reverseKeys := reverse .keys }} +{{- range $reverseKeys }} + {{- $value := include "common.utils.getValueFromKey" (dict "key" . "context" $.context ) }} + {{- if $value -}} + {{- $key = . }} + {{- end -}} +{{- end -}} +{{- printf "%s" $key -}} +{{- end -}} + +{{/* +Checksum a template at "path" containing a *single* resource (ConfigMap,Secret) for use in pod annotations, excluding the metadata (see #18376). +Usage: +{{ include "common.utils.checksumTemplate" (dict "path" "/configmap.yaml" "context" $) }} +*/}} +{{- define "common.utils.checksumTemplate" -}} +{{- $obj := include (print .context.Template.BasePath .path) .context | fromYaml -}} +{{ omit $obj "apiVersion" "kind" "metadata" | toYaml | sha256sum }} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/_warnings.tpl b/mongodb-sharded/charts/common/templates/_warnings.tpl new file mode 100644 index 0000000..65bed07 --- /dev/null +++ b/mongodb-sharded/charts/common/templates/_warnings.tpl @@ -0,0 +1,109 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Warning about using rolling tag. +Usage: +{{ include "common.warnings.rollingTag" .Values.path.to.the.imageRoot }} +*/}} +{{- define "common.warnings.rollingTag" -}} + +{{- if and (contains "bitnami/" .repository) (not (.tag | toString | regexFind "-r\\d+$|sha256:")) }} +WARNING: Rolling tag detected ({{ .repository }}:{{ .tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html +{{- end }} +{{- end -}} + +{{/* +Warning about replaced images from the original. +Usage: +{{ include "common.warnings.modifiedImages" (dict "images" (list .Values.path.to.the.imageRoot) "context" $) }} +*/}} +{{- define "common.warnings.modifiedImages" -}} +{{- $affectedImages := list -}} +{{- $printMessage := false -}} +{{- $originalImages := .context.Chart.Annotations.images -}} +{{- range .images -}} + {{- $fullImageName := printf (printf "%s/%s:%s" .registry .repository .tag) -}} + {{- if not (contains $fullImageName $originalImages) }} + {{- $affectedImages = append $affectedImages (printf "%s/%s:%s" .registry .repository .tag) -}} + {{- $printMessage = true -}} + {{- end -}} +{{- end -}} +{{- if $printMessage }} + +âš  SECURITY WARNING: Original containers have been substituted. This Helm chart was designed, tested, and validated on multiple platforms using a specific set of Bitnami and Tanzu Application Catalog containers. Substituting other containers is likely to cause degraded security and performance, broken chart features, and missing environment variables. + +Substituted images detected: +{{- range $affectedImages }} + - {{ . }} +{{- end }} +{{- end -}} +{{- end -}} + +{{/* +Warning about not setting the resource object in all deployments. +Usage: +{{ include "common.warnings.resources" (dict "sections" (list "path1" "path2") context $) }} +Example: +{{- include "common.warnings.resources" (dict "sections" (list "csiProvider.provider" "server" "volumePermissions" "") "context" $) }} +The list in the example assumes that the following values exist: + - csiProvider.provider.resources + - server.resources + - volumePermissions.resources + - resources +*/}} +{{- define "common.warnings.resources" -}} +{{- $values := .context.Values -}} +{{- $printMessage := false -}} +{{ $affectedSections := list -}} +{{- range .sections -}} + {{- if eq . "" -}} + {{/* Case where the resources section is at the root (one main deployment in the chart) */}} + {{- if not (index $values "resources") -}} + {{- $affectedSections = append $affectedSections "resources" -}} + {{- $printMessage = true -}} + {{- end -}} + {{- else -}} + {{/* Case where the are multiple resources sections (more than one main deployment in the chart) */}} + {{- $keys := split "." . -}} + {{/* We iterate through the different levels until arriving to the resource section. Example: a.b.c.resources */}} + {{- $section := $values -}} + {{- range $keys -}} + {{- $section = index $section . -}} + {{- end -}} + {{- if not (index $section "resources") -}} + {{/* If the section has enabled=false or replicaCount=0, do not include it */}} + {{- if and (hasKey $section "enabled") -}} + {{- if index $section "enabled" -}} + {{/* enabled=true */}} + {{- $affectedSections = append $affectedSections (printf "%s.resources" .) -}} + {{- $printMessage = true -}} + {{- end -}} + {{- else if and (hasKey $section "replicaCount") -}} + {{/* We need a casting to int because number 0 is not treated as an int by default */}} + {{- if (gt (index $section "replicaCount" | int) 0) -}} + {{/* replicaCount > 0 */}} + {{- $affectedSections = append $affectedSections (printf "%s.resources" .) -}} + {{- $printMessage = true -}} + {{- end -}} + {{- else -}} + {{/* Default case, add it to the affected sections */}} + {{- $affectedSections = append $affectedSections (printf "%s.resources" .) -}} + {{- $printMessage = true -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- if $printMessage }} + +WARNING: There are "resources" sections in the chart not set. Using "resourcesPreset" is not recommended for production. For production installations, please set the following values according to your workload needs: +{{- range $affectedSections }} + - {{ . }} +{{- end }} ++info https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ +{{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/validations/_cassandra.tpl b/mongodb-sharded/charts/common/templates/validations/_cassandra.tpl new file mode 100644 index 0000000..0ab8a40 --- /dev/null +++ b/mongodb-sharded/charts/common/templates/validations/_cassandra.tpl @@ -0,0 +1,51 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Auxiliary function to get the right value for existingSecret. + +Usage: +{{ include "common.cassandra.values.existingSecret" (dict "context" $) }} +Params: + - subchart - Boolean - Optional. Whether Cassandra is used as subchart or not. Default: false +*/}} +{{- define "common.cassandra.values.existingSecret" -}} + {{- if .subchart -}} + {{- .context.Values.cassandra.dbUser.existingSecret | quote -}} + {{- else -}} + {{- .context.Values.dbUser.existingSecret | quote -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for enabled cassandra. + +Usage: +{{ include "common.cassandra.values.enabled" (dict "context" $) }} +*/}} +{{- define "common.cassandra.values.enabled" -}} + {{- if .subchart -}} + {{- printf "%v" .context.Values.cassandra.enabled -}} + {{- else -}} + {{- printf "%v" (not .context.Values.enabled) -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for the key dbUser + +Usage: +{{ include "common.cassandra.values.key.dbUser" (dict "subchart" "true" "context" $) }} +Params: + - subchart - Boolean - Optional. Whether Cassandra is used as subchart or not. Default: false +*/}} +{{- define "common.cassandra.values.key.dbUser" -}} + {{- if .subchart -}} + cassandra.dbUser + {{- else -}} + dbUser + {{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/validations/_mariadb.tpl b/mongodb-sharded/charts/common/templates/validations/_mariadb.tpl new file mode 100644 index 0000000..0aa50be --- /dev/null +++ b/mongodb-sharded/charts/common/templates/validations/_mariadb.tpl @@ -0,0 +1,108 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Validate MariaDB required passwords are not empty. + +Usage: +{{ include "common.validations.values.mariadb.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} +Params: + - secret - String - Required. Name of the secret where MariaDB values are stored, e.g: "mysql-passwords-secret" + - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false +*/}} +{{- define "common.validations.values.mariadb.passwords" -}} + {{- $existingSecret := include "common.mariadb.values.auth.existingSecret" . -}} + {{- $enabled := include "common.mariadb.values.enabled" . -}} + {{- $architecture := include "common.mariadb.values.architecture" . -}} + {{- $authPrefix := include "common.mariadb.values.key.auth" . -}} + {{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}} + {{- $valueKeyUsername := printf "%s.username" $authPrefix -}} + {{- $valueKeyPassword := printf "%s.password" $authPrefix -}} + {{- $valueKeyReplicationPassword := printf "%s.replicationPassword" $authPrefix -}} + + {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} + {{- $requiredPasswords := list -}} + + {{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mariadb-root-password" -}} + {{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}} + + {{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }} + {{- if not (empty $valueUsername) -}} + {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mariadb-password" -}} + {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} + {{- end -}} + + {{- if (eq $architecture "replication") -}} + {{- $requiredReplicationPassword := dict "valueKey" $valueKeyReplicationPassword "secret" .secret "field" "mariadb-replication-password" -}} + {{- $requiredPasswords = append $requiredPasswords $requiredReplicationPassword -}} + {{- end -}} + + {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} + + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for existingSecret. + +Usage: +{{ include "common.mariadb.values.auth.existingSecret" (dict "context" $) }} +Params: + - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false +*/}} +{{- define "common.mariadb.values.auth.existingSecret" -}} + {{- if .subchart -}} + {{- .context.Values.mariadb.auth.existingSecret | quote -}} + {{- else -}} + {{- .context.Values.auth.existingSecret | quote -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for enabled mariadb. + +Usage: +{{ include "common.mariadb.values.enabled" (dict "context" $) }} +*/}} +{{- define "common.mariadb.values.enabled" -}} + {{- if .subchart -}} + {{- printf "%v" .context.Values.mariadb.enabled -}} + {{- else -}} + {{- printf "%v" (not .context.Values.enabled) -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for architecture + +Usage: +{{ include "common.mariadb.values.architecture" (dict "subchart" "true" "context" $) }} +Params: + - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false +*/}} +{{- define "common.mariadb.values.architecture" -}} + {{- if .subchart -}} + {{- .context.Values.mariadb.architecture -}} + {{- else -}} + {{- .context.Values.architecture -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for the key auth + +Usage: +{{ include "common.mariadb.values.key.auth" (dict "subchart" "true" "context" $) }} +Params: + - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false +*/}} +{{- define "common.mariadb.values.key.auth" -}} + {{- if .subchart -}} + mariadb.auth + {{- else -}} + auth + {{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/validations/_mongodb.tpl b/mongodb-sharded/charts/common/templates/validations/_mongodb.tpl new file mode 100644 index 0000000..e8e2d13 --- /dev/null +++ b/mongodb-sharded/charts/common/templates/validations/_mongodb.tpl @@ -0,0 +1,67 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Auxiliary function to get the right value for existingSecret. + +Usage: +{{ include "common.mongodb.values.auth.existingSecret" (dict "context" $) }} +Params: + - subchart - Boolean - Optional. Whether MongoDb is used as subchart or not. Default: false +*/}} +{{- define "common.mongodb.values.auth.existingSecret" -}} + {{- if .subchart -}} + {{- .context.Values.mongodb.auth.existingSecret | quote -}} + {{- else -}} + {{- .context.Values.auth.existingSecret | quote -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for enabled mongodb. + +Usage: +{{ include "common.mongodb.values.enabled" (dict "context" $) }} +*/}} +{{- define "common.mongodb.values.enabled" -}} + {{- if .subchart -}} + {{- printf "%v" .context.Values.mongodb.enabled -}} + {{- else -}} + {{- printf "%v" (not .context.Values.enabled) -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for the key auth + +Usage: +{{ include "common.mongodb.values.key.auth" (dict "subchart" "true" "context" $) }} +Params: + - subchart - Boolean - Optional. Whether MongoDB® is used as subchart or not. Default: false +*/}} +{{- define "common.mongodb.values.key.auth" -}} + {{- if .subchart -}} + mongodb.auth + {{- else -}} + auth + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for architecture + +Usage: +{{ include "common.mongodb.values.architecture" (dict "subchart" "true" "context" $) }} +Params: + - subchart - Boolean - Optional. Whether MongoDB® is used as subchart or not. Default: false +*/}} +{{- define "common.mongodb.values.architecture" -}} + {{- if .subchart -}} + {{- .context.Values.mongodb.architecture -}} + {{- else -}} + {{- .context.Values.architecture -}} + {{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/validations/_mysql.tpl b/mongodb-sharded/charts/common/templates/validations/_mysql.tpl new file mode 100644 index 0000000..8d247ec --- /dev/null +++ b/mongodb-sharded/charts/common/templates/validations/_mysql.tpl @@ -0,0 +1,67 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Auxiliary function to get the right value for existingSecret. + +Usage: +{{ include "common.mysql.values.auth.existingSecret" (dict "context" $) }} +Params: + - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false +*/}} +{{- define "common.mysql.values.auth.existingSecret" -}} + {{- if .subchart -}} + {{- .context.Values.mysql.auth.existingSecret | quote -}} + {{- else -}} + {{- .context.Values.auth.existingSecret | quote -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for enabled mysql. + +Usage: +{{ include "common.mysql.values.enabled" (dict "context" $) }} +*/}} +{{- define "common.mysql.values.enabled" -}} + {{- if .subchart -}} + {{- printf "%v" .context.Values.mysql.enabled -}} + {{- else -}} + {{- printf "%v" (not .context.Values.enabled) -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for architecture + +Usage: +{{ include "common.mysql.values.architecture" (dict "subchart" "true" "context" $) }} +Params: + - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false +*/}} +{{- define "common.mysql.values.architecture" -}} + {{- if .subchart -}} + {{- .context.Values.mysql.architecture -}} + {{- else -}} + {{- .context.Values.architecture -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for the key auth + +Usage: +{{ include "common.mysql.values.key.auth" (dict "subchart" "true" "context" $) }} +Params: + - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false +*/}} +{{- define "common.mysql.values.key.auth" -}} + {{- if .subchart -}} + mysql.auth + {{- else -}} + auth + {{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/validations/_postgresql.tpl b/mongodb-sharded/charts/common/templates/validations/_postgresql.tpl new file mode 100644 index 0000000..f10318e --- /dev/null +++ b/mongodb-sharded/charts/common/templates/validations/_postgresql.tpl @@ -0,0 +1,105 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Auxiliary function to decide whether evaluate global values. + +Usage: +{{ include "common.postgresql.values.use.global" (dict "key" "key-of-global" "context" $) }} +Params: + - key - String - Required. Field to be evaluated within global, e.g: "existingSecret" +*/}} +{{- define "common.postgresql.values.use.global" -}} + {{- if .context.Values.global -}} + {{- if .context.Values.global.postgresql -}} + {{- index .context.Values.global.postgresql .key | quote -}} + {{- end -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for existingSecret. + +Usage: +{{ include "common.postgresql.values.existingSecret" (dict "context" $) }} +*/}} +{{- define "common.postgresql.values.existingSecret" -}} + {{- $globalValue := include "common.postgresql.values.use.global" (dict "key" "existingSecret" "context" .context) -}} + + {{- if .subchart -}} + {{- default (.context.Values.postgresql.existingSecret | quote) $globalValue -}} + {{- else -}} + {{- default (.context.Values.existingSecret | quote) $globalValue -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for enabled postgresql. + +Usage: +{{ include "common.postgresql.values.enabled" (dict "context" $) }} +*/}} +{{- define "common.postgresql.values.enabled" -}} + {{- if .subchart -}} + {{- printf "%v" .context.Values.postgresql.enabled -}} + {{- else -}} + {{- printf "%v" (not .context.Values.enabled) -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for the key postgressPassword. + +Usage: +{{ include "common.postgresql.values.key.postgressPassword" (dict "subchart" "true" "context" $) }} +Params: + - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false +*/}} +{{- define "common.postgresql.values.key.postgressPassword" -}} + {{- $globalValue := include "common.postgresql.values.use.global" (dict "key" "postgresqlUsername" "context" .context) -}} + + {{- if not $globalValue -}} + {{- if .subchart -}} + postgresql.postgresqlPassword + {{- else -}} + postgresqlPassword + {{- end -}} + {{- else -}} + global.postgresql.postgresqlPassword + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for enabled.replication. + +Usage: +{{ include "common.postgresql.values.enabled.replication" (dict "subchart" "true" "context" $) }} +Params: + - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false +*/}} +{{- define "common.postgresql.values.enabled.replication" -}} + {{- if .subchart -}} + {{- printf "%v" .context.Values.postgresql.replication.enabled -}} + {{- else -}} + {{- printf "%v" .context.Values.replication.enabled -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right value for the key replication.password. + +Usage: +{{ include "common.postgresql.values.key.replicationPassword" (dict "subchart" "true" "context" $) }} +Params: + - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false +*/}} +{{- define "common.postgresql.values.key.replicationPassword" -}} + {{- if .subchart -}} + postgresql.replication.password + {{- else -}} + replication.password + {{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/validations/_redis.tpl b/mongodb-sharded/charts/common/templates/validations/_redis.tpl new file mode 100644 index 0000000..4627695 --- /dev/null +++ b/mongodb-sharded/charts/common/templates/validations/_redis.tpl @@ -0,0 +1,48 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + + +{{/* vim: set filetype=mustache: */}} +{{/* +Auxiliary function to get the right value for enabled redis. + +Usage: +{{ include "common.redis.values.enabled" (dict "context" $) }} +*/}} +{{- define "common.redis.values.enabled" -}} + {{- if .subchart -}} + {{- printf "%v" .context.Values.redis.enabled -}} + {{- else -}} + {{- printf "%v" (not .context.Values.enabled) -}} + {{- end -}} +{{- end -}} + +{{/* +Auxiliary function to get the right prefix path for the values + +Usage: +{{ include "common.redis.values.key.prefix" (dict "subchart" "true" "context" $) }} +Params: + - subchart - Boolean - Optional. Whether redis is used as subchart or not. Default: false +*/}} +{{- define "common.redis.values.keys.prefix" -}} + {{- if .subchart -}}redis.{{- else -}}{{- end -}} +{{- end -}} + +{{/* +Checks whether the redis chart's includes the standarizations (version >= 14) + +Usage: +{{ include "common.redis.values.standarized.version" (dict "context" $) }} +*/}} +{{- define "common.redis.values.standarized.version" -}} + + {{- $standarizedAuth := printf "%s%s" (include "common.redis.values.keys.prefix" .) "auth" -}} + {{- $standarizedAuthValues := include "common.utils.getValueFromKey" (dict "key" $standarizedAuth "context" .context) }} + + {{- if $standarizedAuthValues -}} + {{- true -}} + {{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/templates/validations/_validations.tpl b/mongodb-sharded/charts/common/templates/validations/_validations.tpl new file mode 100644 index 0000000..174191a --- /dev/null +++ b/mongodb-sharded/charts/common/templates/validations/_validations.tpl @@ -0,0 +1,51 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Validate values must not be empty. + +Usage: +{{- $validateValueConf00 := (dict "valueKey" "path.to.value" "secret" "secretName" "field" "password-00") -}} +{{- $validateValueConf01 := (dict "valueKey" "path.to.value" "secret" "secretName" "field" "password-01") -}} +{{ include "common.validations.values.empty" (dict "required" (list $validateValueConf00 $validateValueConf01) "context" $) }} + +Validate value params: + - valueKey - String - Required. The path to the validating value in the values.yaml, e.g: "mysql.password" + - secret - String - Optional. Name of the secret where the validating value is generated/stored, e.g: "mysql-passwords-secret" + - field - String - Optional. Name of the field in the secret data, e.g: "mysql-password" +*/}} +{{- define "common.validations.values.multiple.empty" -}} + {{- range .required -}} + {{- include "common.validations.values.single.empty" (dict "valueKey" .valueKey "secret" .secret "field" .field "context" $.context) -}} + {{- end -}} +{{- end -}} + +{{/* +Validate a value must not be empty. + +Usage: +{{ include "common.validations.value.empty" (dict "valueKey" "mariadb.password" "secret" "secretName" "field" "my-password" "subchart" "subchart" "context" $) }} + +Validate value params: + - valueKey - String - Required. The path to the validating value in the values.yaml, e.g: "mysql.password" + - secret - String - Optional. Name of the secret where the validating value is generated/stored, e.g: "mysql-passwords-secret" + - field - String - Optional. Name of the field in the secret data, e.g: "mysql-password" + - subchart - String - Optional - Name of the subchart that the validated password is part of. +*/}} +{{- define "common.validations.values.single.empty" -}} + {{- $value := include "common.utils.getValueFromKey" (dict "key" .valueKey "context" .context) }} + {{- $subchart := ternary "" (printf "%s." .subchart) (empty .subchart) }} + + {{- if not $value -}} + {{- $varname := "my-value" -}} + {{- $getCurrentValue := "" -}} + {{- if and .secret .field -}} + {{- $varname = include "common.utils.fieldToEnvVar" . -}} + {{- $getCurrentValue = printf " To get the current value:\n\n %s\n" (include "common.utils.secret.getvalue" .) -}} + {{- end -}} + {{- printf "\n '%s' must not be empty, please add '--set %s%s=$%s' to the command.%s" .valueKey $subchart .valueKey $varname $getCurrentValue -}} + {{- end -}} +{{- end -}} diff --git a/mongodb-sharded/charts/common/values.yaml b/mongodb-sharded/charts/common/values.yaml new file mode 100644 index 0000000..eeb42e0 --- /dev/null +++ b/mongodb-sharded/charts/common/values.yaml @@ -0,0 +1,8 @@ +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +## bitnami/common +## It is required by CI/CD tools and processes. +## @skip exampleValue +## +exampleValue: common-chart diff --git a/mongodb-sharded/templates/NOTES.txt b/mongodb-sharded/templates/NOTES.txt new file mode 100644 index 0000000..b683153 --- /dev/null +++ b/mongodb-sharded/templates/NOTES.txt @@ -0,0 +1,71 @@ +CHART NAME: {{ .Chart.Name }} +CHART VERSION: {{ .Chart.Version }} +APP VERSION: {{ .Chart.AppVersion }} + +? WARNING: Since August 28th, 2025, only a limited subset of images/charts are available for free. + Subscribe to Bitnami Secure Images to receive continued support and security updates. + More info at https://bitnami.com and https://github.com/bitnami/containers/issues/83267 + +** Please be patient while the chart is being deployed ** + +{{- if .Values.diagnosticMode.enabled }} +The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with: + + command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }} + +Get the list of pods by executing: + + kubectl get pods --namespace {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }} + +Access the pod you want to debug by executing + + kubectl exec --namespace {{ .Release.Namespace }} -ti -- bash + +In order to replicate the container startup scripts execute this command: + + /opt/bitnami/scripts/mongodb-sharded/entrypoint.sh /opt/bitnami/scripts/mongodb-sharded/run.sh + +{{- else }} + +The MongoDB® Sharded cluster can be accessed via the Mongos instances in port {{ .Values.service.ports.mongodb }} on the following DNS name from within your cluster: + + {{ include "mongodb-sharded.serviceName" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} + +To get the {{ .Values.auth.rootUser }} password run: + + export MONGODB_ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} -o jsonpath="{.data.mongodb-root-password}" | base64 -d) + +To connect to your database run the following command: + + kubectl run --namespace {{ .Release.Namespace }} {{ printf "%s-client" (include "common.names.fullname" .) }} --rm --tty -i --restart='Never' --image {{ template "mongodb-sharded.image" . }} --command -- mongosh admin --host {{ include "mongodb-sharded.serviceName" . }} {{- if .Values.auth.enabled }} --authenticationDatabase admin -u {{ .Values.auth.rootUser }} -p $MONGODB_ROOT_PASSWORD{{- end }} + +To connect to your database from outside the cluster execute the following commands: + +{{- if contains "NodePort" .Values.service.type }} + + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "mongodb-sharded.serviceName" . }}) + mongosh --host $NODE_IP --port $NODE_PORT --authenticationDatabase admin -p $MONGODB_ROOT_PASSWORD + +{{- else if contains "LoadBalancer" .Values.service.type }} + + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ include "mongodb-sharded.serviceName" . }}' + + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "mongodb-sharded.serviceName" . }} --include "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}") + mongosh --host $SERVICE_IP --port {{ .Values.service.ports.mongodb }} --authenticationDatabase admin -p $MONGODB_ROOT_PASSWORD + +{{- else if contains "ClusterIP" .Values.service.type }} + + kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "mongodb-sharded.serviceName" . }} {{ .Values.service.ports.mongodb }}:{{ .Values.service.ports.mongodb }} & + mongosh --host 127.0.0.1 --authenticationDatabase admin -p $MONGODB_ROOT_PASSWORD + +{{- end }} +{{- end }} + +{{- include "mongodb-sharded.validateValues" . -}} +{{- include "mongodb-sharded.checkRollingTags" . -}} +{{- include "common.warnings.resources" (dict "sections" (list "configsvr" "metrics" "mongos" "shardsvr.arbiter" "shardsvr.dataNode" "volumePermissions") "context" $) }} +{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.image .Values.volumePermissions.image .Values.metrics.image) "context" $) }} +{{- include "common.errors.insecureImages" (dict "images" (list .Values.image .Values.volumePermissions.image .Values.metrics.image) "context" $) }} diff --git a/mongodb-sharded/templates/_helpers.tpl b/mongodb-sharded/templates/_helpers.tpl new file mode 100644 index 0000000..d039f4b --- /dev/null +++ b/mongodb-sharded/templates/_helpers.tpl @@ -0,0 +1,323 @@ +{{/* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{/* vim: set filetype=mustache: */}} + +{{/* +Returns a ServiceAccount name for specified path or falls back to `common.serviceAccount.name` +if `common.serviceAccount.create` is set to true. Falls back to Chart's fullname otherwise. +Usage: +{{ include "mongodb-sharded.serviceAccountName" (dict "component" "mongos" "value" .Values.path.to.serviceAccount "context" $) }} +*/}} +{{- define "mongodb-sharded.serviceAccountName" -}} +{{- if .value.create }} + {{- default (printf "%s-%s" (include "common.names.fullname" .context) .component) .value.name | quote }} +{{- else if .context.Values.common.serviceAccount.create }} + {{- default (printf "%s-%s" (include "common.names.fullname" .context) .component) .context.Values.common.serviceAccount.name | quote }} +{{- else -}} + {{- default "default" .value.name | quote }} +{{- end }} +{{- end }} + +{{- define "mongodb-sharded.secret" -}} + {{- if .Values.auth.existingSecret -}} + {{- printf "%s" (tpl .Values.auth.existingSecret $) -}} + {{- else }} + {{- include "common.names.fullname" . -}} + {{- end }} +{{- end -}} + +{{- define "mongodb-sharded.configServer.primaryHost" -}} + {{- if .Values.configsvr.external.host -}} + {{- .Values.configsvr.external.host }} + {{- else -}} + {{- printf "%s-configsvr-0.%s-headless.%s.svc.%s" (include "common.names.fullname" . ) (include "common.names.fullname" .) (include "common.names.namespace" .) .Values.clusterDomain -}} + {{- end -}} +{{- end -}} + +{{- define "mongodb-sharded.configServer.rsName" -}} + {{- if .Values.configsvr.external.replicasetName -}} + {{- .Values.configsvr.external.replicasetName }} + {{- else }} + {{- printf "%s-configsvr" ( include "common.names.fullname" . ) -}} + {{- end }} +{{- end -}} + +{{- define "mongodb-sharded.mongos.configCM" -}} + {{- if .Values.mongos.configCM -}} + {{- .Values.mongos.configCM -}} + {{- else }} + {{- printf "%s-mongos" (include "common.names.fullname" .) -}} + {{- end }} +{{- end -}} + +{{- define "mongodb-sharded.shardsvr.dataNode.configCM" -}} + {{- if .Values.shardsvr.dataNode.configCM -}} + {{- .Values.shardsvr.dataNode.configCM -}} + {{- else }} + {{- printf "%s-shardsvr-data" (include "common.names.fullname" .) -}} + {{- end }} +{{- end -}} + +{{- define "mongodb-sharded.shardsvr.arbiter.configCM" -}} + {{- if .Values.shardsvr.arbiter.configCM -}} + {{- .Values.shardsvr.arbiter.configCM -}} + {{- else }} + {{- printf "%s-shardsvr-arbiter" (include "common.names.fullname" .) -}} + {{- end }} +{{- end -}} + +{{- define "mongodb-sharded.configsvr.configCM" -}} + {{- if .Values.configsvr.configCM -}} + {{- .Values.configsvr.configCM -}} + {{- else }} + {{- printf "%s-configsvr" (include "common.names.fullname" .) -}} + {{- end }} +{{- end -}} + +{{/* +Get the initialization scripts Secret name. +*/}} +{{- define "mongodb-sharded.initScriptsSecret" -}} + {{- printf "%s" (include "common.tplvalues.render" (dict "value" .Values.common.initScriptsSecret "context" $)) -}} +{{- end -}} + +{{/* +Get the initialization scripts configmap name. +*/}} +{{- define "mongodb-sharded.initScriptsCM" -}} + {{- printf "%s" (include "common.tplvalues.render" (dict "value" .Values.common.initScriptsCM "context" $)) -}} +{{- end -}} + +{{/* +Returns the proper Service name depending if an explicit service name is set +in the values file. If the name is not explicitly set it will take the "common.names.fullname" +*/}} +{{- define "mongodb-sharded.serviceName" -}} + {{- if .Values.service.name -}} + {{ .Values.service.name }} + {{- else -}} + {{ include "common.names.fullname" . }} + {{- end -}} +{{- end -}} + +{{/* +Return the proper MongoDB® image name +*/}} +{{- define "mongodb-sharded.image" -}} +{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }} +{{- end -}} + +{{/* +Return the proper image name (for the metrics image) +*/}} +{{- define "mongodb-sharded.metrics.image" -}} +{{ include "common.images.image" (dict "imageRoot" .Values.metrics.image "global" .Values.global) }} +{{- end -}} + +{{/* +Return the proper image name (for the init container volume-permissions image) +*/}} +{{- define "mongodb-sharded.volumePermissions.image" -}} +{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "mongodb-sharded.imagePullSecrets" -}} +{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.metrics.image .Values.volumePermissions.image) "global" .Values.global) -}} +{{- end -}} + +{{/* +Compile all warnings into a single message, and call fail. +*/}} +{{- define "mongodb-sharded.validateValues" -}} + {{- $messages := list -}} + {{- $messages := append $messages (include "mongodb-sharded.validateValues.externalCfgServer" .) -}} + {{- $messages := append $messages (include "mongodb-sharded.validateValues.replicaCount" .) -}} + {{- $messages := append $messages (include "mongodb-sharded.validateValues.clusterIPListLength" .) -}} + {{- $messages := append $messages (include "mongodb-sharded.validateValues.nodePortListLength" .) -}} + {{- $messages := append $messages (include "mongodb-sharded.validateValues.loadBalancerIPListLength" .) -}} + {{- $messages := append $messages (include "mongodb-sharded.validateValues.config" .) -}} + {{- $messages := without $messages "" -}} + {{- $message := join "\n" $messages -}} + + {{- if $message -}} + {{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}} + {{- end -}} +{{- end -}} + +{{/* +Validate values of MongoDB® - If using an external config server, then both the host and the replicaset name should be set. +*/}} +{{- define "mongodb-sharded.validateValues.externalCfgServer" -}} +{{- if and .Values.configsvr.external.replicasetName (not .Values.configsvr.external.host) -}} +mongodb: invalidExternalConfigServer + You specified a replica set name for the external config server but not a host. Set both configsvr.external.replicasetName and configsvr.external.host +{{- end -}} +{{- if and (not .Values.configsvr.external.replicasetName) .Values.configsvr.external.host -}} +mongodb: invalidExternalConfigServer + You specified a host for the external config server but not the replica set name. Set both configsvr.external.replicasetName and configsvr.external.host +{{- end -}} +{{- if and .Values.configsvr.external.host (not .Values.configsvr.external.rootPassword) -}} +mongodb: invalidExternalConfigServer + You specified a host for the external config server but not the root password. Set the configsvr.external.rootPassword value. +{{- end -}} +{{- if and .Values.configsvr.external.host (not .Values.configsvr.external.replicasetKey) -}} +mongodb: invalidExternalConfigServer + You specified a host for the external config server but not the replica set key. Set the configsvr.external.replicasetKey value. +{{- end -}} +{{- end -}} + +{{/* +Validate values of MongoDB® - The number of shards must be positive, as well as the data node replicaCount +*/}} +{{- define "mongodb-sharded.validateValues.replicaCount" -}} +{{- if and (le (int .Values.shardsvr.dataNode.replicaCount) 0) (ge (int .Values.shards) 1) }} +mongodb: invalidShardSvrReplicas + You specified an invalid number of replicas per shard. Please set shardsvr.dataNode.replicaCount with a positive number or set the number of shards to 0. +{{- end -}} +{{- if lt (int .Values.shardsvr.arbiter.replicaCount) 0 }} +mongodb: invalidShardSvrArbiters + You specified an invalid number of arbiters per shard. Please set shardsvr.arbiter.replicaCount with a number greater or equal than 0 +{{- end -}} +{{- if and (le (int .Values.configsvr.replicaCount) 0) (not .Values.configsvr.external.host) }} +mongodb: invalidConfigSvrReplicas + You specified an invalid number of replicas per shard. Please set configsvr.replicaCount with a positive number or set the configsvr.external.host value to use + an external config server replicaset +{{- end -}} +{{- end -}} + +{{/* +Validate values of MongoDB® - Cannot use both .config and .configCM +*/}} +{{- define "mongodb-sharded.validateValues.config" -}} +{{- if and .Values.shardsvr.dataNode.configCM .Values.shardsvr.dataNode.config }} +mongodb: shardDataNodeConflictingConfig + You specified both shardsvr.dataNode.configCM and shardsvr.dataNode.config. You can only set one +{{- end -}} +{{- if and .Values.shardsvr.arbiter.configCM .Values.shardsvr.arbiter.config }} +mongodb: arbiterNodeConflictingConfig + You specified both shardsvr.arbiter.configCM and shardsvr.arbiter.config. You can only set one +{{- end -}} +{{- if and .Values.mongos.configCM .Values.mongos.config }} +mongodb: mongosNodeConflictingConfig + You specified both mongos.configCM and mongos.config. You can only set one +{{- end -}} +{{- if and .Values.configsvr.configCM .Values.configsvr.config }} +mongodb: configSvrNodeConflictingConfig + You specified both configsvr.configCM and configsvr.config. You can only set one +{{- end -}} +{{- end -}} + +{{/* Validate values of MongoDB® - number of replicas must be the same as NodePort list */}} +{{- define "mongodb-sharded.validateValues.nodePortListLength" -}} +{{- $replicaCount := int .Values.mongos.replicaCount }} +{{- $nodePortListLength := len .Values.mongos.servicePerReplica.nodePorts }} +{{- if and .Values.mongos.useStatefulSet .Values.mongos.servicePerReplica.enabled (not (eq $replicaCount $nodePortListLength )) (eq .Values.mongos.servicePerReplica.type "NodePort") -}} +mongodb: .Values.mongos.servicePerReplica.nodePorts + Number of mongos.replicaCount and mongos.servicePerReplica.nodePorts array length must be the same. Currently: replicaCount = {{ $replicaCount }} and nodePorts = {{ $nodePortListLength }} +{{- end -}} +{{- end -}} + +{{/* Validate values of MongoDB® - number of replicas must be the same as clusterIP list */}} +{{- define "mongodb-sharded.validateValues.clusterIPListLength" -}} +{{- $replicaCount := int .Values.mongos.replicaCount }} +{{- $clusterIPListLength := len .Values.mongos.servicePerReplica.clusterIPs }} +{{- if and (gt $clusterIPListLength 0) .Values.mongos.useStatefulSet .Values.mongos.servicePerReplica.enabled (not (eq $replicaCount $clusterIPListLength )) (eq .Values.mongos.servicePerReplica.type "ClusterIP") -}} +mongodb: .Values.mongos.servicePerReplica.clusterIPs + Number of mongos.replicaCount and mongos.servicePerReplica.clusterIPs array length must be the same. Currently: replicaCount = {{ $replicaCount }} and clusterIPs = {{ $clusterIPListLength }} +{{- end -}} +{{- end -}} + +{{/* Validate values of MongoDB® - number of replicas must be the same as loadBalancerIP list */}} +{{- define "mongodb-sharded.validateValues.loadBalancerIPListLength" -}} +{{- $replicaCount := int .Values.mongos.replicaCount }} +{{- $loadBalancerIPListLength := len .Values.mongos.servicePerReplica.loadBalancerIPs }} +{{- if and (gt $loadBalancerIPListLength 0) .Values.mongos.useStatefulSet .Values.mongos.servicePerReplica.enabled (not (eq $replicaCount $loadBalancerIPListLength )) (eq .Values.mongos.servicePerReplica.type "LoadBalancer") -}} +mongodb: .Values.mongos.servicePerReplica.loadBalancerIPs + Number of mongos.replicaCount and mongos.servicePerReplica.loadBalancerIPs array length must be the same. Currently: replicaCount = {{ $replicaCount }} and loadBalancerIPs = {{ $loadBalancerIPListLength }} +{{- end -}} +{{- end -}} + +{{/* Check if there are rolling tags in the images */}} +{{- define "mongodb-sharded.checkRollingTags" -}} +{{- include "common.warnings.rollingTag" .Values.image }} +{{- include "common.warnings.rollingTag" .Values.metrics.image }} +{{- include "common.warnings.rollingTag" .Values.volumePermissions.image }} +{{- end -}} + +{{/* Customizations */}}\ + +{{/* Redirect logs to stdout */}} +{{- define "mongodb-sharded.initContainer.logDir" -}} +- name: log-dir + image: {{ include "mongodb-sharded.image" $ }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - /bin/bash + args: + - -ec + - | + ln -sf /dev/stdout "/opt/bitnami/mongodb/logs/mongodb.log" + volumeMounts: + - name: empty-dir + mountPath: /opt/bitnami/mongodb/logs + subPath: app-logs-dir +{{- end }} + +{{/* Percona PMM client container definition*/}} +{{- define "mongodb-sharded.pmmClientContainer" -}} +- name: pmm-client + image: {{ .Values.pmmMetrics.image.repository }}:{{ .Values.pmmMetrics.image.tag }} + env: + - name: PMM_AGENT_SERVER_ADDRESS + value: {{ .Values.pmmMetrics.pmm_agent_server_address | quote }} + - name: PMM_AGENT_SERVER_INSECURE_TLS + value: {{ .Values.pmmMetrics.pmm_agent_server_insecure_tls | quote }} + - name: PMM_AGENT_SERVER_USERNAME + valueFrom: + secretKeyRef: + name: mongodb-pmm-credentials + key: pmm-agent-server-username + - name: PMM_AGENT_SERVER_PASSWORD + valueFrom: + secretKeyRef: + name: mongodb-pmm-credentials + key: pmm-agent-server-password + - name: PMM_MONGODB_USERNAME + valueFrom: + secretKeyRef: + name: mongodb-pmm-credentials + key: pmm-mongodb-username + - name: PMM_MONGODB_PASSWORD + valueFrom: + secretKeyRef: + name: mongodb-pmm-credentials + key: pmm-mongodb-password + - name: PMM_AGENT_SETUP_FORCE + value: {{ .Values.pmmMetrics.pmm_agent_setup_force | quote }} + - name: PMM_AGENT_CONFIG_FILE + value: {{ .Values.pmmMetrics.pmm_agent_config_file | quote }} + - name: PMM_AGENT_PRERUN_SCRIPT + value: {{ .Values.pmmMetrics.pmm_agent_prerun_script | quote }} + startupProbe: + tcpSocket: + port: 27017 + initialDelaySeconds: 50 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 27017 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 3 +{{- end }} \ No newline at end of file diff --git a/mongodb-sharded/templates/config-server/config-server-configmap.yaml b/mongodb-sharded/templates/config-server/config-server-configmap.yaml new file mode 100644 index 0000000..02a6c94 --- /dev/null +++ b/mongodb-sharded/templates/config-server/config-server-configmap.yaml @@ -0,0 +1,20 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if and (not .Values.configsvr.external.host) .Values.configsvr.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-configsvr" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: configsvr + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +data: + mongodb.conf: |- + {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.config "context" $) | nindent 4 }} +{{- end }} diff --git a/mongodb-sharded/templates/config-server/config-server-poddisruptionbudget.yaml b/mongodb-sharded/templates/config-server/config-server-poddisruptionbudget.yaml new file mode 100644 index 0000000..e187f37 --- /dev/null +++ b/mongodb-sharded/templates/config-server/config-server-poddisruptionbudget.yaml @@ -0,0 +1,28 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if and (not .Values.configsvr.external.host) .Values.configsvr.pdb.create }} +kind: PodDisruptionBudget +apiVersion: {{ include "common.capabilities.policy.apiVersion" . }} +metadata: + name: {{ printf "%s-configsvr" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: configsvr + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.configsvr.podLabels .Values.common.podLabels .Values.commonLabels ) "context" . ) }} + selector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/component: configsvr + {{- if .Values.configsvr.pdb.minAvailable }} + minAvailable: {{ .Values.configsvr.pdb.minAvailable | int }} + {{- end }} + {{- if .Values.configsvr.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.configsvr.pdb.maxUnavailable | int }} + {{- end }} +{{- end -}} diff --git a/mongodb-sharded/templates/config-server/config-server-podmonitor.yaml b/mongodb-sharded/templates/config-server/config-server-podmonitor.yaml new file mode 100644 index 0000000..668c319 --- /dev/null +++ b/mongodb-sharded/templates/config-server/config-server-podmonitor.yaml @@ -0,0 +1,37 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if and (not .Values.configsvr.external.host) (and .Values.metrics.enabled .Values.metrics.podMonitor.enabled) }} +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ printf "%s-configsvr" (include "common.names.fullname" .) }} + namespace: {{ default .Release.Namespace .Values.metrics.podMonitor.namespace | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: configsvr + {{- if .Values.metrics.podMonitor.additionalLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.metrics.podMonitor.additionalLabels "context" $) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + podMetricsEndpoints: + - port: metrics + path: /metrics + {{- if .Values.metrics.podMonitor.interval }} + interval: {{ .Values.metrics.podMonitor.interval }} + {{- end }} + {{- if .Values.metrics.podMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.podMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.configsvr.podLabels .Values.common.podLabels .Values.commonLabels ) "context" . ) }} + selector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/component: configsvr +{{- end }} diff --git a/mongodb-sharded/templates/config-server/config-server-statefulset.yaml b/mongodb-sharded/templates/config-server/config-server-statefulset.yaml new file mode 100644 index 0000000..80ba948 --- /dev/null +++ b/mongodb-sharded/templates/config-server/config-server-statefulset.yaml @@ -0,0 +1,465 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if not .Values.configsvr.external.host }} +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ printf "%s-configsvr" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: configsvr + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.configsvr.podLabels .Values.common.podLabels .Values.commonLabels ) "context" . ) }} + selector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/component: configsvr + serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) }} + replicas: {{ .Values.configsvr.replicaCount }} + podManagementPolicy: {{ .Values.configsvr.podManagementPolicy }} + updateStrategy: {{- toYaml .Values.configsvr.updateStrategy | nindent 4 }} + template: + metadata: + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} + app.kubernetes.io/component: configsvr + {{- if or .Values.common.podAnnotations .Values.configsvr.podAnnotations .Values.metrics.enabled }} + annotations: + {{- if or .Values.common.podAnnotations .Values.configsvr.podAnnotations }} + {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.configsvr.podAnnotations .Values.common.podAnnotations ) "context" . ) }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 8 }} + {{- end }} + {{- if .Values.metrics.enabled }} + {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podAnnotations "context" $ ) | nindent 8 }} + {{- end }} + {{- end }} + spec: + {{- if .Values.configsvr.schedulerName }} + schedulerName: {{ .Values.configsvr.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ include "mongodb-sharded.serviceAccountName" (dict "component" "configsvr" "value" .Values.configsvr.serviceAccount "context" $) }} + automountServiceAccountToken: {{ .Values.configsvr.automountServiceAccountToken }} + {{- if .Values.configsvr.hostAliases }} + hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.hostAliases "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.configsvr.affinity }} + affinity: {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.affinity "context" $) | nindent 8 }} + {{- else }} + affinity: + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.configsvr.podAffinityPreset "component" "configsvr" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.configsvr.podAntiAffinityPreset "component" "configsvr" "customLabels" $podLabels "context" $) | nindent 10 }} + nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.configsvr.nodeAffinityPreset.type "key" .Values.configsvr.nodeAffinityPreset.key "values" .Values.configsvr.nodeAffinityPreset.values) | nindent 10 }} + {{- end }} + {{- if .Values.configsvr.nodeSelector }} + nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.nodeSelector "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.configsvr.tolerations }} + tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.tolerations "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.configsvr.priorityClassName }} + priorityClassName: {{ .Values.configsvr.priorityClassName | quote }} + {{- end }} + {{- if .Values.configsvr.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.topologySpreadConstraints "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.configsvr.podSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.configsvr.podSecurityContext "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.configsvr.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.configsvr.terminationGracePeriodSeconds }} + {{- end }} + {{- include "mongodb-sharded.imagePullSecrets" . | nindent 6 }} + initContainers: + {{- if and .Values.volumePermissions.enabled .Values.configsvr.persistence.enabled }} + - name: volume-permissions + image: {{ include "mongodb-sharded.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: + - /bin/bash + args: + - -ec + - | + mkdir -p {{ .Values.configsvr.persistence.mountPath }}{{- if .Values.configsvr.persistence.subPath }}/{{ include "common.tplvalues.render" (dict "value" .Values.configsvr.persistence.subPath "context" $) }}{{- end }} + chown {{ .Values.configsvr.containerSecurityContext.runAsUser }}:{{ .Values.configsvr.podSecurityContext.fsGroup }} {{ .Values.configsvr.persistence.mountPath }}{{- if .Values.configsvr.persistence.subPath }}/{{ include "common.tplvalues.render" (dict "value" .Values.configsvr.persistence.subPath "context" $) }}{{- end }} + find {{ .Values.configsvr.persistence.mountPath }} -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | xargs -r chown -R {{ .Values.configsvr.containerSecurityContext.runAsUser }}:{{ .Values.configsvr.podSecurityContext.fsGroup }} + securityContext: + runAsUser: 0 + {{- if .Values.volumePermissions.resources }} + resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }} + {{- else if ne .Values.volumePermissions.resourcesPreset "none" }} + resources: {{- include "common.resources.preset" (dict "type" .Values.volumePermissions.resourcesPreset) | nindent 12 }} + {{- end }} + volumeMounts: + - name: datadir + mountPath: {{ .Values.configsvr.persistence.mountPath }} + {{- if .Values.configsvr.persistence.subPath }} + subPath: {{ include "common.tplvalues.render" (dict "value" .Values.configsvr.persistence.subPath "context" $) }} + {{- end }} + - name: empty-dir + mountPath: /tmp + subPath: tmp-dir + {{- end }} + {{- with .Values.configsvr.initContainers }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- with .Values.common.initContainers }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- include "mongodb-sharded.initContainer.logDir" $ | nindent 8 }} + containers: + - name: mongodb + image: {{ include "mongodb-sharded.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.configsvr.containerSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.configsvr.containerSecurityContext "context" $) | nindent 12 }} + {{- end }} + ports: + - containerPort: {{ .Values.common.containerPorts.mongodb }} + name: mongodb + env: + - name: GLIBC_TUNABLES + value: glibc.pthread.rseq=0 + - name: MONGODB_ENABLE_NUMACTL + value: {{ ternary "yes" "no" .Values.common.mongodbEnableNumactl | quote }} + - name: BITNAMI_DEBUG + value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }} + - name: MONGODB_SYSTEM_LOG_VERBOSITY + value: {{ .Values.common.mongodbSystemLogVerbosity | quote }} + - name: MONGODB_DISABLE_SYSTEM_LOG + {{- if .Values.common.mongodbDisableSystemLog }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + - name: MONGODB_INIT_RETRY_ATTEMPTS + value: {{ .Values.common.mongodbInitRetryAttempts | quote }} + - name: MONGODB_INIT_RETRY_DELAY + value: {{ .Values.common.mongodbInitRetryDelay | quote }} + - name: MONGODB_SHARDING_MODE + value: "configsvr" + - name: MONGODB_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MONGODB_PORT_NUMBER + value: {{ .Values.common.containerPorts.mongodb | quote }} + - name: MONGODB_INITIAL_PRIMARY_HOST + value: {{ include "mongodb-sharded.configServer.primaryHost" . }} + - name: MONGODB_REPLICA_SET_NAME + value: {{ printf "%s-configsvr" ( include "common.names.fullname" . ) }} + {{- if .Values.common.useHostnames }} + - name: MONGODB_ADVERTISED_HOSTNAME + value: {{ printf "$(MONGODB_POD_NAME).%s-headless.%s.svc.%s" (include "common.names.fullname" .) (include "common.names.namespace" .) .Values.clusterDomain }} + {{- end }} + {{- if .Values.auth.enabled }} + - name: MONGODB_ROOT_USER + value: {{ .Values.auth.rootUser | quote }} + {{- if .Values.auth.usePasswordFiles }} + - name: MONGODB_ROOT_PASSWORD_FILE + value: "/bitnami/mongodb/secrets/mongodb-root-password" + - name: MONGODB_REPLICA_SET_KEY_FILE + value: "/bitnami/mongodb/secrets/mongodb-replica-set-key" + {{- else }} + - name: MONGODB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" . }} + key: mongodb-root-password + - name: MONGODB_REPLICA_SET_KEY + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" . }} + key: mongodb-replica-set-key + {{- end }} + {{- end }} + - name: MONGODB_ENABLE_IPV6 + {{- if .Values.common.mongodbEnableIPv6 }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + - name: MONGODB_ENABLE_DIRECTORY_PER_DB + {{- if .Values.common.mongodbDirectoryPerDB }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + {{- if .Values.configsvr.mongodbExtraFlags }} + - name: MONGODB_EXTRA_FLAGS + value: {{ .Values.configsvr.mongodbExtraFlags | join " " | quote }} + {{- end }} + {{- if .Values.common.extraEnvVars }} + {{- include "common.tplvalues.render" ( dict "value" .Values.common.extraEnvVars "context" $ ) | nindent 12 }} + {{- end }} + {{- if .Values.configsvr.extraEnvVars }} + {{- include "common.tplvalues.render" ( dict "value" .Values.configsvr.extraEnvVars "context" $ ) | nindent 12 }} + {{- end }} + {{- if or .Values.common.extraEnvVarsCM .Values.common.extraEnvVarsSecret .Values.configsvr.extraEnvVarsCM .Values.configsvr.extraEnvVarsSecret }} + envFrom: + {{- if .Values.common.extraEnvVarsCM }} + - configMapRef: + name: {{ include "common.tplvalues.render" ( dict "value" .Values.common.extraEnvVarsCM "context" $ ) }} + {{- end }} + {{- if .Values.common.extraEnvVarsSecret }} + - secretRef: + name: {{ include "common.tplvalues.render" ( dict "value" .Values.common.extraEnvVarsSecret "context" $ ) }} + {{- end }} + {{- if .Values.configsvr.extraEnvVarsCM }} + - configMapRef: + name: {{ include "common.tplvalues.render" ( dict "value" .Values.configsvr.extraEnvVarsCM "context" $ ) }} + {{- end }} + {{- if .Values.configsvr.extraEnvVarsSecret }} + - secretRef: + name: {{ include "common.tplvalues.render" ( dict "value" .Values.configsvr.extraEnvVarsSecret "context" $ ) }} + {{- end }} + {{- end }} + {{- if .Values.diagnosticMode.enabled }} + command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} + {{- else }} + {{- if .Values.configsvr.command }} + command: {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.command "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.configsvr.args }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.args "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.configsvr.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.customLivenessProbe "context" $) | nindent 12 }} + {{- else if .Values.configsvr.livenessProbe.enabled }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.configsvr.livenessProbe "enabled") "context" $) | nindent 12 }} + exec: + command: + - pgrep + - mongod + {{- end }} + {{- if .Values.configsvr.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.customReadinessProbe "context" $) | nindent 12 }} + {{- else if .Values.configsvr.readinessProbe.enabled }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.configsvr.readinessProbe "enabled") "context" $) | nindent 12 }} + exec: + command: + - /bin/sh + - -c + - mongosh --port $MONGODB_PORT_NUMBER --eval "db.adminCommand('ping')" + {{- end }} + {{- if .Values.configsvr.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.configsvr.customStartupProbe "context" $) | nindent 12 }} + {{- else if .Values.configsvr.startupProbe.enabled }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.configsvr.startupProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: mongodb + {{- end }} + {{- end }} + {{- if $.Values.configsvr.lifecycleHooks }} + lifecycle: {{- include "common.tplvalues.render" (dict "value" $.Values.configsvr.lifecycleHooks "context" $) | nindent 12 }} + {{- end }} + volumeMounts: + - name: empty-dir + mountPath: /tmp + subPath: tmp-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/conf + subPath: app-conf-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/tmp + subPath: app-tmp-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/logs + subPath: app-logs-dir + - name: empty-dir + mountPath: /.mongodb + subPath: app-mongosh-dir + - name: replicaset-entrypoint-configmap + mountPath: /entrypoint + - name: datadir + mountPath: {{ .Values.configsvr.persistence.mountPath }} + {{- if .Values.configsvr.persistence.subPath }} + subPath: {{ include "common.tplvalues.render" (dict "value" .Values.configsvr.persistence.subPath "context" $) }} + {{- end }} + {{- if or .Values.configsvr.config .Values.configsvr.configCM }} + - name: config + mountPath: /bitnami/mongodb/conf/ + {{- end }} + {{- if .Values.auth.usePasswordFiles }} + - name: secrets + mountPath: /bitnami/mongodb/secrets/ + {{- end }} + {{- if .Values.common.initScriptsCM }} + - name: custom-init-scripts-cm + mountPath: /docker-entrypoint-initdb.d/cm + {{- end }} + {{- if .Values.common.initScriptsSecret }} + - name: custom-init-scripts-secret + mountPath: /docker-entrypoint-initdb.d/secret + {{- end }} + {{- if .Values.common.extraVolumeMounts }} + {{- include "common.tplvalues.render" ( dict "value" .Values.common.extraVolumeMounts "context" $ ) | nindent 12 }} + {{- end }} + {{- if .Values.configsvr.extraVolumeMounts }} + {{- include "common.tplvalues.render" ( dict "value" .Values.configsvr.extraVolumeMounts "context" $ ) | nindent 12 }} + {{- end }} + {{- if .Values.configsvr.resources }} + resources: {{- toYaml .Values.configsvr.resources | nindent 12 }} + {{- else if ne .Values.configsvr.resourcesPreset "none" }} + resources: {{- include "common.resources.preset" (dict "type" .Values.configsvr.resourcesPreset) | nindent 12 }} + {{- end }} + {{- if $.Values.pmmMetrics.enabled | default false }} + {{- include "mongodb-sharded.pmmClientContainer" $ | nindent 8 }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ include "mongodb-sharded.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + {{- if .Values.metrics.containerSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.metrics.containerSecurityContext "context" $) | nindent 12 }} + {{- end }} + env: + {{- if .Values.auth.enabled }} + - name: MONGODB_ROOT_USER + value: {{ .Values.auth.rootUser | quote }} + {{- if .Values.auth.usePasswordFiles }} + - name: MONGODB_ROOT_PASSWORD_FILE + value: "/bitnami/mongodb/secrets/mongodb-root-password" + {{- else }} + - name: MONGODB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" . }} + key: mongodb-root-password + {{- end }} + {{- end }} + {{- if .Values.diagnosticMode.enabled }} + command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} + {{- else }} + command: + - sh + - -ec + - |- + #!/bin/sh + {{- if .Values.auth.usePasswordFiles }} + export MONGODB_ROOT_PASSWORD="$(cat "${MONGODB_ROOT_PASSWORD_FILE}")" + {{- end }} + /bin/mongodb_exporter --collect-all --compatible-mode --web.listen-address ":{{ .Values.metrics.containerPorts.metrics }}" --mongodb.uri mongodb://$(echo $MONGODB_ROOT_USER):$(echo $MONGODB_ROOT_PASSWORD | sed -r "s/@/%40/g;s/:/%3A/g")@localhost:{{ .Values.common.containerPorts.mongodb }}/admin{{ ternary "?ssl=true" "" $.Values.metrics.useTLS }} {{ .Values.metrics.extraArgs }} + {{- end }} + volumeMounts: + - name: empty-dir + mountPath: /tmp + subPath: tmp-dir + {{- if .Values.auth.usePasswordFiles }} + - name: secrets + mountPath: /bitnami/mongodb/secrets/ + {{- end }} + ports: + - name: metrics + containerPort: {{ .Values.metrics.containerPorts.metrics }} + {{- if not .Values.diagnosticMode.enabled }} + {{- if .Values.metrics.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customLivenessProbe "context" $) | nindent 12 }} + {{- else if .Values.metrics.livenessProbe.enabled }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.livenessProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: metrics + {{- end }} + {{- if .Values.metrics.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customReadinessProbe "context" $) | nindent 12 }} + {{- else if .Values.metrics.readinessProbe.enabled }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.readinessProbe "enabled") "context" $) | nindent 12 }} + httpGet: + path: /metrics + port: metrics + {{- end }} + {{- if .Values.metrics.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customStartupProbe "context" $) | nindent 12 }} + {{- else if .Values.metrics.startupProbe.enabled }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.startupProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: metrics + {{- end }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{- toYaml .Values.metrics.resources | nindent 12 }} + {{- else if ne .Values.metrics.resourcesPreset "none" }} + resources: {{- include "common.resources.preset" (dict "type" .Values.metrics.resourcesPreset) | nindent 12 }} + {{- end }} + {{- end }} + {{- with .Values.configsvr.sidecars }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- with .Values.common.sidecars }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + volumes: + - name: empty-dir + emptyDir: {} + - name: replicaset-entrypoint-configmap + configMap: + name: {{ printf "%s-replicaset-entrypoint" (include "common.names.fullname" .) }} + {{- if .Values.auth.usePasswordFiles }} + - name: secrets + secret: + secretName: {{ include "mongodb-sharded.secret" . }} + {{- end }} + {{- if or .Values.configsvr.config .Values.configsvr.configCM }} + - name: config + configMap: + name: {{ include "mongodb-sharded.configsvr.configCM" . }} + {{- end }} + {{- if .Values.common.initScriptsCM }} + - name: custom-init-scripts-cm + configMap: + name: {{ include "mongodb-sharded.initScriptsCM" . }} + defaultMode: 0755 + {{- end }} + {{- if .Values.common.initScriptsSecret }} + - name: custom-init-scripts-secret + secret: + secretName: {{ include "mongodb-sharded.initScriptsSecret" . }} + defaultMode: 0755 + {{- end }} + {{- if .Values.common.extraVolumes }} + {{- include "common.tplvalues.render" ( dict "value" .Values.common.extraVolumes "context" $ ) | nindent 8 }} + {{- end }} + {{- if .Values.configsvr.extraVolumes }} + {{- include "common.tplvalues.render" ( dict "value" .Values.configsvr.extraVolumes "context" $ ) | nindent 8 }} + {{- end }} + {{- if not .Values.configsvr.persistence.enabled }} + - name: datadir + emptyDir: {} + {{- else }} + {{- if .Values.configsvr.persistentVolumeClaimRetentionPolicy.enabled }} + persistentVolumeClaimRetentionPolicy: + whenDeleted: {{ .Values.configsvr.persistentVolumeClaimRetentionPolicy.whenDeleted }} + whenScaled: {{ .Values.configsvr.persistentVolumeClaimRetentionPolicy.whenScaled }} + {{- end }} + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: datadir + {{- if or .Values.configsvr.persistence.annotations .Values.commonAnnotations .Values.configsvr.persistence.resourcePolicy }} + {{- if or .Values.commonAnnotations .Values.configsvr.persistence.annotations .Values.configsvr.persistence.resourcePolicy }} + annotations: + {{- if .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 10 }} + {{- end }} + {{- if .Values.configsvr.persistence.annotations }} + {{- include "common.tplvalues.render" ( dict "value" .Values.configsvr.persistence.annotations "context" $) | nindent 10 }} + {{- end }} + {{- end }} + {{- end }} + spec: + accessModes: + {{- range .Values.configsvr.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.configsvr.persistence.size | quote }} + {{- include "common.storage.class" (dict "persistence" .Values.configsvr.persistence "global" .Values.global) | nindent 8 }} + {{- end }} +{{- end }} diff --git a/mongodb-sharded/templates/extra-list.yaml b/mongodb-sharded/templates/extra-list.yaml new file mode 100644 index 0000000..3b4b857 --- /dev/null +++ b/mongodb-sharded/templates/extra-list.yaml @@ -0,0 +1,9 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- range .Values.extraDeploy }} +--- +{{ include "common.tplvalues.render" (dict "value" . "context" $) }} +{{- end }} diff --git a/mongodb-sharded/templates/headless-service.yaml b/mongodb-sharded/templates/headless-service.yaml new file mode 100644 index 0000000..a6025e4 --- /dev/null +++ b/mongodb-sharded/templates/headless-service.yaml @@ -0,0 +1,26 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: v1 +kind: Service +metadata: + name: {{ printf "%s-headless" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.commonAnnotations .Values.service.headless.annotations }} + {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.headless.annotations .Values.commonAnnotations ) "context" . ) }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} +spec: + type: ClusterIP + clusterIP: None + ports: + - name: mongodb + port: {{ .Values.service.ports.mongodb }} + {{- if .Values.service.extraPorts }} + {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} + {{- end }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.common.podLabels .Values.commonLabels ) "context" . ) }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} diff --git a/mongodb-sharded/templates/mongos/mongos-configmap.yaml b/mongodb-sharded/templates/mongos/mongos-configmap.yaml new file mode 100644 index 0000000..e00f616 --- /dev/null +++ b/mongodb-sharded/templates/mongos/mongos-configmap.yaml @@ -0,0 +1,20 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if .Values.mongos.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-mongos" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: mongos + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +data: + mongodb.conf: |- + {{- include "common.tplvalues.render" (dict "value" .Values.mongos.config "context" $) | nindent 4 }} +{{- end }} diff --git a/mongodb-sharded/templates/mongos/mongos-dep-sts.yaml b/mongodb-sharded/templates/mongos/mongos-dep-sts.yaml new file mode 100644 index 0000000..216d135 --- /dev/null +++ b/mongodb-sharded/templates/mongos/mongos-dep-sts.yaml @@ -0,0 +1,374 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: {{ if .Values.mongos.useStatefulSet }}{{ include "common.capabilities.statefulset.apiVersion" . }}{{- else }}{{ include "common.capabilities.deployment.apiVersion" . }}{{- end }} +kind: {{ if .Values.mongos.useStatefulSet }}StatefulSet{{- else }}Deployment{{- end }} +metadata: + name: {{ printf "%s-mongos" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: mongos + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + {{- if .Values.mongos.useStatefulSet }} + serviceName: {{ include "mongodb-sharded.serviceName" . }} + podManagementPolicy: {{ .Values.mongos.podManagementPolicy }} + updateStrategy: + {{- else }} + strategy: + {{- end }} + {{- toYaml .Values.mongos.updateStrategy | nindent 4 }} + replicas: {{ .Values.mongos.replicaCount }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.mongos.podLabels .Values.common.podLabels .Values.commonLabels ) "context" . ) }} + selector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/component: mongos + template: + metadata: + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} + app.kubernetes.io/component: mongos + {{- if or .Values.common.podAnnotations .Values.mongos.podAnnotations .Values.metrics.enabled }} + annotations: + {{- if or .Values.common.podAnnotations .Values.mongos.podAnnotations }} + {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.mongos.podAnnotations .Values.common.podAnnotations ) "context" . ) }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 8 }} + {{- end }} + {{- if .Values.metrics.enabled }} + {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podAnnotations "context" $ ) | nindent 8 }} + {{- end }} + {{- end }} + spec: + {{- if .Values.mongos.schedulerName }} + schedulerName: {{ .Values.mongos.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ include "mongodb-sharded.serviceAccountName" (dict "component" "mongos" "value" $.Values.mongos.serviceAccount "context" $) }} + automountServiceAccountToken: {{ .Values.mongos.automountServiceAccountToken }} + {{- if .Values.mongos.hostAliases }} + hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.hostAliases "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.mongos.affinity }} + affinity: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.affinity "context" $) | nindent 8 }} + {{- else }} + affinity: + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.mongos.podAffinityPreset "component" "mongos" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.mongos.podAntiAffinityPreset "component" "mongos" "customLabels" $podLabels "context" $) | nindent 10 }} + nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.mongos.nodeAffinityPreset.type "key" .Values.mongos.nodeAffinityPreset.key "values" .Values.mongos.nodeAffinityPreset.values) | nindent 10 }} + {{- end }} + {{- if .Values.mongos.nodeSelector }} + nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.nodeSelector "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.mongos.tolerations }} + tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.tolerations "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.mongos.priorityClassName }} + priorityClassName: {{ .Values.mongos.priorityClassName | quote }} + {{- end }} + {{- if .Values.mongos.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.topologySpreadConstraints "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.mongos.podSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.mongos.podSecurityContext "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.mongos.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.mongos.terminationGracePeriodSeconds }} + {{- end }} + {{- include "mongodb-sharded.imagePullSecrets" . | nindent 6 }} + initContainers: + {{- with $.Values.mongos.initContainers }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- with $.Values.common.initContainers }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- include "mongodb-sharded.initContainer.logDir" $ | nindent 8 }} + containers: + - name: mongos + image: {{ include "mongodb-sharded.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + {{- if .Values.mongos.containerSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.mongos.containerSecurityContext "context" $) | nindent 12 }} + {{- end }} + env: + - name: GLIBC_TUNABLES + value: glibc.pthread.rseq=0 + - name: MONGODB_ENABLE_NUMACTL + value: {{ ternary "yes" "no" $.Values.common.mongodbEnableNumactl | quote }} + - name: BITNAMI_DEBUG + value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }} + - name: MONGODB_SHARDING_MODE + value: "mongos" + - name: MONGODB_INIT_RETRY_ATTEMPTS + value: {{ .Values.common.mongodbInitRetryAttempts | quote }} + - name: MONGODB_INIT_RETRY_DELAY + value: {{ .Values.common.mongodbInitRetryDelay | quote }} + {{- if $.Values.auth.enabled }} + - name: MONGODB_ROOT_USER + value: {{ .Values.auth.rootUser | quote }} + {{- if .Values.auth.usePasswordFiles }} + - name: MONGODB_ROOT_PASSWORD_FILE + value: "/bitnami/mongodb/secrets/mongodb-root-password" + - name: MONGODB_REPLICA_SET_KEY_FILE + value: "/bitnami/mongodb/secrets/mongodb-replica-set-key" + {{- else }} + - name: MONGODB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" . }} + key: mongodb-root-password + - name: MONGODB_REPLICA_SET_KEY + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" . }} + key: mongodb-replica-set-key + {{- end }} + {{- end }} + - name: MONGODB_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + {{- if .Values.common.useHostnames }} + - name: MONGODB_ADVERTISED_HOSTNAME + value: "$(MONGODB_POD_NAME)" + {{- end }} + - name: MONGODB_PORT_NUMBER + value: {{ $.Values.common.containerPorts.mongodb | quote }} + - name: MONGODB_CFG_PRIMARY_HOST + value: {{ include "mongodb-sharded.configServer.primaryHost" . }} + - name: MONGODB_CFG_REPLICA_SET_NAME + value: {{ include "mongodb-sharded.configServer.rsName" . }} + - name: MONGODB_SYSTEM_LOG_VERBOSITY + value: {{ .Values.common.mongodbSystemLogVerbosity | quote }} + - name: MONGODB_DISABLE_SYSTEM_LOG + {{- if .Values.common.mongodbDisableSystemLog }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + - name: MONGODB_ENABLE_IPV6 + {{- if .Values.common.mongodbEnableIPv6 }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + - name: MONGODB_ENABLE_DIRECTORY_PER_DB + {{- if .Values.common.mongodbDirectoryPerDB }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + {{- if .Values.mongos.mongodbExtraFlags }} + - name: MONGODB_EXTRA_FLAGS + value: {{ .Values.mongos.mongodbExtraFlags | join " " | quote }} + {{- end }} + {{- if .Values.common.extraEnvVars }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.common.extraEnvVars "context" $ ) | nindent 12 }} + {{- end }} + {{- if .Values.mongos.extraEnvVars }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.mongos.extraEnvVars "context" $ ) | nindent 12 }} + {{- end }} + {{- if or .Values.common.extraEnvVarsCM .Values.common.extraEnvVarsSecret .Values.mongos.extraEnvVarsCM .Values.mongos.extraEnvVarsSecret }} + envFrom: + {{- if .Values.common.extraEnvVarsCM }} + - configMapRef: + name: {{ include "common.tplvalues.render" ( dict "value" .Values.common.extraEnvVarsCM "context" $ ) }} + {{- end }} + {{- if .Values.common.extraEnvVarsSecret }} + - secretRef: + name: {{ include "common.tplvalues.render" ( dict "value" .Values.common.extraEnvVarsSecret "context" $ ) }} + {{- end }} + {{- if .Values.configsvr.extraEnvVarsCM }} + - configMapRef: + name: {{ include "common.tplvalues.render" ( dict "value" .Values.mongos.extraEnvVarsCM "context" $ ) }} + {{- end }} + {{- if .Values.mongos.extraEnvVarsSecret }} + - secretRef: + name: {{ include "common.tplvalues.render" ( dict "value" .Values.mongos.extraEnvVarsSecret "context" $ ) }} + {{- end }} + {{- end }} + ports: + - name: mongodb + containerPort: {{ $.Values.common.containerPorts.mongodb }} + {{- if .Values.diagnosticMode.enabled }} + command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} + {{- else }} + {{- if .Values.mongos.command }} + command: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.command "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.mongos.args }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.args "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.mongos.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.customLivenessProbe "context" $) | nindent 12 }} + {{- else if .Values.mongos.livenessProbe.enabled }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.mongos.livenessProbe "enabled") "context" $) | nindent 12 }} + exec: + command: + - pgrep + - mongos + {{- end }} + {{- if .Values.mongos.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.customReadinessProbe "context" $) | nindent 12 }} + {{- else if .Values.mongos.readinessProbe.enabled }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.mongos.readinessProbe "enabled") "context" $) | nindent 12 }} + exec: + command: + - /bin/sh + - -c + - mongosh --port $MONGODB_PORT_NUMBER --eval "db.adminCommand('ping')" + {{- end }} + {{- if .Values.mongos.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.customStartupProbe "context" $) | nindent 12 }} + {{- else if .Values.mongos.startupProbe.enabled }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.mongos.startupProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: mongodb + {{- end }} + {{- end }} + {{- if .Values.mongos.lifecycleHooks }} + lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.lifecycleHooks "context" $) | nindent 12 }} + {{- end }} + volumeMounts: + - name: empty-dir + mountPath: /tmp + subPath: tmp-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/conf + subPath: app-conf-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/tmp + subPath: app-tmp-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/logs + subPath: app-logs-dir + - name: empty-dir + mountPath: /.mongodb + subPath: app-mongosh-dir + {{- if .Values.auth.usePasswordFiles }} + - name: secrets + mountPath: /bitnami/mongodb/secrets/ + {{- end }} + {{- if or .Values.mongos.config .Values.mongos.configCM }} + - name: config + mountPath: /bitnami/mongodb/conf/ + {{- end }} + {{- if $.Values.common.extraVolumeMounts }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.common.extraVolumeMounts "context" $ ) | nindent 12 }} + {{- end }} + {{- if $.Values.mongos.extraVolumeMounts }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.mongos.extraVolumeMounts "context" $ ) | nindent 12 }} + {{- end }} + {{- if .Values.mongos.resources }} + resources: {{- toYaml .Values.mongos.resources | nindent 12 }} + {{- else if ne .Values.mongos.resourcesPreset "none" }} + resources: {{- include "common.resources.preset" (dict "type" .Values.mongos.resourcesPreset) | nindent 12 }} + {{- end }} + {{- if $.Values.pmmMetrics.enabled | default false }} + {{- include "mongodb-sharded.pmmClientContainer" $ | nindent 8 }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ include "mongodb-sharded.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + {{- if .Values.metrics.containerSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.metrics.containerSecurityContext "context" $) | nindent 12 }} + {{- end }} + env: + {{- if $.Values.auth.enabled }} + - name: MONGODB_ROOT_USER + value: {{ .Values.auth.rootUser | quote }} + {{- if .Values.auth.usePasswordFiles }} + - name: MONGODB_ROOT_PASSWORD_FILE + value: "/bitnami/mongodb/secrets/mongodb-root-password" + {{- else }} + - name: MONGODB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" . }} + key: mongodb-root-password + {{- end }} + {{- end }} + {{- if .Values.diagnosticMode.enabled }} + command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} + {{- else }} + command: + - sh + - -ec + - |- + #!/bin/sh + {{- if .Values.auth.usePasswordFiles }} + export MONGODB_ROOT_PASSWORD="$(cat "${MONGODB_ROOT_PASSWORD_FILE}")" + {{- end }} + /bin/mongodb_exporter --collect-all --compatible-mode --web.listen-address ":{{ .Values.metrics.containerPorts.metrics }}" --mongodb.uri mongodb://$(echo $MONGODB_ROOT_USER):$(echo $MONGODB_ROOT_PASSWORD | sed -r "s/@/%40/g;s/:/%3A/g")@localhost:{{ .Values.common.containerPorts.mongodb }}/admin{{ ternary "?ssl=true" "" $.Values.metrics.useTLS }} {{ .Values.metrics.extraArgs }} + {{- end }} + volumeMounts: + - name: empty-dir + mountPath: /tmp + subPath: tmp-dir + {{- if .Values.auth.usePasswordFiles }} + - name: secrets + mountPath: /bitnami/mongodb/secrets/ + {{- end }} + ports: + - name: metrics + containerPort: {{ .Values.metrics.containerPorts.metrics }} + {{- if not .Values.diagnosticMode.enabled }} + {{- if .Values.metrics.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customLivenessProbe "context" $) | nindent 12 }} + {{- else if .Values.metrics.livenessProbe.enabled }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.livenessProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: metrics + {{- end }} + {{- if .Values.metrics.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customReadinessProbe "context" $) | nindent 12 }} + {{- else if .Values.metrics.readinessProbe.enabled }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.readinessProbe "enabled") "context" $) | nindent 12 }} + httpGet: + path: /metrics + port: metrics + {{- end }} + {{- if .Values.metrics.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customStartupProbe "context" $) | nindent 12 }} + {{- else if .Values.metrics.startupProbe.enabled }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.startupProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: metrics + {{- end }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{- toYaml .Values.metrics.resources | nindent 12 }} + {{- else if ne .Values.metrics.resourcesPreset "none" }} + resources: {{- include "common.resources.preset" (dict "type" .Values.metrics.resourcesPreset) | nindent 12 }} + {{- end }} + {{- end }} + {{- with .Values.mongos.sidecars }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- with .Values.common.sidecars }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + volumes: + - name: empty-dir + emptyDir: {} + {{- if .Values.auth.usePasswordFiles }} + - name: secrets + secret: + secretName: {{ include "mongodb-sharded.secret" . }} + {{- end }} + {{- if or .Values.mongos.config .Values.mongos.configCM }} + - name: config + configMap: + name: {{ include "mongodb-sharded.mongos.configCM" . }} + {{- end }} + {{- if $.Values.common.extraVolumes }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.common.extraVolumes "context" $ ) | nindent 8 }} + {{- end }} + {{- if $.Values.mongos.extraVolumes }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.mongos.extraVolumes "context" $ ) | nindent 8 }} + {{- end }} diff --git a/mongodb-sharded/templates/mongos/mongos-poddisruptionbudget.yaml b/mongodb-sharded/templates/mongos/mongos-poddisruptionbudget.yaml new file mode 100644 index 0000000..ced3fd8 --- /dev/null +++ b/mongodb-sharded/templates/mongos/mongos-poddisruptionbudget.yaml @@ -0,0 +1,28 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if .Values.mongos.pdb.create }} +kind: PodDisruptionBudget +apiVersion: {{ include "common.capabilities.policy.apiVersion" . }} +metadata: + name: {{ printf "%s-mongos" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: mongos + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.mongos.podLabels .Values.common.podLabels .Values.commonLabels ) "context" . ) }} + selector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/component: mongos + {{- if .Values.mongos.pdb.minAvailable }} + minAvailable: {{ .Values.mongos.pdb.minAvailable | int }} + {{- end }} + {{- if .Values.mongos.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.mongos.pdb.maxUnavailable | int }} + {{- end }} +{{- end -}} diff --git a/mongodb-sharded/templates/mongos/mongos-podmonitor.yaml b/mongodb-sharded/templates/mongos/mongos-podmonitor.yaml new file mode 100644 index 0000000..b9469e0 --- /dev/null +++ b/mongodb-sharded/templates/mongos/mongos-podmonitor.yaml @@ -0,0 +1,37 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if and .Values.metrics.enabled .Values.metrics.podMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ printf "%s-mongos" (include "common.names.fullname" .) }} + namespace: {{ default .Release.Namespace .Values.metrics.podMonitor.namespace | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: mongos + {{- if .Values.metrics.podMonitor.additionalLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.metrics.podMonitor.additionalLabels "context" $) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + podMetricsEndpoints: + - port: metrics + path: /metrics + {{- if .Values.metrics.podMonitor.interval }} + interval: {{ .Values.metrics.podMonitor.interval }} + {{- end }} + {{- if .Values.metrics.podMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.podMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.mongos.podLabels .Values.common.podLabels .Values.commonLabels ) "context" . ) }} + selector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/component: mongos +{{- end }} diff --git a/mongodb-sharded/templates/mongos/mongos-service-per-replica.yaml b/mongodb-sharded/templates/mongos/mongos-service-per-replica.yaml new file mode 100644 index 0000000..d8e49f0 --- /dev/null +++ b/mongodb-sharded/templates/mongos/mongos-service-per-replica.yaml @@ -0,0 +1,67 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if and .Values.mongos.useStatefulSet .Values.mongos.servicePerReplica.enabled }} +{{- range $i := until (.Values.mongos.replicaCount | int) }} +{{- $context := deepCopy $ | merge (dict "index" $i) }} +apiVersion: v1 +kind: Service +metadata: + name: {{ printf "%s-%d" (include "mongodb-sharded.serviceName" $) $i }} + namespace: {{ include "common.names.namespace" $ | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: mongos + {{- if or $.Values.commonAnnotations $.Values.mongos.servicePerReplica.annotations }} + {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list $.Values.mongos.servicePerReplica.annotations $.Values.commonAnnotations ) "context" $ ) }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} +spec: + type: {{ $.Values.mongos.servicePerReplica.type }} + sessionAffinity: {{ default "None" $.Values.mongos.servicePerReplica.sessionAffinity }} + {{- if $.Values.mongos.servicePerReplica.sessionAffinityConfig }} + sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.mongos.servicePerReplica.sessionAffinityConfig "context" $context) | nindent 4 }} + {{- end }} + {{- if or (eq $.Values.mongos.servicePerReplica.type "LoadBalancer") (eq $.Values.mongos.servicePerReplica.type "NodePort") }} + externalTrafficPolicy: {{ $.Values.mongos.servicePerReplica.externalTrafficPolicy | quote }} + {{- end }} + {{- if $.Values.mongos.servicePerReplica.externalIPs }} + externalIPs: {{- toYaml $.Values.mongos.servicePerReplica.externalIPs | nindent 4 }} + {{- end }} + {{- if and $.Values.mongos.servicePerReplica.loadBalancerIPs (eq $.Values.mongos.servicePerReplica.type "LoadBalancer") }} + loadBalancerIP: {{ index $.Values.mongos.servicePerReplica.loadBalancerIPs $i }} + {{- end }} + {{- if and (eq $.Values.mongos.servicePerReplica.type "LoadBalancer") $.Values.mongos.servicePerReplica.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{ with $.Values.mongos.servicePerReplica.loadBalancerSourceRanges }} + {{ include "common.tplvalues.render" . | nindent 4 }} + {{- end }} + {{- end }} + {{- if and (eq $.Values.mongos.servicePerReplica.type "ClusterIP") $.Values.mongos.servicePerReplica.clusterIPs }} + clusterIP: {{ index $.Values.mongos.servicePerReplica.clusterIPs $i }} + {{- end }} + ports: + - name: mongodb + port: {{ $.Values.mongos.servicePerReplica.port }} + targetPort: mongodb + {{- if $.Values.mongos.servicePerReplica.nodePorts }} + nodePort: {{ index $.Values.mongos.servicePerReplica.nodePorts $i }} + {{- else if eq $.Values.mongos.servicePerReplica.type "ClusterIP" }} + nodePort: null + {{- end }} + {{- if $.Values.metrics.enabled }} + - name: metrics + port: 9216 + targetPort: metrics + {{- end }} + {{- if $.Values.mongos.servicePerReplica.extraPorts }} + {{- include "common.tplvalues.render" (dict "value" $.Values.mongos.servicePerReplica.extraPorts "context" $context) | nindent 4 }} + {{- end }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.mongos.podLabels $.Values.common.podLabels $.Values.commonLabels ) "context" $ ) }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: mongos + statefulset.kubernetes.io/pod-name: {{ printf "%s-mongos-%d" (include "common.names.fullname" $) $i }} +--- +{{- end }} +{{- end }} diff --git a/mongodb-sharded/templates/mongos/mongos-service.yaml b/mongodb-sharded/templates/mongos/mongos-service.yaml new file mode 100644 index 0000000..97eb602 --- /dev/null +++ b/mongodb-sharded/templates/mongos/mongos-service.yaml @@ -0,0 +1,65 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "mongodb-sharded.serviceName" . }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: mongos + {{- if or .Values.commonAnnotations .Values.service.annotations }} + {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.annotations .Values.commonAnnotations ) "context" . ) }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} +spec: + type: {{ .Values.service.type }} + {{- if and .Values.service.loadBalancerIP (eq .Values.service.type "LoadBalancer") }} + loadBalancerIP: {{ .Values.service.loadBalancerIP }} + {{- end }} + {{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{ with .Values.service.loadBalancerSourceRanges }} +{{ toYaml . | indent 4 }} + {{- end }} + {{- end }} + {{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }} + clusterIP: {{ .Values.service.clusterIP }} + {{- end }} + {{- if .Values.service.externalIPs }} + externalIPs: {{- toYaml .Values.service.externalIPs | nindent 4 }} + {{- end }} + ports: + - name: mongodb + port: {{ .Values.service.ports.mongodb }} + targetPort: mongodb + {{- if .Values.service.nodePorts.mongodb }} + nodePort: {{ .Values.service.nodePorts.mongodb }} + {{- else if eq .Values.service.type "ClusterIP" }} + nodePort: null + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9216 + targetPort: metrics + {{- if .Values.service.nodePorts.metrics }} + nodePort: {{ .Values.service.nodePorts.metrics }} + {{- else if eq .Values.service.type "ClusterIP" }} + nodePort: null + {{- end }} + {{- end }} + {{- if .Values.service.extraPorts }} + {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} + {{- end }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.mongos.podLabels .Values.common.podLabels .Values.commonLabels ) "context" . ) }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: mongos + sessionAffinity: {{ default "None" .Values.service.sessionAffinity }} + {{- if .Values.service.sessionAffinityConfig }} + sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }} + {{- end }} + {{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }} + externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }} + {{- end }} diff --git a/mongodb-sharded/templates/networkpolicy.yaml b/mongodb-sharded/templates/networkpolicy.yaml new file mode 100644 index 0000000..157c839 --- /dev/null +++ b/mongodb-sharded/templates/networkpolicy.yaml @@ -0,0 +1,75 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if .Values.networkPolicy.enabled }} +kind: NetworkPolicy +apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} +metadata: + name: {{ include "common.names.fullname" . }} + namespace: {{ template "common.names.namespace" . }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.common.podLabels .Values.commonLabels ) "context" . ) }} + podSelector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + policyTypes: + - Ingress + - Egress + {{- if .Values.networkPolicy.allowExternalEgress }} + egress: + - {} + {{- else }} + egress: + # Allow dns resolution + - ports: + - port: 53 + protocol: UDP + - port: 53 + protocol: TCP + # Allow connection to other cluster pods + - ports: + - port: {{ .Values.common.containerPorts.mongodb }} + to: + - podSelector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} + {{- if .Values.networkPolicy.extraEgress }} + {{- include "common.tplvalues.render" ( dict "value" .Values.rts.networkPolicy.extraEgress "context" $ ) | nindent 4 }} + {{- end }} + {{- end }} + ingress: + - ports: + - port: {{ .Values.common.containerPorts.mongodb }} + {{- if .Values.metrics.enabled }} + - port: {{ .Values.metrics.containerPorts.metrics }} + {{- end }} + {{- if not .Values.networkPolicy.allowExternal }} + from: + - podSelector: + matchLabels: + {{ template "common.names.fullname" . }}-client: "true" + - podSelector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} + {{- if .Values.networkPolicy.ingressNSMatchLabels }} + - namespaceSelector: + matchLabels: + {{- range $key, $value := .Values.networkPolicy.ingressNSMatchLabels }} + {{ $key | quote }}: {{ $value | quote }} + {{- end }} + {{- if .Values.networkPolicy.ingressNSPodMatchLabels }} + podSelector: + matchLabels: + {{- range $key, $value := .Values.networkPolicy.ingressNSPodMatchLabels }} + {{ $key | quote }}: {{ $value | quote }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.networkPolicy.extraIngress }} + {{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraIngress "context" $ ) | nindent 4 }} + {{- end }} +{{- end }} diff --git a/mongodb-sharded/templates/replicaset-entrypoint-configmap.yaml b/mongodb-sharded/templates/replicaset-entrypoint-configmap.yaml new file mode 100644 index 0000000..3bb98e2 --- /dev/null +++ b/mongodb-sharded/templates/replicaset-entrypoint-configmap.yaml @@ -0,0 +1,39 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-replicaset-entrypoint" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +data: + replicaset-entrypoint.sh: |- + #!/bin/bash + + sleep 5 + + . /liblog.sh + + # Perform adaptations depending on the host name + if [[ $HOSTNAME =~ (.*)-0$ ]]; then + info "Setting node as primary" + export MONGODB_REPLICA_SET_MODE=primary + else + info "Setting node as secondary" + export MONGODB_REPLICA_SET_MODE=secondary + {{- if .Values.auth.usePasswordFiles }} + export MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD_FILE="$MONGODB_ROOT_PASSWORD_FILE" + unset MONGODB_ROOT_PASSWORD_FILE + {{- else }} + export MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD="$MONGODB_ROOT_PASSWORD" + unset MONGODB_ROOT_PASSWORD + {{- end }} + fi + + exec /entrypoint.sh /run.sh diff --git a/mongodb-sharded/templates/secrets.yaml b/mongodb-sharded/templates/secrets.yaml new file mode 100644 index 0000000..479debe --- /dev/null +++ b/mongodb-sharded/templates/secrets.yaml @@ -0,0 +1,29 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if not .Values.auth.existingSecret }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.names.fullname" . }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: mongodb + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +type: Opaque +data: + {{- if .Values.configsvr.external.rootPassword }} + mongodb-root-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "mongodb-root-password" "providedValues" (list "configsvr.external.rootPassword" ) "context" $) }} + {{- else }} + mongodb-root-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "mongodb-root-password" "providedValues" (list "auth.rootPassword" ) "context" $) }} + {{- end }} + {{- if .Values.configsvr.external.replicasetKey }} + mongodb-replica-set-key: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "mongodb-replica-set-key" "providedValues" (list "configsvr.external.replicasetKey" ) "context" $) }} + {{- else }} + mongodb-replica-set-key: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "mongodb-replica-set-key" "providedValues" (list "auth.replicaSetKey" ) "context" $) }} + {{- end }} +{{- end }} diff --git a/mongodb-sharded/templates/serviceaccount.yaml b/mongodb-sharded/templates/serviceaccount.yaml new file mode 100644 index 0000000..5c29bdb --- /dev/null +++ b/mongodb-sharded/templates/serviceaccount.yaml @@ -0,0 +1,22 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- range $component,$serviceAccount:=(dict "common" .Values.common.serviceAccount "mongos" .Values.mongos.serviceAccount "configsvr" .Values.configsvr.serviceAccount "shardsvr-arbiter" .Values.shardsvr.arbiter.serviceAccount "shardsvr" .Values.shardsvr.dataNode.serviceAccount) }} +{{- if $serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "mongodb-sharded.serviceAccountName" (dict "component" $component "value" $serviceAccount "context" $) }} + namespace: {{ include "common.names.namespace" $ | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: {{ $component }} + {{- if or $serviceAccount.annotations $.Values.commonAnnotations }} + {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list $serviceAccount.annotations $.Values.commonAnnotations ) "context" . ) }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ $serviceAccount.automountServiceAccountToken }} +--- +{{- end }} +{{- end }} diff --git a/mongodb-sharded/templates/shard/shard-arbiter-configmap.yaml b/mongodb-sharded/templates/shard/shard-arbiter-configmap.yaml new file mode 100644 index 0000000..d2aa3b9 --- /dev/null +++ b/mongodb-sharded/templates/shard/shard-arbiter-configmap.yaml @@ -0,0 +1,20 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if and .Values.shards .Values.shardsvr.arbiter.replicaCount .Values.shardsvr.arbiter.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-shardsvr-arbiter" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: shardsvr-arbiter + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +data: + mongodb.conf: |- + {{- include "common.tplvalues.render" (dict "value" .Values.shardsvr.arbiter.config "context" $) | nindent 4 }} +{{- end }} diff --git a/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml b/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml new file mode 100644 index 0000000..d2d8e69 --- /dev/null +++ b/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml @@ -0,0 +1,394 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if and .Values.shards .Values.shardsvr.arbiter.replicaCount }} +{{- $replicas := $.Values.shards | int }} +{{- range $i, $e := until $replicas }} +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ printf "%s-shard%d-arbiter" (include "common.names.fullname" $ ) $i }} + namespace: {{ include "common.names.namespace" $ | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: shardsvr-arbiter + {{- if $.Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.shardsvr.arbiter.podLabels $.Values.common.podLabels $.Values.common.podLabels ) "context" $ ) }} + selector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/component: shardsvr-arbiter + podManagementPolicy: {{ $.Values.shardsvr.arbiter.podManagementPolicy }} + updateStrategy: {{- toYaml $.Values.shardsvr.arbiter.updateStrategy | nindent 4 }} + serviceName: {{ printf "%s-headless" (include "common.names.fullname" $) }} + replicas: {{ $.Values.shardsvr.arbiter.replicaCount }} + template: + metadata: + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} + app.kubernetes.io/component: shardsvr-arbiter + shard: {{ $i | quote }} + {{- if or $.Values.common.podAnnotations $.Values.shardsvr.arbiter.podAnnotations $.Values.metrics.enabled }} + annotations: + {{- if or $.Values.common.podAnnotations $.Values.shardsvr.arbiter.podAnnotations }} + {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list $.Values.shardsvr.arbiter.podAnnotations $.Values.common.podAnnotations ) "context" $ ) }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 8 }} + {{- end }} + {{- if $.Values.metrics.enabled }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.metrics.podAnnotations "context" $ ) | nindent 8 }} + {{- end }} + {{- end }} + spec: + serviceAccountName: {{ include "mongodb-sharded.serviceAccountName" (dict "component" "shardsvr-arbiter" "value" $.Values.shardsvr.arbiter.serviceAccount "context" $) }} + {{- if $.Values.shardsvr.arbiter.schedulerName }} + schedulerName: {{ $.Values.shardsvr.arbiter.schedulerName | quote }} + {{- end }} + automountServiceAccountToken: {{ $.Values.shardsvr.arbiter.automountServiceAccountToken }} + {{- if $.Values.shardsvr.arbiter.hostAliases }} + hostAliases: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.hostAliases "context" $) | nindent 8 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.affinity }} + affinity: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.affinity "context" (set $ "arbiterLoopId" $i)) | nindent 8 }} + {{- else }} + affinity: + podAffinity: {{- include "common.affinities.pods" (dict "type" $.Values.shardsvr.arbiter.podAffinityPreset "component" "shardsvr-arbiter" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" $.Values.shardsvr.arbiter.podAntiAffinityPreset "component" "shardsvr-arbiter" "customLabels" $podLabels "context" $) | nindent 10 }} + nodeAffinity: {{- include "common.affinities.nodes" (dict "type" $.Values.shardsvr.arbiter.nodeAffinityPreset.type "key" $.Values.shardsvr.arbiter.nodeAffinityPreset.key "values" $.Values.shardsvr.arbiter.nodeAffinityPreset.values) | nindent 10 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.nodeSelector }} + nodeSelector: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.nodeSelector "context" $) | nindent 8 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.tolerations }} + tolerations: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.tolerations "context" $) | nindent 8 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.priorityClassName }} + priorityClassName: {{ $.Values.shardsvr.arbiter.priorityClassName | quote }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.topologySpreadConstraints "context" $) | nindent 8 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.podSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" $.Values.shardsvr.arbiter.podSecurityContext "context" $) | nindent 8 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ $.Values.shardsvr.arbiter.terminationGracePeriodSeconds }} + {{- end }} + {{- include "mongodb-sharded.imagePullSecrets" $ | nindent 6 }} + {{- if or $.Values.shardsvr.arbiter.initContainers $.Values.common.initContainers }} + initContainers: + {{- with $.Values.shardsvr.arbiter.initContainers }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- with $.Values.common.initContainers }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- end }} + containers: + - name: {{ printf "%s-arbiter" (include "common.names.fullname" $) }} + image: {{ include "mongodb-sharded.image" $ }} + imagePullPolicy: {{ $.Values.image.pullPolicy }} + {{- if $.Values.shardsvr.arbiter.containerSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" $.Values.shardsvr.arbiter.containerSecurityContext "context" $) | nindent 12 }} + {{- end }} + ports: + - containerPort: {{ $.Values.common.containerPorts.mongodb }} + name: mongodb + env: + - name: MONGODB_ENABLE_NUMACTL + value: {{ ternary "yes" "no" $.Values.common.mongodbEnableNumactl | quote }} + - name: BITNAMI_DEBUG + value: {{ ternary "true" "false" (or $.Values.image.debug $.Values.diagnosticMode.enabled) | quote }} + - name: MONGODB_SYSTEM_LOG_VERBOSITY + value: {{ $.Values.common.mongodbSystemLogVerbosity | quote }} + - name: MONGODB_DISABLE_SYSTEM_LOG + {{- if $.Values.common.mongodbDisableSystemLog }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + - name: MONGODB_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MONGODB_INIT_RETRY_ATTEMPTS + value: {{ $.Values.common.mongodbInitRetryAttempts | quote }} + - name: MONGODB_INIT_RETRY_DELAY + value: {{ $.Values.common.mongodbInitRetryDelay | quote }} + - name: MONGODB_SHARDING_MODE + value: "shardsvr" + - name: MONGODB_REPLICA_SET_MODE + value: "arbiter" + - name: MONGODB_PORT_NUMBER + value: {{ $.Values.common.containerPorts.mongodb | quote }} + - name: MONGODB_INITIAL_PRIMARY_HOST + value: {{ printf "%s-shard%d-data-0.%s-headless.%s.svc.%s" (include "common.names.fullname" $ ) $i (include "common.names.fullname" $ ) $.Release.Namespace $.Values.clusterDomain }} + - name: MONGODB_REPLICA_SET_NAME + value: {{ printf "%s-shard-%d" ( include "common.names.fullname" $ ) $i }} + {{- if $.Values.common.useHostnames }} + - name: MONGODB_ADVERTISED_HOSTNAME + value: {{ printf "$(MONGODB_POD_NAME).%s-headless.%s.svc.%s" (include "common.names.fullname" $) (include "common.names.namespace" $) $.Values.clusterDomain }} + {{- end }} + - name: MONGODB_ENABLE_IPV6 + {{- if $.Values.common.mongodbEnableIPv6 }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + - name: MONGODB_ENABLE_DIRECTORY_PER_DB + {{- if $.Values.common.mongodbDirectoryPerDB }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + {{- if $.Values.auth.enabled }} + - name: MONGODB_INITIAL_PRIMARY_ROOT_USER + value: {{ $.Values.auth.rootUser | quote }} + {{- if $.Values.auth.usePasswordFiles }} + - name: MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD_FILE + value: "/bitnami/mongodb/secrets/mongodb-root-password" + - name: MONGODB_REPLICA_SET_KEY_FILE + value: "/bitnami/mongodb/secrets/mongodb-replica-set-key" + {{- else }} + - name: MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" $ }} + key: mongodb-root-password + - name: MONGODB_REPLICA_SET_KEY + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" $ }} + key: mongodb-replica-set-key + {{- end }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.mongodbExtraFlags }} + - name: MONGODB_EXTRA_FLAGS + value: {{ $.Values.shardsvr.arbiter.mongodbExtraFlags | join " " | quote }} + {{- end }} + {{- if $.Values.common.extraEnvVars }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.common.extraEnvVars "context" $ ) | nindent 12 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.extraEnvVars }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.arbiter.extraEnvVars "context" $ ) | nindent 12 }} + {{- end }} + {{- if or $.Values.common.extraEnvVarsCM $.Values.common.extraEnvVarsSecret $.Values.shardsvr.arbiter.extraEnvVarsCM $.Values.shardsvr.arbiter.extraEnvVarsSecret }} + envFrom: + {{- if $.Values.common.extraEnvVarsCM }} + - configMapRef: + name: {{ include "common.tplvalues.render" ( dict "value" $.Values.common.extraEnvVarsCM "context" $ ) }} + {{- end }} + {{- if $.Values.common.extraEnvVarsSecret }} + - secretRef: + name: {{ include "common.tplvalues.render" ( dict "value" $.Values.common.extraEnvVarsSecret "context" $ ) }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.extraEnvVarsCM }} + - configMapRef: + name: {{ include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.arbiter.extraEnvVarsCM "context" $ ) }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.extraEnvVarsSecret }} + - secretRef: + name: {{ include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.arbiter.extraEnvVarsSecret "context" $ ) }} + {{- end }} + {{- end }} + {{- if $.Values.diagnosticMode.enabled }} + command: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.command "context" $) | nindent 12 }} + args: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.args "context" $) | nindent 12 }} + {{- else }} + {{- if $.Values.shardsvr.arbiter.command }} + command: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.command "context" $) | nindent 12 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.args }} + args: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.args "context" $) | nindent 12 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.customLivenessProbe "context" $) | nindent 12 }} + {{- else if $.Values.shardsvr.arbiter.livenessProbe.enabled }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.shardsvr.arbiter.livenessProbe "enabled") "context" $) | nindent 12 }} + exec: + command: + - pgrep + - -f + - mongodb + {{- end }} + {{- if $.Values.shardsvr.arbiter.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.customReadinessProbe "context" $) | nindent 12 }} + {{- else if $.Values.shardsvr.arbiter.readinessProbe.enabled }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.shardsvr.arbiter.readinessProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: mongodb + {{- end }} + {{- if $.Values.shardsvr.arbiter.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.customStartupProbe "context" $) | nindent 12 }} + {{- else if $.Values.shardsvr.arbiter.startupProbe.enabled }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.shardsvr.arbiter.startupProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: mongodb + {{- end }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.lifecycleHooks }} + lifecycle: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.lifecycleHooks "context" $) | nindent 12 }} + {{- end }} + volumeMounts: + - name: empty-dir + mountPath: /tmp + subPath: tmp-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/conf + subPath: app-conf-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/tmp + subPath: app-tmp-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/logs + subPath: app-logs-dir + - name: empty-dir + mountPath: /.mongodb + subPath: app-mongosh-dir + {{- if or $.Values.shardsvr.arbiter.config $.Values.shardsvr.arbiter.configCM }} + - name: config + mountPath: /bitnami/mongodb/conf/ + {{- end }} + {{- if $.Values.auth.usePasswordFiles }} + - name: secrets + mountPath: /bitnami/mongodb/secrets/ + {{- end }} + {{- if $.Values.common.initScriptsCM }} + - name: custom-init-scripts-cm + mountPath: /docker-entrypoint-initdb.d/cm + {{- end }} + {{- if $.Values.common.initScriptsSecret }} + - name: custom-init-scripts-secret + mountPath: /docker-entrypoint-initdb.d/secret + {{- end }} + {{- if $.Values.common.extraVolumeMounts }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.common.extraVolumeMounts "context" $ ) | nindent 12 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.extraVolumeMounts }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.arbiter.extraVolumeMounts "context" $ ) | nindent 12 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.resources }} + resources: {{- toYaml $.Values.shardsvr.arbiter.resources | nindent 12 }} + {{- else if ne $.Values.shardsvr.arbiter.resourcesPreset "none" }} + resources: {{- include "common.resources.preset" (dict "type" $.Values.shardsvr.arbiter.resourcesPreset) | nindent 12 }} + {{- end }} + {{- if $.Values.metrics.enabled }} + - name: metrics + image: {{ include "mongodb-sharded.metrics.image" $ }} + imagePullPolicy: {{ $.Values.metrics.image.pullPolicy | quote }} + {{- if $.Values.metrics.containerSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" $.Values.metrics.containerSecurityContext "context" $) | nindent 12 }} + {{- end }} + env: + {{- if $.Values.auth.enabled }} + - name: MONGODB_ROOT_USER + value: {{ $.Values.auth.rootUser | quote }} + {{- if $.Values.auth.usePasswordFiles }} + - name: MONGODB_ROOT_PASSWORD_FILE + value: "/bitnami/mongodb/secrets/mongodb-root-password" + {{- else }} + - name: MONGODB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" $ }} + key: mongodb-root-password + {{- end }} + {{- end }} + {{- if $.Values.diagnosticMode.enabled }} + command: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.command "context" $) | nindent 12 }} + args: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.args "context" $) | nindent 12 }} + {{- else }} + command: + - sh + - -ec + - |- + #!/bin/sh + {{- if $.Values.auth.usePasswordFiles }} + export MONGODB_ROOT_PASSWORD="$(cat "${MONGODB_ROOT_PASSWORD_FILE}")" + {{- end }} + /bin/mongodb_exporter --collect-all --compatible-mode --web.listen-address ":{{ $.Values.metrics.containerPorts.metrics }}" --mongodb.uri mongodb://$(echo $MONGODB_ROOT_USER):$(echo $MONGODB_ROOT_PASSWORD | sed -r "s/@/%40/g;s/:/%3A/g")@localhost:{{ $.Values.common.containerPorts.mongodb }}/admin{{ ternary "?ssl=true" "" $.Values.metrics.useTLS }} {{ $.Values.metrics.extraArgs }} + {{- end }} + volumeMounts: + - name: empty-dir + mountPath: /tmp + subPath: tmp-dir + {{- if $.Values.auth.usePasswordFiles }} + - name: secrets + mountPath: /bitnami/mongodb/secrets/ + {{- end }} + ports: + - name: metrics + containerPort: {{ $.Values.metrics.containerPorts.metrics }} + {{- if not $.Values.diagnosticMode.enabled }} + {{- if $.Values.metrics.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.metrics.customLivenessProbe "context" $) | nindent 12 }} + {{- else if $.Values.metrics.livenessProbe.enabled }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.metrics.livenessProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: metrics + {{- end }} + {{- if $.Values.metrics.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.metrics.customReadinessProbe "context" $) | nindent 12 }} + {{- else if $.Values.metrics.readinessProbe.enabled }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.metrics.readinessProbe "enabled") "context" $) | nindent 12 }} + httpGet: + path: /metrics + port: metrics + {{- end }} + {{- if $.Values.metrics.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.metrics.customStartupProbe "context" $) | nindent 12 }} + {{- else if $.Values.metrics.startupProbe.enabled }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.metrics.startupProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: metrics + {{- end }} + {{- end }} + {{- if $.Values.metrics.resources }} + resources: {{ toYaml $.Values.metrics.resources | nindent 12 }} + {{- else if ne $.Values.metrics.resourcesPreset "none" }} + resources: {{- include "common.resources.preset" (dict "type" $.Values.metrics.resourcesPreset) | nindent 12 }} + {{- end }} + {{- end }} + {{- with $.Values.shardsvr.arbiter.sidecars }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- with $.Values.common.sidecars }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + volumes: + - name: empty-dir + emptyDir: {} + {{- if or $.Values.shardsvr.arbiter.config $.Values.shardsvr.arbiter.configCM }} + - name: config + configMap: + name: {{ include "mongodb-sharded.shardsvr.arbiter.configCM" $ }} + {{- end }} + {{- if $.Values.auth.usePasswordFiles }} + - name: secrets + secret: + secretName: {{ include "mongodb-sharded.secret" $ }} + {{- end }} + {{- if $.Values.common.initScriptsCM }} + - name: custom-init-scripts-cm + configMap: + name: {{ include "mongodb-sharded.initScriptsCM" $ }} + defaultMode: 0755 + {{- end }} + {{- if $.Values.common.initScriptsSecret }} + - name: custom-init-scripts-secret + secret: + secretName: {{ include "mongodb-sharded.initScriptsSecret" $ }} + defaultMode: 0755 + {{- end }} + {{- if $.Values.common.extraVolumes }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.common.extraVolumes "context" $ ) | nindent 8 }} + {{- end }} + {{- if $.Values.shardsvr.arbiter.extraVolumes }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.arbiter.extraVolumes "context" $ ) | nindent 8 }} + {{- end }} +{{- if lt $i (sub $replicas 1) }} +--- +{{- end }} +{{- end }} +{{- end }} diff --git a/mongodb-sharded/templates/shard/shard-data-configmap.yaml b/mongodb-sharded/templates/shard/shard-data-configmap.yaml new file mode 100644 index 0000000..bcc099e --- /dev/null +++ b/mongodb-sharded/templates/shard/shard-data-configmap.yaml @@ -0,0 +1,20 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if and .Values.shards .Values.shardsvr.dataNode.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-shardsvr-data" (include "common.names.fullname" .) }} + namespace: {{ include "common.names.namespace" . | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: shardsvr + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +data: + mongodb.conf: |- + {{- include "common.tplvalues.render" (dict "value" .Values.shardsvr.dataNode.config "context" $) | nindent 4 }} +{{- end }} diff --git a/mongodb-sharded/templates/shard/shard-data-poddisruptionbudget.yaml b/mongodb-sharded/templates/shard/shard-data-poddisruptionbudget.yaml new file mode 100644 index 0000000..65290d0 --- /dev/null +++ b/mongodb-sharded/templates/shard/shard-data-poddisruptionbudget.yaml @@ -0,0 +1,33 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if and .Values.shards .Values.shardsvr.dataNode.pdb.create }} +{{- $replicas := .Values.shards | int }} +{{- range $i, $e := until $replicas }} +kind: PodDisruptionBudget +apiVersion: {{ include "common.capabilities.policy.apiVersion" $ }} +metadata: + name: {{ printf "%s-shard%d-data" (include "common.names.fullname" $ ) $i }} + namespace: {{ include "common.names.namespace" $ | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: shardsvr + {{- if $.Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.shardsvr.arbiter.podLabels $.Values.common.podLabels $.Values.common.podLabels ) "context" $ ) }} + selector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/component: shardsvr + shard: {{ $i | quote }} + {{- if $.Values.shardsvr.dataNode.pdb.minAvailable }} + minAvailable: {{ $.Values.shardsvr.dataNode.pdb.minAvailable | int }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.pdb.maxUnavailable }} + maxUnavailable: {{ $.Values.shardsvr.dataNode.pdb.maxUnavailable | int }} + {{- end }} +--- +{{- end -}} +{{- end -}} diff --git a/mongodb-sharded/templates/shard/shard-data-podmonitor.yaml b/mongodb-sharded/templates/shard/shard-data-podmonitor.yaml new file mode 100644 index 0000000..5689b03 --- /dev/null +++ b/mongodb-sharded/templates/shard/shard-data-podmonitor.yaml @@ -0,0 +1,42 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if and .Values.shards .Values.metrics.enabled .Values.metrics.podMonitor.enabled }} +{{- $replicas := .Values.shards | int }} +{{- range $i, $e := until $replicas }} +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ printf "%s-shard%d-data" (include "common.names.fullname" $ ) $i }} + namespace: {{ default (include "common.names.namespace" $) $.Values.metrics.podMonitor.namespace | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: shardsvr + {{- if $.Values.metrics.podMonitor.additionalLabels }} + {{- include "common.tplvalues.render" (dict "value" $.Values.metrics.podMonitor.additionalLabels "context" $) | nindent 4 }} + {{- end }} + {{- if $.Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + podMetricsEndpoints: + - port: metrics + path: /metrics + {{- if $.Values.metrics.podMonitor.interval }} + interval: {{ $.Values.metrics.podMonitor.interval }} + {{- end }} + {{- if $.Values.metrics.podMonitor.scrapeTimeout }} + scrapeTimeout: {{ $.Values.metrics.podMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ $.Release.Namespace }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.shardsvr.arbiter.podLabels $.Values.common.podLabels $.Values.common.podLabels ) "context" $ ) }} + selector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/component: shardsvr + shard: {{ $i | quote }} +--- +{{- end }} +{{- end }} diff --git a/mongodb-sharded/templates/shard/shard-data-statefulset.yaml b/mongodb-sharded/templates/shard/shard-data-statefulset.yaml new file mode 100644 index 0000000..0f6d8a0 --- /dev/null +++ b/mongodb-sharded/templates/shard/shard-data-statefulset.yaml @@ -0,0 +1,480 @@ +{{- /* +Copyright Broadcom, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if .Values.shards }} +{{- $replicas := .Values.shards | int }} +{{- range $i, $e := until $replicas }} +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ printf "%s-shard%d-data" (include "common.names.fullname" $ ) $i }} + namespace: {{ include "common.names.namespace" $ | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: shardsvr + {{- if $.Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.shardsvr.dataNode.podLabels $.Values.common.podLabels $.Values.common.podLabels ) "context" $ ) }} + selector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/component: shardsvr + podManagementPolicy: {{ $.Values.shardsvr.dataNode.podManagementPolicy }} + updateStrategy: {{- toYaml $.Values.shardsvr.dataNode.updateStrategy | nindent 4 }} + serviceName: {{ printf "%s-headless" (include "common.names.fullname" $) }} + replicas: {{ $.Values.shardsvr.dataNode.replicaCount }} + template: + metadata: + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} + app.kubernetes.io/component: shardsvr + shard: {{ $i | quote }} + {{- if or $.Values.common.podAnnotations $.Values.shardsvr.dataNode.podAnnotations $.Values.metrics.enabled }} + annotations: + {{- if or $.Values.common.podAnnotations $.Values.shardsvr.dataNode.podAnnotations }} + {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list $.Values.shardsvr.dataNode.podAnnotations $.Values.common.podAnnotations ) "context" $ ) }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 8 }} + {{- end }} + {{- if $.Values.metrics.enabled }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.metrics.podAnnotations "context" $ ) | nindent 8 }} + {{- end }} + {{- end }} + spec: + {{- if $.Values.shardsvr.dataNode.schedulerName }} + schedulerName: {{ $.Values.shardsvr.dataNode.schedulerName | quote }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.affinity }} + affinity: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.affinity "context" (set $ "dataNodeLoopId" $i)) | nindent 8 }} + {{- else }} + affinity: + podAffinity: {{- include "common.affinities.pods" (dict "type" $.Values.shardsvr.dataNode.podAffinityPreset "component" "shardsvr" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" $.Values.shardsvr.dataNode.podAntiAffinityPreset "component" "shardsvr" "customLabels" $podLabels "context" $) | nindent 10 }} + nodeAffinity: {{- include "common.affinities.nodes" (dict "type" $.Values.shardsvr.dataNode.nodeAffinityPreset.type "key" $.Values.shardsvr.dataNode.nodeAffinityPreset.key "values" $.Values.shardsvr.dataNode.nodeAffinityPreset.values) | nindent 10 }} + {{- end }} + automountServiceAccountToken: {{ $.Values.shardsvr.dataNode.automountServiceAccountToken }} + {{- if $.Values.shardsvr.dataNode.hostAliases }} + hostAliases: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.hostAliases "context" $) | nindent 8 }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.nodeSelector }} + nodeSelector: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.nodeSelector "context" (set $ "dataNodeLoopId" $i)) | nindent 8 }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.tolerations }} + tolerations: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.tolerations "context" (set $ "dataNodeLoopId" $i)) | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "mongodb-sharded.serviceAccountName" (dict "component" "shardsvr" "value" $.Values.shardsvr.dataNode.serviceAccount "context" $) }} + {{- if $.Values.shardsvr.dataNode.priorityClassName }} + priorityClassName: {{ $.Values.shardsvr.dataNode.priorityClassName | quote }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.topologySpreadConstraints "context" $) | nindent 8 }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.podSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" $.Values.shardsvr.dataNode.podSecurityContext "context" $) | nindent 8 }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ $.Values.shardsvr.dataNode.terminationGracePeriodSeconds }} + {{- end }} + {{- include "mongodb-sharded.imagePullSecrets" $ | nindent 6 }} + initContainers: + {{- if and $.Values.volumePermissions.enabled $.Values.shardsvr.persistence.enabled }} + - name: volume-permissions + image: {{ include "mongodb-sharded.volumePermissions.image" $ }} + imagePullPolicy: {{ $.Values.volumePermissions.image.pullPolicy | quote }} + command: + - /bin/bash + args: + - -ec + - | + mkdir -p {{ $.Values.shardsvr.persistence.mountPath }}{{- if $.Values.shardsvr.persistence.subPath }}/{{ include "common.tplvalues.render" (dict "value" $.Values.shardsvr.persistence.subPath "context" $) }}{{- end }} + chown {{ $.Values.shardsvr.dataNode.containerSecurityContext.runAsUser }}:{{ $.Values.shardsvr.dataNode.podSecurityContext.fsGroup }} {{ $.Values.shardsvr.persistence.mountPath }}{{- if $.Values.shardsvr.persistence.subPath }}/{{ include "common.tplvalues.render" (dict "value" $.Values.shardsvr.persistence.subPath "context" $) }}{{- end }} + find {{ $.Values.shardsvr.persistence.mountPath }} -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | xargs -r chown -R {{ $.Values.shardsvr.dataNode.containerSecurityContext.runAsUser }}:{{ $.Values.shardsvr.dataNode.podSecurityContext.fsGroup }} + securityContext: + runAsUser: 0 + {{- if $.Values.volumePermissions.resources }} + resources: {{ toYaml $.Values.volumePermissions.resources | nindent 12 }} + {{- else if ne $.Values.volumePermissions.resourcesPreset "none" }} + resources: {{- include "common.resources.preset" (dict "type" $.Values.volumePermissions.resourcesPreset) | nindent 12 }} + {{- end }} + volumeMounts: + - name: empty-dir + mountPath: /tmp + subPath: tmp-dir + - name: datadir + mountPath: {{ $.Values.shardsvr.persistence.mountPath }} + {{- if $.Values.shardsvr.persistence.subPath }} + subPath: {{ include "common.tplvalues.render" (dict "value" $.Values.shardsvr.persistence.subPath "context" $) }} + {{- end }} + {{- end }} + {{- with $.Values.shardsvr.dataNode.initContainers }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- with $.Values.common.initContainers }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- include "mongodb-sharded.initContainer.logDir" $ | nindent 8 }} + containers: + - name: mongodb + image: {{ include "mongodb-sharded.image" $ }} + imagePullPolicy: {{ $.Values.image.pullPolicy }} + {{- if $.Values.shardsvr.dataNode.containerSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" $.Values.shardsvr.dataNode.containerSecurityContext "context" $) | nindent 12 }} + {{- end }} + ports: + - containerPort: {{ $.Values.common.containerPorts.mongodb }} + name: mongodb + env: + - name: GLIBC_TUNABLES + value: glibc.pthread.rseq=0 + - name: MONGODB_ENABLE_NUMACTL + value: {{ ternary "yes" "no" $.Values.common.mongodbEnableNumactl | quote }} + - name: BITNAMI_DEBUG + value: {{ ternary "true" "false" (or $.Values.image.debug $.Values.diagnosticMode.enabled) | quote }} + - name: MONGODB_SYSTEM_LOG_VERBOSITY + value: {{ $.Values.common.mongodbSystemLogVerbosity | quote }} + - name: MONGODB_INIT_RETRY_ATTEMPTS + value: {{ $.Values.common.mongodbInitRetryAttempts | quote }} + - name: MONGODB_INIT_RETRY_DELAY + value: {{ $.Values.common.mongodbInitRetryDelay | quote }} + - name: MONGODB_DISABLE_SYSTEM_LOG + {{- if $.Values.common.mongodbDisableSystemLog }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + - name: MONGODB_PORT_NUMBER + value: {{ $.Values.common.containerPorts.mongodb | quote }} + - name: MONGODB_SHARDING_MODE + value: "shardsvr" + - name: MONGODB_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MONGODB_MONGOS_HOST + value: {{ include "mongodb-sharded.serviceName" $ }} + - name: MONGODB_MONGOS_PORT_NUMBER + value: {{ $.Values.service.ports.mongodb | quote }} + - name: MONGODB_INITIAL_PRIMARY_HOST + value: {{ printf "%s-shard%d-data-0.%s-headless.%s.svc.%s" (include "common.names.fullname" $ ) $i (include "common.names.fullname" $ ) $.Release.Namespace $.Values.clusterDomain }} + - name: MONGODB_REPLICA_SET_NAME + value: {{ printf "%s-shard-%d" ( include "common.names.fullname" $ ) $i }} + {{- if $.Values.common.useHostnames }} + - name: MONGODB_ADVERTISED_HOSTNAME + value: {{ printf "$(MONGODB_POD_NAME).%s-headless.%s.svc.%s" (include "common.names.fullname" $) (include "common.names.namespace" $) $.Values.clusterDomain }} + {{- end }} + {{- if $.Values.auth.enabled }} + - name: MONGODB_ROOT_USER + value: {{ $.Values.auth.rootUser | quote }} + {{- if $.Values.auth.usePasswordFiles }} + - name: MONGODB_ROOT_PASSWORD_FILE + value: "/bitnami/mongodb/secrets/mongodb-root-password" + - name: MONGODB_REPLICA_SET_KEY_FILE + value: "/bitnami/mongodb/secrets/mongodb-replica-set-key" + {{- else }} + - name: MONGODB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" $ }} + key: mongodb-root-password + - name: MONGODB_REPLICA_SET_KEY + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" $ }} + key: mongodb-replica-set-key + {{- end }} + {{- end }} + - name: MONGODB_ENABLE_IPV6 + {{- if $.Values.common.mongodbEnableIPv6 }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + - name: MONGODB_ENABLE_DIRECTORY_PER_DB + {{- if $.Values.common.mongodbDirectoryPerDB }} + value: "yes" + {{- else }} + value: "no" + {{- end }} + {{- if $.Values.shardsvr.dataNode.mongodbExtraFlags }} + - name: MONGODB_EXTRA_FLAGS + value: {{ $.Values.shardsvr.dataNode.mongodbExtraFlags | join " " | quote }} + {{- end }} + {{- if $.Values.common.extraEnvVars }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.common.extraEnvVars "context" $ ) | nindent 12 }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.extraEnvVars }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.dataNode.extraEnvVars "context" $ ) | nindent 12 }} + {{- end }} + {{- if or $.Values.common.extraEnvVarsCM $.Values.common.extraEnvVarsSecret $.Values.shardsvr.dataNode.extraEnvVarsCM $.Values.shardsvr.dataNode.extraEnvVarsSecret }} + envFrom: + {{- if $.Values.common.extraEnvVarsCM }} + - configMapRef: + name: {{ include "common.tplvalues.render" ( dict "value" $.Values.common.extraEnvVarsCM "context" $ ) }} + {{- end }} + {{- if $.Values.common.extraEnvVarsSecret }} + - secretRef: + name: {{ include "common.tplvalues.render" ( dict "value" $.Values.common.extraEnvVarsSecret "context" $ ) }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.extraEnvVarsCM }} + - configMapRef: + name: {{ include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.dataNode.extraEnvVarsCM "context" $ ) }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.extraEnvVarsSecret }} + - secretRef: + name: {{ include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.dataNode.extraEnvVarsSecret "context" $ ) }} + {{- end }} + {{- end }} + {{- if $.Values.diagnosticMode.enabled }} + command: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.command "context" $) | nindent 12 }} + args: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.args "context" $) | nindent 12 }} + {{- else }} + {{- if $.Values.shardsvr.dataNode.command }} + command: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.command "context" $) | nindent 12 }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.args }} + args: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.args "context" $) | nindent 12 }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.customLivenessProbe "context" $) | nindent 12 }} + {{- else if $.Values.shardsvr.dataNode.livenessProbe.enabled }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.shardsvr.dataNode.livenessProbe "enabled") "context" $) | nindent 12 }} + exec: + command: + - pgrep + - mongod + {{- end }} + {{- if $.Values.shardsvr.dataNode.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.customReadinessProbe "context" $) | nindent 12 }} + {{- else if $.Values.shardsvr.dataNode.readinessProbe.enabled }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.shardsvr.dataNode.readinessProbe "enabled") "context" $) | nindent 12 }} + exec: + command: + - /bin/sh + - -c + - mongosh --port $MONGODB_PORT_NUMBER --eval "db.adminCommand('ping')" + {{- end }} + {{- if $.Values.shardsvr.dataNode.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.customStartupProbe "context" $) | nindent 12 }} + {{- else if $.Values.shardsvr.dataNode.startupProbe.enabled }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.shardsvr.dataNode.startupProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: mongodb + {{- end }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.lifecycleHooks }} + lifecycle: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.dataNode.lifecycleHooks "context" $) | nindent 12 }} + {{- end }} + volumeMounts: + - name: empty-dir + mountPath: /tmp + subPath: tmp-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/conf + subPath: app-conf-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/tmp + subPath: app-tmp-dir + - name: empty-dir + mountPath: /opt/bitnami/mongodb/logs + subPath: app-logs-dir + - name: empty-dir + mountPath: /.mongodb + subPath: app-mongosh-dir + - name: replicaset-entrypoint-configmap + mountPath: /entrypoint + - name: datadir + mountPath: {{ $.Values.shardsvr.persistence.mountPath }} + {{- if $.Values.shardsvr.persistence.subPath }} + subPath: {{ include "common.tplvalues.render" (dict "value" $.Values.shardsvr.persistence.subPath "context" $) }} + {{- end }} + {{- if or $.Values.shardsvr.dataNode.config $.Values.shardsvr.dataNode.configCM }} + - name: config + mountPath: /bitnami/mongodb/conf/ + {{- end }} + {{- if $.Values.auth.usePasswordFiles }} + - name: secrets + mountPath: /bitnami/mongodb/secrets/ + {{- end }} + {{- if $.Values.common.initScriptsCM }} + - name: custom-init-scripts-cm + mountPath: /docker-entrypoint-initdb.d/cm + {{- end }} + {{- if $.Values.common.initScriptsSecret }} + - name: custom-init-scripts-secret + mountPath: /docker-entrypoint-initdb.d/secret + {{- end }} + {{- if $.Values.common.extraVolumeMounts }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.common.extraVolumeMounts "context" $ ) | nindent 12 }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.extraVolumeMounts }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.dataNode.extraVolumeMounts "context" $ ) | nindent 12 }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.resources }} + resources: {{- toYaml $.Values.shardsvr.dataNode.resources | nindent 12 }} + {{- else if ne $.Values.shardsvr.dataNode.resourcesPreset "none" }} + resources: {{- include "common.resources.preset" (dict "type" $.Values.shardsvr.dataNode.resourcesPreset) | nindent 12 }} + {{- end }} + {{- if $.Values.pmmMetrics.enabled | default false }} + {{- include "mongodb-sharded.pmmClientContainer" $ | nindent 8 }} + {{- end }} + {{- if $.Values.metrics.enabled }} + - name: metrics + image: {{ include "mongodb-sharded.metrics.image" $ }} + imagePullPolicy: {{ $.Values.metrics.image.pullPolicy | quote }} + {{- if $.Values.metrics.containerSecurityContext.enabled }} + securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" $.Values.metrics.containerSecurityContext "context" $) | nindent 12 }} + {{- end }} + env: + {{- if $.Values.auth.enabled }} + - name: MONGODB_ROOT_USER + value: {{ $.Values.auth.rootUser | quote }} + {{- if $.Values.auth.usePasswordFiles }} + - name: MONGODB_ROOT_PASSWORD_FILE + value: "/bitnami/mongodb/secrets/mongodb-root-password" + {{- else }} + - name: MONGODB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "mongodb-sharded.secret" $ }} + key: mongodb-root-password + {{- end }} + {{- end }} + {{- if $.Values.diagnosticMode.enabled }} + command: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.command "context" $) | nindent 12 }} + args: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.args "context" $) | nindent 12 }} + {{- else }} + command: + - sh + - -ec + - |- + #!/bin/sh + {{- if $.Values.auth.usePasswordFiles }} + export MONGODB_ROOT_PASSWORD="$(cat "${MONGODB_ROOT_PASSWORD_FILE}")" + {{- end }} + /bin/mongodb_exporter --collect-all --compatible-mode --web.listen-address ":{{ $.Values.metrics.containerPorts.metrics }}" --mongodb.uri mongodb://$(echo $MONGODB_ROOT_USER):$(echo $MONGODB_ROOT_PASSWORD | sed -r "s/@/%40/g;s/:/%3A/g")@localhost:{{ $.Values.common.containerPorts.mongodb }}/admin{{ ternary "?ssl=true" "" $.Values.metrics.useTLS }} {{ $.Values.metrics.extraArgs }} + {{- end }} + volumeMounts: + - name: empty-dir + mountPath: /tmp + subPath: tmp-dir + {{- if $.Values.auth.usePasswordFiles }} + - name: secrets + mountPath: /bitnami/mongodb/secrets/ + {{- end }} + ports: + - name: metrics + containerPort: {{ $.Values.metrics.containerPorts.metrics }} + {{- if not $.Values.diagnosticMode.enabled }} + {{- if $.Values.metrics.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.metrics.customLivenessProbe "context" $) | nindent 12 }} + {{- else if $.Values.metrics.livenessProbe.enabled }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.metrics.livenessProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: metrics + {{- end }} + {{- if $.Values.metrics.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.metrics.customReadinessProbe "context" $) | nindent 12 }} + {{- else if $.Values.metrics.readinessProbe.enabled }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.metrics.readinessProbe "enabled") "context" $) | nindent 12 }} + httpGet: + path: /metrics + port: metrics + {{- end }} + {{- if $.Values.metrics.customStartupProbe }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.metrics.customStartupProbe "context" $) | nindent 12 }} + {{- else if $.Values.metrics.startupProbe.enabled }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.metrics.startupProbe "enabled") "context" $) | nindent 12 }} + tcpSocket: + port: metrics + {{- end }} + {{- end }} + {{- if $.Values.metrics.resources }} + resources: {{ toYaml $.Values.metrics.resources | nindent 12 }} + {{- else if ne $.Values.metrics.resourcesPreset "none" }} + resources: {{- include "common.resources.preset" (dict "type" $.Values.metrics.resourcesPreset) | nindent 12 }} + {{- end }} + {{- end }} + {{- with $.Values.shardsvr.dataNode.sidecars }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + {{- with $.Values.common.sidecars }} + {{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }} + {{- end }} + volumes: + - name: empty-dir + emptyDir: {} + - name: replicaset-entrypoint-configmap + configMap: + name: {{ printf "%s-replicaset-entrypoint" (include "common.names.fullname" $) }} + {{- if $.Values.auth.usePasswordFiles }} + - name: secrets + secret: + secretName: {{ include "mongodb-sharded.secret" $ }} + {{- end }} + {{- if $.Values.common.initScriptsCM }} + - name: custom-init-scripts-cm + configMap: + name: {{ include "mongodb-sharded.initScriptsCM" $ }} + defaultMode: 0755 + {{- end }} + {{- if $.Values.common.initScriptsSecret }} + - name: custom-init-scripts-secret + secret: + secretName: {{ include "mongodb-sharded.initScriptsSecret" $ }} + defaultMode: 0755 + {{- end }} + {{- if or $.Values.shardsvr.dataNode.config $.Values.shardsvr.dataNode.configCM }} + - name: config + configMap: + name: {{ include "mongodb-sharded.shardsvr.dataNode.configCM" $ }} + {{- end }} + {{- if $.Values.common.extraVolumes }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.common.extraVolumes "context" $ ) | nindent 8 }} + {{- end }} + {{- if $.Values.shardsvr.dataNode.extraVolumes }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.dataNode.extraVolumes "context" $ ) | nindent 8 }} + {{- end }} + {{- if not $.Values.shardsvr.persistence.enabled }} + - name: datadir + emptyDir: {} + {{- else }} + {{- if $.Values.shardsvr.persistentVolumeClaimRetentionPolicy.enabled }} + persistentVolumeClaimRetentionPolicy: + whenDeleted: {{ $.Values.shardsvr.persistentVolumeClaimRetentionPolicy.whenDeleted }} + whenScaled: {{ $.Values.shardsvr.persistentVolumeClaimRetentionPolicy.whenScaled }} + {{- end }} + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: datadir + {{- if or $.Values.shardsvr.persistence.annotations $.Values.commonAnnotations $.Values.shardsvr.persistence.resourcePolicy }} + {{- if or $.Values.commonAnnotations $.Values.shardsvr.persistence.annotations $.Values.shardsvr.persistence.resourcePolicy }} + annotations: + {{- if $.Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 10 }} + {{- end }} + {{- if $.Values.shardsvr.persistence.annotations }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.persistence.annotations "context" $) | nindent 10 }} + {{- end }} + {{- end }} + {{- end }} + spec: + accessModes: + {{- range $.Values.shardsvr.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ $.Values.shardsvr.persistence.size | quote }} + {{- with $.Values.shardsvr.persistence.selector }} + selector: + {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.persistence.selector "context" (merge $ (dict "Index" $i))) | nindent 10 }} + {{- end }} + {{- include "common.storage.class" (dict "persistence" $.Values.shardsvr.persistence "global" $.Values.global) | nindent 8 }} + {{- end }} +{{- if lt $i (sub $replicas 1) }} +--- +{{- end }} +{{- end }} +{{- end }} diff --git a/mongodb-sharded/values.tp.yaml b/mongodb-sharded/values.tp.yaml new file mode 100644 index 0000000..79fa1fd --- /dev/null +++ b/mongodb-sharded/values.tp.yaml @@ -0,0 +1,86 @@ +global: + defaultStorageClass: "thin-disk" + security: + allowInsecureImages: true # we want to use our custom harbor images derived from bitnami images + +common: + mongodbSystemLogVerbosity: 0 + +image: + registry: "" + repository: harbor01.gt-dev.sk/edesk/mongodb-sharded + tag: 8.0.13-debian-12-r0 + debug: true + +volumePermissions: + registry: "" + repository: harbor01.gt-dev.sk/edesk/os-shell + tag: os-shell:12-debian-12-r51 + +service: + type: LoadBalancer + +shards: 1 + +configsvr: + replicaCount: 3 + resources: + requests: + cpu: 100m + memory: 500Mi + limits: + cpu: 1 + memory: 4Gi + persistence: + size: 5Gi + +mongos: + replicaCount: 3 + resources: + requests: + cpu: 100m + memory: 500Mi + limits: + cpu: 2 + memory: 4Gi + +shardsvr: + dataNode: + startupProbe: + enabled: true + initialDelaySeconds: 60 # Give mongod 60s before first check + periodSeconds: 30 # Check every 30s instead of 10s + timeoutSeconds: 10 # Allow 10s per check + failureThreshold: 10 # 10 failures = 5 minutes total + livenessProbe: + enabled: true + initialDelaySeconds: 60 + periodSeconds: 30 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + periodSeconds: 10 + replicaCount: 3 + resources: + requests: + cpu: 100m + memory: 500Mi + limits: + cpu: 2 + memory: 4Gi + persistence: + size: 5Gi + +pmmMetrics: + enabled: false + image: + repository: harbor01.gt-dev.sk/percona/pmm-client + tag: 3.4.0 + pmm_agent_server_address: "monitoring-service.pmm-server.svc.cluster.local:443" + pmm_agent_server_insecure_tls: "1" + pmm_agent_setup_force: "1" + pmm_agent_config_file: "/usr/local/percona/pmm/config/pmm-agent.yaml" + pmm_agent_prerun_script: "pmm-admin config --server-url=https://$PMM_AGENT_SERVER_USERNAME:$PMM_AGENT_SERVER_PASSWORD@$PMM_AGENT_SERVER_ADDRESS --server-insecure-tls && pmm-admin add mongodb --host=localhost --username=$PMM_MONGODB-USERNAME --password=$PMM_MONGODB-PASSWORD --enable-all-collectors --cluster=mongodb-load-cluster" + +auth: + existingSecret: mongodb-mongodb-sharded \ No newline at end of file diff --git a/mongodb-sharded/values.tp_v2.yaml b/mongodb-sharded/values.tp_v2.yaml new file mode 100644 index 0000000..c103846 --- /dev/null +++ b/mongodb-sharded/values.tp_v2.yaml @@ -0,0 +1,124 @@ +global: + defaultStorageClass: "thin-disk" + security: + allowInsecureImages: true + +common: + mongodbSystemLogVerbosity: 0 + +image: + registry: "" + repository: harbor01.gt-dev.sk/edesk/mongodb-sharded + tag: 8.0.13-debian-12-r0 + debug: true + +pmmMetrics: + enabled: true + customSidecarSecret: "mongodb-pmm-credentials" + image: + repository: harbor01.gt-dev.sk/percona/pmm-client + tag: 3.7.0 + pmm_agent_server_address: "192.168.202.50:443" + pmm_agent_server_insecure_tls: "1" + pmm_agent_setup_force: "1" + pmm_agent_prerun_script: | + pmm-admin config --server-url=https://$PMM_AGENT_SERVER_USERNAME:$PMM_AGENT_SERVER_PASSWORD@$PMM_AGENT_SERVER_ADDRESS --server-insecure-tls + pmm-admin add mongodb --host=localhost --username=$PMM_MONGODB_USERNAME --password=$PMM_MONGODB_PASSWORD --enable-all-collectors --cluster=mongodb-load-cluster + +shards: 1 + +configsvr: + replicaCount: 3 + resources: + requests: + cpu: 100m + memory: 500Mi + limits: + cpu: 1 + memory: 4Gi + persistence: + size: 5Gi + sidecars: + - name: pbm-agent + image: harbor01.gt-dev.sk/edesk/percona-backup-mongodb:2.3.0 + env: + - name: MONGODB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: mongodb-mongodb-sharded + key: mongodb-root-password + - name: PBM_MONGODB_URI + value: "mongodb://root:$(MONGODB_ROOT_PASSWORD)@localhost:27017/?authSource=admin" + - name: PBM_STORAGE_TYPE + value: "s3" + - name: PBM_S3_ENDPOINT + value: "http://10.20.1.115/" + - name: PBM_S3_BUCKET + value: "edesks3bck" + - name: PBM_S3_ACCESS_KEY_ID + value: "nJAWbcQtu9c7MRYVjEAp" + - name: PBM_S3_SECRET_ACCESS_KEY + value: "fWHCEEmwmAnWRTMSP9FOOFZURcGNmB8WJTBCQjBZ" + - name: PBM_S3_REGION + value: "us-east-1" + volumeMounts: + - name: datadir + mountPath: /bitnami/mongodb + +shardsvr: + dataNode: + replicaCount: 3 + resources: + limits: + cpu: 2 + memory: 4Gi + requests: + cpu: 100m + memory: 500Mi + sidecars: + - name: pbm-agent + image: harbor01.gt-dev.sk/edesk/percona-backup-mongodb:2.3.0 + env: + - name: MONGODB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: mongodb-mongodb-sharded + key: mongodb-root-password + - name: PBM_MONGODB_URI + value: "mongodb://root:$(MONGODB_ROOT_PASSWORD)@localhost:27017/?authSource=admin" + - name: PBM_STORAGE_TYPE + value: "s3" + - name: PBM_S3_ENDPOINT + value: "http://10.20.1.115/" + - name: PBM_S3_BUCKET + value: "edesks3bck" + - name: PBM_S3_ACCESS_KEY_ID + value: "nJAWbcQtu9c7MRYVjEAp" + - name: PBM_S3_SECRET_ACCESS_KEY + value: "fWHCEEmwmAnWRTMSP9FOOFZURcGNmB8WJTBCQjBZ" + - name: PBM_S3_REGION + value: "us-east-1" + volumeMounts: + - name: datadir + mountPath: /bitnami/mongodb + startupProbe: + enabled: true + initialDelaySeconds: 60 + periodSeconds: 30 + livenessProbe: + enabled: true + readinessProbe: + enabled: true + +mongos: + replicaCount: 3 + resources: + requests: + cpu: 100m + memory: 500Mi + limits: + cpu: 2 + memory: 4Gi + +auth: + existingSecret: mongodb-mongodb-sharded diff --git a/mongodb-sharded/values.yaml b/mongodb-sharded/values.yaml new file mode 100644 index 0000000..46b6240 --- /dev/null +++ b/mongodb-sharded/values.yaml @@ -0,0 +1,1949 @@ +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 + +## @section Global parameters +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass +## + +## @param global.imageRegistry Global Docker image registry +## @param global.imagePullSecrets Global Docker registry secret names as an array +## @param global.defaultStorageClass Global default StorageClass for Persistent Volume(s) +## @param global.storageClass DEPRECATED: use global.defaultStorageClass instead +## +global: + imageRegistry: "" + ## E.g. + ## imagePullSecrets: + ## - myRegistryKeySecretName + ## + imagePullSecrets: [] + defaultStorageClass: "" + storageClass: "" + ## Security parameters + ## + security: + ## @param global.security.allowInsecureImages Allows skipping image verification + allowInsecureImages: false + ## Compatibility adaptations for Kubernetes platforms + ## + compatibility: + ## Compatibility adaptations for Openshift + ## + openshift: + ## @param global.compatibility.openshift.adaptSecurityContext Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) + ## + adaptSecurityContext: auto +## @section Common parameters +## + +## @param kubeVersion Override Kubernetes version +## +kubeVersion: "" +## @param nameOverride String to partially override common.names.name +## +nameOverride: "" +## @param fullnameOverride String to fully override common.names.fullname +## +fullnameOverride: "" +## @param namespaceOverride String to fully override common.names.namespace +## +namespaceOverride: "" +## @param commonLabels Labels to add to all deployed objects +## +commonLabels: {} +## @param commonAnnotations Annotations to add to all deployed objects +## +commonAnnotations: {} +## @param clusterDomain Kubernetes cluster domain name +## +clusterDomain: cluster.local +## @param extraDeploy Array of extra objects to deploy with the release +## +extraDeploy: [] +## Enable diagnostic mode in the deployment +## +diagnosticMode: + ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden) + ## + enabled: false + ## @param diagnosticMode.command Command to override all containers in the deployment + ## + command: + - sleep + ## @param diagnosticMode.args Args to override all containers in the deployment + ## + args: + - infinity +## @section MongoDB(®) Sharded parameters +## + +## Bitnami MongoDB(®) Sharded image version +## ref: https://hub.docker.com/r/bitnami/mongodb-sharded/tags/ +## @param image.registry [default: REGISTRY_NAME] MongoDB(®) Sharded image registry +## @param image.repository [default: REPOSITORY_NAME/mongodb-sharded] MongoDB(®) Sharded Image name +## @skip image.tag MongoDB(®) Sharded image tag (immutable tags are recommended) +## @param image.digest MongoDB(®) Sharded image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag +## @param image.pullPolicy MongoDB(®) Sharded image pull policy +## @param image.pullSecrets Specify docker-registry secret names as an array +## @param image.debug Specify if debug logs should be enabled +## +image: + registry: docker.io + repository: bitnami/mongodb-sharded + tag: 8.0.13-debian-12-r0 + digest: "" + ## Specify a imagePullPolicy + ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## e.g: + ## pullSecrets: + ## - myRegistryKeySecretName + ## + pullSecrets: [] + ## Set to true if you would like to see extra information on logs + ## + debug: false +## MongoDB(®) Authentication parameters +## +auth: + ## @param auth.enabled Enable authentication + ## ref: https://docs.mongodb.com/manual/tutorial/enable-authentication/ + ## + enabled: true + ## @param auth.rootUser MongoDB(®) root user + ## + rootUser: root + ## @param auth.rootPassword MongoDB(®) root password + ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mongodb#setting-the-root-user-and-password-on-first-run + ## + rootPassword: "" + ## @param auth.replicaSetKey Key used for authentication in the replicaset + ## + replicaSetKey: "" + ## @param auth.existingSecret Existing secret with MongoDB(®) credentials (keys: `mongodb-password`, `mongodb-root-password`, `mongodb-replica-set-key`) + ## NOTE: When it's set the previous parameters are ignored. + ## + existingSecret: "" + ## @param auth.usePasswordFiles Mount credentials as files instead of using environment variables + ## + usePasswordFiles: false +## @param shards Number of shards to be created +## ref: https://docs.mongodb.com/manual/core/sharded-cluster-shards/ +## +shards: 2 +## Properties for all of the pods in the cluster (shards, config servers and mongos) +## +common: + ## @param common.mongodbEnableNumactl Enable launch MongoDB instance prefixed with "numactl --interleave=all" + ## ref: https://docs.mongodb.com/manual/administration/production-notes/#mongodb-and-numa-hardware + ## + mongodbEnableNumactl: false + ## @param common.useHostnames Enable DNS hostnames in the replica set config + ## + useHostnames: true + ## @param common.mongodbEnableIPv6 Switch to enable/disable IPv6 on MongoDB® + ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mongodb#enablingdisabling-ipv6 + ## + mongodbEnableIPv6: false + ## @param common.mongodbDirectoryPerDB Switch to enable/disable DirectoryPerDB on MongoDB® + ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mongodb#enablingdisabling-directoryperdb + ## + mongodbDirectoryPerDB: false + ## @param common.mongodbSystemLogVerbosity MongoDB® system log verbosity level + ## ref: https://docs.mongodb.com/manual/reference/program/mongo/#cmdoption-mongo-ipv6 + ## + mongodbSystemLogVerbosity: 0 + ## @param common.mongodbDisableSystemLog Whether to disable MongoDB® system log or not + ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mongodb#configuring-system-log-verbosity-level + ## + mongodbDisableSystemLog: false + ## @param common.mongodbInitRetryAttempts Maximum retries for checking the MongoDB® initialization status + ## + mongodbInitRetryAttempts: 24 + ## @param common.mongodbInitRetryDelay Time (in seconds) to wait between retries for checking the MongoDB® initialization status + ## + mongodbInitRetryDelay: 5 + ## @param common.initScriptsCM Configmap with init scripts to execute + ## + initScriptsCM: "" + ## @param common.initScriptsSecret Secret with init scripts to execute (for sensitive data) + ## + initScriptsSecret: "" + ## @param common.extraEnvVars An array to add extra env vars + ## For example: + ## extraEnvVars: + ## - name: KIBANA_ELASTICSEARCH_URL + ## value: test + ## + extraEnvVars: [] + ## @param common.extraEnvVarsCM Name of a ConfigMap containing extra env vars + ## + extraEnvVarsCM: "" + ## @param common.extraEnvVarsSecret Name of a Secret containing extra env vars + ## + extraEnvVarsSecret: "" + ## @param common.sidecars Add sidecars to the pod + ## For example: + ## sidecars: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## ports: + ## - name: portname + ## containerPort: 1234 + ## + sidecars: [] + ## @param common.initContainers Add init containers to the pod + ## For example: + ## initcontainers: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## + initContainers: [] + ## @param common.podAnnotations Additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param common.podLabels Additional pod labels + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + ## + podLabels: {} + ## @param common.extraVolumes Array to add extra volumes + ## + extraVolumes: [] + ## @param common.extraVolumeMounts Array to add extra mounts (normally used with extraVolumes) + ## + extraVolumeMounts: [] + ## @param common.containerPorts.mongodb MongoDB container port + ## + containerPorts: + mongodb: 27017 + ## K8s Service Account. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + ## @param common.serviceAccount.create Whether to create a Service Account for all pods automatically + ## + create: true + ## @param common.serviceAccount.name Name of a Service Account to be used by all Pods + ## If not set and create is true, a name is generated using the XXX.fullname template + ## + name: "" + ## @param common.serviceAccount.annotations Additional Service Account annotations (evaluated as a template) + ## + annotations: {} + ## @param common.serviceAccount.automountServiceAccountToken Automount service account token for the server service account + ## + automountServiceAccountToken: false +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + ## @param volumePermissions.enabled Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) + ## + enabled: false + ## @param volumePermissions.image.registry [default: REGISTRY_NAME] Init container volume-permissions image registry + ## @param volumePermissions.image.repository [default: REPOSITORY_NAME/os-shell] Init container volume-permissions image name + ## @skip volumePermissions.image.tag Init container volume-permissions image tag + ## @param volumePermissions.image.digest Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag + ## @param volumePermissions.image.pullPolicy Init container volume-permissions image pull policy + ## @param volumePermissions.image.pullSecrets Init container volume-permissions image pull secrets + ## + image: + registry: docker.io + repository: bitnami/os-shell + tag: 12-debian-12-r51 + digest: "" + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## e.g: + ## pullSecrets: + ## - myRegistryKeySecretName + ## + pullSecrets: [] + ## @param volumePermissions.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production). + ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15 + ## + resourcesPreset: "nano" + ## @param volumePermissions.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) + ## Example: + ## resources: + ## requests: + ## cpu: 2 + ## memory: 512Mi + ## limits: + ## cpu: 3 + ## memory: 1024Mi + ## + resources: {} +## Kubernetes service type +## ref: https://kubernetes.io/docs/concepts/services-networking/service/ +## +service: + ## @param service.name Specify an explicit service name + ## + name: "" + ## @param service.annotations Additional service annotations (evaluate as a template) + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + annotations: {} + ## @param service.type Service type + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + ## + type: ClusterIP + ## @param service.externalTrafficPolicy External traffic policy + ## Enable client source IP preservation + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + ## + externalTrafficPolicy: Cluster + ## @param service.ports.mongodb MongoDB® service port + ## + ports: + mongodb: 27017 + ## @param service.clusterIP Static clusterIP or None for headless services + ## ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#servicespec-v1-core + ## + clusterIP: "" + ## @param service.nodePorts.mongodb Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + nodePorts: + mongodb: "" + ## @param service.nodePorts.metrics Specify the metrics nodePort value for the LoadBalancer and NodePort service types. + ## + metrics: "" + ## @param service.externalIPs External IP list to use with ClusterIP service type + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#external-ips + ## + externalIPs: [] + ## @param service.loadBalancerIP Static IP Address to use for LoadBalancer service type + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer + ## + loadBalancerIP: "" + ## @param service.loadBalancerSourceRanges List of IP ranges allowed access to load balancer (if supported) + ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service + ## + loadBalancerSourceRanges: [] + ## @param service.extraPorts Extra ports to expose (normally used with the `sidecar` value) + ## + extraPorts: [] + ## @param service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP" + ## If "ClientIP", consecutive client requests will be directed to the same mongos Pod + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + ## + sessionAffinity: None + ## @param service.sessionAffinityConfig Additional settings for the sessionAffinity + ## sessionAffinityConfig: + ## clientIP: + ## timeoutSeconds: 300 + ## + sessionAffinityConfig: {} + ## Headless service properties + ## + headless: + ## @param service.headless.annotations Annotations for the headless service. + ## + annotations: {} +## Network Policies +## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/ +## +networkPolicy: + ## @param networkPolicy.enabled Specifies whether a NetworkPolicy should be created + ## + enabled: true + ## @param networkPolicy.allowExternal Don't require server label for connections + ## The Policy model to apply. When set to false, only pods with the correct + ## server label will have network access to the ports server is listening + ## on. When true, server will accept connections from any source + ## (with the correct destination port). + ## + allowExternal: true + ## @param networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations. + ## + allowExternalEgress: true + ## @param networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy + ## e.g: + ## extraIngress: + ## - ports: + ## - port: 1234 + ## from: + ## - podSelector: + ## - matchLabels: + ## - role: frontend + ## - podSelector: + ## - matchExpressions: + ## - key: role + ## operator: In + ## values: + ## - frontend + extraIngress: [] + ## @param networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy + ## e.g: + ## extraEgress: + ## - ports: + ## - port: 1234 + ## to: + ## - podSelector: + ## - matchLabels: + ## - role: frontend + ## - podSelector: + ## - matchExpressions: + ## - key: role + ## operator: In + ## values: + ## - frontend + ## + extraEgress: [] + ## @param networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces + ## @param networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces + ## + ingressNSMatchLabels: {} + ingressNSPodMatchLabels: {} +## @section Config Server parameters +## + +## Config Server replica set properties +## ref: https://docs.mongodb.com/manual/core/sharded-cluster-config-servers/ +## +configsvr: + ## @param configsvr.replicaCount Number of nodes in the replica set (the first node will be primary) + ## + replicaCount: 1 + ## @param configsvr.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if configsvr.resources is set (configsvr.resources is recommended for production). + ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15 + ## + resourcesPreset: "small" + ## @param configsvr.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) + ## Example: + ## resources: + ## requests: + ## cpu: 2 + ## memory: 512Mi + ## limits: + ## cpu: 3 + ## memory: 1024Mi + ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + ## + resources: {} + ## @param configsvr.automountServiceAccountToken Mount Service Account token in pod + ## + automountServiceAccountToken: false + ## @param configsvr.hostAliases Deployment pod host aliases + ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ + ## + hostAliases: [] + ## @param configsvr.mongodbExtraFlags MongoDB® additional command line flags + ## Can be used to specify command line flags, for example: + ## mongodbExtraFlags: + ## - "--wiredTigerCacheSizeGB=2" + ## + mongodbExtraFlags: [] + ## @param configsvr.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template + ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods + ## + topologySpreadConstraints: [] + ## @param configsvr.priorityClassName Pod priority class name + ## https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ + ## + priorityClassName: "" + ## @param configsvr.podAffinityPreset Config Server Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity + ## + podAffinityPreset: "" + ## @param configsvr.podAntiAffinityPreset Config Server Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity + ## + podAntiAffinityPreset: soft + ## Node affinity preset + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity + ## + nodeAffinityPreset: + ## @param configsvr.nodeAffinityPreset.type Config Server Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## + type: "" + ## @param configsvr.nodeAffinityPreset.key Config Server Node label key to match Ignored if `affinity` is set. + ## E.g. + ## key: "kubernetes.io/e2e-az-name" + ## + key: "" + ## @param configsvr.nodeAffinityPreset.values Config Server Node label values to match. Ignored if `affinity` is set. + ## E.g. + ## values: + ## - e2e-az1 + ## - e2e-az2 + ## + values: [] + ## @param configsvr.affinity Config Server Affinity for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## Note: configsvr.podAffinityPreset, configsvr.podAntiAffinityPreset, and configsvr.nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param configsvr.nodeSelector Config Server Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ + ## + nodeSelector: {} + ## @param configsvr.tolerations Config Server Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## @param configsvr.podManagementPolicy Statefulset's pod management policy, allows parallel startup of pods + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies + ## + podManagementPolicy: OrderedReady + ## @param configsvr.updateStrategy.type updateStrategy for MongoDB® Primary, Secondary and Arbiter statefulsets + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + ## + updateStrategy: + type: RollingUpdate + ## @param configsvr.config MongoDB® configuration file + ## ref: http://docs.mongodb.org/manual/reference/configuration-options/ + ## + config: "" + ## @param configsvr.configCM ConfigMap name with Config Server configuration file (cannot be used with configsvr.config) + ## ref: http://docs.mongodb.org/manual/reference/configuration-options/ + ## + configCM: "" + ## @param configsvr.extraEnvVars An array to add extra env vars + ## For example: + ## extraEnvVars: + ## - name: KIBANA_ELASTICSEARCH_URL + ## value: test + ## + extraEnvVars: [] + ## @param configsvr.extraEnvVarsCM Name of a ConfigMap containing extra env vars + ## + extraEnvVarsCM: "" + ## @param configsvr.extraEnvVarsSecret Name of a Secret containing extra env vars + ## + extraEnvVarsSecret: "" + ## @param configsvr.sidecars Add sidecars to the pod + ## For example: + ## sidecars: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## ports: + ## - name: portname + ## containerPort: 1234 + ## + sidecars: [] + ## @param configsvr.initContainers Add init containers to the pod + ## For example: + ## initcontainers: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## + initContainers: [] + ## @param configsvr.podAnnotations Additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param configsvr.podLabels Additional pod labels + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + ## + podLabels: {} + ## @param configsvr.extraVolumes Array to add extra volumes. Requires setting `extraVolumeMounts` + ## + extraVolumes: [] + ## @param configsvr.extraVolumeMounts Array to add extra mounts (normally used with extraVolumes). Normally used with `extraVolumes` + ## + extraVolumeMounts: [] + ## @param configsvr.schedulerName Use an alternate scheduler, e.g. "stork". + ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ + ## + schedulerName: "" + ## Pod disruption budget + ## + pdb: + ## @param configsvr.pdb.create Enable pod disruption budget + ## + create: true + ## @param configsvr.pdb.minAvailable Minimum number of available config pods allowed (`0` to disable) + ## + minAvailable: 0 + ## @param configsvr.pdb.maxUnavailable Maximum number of unavailable config pods allowed (`0` to disable) + ## + maxUnavailable: 1 + ## Enable persistence using Persistent Volume Claims + ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/ + ## + persistence: + ## @param configsvr.persistence.enabled Use a PVC to persist data + ## + enabled: true + ## @param configsvr.persistence.mountPath Path to mount the volume at + ## MongoDB® images. + ## + mountPath: /bitnami/mongodb + ## @param configsvr.persistence.subPath Subdirectory of the volume to mount at (evaluated as a template) + ## Useful in dev environments and one PV for multiple services. + ## + subPath: "" + ## @param configsvr.persistence.storageClass Storage class of backing PVC + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + storageClass: "" + ## @param configsvr.persistence.accessModes Use volume as ReadOnly or ReadWrite + ## + accessModes: + - ReadWriteOnce + ## @param configsvr.persistence.size PersistentVolumeClaim size + ## + size: 8Gi + ## @param configsvr.persistence.annotations Persistent Volume annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + annotations: {} + ## @param configsvr.persistence.selector Selector to match an existing Persistent Volume for Config Server data PVC + ## A label query over volumes to consider for binding (e.g. when using local volumes) + ## + selector: {} + ## Persistent Volume Claim Retention Policy + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention + ## + persistentVolumeClaimRetentionPolicy: + ## @param configsvr.persistentVolumeClaimRetentionPolicy.enabled Enable Persistent volume retention policy for Config Server StatefulSet + ## + enabled: false + ## @param configsvr.persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced + ## + whenScaled: Retain + ## @param configsvr.persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted + ## + whenDeleted: Retain + ## K8s Service Account. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + ## @param configsvr.serviceAccount.create Specifies whether a ServiceAccount should be created for Config Server + ## + create: true + ## @param configsvr.serviceAccount.name Name of a Service Account to be used by Config Server + ## If not set and create is true, a name is generated using the XXX.fullname template + ## + name: "" + ## @param configsvr.serviceAccount.annotations Additional Service Account annotations (evaluated as a template) + ## + annotations: {} + ## @param configsvr.serviceAccount.automountServiceAccountToken Automount service account token for the server service account + ## + automountServiceAccountToken: false + ## Use a external config server instead of deploying one + ## + external: + ## @param configsvr.external.host Primary node of an external Config Server replicaset + ## + host: "" + ## @param configsvr.external.rootPassword Root password of the external Config Server replicaset + ## + rootPassword: "" + ## @param configsvr.external.replicasetName Replicaset name of an external Config Server + ## + replicasetName: "" + ## @param configsvr.external.replicasetKey Replicaset key of an external Config Server + ## + replicasetKey: "" + ## Configure Pods Security Context + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + ## @param configsvr.podSecurityContext.enabled Enable security context + ## @param configsvr.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy + ## @param configsvr.podSecurityContext.sysctls Set kernel settings using the sysctl interface + ## @param configsvr.podSecurityContext.supplementalGroups Set filesystem extra groups + ## @param configsvr.podSecurityContext.fsGroup Group ID for the container + ## + podSecurityContext: + enabled: true + fsGroupChangePolicy: Always + sysctls: [] + supplementalGroups: [] + fsGroup: 1001 + ## Configure Container Security Context + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container + ## @param configsvr.containerSecurityContext.enabled Enabled containers' Security Context + ## @param configsvr.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container + ## @param configsvr.containerSecurityContext.runAsUser Set containers' Security Context runAsUser + ## @param configsvr.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup + ## @param configsvr.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot + ## @param configsvr.containerSecurityContext.privileged Set container's Security Context privileged + ## @param configsvr.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem + ## @param configsvr.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation + ## @param configsvr.containerSecurityContext.capabilities.drop List of capabilities to be dropped + ## @param configsvr.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile + ## + containerSecurityContext: + enabled: true + seLinuxOptions: {} + runAsUser: 1001 + runAsGroup: 1001 + runAsNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + seccompProfile: + type: "RuntimeDefault" + ## @param configsvr.command Override default container command (useful when using custom images) + ## + command: + - /bin/bash + - /entrypoint/replicaset-entrypoint.sh + ## @param configsvr.args Override default container args (useful when using custom images) + ## + args: [] + ## @param configsvr.terminationGracePeriodSeconds Seconds Redmine pod needs to terminate gracefully + ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods + ## + terminationGracePeriodSeconds: "" + ## @param configsvr.lifecycleHooks for the Config Server container(s) to automate configuration before or after startup + ## + lifecycleHooks: {} + ## Configure extra options for liveness probes + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param configsvr.livenessProbe.enabled Enable livenessProbe + ## @param configsvr.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe + ## @param configsvr.livenessProbe.periodSeconds Period seconds for livenessProbe + ## @param configsvr.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe + ## @param configsvr.livenessProbe.failureThreshold Failure threshold for livenessProbe + ## @param configsvr.livenessProbe.successThreshold Success threshold for livenessProbe + ## + livenessProbe: + enabled: true + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 20 + failureThreshold: 2 + successThreshold: 1 + ## Configure extra options for readiness probe + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param configsvr.readinessProbe.enabled Enable readinessProbe + ## @param configsvr.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe + ## @param configsvr.readinessProbe.periodSeconds Period seconds for readinessProbe + ## @param configsvr.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe + ## @param configsvr.readinessProbe.failureThreshold Failure threshold for readinessProbe + ## @param configsvr.readinessProbe.successThreshold Success threshold for readinessProbe + ## + readinessProbe: + enabled: true + initialDelaySeconds: 10 + periodSeconds: 30 + timeoutSeconds: 20 + failureThreshold: 6 + successThreshold: 1 + ## Configure extra options for startup probe + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param configsvr.startupProbe.enabled Enable startupProbe + ## @param configsvr.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe + ## @param configsvr.startupProbe.periodSeconds Period seconds for startupProbe + ## @param configsvr.startupProbe.timeoutSeconds Timeout seconds for startupProbe + ## @param configsvr.startupProbe.failureThreshold Failure threshold for startupProbe + ## @param configsvr.startupProbe.successThreshold Success threshold for startupProbe + ## + startupProbe: + enabled: true + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 30 + successThreshold: 1 + ## @param configsvr.customLivenessProbe Custom livenessProbe that overrides the default one + ## + customLivenessProbe: {} + ## @param configsvr.customReadinessProbe Custom readinessProbe that overrides the default one + ## + customReadinessProbe: {} + ## @param configsvr.customStartupProbe Custom startupProbe that overrides the default one + ## + customStartupProbe: {} +## @section Mongos parameters +## + +## Mongos properties +## ref: https://docs.mongodb.com/manual/reference/program/mongos/#bin.mongos +## +mongos: + ## @param mongos.replicaCount Number of replicas + ## + replicaCount: 1 + ## @param mongos.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if mongos.resources is set (mongos.resources is recommended for production). + ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15 + ## + resourcesPreset: "small" + ## @param mongos.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) + ## Example: + ## resources: + ## requests: + ## cpu: 2 + ## memory: 512Mi + ## limits: + ## cpu: 3 + ## memory: 1024Mi + ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + ## + resources: {} + ## @param mongos.automountServiceAccountToken Mount Service Account token in pod + ## + automountServiceAccountToken: false + ## @param mongos.hostAliases Deployment pod host aliases + ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ + ## + hostAliases: [] + ## @param mongos.mongodbExtraFlags MongoDB® additional command line flags + ## Can be used to specify command line flags, for example: + ## mongodbExtraFlags: + ## - "--wiredTigerCacheSizeGB=2" + ## + mongodbExtraFlags: [] + ## @param mongos.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template + ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods + ## + topologySpreadConstraints: [] + ## @param mongos.priorityClassName Pod priority class name + ## https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ + ## + priorityClassName: "" + ## @param mongos.podAffinityPreset Mongos Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity + ## + podAffinityPreset: "" + ## @param mongos.podAntiAffinityPreset Mongos Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity + ## + podAntiAffinityPreset: soft + ## Node affinity preset + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity + ## + nodeAffinityPreset: + ## @param mongos.nodeAffinityPreset.type Mongos Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## + type: "" + ## @param mongos.nodeAffinityPreset.key Mongos Node label key to match Ignored if `affinity` is set. + ## E.g. + ## key: "kubernetes.io/e2e-az-name" + ## + key: "" + ## @param mongos.nodeAffinityPreset.values Mongos Node label values to match. Ignored if `affinity` is set. + ## E.g. + ## values: + ## - e2e-az1 + ## - e2e-az2 + ## + values: [] + ## @param mongos.affinity Mongos Affinity for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## Note: mongos.podAffinityPreset, mongos.podAntiAffinityPreset, and mongos.nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param mongos.nodeSelector Mongos Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ + ## + nodeSelector: {} + ## @param mongos.tolerations Mongos Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## @param mongos.podManagementPolicy Statefulsets pod management policy, allows parallel startup of pods + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies + ## + podManagementPolicy: OrderedReady + ## @param mongos.updateStrategy.type updateStrategy for MongoDB® Primary, Secondary and Arbiter statefulsets + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + ## + updateStrategy: + type: RollingUpdate + ## @param mongos.config MongoDB® configuration file + ## ref: http://docs.mongodb.org/manual/reference/configuration-options/ + ## + config: "" + ## @param mongos.configCM ConfigMap name with MongoDB® configuration file (cannot be used with mongos.config) + ## ref: http://docs.mongodb.org/manual/reference/configuration-options/ + ## + configCM: "" + ## @param mongos.extraEnvVars An array to add extra env vars + ## For example: + ## extraEnvVars: + ## - name: KIBANA_ELASTICSEARCH_URL + ## value: test + ## + extraEnvVars: [] + ## @param mongos.extraEnvVarsCM Name of a ConfigMap containing extra env vars + ## + extraEnvVarsCM: "" + ## @param mongos.extraEnvVarsSecret Name of a Secret containing extra env vars + ## + extraEnvVarsSecret: "" + ## @param mongos.sidecars Add sidecars to the pod + ## For example: + ## sidecars: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## ports: + ## - name: portname + ## containerPort: 1234 + ## + sidecars: [] + ## @param mongos.initContainers Add init containers to the pod + ## For example: + ## initcontainers: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## + initContainers: [] + ## @param mongos.podAnnotations Additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param mongos.podLabels Additional pod labels + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + ## + podLabels: {} + ## @param mongos.extraVolumes Array to add extra volumes. Requires setting `extraVolumeMounts` + ## + extraVolumes: [] + ## @param mongos.extraVolumeMounts Array to add extra volume mounts. Normally used with `extraVolumes`. + ## + extraVolumeMounts: [] + ## @param mongos.schedulerName Use an alternate scheduler, e.g. "stork". + ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ + ## + schedulerName: "" + ## @param mongos.useStatefulSet Use StatefulSet instead of Deployment + ## + useStatefulSet: false + ## When using a statefulset, you can enable one service per replica + ## This is useful when exposing the mongos through load balancers to make sure clients + ## connect to the same mongos and therefore can follow their cursors + ## + servicePerReplica: + ## @param mongos.servicePerReplica.enabled Create one service per mongos replica (must be used with statefulset) + ## + enabled: false + ## @param mongos.servicePerReplica.annotations Additional service annotations (evaluate as a template) + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + annotations: {} + ## @param mongos.servicePerReplica.type Service type + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + ## + type: ClusterIP + ## @param mongos.servicePerReplica.externalTrafficPolicy External traffic policy + ## Enable client source IP preservation + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + ## + externalTrafficPolicy: Cluster + ## @param mongos.servicePerReplica.port MongoDB® service port + ## + port: 27017 + ## @param mongos.servicePerReplica.clusterIPs Array of static clusterIPs for each MongoDB@reg; replica. Length must be the same as mongos.replicaCount + ## ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#servicespec-v1-core + ## + clusterIPs: [] + ## @param mongos.servicePerReplica.nodePorts Array of node ports used for each MongoDB@reg; replica. Length must be the same as mongos.replicaCount + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + nodePorts: [] + ## @param mongos.servicePerReplica.externalIPs External IP list to use with ClusterIP service type + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#external-ips + ## + externalIPs: [] + ## @param mongos.servicePerReplica.loadBalancerIPs Array of static IP Address to use for each replica LoadBalancer service type. Length must be the same as mongos.replicaCount + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer + ## + loadBalancerIPs: [] + ## @param mongos.servicePerReplica.loadBalancerSourceRanges List of IP ranges allowed access to load balancer (if supported) + ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service + ## + loadBalancerSourceRanges: [] + ## @param mongos.servicePerReplica.extraPorts Extra ports to expose (normally used with the `sidecar` value) + ## + extraPorts: [] + ## @param mongos.servicePerReplica.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP" + ## If "ClientIP", consecutive client requests will be directed to the same mongos Pod + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + ## + sessionAffinity: None + ## @param mongos.servicePerReplica.sessionAffinityConfig Additional settings for the sessionAffinity + ## sessionAffinityConfig: + ## clientIP: + ## timeoutSeconds: 300 + ## + sessionAffinityConfig: {} + ## Pod disruption budget + ## + pdb: + ## @param mongos.pdb.create Enable pod disruption budget + ## + create: true + ## @param mongos.pdb.minAvailable Minimum number of available mongo pods allowed (`0` to disable) + ## + minAvailable: 0 + ## @param mongos.pdb.maxUnavailable Maximum number of unavailable mongo pods allowed (`0` to disable) + ## + maxUnavailable: 1 + ## K8s Service Account. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + ## @param mongos.serviceAccount.create Whether to create a Service Account for mongos automatically + ## + create: true + ## @param mongos.serviceAccount.name Name of a Service Account to be used by mongos + ## If not set and create is true, a name is generated using the XXX.fullname template + ## + name: "" + ## @param mongos.serviceAccount.annotations Additional Service Account annotations (evaluated as a template) + ## + annotations: {} + ## @param mongos.serviceAccount.automountServiceAccountToken Automount service account token for the server service account + ## + automountServiceAccountToken: false + ## Configure Pods Security Context + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + ## @param mongos.podSecurityContext.enabled Enable security context + ## @param mongos.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy + ## @param mongos.podSecurityContext.sysctls Set kernel settings using the sysctl interface + ## @param mongos.podSecurityContext.supplementalGroups Set filesystem extra groups + ## @param mongos.podSecurityContext.fsGroup Group ID for the container + ## + podSecurityContext: + enabled: true + fsGroupChangePolicy: Always + sysctls: [] + supplementalGroups: [] + fsGroup: 1001 + ## Configure Container Security Context + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container + ## @param mongos.containerSecurityContext.enabled Enabled containers' Security Context + ## @param mongos.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container + ## @param mongos.containerSecurityContext.runAsUser Set containers' Security Context runAsUser + ## @param mongos.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup + ## @param mongos.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot + ## @param mongos.containerSecurityContext.privileged Set container's Security Context privileged + ## @param mongos.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem + ## @param mongos.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation + ## @param mongos.containerSecurityContext.capabilities.drop List of capabilities to be dropped + ## @param mongos.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile + ## + containerSecurityContext: + enabled: true + seLinuxOptions: {} + runAsUser: 1001 + runAsGroup: 1001 + runAsNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + seccompProfile: + type: "RuntimeDefault" + ## @param mongos.command Override default container command (useful when using custom images) + ## + command: [] + ## @param mongos.args Override default container args (useful when using custom images) + ## + args: [] + ## @param mongos.terminationGracePeriodSeconds Seconds Redmine pod needs to terminate gracefully + ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods + ## + terminationGracePeriodSeconds: "" + ## @param mongos.lifecycleHooks for the Mongo container(s) to automate configuration before or after startup + ## + lifecycleHooks: {} + ## Configure extra options for liveness probes + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param mongos.livenessProbe.enabled Enable livenessProbe + ## @param mongos.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe + ## @param mongos.livenessProbe.periodSeconds Period seconds for livenessProbe + ## @param mongos.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe + ## @param mongos.livenessProbe.failureThreshold Failure threshold for livenessProbe + ## @param mongos.livenessProbe.successThreshold Success threshold for livenessProbe + ## + livenessProbe: + enabled: true + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 20 + failureThreshold: 2 + successThreshold: 1 + ## Configure extra options for readiness probe + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param mongos.readinessProbe.enabled Enable readinessProbe + ## @param mongos.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe + ## @param mongos.readinessProbe.periodSeconds Period seconds for readinessProbe + ## @param mongos.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe + ## @param mongos.readinessProbe.failureThreshold Failure threshold for readinessProbe + ## @param mongos.readinessProbe.successThreshold Success threshold for readinessProbe + ## + readinessProbe: + enabled: true + initialDelaySeconds: 10 + periodSeconds: 30 + timeoutSeconds: 20 + failureThreshold: 6 + successThreshold: 1 + ## Configure extra options for startup probe + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param mongos.startupProbe.enabled Enable startupProbe + ## @param mongos.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe + ## @param mongos.startupProbe.periodSeconds Period seconds for startupProbe + ## @param mongos.startupProbe.timeoutSeconds Timeout seconds for startupProbe + ## @param mongos.startupProbe.failureThreshold Failure threshold for startupProbe + ## @param mongos.startupProbe.successThreshold Success threshold for startupProbe + ## + startupProbe: + enabled: false + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 30 + successThreshold: 1 + ## @param mongos.customLivenessProbe Custom livenessProbe that overrides the default one + ## + customLivenessProbe: {} + ## @param mongos.customReadinessProbe Custom readinessProbe that overrides the default one + ## + customReadinessProbe: {} + ## @param mongos.customStartupProbe Custom startupProbe that overrides the default one + ## + customStartupProbe: {} +## @section Shard configuration: Data node parameters +## + +## Shard replica set properties +## ref: https://docs.mongodb.com/manual/replication/index.html +## +shardsvr: + ## Properties for data nodes (primary and secondary) + ## + dataNode: + ## @param shardsvr.dataNode.replicaCount Number of nodes in each shard replica set (the first node will be primary) + ## + replicaCount: 1 + ## @param shardsvr.dataNode.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if shardsvr.dataNode.resources is set (shardsvr.dataNode.resources is recommended for production). + ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15 + ## + resourcesPreset: "medium" + ## @param shardsvr.dataNode.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) + ## Example: + ## resources: + ## requests: + ## cpu: 2 + ## memory: 512Mi + ## limits: + ## cpu: 3 + ## memory: 1024Mi + ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + ## + resources: {} + ## @param shardsvr.dataNode.mongodbExtraFlags MongoDB® additional command line flags + ## Can be used to specify command line flags, for example: + ## mongodbExtraFlags: + ## - "--wiredTigerCacheSizeGB=2" + ## + mongodbExtraFlags: [] + ## @param shardsvr.dataNode.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template + ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods + ## + topologySpreadConstraints: [] + ## @param shardsvr.dataNode.priorityClassName Pod priority class name + ## https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ + ## + priorityClassName: "" + ## @param shardsvr.dataNode.podAffinityPreset Data nodes Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity + ## + podAffinityPreset: "" + ## @param shardsvr.dataNode.podAntiAffinityPreset Data nodes Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity + ## + podAntiAffinityPreset: soft + ## Node affinity preset + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity + ## + nodeAffinityPreset: + ## @param shardsvr.dataNode.nodeAffinityPreset.type Data nodes Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## + type: "" + ## @param shardsvr.dataNode.nodeAffinityPreset.key Data nodes Node label key to match Ignored if `affinity` is set. + ## E.g. + ## key: "kubernetes.io/e2e-az-name" + ## + key: "" + ## @param shardsvr.dataNode.nodeAffinityPreset.values Data nodes Node label values to match. Ignored if `affinity` is set. + ## E.g. + ## values: + ## - e2e-az1 + ## - e2e-az2 + ## + values: [] + ## @param shardsvr.dataNode.affinity Data nodes Affinity for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## You can set dataNodeLoopId (or any other parameter) by setting the below code block under this 'affinity' section: + ## affinity: + ## matchLabels: + ## shard: "{{ .dataNodeLoopId }}" + ## + ## Note: shardsvr.dataNode.podAffinityPreset, shardsvr.dataNode.podAntiAffinityPreset, and shardsvr.dataNode.nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param shardsvr.dataNode.nodeSelector Data nodes Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ + ## You can set dataNodeLoopId (or any other parameter) by setting the below code block under this 'nodeSelector' section: + ## nodeSelector: { shardId: "{{ .dataNodeLoopId }}" } + ## + nodeSelector: {} + ## @param shardsvr.dataNode.tolerations Data nodes Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## You can set dataNodeLoopId (or any other parameter) by setting the below code block under this 'nodeSelector' section: + ## tolerations: + ## - key: "shardId" + ## operator: "Equal" + ## value: "{{ .dataNodeLoopId }}" + ## effect: "NoSchedule" + ## + tolerations: [] + ## @param shardsvr.dataNode.podManagementPolicy podManagementPolicy for the statefulset, allows parallel startup of pods + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies + ## + podManagementPolicy: OrderedReady + ## @param shardsvr.dataNode.updateStrategy.type updateStrategy for MongoDB® Primary, Secondary and Arbiter statefulsets + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + ## + updateStrategy: + type: RollingUpdate + ## @param shardsvr.dataNode.automountServiceAccountToken Mount Service Account token in pod + ## + automountServiceAccountToken: false + ## @param shardsvr.dataNode.hostAliases Deployment pod host aliases + ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ + ## + hostAliases: [] + ## @param shardsvr.dataNode.config Entries for the MongoDB® config file + ## ref: http://docs.mongodb.org/manual/reference/configuration-options/ + ## + config: "" + ## @param shardsvr.dataNode.configCM ConfigMap name with MongoDB® configuration (cannot be used with shardsvr.dataNode.config) + ## ref: http://docs.mongodb.org/manual/reference/configuration-options/ + ## + configCM: "" + ## @param shardsvr.dataNode.extraEnvVars An array to add extra env vars + ## For example: + ## extraEnvVars: + ## - name: KIBANA_ELASTICSEARCH_URL + ## value: test + ## + extraEnvVars: [] + ## @param shardsvr.dataNode.extraEnvVarsCM Name of a ConfigMap containing extra env vars + ## + extraEnvVarsCM: "" + ## @param shardsvr.dataNode.extraEnvVarsSecret Name of a Secret containing extra env vars + ## + extraEnvVarsSecret: "" + ## @param shardsvr.dataNode.sidecars Attach additional containers (evaluated as a template) + ## For example: + ## sidecars: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## ports: + ## - name: portname + ## containerPort: 1234 + ## + sidecars: [] + ## @param shardsvr.dataNode.initContainers Add init containers to the pod + ## For example: + ## initcontainers: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## + initContainers: [] + ## @param shardsvr.dataNode.podAnnotations Additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param shardsvr.dataNode.podLabels Additional pod labels + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + ## + podLabels: {} + ## @param shardsvr.dataNode.extraVolumes Array to add extra volumes. Requires setting `extraVolumeMounts` + ## + extraVolumes: [] + ## @param shardsvr.dataNode.extraVolumeMounts Array to add extra mounts. Normally used with `extraVolumes` + ## + extraVolumeMounts: [] + ## @param shardsvr.dataNode.schedulerName Use an alternate scheduler, e.g. "stork". + ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ + ## + schedulerName: "" + ## Pod disruption budget + ## + pdb: + ## @param shardsvr.dataNode.pdb.create Enable pod disruption budget + ## + create: true + ## @param shardsvr.dataNode.pdb.minAvailable Minimum number of available data pods allowed (`0` to disable) + ## + minAvailable: 0 + ## @param shardsvr.dataNode.pdb.maxUnavailable Maximum number of unavailable data pods allowed (`0` to disable) + ## + maxUnavailable: 1 + ## K8s Service Account. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + ## @param shardsvr.dataNode.serviceAccount.create Specifies whether a ServiceAccount should be created for shardsvr + ## + create: true + ## @param shardsvr.dataNode.serviceAccount.name Name of a Service Account to be used by shardsvr data pods + ## If not set and create is true, a name is generated using the XXX.fullname template + ## + name: "" + ## @param shardsvr.dataNode.serviceAccount.annotations Additional Service Account annotations (evaluated as a template) + ## + annotations: {} + ## @param shardsvr.dataNode.serviceAccount.automountServiceAccountToken Automount service account token for the server service account + ## + automountServiceAccountToken: false + ## Configure Pods Security Context + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + ## @param shardsvr.dataNode.podSecurityContext.enabled Enable security context + ## @param shardsvr.dataNode.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy + ## @param shardsvr.dataNode.podSecurityContext.sysctls Set kernel settings using the sysctl interface + ## @param shardsvr.dataNode.podSecurityContext.supplementalGroups Set filesystem extra groups + ## @param shardsvr.dataNode.podSecurityContext.fsGroup Group ID for the container + ## + podSecurityContext: + enabled: true + fsGroupChangePolicy: Always + sysctls: [] + supplementalGroups: [] + fsGroup: 1001 + ## Configure Container Security Context + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container + ## @param shardsvr.dataNode.containerSecurityContext.enabled Enabled containers' Security Context + ## @param shardsvr.dataNode.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container + ## @param shardsvr.dataNode.containerSecurityContext.runAsUser Set containers' Security Context runAsUser + ## @param shardsvr.dataNode.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup + ## @param shardsvr.dataNode.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot + ## @param shardsvr.dataNode.containerSecurityContext.privileged Set container's Security Context privileged + ## @param shardsvr.dataNode.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem + ## @param shardsvr.dataNode.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation + ## @param shardsvr.dataNode.containerSecurityContext.capabilities.drop List of capabilities to be dropped + ## @param shardsvr.dataNode.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile + ## + containerSecurityContext: + enabled: true + seLinuxOptions: {} + runAsUser: 1001 + runAsGroup: 1001 + runAsNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + seccompProfile: + type: "RuntimeDefault" + ## @param shardsvr.dataNode.command Override default container command (useful when using custom images) + ## + command: + - /bin/bash + - /entrypoint/replicaset-entrypoint.sh + ## @param shardsvr.dataNode.args Override default container args (useful when using custom images) + ## + args: [] + ## @param shardsvr.dataNode.terminationGracePeriodSeconds Seconds Redmine pod needs to terminate gracefully + ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods + ## + terminationGracePeriodSeconds: "" + ## @param shardsvr.dataNode.lifecycleHooks for the Data container(s) to automate configuration before or after startup + ## + lifecycleHooks: {} + ## Configure extra options for liveness probes + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param shardsvr.dataNode.livenessProbe.enabled Enable livenessProbe + ## @param shardsvr.dataNode.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe + ## @param shardsvr.dataNode.livenessProbe.periodSeconds Period seconds for livenessProbe + ## @param shardsvr.dataNode.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe + ## @param shardsvr.dataNode.livenessProbe.failureThreshold Failure threshold for livenessProbe + ## @param shardsvr.dataNode.livenessProbe.successThreshold Success threshold for livenessProbe + ## + livenessProbe: + enabled: true + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 20 + failureThreshold: 2 + successThreshold: 1 + ## Configure extra options for readiness probe + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param shardsvr.dataNode.readinessProbe.enabled Enable readinessProbe + ## @param shardsvr.dataNode.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe + ## @param shardsvr.dataNode.readinessProbe.periodSeconds Period seconds for readinessProbe + ## @param shardsvr.dataNode.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe + ## @param shardsvr.dataNode.readinessProbe.failureThreshold Failure threshold for readinessProbe + ## @param shardsvr.dataNode.readinessProbe.successThreshold Success threshold for readinessProbe + ## + readinessProbe: + enabled: true + initialDelaySeconds: 10 + periodSeconds: 30 + timeoutSeconds: 20 + failureThreshold: 6 + successThreshold: 1 + ## Configure extra options for startup probe + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param shardsvr.dataNode.startupProbe.enabled Enable startupProbe + ## @param shardsvr.dataNode.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe + ## @param shardsvr.dataNode.startupProbe.periodSeconds Period seconds for startupProbe + ## @param shardsvr.dataNode.startupProbe.timeoutSeconds Timeout seconds for startupProbe + ## @param shardsvr.dataNode.startupProbe.failureThreshold Failure threshold for startupProbe + ## @param shardsvr.dataNode.startupProbe.successThreshold Success threshold for startupProbe + ## + startupProbe: + enabled: false + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 30 + successThreshold: 1 + ## @param shardsvr.dataNode.customLivenessProbe Custom livenessProbe that overrides the default one + ## + customLivenessProbe: {} + ## @param shardsvr.dataNode.customReadinessProbe Custom readinessProbe that overrides the default one + ## + customReadinessProbe: {} + ## @param shardsvr.dataNode.customStartupProbe Custom startupProbe that overrides the default one + ## + customStartupProbe: {} + ## @section Shard configuration: Persistence parameters + ## + + ## Enable persistence using Persistent Volume Claims + ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/ + ## + persistence: + ## @param shardsvr.persistence.enabled Use a PVC to persist data + ## + enabled: true + ## @param shardsvr.persistence.mountPath The path the volume will be mounted at, useful when using different MongoDB® images. + ## + mountPath: /bitnami/mongodb + ## @param shardsvr.persistence.subPath Subdirectory of the volume to mount at (evaluated as a template) + ## Useful in development environments and one PV for multiple services. + ## + subPath: "" + ## @param shardsvr.persistence.storageClass Storage class of backing PVC + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + storageClass: "" + ## @param shardsvr.persistence.accessModes Use volume as ReadOnly or ReadWrite + ## + accessModes: + - ReadWriteOnce + ## @param shardsvr.persistence.size PersistentVolumeClaim size + ## + size: 8Gi + ## @param shardsvr.persistence.annotations Additional volume annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + annotations: {} + ## @param shardsvr.persistence.selector Selector to match an existing Persistent Volume for Shard data PVC + ## A label query over volumes to consider for binding (e.g. when using local volumes) + ## Selector can be defined with static and dynamic options: + ## selector: + ## matchLabels: + ## app: web + ## shard: shard{{ .Index }} + ## + ## shard{{ .Index }} will be substituted to shard0, shard1 accordingly + ## + selector: {} + ## Persistent Volume Claim Retention Policy + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention + ## + persistentVolumeClaimRetentionPolicy: + ## @param shardsvr.persistentVolumeClaimRetentionPolicy.enabled Enable Persistent volume retention policy for Shard replicas StatefulSet + ## + enabled: false + ## @param shardsvr.persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced + ## + whenScaled: Retain + ## @param shardsvr.persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted + ## + whenDeleted: Retain + + ## @section Shard configuration: Arbiter parameters + ## + + ## Properties for arbiter nodes + ## ref: https://docs.mongodb.com/manual/tutorial/add-replica-set-arbiter/ + ## + arbiter: + ## @param shardsvr.arbiter.replicaCount Number of arbiters in each shard replica set (the first node will be primary) + ## + replicaCount: 0 + ## @param shardsvr.arbiter.automountServiceAccountToken Mount Service Account token in pod + ## + automountServiceAccountToken: false + ## @param shardsvr.arbiter.hostAliases Deployment pod host aliases + ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ + ## + hostAliases: [] + ## @param shardsvr.arbiter.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if shardsvr.arbiter.resources is set (shardsvr.arbiter.resources is recommended for production). + ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15 + ## + resourcesPreset: "small" + ## @param shardsvr.arbiter.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) + ## Example: + ## resources: + ## requests: + ## cpu: 2 + ## memory: 512Mi + ## limits: + ## cpu: 3 + ## memory: 1024Mi + ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + ## + resources: {} + ## @param shardsvr.arbiter.mongodbExtraFlags MongoDB® additional command line flags + ## Can be used to specify command line flags, for example: + ## mongodbExtraFlags: + ## - "--wiredTigerCacheSizeGB=2" + ## + mongodbExtraFlags: [] + ## @param shardsvr.arbiter.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template + ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods + ## + topologySpreadConstraints: [] + ## @param shardsvr.arbiter.priorityClassName Pod priority class name + ## https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ + ## + priorityClassName: "" + ## @param shardsvr.arbiter.podAffinityPreset Arbiter's Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity + ## + podAffinityPreset: "" + ## @param shardsvr.arbiter.podAntiAffinityPreset Arbiter's Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity + ## + podAntiAffinityPreset: soft + ## Node affinity preset + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity + ## + nodeAffinityPreset: + ## @param shardsvr.arbiter.nodeAffinityPreset.type Arbiter's Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` + ## + type: "" + ## @param shardsvr.arbiter.nodeAffinityPreset.key Arbiter's Node label key to match Ignored if `affinity` is set. + ## E.g. + ## key: "kubernetes.io/e2e-az-name" + ## + key: "" + ## @param shardsvr.arbiter.nodeAffinityPreset.values Arbiter's Node label values to match. Ignored if `affinity` is set. + ## E.g. + ## values: + ## - e2e-az1 + ## - e2e-az2 + ## + values: [] + ## @param shardsvr.arbiter.affinity Arbiter's Affinity for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## You can set arbiterLoopId (or any other parameter) by setting the below code block under this 'affinity' section: + ## affinity: + ## matchLabels: + ## shard: "{{ .arbiterLoopId }}" + ## + ## Note: shardsvr.arbiter.podAffinityPreset, shardsvr.arbiter.podAntiAffinityPreset, and shardsvr.arbiter.nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param shardsvr.arbiter.nodeSelector Arbiter's Node labels for pod assignment + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ + ## + nodeSelector: {} + ## @param shardsvr.arbiter.tolerations Arbiter's Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## @param shardsvr.arbiter.podManagementPolicy Statefulset's pod management policy, allows parallel startup of pods + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies + ## + podManagementPolicy: OrderedReady + ## @param shardsvr.arbiter.updateStrategy.type updateStrategy for MongoDB® Primary, Secondary and Arbiter statefulsets + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + ## + updateStrategy: + type: RollingUpdate + ## @param shardsvr.arbiter.config MongoDB® configuration file + ## ref: http://docs.mongodb.org/manual/reference/configuration-options/ + ## + config: "" + ## @param shardsvr.arbiter.configCM ConfigMap name with MongoDB® configuration file (cannot be used with shardsvr.arbiter.config) + ## ref: http://docs.mongodb.org/manual/reference/configuration-options/ + ## + configCM: "" + ## @param shardsvr.arbiter.extraEnvVars An array to add extra env vars + ## For example: + ## extraEnvVars: + ## - name: KIBANA_ELASTICSEARCH_URL + ## value: test + ## + extraEnvVars: [] + ## @param shardsvr.arbiter.extraEnvVarsCM Name of a ConfigMap containing extra env vars + ## + extraEnvVarsCM: "" + ## @param shardsvr.arbiter.extraEnvVarsSecret Name of a Secret containing extra env vars + ## + extraEnvVarsSecret: "" + ## @param shardsvr.arbiter.sidecars Add sidecars to the pod + ## For example: + ## sidecars: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## ports: + ## - name: portname + ## containerPort: 1234 + ## + sidecars: [] + ## @param shardsvr.arbiter.initContainers Add init containers to the pod + ## For example: + ## initcontainers: + ## - name: your-image-name + ## image: your-image + ## imagePullPolicy: Always + ## + initContainers: [] + ## @param shardsvr.arbiter.podAnnotations Additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param shardsvr.arbiter.podLabels Additional pod labels + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + ## + podLabels: {} + ## @param shardsvr.arbiter.extraVolumes Array to add extra volumes + ## + extraVolumes: [] + ## @param shardsvr.arbiter.extraVolumeMounts Array to add extra mounts (normally used with extraVolumes) + ## + extraVolumeMounts: [] + ## @param shardsvr.arbiter.schedulerName Use an alternate scheduler, e.g. "stork". + ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ + ## + schedulerName: "" + ## K8s Service Account. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + ## @param shardsvr.arbiter.serviceAccount.create Specifies whether a ServiceAccount should be created for shardsvr arbiter nodes + ## + create: true + ## @param shardsvr.arbiter.serviceAccount.name Name of a Service Account to be used by shardsvr arbiter pods + ## If not set and create is true, a name is generated using the XXX.fullname template + ## + name: "" + ## @param shardsvr.arbiter.serviceAccount.annotations Additional Service Account annotations (evaluated as a template) + ## + annotations: {} + ## @param shardsvr.arbiter.serviceAccount.automountServiceAccountToken Automount service account token for the server service account + ## + automountServiceAccountToken: false + ## Configure Pods Security Context + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + ## @param shardsvr.arbiter.podSecurityContext.enabled Enable security context + ## @param shardsvr.arbiter.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy + ## @param shardsvr.arbiter.podSecurityContext.sysctls Set kernel settings using the sysctl interface + ## @param shardsvr.arbiter.podSecurityContext.supplementalGroups Set filesystem extra groups + ## @param shardsvr.arbiter.podSecurityContext.fsGroup Group ID for the container + ## + podSecurityContext: + enabled: true + fsGroupChangePolicy: Always + sysctls: [] + supplementalGroups: [] + fsGroup: 1001 + ## Configure Container Security Context + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container + ## @param shardsvr.arbiter.containerSecurityContext.enabled Enabled containers' Security Context + ## @param shardsvr.arbiter.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container + ## @param shardsvr.arbiter.containerSecurityContext.runAsUser Set containers' Security Context runAsUser + ## @param shardsvr.arbiter.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup + ## @param shardsvr.arbiter.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot + ## @param shardsvr.arbiter.containerSecurityContext.privileged Set container's Security Context privileged + ## @param shardsvr.arbiter.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem + ## @param shardsvr.arbiter.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation + ## @param shardsvr.arbiter.containerSecurityContext.capabilities.drop List of capabilities to be dropped + ## @param shardsvr.arbiter.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile + ## + containerSecurityContext: + enabled: true + seLinuxOptions: {} + runAsUser: 1001 + runAsGroup: 1001 + runAsNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + seccompProfile: + type: "RuntimeDefault" + ## @param shardsvr.arbiter.command Override default container command (useful when using custom images) + ## + command: [] + ## @param shardsvr.arbiter.args Override default container args (useful when using custom images) + ## + args: [] + ## @param shardsvr.arbiter.terminationGracePeriodSeconds Seconds Redmine pod needs to terminate gracefully + ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods + ## + terminationGracePeriodSeconds: "" + ## @param shardsvr.arbiter.lifecycleHooks for the arbiter container(s) to automate configuration before or after startup + ## + lifecycleHooks: {} + ## Configure extra options for liveness probes + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param shardsvr.arbiter.livenessProbe.enabled Enable livenessProbe + ## @param shardsvr.arbiter.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe + ## @param shardsvr.arbiter.livenessProbe.periodSeconds Period seconds for livenessProbe + ## @param shardsvr.arbiter.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe + ## @param shardsvr.arbiter.livenessProbe.failureThreshold Failure threshold for livenessProbe + ## @param shardsvr.arbiter.livenessProbe.successThreshold Success threshold for livenessProbe + ## + livenessProbe: + enabled: true + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 20 + failureThreshold: 2 + successThreshold: 1 + ## Configure extra options for readiness probe + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param shardsvr.arbiter.readinessProbe.enabled Enable readinessProbe + ## @param shardsvr.arbiter.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe + ## @param shardsvr.arbiter.readinessProbe.periodSeconds Period seconds for readinessProbe + ## @param shardsvr.arbiter.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe + ## @param shardsvr.arbiter.readinessProbe.failureThreshold Failure threshold for readinessProbe + ## @param shardsvr.arbiter.readinessProbe.successThreshold Success threshold for readinessProbe + ## + readinessProbe: + enabled: true + initialDelaySeconds: 10 + periodSeconds: 30 + timeoutSeconds: 20 + failureThreshold: 6 + successThreshold: 1 + ## Configure extra options for startup probe + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param shardsvr.arbiter.startupProbe.enabled Enable startupProbe + ## @param shardsvr.arbiter.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe + ## @param shardsvr.arbiter.startupProbe.periodSeconds Period seconds for startupProbe + ## @param shardsvr.arbiter.startupProbe.timeoutSeconds Timeout seconds for startupProbe + ## @param shardsvr.arbiter.startupProbe.failureThreshold Failure threshold for startupProbe + ## @param shardsvr.arbiter.startupProbe.successThreshold Success threshold for startupProbe + ## + startupProbe: + enabled: false + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 30 + successThreshold: 1 + ## @param shardsvr.arbiter.customLivenessProbe Custom livenessProbe that overrides the default one + ## + customLivenessProbe: {} + ## @param shardsvr.arbiter.customReadinessProbe Custom readinessProbe that overrides the default one + ## + customReadinessProbe: {} + ## @param shardsvr.arbiter.customStartupProbe Custom startupProbe that overrides the default one + ## + customStartupProbe: {} +## @section Metrics parameters +## + +metrics: + ## @param metrics.enabled Start a side-car prometheus exporter + ## + enabled: false + ## @param metrics.image.registry [default: REGISTRY_NAME] MongoDB® exporter image registry + ## @param metrics.image.repository [default: REPOSITORY_NAME/mongodb-exporter] MongoDB® exporter image name + ## @skip metrics.image.tag MongoDB® exporter image tag + ## @param metrics.image.digest MongoDB® exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag + ## @param metrics.image.pullPolicy MongoDB® exporter image pull policy + ## @param metrics.image.pullSecrets MongoDB® exporter image pull secrets + ## + image: + registry: docker.io + repository: bitnami/mongodb-exporter + tag: 0.47.0-debian-12-r1 + digest: "" + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## e.g: + ## pullSecrets: + ## - myRegistryKeySecretName + ## + pullSecrets: [] + ## @param metrics.useTLS Whether to connect to MongoDB® with TLS + ## + useTLS: false + ## @param metrics.extraArgs String with extra arguments to the metrics exporter + ## ref: https://github.com/percona/mongodb_exporter/blob/main/main.go + ## + extraArgs: "" + ## @param metrics.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production). + ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15 + ## + resourcesPreset: "nano" + ## @param metrics.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) + ## Example: + ## resources: + ## requests: + ## cpu: 2 + ## memory: 512Mi + ## limits: + ## cpu: 3 + ## memory: 1024Mi + ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + ## + resources: {} + ## Configure Container Security Context + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container + ## @param metrics.containerSecurityContext.enabled Enabled containers' Security Context + ## @param metrics.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container + ## @param metrics.containerSecurityContext.runAsUser Set containers' Security Context runAsUser + ## @param metrics.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup + ## @param metrics.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot + ## @param metrics.containerSecurityContext.privileged Set container's Security Context privileged + ## @param metrics.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem + ## @param metrics.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation + ## @param metrics.containerSecurityContext.capabilities.drop List of capabilities to be dropped + ## @param metrics.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile + ## + containerSecurityContext: + enabled: true + seLinuxOptions: {} + runAsUser: 1001 + runAsGroup: 1001 + runAsNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + seccompProfile: + type: "RuntimeDefault" + ## Metrics exporter liveness probe + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) + ## @param metrics.livenessProbe.enabled Enable livenessProbe + ## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe + ## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe + ## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe + ## @param metrics.livenessProbe.failureThreshold Failure threshold for livenessProbe + ## @param metrics.livenessProbe.successThreshold Success threshold for livenessProbe + ## + livenessProbe: + enabled: false + initialDelaySeconds: 15 + periodSeconds: 5 + timeoutSeconds: 5 + failureThreshold: 3 + successThreshold: 1 + ## Metrics exporter liveness and readiness probes + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) + ## @param metrics.readinessProbe.enabled Enable readinessProbe + ## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe + ## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe + ## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe + ## @param metrics.readinessProbe.failureThreshold Failure threshold for readinessProbe + ## @param metrics.readinessProbe.successThreshold Success threshold for readinessProbe + ## + readinessProbe: + enabled: false + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + failureThreshold: 3 + successThreshold: 1 + ## Configure extra options for startup probe + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes + ## @param metrics.startupProbe.enabled Enable startupProbe + ## @param metrics.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe + ## @param metrics.startupProbe.periodSeconds Period seconds for startupProbe + ## @param metrics.startupProbe.timeoutSeconds Timeout seconds for startupProbe + ## @param metrics.startupProbe.failureThreshold Failure threshold for startupProbe + ## @param metrics.startupProbe.successThreshold Success threshold for startupProbe + ## + startupProbe: + enabled: false + initialDelaySeconds: 0 + periodSeconds: 5 + timeoutSeconds: 2 + failureThreshold: 15 + successThreshold: 1 + ## @param metrics.customLivenessProbe Custom livenessProbe that overrides the default one + ## + customLivenessProbe: {} + ## @param metrics.customReadinessProbe Custom readinessProbe that overrides the default one + ## + customReadinessProbe: {} + ## @param metrics.customStartupProbe Custom startupProbe that overrides the default one + ## + customStartupProbe: {} + ## @param metrics.containerPorts.metrics Port of the Prometheus metrics container + ## + containerPorts: + metrics: 9216 + ## @param metrics.podAnnotations [object] Metrics exporter pod Annotation + ## + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "{{ .Values.metrics.containerPort }}" + ## Prometheus Service Monitor + ## ref: https://github.com/coreos/prometheus-operator + ## https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint + ## + podMonitor: + ## @param metrics.podMonitor.enabled Create PodMonitor Resource for scraping metrics using PrometheusOperator + ## + enabled: false + ## @param metrics.podMonitor.namespace Namespace where podmonitor resource should be created + ## + namespace: monitoring + ## @param metrics.podMonitor.interval Specify the interval at which metrics should be scraped + ## + interval: 30s + ## @param metrics.podMonitor.scrapeTimeout Specify the timeout after which the scrape is ended + ## e.g: + ## scrapeTimeout: 30s + ## + scrapeTimeout: "" + ## @param metrics.podMonitor.additionalLabels Additional labels that can be used so PodMonitors will be discovered by Prometheus + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec + ## + additionalLabels: {} diff --git a/mongodb-tp-sharded-secret.yaml b/mongodb-tp-sharded-secret.yaml new file mode 100644 index 0000000..607178d --- /dev/null +++ b/mongodb-tp-sharded-secret.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: mongodb-mongodb-sharded +data: + mongodb-replica-set-key: TU1NamV6Wlg3VQ== + mongodb-root-password: dHE4dWduSXJEdg== +type: Opaque diff --git a/pvcshards-tp.yaml b/pvcshards-tp.yaml new file mode 100644 index 0000000..cca3e3f --- /dev/null +++ b/pvcshards-tp.yaml @@ -0,0 +1,85 @@ +#config servers: +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: datadir-mongodb-mongodb-sharded-configsvr-0 + labels: + app: mongodb-sharded +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi + storageClassName: thin-disk +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: datadir-mongodb-mongodb-sharded-configsvr-1 + labels: + app: mongodb-sharded +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi + storageClassName: thin-disk +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: datadir-mongodb-mongodb-sharded-configsvr-2 + labels: + app: mongodb-sharded +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi + storageClassName: thin-disk +--- +#shards + replicas +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: datadir-mongodb-mongodb-sharded-shard0-data-0 + labels: + app: mongodb-sharded +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi + storageClassName: thin-disk +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: datadir-mongodb-mongodb-sharded-shard0-data-1 + labels: + app: mongodb-sharded +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi + storageClassName: thin-disk +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: datadir-mongodb-mongodb-sharded-shard0-data-2 + labels: + app: mongodb-sharded +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi + storageClassName: thin-disk diff --git a/sc-thin-disk-ds-tp.yaml b/sc-thin-disk-ds-tp.yaml new file mode 100644 index 0000000..dc29a17 --- /dev/null +++ b/sc-thin-disk-ds-tp.yaml @@ -0,0 +1,9 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: thin-disk +provisioner: kubernetes.io/vsphere-volume +parameters: + diskformat: thin +reclaimPolicy: Retain +volumeBindingMode: Immediate