diff --git a/assets/gitlab/gitlab-6.10.0.tgz b/assets/gitlab/gitlab-6.10.0.tgz deleted file mode 100644 index 84a9e1e7e..000000000 Binary files a/assets/gitlab/gitlab-6.10.0.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.10.1.tgz b/assets/gitlab/gitlab-6.10.1.tgz deleted file mode 100644 index 01ab5c4e0..000000000 Binary files a/assets/gitlab/gitlab-6.10.1.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.10.2.tgz b/assets/gitlab/gitlab-6.10.2.tgz deleted file mode 100644 index 453243895..000000000 Binary files a/assets/gitlab/gitlab-6.10.2.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.10.3.tgz b/assets/gitlab/gitlab-6.10.3.tgz deleted file mode 100644 index 2ea347cda..000000000 Binary files a/assets/gitlab/gitlab-6.10.3.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.11.0.tgz b/assets/gitlab/gitlab-6.11.0.tgz deleted file mode 100644 index ee7787b70..000000000 Binary files a/assets/gitlab/gitlab-6.11.0.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.11.1.tgz b/assets/gitlab/gitlab-6.11.1.tgz deleted file mode 100644 index 43d73dec4..000000000 Binary files a/assets/gitlab/gitlab-6.11.1.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.11.2.tgz b/assets/gitlab/gitlab-6.11.2.tgz deleted file mode 100644 index 2e40e6372..000000000 Binary files a/assets/gitlab/gitlab-6.11.2.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.11.3.tgz b/assets/gitlab/gitlab-6.11.3.tgz deleted file mode 100644 index 5b61d8695..000000000 Binary files a/assets/gitlab/gitlab-6.11.3.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.11.4.tgz b/assets/gitlab/gitlab-6.11.4.tgz deleted file mode 100644 index ebd0af15b..000000000 Binary files a/assets/gitlab/gitlab-6.11.4.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.11.5.tgz b/assets/gitlab/gitlab-6.11.5.tgz deleted file mode 100644 index 2f56c6740..000000000 Binary files a/assets/gitlab/gitlab-6.11.5.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.5.1.tgz b/assets/gitlab/gitlab-6.5.1.tgz deleted file mode 100644 index dd59b618c..000000000 Binary files a/assets/gitlab/gitlab-6.5.1.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.5.2.tgz b/assets/gitlab/gitlab-6.5.2.tgz deleted file mode 100644 index df0a6f67d..000000000 Binary files a/assets/gitlab/gitlab-6.5.2.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.5.3.tgz b/assets/gitlab/gitlab-6.5.3.tgz deleted file mode 100644 index 3eaebb2fa..000000000 Binary files a/assets/gitlab/gitlab-6.5.3.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.5.4.tgz b/assets/gitlab/gitlab-6.5.4.tgz deleted file mode 100644 index 2e89ec3ec..000000000 Binary files a/assets/gitlab/gitlab-6.5.4.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.5.5.tgz b/assets/gitlab/gitlab-6.5.5.tgz deleted file mode 100644 index 65e41b72a..000000000 Binary files a/assets/gitlab/gitlab-6.5.5.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.6.0.tgz b/assets/gitlab/gitlab-6.6.0.tgz deleted file mode 100644 index a75f5ccf4..000000000 Binary files a/assets/gitlab/gitlab-6.6.0.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.6.1.tgz b/assets/gitlab/gitlab-6.6.1.tgz deleted file mode 100644 index 96d8aa8e8..000000000 Binary files a/assets/gitlab/gitlab-6.6.1.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.6.2.tgz b/assets/gitlab/gitlab-6.6.2.tgz deleted file mode 100644 index 9395e1abb..000000000 Binary files a/assets/gitlab/gitlab-6.6.2.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.7.0.tgz b/assets/gitlab/gitlab-6.7.0.tgz deleted file mode 100644 index 577122304..000000000 Binary files a/assets/gitlab/gitlab-6.7.0.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.7.3.tgz b/assets/gitlab/gitlab-6.7.3.tgz deleted file mode 100644 index 12e98461d..000000000 Binary files a/assets/gitlab/gitlab-6.7.3.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.7.5.tgz b/assets/gitlab/gitlab-6.7.5.tgz deleted file mode 100644 index b413ea246..000000000 Binary files a/assets/gitlab/gitlab-6.7.5.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.8.0.tgz b/assets/gitlab/gitlab-6.8.0.tgz deleted file mode 100644 index d27062078..000000000 Binary files a/assets/gitlab/gitlab-6.8.0.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.8.1.tgz b/assets/gitlab/gitlab-6.8.1.tgz deleted file mode 100644 index 7f8fbf966..000000000 Binary files a/assets/gitlab/gitlab-6.8.1.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.8.3.tgz b/assets/gitlab/gitlab-6.8.3.tgz deleted file mode 100644 index cc24325fa..000000000 Binary files a/assets/gitlab/gitlab-6.8.3.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.9.1.tgz b/assets/gitlab/gitlab-6.9.1.tgz deleted file mode 100644 index e2da8d93f..000000000 Binary files a/assets/gitlab/gitlab-6.9.1.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.9.2.tgz b/assets/gitlab/gitlab-6.9.2.tgz deleted file mode 100644 index 49790bdd2..000000000 Binary files a/assets/gitlab/gitlab-6.9.2.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-6.9.3.tgz b/assets/gitlab/gitlab-6.9.3.tgz deleted file mode 100644 index ca09aa6af..000000000 Binary files a/assets/gitlab/gitlab-6.9.3.tgz and /dev/null differ diff --git a/assets/gitlab/gitlab-7.0.1.tgz b/assets/gitlab/gitlab-7.0.1.tgz deleted file mode 100644 index 14e440faf..000000000 Binary files a/assets/gitlab/gitlab-7.0.1.tgz and /dev/null differ diff --git a/charts/gitlab/gitlab/CHANGELOG.md b/charts/gitlab/gitlab/CHANGELOG.md deleted file mode 100644 index a1c90e7de..000000000 --- a/charts/gitlab/gitlab/CHANGELOG.md +++ /dev/null @@ -1,4706 +0,0 @@ -**Note:** This file is automatically generated. Please see the [developer -documentation](doc/development/changelog.md) for instructions on adding your own -entry. - -## 7.0.1 (2023-05-22) - -No changes. - -## 7.0.0 (2023-05-18) - -### Added (5 changes) - -- [Registry; add support for database discovery for primary records](gitlab-org/charts/gitlab@02618c9b63bfac6c6baf257bc020439a45d3f220) ([merge request](gitlab-org/charts/gitlab!3142)) -- [Add SMTP read and write timeout values](gitlab-org/charts/gitlab@843467c988f90f358d58ace7c6514634443b384f) ([merge request](gitlab-org/charts/gitlab!3156)) -- [Add annotations to upgradeCheck ConfigMap](gitlab-org/charts/gitlab@9bd462052cc3ca33994ff262c66208ec8d70a7c8) by @LukasAuerbeck ([merge request](gitlab-org/charts/gitlab!3116)) -- [ Adding containerSecurityContext logic to geo chart](gitlab-org/charts/gitlab@10d9b8c945f10f9e84f1b280e88a040e33586f5b) ([merge request](gitlab-org/charts/gitlab!3127)) -- [Allow configuring an embedding database](gitlab-org/charts/gitlab@6a923ec7421e814add2fef3069320c13f28f354c) ([merge request](gitlab-org/charts/gitlab!3107)) - -### Fixed (7 changes) - -- [Fix backup spec navigation](gitlab-org/charts/gitlab@76a7ce992586471bfb6c99efb58be1dc1cfce373) ([merge request](gitlab-org/charts/gitlab!3183)) -- [Mount the microsoft_graph_mailer client secret in the backup-job pod](gitlab-org/charts/gitlab@fe175620908510f3b1eb3728bc164cc4bad68e81) ([merge request](gitlab-org/charts/gitlab!3168)) -- [Geo: add geo psql SSL mounts](gitlab-org/charts/gitlab@0ed7ea60b8e3d37e1b9b71977c23f085a8df6250) ([merge request](gitlab-org/charts/gitlab!3170)) -- [Skip pages backup on database upgrade](gitlab-org/charts/gitlab@5efab9266397750252a457a230cddffee87c9143) ([merge request](gitlab-org/charts/gitlab!3167)) -- [Validate that SMTP settings do not enable both TLS and STARTTLS](gitlab-org/charts/gitlab@aefcfb104aaa871a70203fc04a07686d935761f5) ([merge request](gitlab-org/charts/gitlab!3158)) -- [Support configuring proxy_download for each object store type](gitlab-org/charts/gitlab@4db1b9b2b5c0e8da53bb43439d267343be34b447) ([merge request](gitlab-org/charts/gitlab!3154)) -- [Fix possessive](gitlab-org/charts/gitlab@68f0f088cdc7b3be96d92e65c8b21a3ed8104c2f) ([merge request](gitlab-org/charts/gitlab!3097)) - -### Changed (14 changes) - -- [Update gitlab-org/container-registry from 3.73.0-gitlab to 3.73.1-gitlab](gitlab-org/charts/gitlab@5f160022cc68e214ea083189649f8332bdc5df34) ([merge request](gitlab-org/charts/gitlab!3185)) -- [Update bundled Redis sub-chart and add upgrade docs](gitlab-org/charts/gitlab@6e07c473134100d7b63b92d2eac8a369179e9d98) ([merge request](gitlab-org/charts/gitlab!3140)) -- [Use PostgreSQL Chart 11.9.13](gitlab-org/charts/gitlab@5b1febf0757464eac61744a3388acd14667d0d1b) ([merge request](gitlab-org/charts/gitlab!3143)) -- [Enable Sidekiq JSON logs by default](gitlab-org/charts/gitlab@92bb399c4fd13321c51114b2529171cbf71c8e24) ([merge request](gitlab-org/charts/gitlab!3169)) -- [Switch gitlab-shell logs to JSON by default](gitlab-org/charts/gitlab@59a722892c5421621e5a0af640a732ef0cbc8504) ([merge request](gitlab-org/charts/gitlab!3171)) -- [Update gitlab-org/gitlab-exporter from 12.1.1 to 13.0.0](gitlab-org/charts/gitlab@6e9477a65a963a5ae8e3197e76920b21193287ba) ([merge request](gitlab-org/charts/gitlab!3166)) -- [Update gitlab-org/container-registry from 3.72.0-gitlab to 3.73.0-gitlab](gitlab-org/charts/gitlab@aa8116c54b4014647c21044113b02043462c87f4) ([merge request](gitlab-org/charts/gitlab!3165)) -- [Default GitLab chart to have main, and ci connections](gitlab-org/charts/gitlab@f42289a275cb6886c5978c0546dcdb50ee04d991) ([merge request](gitlab-org/charts/gitlab!3132)) -- [Bump certmanager to 1.11.1](gitlab-org/charts/gitlab@e4f2bf7d6d7ed7ff02174957fa8408ebbca63322) ([merge request](gitlab-org/charts/gitlab!3108)) -- [Ensure upgrade path to 7.0](gitlab-org/charts/gitlab@0cdbf193e90b67c30a0cb6b6d02b0a9e8f8562ee) ([merge request](gitlab-org/charts/gitlab!3104)) -- [Unpin mail_room version](gitlab-org/charts/gitlab@ec946052deae64dea6cb7d49b34c26361874a233) ([merge request](gitlab-org/charts/gitlab!3075)) -- [Update gitlab-org/charts/gitlab-runner from 0.51.1 to 0.52.0](gitlab-org/charts/gitlab@7d54b3f3539b63ee661418f0a519c4509b5e1a2a) ([merge request](gitlab-org/charts/gitlab!3121)) -- [NGINX: tweak NGINX upstream configuration](gitlab-org/charts/gitlab@9cf76a7bf6c4c3487820103cb1bb48ef2bca2dbb) ([merge request](gitlab-org/charts/gitlab!3090)) -- [Bump default image to ubuntu:22.04](gitlab-org/charts/gitlab@70452769e698e6187e625cdc7db4d60555b07f4b) by @tlindsay42 ([merge request](gitlab-org/charts/gitlab!2986)) - -### Removed (4 changes) - -- [Remove registry compatibility section](gitlab-org/charts/gitlab@b4a3e47b96a2ddc3b1c0250510f875e114d02445) ([merge request](gitlab-org/charts/gitlab!3117)) -- [Remove bundled Grafana chart and related configuration](gitlab-org/charts/gitlab@24d6c76d54e7800fd8fee20ee5fbba2180d36aae) ([merge request](gitlab-org/charts/gitlab!3112)) -- [Remove deprecated KAS `metrics.port` config](gitlab-org/charts/gitlab@b1bf1b4686c74015b8d93bd24dcef350490fac1b) ([merge request](gitlab-org/charts/gitlab!3040)) -- [Remove 'default_can_create_group' setting](gitlab-org/charts/gitlab@0d58ba1ea5b7d29da3891d6643afe2e72e1480a8) ([merge request](gitlab-org/charts/gitlab!3105)) - -### Other (3 changes) - -- [Consolidate webservice TLS configuration](gitlab-org/charts/gitlab@7412c984cda3683c60ba3c3e48bf2474ec88209e) ([merge request](gitlab-org/charts/gitlab!3135)) -- [Update extraEnvFrom docs](gitlab-org/charts/gitlab@994ab9824f518701ed7059e28c7fdf1b2c97e446) ([merge request](gitlab-org/charts/gitlab!3025)) -- [Add tests for Webservice ConfigMap name](gitlab-org/charts/gitlab@6d51d3fe5475a84166f23d5c5a0f23a1b38ce489) ([merge request](gitlab-org/charts/gitlab!3091)) - -## 6.11.4 (2023-05-16) - -### Added (1 change) - -- [Add SMTP read and write timeout values](gitlab-org/charts/gitlab@e340af25bb5f51ab21ca76fefb3c70c063baadf1) ([merge request](gitlab-org/charts/gitlab!3160)) - -### Fixed (1 change) - -- [Validate that SMTP settings do not enable both TLS and STARTTLS](gitlab-org/charts/gitlab@24172826e46afc3a585df642123ba946bce2d9e3) ([merge request](gitlab-org/charts/gitlab!3163)) - -## 6.11.3 (2023-05-10) - -No changes. - -## 6.11.2 (2023-05-03) - -No changes. - -## 6.11.1 (2023-05-01) - -No changes. - -## 6.11.0 (2023-04-21) - -### Added (7 changes) - -- [Add the ability to install the ebs_csi_driver](gitlab-org/charts/gitlab@5c978d41d7cb528eef7f90a520d73b0ce83c7dcf) ([merge request](gitlab-org/charts/gitlab!3083)) -- [Adding containerSecurityContext logic to sidekiq chart](gitlab-org/charts/gitlab@64e60de58e4c2ead512856a605bd30de273321c5) by @rgarcia65201 ([merge request](gitlab-org/charts/gitlab!3044)) -- [Add support for the workhorse GCS client](gitlab-org/charts/gitlab@70f6ea0c037bcc0343ae7fd7da258d8e43a087bd) ([merge request](gitlab-org/charts/gitlab!3060)) -- [Configurations for duo auth](gitlab-org/charts/gitlab@40b28a67dab49bd29f5b3c7604d323db58f958cb) ([merge request](gitlab-org/charts/gitlab!3043)) -- [Bump gitlab-zoekt version to 0.2.0](gitlab-org/charts/gitlab@05b450d0a28b1bfb46245d4e88ee47157f092eca) ([merge request](gitlab-org/charts/gitlab!3049)) -- [Add kubeval for Kubernetes 1.25](gitlab-org/charts/gitlab@973d2080aca68789a5ee061499f2d07a2eecf47a) ([merge request](gitlab-org/charts/gitlab!3031)) -- [Add the gitlab/gitlab-zoekt chart as optional (disabled) dependency](gitlab-org/charts/gitlab@4f02bb948502de173beec97bc436df84202e34af) ([merge request](gitlab-org/charts/gitlab!3018)) - -### Fixed (2 changes) - -- [Add Prometheus annotations to postgres-metrics service](gitlab-org/charts/gitlab@a8ca140916db03aed9309760f68a944bdcc83098) by @remram44 ([merge request](gitlab-org/charts/gitlab!3079)) -- [Webservice: make Workhorse stick around for SHUTDOWN_BLACKOUT_SECONDS](gitlab-org/charts/gitlab@2a14d9b3e7034520cfaa63f9e4af1f60800820dd) ([merge request](gitlab-org/charts/gitlab!3084)) - -### Changed (5 changes) - -- [Update gitlab-org/container-registry from 3.71.0-gitlab to 3.71.0-gitlab](gitlab-org/charts/gitlab@d716d2db682ba941c44481172773b12a8844384a) ([merge request](gitlab-org/charts/gitlab!3100)) -- [Bump Container Registry to v3.71.0-gitlab](gitlab-org/charts/gitlab@170b162a33c1c8727cbcf137c38388e0c3b1cb78) ([merge request](gitlab-org/charts/gitlab!3096)) -- [Update NLB example for AWS Load Balancer Controller](gitlab-org/charts/gitlab@03859fa3c19b41bdeb717eda7bc08c6c4118f669) ([merge request](gitlab-org/charts/gitlab!3014)) -- [Update gitlab-org/container-registry from 3.69.0-gitlab to 3.70.0-gitlab](gitlab-org/charts/gitlab@8b1c2eb3db3a00e738fbbd127ff7259579c2c4d9) ([merge request](gitlab-org/charts/gitlab!3069)) -- [Update gitlab-org/charts/gitlab-runner from 0.51.0 to 0.51.1](gitlab-org/charts/gitlab@3fc3b1280511b6c614d981cba6d27ca862fb1bb0) ([merge request](gitlab-org/charts/gitlab!3061)) - -### Other (4 changes) - -- [Docs: Clarify `global.serviceAccount` usage](gitlab-org/charts/gitlab@e794742aabc27893b3e4c465fc27aa3fc744843c) ([merge request](gitlab-org/charts/gitlab!3110)) -- [Bump gitlab-zoekt to v0.3.0](gitlab-org/charts/gitlab@418f28559cbb547d2cb36b7e56c08bc6046f05c3) ([merge request](gitlab-org/charts/gitlab!3094)) -- [Remove references to unused 'fullnameOverride' key](gitlab-org/charts/gitlab@34b9c0d5d1f5227b8bb1b2496e3be6f9ff3a9ec0) ([merge request](gitlab-org/charts/gitlab!3092)) -- [checkConfig: verify format of omniauth provider content](gitlab-org/charts/gitlab@f419b34386799a83587eeecfea142070477e8029) ([merge request](gitlab-org/charts/gitlab!3054)) - -## 6.10.7 (2023-05-10) - -No changes. - -## 6.10.6 (2023-05-03) - -No changes. - -## 6.10.5 (2023-05-01) - -No changes. - -## 6.10.4 (2023-04-21) - -No changes. - -## 6.10.3 (2023-04-14) - -No changes. - -## 6.10.2 (2023-04-05) - -No changes. - -## 6.10.1 (2023-03-30) - -No changes. - -## 6.10.0 (2023-03-21) - -### Added (6 changes) - -- [Support setting extra env vars for kas](gitlab-org/charts/gitlab@f8c5589fc5c82ea20b3798838da007b066ec67e4) ([merge request](gitlab-org/charts/gitlab!3023)) -- [Add containerSecurityContext helper templates and values to Gitaly chart ](gitlab-org/charts/gitlab@a7cd11bbc886271d4212ad368fd41885a674a647) by @BrettSeedling ([merge request](gitlab-org/charts/gitlab!2793)) -- [Add new cron backup parameter Ref #3076](gitlab-org/charts/gitlab@42b7f8dab938d0d748318d736a42e0070472ccea) by @Vedrillan ([merge request](gitlab-org/charts/gitlab!2984)) -- [Add support for Gitaly GPG signing](gitlab-org/charts/gitlab@d65fa4b7880f2b006cb1f0b54c704d47febee136) ([merge request](gitlab-org/charts/gitlab!2754)) -- [Add support for fsGroupChangePolicy to all subcharts](gitlab-org/charts/gitlab@20283351cbe24015d25b7823746534c9b65a139a) ([merge request](gitlab-org/charts/gitlab!3000)) -- [Added `useGenericEphemeralVolume` for backup-job](gitlab-org/charts/gitlab@ae5f493574d647b050f3a5c50f35f364dec69abe) by @daniel.marks ([merge request](gitlab-org/charts/gitlab!2937)) - -### Fixed (1 change) - -- [Fix config for Registry Deployment TLS SecretName](gitlab-org/charts/gitlab@3be948165d0f20c9fdc9eadaafaaaf80d4e50b09) ([merge request](gitlab-org/charts/gitlab!3017)) - -### Changed (8 changes) - -- [Update gitlab-org/charts/gitlab-runner from 0.50.1 to 0.51.0](gitlab-org/charts/gitlab@2b0632a49d5e3d58d4bd75c08fcb2bb303af21e3) ([merge request](gitlab-org/charts/gitlab!3036)) -- [Honor gitlab.psql.ci.enabled=false when generating database.yml](gitlab-org/charts/gitlab@e65fd651417c88a3f187b5fe00f4ddca2baa2bcc) ([merge request](gitlab-org/charts/gitlab!3016)) -- [Bump Container Registry to v3.69.0-gitlab](gitlab-org/charts/gitlab@c539445598a8991fa34c1af2b15efdf34d7d1adb) ([merge request](gitlab-org/charts/gitlab!3026)) -- [Update gitlab-org/container-registry from 3.67.0-gitlab to 3.68.0-gitlab](gitlab-org/charts/gitlab@5f9964246cf95b29ecd39eb730d6947aebe81249) ([merge request](gitlab-org/charts/gitlab!3007)) -- [Bump prometheus to 2.38.0](gitlab-org/charts/gitlab@6278c7572da075d11b5e5c92089a598288162afe) ([merge request](gitlab-org/charts/gitlab!3001)) -- [Replace deprecated k8s.gcr.io entries](gitlab-org/charts/gitlab@bde4f2113c7df880e14128fff4b6cfcacae2d1a1) by @tlindsay42 ([merge request](gitlab-org/charts/gitlab!2985)) -- [Update gitlab-org/charts/gitlab-runner from 0.49.3 to 0.50.1](gitlab-org/charts/gitlab@eda6fbc036bc24e01cdd2622d0b10662df574d46) ([merge request](gitlab-org/charts/gitlab!2996)) -- [Update gitlab-org/charts/gitlab-runner from 0.49.2 to 0.49.3](gitlab-org/charts/gitlab@82e4e9145a36b1a037674ebe3187116d2adce7a6) ([merge request](gitlab-org/charts/gitlab!2987)) - -### Other (4 changes) - -- [Remove GitLab Runner UBI known limitation](gitlab-org/charts/gitlab@3444929667ec0e7c5cf26e10da984fdcb1442431) ([merge request](gitlab-org/charts/gitlab!3034)) -- [Add docs and config check for gitlab-shell metrics](gitlab-org/charts/gitlab@e46e19b84a47f45018e39af1e5e0731be6982a1f) ([merge request](gitlab-org/charts/gitlab!3006)) -- [Add more context to sidekiq pod deprecation notices](gitlab-org/charts/gitlab@fdaef9d08c68beac06b0bcff16d0ec6b1bc274aa) ([merge request](gitlab-org/charts/gitlab!2966)) -- [Add more context to sidekiq pod deprecation notices](gitlab-org/charts/gitlab@378fd9116dc5147d9d4c23d81a72e0e8089f138e) ([merge request](gitlab-org/charts/gitlab!2972)) - -## 6.9.8 (2023-05-10) - -No changes. - -## 6.9.7 (2023-05-03) - -No changes. - -## 6.9.6 (2023-05-01) - -No changes. - -## 6.9.5 (2023-04-21) - -No changes. - -## 6.9.4 (2023-03-30) - -No changes. - -## 6.9.3 (2023-03-09) - -No changes. - -## 6.9.2 (2023-03-02) - -No changes. - -## 6.9.1 (2023-02-23) - -### Changed (1 change) - -- [Update gitlab-org/charts/gitlab-runner from 0.49.3 to 0.50.1](gitlab-org/charts/gitlab@95cb8869b072a926117edd1335202120dd3db9bc) ([merge request](gitlab-org/charts/gitlab!2998)) - -## 6.9.0 (2023-02-21) - -### Added (4 changes) - -- [Add troubleshooting docs and note about annotation-value-word-blocklist](gitlab-org/charts/gitlab@cef52d0a33abd089e01d77e0749bdfda8b7a3ec2) ([merge request](gitlab-org/charts/gitlab!2978)) -- [redis: Introduce support for Redis Cluster and specifying acl user](gitlab-org/charts/gitlab@630ce39a02927d40fa28a13f0590967a133fd2ef) ([merge request](gitlab-org/charts/gitlab!2873)) -- [Add ci_runners_stale_machines_cleanup_worker cronjob](gitlab-org/charts/gitlab@8742fcbb39033f5e3baaf8226d5a370fd5604357) ([merge request](gitlab-org/charts/gitlab!2913)) -- [Add support for toolbox.securityContext.fsGroupChangePolicy](gitlab-org/charts/gitlab@0217b7f8e8328fbec7c49af7c1f62cd34fcc03f6) ([merge request](gitlab-org/charts/gitlab!2905)) - -### Fixed (4 changes) - -- [Fix unwanted 'v' prefix in helper image tag](gitlab-org/charts/gitlab@47aa2e34bbd38ba968033255e5e035ab9b7c5749) ([merge request](gitlab-org/charts/gitlab!2982)) -- [Fix certmanager http01 solver on global "none" ingress class](gitlab-org/charts/gitlab@dbf596421f7cd5ee7374c107f2d6776249c75c69) ([merge request](gitlab-org/charts/gitlab!2908)) -- [Force copy files in `configure` initContainer](gitlab-org/charts/gitlab@3c8bd2730aa117f9d1d76088a1e6e8d742a0d878) ([merge request](gitlab-org/charts/gitlab!2953)) -- [Fix logic for Self-Signed-Certs Job inclusion](gitlab-org/charts/gitlab@b2d98174b41a831ad3b205cb367bf9904ebc2e25) ([merge request](gitlab-org/charts/gitlab!2862)) - -### Changed (9 changes) - -- [Update gitlab-org/container-registry from 3.66.0-gitlab to 3.67.0-gitlab](gitlab-org/charts/gitlab@6d0ecfb2bce4a1cc7ec021a4ab98e82e3cd8079e) ([merge request](gitlab-org/charts/gitlab!2980)) -- [Use 'gitlab.parseAppVersion' for helper image tags](gitlab-org/charts/gitlab@a350fe160cbb3bc549bafd8dd01d04e08a613623) ([merge request](gitlab-org/charts/gitlab!2878)) -- [Update gitlab-org/charts/gitlab-runner from 0.49.1 to 0.49.2](gitlab-org/charts/gitlab@0ef1d3fdbfb79d6f325bcf67da35b8cdfb9e36c0) ([merge request](gitlab-org/charts/gitlab!2970)) -- [Update gitlab-org/charts/gitlab-runner from 0.49.0 to 0.49.1](gitlab-org/charts/gitlab@89398c8f28e695a4f8416ddf729834e71258a70b) ([merge request](gitlab-org/charts/gitlab!2959)) -- [Update gitlab-org/gitlab-exporter from 12.1.0 to 12.1.1](gitlab-org/charts/gitlab@ec0922cef35b9c6799dcc2db4b6a38ddc8990969) ([merge request](gitlab-org/charts/gitlab!2958)) -- [Update gitlab-org/container-registry from 3.65.1-gitlab to 3.66.0-gitlab](gitlab-org/charts/gitlab@acecf98c3478f2faa1f5b39ef07ced9704184df3) ([merge request](gitlab-org/charts/gitlab!2946)) -- [Update link and information about Prometheus scraping TLS endpoint](gitlab-org/charts/gitlab@ed0e9d353e23f3f89e4685fd2d5ab3ded7b8eadb) ([merge request](gitlab-org/charts/gitlab!2931)) -- [Update gitlab-org/container-registry from 3.65.0-gitlab to 3.65.1-gitlab](gitlab-org/charts/gitlab@8a39c2456ae4fcd3169c8e6fb789b2c715e784ec) ([merge request](gitlab-org/charts/gitlab!2934)) -- [Update gitlab-org/charts/gitlab-runner from 0.48.1 to 0.49.0](gitlab-org/charts/gitlab@b0e0eadd387c10f9d2168902a33c7b07fbf1a331) ([merge request](gitlab-org/charts/gitlab!2933)) - -### Deprecated (1 change) - -- [Deprecate sidekiq queueSelector and negateQueues](gitlab-org/charts/gitlab@4f6e5846dbabd0b16f5fad771b8bb78dfaa241b8) ([merge request](gitlab-org/charts/gitlab!2969)) - -### Other (3 changes) - -- [Add defaultReplicationFactor in Praefect's ConfigMap.](gitlab-org/charts/gitlab@36e44f78978b368c1db99a5dc747686ab4363e8c) by @kyunam-jo ([merge request](gitlab-org/charts/gitlab!2844)) -- [Moved minio config to global in example config](gitlab-org/charts/gitlab@973557e4cf0c5ec1e0c399fcce557fae2a87de17) ([merge request](gitlab-org/charts/gitlab!2952)) -- [Doc - configure the GitLab chart with an decomposed database](gitlab-org/charts/gitlab@af72661b6f82f8f16dab591c8af67e44baf0b998) ([merge request](gitlab-org/charts/gitlab!2890)) - -## 6.8.6 (2023-04-18) - -No changes. - -## 6.8.5 (2023-03-30) - -No changes. - -## 6.8.4 (2023-03-02) - -No changes. - -## 6.8.3 (2023-02-15) - -No changes. - -## 6.8.2 (2023-02-10) - -### Changed (1 change) - -- [Update gitlab-org/charts/gitlab-runner from 0.49.0 to 0.49.1](gitlab-org/security/charts/gitlab@0edebdf10fc3386788d0668ab1b552813f4c60f2) - -## 6.8.1 (2023-01-30) - -No changes. - -## 6.8.0 (2023-01-20) - -### Added (4 changes) - -- [Add redisYmlOverride config setting](gitlab-org/charts/gitlab@977f28ed2da9a30b329e0cef905394a27c7c47dc) ([merge request](gitlab-org/charts/gitlab!2907)) -- [Allow configuring repository cache redis instance](gitlab-org/charts/gitlab@c5f6385840180861b8be564d2a64a032cdf1bc4c) ([merge request](gitlab-org/charts/gitlab!2896)) -- [Improve KAS TLS UX](gitlab-org/charts/gitlab@8fcbe634eb7bf181eb2ddfbd30fd5fe4a3af2fec) ([merge request](gitlab-org/charts/gitlab!2888)) -- [mail_room: Allow configuration of delete_after_delivery parameter](gitlab-org/charts/gitlab@7091675c3a222f35302e1d1876e9b134e0f648ea) ([merge request](gitlab-org/charts/gitlab!2906)) - -### Fixed (1 change) - -- [Fix indent for priorityClassName in Toolbox backup job](gitlab-org/charts/gitlab@e94049797f3788661c7d0967ead0b7581a1c4361) by @george.poputnikov ([merge request](gitlab-org/charts/gitlab!2898)) - -### Changed (4 changes) - -- [Update gitlab-org/container-registry from 3.64.0-gitlab to 3.65.0-gitlab](gitlab-org/charts/gitlab@744f9ca839e3c322e1202ad700f79e61595c7a51) ([merge request](gitlab-org/charts/gitlab!2916)) -- [Update gitlab-org/charts/gitlab-runner from 0.48.0 to 0.48.1](gitlab-org/charts/gitlab@460c275eaca9b1e3bf063947ca49629edef57d80) ([merge request](gitlab-org/charts/gitlab!2915)) -- [Update gitlab-org/gitlab-exporter from 11.18.2 to 12.1.0](gitlab-org/charts/gitlab@428de3dd7c208a0469b18b927fece2bc54029b19) ([merge request](gitlab-org/charts/gitlab!2911)) -- [Update gitlab-org/container-registry from 3.63.0-gitlab to 3.64.0-gitlab](gitlab-org/charts/gitlab@a1edaea5f4d9d2a6d972b7412deafe6a2b50aedb) ([merge request](gitlab-org/charts/gitlab!2904)) - -## 6.7.9 (2023-04-20) - -No changes. - -## 6.7.8 (2023-03-02) - -No changes. - -## 6.7.7 (2023-02-10) - -No changes. - -## 6.7.6 (2023-01-30) - -### Fixed (1 change) - -- [Fix indent for priorityClassName in Toolbox backup job](gitlab-org/security/charts/gitlab@3ef41cf43a34d56bcdfd1353cffc5edec3fe9e08) - -## 6.7.4 (2023-01-12) - -No changes. - -## 6.7.3 (2023-01-11) - -No changes. - -## 6.7.2 (2023-01-09) - -No changes. - -## 6.7.1 (2023-01-05) - -No changes. - -## 6.7.0 (2022-12-21) - -### Added (2 changes) - -- [Add `global.image.tagSuffix` as a helm values option](gitlab-org/charts/gitlab@3121e20827686340a12df2a5181d18e4807c13d4) ([merge request](gitlab-org/charts/gitlab!2881)) -- [Add suggested reviewers secret and configurations](gitlab-org/charts/gitlab@5e5ae509458443db6ad7b7233ba9d0e0ef98a172) ([merge request](gitlab-org/charts/gitlab!2875)) - -### Fixed (1 change) - -- [Fix MS Graph Mailer configuration and handling](gitlab-org/charts/gitlab@db172742491bea2ffe8a809c179cfe8f42911714) ([merge request](gitlab-org/charts/gitlab!2882)) - -### Changed (8 changes) - -- [Update gitlab-org/charts/gitlab-runner from 0.47.1 to 0.48.0](gitlab-org/charts/gitlab@a1dd9edc0d32227922ecad687e844a2bc742ebdc) ([merge request](gitlab-org/charts/gitlab!2889)) -- [Update gitlab-org/container-registry from 3.62.0-gitlab to 3.63.0-gitlab](gitlab-org/charts/gitlab@1a2bd28c62dd2b5cfe4cbf7a20cf108ed9cab860) ([merge request](gitlab-org/charts/gitlab!2885)) -- [Update gitlab-org/container-registry from 3.61.0-gitlab to 3.62.0-gitlab](gitlab-org/charts/gitlab@ee34bbb67372942fff76909803726c23534e84cb) ([merge request](gitlab-org/charts/gitlab!2879)) -- [Update gitlab-org/charts/gitlab-runner from 0.47.0 to 0.47.1](gitlab-org/charts/gitlab@5697ae4eef892034017d3681d5296cd8c838a188) ([merge request](gitlab-org/charts/gitlab!2869)) -- [Set Sidekiq default max concurrency to 20](gitlab-org/charts/gitlab@d60dba0a6c7cd1187e7c4428a5292ce46feb6a30) ([merge request](gitlab-org/charts/gitlab!2868)) -- [Update gitlab-org/charts/gitlab-runner from 0.46.1 to 0.47.0](gitlab-org/charts/gitlab@4d7f34bec4b461e0480794b5e0c1a484b68274ba) ([merge request](gitlab-org/charts/gitlab!2865)) -- [Refine .helmignore](gitlab-org/charts/gitlab@5a91ceb6b30369778092e6bb00d09913ef540c76) ([merge request](gitlab-org/charts/gitlab!2864)) -- [Change the order of KAS Ingress Rules](gitlab-org/charts/gitlab@5fb28d69e17fd20578214696f4bf3b06ceb83c9b) by @rfinch ([merge request](gitlab-org/charts/gitlab!2738)) - -### Other (1 change) - -- [Use kubectl image with kubectl 1.24.7, yq 4.30.1](gitlab-org/charts/gitlab@e0c892e060ac405d8a2c90f7b4d632e1b3512728) ([merge request](gitlab-org/charts/gitlab!2871)) - -## 6.6.8 (2023-02-10) - -No changes. - -## 6.6.7 (2023-01-30) - -### Fixed (1 change) - -- [Fix indent for priorityClassName in Toolbox backup job](gitlab-org/security/charts/gitlab@47836b96b8ae6dd8fd7f7bab4f59e5321ecb023c) - -## 6.6.5 (2023-01-12) - -No changes. - -## 6.6.4 (2023-01-09) - -No changes. - -## 6.6.3 (2022-12-21) - -No changes. - -## 6.6.2 (2022-12-05) - -No changes. - -## 6.6.1 (2022-11-30) - -No changes. - -## 6.6.0 (2022-11-21) - -### Added (8 changes) - -- [Make it possible to choose which nginx-ingress generated service will expose gitlab-shell](gitlab-org/charts/gitlab@5be723580bcaf78c2071a0024785261b33a24f91) by @mike554 ([merge request](gitlab-org/charts/gitlab!2730)) -- [Add global priorityClassName](gitlab-org/charts/gitlab@a79bd8e508352fd7dedd5fe4fe2de8a05c058812) by @robinelfrink ([merge request](gitlab-org/charts/gitlab!2603)) -- [Add auth-cookie-session-timeout flag](gitlab-org/charts/gitlab@04d7859daa17213f03e6f28c7c59f62231955f33) ([merge request](gitlab-org/charts/gitlab!2838)) -- [Allow setting load_balancing.discover.max_replica_pools](gitlab-org/charts/gitlab@7615476dcd686696472894763aa7f441969d6e3f) ([merge request](gitlab-org/charts/gitlab!2841)) -- [Add microsoft_graph_mailer settings](gitlab-org/charts/gitlab@5398a0f8ebd7468201cc3e54c1e58a7a1296fbea) ([merge request](gitlab-org/charts/gitlab!2784)) -- [Allow to set securityContext.fsGroupChangePolicy on Gitaly StatefulSet](gitlab-org/charts/gitlab@fc45b560a8366b9c56459a30c173510ea8d8cc0c) by @ngourdon ([merge request](gitlab-org/charts/gitlab!2786)) -- [Add the ntp host option for praefect](gitlab-org/charts/gitlab@2de143ff6e05cf4ca6a4328c2ea875f3425473c2) by @julien.godin ([merge request](gitlab-org/charts/gitlab!2833)) -- [Support terminationGracePeriodSeconds for kas](gitlab-org/charts/gitlab@591c38e467e39381f98e4880b4070f15fb933b18) ([merge request](gitlab-org/charts/gitlab!2823)) - -### Fixed (1 change) - -- [Remove duplicate labels from geo-logcursor deployment](gitlab-org/charts/gitlab@2b9837a575bb3a096b99b92b2db4e3204f4770fd) by @matthijs.galesloot ([merge request](gitlab-org/charts/gitlab!2848)) - -### Changed (9 changes) - -- [Use HTTP readiness and liveness probes in KAS service](gitlab-org/charts/gitlab@82d46004f1926f2d80f3000b237ff653937ec061) ([merge request](gitlab-org/charts/gitlab!2839)) -- [GKE cluster setup: Use more cost efficient defaults](gitlab-org/charts/gitlab@6ca2dfa9050f071c7ea0e6dd03c53c9934b65dbb) ([merge request](gitlab-org/charts/gitlab!2846)) -- [upgrade-check: fix link to upgrade paths](gitlab-org/charts/gitlab@92546240d859b22a4e74c34e534a41aa8f2cc790) ([merge request](gitlab-org/charts/gitlab!2860)) -- [Update gitlab-org/container-registry from 3.60.2-gitlab to 3.61.0-gitlab](gitlab-org/charts/gitlab@b4f333f9d1d625fba757efb2b30bf2dccdd660c3) ([merge request](gitlab-org/charts/gitlab!2858)) -- [Update gitlab-org/charts/gitlab-runner from 0.46.0 to 0.46.1](gitlab-org/charts/gitlab@df9042dc4670e68d58133ff2c0df91d64d7312fb) ([merge request](gitlab-org/charts/gitlab!2857)) -- [Update gitlab-org/container-registry from 3.60.1-gitlab to 3.60.2-gitlab](gitlab-org/charts/gitlab@241c6e7b2ea0f3519e196ff1d8665dd3db798075) ([merge request](gitlab-org/charts/gitlab!2853)) -- [Reference NGINX Ingress Controller v1.2.1](gitlab-org/charts/gitlab@16806386287fe15c50d7f1cb784f5969f3cc94dc) ([merge request](gitlab-org/charts/gitlab!2843)) -- [Update gitlab-org/container-registry from 3.58.0-gitlab to 3.60.0-gitlab](gitlab-org/charts/gitlab@5704dd87f8b727fcfc4a4a95598963b73a9def9f) ([merge request](gitlab-org/charts/gitlab!2832)) -- [Update gitlab-org/charts/gitlab-runner from 0.45.0 to 0.46.0](gitlab-org/charts/gitlab@c87b340719a325e1dc83a5487ec6478e7664f4a2) ([merge request](gitlab-org/charts/gitlab!2824)) - -### Removed (1 change) - -- [Container Registry: remove testslowimport migration setting](gitlab-org/charts/gitlab@b433267a4a406dc7dbfd22c72de930cf62994eea) ([merge request](gitlab-org/charts/gitlab!2818)) - -## 6.5.9 (2023-01-12) - -No changes. - -## 6.5.8 (2023-01-09) - -No changes. - -## 6.5.7 (2022-12-07) - -No changes. - -## 6.5.6 (2022-11-30) - -No changes. - -## 6.5.5 (2022-11-11) - -No changes. - -## 6.5.4 (2022-11-09) - -No changes. - -## 6.5.3 (2022-11-07) - -No changes. - -## 6.5.2 (2022-11-02) - -No changes. - -## 6.5.1 (2022-10-24) - -No changes. - -## 6.5.0 (2022-10-21) - -### Added (2 changes) - -- [Makes TLS communication between KAS pods possible](gitlab-org/charts/gitlab@d9af396d592f5003c922530fe5e5d78353570d78) ([merge request](gitlab-org/charts/gitlab!2803)) -- [Allow enabling sidekiq_exporter logs](gitlab-org/charts/gitlab@bf9d4bf6cc34807e9c7a3772be5d9c6ea40bd9da) ([merge request](gitlab-org/charts/gitlab!2774)) - -### Fixed (2 changes) - -- [Gitaly: remove Istio prefixes for grpc](gitlab-org/charts/gitlab@bd20b431d0dfa2817a43e739787e8ad22c398942) ([merge request](gitlab-org/charts/gitlab!2811)) -- [Sidekiq/toolbox: add gitlab_shell.ssh_port to gitlab.yml](gitlab-org/charts/gitlab@f9c45bf50a20e9dcff0613ff4cc1414663a5ca29) ([merge request](gitlab-org/charts/gitlab!2782)) - -### Changed (5 changes) - -- [Update gitlab-org/container-registry from 3.57.0-gitlab to 3.58.0-gitlab](gitlab-org/charts/gitlab@af4a7dd04075c820fc24731db3e08e25b07a3660) ([merge request](gitlab-org/charts/gitlab!2813)) -- [Document that Google Cloud CDN needs bucket permissions](gitlab-org/charts/gitlab@4adb9229a0583ae2bf4f3276e3e760edcd1a9720) ([merge request](gitlab-org/charts/gitlab!2799)) -- [Registry: use secret from redis cache configuration](gitlab-org/charts/gitlab@4ea66c7b3908b9feef9399ed0f2bd61848f16565) ([merge request](gitlab-org/charts/gitlab!2771)) -- [CI: Specify `type` labels for issue-bot](gitlab-org/charts/gitlab@a57455ad73d115d063c7977f0896f862c88cd724) ([merge request](gitlab-org/charts/gitlab!2796)) -- [Update gitlab-org/charts/gitlab-runner from 0.44.0 to 0.45.0](gitlab-org/charts/gitlab@2360a35e65df8719e5b4e1fe0c4da48ea9827225) ([merge request](gitlab-org/charts/gitlab!2790)) - -### Deprecated (1 change) - -- [Deprecate `default_can_create_group` setting](gitlab-org/charts/gitlab@f1a26138682ffb1cb364752066ec23edf675d97a) ([merge request](gitlab-org/charts/gitlab!2763)) - -### Other (2 changes) - -- [Update nokogiri from 1.11.2 to 1.13.8](gitlab-org/charts/gitlab@4ca05285a0120d69a708d6fb406c441199ea3d9e) ([merge request](gitlab-org/charts/gitlab!2780)) -- [Update activesupport from 6.0.3.4 to 7.0.4](gitlab-org/charts/gitlab@184a94790f7de95aec576ad273d4fb9a9ec2722e) ([merge request](gitlab-org/charts/gitlab!2781)) - -## 6.4.6 (2022-11-30) - -No changes. - -## 6.4.5 (2022-11-15) - -No changes. - -## 6.4.4 (2022-11-02) - -No changes. - -## 6.4.3 (2022-10-19) - -No changes. - -## 6.4.2 (2022-10-04) - -No changes. - -## 6.4.1 (2022-09-29) - -No changes. - -## 6.4.0 (2022-09-21) - -### Added (5 changes) - -- [Add support for Kerberos settings](gitlab-org/charts/gitlab@09d14a62711de10cf6b493f01bb5d07c9ab3b90a) by @risson ([merge request](gitlab-org/charts/gitlab!2132)) -- [Registry: support defining a local set of sentinels](gitlab-org/charts/gitlab@dbaca1a0a0c58607b0380e134bc7748e56b3f7c8) ([merge request](gitlab-org/charts/gitlab!2729)) -- [Add AWS EKS-specific instructions in Quick Start](gitlab-org/charts/gitlab@33db1da75cd44cb0f93f6440123e2f8d710ee7c1) ([merge request](gitlab-org/charts/gitlab!2725)) -- [Registry: add checkConfig and RSpec for svc TLS](gitlab-org/charts/gitlab@3b7fc26280dda65606b41b2f85d6b16d84b01651) ([merge request](gitlab-org/charts/gitlab!2726)) -- [Add 1.22 cluster references](gitlab-org/charts/gitlab@58a6afff10c6d34997fb490f2d635a08c3cdea30) ([merge request](gitlab-org/charts/gitlab!2674)) - -### Fixed (3 changes) - -- [Adds `gitlab.extraEnvFrom` to sidekiq main container](gitlab-org/charts/gitlab@cd76f7222c5e7ad6947653fe25192f9228f5138b) ([merge request](gitlab-org/charts/gitlab!2759)) -- [Fix digest of GitLab NGINX Ingress Controller](gitlab-org/charts/gitlab@2e387219e6f667d5e81173ec0b69463b77eb277c) ([merge request](gitlab-org/charts/gitlab!2744)) -- [gitlab.scripts.configure.secrets: handle duplicates, allow none](gitlab-org/charts/gitlab@c4f4d03a4275ace1d618330b46cf4b2316c918ac) ([merge request](gitlab-org/charts/gitlab!2703)) - -### Changed (6 changes) - -- [Provide default secretName for Workhorse TLS](gitlab-org/charts/gitlab@de5e7378e6ecb2626031a7ee10ccbb8b9641c8d2) ([merge request](gitlab-org/charts/gitlab!2764)) -- [Add appProtocol prefix to Service port names](gitlab-org/charts/gitlab@5efcf454a38f39a8c8007c7e326eb254cb12e203) ([merge request](gitlab-org/charts/gitlab!2705)) -- [Create Pages metrics service if metrics enabled](gitlab-org/charts/gitlab@bf4c2232830ff129c8f886581b6bcbcff0cb8750) ([merge request](gitlab-org/charts/gitlab!2517)) -- [Update gitlab-org/gitlab-exporter from 11.18.0 to 11.18.1](gitlab-org/charts/gitlab@39ecf265ee419c7f8602038ffa39e0aed6e4e64b) ([merge request](gitlab-org/charts/gitlab!2745)) -- [Update gitlab-org/charts/gitlab-runner from 0.43.1 to 0.44.0](gitlab-org/charts/gitlab@4060504d10027abea3891b836a9556ed942756ea) ([merge request](gitlab-org/charts/gitlab!2739)) -- [Update gitlab-org/gitlab-exporter from 11.17.1 to 11.18.0](gitlab-org/charts/gitlab@5155e6cf07d9a353d09a8d6dbdc49e73b2394d6d) ([merge request](gitlab-org/charts/gitlab!2732)) - -### Other (2 changes) - -- [Update rack from 2.2.3 to 3.0.0](gitlab-org/charts/gitlab@99c3a60596cc3f2c4d64b585a0900173b2c29691) ([merge request](gitlab-org/charts/gitlab!2779)) -- [Update gitlab-styles from 6.2.0 to 9.0.0](gitlab-org/charts/gitlab@3b5171699d4a181d2e7cdf95f52333f18f03be93) ([merge request](gitlab-org/charts/gitlab!2769)) - -## 6.3.5 (2022-11-02) - -No changes. - -## 6.3.4 (2022-09-29) - -No changes. - -## 6.3.3 (2022-09-01) - -No changes. - -## 6.3.2 (2022-08-30) - -No changes. - -## 6.3.1 (2022-08-22) - -No changes. - -## 6.3.0 (2022-08-19) - -### Added (4 changes) - -- [Add configMaps and keys for customCA](gitlab-org/charts/gitlab@40e0fba3228041da84c7c51d4194a5e3681d51bb) by @ralgar ([merge request](gitlab-org/charts/gitlab!2676)) -- [Document FIPS-compatible deployment](gitlab-org/charts/gitlab@7eaa650d522f03bd24fecb27b6e4e7d41f4553f4) ([merge request](gitlab-org/charts/gitlab!2678)) -- [Add cron_job for updating of ci_runner_versions](gitlab-org/charts/gitlab@be81639d4aea8495fe472501a2c32dbd50f57c6c) ([merge request](gitlab-org/charts/gitlab!2666)) -- [Allow configuring tolerations for each separate Sidekiq shard deployment](gitlab-org/charts/gitlab@5e638b51f96c3e9e0c75db9ee74c09d2f7c45ab3) ([merge request](gitlab-org/charts/gitlab!2660)) - -### Fixed (3 changes) - -- [Pages: fix config generation for internal TLS](gitlab-org/charts/gitlab@033403a23e62b319269c3a6be8415f892843c992) ([merge request](gitlab-org/charts/gitlab!2697)) -- [GitLab Shell: fix host key walking for gitlab-sshd config](gitlab-org/charts/gitlab@79a4982a40065dc68290bfb2ec50f81013e120d2) ([merge request](gitlab-org/charts/gitlab!2711)) -- [Disable CI artifacts for package publish jobs](gitlab-org/charts/gitlab@920af91a619c3b5ae45796b4f098ec694ddc1b08) ([merge request](gitlab-org/charts/gitlab!2682)) - -### Changed (13 changes) - -- [Use batch/v1 CronJob when available](gitlab-org/charts/gitlab@b9f6bae9ee72c1eb728e49dad0e2d107ce38dc2b) ([merge request](gitlab-org/charts/gitlab!2692)) -- [Update gitlab-org/container-registry from 3.56.0-gitlab to 3.57.0-gitlab](gitlab-org/charts/gitlab@88c9599dad42942358d015a3c781effdfbff28a3) ([merge request](gitlab-org/charts/gitlab!2731)) -- [Update gitlab-org/container-registry from 3.55.0-gitlab to 3.56.0-gitlab](gitlab-org/charts/gitlab@d79bd94fc3af2c7c41d1c48294e0b0e6e358c350) ([merge request](gitlab-org/charts/gitlab!2719)) -- [Use policy/v1 PodDisruptionBudget when available](gitlab-org/charts/gitlab@5f1cf0d0c408e97161278b1b7cba991048794e76) ([merge request](gitlab-org/charts/gitlab!2691)) -- [Update gitlab-org/container-registry from 3.54.0-gitlab to 3.55.0-gitlab](gitlab-org/charts/gitlab@a0aa91ef702e6dcfd434a6ed5a030a415e1d036d) ([merge request](gitlab-org/charts/gitlab!2712)) -- [Update gitlab-org/container-registry from 3.53.0-gitlab to 3.54.0-gitlab](gitlab-org/charts/gitlab@9ee104fbd14dec4483181037b85ff474dc2c78ae) ([merge request](gitlab-org/charts/gitlab!2696)) -- [NGINX: disable allowSnippetAnnotations by default](gitlab-org/charts/gitlab@202ee54ec0ff013fcc563fb67a47590d5a8b466c) ([merge request](gitlab-org/charts/gitlab!2689)) -- [Update gitlab-org/charts/gitlab-runner from 0.43.0 to 0.43.1](gitlab-org/charts/gitlab@e6a5064bc830cdf823ef7e81655ad11e0e2d293d) ([merge request](gitlab-org/charts/gitlab!2695)) -- [Respect NGINX defaultbackend default (disabled)](gitlab-org/charts/gitlab@35090516c663dcfcd45927565f092f2254c4404e) ([merge request](gitlab-org/charts/gitlab!2686)) -- [Run ci_runner_versions_reconciliation_worker daily](gitlab-org/charts/gitlab@ef0770a5001b19fc2404c546fa33e671ceb23daf) ([merge request](gitlab-org/charts/gitlab!2693)) -- [Update gitlab-org/container-registry from 3.51.1-gitlab to 3.53.0-gitlab](gitlab-org/charts/gitlab@55bbca177df5bf8a9aff3bad9d6cdd96510b50b7) ([merge request](gitlab-org/charts/gitlab!2688)) -- [Update gitlab-org/charts/gitlab-runner from 0.42.0 to 0.43.0](gitlab-org/charts/gitlab@793cbed36bb465788ec5541b54c6274aa332e611) ([merge request](gitlab-org/charts/gitlab!2681)) -- [Update the Grafana chart to 6.11.0 and Grafana image to the 7.5.16 release](gitlab-org/charts/gitlab@af113095bac1d57d98436c39c8a4fcbf1004ac7f) ([merge request](gitlab-org/charts/gitlab!2669)) - -### Other (1 change) - -- [Ensures that whitespace is chomped to the left](gitlab-org/charts/gitlab@0e65e3393b244bf8a5f04a631865a2f1487e34ab) ([merge request](gitlab-org/charts/gitlab!2651)) - -## 6.2.5 (2022-09-29) - -No changes. - -## 6.2.4 (2022-08-30) - -No changes. - -## 6.2.3 (2022-08-22) - -No changes. - -## 6.2.2 (2022-08-01) - -No changes. - -## 6.2.1 (2022-07-28) - -No changes. - -## 6.2.0 (2022-07-21) - -### Added (7 changes) - -- [Registry: add support for TLS on the Pod service](gitlab-org/charts/gitlab@2f16a8e0f001c7dc647b6e6b86323c36e41809f2) ([merge request](gitlab-org/charts/gitlab!2673)) -- [Add support for memory and custom metrics in all HPAs](gitlab-org/charts/gitlab@be718a614bcdcc8290fa8f96058df07348bfb90e) ([merge request](gitlab-org/charts/gitlab!2621)) -- [Add TLS support configuration to Workhorse](gitlab-org/charts/gitlab@a3f09d98f6a81c3e14ed77ef1a57d8cebbb95eb0) ([merge request](gitlab-org/charts/gitlab!2628)) -- [Add TLS settings for sidekiq exporter/metrics endpoint](gitlab-org/charts/gitlab@b544e3d4a2ae451d72ee9e8865e2442d44791681) ([merge request](gitlab-org/charts/gitlab!2656)) -- [Add NGINX UBI image settings to UBI example values](gitlab-org/charts/gitlab@8537803ba2d443f048fb883e45ebbf4c2c32f6fc) ([merge request](gitlab-org/charts/gitlab!2661)) -- [Support configuring TLS for GitLab Exporter](gitlab-org/charts/gitlab@c13693818c3832d920f88b2b9fabf501071e626f) ([merge request](gitlab-org/charts/gitlab!2665)) -- [gitaly: Enable admins to inject their own Git configuration](gitlab-org/charts/gitlab@b7aef369dfd57046ff831ba17ca97f0978c51b07) ([merge request](gitlab-org/charts/gitlab!2602)) - -### Fixed (5 changes) - -- [Add a relabel_config to target __scheme__ in the default values](gitlab-org/charts/gitlab@cedee2096d5558aad731c76ffb4f7122db0f9697) ([merge request](gitlab-org/charts/gitlab!2672)) -- [Fix custom certificate authorities not working on UBI containers](gitlab-org/charts/gitlab@faed05de75b98269deabf1336e9e613348417c37) ([merge request](gitlab-org/charts/gitlab!2650)) -- [Add KAS configmap checksum to deployment spec](gitlab-org/charts/gitlab@180b80d2f1b64614c52b69988c4c7358cfa6abe4) ([merge request](gitlab-org/charts/gitlab!2654)) -- [Allow shell maxUnavailable to be a percentage](gitlab-org/charts/gitlab@9758097c837ba2c5dbe4823bde327be82ada51ff) ([merge request](gitlab-org/charts/gitlab!2627)) -- [Fix Workhorse config.toml rendering for AWS access and secret keys](gitlab-org/charts/gitlab@a5c1218e3b3339744152e9a5923ce49cf9a02ab6) ([merge request](gitlab-org/charts/gitlab!2639)) - -### Changed (8 changes) - -- [Update gitlab-org/container-registry from 3.51.0-gitlab to 3.51.1-gitlab](gitlab-org/charts/gitlab@7dfa82a79b8bf4ca0fb26b37f0e665209fa7b5a6) ([merge request](gitlab-org/charts/gitlab!2677)) -- [Update gitlab-org/gitlab-exporter from 11.16.0 to 11.17.1](gitlab-org/charts/gitlab@6c20f5c34f3d632163f085b333653a11d9ca0a3d) ([merge request](gitlab-org/charts/gitlab!2670)) -- [Update gitlab-org/container-registry from 3.49.0-gitlab to 3.51.0-gitlab](gitlab-org/charts/gitlab@8be4ba635aa759b080b462d032c30963f65f2645) ([merge request](gitlab-org/charts/gitlab!2663)) -- [gitaly: Start ignoring gitconfig files](gitlab-org/charts/gitlab@757862b50b7f29184379ed2972bc58bb4421b4e7) ([merge request](gitlab-org/charts/gitlab!2602)) -- [Update gitlab-org/container-registry from 3.48.0-gitlab to 3.49.0-gitlab](gitlab-org/charts/gitlab@c2862cccefcfc4278c1e1f093fa020e6395437a9) ([merge request](gitlab-org/charts/gitlab!2645)) -- [Ensure Azure access and secret keys are JSON in Workhorse config.toml](gitlab-org/charts/gitlab@d53ebf1a569e1d92383c89362aaeb7c97a94e33c) ([merge request](gitlab-org/charts/gitlab!2640)) -- [Update gitlab-org/charts/gitlab-runner from 0.41.0 to 0.42.0](gitlab-org/charts/gitlab@c1eb6efccfe738cd8987fb00de30d18b56c1e17a) ([merge request](gitlab-org/charts/gitlab!2634)) -- [Set webhook as MailRoom's default delivery strategy](gitlab-org/charts/gitlab@de907f875d74ddd08f90c4fa563262c3d05dccde) ([merge request](gitlab-org/charts/gitlab!2622)) - -### Removed (2 changes) - -- [config: Remove mentions of deprecated `self_signed_cert` config](gitlab-org/charts/gitlab@58bf47825841c482e874c13fd4e729b523fe99f4) ([merge request](gitlab-org/charts/gitlab!2664)) -- [Remove NGINX's `isControllerTagValid` helper](gitlab-org/charts/gitlab@f099651db6f1d57cdc9a78a2744ad6c36680fe0a) ([merge request](gitlab-org/charts/gitlab!2668)) - -## 6.1.6 (2022-08-30) - -No changes. - -## 6.1.5 (2022-08-22) - -No changes. - -## 6.1.4 (2022-07-28) - -No changes. - -## 6.1.3 (2022-07-19) - -No changes. - -## 6.1.2 (2022-07-05) - -No changes. - -## 6.1.1 (2022-06-30) - -No changes. - -## 6.1.0 (2022-06-21) - -### Added (5 changes) - -- [Add option to enable Gitaly pack-objects cache](gitlab-org/charts/gitlab@a2841ce441e30f8c898717c1d1026504adba94d0) by @mienkowt ([merge request](gitlab-org/charts/gitlab!2513)) -- [Add support for enabling SSL on Puma](gitlab-org/charts/gitlab@d21249d87f4a761031813b43a06900312afbbf21) ([merge request](gitlab-org/charts/gitlab!2496)) -- [Make PROXY protocol header read timeout configurable](gitlab-org/charts/gitlab@afad21f1e44578f95f547e40de69c385d6b71f1d) ([merge request](gitlab-org/charts/gitlab!2586)) -- [Add global.appConfig.cdnHost setting](gitlab-org/charts/gitlab@3887cd79c5ca98d0efd01c159a070992152d4011) ([merge request](gitlab-org/charts/gitlab!2559)) -- [Add support for configuring gitlab-sshd crypto](gitlab-org/charts/gitlab@56c96ffa820b18d3a18b7526cc064e2bc4e4e585) ([merge request](gitlab-org/charts/gitlab!2581)) - -### Changed (17 changes) - -- [Ensure proxy buffering is always off for KAS](gitlab-org/charts/gitlab@2d9bab7b22249ab11be3b45613fd36034cda8f02) ([merge request](gitlab-org/charts/gitlab!2609)) -- [Update gitlab-org/container-registry from 3.47.0-gitlab to 3.48.0-gitlab](gitlab-org/charts/gitlab@f3f7334c6c04eee956191704392c87c42aba620d) ([merge request](gitlab-org/charts/gitlab!2631)) -- [Disable Puma worker killer by default](gitlab-org/charts/gitlab@ac8d379b19d845d158c93a7a9d000606219db25a) ([merge request](gitlab-org/charts/gitlab!2605)) -- [Update gitlab-org/gitlab-exporter from 11.15.2 to 11.16.0](gitlab-org/charts/gitlab@2a49166b7ee5d5a643db330919da790dc282a13c) ([merge request](gitlab-org/charts/gitlab!2620)) -- [Update gitlab-org/container-registry from 3.46.0-gitlab to 3.47.0-gitlab](gitlab-org/charts/gitlab@1c31f8f9c03586ed7fabe45410b80c121af7d24d) ([merge request](gitlab-org/charts/gitlab!2616)) -- [Update gitlab-org/container-registry from 3.45.0-gitlab to 3.46.0-gitlab](gitlab-org/charts/gitlab@bbd48a58aae456f031c66dab105dcfba5501352e) ([merge request](gitlab-org/charts/gitlab!2610)) -- [Update gitlab-org/container-registry from 3.43.0-gitlab to 3.45.0-gitlab](gitlab-org/charts/gitlab@056fefdd0b8f0e387f83bf4f47a25283e3f740e4) ([merge request](gitlab-org/charts/gitlab!2604)) -- [Update gitlab-org/gitlab-exporter from 11.15.0 to 11.15.2](gitlab-org/charts/gitlab@9eb7b3e63e65d3327a2caadae99880fde4ac1859) ([merge request](gitlab-org/charts/gitlab!2596)) -- [Add annotations support to the upgrade check hook and minio job template](gitlab-org/charts/gitlab@ffc70957e823b90f24927a18849d749d5242133e) by @flintkr ([merge request](gitlab-org/charts/gitlab!2543)) -- [gitaly: Stop setting Rugged's gitconfig search path](gitlab-org/charts/gitlab@bba860d1eb8e3d639d481e38b0b9c57a150f961d) ([merge request](gitlab-org/charts/gitlab!2594)) -- [Update gitlab-shell chart to make login-grace-time configurable](gitlab-org/charts/gitlab@66afd333ccb49e7cfcef1ec920a23d32c44a70d3) ([merge request](gitlab-org/charts/gitlab!2593)) -- [Update gitlab-shell chart to make client-alive-interval configurable](gitlab-org/charts/gitlab@f0914d468108856fda89a5b1a8b2361a8e283d84) ([merge request](gitlab-org/charts/gitlab!2590)) -- [Update gitlab-shell chart to make grace-period configurable](gitlab-org/charts/gitlab@659ea8e0f2f0ad81f472a8d9bd5bfeb7f117d7be) ([merge request](gitlab-org/charts/gitlab!2579)) -- [Set MailRoom's delivery option content_type to text/plain](gitlab-org/charts/gitlab@78641fffe7a5798c73dc56c80601d88e78f73c38) ([merge request](gitlab-org/charts/gitlab!2589)) -- [Update gitlab-org/container-registry from 3.42.0-gitlab to 3.43.0-gitlab](gitlab-org/charts/gitlab@2bde33a3218c0cc3045462934db150c07d881c9e) ([merge request](gitlab-org/charts/gitlab!2588)) -- [Update gitlab-org/charts/gitlab-runner from 0.40.1 to 0.41.0](gitlab-org/charts/gitlab@6c34ec8cdd54b165f50444ff1d75dcad480d53c2) ([merge request](gitlab-org/charts/gitlab!2584)) -- [Update gitlab-org/container-registry from 3.41.1-gitlab to 3.42.0-gitlab](gitlab-org/charts/gitlab@2a0747412050b8f5b94dc23dd1e40bd5cf78496f) ([merge request](gitlab-org/charts/gitlab!2580)) - -## 6.0.5 (2022-07-28) - -No changes. - -## 6.0.4 (2022-06-30) - -No changes. - -## 6.0.3 (2022-06-16) - -No changes. - -## 6.0.2 (2022-06-06) - -No changes. - -## 6.0.1 (2022-06-01) - -### Changed (1 change) - -- [Update gitlab-org/charts/gitlab-runner from 0.40.1 to 0.41.0](gitlab-org/security/charts/gitlab@cbe93d80ae69f991efd3c0535c359db4aef13b38) - -## 6.0.0 (2022-05-20) - -### Added (5 changes) - -- [Expose minReadySeconds on the kas deployment](gitlab-org/charts/gitlab@cdae974244b82428514acdb5ec38aa8eb8c078b4) ([merge request](gitlab-org/charts/gitlab!2566)) -- [Add proxy policy support](gitlab-org/charts/gitlab@1612f7303645897dd33561eb537b52420d2506f0) ([merge request](gitlab-org/charts/gitlab!2567)) -- [Add nginx-ingress PDB maxUnavailable](gitlab-org/charts/gitlab@ea18bbc0f5b830b6428413999b75a7b91ca1ad7d) ([merge request](gitlab-org/charts/gitlab!2554)) -- [Add cron_job for pruning of stale runners](gitlab-org/charts/gitlab@14e4712c03fecb5486d966f6e43425549eb7fe7d) ([merge request](gitlab-org/charts/gitlab!2565)) -- [Enable KAS by default](gitlab-org/charts/gitlab@38a8ad84bec3af58889bf6530a4a14b31d391ea9) ([merge request](gitlab-org/charts/gitlab!2505)) - -### Fixed (1 change) - -- [Mount pages secret/configuration only when enabled in migrations job](gitlab-org/charts/gitlab@bd36aeb18cb92800846940b3a17697eb547c9e93) by @kravvcu ([merge request](gitlab-org/charts/gitlab!2545)) - -### Changed (13 changes) - -- [Update gitlab-org/container-registry from 3.41.0-gitlab to 3.41.1-gitlab](gitlab-org/charts/gitlab@c3963b3dc39af6124b6e0e5c83441c7f3c74062d) ([merge request](gitlab-org/charts/gitlab!2574)) -- [Update gitlab-shell chart to enable PROXY protocol](gitlab-org/charts/gitlab@207e443b4719ae622d459749f9556b0562f2a25a) ([merge request](gitlab-org/charts/gitlab!2558)) -- [Migrate Geo Tracking database configuration into database.yml](gitlab-org/charts/gitlab@5c20e8f269d0296f80ff1762de842780adf64679) ([merge request](gitlab-org/charts/gitlab!2529)) -- [Update gitlab-org/container-registry from 3.40.0-gitlab to 3.41.0-gitlab](gitlab-org/charts/gitlab@25bc19c7ffe7fe68ac81d6c03ecca94a84ba79ac) ([merge request](gitlab-org/charts/gitlab!2557)) -- [gitaly: Switch to bundled Git binaries](gitlab-org/charts/gitlab@c2ce142141fbf31e219e0ecbe1c031b97a556d56) ([merge request](gitlab-org/charts/gitlab!2535)) -- [Update gitlab-org/container-registry from 3.39.3-gitlab to 3.40.0-gitlab](gitlab-org/charts/gitlab@302f70c127e2df1b217d1b0e7e3a798bd34c2e2f) ([merge request](gitlab-org/charts/gitlab!2548)) -- [Update gitlab-org/charts/gitlab-runner from 0.40.0 to 0.40.1](gitlab-org/charts/gitlab@10cc88a75c7a681e1b5260a2124a341718a2eae8) ([merge request](gitlab-org/charts/gitlab!2547)) -- [Update gitlab-org/container-registry from 3.39.2-gitlab to 3.39.3-gitlab](gitlab-org/charts/gitlab@023451e10f7af268f6f992faa92f7261fbcc3664) ([merge request](gitlab-org/charts/gitlab!2538)) -- [Update gitlab-org/gitlab-exporter from 11.14.0 to 11.15.0](gitlab-org/charts/gitlab@47499e7088229827474ec1e55c6a0a5aaf8e59aa) ([merge request](gitlab-org/charts/gitlab!2537)) -- [Sidekiq: Enforce health check + metrics ports](gitlab-org/charts/gitlab@208e0e41992e4efea23f21c5ba0948449b928dbe) ([merge request](gitlab-org/charts/gitlab!2531)) -- [Update gitlab-org/container-registry from 3.39.1-gitlab to 3.39.2-gitlab](gitlab-org/charts/gitlab@93706b34a4e55a8b30132d4955e7cd9f41c470f6) ([merge request](gitlab-org/charts/gitlab!2526)) -- [feat(webservice): better readinessProbe defaults](gitlab-org/charts/gitlab@29be74ce91660c113290fc32ea6f418b12e15a6a) ([merge request](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests/2518)) -- [Update gitlab-org/container-registry from 3.39.0-gitlab to 3.39.1-gitlab](gitlab-org/charts/gitlab@0e542a5909b51dace885667611f8ee9e7f61da30) ([merge request](gitlab-org/charts/gitlab!2523)) - -### Removed (3 changes) - -- [Remove weak ciphers from nginx-ingress allowed ciphers](gitlab-org/charts/gitlab@a8483c25d642b1e74507c066b52c975ff8a2b0d8) ([merge request](gitlab-org/charts/gitlab!2578)) -- [Remove object storage direct_upload and background_upload config](gitlab-org/charts/gitlab@06afdaf6605661ddc3aeb8937b07787fd788abc3) ([merge request](gitlab-org/charts/gitlab!2564)) -- [Remove deprecated domain-config-source flag from Pages chart](gitlab-org/charts/gitlab@51947e9a4798bd1632cb32b74c18e03c6aafe56a) by @feistel ([merge request](gitlab-org/charts/gitlab!2532)) - -### Other (3 changes) - -- [Update 'Add License' location](gitlab-org/charts/gitlab@53f38975abef245735162df2f3208bd8547703cd) ([merge request](gitlab-org/charts/gitlab!2568)) -- [Add docs on certmanager-issuer chart](gitlab-org/charts/gitlab@74413b7abc3f6c9896fd7a7e0af86b869764411d) ([merge request](gitlab-org/charts/gitlab!2507)) -- [Update kubectl image to use yq v4.23.1](gitlab-org/charts/gitlab@966e02d12b1177888607f0d224caa97adcdc3940) ([merge request](gitlab-org/charts/gitlab!2459)) - -## 5.10.5 (2022-06-30) - -### Changed (1 change) - -- [Makes 14.9 a required upgrade before moving to 14.10](gitlab-org/security/charts/gitlab@ddbd9cfaebe6f84ab132ebb444b16511108e844e) - -## 5.10.4 (2022-06-01) - -No changes. - -## 5.10.3 (2022-05-20) - -### Changed (1 change) - -- [Update gitlab-org/charts/gitlab-runner from 0.40.0 to 0.40.1](gitlab-org/charts/gitlab@a25e1d00d2ef7b4d620a352661c7aacd6d2bdcf1) ([merge request](gitlab-org/charts/gitlab!2550)) - -## 5.10.2 (2022-05-04) - -No changes. - -## 5.10.1 (2022-04-29) - -No changes. - -## 5.10.0 (2022-04-21) - -### Added (4 changes) - -- [Add pages http server timeout options](gitlab-org/charts/gitlab@5b0882f64abdd677df3271bf138439536f017868) ([merge request](gitlab-org/charts/gitlab!2504)) -- [Pages: set auth-scope when access-control](gitlab-org/charts/gitlab@e269539220c1df693dd99d963b8fadcbf105904e) ([merge request](gitlab-org/charts/gitlab!2457)) -- [Add pages zip http client timeout option](gitlab-org/charts/gitlab@0559137be04f56ae33d9f789d5c597ef6054bcda) ([merge request](gitlab-org/charts/gitlab!2442)) -- [Add `databaseTasks: boolean` to `gitlab.psql.` config](gitlab-org/charts/gitlab@5b525c5dbbb23bfa76635688aa8d8382c3a91274) ([merge request](gitlab-org/charts/gitlab!2450)) - -### Fixed (6 changes) - -- [Fix fullname of sidekiq](gitlab-org/charts/gitlab@30fc64733e55fb24ca275eb1049544fe4bb476f1) by @dsonck ([merge request](gitlab-org/charts/gitlab!2495)) -- [Set GITLAB_ASSUME_YES=1 in database-backup script](gitlab-org/charts/gitlab@aea1da17562814583b2e021bb1bf62d607af760f) ([merge request](gitlab-org/charts/gitlab!2492)) -- [Fix the `database_tasks: ` to not change `load_balancing:` behavior](gitlab-org/charts/gitlab@44c3c828ccc3432cb004219a03b4a707592ee4ef) ([merge request](gitlab-org/charts/gitlab!2480)) -- [docs: Drop custom awscli install instructions](gitlab-org/charts/gitlab@ef8f130493cbf640f86b0c97877c52035f0b443c) ([merge request](gitlab-org/charts/gitlab!2472)) -- [Allow empty directives for the CSP](gitlab-org/charts/gitlab@bcd7bc9c257e80c949f42869f4126fa2df136daa) ([merge request](gitlab-org/charts/gitlab!2469)) -- [Fix ineffectual service desk auth token secret key](gitlab-org/charts/gitlab@0cd15f8ce0aa6e2fa9dd74dab1a2787bdbb54e39) ([merge request](gitlab-org/charts/gitlab!2453)) - -### Changed (12 changes) - -- [Update gitlab-org/charts/gitlab-runner from 0.39.0 to 0.40.0](gitlab-org/charts/gitlab@5ebb3121cbd8bb231851dbc57757c9cdc6413197) ([merge request](gitlab-org/charts/gitlab!2521)) -- [Sidekiq: set health check port by default](gitlab-org/charts/gitlab@5d93340fac5c067177fdb1761f518143f087c236) ([merge request](gitlab-org/charts/gitlab!2479)) -- [Update gitlab-org/container-registry from 3.38.0-gitlab to 3.39.0-gitlab](gitlab-org/charts/gitlab@a1cd07c72e6fa1b27ba47cc2a6565027bd157e4c) ([merge request](gitlab-org/charts/gitlab!2510)) -- [eks_bootstrap_script: Update default Kubernetes version to v1.21](gitlab-org/charts/gitlab@73cbcad37d54d325ea85b254c59961e3e543cc79) ([merge request](gitlab-org/charts/gitlab!2499)) -- [Update gitlab-org/container-registry from 3.37.0-gitlab to 3.37.1-gitlab](gitlab-org/charts/gitlab@775548c3377ce985d0a49bb8514048c71e46f720) ([merge request](gitlab-org/charts/gitlab!2497)) -- [Update gitlab-org/gitlab-exporter from 11.13.1 to 11.14.0](gitlab-org/charts/gitlab@107f894d6c14066bfcbf9c32e60113b596d53a9e) ([merge request](gitlab-org/charts/gitlab!2498)) -- [Update gitlab-org/container-registry from 3.36.1-gitlab to 3.37.0-gitlab](gitlab-org/charts/gitlab@adb5ce914c6853a6ecdf9f3e4fc3e5a980b5edba) ([merge request](gitlab-org/charts/gitlab!2482)) -- [Update gitlab-org/gitlab-exporter from 11.13.0 to 11.13.1](gitlab-org/charts/gitlab@4160937ddaa8ac4d8b4958ec2927de836b899e5b) ([merge request](gitlab-org/charts/gitlab!2481)) -- [Update gitlab-org/charts/gitlab-runner from 0.38.1 to 0.39.0](gitlab-org/charts/gitlab@2797875754d610a7088a48e5e995833f774ecfe6) ([merge request](gitlab-org/charts/gitlab!2467)) -- [Update gitlab-org/gitlab-exporter from 11.12.0 to 11.13.0](gitlab-org/charts/gitlab@89158a9032600900ae8378230d0570a784c75601) ([merge request](gitlab-org/charts/gitlab!2466)) -- [Bump container registry to v3.36.1](gitlab-org/charts/gitlab@7c9ca769cc7a6db88a411831c9fc70d48f097899) ([merge request](gitlab-org/charts/gitlab!2461)) -- [Update gitlab-org/container-registry from 3.32.0-gitlab to 3.35.0-gitlab](gitlab-org/charts/gitlab@75f4f63175590048b61930297f12fb199025ddda) ([merge request](gitlab-org/charts/gitlab!2458)) - -### Other (5 changes) - -- [Use new kubectl image with HOME=/tmp/kube](gitlab-org/charts/gitlab@9832a34d01ae33153ae4f37069b1b14afa135048) ([merge request](gitlab-org/charts/gitlab!2486)) -- [Update the backup to 14.9.2](gitlab-org/charts/gitlab@20927df38646ed779bf677c4ffff9f19b88510ec) ([merge request](gitlab-org/charts/gitlab!2485)) -- [Update Operator install docs for version 0.6.1](gitlab-org/charts/gitlab@17243ad2f7d29ca48c712d7a81773c090124349d) ([merge request](gitlab-org/charts/gitlab!2464)) -- [Use image digest from dev tag pipeline](gitlab-org/charts/gitlab@403b765779a8d43cc471ff9d35d6a0e23f9eea21) ([merge request](gitlab-org/charts/gitlab!2463)) -- [Update Operator install docs for version 0.6.0](gitlab-org/charts/gitlab@43398259cef8be83f88ec132b3471ca8dccaf73e) ([merge request](gitlab-org/charts/gitlab!2460)) - -## 5.9.5 (2022-06-01) - -No changes. - -## 5.9.4 (2022-04-29) - -### Other (1 change) - -- [Use new kubectl image with HOME=/tmp/kube](gitlab-org/security/charts/gitlab@f300425610dbef3f1a4d6272c9f572a96424dcfa) - -## 5.9.3 (2022-04-12) - -No changes. - -## 5.9.2 (2022-03-31) - -No changes. - -## 5.9.1 (2022-03-23) - -No changes. - -## 5.9.0 (2022-03-21) - -### Added (7 changes) - -- [Support separate_database_metrics for Praefect](gitlab-org/charts/gitlab@a9624b7f20c8d8d360250c2bdcb4ba1ee8b46b4c) ([merge request](gitlab-org/charts/gitlab!2405)) -- [feat: adds ci Secure Files settings](gitlab-org/charts/gitlab@054bc4d30eabffc81950096c56a1d9696bdeebd1) ([merge request](gitlab-org/charts/gitlab!2437)) -- [Add Spamcheck to GitLab Helm Chart](gitlab-org/charts/gitlab@f838962ee7ff7da85fc0d1b50da22a2c3c55e065) ([merge request](gitlab-org/charts/gitlab!2241)) -- [Add TLS rate-limiting options for GitLab Pages](gitlab-org/charts/gitlab@92659ef1fb2a4f6ba8c5612b6fe0bbd679e06dcc) ([merge request](gitlab-org/charts/gitlab!2403)) -- [Add importnotification settings for the registry](gitlab-org/charts/gitlab@8f1c9f83ebf7d3e863f45955f5c5aa57ee0f69c6) ([merge request](gitlab-org/charts/gitlab!2396)) -- [Add more registry migration configuration options](gitlab-org/charts/gitlab@e8437edcbf9e2ec21652c864a2d6fdd5d280cc73) ([merge request](gitlab-org/charts/gitlab!2389)) -- [Add bizible settings](gitlab-org/charts/gitlab@5a7bbe298d1393bd92bbde844d849bdde06ad50b) ([merge request](gitlab-org/charts/gitlab!2393)) - -### Fixed (1 change) - -- [skip praefect db secret generation for external db](gitlab-org/charts/gitlab@f310323f6d7adfd08fc4bc063c26ce54c0e3a29c) by @walkafwalka ([merge request](gitlab-org/charts/gitlab!2366)) - -### Changed (10 changes) - -- [Add support for configuring Microsoft Graph endpoints](gitlab-org/charts/gitlab@2cb3a252c8eb85786a50a2f646eb3a5c21447f2c) ([merge request](gitlab-org/charts/gitlab!2444)) -- [Update gitlab-org/gitlab-exporter from 11.11.0 to 11.12.0](gitlab-org/charts/gitlab@a4263ab277fab3ac67e86f69172fcd5a58cc7c55) ([merge request](gitlab-org/charts/gitlab!2441)) -- [Update gitlab-org/container-registry from 3.31.0-gitlab to 3.32.0-gitlab](gitlab-org/charts/gitlab@8d7e3fbae410857f5185ef9adca5a7b8ca16d1cb) ([merge request](gitlab-org/charts/gitlab!2432)) -- [Update gitlab-org/charts/gitlab-runner from 0.38.0 to 0.38.1](gitlab-org/charts/gitlab@8d666ef8c25fd5541cc0b6c3463dea193daedb5f) ([merge request](gitlab-org/charts/gitlab!2431)) -- [Add tolerations for the geo-logcursor deployment](gitlab-org/charts/gitlab@97e29a5f7ee662c420459181ffdc184c4ea79e86) by @vmoudy1 ([merge request](gitlab-org/charts/gitlab!2426)) -- [Bump Container Registry to v3.31.0-gitlab](gitlab-org/charts/gitlab@a65743249fde61ea84301e7a6863af9b5cbaa185) ([merge request](gitlab-org/charts/gitlab!2423)) -- [Use CNG images for KAS](gitlab-org/charts/gitlab@adfb07a2bfd6fcdd69f03a8737e0e158ea2b9f73) ([merge request](gitlab-org/charts/gitlab!2398)) -- [Update gitlab-org/container-registry from 3.28.2-gitlab to 3.30.0-gitlab](gitlab-org/charts/gitlab@14fb9cbeac0479a80d6c20897bf3e44e26f95ef5) ([merge request](gitlab-org/charts/gitlab!2412)) -- [Update gitlab-org/container-registry from 3.27.1-gitlab to 3.28.2-gitlab](gitlab-org/charts/gitlab@1a8cff22a5ceb57555fe1cba1f2ab4de625d5e4a) ([merge request](gitlab-org/charts/gitlab!2401)) -- [Update gitlab-org/charts/gitlab-runner from 0.37.2 to 0.38.0](gitlab-org/charts/gitlab@b09571bb48d4301ac2be260daf525fad69c6eaa8) ([merge request](gitlab-org/charts/gitlab!2400)) - -### Other (11 changes) - -- [Updates docs to rename task runner pod to toolbox](gitlab-org/charts/gitlab@5620ec0d6bfde3f0fd0d2757d524a984ce449a50) ([merge request](gitlab-org/charts/gitlab!2433)) -- [Adjust yq syntax based on current version](gitlab-org/charts/gitlab@2ce7be58e29e8991886af29fcf77d9d6807e7f7b) ([merge request](gitlab-org/charts/gitlab!2425)) -- [MR template: reference Distribution MR workflow](gitlab-org/charts/gitlab@e081c47606ccf0f15f152152933e37e6e939a657) ([merge request](gitlab-org/charts/gitlab!2455)) -- [Set Prometheus Server retention to 2 days](gitlab-org/charts/gitlab@6a4240848752782ed0a78455ca213e8dad425e98) ([merge request](gitlab-org/charts/gitlab!2382)) -- [Document how to set TLS Secret for KAS/Grafana](gitlab-org/charts/gitlab@d88d73f6202e923b3874e468c1cc07af924fd720) ([merge request](gitlab-org/charts/gitlab!2429)) -- [Use image digest for helper images](gitlab-org/charts/gitlab@4ab53015bf67f7552e905309ea64eab9752f76ed) ([merge request](gitlab-org/charts/gitlab!2427)) -- [Use yq v4 syntax](gitlab-org/charts/gitlab@662d0b96fd4dd0ccf7ca85db41807598047a6b31) ([merge request](gitlab-org/charts/gitlab!2409)) -- [Update Operator install docs for version 0.5.1](gitlab-org/charts/gitlab@44bbe6236cb050bb9d287790997a7f3860a072c1) ([merge request](gitlab-org/charts/gitlab!2417)) -- [Add troubleshooting docs for YAML parse errors](gitlab-org/charts/gitlab@b9947210a310b2eb69cd0a3727d69f0378b6b3ce) ([merge request](gitlab-org/charts/gitlab!2414)) -- [Update Operator docs for version 0.5.0](gitlab-org/charts/gitlab@bffc825cf4730c78e4127e3b0cd8983f7d0545ea) ([merge request](gitlab-org/charts/gitlab!2407)) -- [Update link to Gitaly Cluster migration](gitlab-org/charts/gitlab@0901cb209b15f7ed43eb04576e249940c3afb608) ([merge request](gitlab-org/charts/gitlab!2399)) - -## 5.8.6 (2022-04-29) - -No changes. - -## 5.8.5 (2022-03-31) - -No changes. - -## 5.8.4 (2022-03-16) - -No changes. - -## 5.8.3 (2022-03-14) - -No changes. - -## 5.8.2 (2022-02-25) - -No changes. - -## 5.8.1 (2022-02-23) - -No changes. - -## 5.8.0 (2022-02-21) - -### Added (1 change) - -- [Add webhook delivery method to mailroom](gitlab-org/charts/gitlab@4b63746c3a154fe3326a5e61562c2c32a0663180) ([merge request](gitlab-org/charts/gitlab!2358)) - -### Fixed (4 changes) - -- [allow modifying praefect values without modifying praefect.service](gitlab-org/charts/gitlab@d459fffc351041a6b0a76c9b8fc21b901ae0866e) by @walkafwalka ([merge request](gitlab-org/charts/gitlab!2365)) -- [Use 'global.ingress.class' in IngressClass name](gitlab-org/charts/gitlab@f4ed8db3410a788f826cfd7cb493434376495acd) ([merge request](gitlab-org/charts/gitlab!2351)) -- [Properly set IngressClass name](gitlab-org/charts/gitlab@d119d297d0854af38174d97afa83ecba2e4d2b8b) ([merge request](gitlab-org/charts/gitlab!2354)) -- [add customization to annotations](gitlab-org/charts/gitlab@46497f36de89853acb7285b893985d445531afe2) ([merge request](gitlab-org/charts/gitlab!2339)) - -### Changed (8 changes) - -- [global.ingress.class=none: don't populate fields](gitlab-org/charts/gitlab@e8dee1d508103a7071b82ea2707932dc77eec157) ([merge request](gitlab-org/charts/gitlab!2385)) -- [Update gitlab-exporter from v11.2.0 to v11.11.0](gitlab-org/charts/gitlab@4f5f31e3c64751ac9a26782c63b4f3a69cd5e1de) ([merge request](gitlab-org/charts/gitlab!2395)) -- [Update gitlab-org/container-registry from 3.25.0-gitlab to 3.27.1-gitlab](gitlab-org/charts/gitlab@4fd9b62af9bd7e2ce16a164c7574e8de13b668fe) ([merge request](gitlab-org/charts/gitlab!2397)) -- [Update gitlab-org/container-registry from 3.24.1-gitlab to 3.25.0-gitlab](gitlab-org/charts/gitlab@5acfce7181e289db597f81967b57e3159b296d6a) ([merge request](gitlab-org/charts/gitlab!2391)) -- [Update gitlab-org/container-registry from 3.23.0-gitlab to 3.24.1-gitlab](gitlab-org/charts/gitlab@b0550f880c617bdab82a6b8031e614b8e7cca9de) ([merge request](gitlab-org/charts/gitlab!2386)) -- [Update prometheus chart version to 15.0.4](gitlab-org/charts/gitlab@8af46ea5c890f3d0cdac029ca71e7c2724714377) ([merge request](gitlab-org/charts/gitlab!2350)) -- [Update gitlab-org/charts/gitlab-runner from 0.37.0 to 0.37.2](gitlab-org/charts/gitlab@f34d45b07016511fac5f00b31b34a39e52ac31bd) ([merge request](gitlab-org/charts/gitlab!2357)) -- [Update gitlab-org/container-registry from 3.22.0-gitlab to 3.23.0-gitlab](gitlab-org/charts/gitlab@dd0100477fa5757c1227fd9fa9beed747d196e60) ([merge request](gitlab-org/charts/gitlab!2356)) - -### Removed (1 change) - -- [Remove operator subchart](gitlab-org/charts/gitlab@3253d9bad99edabce76c7c10321b879a33c46de3) ([merge request](gitlab-org/charts/gitlab!2372)) - -### Other (7 changes) - -- [Document decision for Debian and UBI images](gitlab-org/charts/gitlab@c9bba53f52e70b08d29cdbc6191eb726653d690d) ([merge request](gitlab-org/charts/gitlab!2377)) -- [Document Operator maturity](gitlab-org/charts/gitlab@bd16d1e664568f7ff03149d242d9dbe97c821219) ([merge request](gitlab-org/charts/gitlab!2379)) -- [Unify mailroom enablement empty checks](gitlab-org/charts/gitlab@ee11b3c22bf2f6401810540914fc5866de4c23d2) ([merge request](gitlab-org/charts/gitlab!2388)) -- [Fixed wrong content-security-policy value in documentation](gitlab-org/charts/gitlab@37bab302dffce713e3c83522147e3d1adfdfad89) ([merge request](gitlab-org/charts/gitlab!2373)) -- [Add link to Praefect GA release Epic](gitlab-org/charts/gitlab@a56d361391a2eb28eb9d5b2dc24662243bd7198a) ([merge request](gitlab-org/charts/gitlab!2367)) -- [Update Operator install docs for version 0.4.0](gitlab-org/charts/gitlab@24ca2bc27bfe3ae4e18cafb03ddca7b7de77d507) ([merge request](gitlab-org/charts/gitlab!2359)) -- [Extract _checkConfig.tpl into smaller files](gitlab-org/charts/gitlab@fdcb978062ddf32ae106984531138666b3a1be0e) ([merge request](gitlab-org/charts/gitlab!2348)) - -### change (1 change) - -- [Add ERROR: to output message to make more visible](gitlab-org/charts/gitlab@6fe9d83f2d6be4266c26eb7b91f8e6efc54984ea) ([merge request](gitlab-org/charts/gitlab!2294)) - -## 5.7.7 (2022-03-31) - -No changes. - -## 5.7.6 (2022-03-24) - -No changes. - -## 5.7.5 (2022-03-09) - -No changes. - -## 5.7.4 (2022-02-25) - -No changes. - -## 5.7.3 (2022-02-15) - -No changes. - -## 5.7.2 (2022-02-08) - -No changes. - -## 5.7.1 (2022-02-03) - -No changes. - -## 5.7.0 (2022-01-21) - -### Added (3 changes) - -- [Add domain rate-limiting options for GitLab Pages](gitlab-org/charts/gitlab@b61174649493db72d15fce4334a3fd14e58d58e6) ([merge request](gitlab-org/charts/gitlab!2338)) -- [Registry: Add middleware.storage config ability](gitlab-org/charts/gitlab@d11b891716f870823150c11cadcf68155300c6a5) ([merge request](gitlab-org/charts/gitlab!2328)) -- [Feature gate metrics port exposure, expose on Service](gitlab-org/charts/gitlab@29644d37ebee555b5171f2a26dccbe6fd2bfc43f) ([merge request](gitlab-org/charts/gitlab!2311)) - -### Fixed (1 change) - -- [Revert "Favor GitLab's nodeSelectors instead nginx-ingress"](gitlab-org/charts/gitlab@c01708c7b0be1f4f64663d66f2659664a5ece67f) ([merge request](gitlab-org/charts/gitlab!2342)) - -### Changed (6 changes) - -- [Update gitlab-org/charts/gitlab-runner from 0.36.0 to 0.37.0](gitlab-org/charts/gitlab@f4d6e7ae413cf7a1a010b65c75fa050c8b656b22) ([merge request](gitlab-org/charts/gitlab!2352)) -- [Update gitlab-org/container-registry from 3.21.0-gitlab to 3.22.0-gitlab](gitlab-org/charts/gitlab@af098951c8f43cb27e6e5f865771041044f4bae0) ([merge request](gitlab-org/charts/gitlab!2346)) -- [Update Operator docs for 0.3.0](gitlab-org/charts/gitlab@3c8e8c4dc79796bf1cb5df256d379929b044e2c2) ([merge request](gitlab-org/charts/gitlab!2343)) -- [Add test specs](gitlab-org/charts/gitlab@0777257463d3f6169d7fbc47e2931a3347698630) ([merge request](gitlab-org/charts/gitlab!2304)) -- [Update gitlab-org/container-registry from 3.20.0-gitlab to 3.21.0-gitlab](gitlab-org/charts/gitlab@52b9f0d5b6ae45cbf578dffd94cd1e544938a093) ([merge request](gitlab-org/charts/gitlab!2337)) -- [Update gitlab-org/container-registry from 3.19.0-gitlab to 3.20.0-gitlab](gitlab-org/charts/gitlab@4ae9e795d2ae3ceec5f2d75a9c5c9ecefb88f707) ([merge request](gitlab-org/charts/gitlab!2334)) - -## 5.6.7 (2022-03-31) - -No changes. - -## 5.6.6 (2022-03-01) - -No changes. - -## 5.6.5 (2022-02-25) - -No changes. - -## 5.6.4 (2022-02-03) - -No changes. - -## 5.6.3 (2022-01-18) - -No changes. - -## 5.6.2 (2022-01-11) - -No changes. - -## 5.6.1 (2022-01-04) - -No changes. - -## 5.6.0 (2021-12-21) - -### Changed (6 changes) - -- [Update gitlab-org/container-registry from 3.18.1-gitlab to 3.19.0-gitlab](gitlab-org/charts/gitlab@8c76c6594e07be584709112bd0ad6322bbe2b411) ([merge request](gitlab-org/charts/gitlab!2312)) -- [Update gitlab-org/charts/gitlab-runner from 0.35.3 to 0.36.0](gitlab-org/charts/gitlab@504aebed4b7ee63c73436d081392c531b29d7f6f) ([merge request](gitlab-org/charts/gitlab!2313)) -- [Update gitlab-org/charts/gitlab-runner from 0.35.0 to 0.35.3](gitlab-org/charts/gitlab@7017fda23b1a3788c9e6fb7a5e8f11027775c842) ([merge request](gitlab-org/charts/gitlab!2301)) -- [Update gitlab-org/container-registry from 3.16.0-gitlab to 3.17.0-gitlab](gitlab-org/charts/gitlab@e1b12db5cb630926ee76ce7684fba64263dc79af) ([merge request](gitlab-org/charts/gitlab!2285)) -- [Update gitlab-org/charts/gitlab-runner from 0.34.0 to 0.35.0](gitlab-org/charts/gitlab@12c4740147c25f788061176f124e5749eb9a7726) ([merge request](gitlab-org/charts/gitlab!2275)) -- [Update gitlab-org/container-registry from 3.15.0-gitlab to 3.16.0-gitlab](gitlab-org/charts/gitlab@3d2e013c2c37ee987fa064dacb8ae3f2f645aa4b) ([merge request](gitlab-org/charts/gitlab!2276)) - -## 5.5.4 (2022-02-03) - -No changes. - -## 5.5.3 (2022-01-11) - -No changes. - -## 5.5.2 (2021-12-03) - -No changes. - -## 5.5.1 (2021-12-01) - -No changes. - -## 5.5.0 (2021-11-19) - -### Added (3 changes) - -- [Add MaxURILength option for GitLab Pages](gitlab-org/charts/gitlab@426e60d5229d92090f3e7c207438aac481ce1c8a) ([merge request](gitlab-org/charts/gitlab!2266)) -- [Add loose foreign key cron worker](gitlab-org/charts/gitlab@e37cfdb0f344c51320268784838b4292daa153d7) ([merge request](gitlab-org/charts/gitlab!2265)) -- [Add one_trust_id config](gitlab-org/charts/gitlab@86339448ae78770fc4637020c34370f5c45b03a6) ([merge request](gitlab-org/charts/gitlab!2237)) - -### Fixed (1 change) - -- [Raise Sidekiq job timeout from 5 to 25 seconds](gitlab-org/charts/gitlab@f94968b4bef32446b38c2033364107d1cff6e1bb) ([merge request](gitlab-org/charts/gitlab!2249)) - -### Changed (7 changes) - -- [Update gitlab-org/container-registry from 3.14.3-gitlab to 3.15.0-gitlab](gitlab-org/charts/gitlab@f8f07d262d73c80b2bf863b79358cf9c53214689) ([merge request](gitlab-org/charts/gitlab!2271)) -- [Update gitlab-org/container-registry from 3.14.2-gitlab to 3.14.3-gitlab](gitlab-org/charts/gitlab@34fbd2864de95f80337da3db08ff92323a1a1e33) ([merge request](gitlab-org/charts/gitlab!2264)) -- [Update gitlab-org/container-registry from 3.14.1-gitlab to 3.14.2-gitlab](gitlab-org/charts/gitlab@fe13ae8f5bed9ab67593b526f52bb97835203c41) ([merge request](gitlab-org/charts/gitlab!2257)) -- [Update gitlab-org/container-registry from 3.13.0-gitlab to 3.14.1-gitlab](gitlab-org/charts/gitlab@6119f3f5307166cf99df9a8fdc14ffbc153143fb) ([merge request](gitlab-org/charts/gitlab!2250)) -- [GitLab Shell: replace ERB with gomplate](gitlab-org/charts/gitlab@44923bed8bb1578a68b50d5a0d93b5b8cb51fc05) by @kristofkalocsai ([merge request](gitlab-org/charts/gitlab!2220)) -- [GitLab Pages: replace ERB with gomplate](gitlab-org/charts/gitlab@22119c6893be97ed9d2ea8fd72a12784d45a3abe) by @kristofkalocsai ([merge request](gitlab-org/charts/gitlab!2217)) -- [Update gitlab-org/container-registry from 3.12.0-gitlab to 3.13.0-gitlab](gitlab-org/charts/gitlab@2ea30e59cdad005e45866da788ecf8dfd212eb2b) ([merge request](gitlab-org/charts/gitlab!2235)) - -### Other (1 change) - -- [[Docs] Operator: clarify available chart versions](gitlab-org/charts/gitlab@afcb3d95d2f997cc1d77087bb85a73b918a38101) ([merge request](gitlab-org/charts/gitlab!2268)) - -## 5.4.5 (2022-01-11) - -No changes. - -## 5.4.4 (2021-12-03) - -No changes. - -## 5.4.3 (2021-12-01) - -No changes. - -## 5.4.2 (2021-11-08) - -No changes. - -## 5.4.1 (2021-10-28) - -No changes. - -## 5.4.0 (2021-10-21) - -### Added (2 changes) - -- [Pages: enable proper readiness probe](gitlab-org/charts/gitlab@9b4d367bc96a2430eca9cfb32b916f0860bdd7ff) ([merge request](gitlab-org/charts/gitlab!2225)) -- [Allow configuring redis instance for rate limiting](gitlab-org/charts/gitlab@349cb8056f484dde330589805076ba86e70306d5) ([merge request](gitlab-org/charts/gitlab!2187)) - -### Fixed (4 changes) - -- [Add certificate volumeMounts to Rails deployments](gitlab-org/charts/gitlab@7a1fbf603eca4d698c16275eb1f7dd8dbcfdb45b) ([merge request](gitlab-org/charts/gitlab!2219)) -- [Add missing namespace to default KAS internal URL](gitlab-org/charts/gitlab@582d9b2b3298da78dc7b6c826e7dd5ee705505dd) ([merge request](gitlab-org/charts/gitlab!2207)) -- [Add a preStop hook to registry to sleep for 5 seconds](gitlab-org/charts/gitlab@24efafe6276eb5ea5ae9bc82d670cf0529356dd5) ([merge request](gitlab-org/charts/gitlab!2199)) -- [Move 'global.kas.apiExternalPort' to parent chart](gitlab-org/charts/gitlab@d68096d019a01cf1ba1953fde6b26e6cfcdffa6b) ([merge request](gitlab-org/charts/gitlab!2201)) - -### Changed (5 changes) - -- [Pin mailroom to 0.0.14](gitlab-org/charts/gitlab@5befab88589e25b0b851e6f39432e2051d3628d2) ([merge request](gitlab-org/charts/gitlab!2236)) -- [Update gitlab-org/container-registry from 3.11.1-gitlab to 3.12.0-gitlab](gitlab-org/charts/gitlab@cc5af8331e1f3aef9eaaee88f366e516cfc80c3f) ([merge request](gitlab-org/charts/gitlab!2230)) -- [Update runner chart to v0.33.1](gitlab-org/charts/gitlab@c40f40aab0118470f1b18dd42bae86e85fe1d6e9) by @xasx ([merge request](gitlab-org/charts/gitlab!2206)) -- [Update gitlab-org/charts/gitlab-runner from 0.32.0 to 0.33.0](gitlab-org/charts/gitlab@ce87597fbd8881f1a711affd926c6a332daf9254) ([merge request](gitlab-org/charts/gitlab!2203)) -- [Update gitlab-org/container-registry from 3.11.0-gitlab to 3.11.1-gitlab](gitlab-org/charts/gitlab@3e6492bf41609054214308006289a9e638038e22) ([merge request](gitlab-org/charts/gitlab!2194)) - -### Other (2 changes) - -- [Remove reference to deprecated operator](gitlab-org/charts/gitlab@d03e3293fdfe698eb3b5defe0b919351ef9485eb) ([merge request](gitlab-org/charts/gitlab!2197)) -- [Add $PLATFORM to installation commands](gitlab-org/charts/gitlab@8e72a88fb391cb98f64e712b07e65d65db4ab8fd) ([merge request](gitlab-org/charts/gitlab!2190)) - -## 5.3.6 (2021-12-03) - -No changes. - -## 5.3.5 (2021-11-26) - -No changes. - -## 5.3.4 (2021-10-28) - -No changes. - -## 5.3.3 (2021-10-12) - -No changes. - -## 5.3.2 (2021-10-01) - -No changes. - -## 5.3.1 (2021-09-30) - -No changes. - -## 5.3.0 (2021-09-21) - -### Added (1 change) - -- [Mount SSH host keys into Webservice container](gitlab-org/charts/gitlab@ff3670c0633094d30d5c8d6e89d394f46ae08d29) by @kravvcu ([merge request](gitlab-org/charts/gitlab!2168)) - -### Fixed (3 changes) - -- [Drop the special ingress rule for /admin/sidekiq](gitlab-org/charts/gitlab@63bad505f20df8b0a211343d75dee1e4e9917445) ([merge request](gitlab-org/charts/gitlab!2182)) -- [Rails db: always put main first](gitlab-org/charts/gitlab@ad9b461b0ddedf1e05b45db54e2950c20298380c) ([merge request](gitlab-org/charts/gitlab!2159)) -- [Remove Gitaly's redundant Prometheus listen addr](gitlab-org/charts/gitlab@fe4a41f5f111a536407ed427d295f9b558bee8d9) ([merge request](gitlab-org/charts/gitlab!2153)) - -### Changed (7 changes) - -- [Update gitlab-org/container-registry from 3.10.1-gitlab to 3.11.0-gitlab](gitlab-org/charts/gitlab@09cb819fc9dbfd17262adf977d369034299b42f5) ([merge request](gitlab-org/charts/gitlab!2181)) -- [Deployments: remove .spec.replicas when HPA present](gitlab-org/charts/gitlab@a23f7ed46ee68b5740690a352e3dd452750abb7a) ([merge request](gitlab-org/charts/gitlab!2180)) -- [Update gitlab-org/container-registry from 3.10.0-gitlab to 3.10.1-gitlab](gitlab-org/charts/gitlab@ba458fab385380bb138a5cc0c8bd71c4d49cc199) ([merge request](gitlab-org/charts/gitlab!2172)) -- [Update gitlab-org/container-registry from 3.9.0-gitlab to 3.10.0-gitlab](gitlab-org/charts/gitlab@9bfbdbf5cfd2619109ef5a49e4312f0210395d41) ([merge request](gitlab-org/charts/gitlab!2156)) -- [Change default configuration for HSTS](gitlab-org/charts/gitlab@14936c95c921770b67c28642dc950fa186252bdd) ([merge request](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests/2118)) -- [Update gitlab-org/charts/gitlab-runner from 0.31.0 to 0.32.0](gitlab-org/charts/gitlab@0665982645d842994a54bddb1269fbb694a743cb) ([merge request](gitlab-org/charts/gitlab!2149)) -- [Adds pages local_store configuration](gitlab-org/charts/gitlab@426c34858876fe0d52cd4fe880f44771af17e19b) ([merge request](gitlab-org/charts/gitlab!2141)) - -## 5.2.7 (2021-11-26) - -No changes. - -## 5.2.6 (2021-10-28) - -No changes. - -## 5.2.5 (2021-09-30) - -No changes. - -## 5.2.4 (2021-09-17) - -No changes. - -## 5.2.3 (2021-09-01) - -No changes. - -## 5.2.2 (2021-08-31) - -No changes. - -## 5.2.1 (2021-08-23) - -No changes. - -## 5.2.0 (2021-08-20) - -### Added (4 changes) - -- [Support many database configuration](gitlab-org/charts/gitlab@2036b4687bf7e507540bc06b27d5862f496c547c) ([merge request](gitlab-org/charts/gitlab!2122)) -- [Registry: add upload purging to maintenance stanza](gitlab-org/charts/gitlab@aae3afb76daf5b8bae04796307f21d7cf26bb6da) ([merge request](gitlab-org/charts/gitlab!2116)) -- [Support Workhorse config options for propagating correlation IDs](gitlab-org/charts/gitlab@53351d219e8a85423fe1b1922e04101994fa4e2e) ([merge request](gitlab-org/charts/gitlab!2106)) -- [Gitlab-sshd experimental support](gitlab-org/charts/gitlab@41879ffce3c39af07dfe767f3a634ab4aa823d19) ([merge request](gitlab-org/charts/gitlab!1855)) - -### Fixed (5 changes) - -- [Add toString to sidekiq deployment image logic](gitlab-org/charts/gitlab@97f20f307b92e4b370ebb57ba9e0c1f9435e2842) ([merge request](gitlab-org/charts/gitlab!2111)) -- [Fix references to traceChunks and sharedState](gitlab-org/charts/gitlab@d136a24903aa4903319f9f4ec8b07b1dde9c97a0) ([merge request](gitlab-org/charts/gitlab!2117)) -- [Add quotes to labels content, preventing unquoted booleans when deploying chart](gitlab-org/charts/gitlab@614778c435dc94b484b84daccf77f8b063432a25) ([merge request](gitlab-org/charts/gitlab!2068)) -- [Gitaly: Bind metrics endpoint to 0.0.0.0 instead of localhost](gitlab-org/charts/gitlab@dc8857272d92ed690744d6166033edabc5ec1952) ([merge request](gitlab-org/charts/gitlab!2100)) -- [Ensure backup includes Pages bucket also](gitlab-org/charts/gitlab@98d52b39c1293037432025afae3f4441a2a2d7c9) ([merge request](gitlab-org/charts/gitlab!2107)) - -### Changed (16 changes) - -- [Standardize imagePullPolicy and imagePullSecrets behavior](gitlab-org/charts/gitlab@d3a329f1753e635188ff2dc02c111382bf406bfb) ([merge request](gitlab-org/charts/gitlab!2130)) -- [Update gitlab-org/container-registry from 3.8.0-gitlab to 3.9.0-gitlab](gitlab-org/charts/gitlab@b076bfc4d000824f4880f14184fc098a88fb56cd) ([merge request](gitlab-org/charts/gitlab!2142)) -- [Bump container registry to v3.8.0](gitlab-org/charts/gitlab@9a754157f2d68c46667f5635ccaf15993a3ecbb5) ([merge request](gitlab-org/charts/gitlab!2139)) -- [Rename pullsecrets template to gitlab.image.pullSecrets](gitlab-org/charts/gitlab@ad5e7a7e0239df01dc6afbbb00c2a5cf1c57abe8) ([merge request](gitlab-org/charts/gitlab!2126)) -- [Use renamed image: task-runner -> toolbox](gitlab-org/charts/gitlab@e880a913a22e8f3631cedcb3522fb9caba6bb9c4) ([merge request](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests/2099)) -- [Deprecate global.imagePullPolicy and move it to global.image.pullPolicy](gitlab-org/charts/gitlab@f49cc36c333b2997ebea99db6568b68dac925add) ([merge request](gitlab-org/charts/gitlab!2120)) -- [Update gitlab-org/gitlab-exporter from 11.1.0 to 11.2.0](gitlab-org/charts/gitlab@35f21594c0dc313735a17bcb7991fafdfef2fbe8) ([merge request](gitlab-org/charts/gitlab!2124)) -- [Update gitlab-org/container-registry from 3.6.2-gitlab to 3.7.0-gitlab](gitlab-org/charts/gitlab@b0df57f8d4be24678da3f6e9b7fa4eed820abf04) ([merge request](gitlab-org/charts/gitlab!2123)) -- [Update gitlab-org/container-registry from 3.6.1-gitlab to 3.6.2-gitlab](gitlab-org/charts/gitlab@1e9b17df737a461a5401f8e8b10946822dfbf25f) ([merge request](gitlab-org/charts/gitlab!2115)) -- [Switch busybox/nginx-ingress containers to mirror](gitlab-org/charts/gitlab@df93c5f7c06eef41fff461bdb07ae23da4f84f45) ([merge request](gitlab-org/charts/gitlab!2114)) -- [Update gitlab-org/gitlab-exporter from 11.0.1 to 11.1.0](gitlab-org/charts/gitlab@b8099e5d4774dcf0e8b7abc4a09f07cfebe18483) ([merge request](gitlab-org/charts/gitlab!2109)) -- [Update gitlab-org/container-registry from 3.6.0-gitlab to 3.6.1-gitlab](gitlab-org/charts/gitlab@620c3b9e6dad1e11eede8b0c22952cf794aad76c) ([merge request](gitlab-org/charts/gitlab!2102)) -- [Update gitlab-org/charts/gitlab-runner from 0.30.0 to 0.31.0](gitlab-org/charts/gitlab@3fba0b2a29774cf3118b5cf7121bd95a9116708c) ([merge request](gitlab-org/charts/gitlab!2101)) -- [Update gitlab-org/container-registry from 3.5.2-gitlab to 3.6.0-gitlab](gitlab-org/charts/gitlab@ec98f3663375be3ddf7fec7ab6078fbb65aabeb9) ([merge request](gitlab-org/charts/gitlab!2096)) -- [Update gitlab-exporter appVersion 11.0.1](gitlab-org/charts/gitlab@d6cc85961e3d8369460840e70415b593bd82e432) ([merge request](gitlab-org/charts/gitlab!2092)) -- [Update gitlab-org/gitlab-exporter from 10.5.0 to 11.0.0](gitlab-org/charts/gitlab@2c2a8c2b877b45d47b8bb61a09ed6cb5f8b79392) ([merge request](gitlab-org/charts/gitlab!2092)) - -## 5.1.8 (2021-11-15) - -No changes. - -## 5.1.7 (2021-09-30) - -No changes. - -## 5.1.6 (2021-09-27) - -No changes. - -## 5.1.5 (2021-09-02) - -No changes. - -## 5.1.4 (2021-08-31) - -No changes. - -## 5.1.3 (2021-08-17) - -### Fixed (1 change) - -- [Fix labels boolean value not being escaped bug](gitlab-org/charts/gitlab@0714357dd8f46874f8abbba6e805ba98e3e30c4b) ([merge request](gitlab-org/charts/gitlab!2121)) - -## 5.1.2 (2021-08-03) - -No changes. - -## 5.1.1 (2021-07-28) - -No changes. - -## 5.1.0 (2021-07-21) - -### Fixed (3 changes) - -- [Fixed duplicate labels generated by local and `.standardLabels`](gitlab-org/charts/gitlab@34d79356d8adbd732fb7a7a26416e73480220585) ([merge request](gitlab-org/charts/gitlab!2067)) -- [Fix forbidden error while accessing smartcard ingress](gitlab-org/charts/gitlab@38464add1376203104b3783edafb12818d312a00) ([merge request](gitlab-org/charts/gitlab!2053)) -- [Webservice: address common.labels duplication](gitlab-org/charts/gitlab@198feaa11a915e21271a98200b8dc5403823cea6) ([merge request](gitlab-org/charts/gitlab!2054)) - -### Changed (6 changes) - -- [Update gitlab-org/gitlab-exporter from 10.4.0 to 10.5.0](gitlab-org/charts/gitlab@07a8e4b1bad7743f4f7b6ed4ee1b9951beda33c8) ([merge request](gitlab-org/charts/gitlab!2080)) -- [Set GitLab 14.0 as the min supported upgrade version](gitlab-org/charts/gitlab@902017356aae050141adc15d53da4f25aa83ddb8) ([merge request](gitlab-org/charts/gitlab!2086)) -- [Allow PostgreSQL adapter tcp parameter tuning](gitlab-org/charts/gitlab@caf7c65467e5a3490323231ab38bb1c841eb6e0e) ([merge request](gitlab-org/charts/gitlab!2082)) -- [Bump Container Registry to v3.5.1-gitlab](gitlab-org/charts/gitlab@a8e2c62c3755b7f25f56a59bab1c90573529214d) ([merge request](gitlab-org/charts/gitlab!2079)) -- [Update gitlab-org/container-registry from 3.5.0-gitlab to 3.5.1-gitlab](gitlab-org/charts/gitlab@3bd4bda15ef96ae1dd10ea31b3b1fdba47f699c8) ([merge request](gitlab-org/charts/gitlab!2079)) -- [Update gitlab-org/gitlab-exporter from 10.3.0 to 10.4.0](gitlab-org/charts/gitlab@9802bdd7b9cab3b42307729b59e38a27c82d2231) ([merge request](gitlab-org/charts/gitlab!2035)) - -### Security (1 change) - -- [Do not automount SA token when not needed](gitlab-org/charts/gitlab@108af40ae28e55c882feae66eaecd3a0d0f45996) ([merge request](gitlab-org/charts/gitlab!2093)) - -## 5.0.12 (2021-11-05) - -No changes. - -## 5.0.11 (2021-09-23) - -No changes. - -## 5.0.10 (2021-09-02) - -No changes. - -## 5.0.9 (2021-08-31) - -No changes. - -## 5.0.8 (2021-08-25) - -No changes. - -## 5.0.7 (2021-08-03) - -No changes. - -## 5.0.6 (2021-07-20) - -No changes. - -## 5.0.5 (2021-07-08) - -No changes. - -## 5.0.4 (2021-07-07) - -No changes. - -## 5.0.3 (2021-07-06) - -No changes. - -## 5.0.2 (2021-07-01) - -No changes. - -## 5.0.1 (2021-06-24) - -No changes. - -## 5.0.0 (2021-06-21) - -### Added (7 changes) - -- [Make ClientAliveInterval configurable for openssh](gitlab-org/charts/gitlab@6b244f199eb03f3a19eab6b33d6a74aef44c9563) ([merge request](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests/2049)) -- [Add GKE load balancer options for KAS service](gitlab-org/charts/gitlab@a67751788fc952a0280333e5646f37e1106554f1) ([merge request](gitlab-org/charts/gitlab!1911)) -- [Add initial upgrade docs for version 5 of the chart](gitlab-org/charts/gitlab@4fa460e639f7e6ee4b1dc2cad50272b6d483c7d7) ([merge request](gitlab-org/charts/gitlab!2027)) -- [Add global.ingress.provider and checks to allow changing the ingress provider](gitlab-org/charts/gitlab@b5522e7edb61be66cb31223afe57f95c386ea4b5) ([merge request](gitlab-org/charts/gitlab!2033)) -- [Set Workhorse shutdown to workerTimeout + 1 by default](gitlab-org/charts/gitlab@e0b57b779b0a432ae669ba10a583b3ab255f1b59) ([merge request](gitlab-org/charts/gitlab!2037)) -- [Allow configuring redis instance for trace chunks](gitlab-org/charts/gitlab@db72918ec278de8984dab7a111fc4f2e958662ff) ([merge request](gitlab-org/charts/gitlab!2031)) -- [gitlab/kas: add image pullSecrets to chart](gitlab-org/charts/gitlab@517b3c6ffdd49d594084135371f63f2a78c5791e) ([merge request](gitlab-org/charts/gitlab!2006)) - -### Fixed (5 changes) - -- [Fix support for an existing ServiceAccount](gitlab-org/charts/gitlab@62636629a9663fa4c5f673fea8ce6023932fa065) ([merge request](gitlab-org/charts/gitlab!2045)) -- [gitlab-shell: quote tcp configmap port](gitlab-org/charts/gitlab@f7af9592fdf52bcdcbb93bf3c82ade97f1fc881f) ([merge request](gitlab-org/charts/gitlab!2047)) -- [Fix link to NGINX configuration docs](gitlab-org/charts/gitlab@5b225a7c843d54a1634473c6dc0aeededa0ffb01) ([merge request](gitlab-org/charts/gitlab!2046)) -- [Move Sidekiq's logging.format to _sidekiq.tpl](gitlab-org/charts/gitlab@db79ec4c066882ff01eb5d57ee8b85439455c295) ([merge request](gitlab-org/charts/gitlab!2021)) -- [Fix ingress.configureCertmanager to have higher priority than global](gitlab-org/charts/gitlab@f6dcdb7a0ccbc972313135a4499cb968ad16dd45) ([merge request](gitlab-org/charts/gitlab!1980)) - -### Changed (12 changes) - -- [GitLab Runner to 0.30.0](gitlab-org/charts/gitlab@d9b0310f1a700ed806f50ff373b5745ade06511b) ([merge request](gitlab-org/charts/gitlab!2060)) -- [Update certmanager to 1.2.0 and min k8s version to 1.16](gitlab-org/charts/gitlab@171be67fd3a16ebeb92b4abafd63caa867419e0a) ([merge request](gitlab-org/charts/gitlab!2041)) -- [Update the min k8s and helm versions](gitlab-org/charts/gitlab@352a9cfb3a9c20faa29c0d32cfeab2a515a3970e) ([merge request](gitlab-org/charts/gitlab!2050)) -- [Remove Helm 2 related tasks from cloud installation scripts](gitlab-org/charts/gitlab@24f7ec7b6839d2220db4d229df478390a0b2ac9c) ([merge request](gitlab-org/charts/gitlab!2040)) -- [Remove spaces from sidekiq queues and negateQueues](gitlab-org/charts/gitlab@978f109daff26a70b3562deab800f60c21b0ddb6) ([merge request](gitlab-org/charts/gitlab!1387)) -- [Bump Container Registry to v3.5.0-gitlab](gitlab-org/charts/gitlab@d95bd8302460ab0884b463e5b2efc8d9662d8ff6) ([merge request](gitlab-org/charts/gitlab!2042)) -- [Update helm test to test updated endpoint](gitlab-org/charts/gitlab@90f165255326f8f98251f9f46c46611546f91813) ([merge request](gitlab-org/charts/gitlab!2044)) -- [bump default self-signed cert expiry to 10yr](gitlab-org/charts/gitlab@0bf962ac30535fb0ce58a5da7384c9ba2b12ecfc) ([merge request](gitlab-org/charts/gitlab!2034)) -- [Update minimum required version of PostgreSQL from 11 to 12](gitlab-org/charts/gitlab@9729a60d24fa11602da347ba1c49abb168a5d740) ([merge request](gitlab-org/charts/gitlab!2012)) -- [Only permit upgrades from 4.12](gitlab-org/charts/gitlab@a8facddb582dccf6b97a634370abd34e9bdb3b4c) ([merge request](gitlab-org/charts/gitlab!2029)) -- [add changes suggested by @WarheadsSE in gitlab-org/charts/gitlab!2000](gitlab-org/charts/gitlab@6380ee8b1a2eeebefc1258e08bd7a9a981a8bb04) ([merge request](gitlab-org/charts/gitlab!2019)) -- [Update gitlab-org/charts/gitlab-runner from 0.28.0 to 0.29.0](gitlab-org/charts/gitlab@32447b667c8fd39f4fde45c0fe4b12b9d85c245f) ([merge request](gitlab-org/charts/gitlab!2008)) - -### Removed (3 changes) - -- [Remove deprecated `experimentalQueueSelector` option for Sidekiq](gitlab-org/charts/gitlab@007788f0ba373f7d3fc51623ea5b70021b62ca5b) ([merge request](gitlab-org/charts/gitlab!2023)) -- [Remove the old resouce changes notices](gitlab-org/charts/gitlab@1755275b75dfe669c038e44dd2d218e3aa62c2e6) ([merge request](gitlab-org/charts/gitlab!2028)) -- [Remove ability to disable cluster from sidekiq values](gitlab-org/charts/gitlab@0de93fe181cd8c514aec013bf7e1541e1b41660b) ([merge request](gitlab-org/charts/gitlab!2024)) - -## 4.12.13 (2021-10-29) - -No changes. - -## 4.12.12 (2021-09-21) - -No changes. - -## 4.12.11 (2021-09-02) - -No changes. - -## 4.12.10 (2021-08-10) - -No changes. - -## 4.12.9 (2021-08-03) - -No changes. - -## 4.12.8 (2021-07-07) - -No changes. - -## 4.12.7 (2021-07-05) - -No changes. - -## 4.12.6 (2021-07-01) - -No changes. - -## 4.12.5 (2021-06-21) - -No changes. - -## 4.12.4 (2021-06-14) - -No changes. - -## 4.12.3 (2021-06-07) - -No changes. - -## 4.12.2 (2021-06-01) - -No changes. - -## 4.12.1 (2021-05-25) - -No changes. - -## 4.12.0 (2021-05-21) - -### Added (2 changes) - -- [Add support for SMTP connection pooling](gitlab-org/charts/gitlab@9db6d3baca1efae954130cf34a030e1d38907d97) ([merge request](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests/1963)) -- [Add Sidekiq routing rules configuration](gitlab-org/charts/gitlab@7538f58c173881d2221098007306ef4b84a191e1) ([merge request](gitlab-org/charts/gitlab!1968)) - -### Fixed (2 changes) - -- [Shared-secrets: add annotations to self-signed job](gitlab-org/charts/gitlab@165e685da49147c584e0f1dc5403787dc669adf4) ([merge request](gitlab-org/charts/gitlab!1998)) -- [Fix grafana ingress misconfiguration](gitlab-org/charts/gitlab@81277b932410b41d468371492e59f4aafcf64eff) ([merge request](gitlab-org/charts/gitlab!1955)) - -### Changed (8 changes) - -- [Remove shared-secrets chart and move templates to root](gitlab-org/charts/gitlab@9dc08d0e2158abbccafe550b9059da0187e2d6e2) ([merge request](gitlab-org/charts/gitlab!1982)) -- [Switch to using the new runner config for cache](gitlab-org/charts/gitlab@ffd6c5e48462d8230eb6948267c6952882812de9) ([merge request](gitlab-org/charts/gitlab!1989)) -- [Update Ingress Api version to `networking.k8s.io/v1/Ingress`](gitlab-org/charts/gitlab@ffdfd9af150f2254fbbd754814d10495328670d2) ([merge request](gitlab-org/charts/gitlab!1984)) -- [Registry to v3.4.0-gitlab](gitlab-org/charts/gitlab@bf0be4e577293310622436ba13bb4700298ff180) ([merge request](gitlab-org/charts/gitlab!1975)) -- [Resolve registry and webservice ingress enabled bug](gitlab-org/charts/gitlab@ee1e3f90a386e50984410307e386569a95d28892) ([merge request](gitlab-org/charts/gitlab!1972)) -- [Pass GITLAB_SHARED_RUNNERS_REGISTRATION_TOKEN as file instead of ENV](gitlab-org/charts/gitlab@7a049f4dba9f41bc72308bbaa2618e954e590b10) ([merge request](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests/1920)) -- [Update Ingress API version from 'extensions/v1beta1' to 'networking.k8s.io/v1'](gitlab-org/charts/gitlab@d883ad9c149e36ff67f4080f520711f0c76de2f4) ([merge request](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests/1951)) -- [Enables the ability to configure the notification_secret](gitlab-org/charts/gitlab@80f49f27e8070580afb808d0fec6f3ad0cb89dd8) ([merge request](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests/1948)) - -### Deprecated (1 change) - -- [Add deprecation warning for Unicorn](gitlab-org/charts/gitlab@214fb34a7d64df9506d66b3f1b2d4b21aa5bddb2) ([merge request](gitlab-org/charts/gitlab!1987)) - -### Other (2 changes) - -- [Refactor a yaml indentation inconsistency](gitlab-org/charts/gitlab@e43cbb7f3b75ef88ef6a478ef809826b7e51bfbe) ([merge request](gitlab-org/charts/gitlab!1978)) -- [Support using PAGES_UPDATE_LEGACY_STORAGE env variable to enable Pages disk access](gitlab-org/charts/gitlab@ba72fead4cc4af5268a258b7a4bdbac85665f15c) ([merge request](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests/1938)) - -## 4.11.7 (2021-07-07) - -No changes. - -## 4.11.6 (2021-07-01) - -No changes. - -## 4.11.5 (2021-06-01) - -No changes. - -## 4.11.4 (2021-05-14) - -No changes. - -## 4.11.3 (2021-04-30) - -No changes. - -## 4.11.2 (2021-04-27) - -No changes. - -## 4.11.1 (2021-04-22) - -- No changes. - -## 4.11.0 (2021-04-22) - -### Removed (1 change) - -- Gitaly - move metrics port from service to pod. !1947 - -### Fixed (5 changes, 1 of them is from the community) - -- Fixes incorrect set hostname for geo syncing Container Registry. !1913 -- Allow separate external Gitaly when Praefect is enabled. !1928 -- Registry: use separate, minimal config for migration. !1939 -- Configure the metrics endpoint of praefect to be reachable from all interfaces not just localhost. !1946 (Tim Neumann) -- Bump gitlab-exporter to 10.2.0 to fix Puma related crash. !1954 - -### Changed (3 changes) - -- GitLab Runner to 0.27.0 / 13.10.0. !1904 -- Registry to 3.3.0-gitlab. !1942 -- GitLab Runner chart to 0.28.0. !1956 - -### Added (7 changes) - -- Add Registry migrations job. !1857 -- Add checkConfig to validate Gitaly storage names. !1873 -- [shared-secrets chart] If Secret key does not exist, patch it in. !1883 -- Allow configuring terminationGracePeriodSeconds for Sidekiq pod. !1905 -- Add online GC configurations to registry chart. !1908 -- Add Microsoft Graph config support for MailRoom. !1929 -- Added support for IAM roles in EKS. !1940 - - -## 4.10.5 (2021-06-01) - -No changes. - -## 4.10.4 (2021-04-27) - -No changes. - -## 4.10.3 (2021-04-13) - -- No changes. - -## 4.10.2 (2021-04-01) - -### Fixed (1 change) - -- Fix for Rancher/RKE: Remove extra space before -}} in _kas.tpl. !1925 - - -## 4.10.1 (2021-03-31) - -### Fixed (1 change) - -- Fixes Container Registry notification when Geo syncing is disabled. !1899 - -### Changed (1 change) - -- GitLab Exporter to 10.1.0. !1915 - - -## 4.10.0 (2021-03-22) - -### Fixed (6 changes, 2 of them are from the community) - -- Skip kas redis.password_file when password disabled. !1853 -- Add missing hostnameOverride logic. !1861 -- Use template for label selectors on NGINX objects. !1877 (Antony Perigault) -- Webervice: Fix template loadBalancerSourceRanges in Service object. !1882 (Rafed Ramzi) -- Fix Registry ingress' serviceName value. !1887 -- Update GKE bootstrap script to wait for the api to be available. !1894 - -### Changed (9 changes, 1 of them is from the community) - -- Fixes podLabels for sidekiq deployments. !1842 -- Adds common labels for all webservice deployment objects. !1856 -- Bump Container Registry to v3.1.0-gitlab. !1866 -- Adds Geo Notification Event for Container Registry. !1868 -- honour existing health check script shipped with gitlab-mailroom container. !1875 (Dmitry Makovey) -- Add internal and external URL config for KAS. !1879 -- Use HTTP liveness check for mailroom. !1891 -- Bump Container Registry to v3.2.0-gitlab. !1893 -- Bump Container Registry to v3.2.1-gitlab. !1896 - -### Added (6 changes, 1 of them is from the community) - -- Add optional networkpolicy for KAS. !1837 -- Support specifying `nodeSelector` globally. !1839 (Marshall Cottrell) -- Add global.ingress.path to address #2563. !1846 -- Add database configurations to registry chart. !1854 -- Webservice: enable per-deployment blackoutSeconds. !1867 -- Add migration configurations to registry chart. !1888 - - -## 4.9.7 (2021-04-27) - -No changes. - -## 4.9.6 (2021-04-13) - -- No changes. - -## 4.9.5 (2021-03-31) - -- No changes. - -## 4.9.4 (2021-03-17) - -### Changed (1 change) - -- GitLab Runner to 0.26.0. !1858 - - -## 4.9.3 (2021-03-08) - -- No changes. - -## 4.9.2 (2021-03-04) - -- No changes. - -## 4.9.1 (2021-02-23) - -- No changes. - -## 4.9.0 (2021-02-22) - -### Fixed (8 changes, 1 of them is from the community) - -- Add custom annotations for shared-secrets job. !1774 -- Prevent all Gitaly pods from restarting when replicas are changed. !1806 -- Fix Praefect spec test and warning typo. !1812 -- Allow the use of TCP ProxyProtocol in ELB AWS. !1814 (Cristhian Roa) -- CI: Shorten RELEASE_NAME to 48 characters. !1819 -- Fixes podLabels for sidekiq deployments. !1826 -- Fix SMTP openssl_verify_mode implementation. !1831 -- Fix redis service templating when Helm release includes 'redis'. !1832 - -### Changed (14 changes) - -- Support migration from Gitaly to Praefect. !1757 -- Bump Redis chart to Redis 6.0.10. !1772 -- Adds common labels for Container Registry Chart. !1778 -- Fix pod labels for GitLab ShellChart. !1779 -- Bump Container Registry to v3.0.0-gitlab. !1780 -- Add common pod labels for Webservices. !1785 -- Add common pod labels for kas. !1791 -- Add common pod labels for mailroom. !1792 -- Modify logic to check if Praefect is enabled. !1797 -- Add common pod labels for task-runner. !1798 -- Add common pod labels for praefect. !1799 -- Add common pod labels for Pages. !1805 -- Add common pod labels for Gitaly. !1829 -- Webservice: accept / or /* for default ingress.path. !1841 - -### Performance (2 changes) - -- Bump gitlab-exporter to v10.0.0, tune malloc to release memory earlier. !1777 -- Tune Ruby GC for gitlab-exporter. !1820 - -### Added (7 changes) - -- Expose settings to control GitLab Shell logging. !1767 -- Add application settings cache expiry support. !1768 -- Automatically enable OAuth for GitLab Pages. !1782 -- Add matomo_disable_cookies setting. !1813 -- Adds common labels across all objects for GitLab Geo-Logcursor chart. !1822 -- Add support for specifying a nodeSelector for Kas. !1836 -- KAS: Add ability to disable Redis. !1838 - -### Other (3 changes) - -- Emit Ruby Prometheus metrics for gitlab-exporter. !1790 -- Clarify EKS installation instructions. !1801 -- Add outgoing email section to 'globals' docs. !1821 - - -## 4.8.8 (2021-04-13) - -- No changes. - -## 4.8.7 (2021-03-31) - -- No changes. - -## 4.8.6 (2021-03-17) - -- No changes. - -## 4.8.5 (2021-03-04) - -- No changes. - -## 4.8.4 (2021-02-11) - -- No changes. - -## 4.8.3 (2021-02-05) - -- No changes. - -## 4.8.2 (2021-02-01) - -### Fixed (2 changes) - -- Fixes backups when GitLab KAS is enabled. !1765 -- Fix Gitaly persistence configuration. !1796 - - -## 4.8.1 (2021-01-26) - -### Changed (1 change) - -- Update GitLab Runner chart to 0.25.0. !1775 - - -## 4.8.0 (2021-01-22) - -### Fixed (2 changes, 1 of them is from the community) - -- Add --subnetwork flag to the GKE bootstrap script. !1737 (rhassanein) -- Fix spelling and logic for Gitaly hook volumes. !1747 - -### Changed (6 changes) - -- Support multiple virtual_storages in Praefect. !1618 -- Update gitlab-container-registry to v2.13.0-gitlab. !1723 -- Adds common labels for GitLab Sidekiq Chart. !1727 -- Adds common labels for GitLab Exporter. !1743 -- Bump gitlab-exporter to v8.0.0. !1745 -- Bump Container Registry to v2.13.1-gitlab. !1755 - -### Added (7 changes, 2 of them are from the community) - -- Support override of exposed hostname for grafana and webservice Ingress. !1621 (Louis Baumann) -- Add GitLab Pages chart. !1677 -- Adds common labels across all objects for GitLab Shell's chart. !1707 -- Allow configurable service type for webservice. !1726 -- Add support for custom domains in GitLab Pages. !1728 -- Add tolerations for minio create bucket job. !1744 (David ALEXANDRE) -- Add upgrade survey link to upgrade output. !1762 - - -## 4.7.9 (2021-03-17) - -- No changes. - -## 4.7.8 (2021-03-04) - -- No changes. - -## 4.7.7 (2021-02-11) - -- No changes. - -## 4.7.6 (2021-02-01) - -- No changes. - -## 4.7.5 (2021-01-25) - -### Fixed (2 changes, 1 of them is from the community) - -- Fix dependency proxy object storage config. !1531 (Maikel Vlasman) -- Fix spelling and logic for Gitaly hook volumes (backport 4.7.x). !1761 - -### Changed (2 changes) - -- GitLab Runner chart to 0.15.0. !1224 -- GitLab Runner chart to 0.16.0, v12.10.1. !1299 - -### Added (2 changes, 2 of them are from the community) - -- Minio: Adds podLabels and podAnnotations to chart. !1264 (Kavanaugh Latiolais) -- Support custom labels for Pods of GitLab components. !1457 (Maxence Laude) - - -## 4.7.4 (2021-01-13) - -- No changes. - -## 4.7.3 (2021-01-08) - -- No changes. - -## 4.7.2 (2021-01-07) - -### Fixed (1 change) - -- Fix nginx-ingress checkConfig error. !1730 - - -## 4.7.1 (2020-12-23) - -### Changed (1 change) - -- GitLab Runner to 0.24.0. !1724 - - -## 4.7.0 (2020-12-22) - -### Fixed (3 changes) - -- Make consolidated object store config a non-default option. !1588 -- Support using dedicated bucket for Minio. !1652 -- Add extraEnv to task-runner backup job. !1721 - -### Changed (10 changes, 1 of them is from the community) - -- Rename and deprecate configuration keys because Piwik rebranded as Matomo. !1602 (Katrin Leinweber @katrinleinweber) -- Remove Service port from gitlab-kas. !1659 -- Add prometheus annotations for kas. !1660 -- Allow toggling redirects to storage backends on a per-repository basis. !1667 -- Use gitlab-exporter v7.1.2. !1675 -- Registry: update to v2.12.0-gitlab. !1683 -- Update gitlab-kas to v13.7.0. !1694 -- Add install survey link to helm install notes. !1711 -- Add ability to customize workhorse scheme. !1714 -- Webservice: convert to generator pattern, allow splitting traffic groups. - -### Added (7 changes) - -- Add TLS support to Praefect. !1613 -- Add encrypted_settings_key_base rails secret. !1617 -- Add server-side global hook support through configmaps. !1653 -- Allow change or deletion of settings in Gitaly StatefulSet securityContexts. !1665 -- Add support for /database_bloat endpoint in gitlab-exporter. !1673 -- Configurable termination graceperiod for NGINX. !1685 -- Support setting of application_name in database.yml. !1712 - -### Other (2 changes) - -- Update NGINX from v0.20.0 to 0.41.2. !1690 -- Changes the default loglevel for registry to info. !1703 - - -## 4.6.7 (2021-02-11) - -- No changes. - -## 4.6.6 (2021-02-01) - -### Fixed (1 change, 1 of them is from the community) - -- Fix dependency proxy object storage config. !1531 (Maikel Vlasman) - -### Changed (2 changes) - -- GitLab Runner chart to 0.15.0. !1224 -- GitLab Runner chart to 0.16.0, v12.10.1. !1299 - -### Added (2 changes, 2 of them are from the community) - -- Minio: Adds podLabels and podAnnotations to chart. !1264 (Kavanaugh Latiolais) -- Support custom labels for Pods of GitLab components. !1457 (Maxence Laude) - - -## 4.6.5 (2021-01-13) - -- No changes. - -## 4.6.4 (2021-01-07) - -- No changes. - -## 4.6.3 (2020-12-10) - -### Changed (1 change, 1 of them is from the community) - -- Update gitlab-runner from 0.22.0 to 0.23.0. !1686 (Jan Brummelte) - - -## 4.6.2 (2020-12-07) - -- No changes. - -## 4.6.1 (2020-11-23) - -- No changes. - -## 4.6.0 (2020-11-22) - -### Fixed (2 changes) - -- Configures gitlab-kas ingress with its own TLS certificate. !1644 -- GitLab Shell: sshd_config observe internalPort. !1663 - -### Changed (10 changes) - -- Update default service ports for GitLab Kubernetes Agent Server (kas). !1587 -- custom ca: Loosen the mount permissions to 0440. !1605 -- Populate three dots of DNS for internal Services. !1606 -- Change KAS service route to be subdomain by default, instead of a fixed path. !1623 -- Upgraded Ruby bundler gem to 2.1.4. !1624 -- Certificates: update to 20191127-r2 tag. !1625 -- Mark Sidekiq queue selector as no longer experimental. !1631 -- NGINX: reduce controller to 2 replicas by default. !1635 -- Use config file instead of command line arguments for kas. !1655 -- Set default annotation to help balance webservice traffic. !1661 - -### Added (5 changes) - -- Export GitLab Pages settings in Rails pods. !1598 -- Support Sentry for container registry. !1609 -- Adds configurability of terminationGracePeriod for GitLab-Shell. !1610 -- Expose observability port for gitlab-kas. !1646 -- Adds readiness probe for gitlab-shell. !1649 - -### Other (3 changes) - -- Add Image Resizer config defaults. !1595 -- Update resource specifications for Webservice and Sidekiq. !1634 -- Set release_package to run manually. !1641 - - -## 4.5.7 (2021-01-13) - -- No changes. - -## 4.5.6 (2021-01-07) - -- No changes. - -## 4.5.5 (2020-12-07) - -### Other (1 change) - -- Set release_package to run manually. !1641 - - -## 4.5.4 (2020-11-13) - -- No changes. - -## 4.5.3 (2020-11-04) - -- No changes. - -## 4.5.2 (2020-11-02) - -### Fixed (2 changes) - -- geo-logcursor: move redis secrets to optional. !1614 -- Remove trailing space causing errors in the deprecation template. !1615 - - -## 4.5.1 (2020-10-22) - -- No changes. - -## 4.5.0 (2020-10-22) - -### Fixed (1 change) - -- Fix PG password error when enabling extensions during DB init. !1593 - -### Changed (3 changes) - -- Make stackdriver profiling credentials optional. !1558 -- Updated location for Grafana chart. !1594 -- Update Prometheus chart location. !1596 - -### Added (3 changes) - -- Add auto_link_user setting. !1555 -- Adds configurable termination grace period for webservice. !1569 -- Adds log format configuration for gitlab-shell chart. !1581 - -### Other (3 changes) - -- Remove db-pool configuration. !1551 -- cleanup registry.fullname templates. !1568 -- Bump default gitlab-kas image tag to v0.0.6. !1582 - - -## 4.4.6 (2020-12-07) - -### Other (1 change) - -- Set release_package to run manually. !1641 - - -## 4.4.5 (2020-11-04) - -### Fixed (2 changes) - -- Fix PG password error when enabling extensions during DB init. !1593 -- geo-logcursor: move redis secrets to optional. !1614 - - -## 4.4.4 (2020-10-15) - -### Fixed (1 change) - -- Praefect: fixup certificates mounts #2341. !1590 - - -## 4.4.3 (2020-10-07) - -### Added (1 change) - -- Adds NetworkPolicy for gitlab-shell. !1580 - - -## 4.4.2 (2020-10-01) - -### Changed (1 change) - -- GitLab Runner chart to 0.21.1. !1573 - -### Other (2 changes) - -- Bump default gitlab-kas image tag to v0.0.5. !1565 -- Update GitLab Version to 13.4.2. - - -## 4.4.1 (2020-09-24) - -### Other (1 change) - -- Update GitLab Version to 13.4.1. - - -## 4.4.0 (2020-09-22) - -### Fixed (1 change) - -- Moves GITLAB_WORKHORSE_SENTRY_DSN to the workhorse container. !1543 -- Fix dependency proxy object storage config. !1531 (Maikel Vlasman) - -### Changed (7 changes, 1 of them is from the community) - -- Disable MIME type guessing in s3cmd. !1512 -- Disable workhorse archive cache by default. !1520 -- Removing dots from job names. !1540 -- Upgrade default PostgreSQL version to 11.9. !1550 -- Add PG connect_timeout setting. !1552 -- Update container-registry to 2.11.0-gitlab. !1553 -- Make Gitaly service values global options. !1559 - -### Added (11 changes, 1 of them is from the community) - -- Add support for Praefect. !1493 -- Support Stackdriver Profiling for registry. !1494 -- Add support for configuring smartcard authentication. !1510 -- Support UBI certificates container. !1511 -- Exposes the workhorse prometheus port. !1514 -- Adds Content Security Policy (CSP) configuration. !1534 -- Allow for additional labels for services. !1537 -- Add danger job for validating the extension of changelog entries. !1542 (Matthias van de Meent) -- Document upgrade steps for PostgreSQL 11 -> 12. !1545 -- Add Azure Blob storage configuration options. !1546 -- Add S3 server side encryption settings. !1549 - -### Other (2 changes) - -- Adds capability to specify memoryKiller per Pod. !1536 -- Update GitLab Version to 13.4.0. - - -## 4.3.9 (2020-11-02) - -- No changes. - -## 4.3.8 (2020-10-23) - -- No changes. - -## 4.3.7 (2020-10-01) - -### Other (1 change) - -- Update GitLab Version to 13.3.7. - - -## 4.3.6 (2020-09-14) - -### Changed (1 change) - -- Update runner chart to Runner 13.3.1 (chart 0.20.1). !1538 - -### Other (1 change) - -- Update GitLab Version to 13.3.6. - - -## 4.3.5 (2020-09-04) - -### Other (1 change) - -- Update GitLab Version to 13.3.5. - - -## 4.3.4 (2020-09-02) - -### Other (1 change) - -- Update GitLab Version to 13.3.4. - - -## 4.3.3 (2020-09-02) - -### Fixed (1 change) - -- Only create object_storage 'connection' block if feature enabled. !1517 - -### Other (1 change) - -- Update GitLab Version to 13.3.3. - - -## 4.3.2 (2020-08-28) - -### Fixed (2 changes, 2 of them are from the community) - -- Add missing bucket variables. !1515 (Chris Boot) -- Add object_store secret to backup CronJob. !1516 (Chris Boot) - -### Other (1 change) - -- Update GitLab Version to 13.3.2. - - -## 4.3.1 (2020-08-25) - -### Changed (1 change) - -- Update GitLab Runner to 13.3.0 (runner chart 0.20.0). !1513 - -### Other (1 change) - -- Update GitLab Version to 13.3.1. - - -## 4.3.0 (2020-08-22) - -### Removed (1 change) - -- Geo - Remove FDW related config. !1496 - -### Fixed (1 change) - -- Fix misaligned indent for rack_attack. - -### Changed (4 changes) - -- Changed Prometheus to use GitLab specific annotations. !1439 -- Update GitLab Operator to v0.10. !1478 -- Bump Container Registry to v2.10.1-gitlab. !1483 -- Flips daemonMode option for Memory Killer. !1490 - -### Added (5 changes, 1 of them is from the community) - -- Provide possibility of passing the postgresql password via a file instead of secret. !1422 (Tiago Posse ) -- Add support for DependencyProxy. !1464 -- Support consolidated object storage configuration. !1479 -- Adds NetworkPolicy object for the Webservice. !1491 -- Workhorse: support configuring logFormat, default JSON. !1497 -- Support custom labels for Pods of GitLab components !1457 (Maxence Laude) - -### Other (1 change) - -- Update GitLab Version to 13.3.0. - - -## 4.2.10 (2020-10-01) - -### Other (1 change) - -- Update GitLab Version to 13.2.10. - - -## 4.2.9 (2020-09-04) - -### Other (1 change) - -- Update GitLab Version to 13.2.9. - - -## 4.2.8 (2020-09-02) - -### Other (1 change) - -- Update GitLab Version to 13.2.8. - - -## 4.2.7 (2020-09-02) - -### Other (1 change) - -- Update GitLab Version to 13.2.7. - - -## 4.2.6 (2020-08-18) - -### Other (1 change) - -- Update GitLab Version to 13.2.6. - - -## 4.2.5 (2020-08-18) - -### Changed (1 change) - -- Update GitLab Runner chart to 0.19.2. !1489 - -### Other (1 change) - -- Update GitLab Version to 13.2.5. - - -## 4.2.4 (2020-08-11) - -### Other (1 change) - -- Update GitLab Version to 13.2.4. - - -## 4.2.3 (2020-08-05) - -### Other (1 change) - -- Update GitLab Version to 13.2.3. - - -## 4.2.2 (2020-07-30) - -### Other (1 change) - -- Update GitLab Version to 13.2.2. - - -## 4.2.1 (2020-07-24) - -### Fixed (1 change, 1 of them is from the community) - -- Use the global `psql` config parameters when the local `psql` configuration does not contain that config key, instead of going to the default option. !1461 (Matthias van de Meent) - -### Changed (1 change) - -- Update GitLab Runner to 0.19.1. !500 - -### Other (1 change) - -- Update GitLab Version to 13.2.1. - - -## 4.2.0 (2020-07-22) - -### Fixed (2 changes) - -- Restore per sub-chart configuration of PostgreSQL (#1812). !1420 -- Redis: switch encoding method for redis password in URI. !1447 - -### Changed (2 changes) - -- Support extraEnv at the pod level for Sidekiq. !1443 -- Set default database pool size to 1 as the application will calculate the best pool size based on concurrency. - -### Added (3 changes, 1 of them is from the community) - -- Gitaly PVC support annotations. !1419 (Andy Ai) -- Allows overriding targetAverageValue in sidekiq pods. !1428 -- Gitaly: support TLS flag for external instances. !1446 - -### Other (2 changes, 1 of them is from the community) - -- Add an annotations support to the migrations job template. !1423 (Tiago Posse) -- Update GitLab Version to 13.2.0. - - -## 4.1.12 (2020-09-04) - -### Other (1 change) - -- Update GitLab Version to 13.1.11. - - -## 4.1.11 (2020-09-02) - -### Other (1 change) - -- Update GitLab Version to 13.1.10. - - -## 4.1.10 (2020-09-02) - -### Other (1 change) - -- Update GitLab Version to 13.1.9. - - -## 4.1.9 (2020-08-18) - -### Other (1 change) - -- Update GitLab Version to 13.1.8. - - -## 4.1.7 (2020-08-05) - -### Other (1 change) - -- Update GitLab Version to 13.1.6. - - -## 4.1.6 (2020-07-24) - -### Other (1 change) - -- Update GitLab Version to 13.1.5. - - -## 4.1.5 (2020-07-24) - -### Other (1 change) - -- Update GitLab Version to 13.1.5. - - -## 4.1.4 (2020-07-09) - -### Other (1 change) - -- Update GitLab Version to 13.1.4. - - -## 4.1.3 (2020-07-06) - -### Changed (1 change) - -- Update GitLab Runner chart to 0.18.1. !1433 - -### Other (1 change) - -- Update GitLab Version to 13.1.3. - - -## 4.1.2 (2020-07-01) - -### Other (1 change) - -- Update GitLab Version to 13.1.2. - - -## 4.1.1 (2020-06-24) - -### Fixed (1 change) - -- Update mailroom example docs to show the proper syntax for .mailbox. !1417 - -### Other (1 change) - -- Update GitLab Version to 13.1.1. - - -## 4.1.0 (2020-06-22) - -### Fixed (3 changes, 1 of them is from the community) - -- Added validation for redis host configuration. !1381 (Julius Kvedaras) -- Fix GitLab Shell TCP config. !1393 -- Fix sentinel configuration for service_desk mailroom service. !1412 - -### Changed (5 changes) - -- Break up gitlab-shell of gitaly config. !1353 -- Bump gitlab-exporter chart to 7.0.4. !1374 -- gitlab-shell - disable all forwarding via sshd. !1391 -- Centralize database.yml template (Rails). !1408 -- Update gitlab-exporter to version 7.0.6. !1411 - -### Added (13 changes, 5 of them are from the community) - -- Add tracing support to helm chart. !1234 (Dmitry Chepurovskiy) -- Added the ability to control the serviceAccounts of GitLab sub-charts. !1303 (Mark Tew) -- Added Service Desk email configuration. !1324 -- Add gitlab.deploymentAnnotations template to charts in repository. !1351 -- Implement extraEnv pattern. !1377 -- Adds extraVolumeMounts for Sidekiq pods. !1380 -- Support passing registry notification headers as k8s secrets. !1383 -- Add nodePort configuration in NGINX service for gitlab-shell. !1394 -- Adds Sentry support for sidekiq and webservice. !1398 -- Add option to configure priorityClassName on Webservice chart. !1405 (Dragos Sutu) -- Add option to configure priorityClassName on Sideqik chart. !1406 (Dragos Sutu) -- Database: support load balancing reads (#1004). !1414 -- Adds update strategy to be configured for webservice. (Stepan Kuksenko) - -### Other (4 changes) - -- Add support for enabling the btree_gist pg extension. !1372 -- Ensure upgraded to 4.0 before 4.1. !1403 -- Update GitLab Runner chart to 0.18.0. !1416 -- Update GitLab Version to 13.1.0. - - -## 4.0.12 (2020-08-18) - -### Other (1 change) - -- Update GitLab Version to 13.0.14. - - -## 4.0.11 (2020-08-18) - -### Other (1 change) - -- Update GitLab Version to 13.0.13. - - -## 4.0.10 (2020-08-05) - -### Other (1 change) - -- Update GitLab Version to 13.0.12. - - -## 4.0.9 (2020-07-09) - -### Other (1 change) - -- Update GitLab Version to 13.0.10. - - -## 4.0.8 (2020-07-06) - -### Other (1 change) - -- Update GitLab Version to 13.0.9. - - -## 4.0.7 (2020-07-01) - -### Other (1 change) - -- Update GitLab Version to 13.0.8. - - -## 4.0.6 (2020-06-25) - -### Other (1 change) - -- Update GitLab Version to 13.0.7. - - -## 4.0.5 (2020-06-10) - -### Changed (1 change) - -- Update GitLab Runner to 0.17.1. !1395 - -### Other (1 change) - -- Update GitLab Version to 13.0.6. - - -## 4.0.4 (2020-06-04) - -### Other (1 change) - -- Update GitLab Version to 13.0.5. - - -## 4.0.3 (2020-06-03) - -### Other (1 change) - -- Update GitLab Version to 13.0.4. - - -## 4.0.2 (2020-05-29) - -### Fixed (3 changes, 1 of them is from the community) - -- Mailroom: follow Redis Queues instance (#2097). !1347 -- Fix an bug in which it was impossible to configure the unicorn memory killer. !1365 (Matthias van de Meent) -- Ensure database-upgrade scripts ignores running on the backup pods. !1367 - -### Changed (1 change) - -- Update GitLab Runner to 0.17.0. !1356 - -### Other (1 change) - -- Update GitLab Version to 13.0.3. - - -## 4.0.1 (2020-05-27) - -### Fixed (1 change) - -- Ensure database-upgrade scripts ignores running on the backup pods. !1367 - -### Changed (1 change) - -- Update GitLab Runner to 0.17.0. !1356 - -### Other (1 change) - -- Update GitLab Version to 13.0.1. - - -## 4.0.0 (2020-05-22) - -### Fixed (2 changes) - -- Add defaulting of multi-redis password enabled (#2030). !1335 -- Mailroom: follow Redis Queues instance (#2097). !1347 - -### Changed (9 changes, 1 of them is from the community) - -- Deploy ChaosKube Helm chart. !1296 -- Allow configuration of security context user to help with Openshift installs. !1306 (Mickaël Canévet) -- Moved gitlab-shell settings to gitaly config.toml. !1308 -- Make sidekiq-cluster the default. !1317 -- Update gitlab-exporter to 7.0.2. !1321 -- Bump Container Registry to v2.9.1-gitlab. !1326 -- Updated documention to include multi Redis support. !1330 -- NGINX: Enable HTTP2, as all services support it. !1338 -- Bump gitlab-exporter to 7.0.3. !1345 - -### Added (8 changes, 2 of them are from the community) - -- Add task-runner pod antiAffinity support to helm chart. !1025 (Sam Wenham) -- Replace unicorn chart with webservice. !1145 (Dmitry Chepurovskiy) -- Provides capability to configure PDB per sidekiq pod config. !1292 -- Adds update strategy to be configured for Container Registry. !1293 -- Adds update strategy to be configured for sidekiq. !1294 -- Update min chart/gitlab versions for the major release. !1300 -- Add support for ci_jwt_signing_key Rails secret. !1318 -- Add extraEnvs for Sidekiq. !1333 - -### Other (2 changes) - -- Update bitnami/postgres -> 8.9.4, postgres -> 11.7.0. !1320 -- Update GitLab Version to 13.0.0. - - -## 3.3.13 (2020-07-06) - -### Other (1 change) - -- Update GitLab Version to 12.10.14. - - -## 3.3.12 (2020-07-01) - -### Other (1 change) - -- Update GitLab Version to 12.10.13. - - -## 3.3.11 (2020-06-25) - -### Other (1 change) - -- Update GitLab Version to 12.10.12. - - -## 3.3.9 (2020-06-04) - -### Other (1 change) - -- Update GitLab Version to 12.10.10. - - -## 3.3.7 (2020-05-29) - -### Other (1 change) - -- Update GitLab Version to 12.10.8. - - -## 3.3.6 (2020-05-27) - -### Fixed (1 change) - -- backport Mailroom: follow Redis Queues instance (#2097). !1354 - -### Other (1 change) - -- Update GitLab Version to 12.10.7. - - -## 3.3.5 (2020-05-15) - -### Changed (1 change) - -- Update GitLab runner chart to 0.16.1. !1331 - -### Other (1 change) - -- Update GitLab Version to 12.10.6. - - -## 3.3.4 (2020-05-14) - -### Other (1 change) - -- Update GitLab Version to 12.10.5. - - -## 3.3.3 (2020-05-04) - -### Other (1 change) - -- Update GitLab Version to 12.10.3. - - -## 3.3.2 (2020-04-30) - -### Fixed (3 changes) - -- Fixed PostgreSQL port when enabling Geo. !1304 -- Fix redis secret templating when password.enabled=false. !1313 -- Add terraform_state secret to task-runner. !1315 - -### Other (1 change) - -- Update GitLab Version to 12.10.2. - - -## 3.3.1 (2020-04-24) - -### Other (1 change) - -- Update GitLab Version to 12.10.1. - - -## 3.3.0 (2020-04-22) - -### Removed (1 change) - -- Remove Redis from Gitlab-Shell and Gitaly charts. !1271 - -### Fixed (3 changes, 2 of them are from the community) - -- Fix the gitaly service name not being used correctly in all places. !1204 (Matthias van de Meent) -- Change default concurrency setting for Sidekiq to 25 globally. !1233 -- Fixed that unnecessary secret is generated when using external Redis. !1237 (Colin Luo) - -### Changed (6 changes) - -- Updated Helm references and commands to v3 notations. !1210 -- Support queues, negateQueues, and experimentalQueueSelector for Sidekiq when cluster is enabled. !1251 -- Updated references to deprecated postgresql and redis charts. !1253 -- Make GitLab task-runner scalable, default 1 #1254. !1263 -- GitLab Exporter to 7.0.1. !1265 -- Bump Container Registry to v2.9.0-gitlab. !1273 - -### Added (6 changes, 2 of them are from the community) - -- Add storage setting for terraform state. !1208 -- Ability to override PostgreSQL port for subcharts. !1212 (Stepan Kuksenko) -- Expose settings to configure Registry notifications. !1225 -- Add option for using Sidekiq Cluster to start Sidekiq. !1247 -- Add optional `priorityClassName` configuration value to Gitaly chart. !1282 (Theo Meneau) -- Support configuration of multiple Redis instances. !1287 -- Minio: Adds podLabels and podAnnotations to chart. !1264 (Kavanaugh Latiolais) - -### Other (1 change) - -- Update GitLab Version to 12.10.0. - - -## 3.2.9 (2020-06-10) - -### Other (1 change) - -- Update GitLab Version to 12.9.10. - - -## 3.2.8 (2020-06-03) - -### Other (1 change) - -- Update GitLab Version to 12.9.9. - - -## 3.2.7 (2020-05-27) - -### Other (1 change) - -- Update GitLab Version to 12.9.8. - - -## 3.2.6 (2020-05-14) - -### Other (1 change) - -- Update GitLab Version to 12.9.7. - - -## 3.2.5 (2020-04-30) - -### Other (1 change) - -- Update GitLab Version to 12.9.5. - - -## 3.2.4 (2020-04-17) - -### Other (1 change) - -- Update GitLab Version to 12.9.4. - - -## 3.2.3 (2020-04-15) - -### Added (1 change, 1 of them is from the community) - -- Add support for the Seat Link enabled flag. !1272 (Matthias van de Meent) - -### Other (1 change) - -- Update GitLab Version to 12.9.3. - - -## 3.2.2 (2020-03-31) - -### Other (1 change) - -- Update GitLab Version to 12.9.2. - - -## 3.2.1 (2020-03-26) - -### Other (1 change) - -- Update GitLab Version to 12.9.1. - - -## 3.2.0 (2020-03-22) - -### Fixed (4 changes, 1 of them is from the community) - -- Fix unicorn worker killer configuration. !1199 (Matthias van de Meent) -- Fix logic of registry HPA deprecations. !1203 -- Ensure kubectl jobs are not run as root. !1206 -- Add gitlab.host to Migrations Rails config #1947. !1215 - -### Changed (2 changes) - -- Update gitlab-org/gitlab-exporter from 6.0.0 to 6.1.0. !1176 -- Bump Container Registry to v2.8.2-gitlab. !1214 - -### Other (1 change) - -- Update GitLab Version to 12.9.0. - - -## 3.1.8 (2020-04-30) - -### Other (1 change) - -- Update GitLab Version to 12.8.10. - - -## 3.1.7 (2020-04-15) - -### Other (1 change) - -- Update GitLab Version to 12.8.9. - - -## 3.1.6 (2020-03-26) - -### Fixed (1 change) - -- Fix logic of registry HPA deprecations. !1203 - -### Other (1 change) - -- Update GitLab Version to 12.8.8. - - -## 3.1.5 (2020-03-16) - -### Other (1 change) - -- Update GitLab Version to 12.8.7. - - -## 3.1.4 (2020-03-11) - -### Other (1 change) - -- Update GitLab Version to 12.8.6. - - -## 3.1.3 (2020-03-09) - -### Other (1 change) - -- Update GitLab Version to 12.8.5. - - -## 3.1.2 - -### Changed (1 change) - -- Update gitlab-org/charts/gitlab-runner from 0.13.1 to 0.14.0. !1187 - -### Other (1 change) - -- Update GitLab Version to 12.8.2. - - -## 3.1.1 - -### Other (1 change) - -- Update GitLab Version to 12.8.1. - - -## 3.1.0 - -### Fixed (4 changes, 2 of them are from the community) - -- Route gitlab-shell and gitaly requests through workhorse. !1114 (Dmitry Chepurovskiy) -- Enabled Geo configuration checks. !1121 -- Disable cert-manager's webook that validates its CRDs. !1139 (Erik Sundell (@consideRatio)) -- Corrected references to gitlab-runner.install. !1149 - -### Changed (8 changes) - -- Update gitlab-exporter to 5.2.2. !1087 -- Changed migrations job to use task-runner image. !1126 -- Bump registry to v2.7.7-gitlab. !1133 -- Update registry chart versions to reflect recent changes. !1144 -- Update gitlab-exporter to 6.0.0. !1151 -- Align gitlab/unicorn chart service names for Istio environments. !1153 -- Bump Container Registry to v2.8.0-gitlab. !1172 -- Updated EKS bootstrap script to default to Kubernetes 1.14. !1175 - -### Added (6 changes, 3 of them are from the community) - -- Allows the database `pool` to be configurable. !1111 (skarbek) -- Added ability to set NodePort and ExternalTrafficPolicy for gitlab-shell service. !1112 (Dmitry Chepurovskiy) -- Adds logging.format option to enable structured json logging for sidekiq. !1132 -- Performance: enable Bootsnap for all Rails-derived containers. !1157 -- NOTES: add notice of runner default to unprivilieged. !1158 -- Add `component` field to the nginx ingress podAntiAffinity. !1169 (Ivan Kurnosov (@zerkms)) - -### Other (5 changes) - -- Document command for easily fetching ELB hostname. !1159 -- Doc: link upstream docs for why GitLab Runner is not privileged by default. !1160 -- Include GitLab Exporter & GitLab Grafana to sub-chart lists. !1161 -- Bump Container Registry to v2.8.1-gitlab. !1173 -- Update GitLab Version to 12.8.0. - - -## 3.0.7 (2020-04-15) - -### Other (1 change) - -- Update GitLab Version to 12.7.9. - - -## 3.0.6 (2020-03-26) - -### Fixed (1 change) - -- Fix logic of registry HPA deprecations. !1203 - -### Other (1 change) - -- Update GitLab Version to 12.7.8. - - -## 3.0.5 - -### Other (1 change) - -- Update GitLab Version to 12.7.7. - - -## 3.0.4 - -### Fixed (1 change, 1 of them is from the community) - -- Use the volume with Postgres client SSL certificate in the gitlab-exporter deployment. !1162 (Franciszek Walkowiak) - -### Other (1 change) - -- Update GitLab Version to 12.7.6. - - -## 3.0.3 - -### Fixed (1 change) - -- Workhorse - set sentinel port default. !1135 - -### Other (1 change) - -- Update GitLab Version to 12.7.5. - - -## 3.0.2 - -### Changed (1 change) - -- Update gitlab-runner chart to 0.13.1. !1138 - -### Other (1 change) - -- Update GitLab Version to 12.7.4. - - -## 3.0.1 - -### Changed (1 change) - -- Update gitlab-runner chart to 0.13.0. !1131 - -### Other (1 change) - -- Update GitLab Version to 12.7.2. - - -## 3.0.0 - -### Fixed (2 changes) - -- NGINX: port spec.clusterIP fixup, unblock upgrades in Helm v3. !1082 -- Set globals at top level for newer Helm versions. !1083 - -### Changed (7 changes) - -- Upgrade bundled PostgreSQL chart to stable/postgresql 7.7.0. !955 -- Bump the requests for exporter and migrations. !967 -- Moved Gitaly enabled flag to global namespace. !1081 -- Changed from forked Redis chart to upstream chart. !1086 -- Update Prometheus chart to v10.0.0. !1089 -- Split the operator bootstrap out of the chart. !1090 -- Registy now defaults to GitLab's container registry fork version v2.7.6-gitlab. !1105 - -### Added (4 changes, 2 of them are from the community) - -- Add Selectors to SideKiq Deployments. !876 -- Added ability to configure sshd MaxStartups for gitlab-shell. !1058 (Dmitry Chepurovskiy) -- Adds Network Policy object for Sidekiq Deployments. !1102 (skarbek) -- Add the maxRequestDurationSeconds configuration and move unicorn workersTimeout to global. !1103 - -### Other (2 changes) - -- Use mail_room gem version from Gemfile.lock as appVersion in the chart. !1088 -- Update GitLab Version to 12.7.0. - - -## 2.6.9 - -### Other (1 change) - -- Update GitLab Version to 12.6.8. - - -## 2.6.8 - -### Fixed (1 change, 1 of them is from the community) - -- Use the volume with Postgres client SSL certificate in the gitlab-exporter deployment. !1162 (Franciszek Walkowiak) - -### Other (1 change) - -- Update GitLab Version to 12.6.7. - - -## 2.6.7 - -### Other (1 change) - -- Update GitLab Version to 12.6.6. - - -## 2.6.6 - -### Fixed (1 change) - -- Mount secrets.yml to dependencies initContainer. !1108 - -### Other (1 change) - -- Update GitLab Version to 12.6.4. - - -## 2.6.5 - -### Other (1 change) - -- Update GitLab Version to 12.6.4. - - -## 2.6.4 - -### Other (1 change) - -- Update GitLab Version to 12.6.3. - - -## 2.6.3 - -### Fixed (1 change) - -- Correctly set the proper gitaly release version. !1092 - -### Other (1 change) - -- Update GitLab Version to 12.6.2. - - -## 2.6.2 - -### Other (1 change) - -- Update GitLab Version to 12.6.2. - - -## 2.6.1 - -### Other (2 changes) - -- Update gitlab-org/charts/gitlab-runner from 0.11.0 to 0.12.0. !1085 -- Update GitLab Version to 12.6.1. - - -## 2.6.0 - -### Fixed (3 changes, 1 of them is from the community) - -- Geo: automate secondary migrations behaviors. !1055 -- Fix reference to piwik url and site ID in GitLab chart template. !1061 (Kevinjil) -- Corrected indentation issue with Gitaly volumeClaimTemplate selector. !1070 - -### Deprecated (1 change) - -- Deprecate init.image and init.tag settings in favor of init.image.repository and init.image.tag. !1062 - -### Changed (4 changes, 1 of them is from the community) - -- Upgrade nginx ingress controller to 0.21 to Enable TLSv1.3, and TLSv1.1 is disabled by default. !1014 (Xiangxuan Liu) -- Specify Kubernetes 1.12 as minimum required version and use v1.13 tools and libraries. !1053 -- Updated gitlab-exporter to 5.1.0. !1075 -- Update certmanager to 0.10.1. !1079 - -### Added (6 changes, 3 of them are from the community) - -- Added support of memory killer daemon mode. !1040 (Dmitry Chepurovskiy) -- Added http probes for sidekiq and unicorn. !1045 (Dmitry Chepurovskiy) -- Enable Bootsnap cache in Task runner. !1056 -- Add global setting to configure busybox image for initContainers. !1062 -- Adding capability to use pullsecrets in order to download minio mc image. !1066 (Mustafa Bhabhrawala) -- Enable Bootsnap cache in migrations. !1069 - -### Other (2 changes) - -- Document the use of external Minio for object storage. !1005 -- Update GitLab Version to 12.6.0. - - -## 2.5.11 - -### Other (1 change) - -- Update GitLab Version to 12.5.10. - - -## 2.5.10 - -### Other (1 change) - -- Update GitLab Version to 12.5.9. - - -## 2.5.9 - -### Fixed (1 change) - -- Mount secrets.yml to dependencies initContainer. !1108 - -### Other (1 change) - -- Update GitLab Version to 12.5.7. - - -## 2.5.8 - -### Other (1 change) - -- Update GitLab Version to 12.5.7. - - -## 2.5.7 - -### Other (1 change) - -- Update GitLab Version to 12.5.6. - - -## 2.5.6 - -### Added (1 change, 1 of them is from the community) - -- Redis-HA added storageClass Value. !1077 (conblem) - -### Other (1 change) - -- Update GitLab Version to 12.5.5. - - -## 2.5.5 - -### Other (1 change) - -- Update GitLab Version to 12.5.4. - - -## 2.5.4 - -### Fixed (1 change) - -- Fix bug that broke gitlab-exporter from connecting to external pg hosts. !1060 - -### Other (1 change) - -- Update GitLab Version to 12.5.3. - - -## 2.5.3 - -### Other (1 change) - -- Update GitLab Version to 12.5.2. - - -## 2.5.2 - -### Other (1 change) - -- Update GitLab Version to 12.5.1. - - -## 2.5.1 - -### Added (1 change) - -- Geo: support configuration and deployment of GitLab Geo #1212. !877 - -### Other (1 change) - -- Update GitLab Version to 12.5.0. - - -## 2.5.0 - -### Fixed (2 changes) - -- Fixed -k switch for eks_bootstrap_script and eksctl website reference. !1016 -- Fixed Redis Sentinel support for gitlab-workhorse. !1043 - -### Changed (5 changes) - -- Update shell logging inside gitaly to use gitaly config file. !1004 -- Add internal_socket_dir to gitaly config. !1017 -- Update grafana chart to 4.0.1. !1026 -- Mailroom: update probes to direct binary. !1036 -- Update prometheus chart to 9.0.0. !1039 - -### Added (7 changes, 1 of them is from the community) - -- Support running Gitaly over TLS. !969 -- Registry: Add support for setting relativeurls config. !1007 (thom8) -- Allow to specify an initial Enterprise license. !1008 -- Added creds subcommand to eks_bootstrap_script. !1020 -- Add shutdown blackout for unicorn. !1028 -- Sidekiq: add negateQueues functionality. !1029 -- Add LDAP preventSignin. !1031 - -### Other (2 changes) - -- Update gitlab-runner to 0.11.0/12.5.0. !1046 -- Update GitLab Version to 12.5.0. - - -## 2.4.13 - -### Other (1 change) - -- Update GitLab Version to 12.4.8. - - -## 2.4.12 - -### Other (1 change) - -- Update GitLab Version to 12.4.7. - - -## 2.4.10 - -### Other (1 change) - -- Update GitLab Version to 12.4.5. - - -## 2.4.9 - -### Other (1 change) - -- Update GitLab Version to 12.4.4. - - -## 2.4.8 - -### Other (1 change) - -- Update GitLab Version to 12.4.3. - - -## 2.4.7 - -### Fixed (1 change) - -- Support use of kube2iam for cache when minio is disabled. !1011 - -### Added (2 changes) - -- enable many pods for mailroom. !1019 -- Creates NetworkPolicy object for Mailroom. !1023 - -### Other (2 changes) - -- Adds the global gitlab annotations to mailroom. -- Update GitLab Version to 12.4.2. - - -## 2.4.6 - -### Fixed (1 change) - -- global.ingress.tls default to empty map. !1022 - -### Added (1 change) - -- Allow to configure the liveness probe for gitlab-shell. !1021 - -### Other (1 change) - -- Update GitLab Version to 12.4.2. - - -## 2.4.5 - -### Other (2 changes) - -- Update GitLab Runner to v12.4.1. !1018 -- Update GitLab Version to 12.4.1. - - -## 2.4.4 - -### Added (1 change) - -- Added Redis Sentinel support. !999 - -### Other (1 change) - -- Update GitLab Version to 12.4.1. - - -## 2.4.3 - -### Fixed (1 change) - -- Broken pluck expectation in gitlab.ingress.tls.configured #1653. !1013 - -### Other (1 change) - -- Update GitLab Version to 12.4.1. - - -## 2.4.2 - -### Fixed (1 change) - -- Fix artifacts upload by ensuring appropriate tmp directory permissions. !1010 - -### Other (1 change) - -- Update GitLab Version to 12.4.0. - - -## 2.4.1 - -### Fixed (2 changes) - -- Fix typo in nginx backend PDB. !1006 -- Unicorn add shared /tmp mount. !1009 - -### Other (1 change) - -- Update GitLab Version to 12.4.0. - - -## 2.4.0 - -### Fixed (5 changes, 1 of them is from the community) - -- Handle CRLF line endings #1541. !938 -- Use specified Gitaly port in listen_address. !970 -- Convert Gitaly port to an Integer before rendering in config files. !979 -- Removed unused persistence.volumeName from gitaly's values.yaml. !990 (aurelien.balteaux) -- Unicorn: set ipWhitelist default to documented value. !997 - -### Changed (3 changes) - -- Switch to using newer APIs for ones dropped in k8s 1.16. !975 -- Update the grafana chart to 3.8.15. !976 -- Update unicorn.rb to match upstream changes. !988 - -### Added (4 changes) - -- Added S/MIME support. !943 -- Allow to configure liveness and readiness probes for unicorn/workhorse. !985 -- Improve sidekiq readinessProbe to check for sidekiq process. !994 -- Add pre-upgrade hook for pausing Gitaly while operator is in place. !998 - -### Other (3 changes) - -- Add example values for UBI-based deployment. !986 -- Update gitlab-runner to 0.10.0/12.4.0. !1003 -- Update GitLab Version to 12.4.0. - - -## 2.3.12 - -### Fixed (2 changes) - -- Broken pluck expectation in gitlab.ingress.tls.configured #1653. !1013 -- global.ingress.tls default to empty map. !1022 - -### Other (1 change) - -- Update GitLab Version to 12.3.9. - - -## 2.3.11 - -### Other (1 change) - -- Update GitLab Version to 12.3.8. - - -## 2.3.10 - -### Other (1 change) - -- Update GitLab Version to 12.3.7. - - -## 2.3.9 - -### Fixed (1 change) - -- Fix typo in nginx backend PDB. !1006 - -### Other (1 change) - -- Update GitLab Version to 12.3.6. - - -## 2.3.8 - -### Fixed (1 change) - -- 1499/Fix monitoring ip_whitelist : change kind comparison to slice. !993 - -### Changed (1 change) - -- Provides ability to customize the Container Registry HPA. !991 - -### Added (1 change, 1 of them is from the community) - -- Tolerations for gitlab-exporter. !996 (Taylor Daugherty) - -### Other (1 change) - -- Update GitLab Version to 12.3.5. - - -## 2.3.7 - -### Other (1 change) - -- Update GitLab Version to 12.3.5. - - -## 2.3.6 - -### Other (2 changes) - -- Update gitlab-runner to v0.9.1. !987 -- Update GitLab Version to 12.3.4. - - -## 2.3.5 - -### Fixed (1 change, 1 of them is from the community) - -- Fix volumeMounts indentation in task-runner backup-job. !983 (Chris Boot) - -### Other (1 change) - -- Update GitLab Version to 12.3.4. - - -## 2.3.3 - -### Other (1 change) - -- Update GitLab Version to 12.3.2. - - -## 2.3.2 - -### Other (1 change) - -- Update GitLab Version to 12.3.1. - - -## 2.3.1 - -### Fixed (1 change) - -- Pin gitlab-exporter version to the proper image. - -### Other (1 change) - -- Update GitLab Version to 12.3.0. - - -## 2.3.0 - -### Fixed (4 changes, 2 of them are from the community) - -- Set the default retention for Prometheus data to 15d. !905 (Gerard Hickey) -- Removes duplicate http key from registry config. !923 (jarv) -- Configure the backup cron to use a different tmp volume than the task-runner. !942 -- Disable object storage for disabled features. !962 - -### Changed (4 changes, 1 of them is from the community) - -- Update operator to v0.7, introduces status subresource, and gitaly waiting fixes. !906 -- Update the sidekiq queues example with all of the queues #1429. !909 (Mike Rennie) -- Set a sane default of 2 seconds for Unicorn 'readinessProbe.timeoutSeconds'. !950 -- Set a sane default of 2 seconds for Workhorse 'readinessProbe.timeoutSeconds'. !964 - -### Added (6 changes, 4 of them are from the community) - -- Added Grafana support into chart install. !789 (Gerard Hickey) -- Allow postgres to use a serviceName as well as a host #1458. !886 (Mike Rennie) -- Allow the monitoring IP whitelist to be specified for unicorn #1499. !887 (Mike Rennie) -- Add missing gitaly config options. !939 -- Added scheduling options for redis Subchart. !949 (Willi Eggeling) -- Option to bypass two-factor auth for certain omniauth providers. !961 - -### Other (3 changes) - -- Rename gitlab-monitor to gitlab-exporter. !897 -- Update gitlab-runner to 0.9.0/12.3.0. !965 -- Update GitLab Version to 12.3.0. - - -## 2.2.12 - -### Fixed (1 change) - -- Fix typo in nginx backend PDB. !1006 - -### Other (1 change) - -- Update GitLab Version to 12.2.9. - - -## 2.2.11 - -### Other (1 change) - -- Update GitLab Version to 12.2.8. - - -## 2.2.10 - -### Other (1 change) - -- Update GitLab Version to 12.2.7. - - -## 2.2.9 - -### Other (1 change) - -- Update GitLab Version to 12.2.7. - -### Fixed (1 change, 1 of them is from the community) - -- Fix volumeMounts indentation in task-runner backup-job. !983 (Chris Boot) - -### Other (1 change) - -- Update GitLab Version to 12.2.8. - - -## 2.2.8 - -### Other (1 change) - -- Update GitLab Version to 12.2.7. - - -## 2.2.7 - -### Fixed (1 change) - -- Disable object storage for disabled features. !962 - -### Other (1 change) - -- Update GitLab Version to 12.2.6. - - -## 2.2.6 - -### Other (1 change) - -- Update GitLab Version to 12.2.5. - - -## 2.2.5 - -### Fixed (1 change) - -- Set/expose securityContext for upgrade check hook. !915 - -### Added (2 changes, 1 of them is from the community) - -- Adds readiness and liveness configuration for Registry. !932 -- Allows draintimeout to be configured for registry. !934 (jarv) - -### Other (2 changes) - -- Update gitlab-runner to 0.8.0/12.2.0. !912 -- Update GitLab Version to 12.2.4. - - -## 2.2.4 - -### Added (2 changes, 2 of them are from the community) - -- Adds deployment annotations for the registry service. !893 (jarv) -- Add support for the storagedriver health check. !922 (jarv) - -### Other (1 change) - -- Update GitLab Version to 12.2.4. - - -## 2.2.3 - -### Other (1 change) - -- Update GitLab Version to 12.2.4. - - -## 2.2.2 - -### Other (1 change) - -- Update GitLab Version to 12.2.3. - - -## 2.2.1 - -### Other (1 change) - -- Update GitLab Version to 12.2.1. - - -## 2.2.0 - -### Fixed (4 changes, 1 of them is from the community) - -- Workaround for pausing deployments during Helm upgrade. !783 -- separate sidekiq hpa resource with dashes. !880 -- Chart pull policies syntax restored to previous and documented names. !904 -- Fix issue with GCS cron backup getting stuck. (894) - -### Changed (2 changes) - -- Use global values for kubectl image, deprecate chart-local settings. !864 -- Registry: add loadBalancerIP configuration, template clusterIP. !874 - -### Added (5 changes, 3 of them are from the community) - -- Provide option to disable using prepared statements for postgres #1444. !872 (Mike Renie) -- Enable registry to accept windows images with foreign layers. !888 (Semjon Bibow) -- Add loadBalancerIP and loadBalancerSourceRanges to gitlab-shell chart. !889 (Taylor Daugherty) -- Registry: Adds optional networkpolicy configuration. !891 -- Adds the ability to finely configure logging options for the Container Registry. !899 - -### Other (3 changes) - -- Update operator to v0.6 for newer k8s support. !895 -- Document global.ingress.class & sample Traefik. !898 -- Update GitLab Version to 12.2.0. - - -## 2.1.14 - -### Other (1 change) - -- Update GitLab Version to 12.1.14. - - -## 2.1.13 - -### Fixed (1 change, 1 of them is from the community) - -- Fix volumeMounts indentation in task-runner backup-job. !983 (Chris Boot) - -### Other (1 change) - -- Update GitLab Version to 12.1.14. - - -## 2.1.12 - -### Other (1 change) - -- Update GitLab Version to 12.1.13. - - -## 2.1.11 - -### Other (1 change) - -- Update GitLab Version to 12.1.12. - - -## 2.1.10 - -### Other (1 change) - -- Update GitLab Version to 12.1.11. - - -## 2.1.8 - -### Fixed (1 change) - -- Chart pull policies syntax restored to previous and documented names. !904 - -### Other (1 change) - -- Update GitLab Version to 12.1.8. - - -## 2.1.7 - -### Other (1 change) - -- Update GitLab Version to 12.1.6. - - -## 2.1.6 - -### Fixed (1 change, 1 of them is from the community) - -- Disable client-side validation of kubectl apply to fix #1497. !885 (Semjon Bibow) - -### Other (1 change) - -- Update GitLab Version to 12.1.4. - - -## 2.1.5 - -### Fixed (1 change) - -- Generated Random Secrets Should Not Wrap. !875 - -### Other (1 change) - -- Update GitLab Version to 12.1.4. - - -## 2.1.4 - -### Other (1 change) - -- Update GitLab Version to 12.1.4. - - -## 2.1.3 - -### Other (1 change) - -- Update GitLab Version to 12.1.3. - - -## 2.1.2 - -### Other (1 change) - -- Update GitLab Version to 12.1.2. - - -## 2.1.1 - -### Other (1 change) - -- Update GitLab Version to 12.1.1. - - -## 2.1.0 - -### Fixed (8 changes, 2 of them are from the community) - -- Mailroom: fix redis without passsword. !816 (arthur13) -- Add ability to specify extrernal objectStorage for task-runner backup. !821 (Matthew Cascio) -- Fix ability to set internal port of gitlab-workhorse. !840 -- Use sort to compare versions in upgrade logic. !846 -- Freeze the version of redis exporter image. !850 -- Fixed shared secrets whitespace templating #1410. !861 -- Escape and quote all passwords in ERB templates. !869 -- Set pullPolicy for CI to Always #1460. !873 - -### Changed (2 changes) - -- Add prometheus metrics debug configuration. !838 -- Make version changes to chart files only if incoming version is higher. !859 - -### Added (5 changes, 3 of them are from the community) - -- Make the Task Runner backup backend configurable. !707 (Vic Iglesias) -- Support Git over SSH on OpenShift. !824 -- Registry: Add service port for Prometheus metrics. !842 -- Support for optional extra arguments for the cron based backup on Kubernetes. !854 (Gerard Boor) -- Document global.appConfig.defaultProjectsFeatures.containerRegistry #1456. !871 (Mike Rennie) - -### Other (4 changes) - -- CI: add CI vars to helm properties. !851 -- Run before_fork only once on boot for Unicorn. !852 -- Update gitlab-runner to 0.7.0/12.1.0. !878 -- Update GitLab Version to 12.1.0. - - -## 2.0.7 - -### Other (1 change) - -- Update GitLab Version to 12.0.9. - - -## 2.0.6 - -### Other (1 change) - -- Update GitLab Version to 12.0.8. - - -## 2.0.5 - -### Other (1 change) - -- Update GitLab Version to 12.0.6. - - -## 2.0.4 - -### Fixed (4 changes) - -- Use sort to compare versions in upgrade logic. !846 -- Freeze the version of redis exporter image. !850 -- Fixed shared secrets whitespace templating #1410. !861 -- Escape and quote all passwords in ERB templates. !869 - -### Other (1 change) - -- Update GitLab Version to 12.0.4. - - -## 2.0.3 (2019-07-03) - -### Other (1 change) - -- Update GitLab Version to 12.0.3. - - -## 2.0.2 (2019-06-26) - -### Changed (1 change) - -- Updated the gitlab-monitor tags to properly match its upstream release. - -### Other (2 changes) - -- Update gitlab-runner to 0.6.0/12.0.0. !832 -- Update GitLab Version to 12.0.2. - - -## 2.0.1 (2019-06-25) - -### Other (1 change) - -- Update GitLab Version to 12.0.1. - - -## 2.0.0 (2019-06-22) - -### Fixed (6 changes) - -- Ensure unicorn.rb issues appropriate lifecycle hooks. !791 -- Add missing object storage settings in task-runner. !793 -- Disable storage redirect of Registry when the internal Minio is used. !797 -- Port over https://github.com/helm/charts/pull/13646. !804 -- Add SMTP and other missing settings for task-runner. !809 -- Fix example smtp settings. !810 - -### Changed (2 changes) - -- Prioritize the external object storage connection settings before the global minio configuration. !802 -- Updated supported Kubernetes to 1.10 and Helm to 2.12. !808 - -### Added (6 changes, 2 of them are from the community) - -- Cron based backup support using Kubernetes and task runner. !548 (Thomas Miller) -- Add support for tolerations. !553 (Mike Rennie) -- Add gitlab-monitor to Helm Chart. !787 -- Add ability to specify network to use when creating a GKE cluster. !799 -- Modified anyuid to reflect project level instead of cluster. !803 -- Prevent upgrades from old chart versions. !828 - -### Other (2 changes, 1 of them is from the community) - -- Default Registry replicas to minReplicas. !794 (skarbek) -- Update GitLab Version to 12.0.0. - - -## 1.9.8 - -### Other (1 change) - -- Update GitLab Version to 11.11.8. - - -## 1.9.7 - -### Fixed (2 changes) - -- Freeze the version of redis exporter image. !850 -- Fixed shared secrets whitespace templating #1410. !861 - -### Other (1 change) - -- Update GitLab Version to 11.11.7. - - -## 1.9.5 (2019-06-26) - -### Other (1 change) - -- Update GitLab Version to 11.11.4. - - -## 1.9.4 (2019-06-21) - -### Added (1 change) - -- Add chart-info configmap to allow an upgrade path to the GitLab 12.0. !829 - -### Other (1 change) - -- Update GitLab Version to 11.11.3. - - -## 1.9.3 (2019-06-10) - -### Other (1 change) - -- Update GitLab Version to 11.11.3. - - -## 1.9.2 (2019-06-05) - -### Other (2 changes) - -- Update gitlab-runner to 0.5.2/11.11.2. !806 -- Update GitLab Version to 11.11.2. - - -## 1.9.1 (2019-06-03) - -### Other (2 changes) - -- Update GitLab Runner Helm Chart to 0.5.1. !801 -- Update GitLab Version to 11.11.1. - - -## 1.9.0 (2019-05-22) - -### Changed (4 changes) - -- Transition Operator from Cluster to Namespace Role. !764 -- Replace subgroup with GitLab class annotation. !772 -- Rename subgroup to CRD prefix. !773 -- Add default Referrer-Policy to nginx-ingress headers. !774 - -### Performance (1 change) - -- Unicorn: increase worker memory defaults. - -### Added (3 changes, 1 of them is from the community) - -- Add checkConfig logic to detect known bad configurations. !757 -- Persistent storage for task-runner tmp directory. !769 (jansmets) -- Enable Sidekiq Memory Killer Configuration. !776 - -### Other (2 changes) - -- Update gitlab-runner to 0.5.0/11.11.0. !798 -- Update GitLab Version to 11.11.0. - - -## 1.8.6 (2019-07-03) - -### Other (1 change) - -- Update GitLab Version to 11.10.8. - - -## 1.8.5 (2019-06-26) - -### Performance (1 change) - -- Unicorn: increase worker memory defaults. - -### Added (1 change, 1 of them is from the community) - -- Persistent storage for task-runner tmp directory. !769 (jansmets) - -### Other (1 change) - -- Update GitLab Version to 11.10.7. - - -## 1.8.4 (2019-05-01) - -### Other (1 change) - -- Update GitLab Version to 11.10.4. - - -## 1.8.3 (2019-04-30) - -### Other (1 change) - -- Update GitLab Version to 11.10.3. - - -## 1.8.2 (2019-04-29) - -### Other (1 change) - -- Update GitLab Version to 11.10.2. - - -## 1.8.1 (2019-04-24) - -### Other (2 changes) - -- Update gitlab-runner to 0.4.1/11.10.1. !768 -- Update GitLab Version to 11.10.1. - - -## 1.8.0 (2019-04-22) - -### Fixed (2 changes) - -- Quote read passwords in yml files. !717 -- Ensure README present in helm package. !752 - -### Changed (2 changes) - -- Update operator to use recreate deployment strategy. !728 -- Bump gitlab-operator to v0.4. !744 - -### Added (3 changes, 1 of them is from the community) - -- Expose unicorn memory limits via chart values. !738 (Paul Nicholson) -- Add support for when setting for external diffs. !743 -- ElasticSearch is now available. !746 - -### Other (2 changes) - -- Update gitlab-runner to 0.4.0/11.10.0. !765 -- Update GitLab Version to 11.10.0. - - -## 1.7.5 (2019-04-11) - -### Other (1 change) - -- Update GitLab Version to 11.9.8. - - -## 1.7.4 (2019-04-10) - -### Fixed (1 change) - -- Ensure README present in helm package. !752 - -### Other (1 change) - -- Update GitLab Version to 11.9.7. - - -## 1.7.3 (2019-04-05) - -### Fixed (2 changes) - -- Mount object storage secrets related to external diffs to pods. !745 -- Fix support for NGINX Ingress DaemonSets. !748 - -### Other (1 change) - -- Update GitLab Version to 11.9.6. - - -## 1.7.2 (2019-04-02) - -### Fixed (1 change) - -- Application: use groups in componentKinds. !740 - -### Other (1 change) - -- Update GitLab Version to 11.9.4. - - -## 1.7.1 (2019-03-25) - -### Other (2 changes) - -- Update gitlab-runner to 0.3.0/11.9.0. !735 -- Update GitLab Version to 11.9.1. - - -## 1.7.0 (2019-03-22) - -### Fixed (5 changes, 3 of them are from the community) - -- Set the Redis client ID to nil as some servers have that command disabled. !666 (Vic Iglesias) -- Set the life span of Registry certificate to 10 years. !701 -- Add Gitaly configuration to migrations job. !710 -- Add missing certificates initContainer to gitaly. !716 (Harry Lee (tclh123)) -- Provide Kubernetes 1.8 backwards compatibility for init-container secret copying. !720 (Fabian Jucker) - -### Changed (3 changes, 1 of them is from the community) - -- Extract shared configuration script of ruby-based pods into own template. !685 (Matthias van de Meent (Cofano Software Solutions)) -- Move cron_jobs setting from sidekiq to global context. !693 -- Allow disabling of the unicorn helm test. !721 - -### Added (5 changes, 1 of them is from the community) - -- Allow use of password-less Redis services (external). !665 (Vic Iglesias) -- Add support for using object storage for storing MR diffs. !698 -- Allow Disabling of ClusterRoles in ApplicationCRD. !702 -- Add eks_bootstrap_script. !706 -- Registry: Add caompatibility for Docker manifest schema1. !724 - -### Other (2 changes) - -- Automate version mapping updates. !704 -- Update GitLab Version to 11.9.0. - - -## 1.6.3 (2019-03-20) - -### Changed (1 change) - -- Allow disabling of the unicorn helm test. !721 - -### Other (1 change) - -- Update GitLab Version to 11.8.3. - - -## 1.6.2 (2019-03-13) - -### Fixed (1 change) - -- Add Gitaly configuration to migrations job. !710 - -### Other (1 change) - -- Update GitLab Version to 11.8.2. - - -## 1.6.1 (2019-03-04) - -### Fixed (1 change) - -- Remove duplicate gravatar entries from 'gitlab.yml.erb'. !700 - -### Other (2 changes) - -- Update gitlab-runner to 0.2.0/11.8.0. !697 -- Update GitLab Version to 11.8.1. - - -## 1.6.0 (2019-02-22) - -### Fixed (1 change) - -- Ensure Piwik and Google Analytics are disabled by default. - -### Changed (4 changes) - -- Switched gitlab-shell HPA to use a target cpu value, rather than a percentage. !655 -- Update the gitlab-shell resource requests to be a bit lower, reflecting latest testing. !656 -- Upgrade registry to version 2.7.1. !681 -- Use gitlab-operator version 0.3. !692 - -### Added (2 changes, 2 of them are from the community) - -- Adds configuration options for connecting Gitlab with database using mutual TLS. !626 (Lukas Grundmann) -- Add tls option to smtp settings. !648 (Igor Storozhuk) - -### Other (3 changes) - -- Restructure the documentation. !588 -- Allow static ServiceAccount Name in shared-secrets. !688 -- Update GitLab Version to 11.8.0. - - -## 1.5.3 (2019-02-05) - -### Other (1 change) - -- Update GitLab Version to 11.7.5. - - -## 1.5.2 (2019-02-05) - -### Other (1 change) - -- Update GitLab Version to 11.7.4. - - -## 1.5.1 (2019-01-31) - -### Other (2 changes) - -- Update gitlab-runner to 0.1.45/11.7.0. !654 -- Update GitLab Version to 11.7.3. - - -## 1.5.0 (2019-01-22) - -### Fixed (5 changes, 1 of them is from the community) - -- Generate omniauth attribute values correctly as expected by GitLab. !610 -- Ensure the operator deployment uses the immutable labels properly. !613 -- Ensure a newline before appending to registry/storage/config to make sure yaml is rendered correctly. !621 -- Fix 500 error when you don't set the parameter auto_sign_in_with_provider with OmniAuth enabled. !623 (David Kulak) -- Rails: set CA certificate path for SMTP. !625 - -### Changed (1 change) - -- Update gitlab-operator version to 0.2. !645 - -### Performance (1 change) - -- Add retry options for migration jobspec. !642 - -### Added (3 changes, 3 of them are from the community) - -- Allow configuration of securityContext user/group on all deployments with persistent volumes. !519 (Mike Rennie) -- add the node selector for registry chart. !602 (Jubel Han) -- Provide a way to reference a secret containing the LDAP password. !634 (Matthias van de Meent (Cofano Software Solutions)) - -### Other (2 changes) - -- Move ingress enabled detection to helper method. !607 -- Update GitLab Version to 11.7.0. - - -## 1.4.4 (2019-01-17) - -### Other (1 change) - -- Update GitLab Version to 11.6.5. - - -## 1.4.3 (2019-01-16) - -### Other (2 changes) - -- Update gitlab/gitlab-runner to v0.1.44. !633 -- Update GitLab Version to 11.6.4. - - -## 1.4.2 (2019-01-05) - -### Other (1 change) - -- Update GitLab Version to 11.6.3. - - -## 1.4.1 (2019-01-02) - -### Other (1 change) - -- Update GitLab Version to 11.6.2. - - -## 1.4.0 (2018-12-22) - -### Fixed (1 change, 1 of them is from the community) - -- Move LFS and Upload temporary storage to ephemeral disk. !587 (Robert Jordan) - -### Changed (2 changes, 1 of them is from the community) - -- CI now does not run any tasks which the repository is not configured for. !569 (Matthias van de Meent (Cofano Software Solutions)) -- Refine unicorn resource resqeusts. !586 - -### Added (8 changes, 3 of them are from the community) - -- Added option for annotations for use with IAM roles. !504 (Deniz Zoeteman) -- Provide a way to skip certain steps in the backup-procedure. !574 (Matthias van de Meent (Cofano Software Solutions)) -- Add global and chart-local ingress.tls.enabled flags. !577 (Matthias van de Meent (Cofano Software Solutions)) -- Add the operator version label to the gitlab custom resource. !582 -- Added example values file for a minimal gke cluster. !589 -- Add examples for GCS object storage. !592 -- Add support for impersonation_enabled flag in gitlab.yml. !593 -- Allow support for using rediss urls. !600 - -### Other (3 changes) - -- Add extraInitContainers, extraContainers, extraVolumes and extraVolumeMounts to template options. !580 -- Operator Version 0.1. !605 -- Update GitLab Version to 11.6.0. - - -## 1.3.4 (2018-12-14) - -### Other (3 changes) - -- Update GitLab Runner chart 0.1.38. !590 -- Fix Broken Icon Image on Helm Hub. !597 -- Update GitLab Version to 11.5.4. - - -## 1.3.3 (2018-12-06) - -### Other (1 change) - -- Update GitLab Version to 11.5.3. - - -## 1.3.2 (2018-12-04) - -### Added (1 change, 1 of them is from the community) - -- Add packages to the backups task list. !585 (Matthias van de Meent (Cofano Software Solutions)) - -### Other (1 change) - -- Update GitLab Version to 11.5.2. - - -## 1.3.1 (2018-11-28) - -### Other (1 change) - -- Update GitLab Version to 11.5.1. - - -## 1.3.0 (2018-11-22) - -### Fixed (2 changes, 1 of them is from the community) - -- Serve sidekiq assets directly from unicorn. !560 -- Define .metadata.namespace for resources which should have had that defined. !573 (Matthias van de Meent (Cofano Software Solutions)) - -### Changed (2 changes) - -- Make LDAP and Omniauth configuration global to rails based containers. !567 -- Pin the operator image to a specific sha digest. !571 - -### Added (5 changes, 1 of them is from the community) - -- Add additional cleanup policy to Helm prehooks. !550 -- Add GitLab Rails, workhorse and runner secret to documentation. !552 (Maikel Vlasman) -- Add support for Maven repositories. !558 -- Add support for Pseudonymizer. !562 -- Registry: default storage `delete` enabled. !579 - -### Other (4 changes) - -- Add docs about using charts on OpenShift Origin. !555 -- Mount configuration files directly to /srv/gitlab/config instead of /var/opt/gitlab/config/gitlab. !565 -- Update nginx-ingress fork to 0.30.0. !578 -- Update GitLab Version to 11.5.0. - - -## 1.2.6 (2018-11-20) - -### Other (1 change) - -- Update GitLab Version to 11.4.7. - - -## 1.2.5 (2018-11-20) - -### Other (2 changes) - -- Mount configuration files directly to /srv/gitlab/config instead of /var/opt/gitlab/config/gitlab. !565 -- Update GitLab Version to 11.4.6. - - -## 1.2.4 (2018-11-05) - -### Other (1 change) - -- Update GitLab Version to 11.4.5. - - -## 1.2.3 (2018-11-01) - -### Other (1 change) - -- Update GitLab Version to 11.4.4. - - -## 1.2.2 (2018-10-29) - -### Other (1 change) - -- Update GitLab Version to 11.4.3. - - -## 1.2.1 (2018-10-29) - -### Fixed (1 change) - -- Skip custom CA mounts when unnecessary. !544 - -### Other (1 change) - -- Update GitLab Version to 11.4.2. - - -## 1.2.0 (2018-10-22) - -### Security (1 change) - -- Update redis version to 3.2.12. !511 - -### Fixed (4 changes, 1 of them is from the community) - -- Better handle self-signed certificate behaviors in NOTES.txt. !500 -- NGINX: populate ingressClass from template. !520 -- Move shared-secrets jobs run as non-root. !533 -- Make gke bootstrap script work on MacOS. (Robert Marshall) - -### Changed (1 change) - -- Add safe-to-evict annotation to stateless deployments. !523 - -### Added (7 changes, 3 of them are from the community) - -- Add missing settings to configure gitlab.yml. !496 (Erik Sundell) -- Add a global flag to set the gitlab edition that will be installed. !499 (Scott Leggett) -- Allow disabled shared-secrets chart. !510 -- Add Gitlab operator to run upgrades of Gitlab. !516 -- Move jobs management into the operator if it is enabled. !517 -- Provide a way to disable the usage ping options. !525 (Mike Rennie) -- Add control of exposed SSH port. !531 - -### Other (3 changes, 1 of them is from the community) - -- Update Helm minimum requirement to 2.9. !505 -- Use example.com in documentation and examples as per RFC2606. !512 (Scott Leggett) -- Update GitLab Version to 11.4.0. - - -## 1.1.6 (2018-10-17) - -### Other (1 change) - -- Update GitLab Version to 11.3.6. - - -## 1.1.5 (2018-10-15) - -### Fixed (1 change) - -- Sidekiq: add credentials for Registry, #785. !535 - -### Added (1 change, 1 of them is from the community) - -- Add registry.enabled param in unicorn chart. !508 (Flavien Peyre) - -### Other (1 change) - -- Update GitLab Version to 11.3.5. - - -## 1.1.4 (2018-10-05) - -### Other (1 change) - -- Update GitLab Version to 11.3.4. - - -## 1.1.3 (2018-10-04) - -### Other (1 change) - -- Update GitLab Version to 11.3.3. - - -## 1.1.2 (2018-10-03) - -### Other (1 change) - -- Update GitLab Version to 11.3.2. - - -## 1.1.1 (2018-10-01) - -### Other (1 change) - -- Update GitLab Version to 11.3.1. - - -## 1.1.0 (2018-09-22) - -### Fixed (1 change) - -- Fix indentation error in self-signed-certs Job of shared-secrts. - -### Changed (1 change) - -- Registry: move http.secret to k8s secret (auto-generated). !485 - -### Added (3 changes, 2 of them are from the community) - -- Allow to define under which user and group gitaly is running. !473 (Michael Schmid ) -- Ensure job resources can be configured. !482 -- Adds option to specify separate hostname for ssh access. !487 (Gijs Kunze) - -### Other (2 changes, 1 of them is from the community) - -- Added namespace to resources. !443 (Matthias van de Meent (Cofano Software Solutions)) -- Update GitLab Version to 11.3.0. - - -## 1.0.2 (2018-08-28) - -### Fixed (1 change) - -- Fixed setting the connection to a non-default redis port. !470 - - -## 1.0.1 (2018-08-22) - -- No changes. - -## 1.0.0 (2018-08-22) - -### Fixed (4 changes, 1 of them is from the community) - -- Minio/Redis: add spec.strategy.type=Recreate (#633). !423 -- Add missing reference to uploads bucket in task-runner chart. !429 (Matt Welch) -- runner: fix gitlab-runner.cache.secret template. -- Fix changelog danger handling. - -### Changed (13 changes) - -- Move all Minio enabled to global configuration. !389 -- Convert registry storage block to secret. !391 -- Convert rails connection blocks to secrets. !393 -- Add additional instructions to application.yaml, switch to v1beta1 of the CRD, and trigger purely off the create flag. !401 -- Relocate lfs/artifacts/uploads configuration to global `appConfig`. !403 -- Update memory requests based on observations. !418 -- Update certmanager to v0.4.0 (#617). !424 -- Allow external object storage for task-runner. !427 -- Add securtyContext to nginx-ingress-controller deployment to run as non-root user and upgrade image version to 0.15.0. !431 -- Replace self-signed certificate generation, automatically CA add to custom CAs. !441 -- Default sidekiq chart queues to upstream source defaults. !449 -- Rails pods, except migrations, will wait for their desired schema version before starting. !462 -- Bump the gitalb-runner chart version to 0.1.33. !468 - -### Performance (1 change) - -- Use targetValue instead of targetUtilization fo hpa autoscaling. !433 - -### Added (7 changes, 3 of them are from the community) - -- support multiple gitaly instances. !377 -- Set preStop hooks to sidekiq and unicorn charts for graceful shutdown. !382 (Balasankar C) -- Add option to configure missing settings from gitlab.yml. !395 (Balasankar C) -- Move gitlab-workhorse to a separate container. !397 (Ian Baum) -- Implment support for incoming emails by adding a mailroom chart. !425 -- Enable NGINX Ingress metrics by default. !434 -- Add capability to inject custom root CAs. !436 - -### Other (8 changes) - -- Better document the initial storage configuration options. !412 -- Restructure examples and link docs. !445 -- Add retreival of self-signed CA to NOTES.txt output when in use. !457 -- Add example values for Minikube. !459 -- Document deprecations behavior and deceision. -- Update external object storage documentation. -- add anti-affinity to nginx. -- Remove Dockerfile since it's been moved to gitlab-org/gitlab-build-images. - - -## 0.3.5 (2018-07-31) - -### Fixed (1 change) - -- Pin the minio/mc image version to a know working tag. !426 - - -## 0.3.4 (2018-07-31) - -- No changes. - -## 0.3.3 (2018-07-27) - -- No changes. - -## 0.3.2 (2018-07-26) - -- No changes. - -## 0.3.1 (2018-07-23) - -- No changes. - -## 0.3.0 - -### Security (4 changes, 4 of them are from the community) - -- Use minimum permissions for certmanager-issuer chart. !352 (Corey O'Brien) -- Limit nginx to chart namespace. !354 (Corey O'Brien) -- Limit rbac permission for shared-secrets. !356 (Corey O'Brien) -- Use self-signed certificate as last resort. !360 (Corey O'Brien) - -### Fixed (1 change) - -- Expanded OmniAuth configuration in Unicorn. !328 - -### Changed (3 changes, 1 of them is from the community) - -- Change location of gitlab source code to /srv/gitlab. !15 (Balasankar C) -- Remove chart version from redis-ha immutable fields. !337 -- Explicitly set resources.requests.cpu=50m on initContainers to enforce reduced resources. !369 - -### Added (1 change, 1 of them is from the community) - -- Support optional Application CRD. !363 (Corey O'Brien) - -## 0.2.0 - -### Fixed (1 change, 1 of them is from the community) - -- Add consistent metadata for all charts. !319 (Corey O'Brien) - -### Changed (2 changes, 1 of them is from the community) - -- Change the initial root password to be contained in a secret, and autogenerated. !296 -- Replace hardcoded image references with values. !324 (Dave Konopka) - -### Other (1 change, 1 of them is from the community) - -- Bump redis version to 3.2.6. !325 (Corey O'Brien) - -## 2018-06-12 - -### Removed (1 change) - -- Removed version number from statefulset metadata. !318 - -### Fixed (1 change) - -- Resolve No longer possible to disable nginx ingress. !311 - -### Changed (1 change, 1 of them is from the community) - -- Use .Release.Name in the name of all Secrets. !302 (Corey O'Brien) - -### Added (3 changes) - -- Unicorn: add support for object storage of job artifacts. !255 -- Add global setting for imagePullPolicy. !305 -- Sidekiq: add object storage configuration. !314 - -## 2018-06-05 - -### Changed (1 change) - -- GitLab image tags can be set using a global, and default to the chart appVersion. !304 - -### Added (1 change, 1 of them is from the community) - -- Increase minimum repliacs to 2+ via HPAs where relevant. !285 (Corey O'Brien) - -### Other (2 changes, 1 of them is from the community) - -- Remove placeholder charts. !301 (Corey O'Brien) -- Use upstream gitlab-runner. - -## 2018-05-29 - -### Fixed (1 change, 1 of them is from the community) - -- Fix selectors for minio PDB to exclude Job Pods. !292 (Corey O'Brien) - -### Added (3 changes, 2 of them are from the community) - -- Implement global configuration for Gitaly. !287 -- Add options to set annotations on Services. !298 (Corey O'Brien) -- Added soft host anti-affinity by default. (Corey O'Brien) - -## 2018-05-22 - -### Added (3 changes, 3 of them are from the community) - -- Add a script for running helm without tiller running in the cluster. !281 (Corey O'Brien) -- Add configuration for auxiliary cron jobs. !283 (Dave Konopka) -- Add basic PodDisruptionBudgets. !284 (Corey O'Brien) - -## 2018-05-15 - -### Changed (2 changes) - -- Replace omnibus postgresql instance with postegresql chart based on upstream. !216 -- Switch Gitaly Deployment to a StatefulSet. !271 - -### Added (5 changes, 1 of them is from the community) - -- Add prometheus exporter to postgres. !239 -- Added configuration options for workhorse. !269 (Corey O'Brien) -- Add ability to configure Redis via Globals. !273 -- Add prometheus exporter to gitaly. !274 -- Add configuration for ldap authentication. - -## 2018-05-08 - -### Security (1 change) - -- Update NGINX Ingress to 0.14.0. !249 - -### Added (1 change) - -- Add configuration options for time_zone, rack_attack, trusted_proxies, and extras. !260 - -## 2018-05-01 - -### Added (2 changes, 1 of them is from the community) - -- Add configuration options for outgoing email persona. !238 (Corey O'Brien) -- Add object storage support for Uploads. !250 - -## 2018-04-17 - -### Fixed (1 change) - -- Add updated sidekiq queues for GitLab 10.7. !212 - -### Added (3 changes, 1 of them is from the community) - -- Implement global to configure extnernal static IP to simplify. !206 -- Unicorn: add support for configuring Omniauth. !210 -- Add Prometheus metrics exporters to Redis and Redis-HA charts. !215 (Dave Konopka) - -### Other (2 changes, 1 of them is from the community) - -- Bring CHANGELOG logic from gitlab-ce to helm.gitlab.io. !200 (Jason Plum) -- Changelog: introduce changelog_manager, with CI. !208 - -## 2018-03-22 Alpha - -- See [alpha documentation](https://docs.gitlab.com/charts/releases/alpha.html) diff --git a/charts/gitlab/gitlab/CONTRIBUTING.md b/charts/gitlab/gitlab/CONTRIBUTING.md deleted file mode 100644 index e49ac154a..000000000 --- a/charts/gitlab/gitlab/CONTRIBUTING.md +++ /dev/null @@ -1,178 +0,0 @@ -## Contributing - -Thank you for your interest in contributing to this GitLab project! We welcome -all contributions. By participating in this project, you agree to abide by the -[code of conduct](#code-of-conduct). - -## Developer Certificate of Origin + License - -By contributing to GitLab B.V., You accept and agree to the following terms and -conditions for Your present and future Contributions submitted to GitLab B.V. -Except for the license granted herein to GitLab B.V. and recipients of software -distributed by GitLab B.V., You reserve all right, title, and interest in and to -Your Contributions. All Contributions are subject to the following DCO + License -terms. - -[DCO + License](https://gitlab.com/gitlab-org/dco/blob/master/README.md) - -_This notice should stay as the first item in the CONTRIBUTING.md file._ - -## Merge requests - -We welcome merge requests with fixes and improvements to GitLab code, tests, -and/or documentation. The issues that are specifically suitable for -community contributions are listed with the label -[`Accepting Merge Requests` on our issue tracker][accepting-mrs], but you are -free to contribute to any other issue you want. - -Please note that if an issue is marked for the current milestone either before -or while you are working on it, a team member may take over the merge request -in order to ensure the work is finished before the release date. - -If you want to add a new feature that is not labeled it is best to first create -a feedback issue (if there isn't one already) and leave a comment asking for it -to be marked as `Accepting Merge Requests`. - -Merge requests should be opened at [GitLab.com][gitlab-mr-tracker]. - -### Merge request guidelines - -If you can, please submit a merge request with the fix or improvements -including tests. If you don't know how to fix the issue but can write a test -that exposes the issue we will accept that as well. In general bug fixes that -include a regression test are merged quickly while new features without proper -tests are least likely to receive timely feedback. The workflow to make a merge -request is as follows: - -1. Fork the project into your personal space on GitLab.com -1. Create a feature branch, branch away from `master` -1. Write code and charts changes. -1. If deemed necessary, provide MR to the [Cloud Native GitLab containers][CNG]. - - Provide the related Issue and MR link from that repository. -1. [Generate a changelog entry with `bin/changelog`][changelog] -1. If you have multiple commits please combine them into a few logically - organized commits by [squashing them][git-squash] -1. Push the commit(s) to your fork -1. Submit a merge request (MR) to the `master` branch - 1. Ensure the MR description uses the `General Change` template, and the appropriate - items are checked off. - 1. Your merge request needs at least 1 approval but feel free to require more. - For instance if you're touching multiple charts, replacing a provider, or - altering an behavior on a global level. - 1. You don't have to select any approvers, but you can if you really want - specific people to approve your merge request. -1. The MR title should describe the change you want to make -1. The MR description should give a motive for your change and the method you - used to achieve it. - 1. If you are contributing code, fill in the template already provided in the - "Description" field. - 1. If you are contributing documentation - 1. Choose `Documentation` from the "Choose a template" menu and fill in the template. - 1. Ensure the branch name starts with `docs-` or ends with `-docs` - 1. Mention the issue(s) your merge request solves, using the `Solves #XXX` or - `Closes #XXX` syntax to auto-close the issue(s) once the merge request will - be merged. -1. If you're allowed to, set a relevant milestone and labels -1. Be prepared to answer questions and incorporate feedback even if requests - for this arrive weeks or months after your MR submission - 1. If a discussion has been addressed, select the "Resolve discussion" button - beneath it to mark it resolved. -1. When writing commit messages please follow - [these](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) - [guidelines](http://chris.beams.io/posts/git-commit/). - -Please keep the change in a single MR **as small as possible**. If you want to -contribute a large feature think very hard what the minimum viable change is. -Can you split the functionality? Can you do part of the refactor? The increased -reviewability of small MRs that leads to higher code quality is more important -to us than having a minimal commit log. The smaller an MR is the more likely it -is it will be merged (quickly). After that you can send more MRs to enhance it. -The ['How to get faster PR reviews' document of Kubernetes](https://github.com/kubernetes/community/blob/master/contributors/devel/faster_reviews.md) also has some great points regarding this. - -For examples of feedback on merge requests please look at already -[closed merge requests][closed-merge-requests]. -Please ensure that your merge request meets the contribution acceptance criteria. - -### Contribution acceptance criteria - -1. The change is as small as possible -1. If you suspect a failing CI build is unrelated to your contribution, you may - try and restart the failing CI job or ask a developer to fix the - aforementioned failing test -1. Your MR initially contains a single commit (please use `git rebase -i` to - squash commits) -1. Your changes can merge without problems (if not please rebase if you're the - only one working on your feature branch, otherwise, merge `master`) -1. Does not break any existing functionality -1. Fixes one specific issue or implements one specific feature (do not combine - things, send separate merge requests if needed) -1. Keeps the GitLab chart clean and well structured -1. Contains functionality we think other users will benefit from too -1. Changes do not adversely degrade configuration experience. - - If a change would affect the experience of a user of this chart by increased - complexity, at install or re-configuration, a strong case must be presented. -1. Changes do not adversely degrade performance. - - Performance within the chart refers to several factors, the most - significant being installation and restart times. -1. Changes after submitting the merge request should be in separate commits - (no squashing). -1. It conforms to the [developer documentation](doc/development/README.md). -1. The merge request meets the [definition of done](#definition-of-done). - -## Definition of done - -If you contribute to GitLab please know that changes involve more than just -code. We have the following [definition of done][definition-of-done]. Please ensure you support -the feature you contribute through all of these steps. - -1. Description explaining the relevancy (see following item) -1. Working and clean code that is commented where needed -1. Deployment and QA pass on the CI cluster -1. Performance/scalability implications have been considered, addressed, and tested -1. Documented in the `/doc` directory -1. [Changelog entry added][changelog], if necessary -1. Reviewed and any concerns are addressed -1. Merged by a project maintainer -1. Added to the release blog article, if relevant -1. Added to [the website](https://gitlab.com/gitlab-com/www-gitlab-com/), if relevant -1. Community questions answered -1. Answers to questions radiated (in docs/wiki/support etc.) - -## Code of conduct - -As contributors and maintainers of this project, we pledge to respect all people -who contribute through reporting issues, posting feature requests, updating -documentation, submitting pull requests or patches, and other activities. - -We are committed to making participation in this project a harassment-free -experience for everyone, regardless of level of experience, gender, gender -identity and expression, sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, or religion. - -Examples of unacceptable behavior by participants include the use of sexual -language or imagery, derogatory comments or personal attacks, trolling, public -or private harassment, insults, or other unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct. Project maintainers who do not follow the -Code of Conduct may be removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior can be -reported by emailing contact@gitlab.com. - -This Code of Conduct is adapted from the [Contributor Covenant][contributor-covenant], version 1.1.0, -available at [http://contributor-covenant.org/version/1/1/0/](http://contributor-covenant.org/version/1/1/0/). - -[accepting-mrs]: https://gitlab.com/gitlab-org/charts/gitlab/-/issues?label_name=Accepting+Merge+Requests -[gitlab-mr-tracker]: https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests -[closed-merge-requests]: https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests?assignee_id=&label_name=&milestone_id=&scope=&sort=&state=closed -[contributor-covenant]: http://contributor-covenant.org -[changelog]: doc/development/changelog.md "Generate a changelog entry" -[git-squash]: https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits -[definition-of-done]: http://guide.agilealliance.org/guide/definition-of-done.html -[contributor-covenant]: http://contributor-covenant.org -[CNG]: https://gitlab.com/gitlab-org/build/CNG/ diff --git a/charts/gitlab/gitlab/Chart.yaml b/charts/gitlab/gitlab/Chart.yaml deleted file mode 100644 index ef9a8bfd6..000000000 --- a/charts/gitlab/gitlab/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab -apiVersion: v1 -appVersion: v16.0.1 -description: The One DevOps Platform -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png -keywords: -- gitlab -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: gitlab -sources: -- https://gitlab.com/gitlab-org/charts/gitlab -version: 7.0.1 diff --git a/charts/gitlab/gitlab/LICENSE.md b/charts/gitlab/gitlab/LICENSE.md deleted file mode 100644 index 4abe8b8bf..000000000 --- a/charts/gitlab/gitlab/LICENSE.md +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2011-2017 GitLab B.V. - -With regard to the GitLab Software: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -For all third party components incorporated into the GitLab Software, those -components are licensed under the original license provided by the owner of the -applicable component. diff --git a/charts/gitlab/gitlab/README.md b/charts/gitlab/gitlab/README.md deleted file mode 100644 index 9a8659a6e..000000000 --- a/charts/gitlab/gitlab/README.md +++ /dev/null @@ -1,49 +0,0 @@ -[![pipeline status](https://gitlab.com/gitlab-org/charts/gitlab/badges/master/pipeline.svg)](https://gitlab.com/gitlab-org/charts/gitlab/pipelines) - -# Cloud Native GitLab Helm Chart - -The `gitlab` chart is the best way to operate GitLab on Kubernetes. It contains -all the required components to get started, and can scale to large deployments. - -Some of the key benefits of this chart and [corresponding containers](https://gitlab.com/gitlab-org/build/CNG) are: - -- Improved scalability and reliability. -- No requirement for root privileges. -- Utilization of object storage instead of NFS for storage. - -## Detailed documentation - -See the [repository documentation](doc/index.md) for how to install GitLab and -other information on charts, tools, and advanced configuration. - -For easy of reading, you can find this documentation rendered on -[docs.gitlab.com/charts](https://docs.gitlab.com/charts). - -### Configuration Properties - -We're often asked to put a table of all possible properties directly into this README. -These charts are _massive_ in scale, and as such the number of properties exceeds -the amount of context we're comfortable placing here. Please see our (nearly) -[comprehensive list of properties and defaults](doc/installation/command-line-options.md). - -**Note:** We _strongly recommend_ following our complete documentation, as opposed to -jumping directly into the settings list. - -## Architecture and goals - -See [architecture documentation](doc/architecture/index.md) for an overview -of this project goals and architecture. - -## Known issues and limitations - -See [limitations](doc/index.md#limitations). - -## Release Notes - -Check the [releases documentation](doc/releases/index.md) for information on important releases, -and see the [changelog](CHANGELOG.md) for the full details on any release. - -## Contributing - -See the [contribution guidelines](CONTRIBUTING.md) and then check out the -[development styleguide](doc/development/index.md). diff --git a/charts/gitlab/gitlab/charts/cert-manager/Chart.yaml b/charts/gitlab/gitlab/charts/cert-manager/Chart.yaml deleted file mode 100644 index 02d7c7692..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -annotations: - artifacthub.io/prerelease: "false" - artifacthub.io/signKey: | - fingerprint: 1020CF3C033D4F35BAE1C19E1226061C665DF13E - url: https://cert-manager.io/public-keys/cert-manager-keyring-2021-09-20-1020CF3C033D4F35BAE1C19E1226061C665DF13E.gpg -apiVersion: v1 -appVersion: v1.11.1 -description: A Helm chart for cert-manager -home: https://github.com/cert-manager/cert-manager -icon: https://raw.githubusercontent.com/cert-manager/cert-manager/d53c0b9270f8cd90d908460d69502694e1838f5f/logo/logo-small.png -keywords: -- cert-manager -- kube-lego -- letsencrypt -- tls -kubeVersion: '>= 1.21.0-0' -maintainers: -- email: cert-manager-maintainers@googlegroups.com - name: cert-manager-maintainers - url: https://cert-manager.io -name: cert-manager -sources: -- https://github.com/cert-manager/cert-manager -version: v1.11.1 diff --git a/charts/gitlab/gitlab/charts/cert-manager/README.md b/charts/gitlab/gitlab/charts/cert-manager/README.md deleted file mode 100644 index 6f176fe99..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/README.md +++ /dev/null @@ -1,252 +0,0 @@ -# cert-manager - -cert-manager is a Kubernetes addon to automate the management and issuance of -TLS certificates from various issuing sources. - -It will ensure certificates are valid and up to date periodically, and attempt -to renew certificates at an appropriate time before expiry. - -## Prerequisites - -- Kubernetes 1.20+ - -## Installing the Chart - -Full installation instructions, including details on how to configure extra -functionality in cert-manager can be found in the [installation docs](https://cert-manager.io/docs/installation/kubernetes/). - -Before installing the chart, you must first install the cert-manager CustomResourceDefinition resources. -This is performed in a separate step to allow you to easily uninstall and reinstall cert-manager without deleting your installed custom resources. - -```bash -$ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.1/cert-manager.crds.yaml -``` - -To install the chart with the release name `my-release`: - -```console -## Add the Jetstack Helm repository -$ helm repo add jetstack https://charts.jetstack.io - -## Install the cert-manager helm chart -$ helm install my-release --namespace cert-manager --version v1.11.1 jetstack/cert-manager -``` - -In order to begin issuing certificates, you will need to set up a ClusterIssuer -or Issuer resource (for example, by creating a 'letsencrypt-staging' issuer). - -More information on the different types of issuers and how to configure them -can be found in [our documentation](https://cert-manager.io/docs/configuration/). - -For information on how to configure cert-manager to automatically provision -Certificates for Ingress resources, take a look at the -[Securing Ingresses documentation](https://cert-manager.io/docs/usage/ingress/). - -> **Tip**: List all releases using `helm list` - -## Upgrading the Chart - -Special considerations may be required when upgrading the Helm chart, and these -are documented in our full [upgrading guide](https://cert-manager.io/docs/installation/upgrading/). - -**Please check here before performing upgrades!** - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```console -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -If you want to completely uninstall cert-manager from your cluster, you will also need to -delete the previously installed CustomResourceDefinition resources: - -```console -$ kubectl delete -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.1/cert-manager.crds.yaml -``` - -## Configuration - -The following table lists the configurable parameters of the cert-manager chart and their default values. - -| Parameter | Description | Default | -| --------- | ----------- | ------- | -| `global.imagePullSecrets` | Reference to one or more secrets to be used when pulling images | `[]` | -| `global.commonLabels` | Labels to apply to all resources | `{}` | -| `global.rbac.create` | If `true`, create and use RBAC resources (includes sub-charts) | `true` | -| `global.priorityClassName`| Priority class name for cert-manager and webhook pods | `""` | -| `global.podSecurityPolicy.enabled` | If `true`, create and use PodSecurityPolicy (includes sub-charts) | `false` | -| `global.podSecurityPolicy.useAppArmor` | If `true`, use Apparmor seccomp profile in PSP | `true` | -| `global.leaderElection.namespace` | Override the namespace used to store the ConfigMap for leader election | `kube-system` | -| `global.leaderElection.leaseDuration` | The duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate | | -| `global.leaderElection.renewDeadline` | The interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than or equal to the lease duration | | -| `global.leaderElection.retryPeriod` | The duration the clients should wait between attempting acquisition and renewal of a leadership | | -| `installCRDs` | If true, CRD resources will be installed as part of the Helm chart. If enabled, when uninstalling CRD resources will be deleted causing all installed custom resources to be DELETED | `false` | -| `image.repository` | Image repository | `quay.io/jetstack/cert-manager-controller` | -| `image.tag` | Image tag | `v1.11.1` | -| `image.pullPolicy` | Image pull policy | `IfNotPresent` | -| `replicaCount` | Number of cert-manager replicas | `1` | -| `clusterResourceNamespace` | Override the namespace used to store DNS provider credentials etc. for ClusterIssuer resources | Same namespace as cert-manager pod | -| `featureGates` | Set of comma-separated key=value pairs that describe feature gates on the controller. Some feature gates may also have to be enabled on other components, and can be set supplying the `feature-gate` flag to `.extraArgs` | `` | -| `extraArgs` | Optional flags for cert-manager | `[]` | -| `extraEnv` | Optional environment variables for cert-manager | `[]` | -| `serviceAccount.create` | If `true`, create a new service account | `true` | -| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the fullname template | | -| `serviceAccount.annotations` | Annotations to add to the service account | | -| `serviceAccount.automountServiceAccountToken` | Automount API credentials for the Service Account | `true` | -| `volumes` | Optional volumes for cert-manager | `[]` | -| `volumeMounts` | Optional volume mounts for cert-manager | `[]` | -| `resources` | CPU/memory resource requests/limits | `{}` | -| `securityContext` | Security context for the controller pod assignment | refer to [Default Security Contexts](#default-security-contexts) | -| `containerSecurityContext` | Security context to be set on the controller component container | refer to [Default Security Contexts](#default-security-contexts) | -| `nodeSelector` | Node labels for pod assignment | `{}` | -| `affinity` | Node affinity for pod assignment | `{}` | -| `tolerations` | Node tolerations for pod assignment | `[]` | -| `topologySpreadConstraints` | Topology spread constraints for pod assignment | `[]` | -| `ingressShim.defaultIssuerName` | Optional default issuer to use for ingress resources | | -| `ingressShim.defaultIssuerKind` | Optional default issuer kind to use for ingress resources | | -| `ingressShim.defaultIssuerGroup` | Optional default issuer group to use for ingress resources | | -| `prometheus.enabled` | Enable Prometheus monitoring | `true` | -| `prometheus.servicemonitor.enabled` | Enable Prometheus Operator ServiceMonitor monitoring | `false` | -| `prometheus.servicemonitor.namespace` | Define namespace where to deploy the ServiceMonitor resource | (namespace where you are deploying) | -| `prometheus.servicemonitor.prometheusInstance` | Prometheus Instance definition | `default` | -| `prometheus.servicemonitor.targetPort` | Prometheus scrape port | `9402` | -| `prometheus.servicemonitor.path` | Prometheus scrape path | `/metrics` | -| `prometheus.servicemonitor.interval` | Prometheus scrape interval | `60s` | -| `prometheus.servicemonitor.labels` | Add custom labels to ServiceMonitor | | -| `prometheus.servicemonitor.scrapeTimeout` | Prometheus scrape timeout | `30s` | -| `prometheus.servicemonitor.honorLabels` | Enable label honoring for metrics scraped by Prometheus (see [Prometheus scrape config docs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config) for details). By setting `honorLabels` to `true`, Prometheus will prefer label contents given by cert-manager on conflicts. Can be used to remove the "exported_namespace" label for example. | `false` | -| `podAnnotations` | Annotations to add to the cert-manager pod | `{}` | -| `deploymentAnnotations` | Annotations to add to the cert-manager deployment | `{}` | -| `podDnsPolicy` | Optional cert-manager pod [DNS policy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pods-dns-policy) | | -| `podDnsConfig` | Optional cert-manager pod [DNS configurations](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pods-dns-config) | | -| `podLabels` | Labels to add to the cert-manager pod | `{}` | -| `serviceLabels` | Labels to add to the cert-manager controller service | `{}` | -| `serviceAnnotations` | Annotations to add to the cert-manager service | `{}` | -| `http_proxy` | Value of the `HTTP_PROXY` environment variable in the cert-manager pod | | -| `https_proxy` | Value of the `HTTPS_PROXY` environment variable in the cert-manager pod | | -| `no_proxy` | Value of the `NO_PROXY` environment variable in the cert-manager pod | | -| `webhook.replicaCount` | Number of cert-manager webhook replicas | `1` | -| `webhook.timeoutSeconds` | Seconds the API server should wait the webhook to respond before treating the call as a failure. | `10` | -| `webhook.podAnnotations` | Annotations to add to the webhook pods | `{}` | -| `webhook.podLabels` | Labels to add to the cert-manager webhook pod | `{}` | -| `webhook.serviceLabels` | Labels to add to the cert-manager webhook service | `{}` | -| `webhook.deploymentAnnotations` | Annotations to add to the webhook deployment | `{}` | -| `webhook.mutatingWebhookConfigurationAnnotations` | Annotations to add to the mutating webhook configuration | `{}` | -| `webhook.validatingWebhookConfigurationAnnotations` | Annotations to add to the validating webhook configuration | `{}` | -| `webhook.serviceAnnotations` | Annotations to add to the webhook service | `{}` | -| `webhook.config` | WebhookConfiguration YAML used to configure flags for the webhook. Generates a ConfigMap containing contents of the field. See `values.yaml` for example. | `{}` | -| `webhook.extraArgs` | Optional flags for cert-manager webhook component | `[]` | -| `webhook.serviceAccount.create` | If `true`, create a new service account for the webhook component | `true` | -| `webhook.serviceAccount.name` | Service account for the webhook component to be used. If not set and `webhook.serviceAccount.create` is `true`, a name is generated using the fullname template | | -| `webhook.serviceAccount.annotations` | Annotations to add to the service account for the webhook component | | -| `webhook.serviceAccount.automountServiceAccountToken` | Automount API credentials for the webhook Service Account | | -| `webhook.resources` | CPU/memory resource requests/limits for the webhook pods | `{}` | -| `webhook.nodeSelector` | Node labels for webhook pod assignment | `{}` | -| `webhook.networkPolicy.enabled` | Enable default network policies for webhooks egress and ingress traffic | `false` | -| `webhook.networkPolicy.ingress` | Sets ingress policy block. See NetworkPolicy documentation. See `values.yaml` for example. | `{}` | -| `webhook.networkPolicy.egress` | Sets ingress policy block. See NetworkPolicy documentation. See `values.yaml` for example. | `{}` | -| `webhook.affinity` | Node affinity for webhook pod assignment | `{}` | -| `webhook.tolerations` | Node tolerations for webhook pod assignment | `[]` | -| `webhook.topologySpreadConstraints` | Topology spread constraints for webhook pod assignment | `[]` | -| `webhook.image.repository` | Webhook image repository | `quay.io/jetstack/cert-manager-webhook` | -| `webhook.image.tag` | Webhook image tag | `v1.11.1` | -| `webhook.image.pullPolicy` | Webhook image pull policy | `IfNotPresent` | -| `webhook.securePort` | The port that the webhook should listen on for requests. | `10250` | -| `webhook.securityContext` | Security context for webhook pod assignment | refer to [Default Security Contexts](#default-security-contexts) | -| `webhook.containerSecurityContext` | Security context to be set on the webhook component container | refer to [Default Security Contexts](#default-security-contexts) | -| `webhook.hostNetwork` | If `true`, run the Webhook on the host network. | `false` | -| `webhook.serviceType` | The type of the `Service`. | `ClusterIP` | -| `webhook.loadBalancerIP` | The specific load balancer IP to use (when `serviceType` is `LoadBalancer`). | | -| `webhook.url.host` | The host to use to reach the webhook, instead of using internal cluster DNS for the service. | | -| `webhook.livenessProbe.failureThreshold` | The liveness probe failure threshold | `3` | -| `webhook.livenessProbe.initialDelaySeconds` | The liveness probe initial delay (in seconds) | `60` | -| `webhook.livenessProbe.periodSeconds` | The liveness probe period (in seconds) | `10` | -| `webhook.livenessProbe.successThreshold` | The liveness probe success threshold | `1` | -| `webhook.livenessProbe.timeoutSeconds` | The liveness probe timeout (in seconds) | `1` | -| `webhook.readinessProbe.failureThreshold` | The readiness probe failure threshold | `3` | -| `webhook.readinessProbe.initialDelaySeconds` | The readiness probe initial delay (in seconds) | `5` | -| `webhook.readinessProbe.periodSeconds` | The readiness probe period (in seconds) | `5` | -| `webhook.readinessProbe.successThreshold` | The readiness probe success threshold | `1` | -| `webhook.readinessProbe.timeoutSeconds` | The readiness probe timeout (in seconds) | `1` | -| `cainjector.enabled` | Toggles whether the cainjector component should be installed (required for the webhook component to work) | `true` | -| `cainjector.replicaCount` | Number of cert-manager cainjector replicas | `1` | -| `cainjector.podAnnotations` | Annotations to add to the cainjector pods | `{}` | -| `cainjector.podLabels` | Labels to add to the cert-manager cainjector pod | `{}` | -| `cainjector.deploymentAnnotations` | Annotations to add to the cainjector deployment | `{}` | -| `cainjector.extraArgs` | Optional flags for cert-manager cainjector component | `[]` | -| `cainjector.serviceAccount.create` | If `true`, create a new service account for the cainjector component | `true` | -| `cainjector.serviceAccount.name` | Service account for the cainjector component to be used. If not set and `cainjector.serviceAccount.create` is `true`, a name is generated using the fullname template | | -| `cainjector.serviceAccount.annotations` | Annotations to add to the service account for the cainjector component | | -| `cainjector.serviceAccount.automountServiceAccountToken` | Automount API credentials for the cainjector Service Account | `true` | -| `cainjector.resources` | CPU/memory resource requests/limits for the cainjector pods | `{}` | -| `cainjector.nodeSelector` | Node labels for cainjector pod assignment | `{}` | -| `cainjector.affinity` | Node affinity for cainjector pod assignment | `{}` | -| `cainjector.tolerations` | Node tolerations for cainjector pod assignment | `[]` | -| `cainjector.topologySpreadConstraints` | Topology spread constraints for cainjector pod assignment | `[]` | -| `cainjector.image.repository` | cainjector image repository | `quay.io/jetstack/cert-manager-cainjector` | -| `cainjector.image.tag` | cainjector image tag | `v1.11.1` | -| `cainjector.image.pullPolicy` | cainjector image pull policy | `IfNotPresent` | -| `cainjector.securityContext` | Security context for cainjector pod assignment | refer to [Default Security Contexts](#default-security-contexts) | -| `cainjector.containerSecurityContext` | Security context to be set on cainjector component container | refer to [Default Security Contexts](#default-security-contexts) | -| `acmesolver.image.repository` | acmesolver image repository | `quay.io/jetstack/cert-manager-acmesolver` | -| `acmesolver.image.tag` | acmesolver image tag | `v1.11.1` | -| `acmesolver.image.pullPolicy` | acmesolver image pull policy | `IfNotPresent` | -| `startupapicheck.enabled` | Toggles whether the startupapicheck Job should be installed | `true` | -| `startupapicheck.securityContext` | Security context for startupapicheck pod assignment | refer to [Default Security Contexts](#default-security-contexts) | -| `startupapicheck.containerSecurityContext` | Security context to be set on startupapicheck component container | refer to [Default Security Contexts](#default-security-contexts) | -| `startupapicheck.timeout` | Timeout for 'kubectl check api' command | `1m` | -| `startupapicheck.backoffLimit` | Job backoffLimit | `4` | -| `startupapicheck.jobAnnotations` | Optional additional annotations to add to the startupapicheck Job | `{}` | -| `startupapicheck.podAnnotations` | Optional additional annotations to add to the startupapicheck Pods | `{}` | -| `startupapicheck.extraArgs` | Optional additional arguments for startupapicheck | `[]` | -| `startupapicheck.resources` | CPU/memory resource requests/limits for the startupapicheck pod | `{}` | -| `startupapicheck.nodeSelector` | Node labels for startupapicheck pod assignment | `{}` | -| `startupapicheck.affinity` | Node affinity for startupapicheck pod assignment | `{}` | -| `startupapicheck.tolerations` | Node tolerations for startupapicheck pod assignment | `[]` | -| `startupapicheck.podLabels` | Optional additional labels to add to the startupapicheck Pods | `{}` | -| `startupapicheck.image.repository` | startupapicheck image repository | `quay.io/jetstack/cert-manager-ctl` | -| `startupapicheck.image.tag` | startupapicheck image tag | `v1.11.1` | -| `startupapicheck.image.pullPolicy` | startupapicheck image pull policy | `IfNotPresent` | -| `startupapicheck.serviceAccount.create` | If `true`, create a new service account for the startupapicheck component | `true` | -| `startupapicheck.serviceAccount.name` | Service account for the startupapicheck component to be used. If not set and `startupapicheck.serviceAccount.create` is `true`, a name is generated using the fullname template | | -| `startupapicheck.serviceAccount.annotations` | Annotations to add to the service account for the startupapicheck component | | -| `startupapicheck.serviceAccount.automountServiceAccountToken` | Automount API credentials for the startupapicheck Service Account | `true` | -| `maxConcurrentChallenges` | The maximum number of challenges that can be scheduled as 'processing' at once | `60` | - -### Default Security Contexts - -The default pod-level and container-level security contexts, below, adhere to the [restricted](https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted) Pod Security Standards policies. - -Default pod-level securityContext: -```yaml -runAsNonRoot: true -seccompProfile: - type: RuntimeDefault -``` - -Default containerSecurityContext: -```yaml -allowPrivilegeEscalation: false -capabilities: - drop: - - ALL -``` - -### Assigning Values - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. - -Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example, - -```console -$ helm install my-release -f values.yaml . -``` -> **Tip**: You can use the default [values.yaml](https://github.com/cert-manager/cert-manager/blob/master/deploy/charts/cert-manager/values.yaml) - -## Contributing - -This chart is maintained at [github.com/cert-manager/cert-manager](https://github.com/cert-manager/cert-manager/tree/master/deploy/charts/cert-manager). diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/NOTES.txt b/charts/gitlab/gitlab/charts/cert-manager/templates/NOTES.txt deleted file mode 100644 index 102535460..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/NOTES.txt +++ /dev/null @@ -1,15 +0,0 @@ -cert-manager {{ .Chart.AppVersion }} has been deployed successfully! - -In order to begin issuing certificates, you will need to set up a ClusterIssuer -or Issuer resource (for example, by creating a 'letsencrypt-staging' issuer). - -More information on the different types of issuers and how to configure them -can be found in our documentation: - -https://cert-manager.io/docs/configuration/ - -For information on how to configure cert-manager to automatically provision -Certificates for Ingress resources, take a look at the `ingress-shim` -documentation: - -https://cert-manager.io/docs/usage/ingress/ diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/cert-manager/templates/_helpers.tpl deleted file mode 100644 index 90db4af26..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/_helpers.tpl +++ /dev/null @@ -1,174 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "cert-manager.name" -}} -{{- default .Chart.Name .Values.nameOverride | 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). -*/}} -{{- define "cert-manager.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "cert-manager.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "cert-manager.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Webhook templates -*/}} - -{{/* -Expand the name of the chart. -Manually fix the 'app' and 'name' labels to 'webhook' to maintain -compatibility with the v0.9 deployment selector. -*/}} -{{- define "webhook.name" -}} -{{- printf "webhook" -}} -{{- 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 "webhook.fullname" -}} -{{- $trimmedName := printf "%s" (include "cert-manager.fullname" .) | trunc 55 | trimSuffix "-" -}} -{{- printf "%s-webhook" $trimmedName | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "webhook.caRef" -}} -{{- template "cert-manager.namespace" }}/{{ template "webhook.fullname" . }}-ca -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "webhook.serviceAccountName" -}} -{{- if .Values.webhook.serviceAccount.create -}} - {{ default (include "webhook.fullname" .) .Values.webhook.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.webhook.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -cainjector templates -*/}} - -{{/* -Expand the name of the chart. -Manually fix the 'app' and 'name' labels to 'cainjector' to maintain -compatibility with the v0.9 deployment selector. -*/}} -{{- define "cainjector.name" -}} -{{- printf "cainjector" -}} -{{- 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 "cainjector.fullname" -}} -{{- $trimmedName := printf "%s" (include "cert-manager.fullname" .) | trunc 52 | trimSuffix "-" -}} -{{- printf "%s-cainjector" $trimmedName | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "cainjector.serviceAccountName" -}} -{{- if .Values.cainjector.serviceAccount.create -}} - {{ default (include "cainjector.fullname" .) .Values.cainjector.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.cainjector.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -startupapicheck templates -*/}} - -{{/* -Expand the name of the chart. -Manually fix the 'app' and 'name' labels to 'startupapicheck' to maintain -compatibility with the v0.9 deployment selector. -*/}} -{{- define "startupapicheck.name" -}} -{{- printf "startupapicheck" -}} -{{- 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 "startupapicheck.fullname" -}} -{{- $trimmedName := printf "%s" (include "cert-manager.fullname" .) | trunc 52 | trimSuffix "-" -}} -{{- printf "%s-startupapicheck" $trimmedName | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "startupapicheck.serviceAccountName" -}} -{{- if .Values.startupapicheck.serviceAccount.create -}} - {{ default (include "startupapicheck.fullname" .) .Values.startupapicheck.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.startupapicheck.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "chartName" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Labels that should be added on each resource -*/}} -{{- define "labels" -}} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- if eq (default "helm" .Values.creator) "helm" }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -helm.sh/chart: {{ include "chartName" . }} -{{- end -}} -{{- if .Values.global.commonLabels}} -{{ toYaml .Values.global.commonLabels }} -{{- end }} -{{- end -}} - -{{/* -Namespace for all resources to be installed into -If not defined in values file then the helm release namespace is used -By default this is not set so the helm release namespace will be used - -This gets around an problem within helm discussed here -https://github.com/helm/helm/issues/5358 -*/}} -{{- define "cert-manager.namespace" -}} - {{ .Values.namespace | default .Release.Namespace }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-deployment.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-deployment.yaml deleted file mode 100644 index fbfed0fce..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-deployment.yaml +++ /dev/null @@ -1,109 +0,0 @@ -{{- if .Values.cainjector.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "cainjector.fullname" . }} - namespace: {{ include "cert-manager.namespace" . }} - labels: - app: {{ include "cainjector.name" . }} - app.kubernetes.io/name: {{ include "cainjector.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cainjector" - {{- include "labels" . | nindent 4 }} - {{- with .Values.cainjector.deploymentAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.cainjector.replicaCount }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "cainjector.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cainjector" - {{- with .Values.cainjector.strategy }} - strategy: - {{- toYaml . | nindent 4 }} - {{- end }} - template: - metadata: - labels: - app: {{ include "cainjector.name" . }} - app.kubernetes.io/name: {{ include "cainjector.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cainjector" - {{- include "labels" . | nindent 8 }} - {{- with .Values.cainjector.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.cainjector.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ template "cainjector.serviceAccountName" . }} - {{- if hasKey .Values.cainjector "automountServiceAccountToken" }} - automountServiceAccountToken: {{ .Values.cainjector.automountServiceAccountToken }} - {{- end }} - {{- with .Values.global.priorityClassName }} - priorityClassName: {{ . | quote }} - {{- end }} - {{- with .Values.cainjector.securityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: {{ .Chart.Name }}-cainjector - {{- with .Values.cainjector.image }} - image: "{{- if .registry -}}{{ .registry }}/{{- end -}}{{ .repository }}{{- if (.digest) -}} @{{ .digest }}{{- else -}}:{{ default $.Chart.AppVersion .tag }} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.cainjector.image.pullPolicy }} - args: - {{- if .Values.global.logLevel }} - - --v={{ .Values.global.logLevel }} - {{- end }} - {{- with .Values.global.leaderElection }} - - --leader-election-namespace={{ .namespace }} - {{- if .leaseDuration }} - - --leader-election-lease-duration={{ .leaseDuration }} - {{- end }} - {{- if .renewDeadline }} - - --leader-election-renew-deadline={{ .renewDeadline }} - {{- end }} - {{- if .retryPeriod }} - - --leader-election-retry-period={{ .retryPeriod }} - {{- end }} - {{- end }} - {{- with .Values.cainjector.extraArgs }} - {{- toYaml . | nindent 10 }} - {{- end }} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - {{- with .Values.cainjector.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.cainjector.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.cainjector.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.cainjector.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.cainjector.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.cainjector.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-psp-clusterrole.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-psp-clusterrole.yaml deleted file mode 100644 index b75b9eb6f..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-psp-clusterrole.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.cainjector.enabled }} -{{- if .Values.global.podSecurityPolicy.enabled }} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "cainjector.fullname" . }}-psp - labels: - app: {{ include "cainjector.name" . }} - app.kubernetes.io/name: {{ include "cainjector.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cainjector" - {{- include "labels" . | nindent 4 }} -rules: -- apiGroups: ['policy'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: - - {{ template "cainjector.fullname" . }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-psp-clusterrolebinding.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-psp-clusterrolebinding.yaml deleted file mode 100644 index e2bfa26bb..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-psp-clusterrolebinding.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.cainjector.enabled }} -{{- if .Values.global.podSecurityPolicy.enabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "cainjector.fullname" . }}-psp - labels: - app: {{ include "cainjector.name" . }} - app.kubernetes.io/name: {{ include "cainjector.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cainjector" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "cainjector.fullname" . }}-psp -subjects: - - kind: ServiceAccount - name: {{ template "cainjector.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-psp.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-psp.yaml deleted file mode 100644 index 24f01da5d..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-psp.yaml +++ /dev/null @@ -1,51 +0,0 @@ -{{- if .Values.cainjector.enabled }} -{{- if .Values.global.podSecurityPolicy.enabled }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "cainjector.fullname" . }} - labels: - app: {{ include "cainjector.name" . }} - app.kubernetes.io/name: {{ include "cainjector.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cainjector" - {{- include "labels" . | nindent 4 }} - annotations: - seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default' - seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - {{- if .Values.global.podSecurityPolicy.useAppArmor }} - apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default' - apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - {{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - allowedCapabilities: [] # default set of capabilities are implicitly allowed - volumes: - - 'configMap' - - 'emptyDir' - - 'projected' - - 'secret' - - 'downwardAPI' - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-rbac.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-rbac.yaml deleted file mode 100644 index 0393f92be..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-rbac.yaml +++ /dev/null @@ -1,103 +0,0 @@ -{{- if .Values.cainjector.enabled }} -{{- if .Values.global.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "cainjector.fullname" . }} - labels: - app: {{ include "cainjector.name" . }} - app.kubernetes.io/name: {{ include "cainjector.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cainjector" - {{- include "labels" . | nindent 4 }} -rules: - - apiGroups: ["cert-manager.io"] - resources: ["certificates"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["events"] - verbs: ["get", "create", "update", "patch"] - - apiGroups: ["admissionregistration.k8s.io"] - resources: ["validatingwebhookconfigurations", "mutatingwebhookconfigurations"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["apiregistration.k8s.io"] - resources: ["apiservices"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["apiextensions.k8s.io"] - resources: ["customresourcedefinitions"] - verbs: ["get", "list", "watch", "update"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "cainjector.fullname" . }} - labels: - app: {{ include "cainjector.name" . }} - app.kubernetes.io/name: {{ include "cainjector.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cainjector" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "cainjector.fullname" . }} -subjects: - - name: {{ template "cainjector.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - kind: ServiceAccount - ---- -# leader election rules -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "cainjector.fullname" . }}:leaderelection - namespace: {{ .Values.global.leaderElection.namespace }} - labels: - app: {{ include "cainjector.name" . }} - app.kubernetes.io/name: {{ include "cainjector.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cainjector" - {{- include "labels" . | nindent 4 }} -rules: - # Used for leader election by the controller - # cert-manager-cainjector-leader-election is used by the CertificateBased injector controller - # see cmd/cainjector/start.go#L113 - # cert-manager-cainjector-leader-election-core is used by the SecretBased injector controller - # see cmd/cainjector/start.go#L137 - - apiGroups: ["coordination.k8s.io"] - resources: ["leases"] - resourceNames: ["cert-manager-cainjector-leader-election", "cert-manager-cainjector-leader-election-core"] - verbs: ["get", "update", "patch"] - - apiGroups: ["coordination.k8s.io"] - resources: ["leases"] - verbs: ["create"] - ---- - -# grant cert-manager permission to manage the leaderelection configmap in the -# leader election namespace -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "cainjector.fullname" . }}:leaderelection - namespace: {{ .Values.global.leaderElection.namespace }} - labels: - app: {{ include "cainjector.name" . }} - app.kubernetes.io/name: {{ include "cainjector.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cainjector" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "cainjector.fullname" . }}:leaderelection -subjects: - - kind: ServiceAccount - name: {{ template "cainjector.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-serviceaccount.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-serviceaccount.yaml deleted file mode 100644 index fedc731f8..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/cainjector-serviceaccount.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.cainjector.enabled }} -{{- if .Values.cainjector.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -automountServiceAccountToken: {{ .Values.cainjector.serviceAccount.automountServiceAccountToken }} -metadata: - name: {{ template "cainjector.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - {{- with .Values.cainjector.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - app: {{ include "cainjector.name" . }} - app.kubernetes.io/name: {{ include "cainjector.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cainjector" - {{- include "labels" . | nindent 4 }} - {{- with .Values.cainjector.serviceAccount.labels }} - {{ toYaml . | nindent 4 }} - {{- end }} -{{- with .Values.global.imagePullSecrets }} -imagePullSecrets: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/crds.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/crds.yaml deleted file mode 100644 index cb097f102..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/crds.yaml +++ /dev/null @@ -1,4398 +0,0 @@ -{{- if .Values.installCRDs }} -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: clusterissuers.cert-manager.io - labels: - app: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/name: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/instance: '{{ .Release.Name }}' - # Generated labels {{- include "labels" . | nindent 4 }} -spec: - group: cert-manager.io - names: - kind: ClusterIssuer - listKind: ClusterIssuerList - plural: clusterissuers - singular: clusterissuer - categories: - - cert-manager - scope: Cluster - versions: - - name: v1 - subresources: - status: {} - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=="Ready")].status - name: Ready - type: string - - jsonPath: .status.conditions[?(@.type=="Ready")].message - name: Status - priority: 1 - type: string - - jsonPath: .metadata.creationTimestamp - description: CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - name: Age - type: date - schema: - openAPIV3Schema: - description: A ClusterIssuer represents a certificate issuing authority which can be referenced as part of `issuerRef` fields. It is similar to an Issuer, however it is cluster-scoped and therefore can be referenced by resources that exist in *any* namespace, not just the same namespace as the referent. - type: object - required: - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Desired state of the ClusterIssuer resource. - type: object - properties: - acme: - description: ACME configures this issuer to communicate with a RFC8555 (ACME) server to obtain signed x509 certificates. - type: object - required: - - privateKeySecretRef - - server - properties: - caBundle: - description: Base64-encoded bundle of PEM CAs which can be used to validate the certificate chain presented by the ACME server. Mutually exclusive with SkipTLSVerify; prefer using CABundle to prevent various kinds of security vulnerabilities. If CABundle and SkipTLSVerify are unset, the system certificate bundle inside the container is used to validate the TLS connection. - type: string - format: byte - disableAccountKeyGeneration: - description: Enables or disables generating a new ACME account key. If true, the Issuer resource will *not* request a new account but will expect the account key to be supplied via an existing secret. If false, the cert-manager system will generate a new ACME account key for the Issuer. Defaults to false. - type: boolean - email: - description: Email is the email address to be associated with the ACME account. This field is optional, but it is strongly recommended to be set. It will be used to contact you in case of issues with your account or certificates, including expiry notification emails. This field may be updated after the account is initially registered. - type: string - enableDurationFeature: - description: Enables requesting a Not After date on certificates that matches the duration of the certificate. This is not supported by all ACME servers like Let's Encrypt. If set to true when the ACME server does not support it it will create an error on the Order. Defaults to false. - type: boolean - externalAccountBinding: - description: ExternalAccountBinding is a reference to a CA external account of the ACME server. If set, upon registration cert-manager will attempt to associate the given external account credentials with the registered ACME account. - type: object - required: - - keyID - - keySecretRef - properties: - keyAlgorithm: - description: 'Deprecated: keyAlgorithm field exists for historical compatibility reasons and should not be used. The algorithm is now hardcoded to HS256 in golang/x/crypto/acme.' - type: string - enum: - - HS256 - - HS384 - - HS512 - keyID: - description: keyID is the ID of the CA key that the External Account is bound to. - type: string - keySecretRef: - description: keySecretRef is a Secret Key Selector referencing a data item in a Kubernetes Secret which holds the symmetric MAC key of the External Account Binding. The `key` is the index string that is paired with the key data in the Secret and should not be confused with the key data itself, or indeed with the External Account Binding keyID above. The secret key stored in the Secret **must** be un-padded, base64 URL encoded data. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - preferredChain: - description: 'PreferredChain is the chain to use if the ACME server outputs multiple. PreferredChain is no guarantee that this one gets delivered by the ACME endpoint. For example, for Let''s Encrypt''s DST crosssign you would use: "DST Root CA X3" or "ISRG Root X1" for the newer Let''s Encrypt root CA. This value picks the first certificate bundle in the ACME alternative chains that has a certificate with this value as its issuer''s CN' - type: string - maxLength: 64 - privateKeySecretRef: - description: PrivateKey is the name of a Kubernetes Secret resource that will be used to store the automatically generated ACME account private key. Optionally, a `key` may be specified to select a specific entry within the named Secret resource. If `key` is not specified, a default of `tls.key` will be used. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - server: - description: 'Server is the URL used to access the ACME server''s ''directory'' endpoint. For example, for Let''s Encrypt''s staging endpoint, you would use: "https://acme-staging-v02.api.letsencrypt.org/directory". Only ACME v2 endpoints (i.e. RFC 8555) are supported.' - type: string - skipTLSVerify: - description: 'INSECURE: Enables or disables validation of the ACME server TLS certificate. If true, requests to the ACME server will not have the TLS certificate chain validated. Mutually exclusive with CABundle; prefer using CABundle to prevent various kinds of security vulnerabilities. Only enable this option in development environments. If CABundle and SkipTLSVerify are unset, the system certificate bundle inside the container is used to validate the TLS connection. Defaults to false.' - type: boolean - solvers: - description: 'Solvers is a list of challenge solvers that will be used to solve ACME challenges for the matching domains. Solver configurations must be provided in order to obtain certificates from an ACME server. For more information, see: https://cert-manager.io/docs/configuration/acme/' - type: array - items: - description: An ACMEChallengeSolver describes how to solve ACME challenges for the issuer it is part of. A selector may be provided to use different solving strategies for different DNS names. Only one of HTTP01 or DNS01 must be provided. - type: object - properties: - dns01: - description: Configures cert-manager to attempt to complete authorizations by performing the DNS01 challenge flow. - type: object - properties: - acmeDNS: - description: Use the 'ACME DNS' (https://github.com/joohoi/acme-dns) API to manage DNS01 challenge records. - type: object - required: - - accountSecretRef - - host - properties: - accountSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - host: - type: string - akamai: - description: Use the Akamai DNS zone management API to manage DNS01 challenge records. - type: object - required: - - accessTokenSecretRef - - clientSecretSecretRef - - clientTokenSecretRef - - serviceConsumerDomain - properties: - accessTokenSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - clientSecretSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - clientTokenSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - serviceConsumerDomain: - type: string - azureDNS: - description: Use the Microsoft Azure DNS API to manage DNS01 challenge records. - type: object - required: - - resourceGroupName - - subscriptionID - properties: - clientID: - description: if both this and ClientSecret are left unset MSI will be used - type: string - clientSecretSecretRef: - description: if both this and ClientID are left unset MSI will be used - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - environment: - description: name of the Azure environment (default AzurePublicCloud) - type: string - enum: - - AzurePublicCloud - - AzureChinaCloud - - AzureGermanCloud - - AzureUSGovernmentCloud - hostedZoneName: - description: name of the DNS zone that should be used - type: string - managedIdentity: - description: managed identity configuration, can not be used at the same time as clientID, clientSecretSecretRef or tenantID - type: object - properties: - clientID: - description: client ID of the managed identity, can not be used at the same time as resourceID - type: string - resourceID: - description: resource ID of the managed identity, can not be used at the same time as clientID - type: string - resourceGroupName: - description: resource group the DNS zone is located in - type: string - subscriptionID: - description: ID of the Azure subscription - type: string - tenantID: - description: when specifying ClientID and ClientSecret then this field is also needed - type: string - cloudDNS: - description: Use the Google Cloud DNS API to manage DNS01 challenge records. - type: object - required: - - project - properties: - hostedZoneName: - description: HostedZoneName is an optional field that tells cert-manager in which Cloud DNS zone the challenge record has to be created. If left empty cert-manager will automatically choose a zone. - type: string - project: - type: string - serviceAccountSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - cloudflare: - description: Use the Cloudflare API to manage DNS01 challenge records. - type: object - properties: - apiKeySecretRef: - description: 'API key to use to authenticate with Cloudflare. Note: using an API token to authenticate is now the recommended method as it allows greater control of permissions.' - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - apiTokenSecretRef: - description: API token used to authenticate with Cloudflare. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - email: - description: Email of the account, only required when using API key based authentication. - type: string - cnameStrategy: - description: CNAMEStrategy configures how the DNS01 provider should handle CNAME records when found in DNS zones. - type: string - enum: - - None - - Follow - digitalocean: - description: Use the DigitalOcean DNS API to manage DNS01 challenge records. - type: object - required: - - tokenSecretRef - properties: - tokenSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - rfc2136: - description: Use RFC2136 ("Dynamic Updates in the Domain Name System") (https://datatracker.ietf.org/doc/rfc2136/) to manage DNS01 challenge records. - type: object - required: - - nameserver - properties: - nameserver: - description: The IP address or hostname of an authoritative DNS server supporting RFC2136 in the form host:port. If the host is an IPv6 address it must be enclosed in square brackets (e.g [2001:db8::1]) ; port is optional. This field is required. - type: string - tsigAlgorithm: - description: 'The TSIG Algorithm configured in the DNS supporting RFC2136. Used only when ``tsigSecretSecretRef`` and ``tsigKeyName`` are defined. Supported values are (case-insensitive): ``HMACMD5`` (default), ``HMACSHA1``, ``HMACSHA256`` or ``HMACSHA512``.' - type: string - tsigKeyName: - description: The TSIG Key name configured in the DNS. If ``tsigSecretSecretRef`` is defined, this field is required. - type: string - tsigSecretSecretRef: - description: The name of the secret containing the TSIG value. If ``tsigKeyName`` is defined, this field is required. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - route53: - description: Use the AWS Route53 API to manage DNS01 challenge records. - type: object - required: - - region - properties: - accessKeyID: - description: 'The AccessKeyID is used for authentication. Cannot be set when SecretAccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' - type: string - accessKeyIDSecretRef: - description: 'The SecretAccessKey is used for authentication. If set, pull the AWS access key ID from a key within a Kubernetes Secret. Cannot be set when AccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - hostedZoneID: - description: If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. - type: string - region: - description: Always set the region when using AccessKeyID and SecretAccessKey - type: string - role: - description: Role is a Role ARN which the Route53 provider will assume using either the explicit credentials AccessKeyID/SecretAccessKey or the inferred credentials from environment variables, shared credentials file or AWS Instance metadata - type: string - secretAccessKeySecretRef: - description: 'The SecretAccessKey is used for authentication. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - webhook: - description: Configure an external webhook based DNS01 challenge solver to manage DNS01 challenge records. - type: object - required: - - groupName - - solverName - properties: - config: - description: Additional configuration that should be passed to the webhook apiserver when challenges are processed. This can contain arbitrary JSON data. Secret values should not be specified in this stanza. If secret values are needed (e.g. credentials for a DNS service), you should use a SecretKeySelector to reference a Secret resource. For details on the schema of this field, consult the webhook provider implementation's documentation. - x-kubernetes-preserve-unknown-fields: true - groupName: - description: The API group name that should be used when POSTing ChallengePayload resources to the webhook apiserver. This should be the same as the GroupName specified in the webhook provider implementation. - type: string - solverName: - description: The name of the solver to use, as defined in the webhook provider implementation. This will typically be the name of the provider, e.g. 'cloudflare'. - type: string - http01: - description: Configures cert-manager to attempt to complete authorizations by performing the HTTP01 challenge flow. It is not possible to obtain certificates for wildcard domain names (e.g. `*.example.com`) using the HTTP01 challenge mechanism. - type: object - properties: - gatewayHTTPRoute: - description: The Gateway API is a sig-network community API that models service networking in Kubernetes (https://gateway-api.sigs.k8s.io/). The Gateway solver will create HTTPRoutes with the specified labels in the same namespace as the challenge. This solver is experimental, and fields / behaviour may change in the future. - type: object - properties: - labels: - description: Custom labels that will be applied to HTTPRoutes created by cert-manager while solving HTTP-01 challenges. - type: object - additionalProperties: - type: string - parentRefs: - description: 'When solving an HTTP-01 challenge, cert-manager creates an HTTPRoute. cert-manager needs to know which parentRefs should be used when creating the HTTPRoute. Usually, the parentRef references a Gateway. See: https://gateway-api.sigs.k8s.io/api-types/httproute/#attaching-to-gateways' - type: array - items: - description: "ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually a route). The only kind of parent resource with \"Core\" support is Gateway. This API may be extended in the future to support additional kinds of parent resources, such as HTTPRoute. \n The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid." - type: object - required: - - name - properties: - group: - description: "Group is the group of the referent. When unspecified, \"gateway.networking.k8s.io\" is inferred. To set the core API group (such as for a \"Service\" kind referent), Group must be explicitly set to \"\" (empty string). \n Support: Core" - type: string - default: gateway.networking.k8s.io - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - kind: - description: "Kind is kind of the referent. \n Support: Core (Gateway) \n Support: Implementation-specific (Other Resources)" - type: string - default: Gateway - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - name: - description: "Name is the name of the referent. \n Support: Core" - type: string - maxLength: 253 - minLength: 1 - namespace: - description: "Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route. \n Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. \n Support: Core" - type: string - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - port: - description: "Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource. \n When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. \n Support: Extended \n " - type: integer - format: int32 - maximum: 65535 - minimum: 1 - sectionName: - description: "SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following: \n * Gateway: Listener Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. \n Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted. \n When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. \n Support: Core" - type: string - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - serviceType: - description: Optional service type for Kubernetes solver service. Supported values are NodePort or ClusterIP. If unset, defaults to NodePort. - type: string - ingress: - description: The ingress based HTTP01 challenge solver will solve challenges by creating or modifying Ingress resources in order to route requests for '/.well-known/acme-challenge/XYZ' to 'challenge solver' pods that are provisioned by cert-manager for each Challenge to be completed. - type: object - properties: - class: - description: The ingress class to use when creating Ingress resources to solve ACME challenges that use this challenge solver. Only one of 'class' or 'name' may be specified. - type: string - ingressTemplate: - description: Optional ingress template used to configure the ACME challenge solver ingress used for HTTP01 challenges. - type: object - properties: - metadata: - description: ObjectMeta overrides for the ingress used to solve HTTP01 challenges. Only the 'labels' and 'annotations' fields may be set. If labels or annotations overlap with in-built values, the values here will override the in-built values. - type: object - properties: - annotations: - description: Annotations that should be added to the created ACME HTTP01 solver ingress. - type: object - additionalProperties: - type: string - labels: - description: Labels that should be added to the created ACME HTTP01 solver ingress. - type: object - additionalProperties: - type: string - name: - description: The name of the ingress resource that should have ACME challenge solving routes inserted into it in order to solve HTTP01 challenges. This is typically used in conjunction with ingress controllers like ingress-gce, which maintains a 1:1 mapping between external IPs and ingress resources. - type: string - podTemplate: - description: Optional pod template used to configure the ACME challenge solver pods used for HTTP01 challenges. - type: object - properties: - metadata: - description: ObjectMeta overrides for the pod used to solve HTTP01 challenges. Only the 'labels' and 'annotations' fields may be set. If labels or annotations overlap with in-built values, the values here will override the in-built values. - type: object - properties: - annotations: - description: Annotations that should be added to the create ACME HTTP01 solver pods. - type: object - additionalProperties: - type: string - labels: - description: Labels that should be added to the created ACME HTTP01 solver pods. - type: object - additionalProperties: - type: string - spec: - description: PodSpec defines overrides for the HTTP01 challenge solver pod. Only the 'priorityClassName', 'nodeSelector', 'affinity', 'serviceAccountName' and 'tolerations' fields are supported currently. All other fields will be ignored. - type: object - properties: - affinity: - description: If specified, the pod's scheduling constraints - type: object - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the pod. - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. - type: array - items: - description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - type: object - required: - - preference - - weight - properties: - preference: - description: A node selector term, associated with the corresponding weight. - type: object - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchFields: - description: A list of node selector requirements by node's fields. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - type: object - required: - - nodeSelectorTerms - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - type: array - items: - description: A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - type: object - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchFields: - description: A list of node selector requirements by node's fields. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - x-kubernetes-map-type: atomic - x-kubernetes-map-type: atomic - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - type: array - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - type: object - required: - - podAffinityTerm - - weight - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - type: array - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - type: array - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - type: object - required: - - podAffinityTerm - - weight - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - type: array - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - nodeSelector: - description: 'NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node''s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' - type: object - additionalProperties: - type: string - priorityClassName: - description: If specified, the pod's priorityClassName. - type: string - serviceAccountName: - description: If specified, the pod's service account - type: string - tolerations: - description: If specified, the pod's tolerations. - type: array - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - type: object - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - type: integer - format: int64 - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - serviceType: - description: Optional service type for Kubernetes solver service. Supported values are NodePort or ClusterIP. If unset, defaults to NodePort. - type: string - selector: - description: Selector selects a set of DNSNames on the Certificate resource that should be solved using this challenge solver. If not specified, the solver will be treated as the 'default' solver with the lowest priority, i.e. if any other solver has a more specific match, it will be used instead. - type: object - properties: - dnsNames: - description: List of DNSNames that this solver will be used to solve. If specified and a match is found, a dnsNames selector will take precedence over a dnsZones selector. If multiple solvers match with the same dnsNames value, the solver with the most matching labels in matchLabels will be selected. If neither has more matches, the solver defined earlier in the list will be selected. - type: array - items: - type: string - dnsZones: - description: List of DNSZones that this solver will be used to solve. The most specific DNS zone match specified here will take precedence over other DNS zone matches, so a solver specifying sys.example.com will be selected over one specifying example.com for the domain www.sys.example.com. If multiple solvers match with the same dnsZones value, the solver with the most matching labels in matchLabels will be selected. If neither has more matches, the solver defined earlier in the list will be selected. - type: array - items: - type: string - matchLabels: - description: A label selector that is used to refine the set of certificate's that this challenge solver will apply to. - type: object - additionalProperties: - type: string - ca: - description: CA configures this issuer to sign certificates using a signing CA keypair stored in a Secret resource. This is used to build internal PKIs that are managed by cert-manager. - type: object - required: - - secretName - properties: - crlDistributionPoints: - description: The CRL distribution points is an X.509 v3 certificate extension which identifies the location of the CRL from which the revocation of this certificate can be checked. If not set, certificates will be issued without distribution points set. - type: array - items: - type: string - ocspServers: - description: The OCSP server list is an X.509 v3 extension that defines a list of URLs of OCSP responders. The OCSP responders can be queried for the revocation status of an issued certificate. If not set, the certificate will be issued with no OCSP servers set. For example, an OCSP server URL could be "http://ocsp.int-x3.letsencrypt.org". - type: array - items: - type: string - secretName: - description: SecretName is the name of the secret used to sign Certificates issued by this Issuer. - type: string - selfSigned: - description: SelfSigned configures this issuer to 'self sign' certificates using the private key used to create the CertificateRequest object. - type: object - properties: - crlDistributionPoints: - description: The CRL distribution points is an X.509 v3 certificate extension which identifies the location of the CRL from which the revocation of this certificate can be checked. If not set certificate will be issued without CDP. Values are strings. - type: array - items: - type: string - vault: - description: Vault configures this issuer to sign certificates using a HashiCorp Vault PKI backend. - type: object - required: - - auth - - path - - server - properties: - auth: - description: Auth configures how cert-manager authenticates with the Vault server. - type: object - properties: - appRole: - description: AppRole authenticates with Vault using the App Role auth mechanism, with the role and secret stored in a Kubernetes Secret resource. - type: object - required: - - path - - roleId - - secretRef - properties: - path: - description: 'Path where the App Role authentication backend is mounted in Vault, e.g: "approle"' - type: string - roleId: - description: RoleID configured in the App Role authentication backend when setting up the authentication backend in Vault. - type: string - secretRef: - description: Reference to a key in a Secret that contains the App Role secret used to authenticate with Vault. The `key` field must be specified and denotes which entry within the Secret resource is used as the app role secret. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - kubernetes: - description: Kubernetes authenticates with Vault by passing the ServiceAccount token stored in the named Secret resource to the Vault server. - type: object - required: - - role - - secretRef - properties: - mountPath: - description: The Vault mountPath here is the mount path to use when authenticating with Vault. For example, setting a value to `/v1/auth/foo`, will use the path `/v1/auth/foo/login` to authenticate with Vault. If unspecified, the default value "/v1/auth/kubernetes" will be used. - type: string - role: - description: A required field containing the Vault Role to assume. A Role binds a Kubernetes ServiceAccount with a set of Vault policies. - type: string - secretRef: - description: The required Secret field containing a Kubernetes ServiceAccount JWT used for authenticating with Vault. Use of 'ambient credentials' is not supported. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - tokenSecretRef: - description: TokenSecretRef authenticates with Vault by presenting a token. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - caBundle: - description: Base64-encoded bundle of PEM CAs which will be used to validate the certificate chain presented by Vault. Only used if using HTTPS to connect to Vault and ignored for HTTP connections. Mutually exclusive with CABundleSecretRef. If neither CABundle nor CABundleSecretRef are defined, the certificate bundle in the cert-manager controller container is used to validate the TLS connection. - type: string - format: byte - caBundleSecretRef: - description: Reference to a Secret containing a bundle of PEM-encoded CAs to use when verifying the certificate chain presented by Vault when using HTTPS. Mutually exclusive with CABundle. If neither CABundle nor CABundleSecretRef are defined, the certificate bundle in the cert-manager controller container is used to validate the TLS connection. If no key for the Secret is specified, cert-manager will default to 'ca.crt'. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Name of the vault namespace. Namespaces is a set of features within Vault Enterprise that allows Vault environments to support Secure Multi-tenancy. e.g: "ns1" More about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces' - type: string - path: - description: 'Path is the mount path of the Vault PKI backend''s `sign` endpoint, e.g: "my_pki_mount/sign/my-role-name".' - type: string - server: - description: 'Server is the connection address for the Vault server, e.g: "https://vault.example.com:8200".' - type: string - venafi: - description: Venafi configures this issuer to sign certificates using a Venafi TPP or Venafi Cloud policy zone. - type: object - required: - - zone - properties: - cloud: - description: Cloud specifies the Venafi cloud configuration settings. Only one of TPP or Cloud may be specified. - type: object - required: - - apiTokenSecretRef - properties: - apiTokenSecretRef: - description: APITokenSecretRef is a secret key selector for the Venafi Cloud API token. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - url: - description: URL is the base URL for Venafi Cloud. Defaults to "https://api.venafi.cloud/v1". - type: string - tpp: - description: TPP specifies Trust Protection Platform configuration settings. Only one of TPP or Cloud may be specified. - type: object - required: - - credentialsRef - - url - properties: - caBundle: - description: Base64-encoded bundle of PEM CAs which will be used to validate the certificate chain presented by the TPP server. Only used if using HTTPS; ignored for HTTP. If undefined, the certificate bundle in the cert-manager controller container is used to validate the chain. - type: string - format: byte - credentialsRef: - description: CredentialsRef is a reference to a Secret containing the username and password for the TPP server. The secret must contain two keys, 'username' and 'password'. - type: object - required: - - name - properties: - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - url: - description: 'URL is the base URL for the vedsdk endpoint of the Venafi TPP instance, for example: "https://tpp.example.com/vedsdk".' - type: string - zone: - description: Zone is the Venafi Policy Zone to use for this issuer. All requests made to the Venafi platform will be restricted by the named zone policy. This field is required. - type: string - status: - description: Status of the ClusterIssuer. This is set and managed automatically. - type: object - properties: - acme: - description: ACME specific status options. This field should only be set if the Issuer is configured to use an ACME server to issue certificates. - type: object - properties: - lastRegisteredEmail: - description: LastRegisteredEmail is the email associated with the latest registered ACME account, in order to track changes made to registered account associated with the Issuer - type: string - uri: - description: URI is the unique account identifier, which can also be used to retrieve account details from the CA - type: string - conditions: - description: List of status conditions to indicate the status of a CertificateRequest. Known condition types are `Ready`. - type: array - items: - description: IssuerCondition contains condition information for an Issuer. - type: object - required: - - status - - type - properties: - lastTransitionTime: - description: LastTransitionTime is the timestamp corresponding to the last status change of this condition. - type: string - format: date-time - message: - description: Message is a human readable description of the details of the last transition, complementing reason. - type: string - observedGeneration: - description: If set, this represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.condition[x].observedGeneration is 9, the condition is out of date with respect to the current state of the Issuer. - type: integer - format: int64 - reason: - description: Reason is a brief machine readable explanation for the condition's last transition. - type: string - status: - description: Status of the condition, one of (`True`, `False`, `Unknown`). - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: Type of the condition, known values are (`Ready`). - type: string - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - served: true - storage: true ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: challenges.acme.cert-manager.io - labels: - app: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/name: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/instance: '{{ .Release.Name }}' - # Generated labels {{- include "labels" . | nindent 4 }} -spec: - group: acme.cert-manager.io - names: - kind: Challenge - listKind: ChallengeList - plural: challenges - singular: challenge - categories: - - cert-manager - - cert-manager-acme - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.state - name: State - type: string - - jsonPath: .spec.dnsName - name: Domain - type: string - - jsonPath: .status.reason - name: Reason - priority: 1 - type: string - - description: CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1 - schema: - openAPIV3Schema: - description: Challenge is a type to represent a Challenge request with an ACME server - type: object - required: - - metadata - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - type: object - required: - - authorizationURL - - dnsName - - issuerRef - - key - - solver - - token - - type - - url - properties: - authorizationURL: - description: The URL to the ACME Authorization resource that this challenge is a part of. - type: string - dnsName: - description: dnsName is the identifier that this challenge is for, e.g. example.com. If the requested DNSName is a 'wildcard', this field MUST be set to the non-wildcard domain, e.g. for `*.example.com`, it must be `example.com`. - type: string - issuerRef: - description: References a properly configured ACME-type Issuer which should be used to create this Challenge. If the Issuer does not exist, processing will be retried. If the Issuer is not an 'ACME' Issuer, an error will be returned and the Challenge will be marked as failed. - type: object - required: - - name - properties: - group: - description: Group of the resource being referred to. - type: string - kind: - description: Kind of the resource being referred to. - type: string - name: - description: Name of the resource being referred to. - type: string - key: - description: 'The ACME challenge key for this challenge For HTTP01 challenges, this is the value that must be responded with to complete the HTTP01 challenge in the format: `.`. For DNS01 challenges, this is the base64 encoded SHA256 sum of the `.` text that must be set as the TXT record content.' - type: string - solver: - description: Contains the domain solving configuration that should be used to solve this challenge resource. - type: object - properties: - dns01: - description: Configures cert-manager to attempt to complete authorizations by performing the DNS01 challenge flow. - type: object - properties: - acmeDNS: - description: Use the 'ACME DNS' (https://github.com/joohoi/acme-dns) API to manage DNS01 challenge records. - type: object - required: - - accountSecretRef - - host - properties: - accountSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - host: - type: string - akamai: - description: Use the Akamai DNS zone management API to manage DNS01 challenge records. - type: object - required: - - accessTokenSecretRef - - clientSecretSecretRef - - clientTokenSecretRef - - serviceConsumerDomain - properties: - accessTokenSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - clientSecretSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - clientTokenSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - serviceConsumerDomain: - type: string - azureDNS: - description: Use the Microsoft Azure DNS API to manage DNS01 challenge records. - type: object - required: - - resourceGroupName - - subscriptionID - properties: - clientID: - description: if both this and ClientSecret are left unset MSI will be used - type: string - clientSecretSecretRef: - description: if both this and ClientID are left unset MSI will be used - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - environment: - description: name of the Azure environment (default AzurePublicCloud) - type: string - enum: - - AzurePublicCloud - - AzureChinaCloud - - AzureGermanCloud - - AzureUSGovernmentCloud - hostedZoneName: - description: name of the DNS zone that should be used - type: string - managedIdentity: - description: managed identity configuration, can not be used at the same time as clientID, clientSecretSecretRef or tenantID - type: object - properties: - clientID: - description: client ID of the managed identity, can not be used at the same time as resourceID - type: string - resourceID: - description: resource ID of the managed identity, can not be used at the same time as clientID - type: string - resourceGroupName: - description: resource group the DNS zone is located in - type: string - subscriptionID: - description: ID of the Azure subscription - type: string - tenantID: - description: when specifying ClientID and ClientSecret then this field is also needed - type: string - cloudDNS: - description: Use the Google Cloud DNS API to manage DNS01 challenge records. - type: object - required: - - project - properties: - hostedZoneName: - description: HostedZoneName is an optional field that tells cert-manager in which Cloud DNS zone the challenge record has to be created. If left empty cert-manager will automatically choose a zone. - type: string - project: - type: string - serviceAccountSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - cloudflare: - description: Use the Cloudflare API to manage DNS01 challenge records. - type: object - properties: - apiKeySecretRef: - description: 'API key to use to authenticate with Cloudflare. Note: using an API token to authenticate is now the recommended method as it allows greater control of permissions.' - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - apiTokenSecretRef: - description: API token used to authenticate with Cloudflare. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - email: - description: Email of the account, only required when using API key based authentication. - type: string - cnameStrategy: - description: CNAMEStrategy configures how the DNS01 provider should handle CNAME records when found in DNS zones. - type: string - enum: - - None - - Follow - digitalocean: - description: Use the DigitalOcean DNS API to manage DNS01 challenge records. - type: object - required: - - tokenSecretRef - properties: - tokenSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - rfc2136: - description: Use RFC2136 ("Dynamic Updates in the Domain Name System") (https://datatracker.ietf.org/doc/rfc2136/) to manage DNS01 challenge records. - type: object - required: - - nameserver - properties: - nameserver: - description: The IP address or hostname of an authoritative DNS server supporting RFC2136 in the form host:port. If the host is an IPv6 address it must be enclosed in square brackets (e.g [2001:db8::1]) ; port is optional. This field is required. - type: string - tsigAlgorithm: - description: 'The TSIG Algorithm configured in the DNS supporting RFC2136. Used only when ``tsigSecretSecretRef`` and ``tsigKeyName`` are defined. Supported values are (case-insensitive): ``HMACMD5`` (default), ``HMACSHA1``, ``HMACSHA256`` or ``HMACSHA512``.' - type: string - tsigKeyName: - description: The TSIG Key name configured in the DNS. If ``tsigSecretSecretRef`` is defined, this field is required. - type: string - tsigSecretSecretRef: - description: The name of the secret containing the TSIG value. If ``tsigKeyName`` is defined, this field is required. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - route53: - description: Use the AWS Route53 API to manage DNS01 challenge records. - type: object - required: - - region - properties: - accessKeyID: - description: 'The AccessKeyID is used for authentication. Cannot be set when SecretAccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' - type: string - accessKeyIDSecretRef: - description: 'The SecretAccessKey is used for authentication. If set, pull the AWS access key ID from a key within a Kubernetes Secret. Cannot be set when AccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - hostedZoneID: - description: If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. - type: string - region: - description: Always set the region when using AccessKeyID and SecretAccessKey - type: string - role: - description: Role is a Role ARN which the Route53 provider will assume using either the explicit credentials AccessKeyID/SecretAccessKey or the inferred credentials from environment variables, shared credentials file or AWS Instance metadata - type: string - secretAccessKeySecretRef: - description: 'The SecretAccessKey is used for authentication. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - webhook: - description: Configure an external webhook based DNS01 challenge solver to manage DNS01 challenge records. - type: object - required: - - groupName - - solverName - properties: - config: - description: Additional configuration that should be passed to the webhook apiserver when challenges are processed. This can contain arbitrary JSON data. Secret values should not be specified in this stanza. If secret values are needed (e.g. credentials for a DNS service), you should use a SecretKeySelector to reference a Secret resource. For details on the schema of this field, consult the webhook provider implementation's documentation. - x-kubernetes-preserve-unknown-fields: true - groupName: - description: The API group name that should be used when POSTing ChallengePayload resources to the webhook apiserver. This should be the same as the GroupName specified in the webhook provider implementation. - type: string - solverName: - description: The name of the solver to use, as defined in the webhook provider implementation. This will typically be the name of the provider, e.g. 'cloudflare'. - type: string - http01: - description: Configures cert-manager to attempt to complete authorizations by performing the HTTP01 challenge flow. It is not possible to obtain certificates for wildcard domain names (e.g. `*.example.com`) using the HTTP01 challenge mechanism. - type: object - properties: - gatewayHTTPRoute: - description: The Gateway API is a sig-network community API that models service networking in Kubernetes (https://gateway-api.sigs.k8s.io/). The Gateway solver will create HTTPRoutes with the specified labels in the same namespace as the challenge. This solver is experimental, and fields / behaviour may change in the future. - type: object - properties: - labels: - description: Custom labels that will be applied to HTTPRoutes created by cert-manager while solving HTTP-01 challenges. - type: object - additionalProperties: - type: string - parentRefs: - description: 'When solving an HTTP-01 challenge, cert-manager creates an HTTPRoute. cert-manager needs to know which parentRefs should be used when creating the HTTPRoute. Usually, the parentRef references a Gateway. See: https://gateway-api.sigs.k8s.io/api-types/httproute/#attaching-to-gateways' - type: array - items: - description: "ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually a route). The only kind of parent resource with \"Core\" support is Gateway. This API may be extended in the future to support additional kinds of parent resources, such as HTTPRoute. \n The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid." - type: object - required: - - name - properties: - group: - description: "Group is the group of the referent. When unspecified, \"gateway.networking.k8s.io\" is inferred. To set the core API group (such as for a \"Service\" kind referent), Group must be explicitly set to \"\" (empty string). \n Support: Core" - type: string - default: gateway.networking.k8s.io - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - kind: - description: "Kind is kind of the referent. \n Support: Core (Gateway) \n Support: Implementation-specific (Other Resources)" - type: string - default: Gateway - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - name: - description: "Name is the name of the referent. \n Support: Core" - type: string - maxLength: 253 - minLength: 1 - namespace: - description: "Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route. \n Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. \n Support: Core" - type: string - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - port: - description: "Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource. \n When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. \n Support: Extended \n " - type: integer - format: int32 - maximum: 65535 - minimum: 1 - sectionName: - description: "SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following: \n * Gateway: Listener Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. \n Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted. \n When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. \n Support: Core" - type: string - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - serviceType: - description: Optional service type for Kubernetes solver service. Supported values are NodePort or ClusterIP. If unset, defaults to NodePort. - type: string - ingress: - description: The ingress based HTTP01 challenge solver will solve challenges by creating or modifying Ingress resources in order to route requests for '/.well-known/acme-challenge/XYZ' to 'challenge solver' pods that are provisioned by cert-manager for each Challenge to be completed. - type: object - properties: - class: - description: The ingress class to use when creating Ingress resources to solve ACME challenges that use this challenge solver. Only one of 'class' or 'name' may be specified. - type: string - ingressTemplate: - description: Optional ingress template used to configure the ACME challenge solver ingress used for HTTP01 challenges. - type: object - properties: - metadata: - description: ObjectMeta overrides for the ingress used to solve HTTP01 challenges. Only the 'labels' and 'annotations' fields may be set. If labels or annotations overlap with in-built values, the values here will override the in-built values. - type: object - properties: - annotations: - description: Annotations that should be added to the created ACME HTTP01 solver ingress. - type: object - additionalProperties: - type: string - labels: - description: Labels that should be added to the created ACME HTTP01 solver ingress. - type: object - additionalProperties: - type: string - name: - description: The name of the ingress resource that should have ACME challenge solving routes inserted into it in order to solve HTTP01 challenges. This is typically used in conjunction with ingress controllers like ingress-gce, which maintains a 1:1 mapping between external IPs and ingress resources. - type: string - podTemplate: - description: Optional pod template used to configure the ACME challenge solver pods used for HTTP01 challenges. - type: object - properties: - metadata: - description: ObjectMeta overrides for the pod used to solve HTTP01 challenges. Only the 'labels' and 'annotations' fields may be set. If labels or annotations overlap with in-built values, the values here will override the in-built values. - type: object - properties: - annotations: - description: Annotations that should be added to the create ACME HTTP01 solver pods. - type: object - additionalProperties: - type: string - labels: - description: Labels that should be added to the created ACME HTTP01 solver pods. - type: object - additionalProperties: - type: string - spec: - description: PodSpec defines overrides for the HTTP01 challenge solver pod. Only the 'priorityClassName', 'nodeSelector', 'affinity', 'serviceAccountName' and 'tolerations' fields are supported currently. All other fields will be ignored. - type: object - properties: - affinity: - description: If specified, the pod's scheduling constraints - type: object - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the pod. - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. - type: array - items: - description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - type: object - required: - - preference - - weight - properties: - preference: - description: A node selector term, associated with the corresponding weight. - type: object - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchFields: - description: A list of node selector requirements by node's fields. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - type: object - required: - - nodeSelectorTerms - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - type: array - items: - description: A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - type: object - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchFields: - description: A list of node selector requirements by node's fields. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - x-kubernetes-map-type: atomic - x-kubernetes-map-type: atomic - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - type: array - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - type: object - required: - - podAffinityTerm - - weight - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - type: array - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - type: array - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - type: object - required: - - podAffinityTerm - - weight - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - type: array - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - nodeSelector: - description: 'NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node''s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' - type: object - additionalProperties: - type: string - priorityClassName: - description: If specified, the pod's priorityClassName. - type: string - serviceAccountName: - description: If specified, the pod's service account - type: string - tolerations: - description: If specified, the pod's tolerations. - type: array - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - type: object - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - type: integer - format: int64 - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - serviceType: - description: Optional service type for Kubernetes solver service. Supported values are NodePort or ClusterIP. If unset, defaults to NodePort. - type: string - selector: - description: Selector selects a set of DNSNames on the Certificate resource that should be solved using this challenge solver. If not specified, the solver will be treated as the 'default' solver with the lowest priority, i.e. if any other solver has a more specific match, it will be used instead. - type: object - properties: - dnsNames: - description: List of DNSNames that this solver will be used to solve. If specified and a match is found, a dnsNames selector will take precedence over a dnsZones selector. If multiple solvers match with the same dnsNames value, the solver with the most matching labels in matchLabels will be selected. If neither has more matches, the solver defined earlier in the list will be selected. - type: array - items: - type: string - dnsZones: - description: List of DNSZones that this solver will be used to solve. The most specific DNS zone match specified here will take precedence over other DNS zone matches, so a solver specifying sys.example.com will be selected over one specifying example.com for the domain www.sys.example.com. If multiple solvers match with the same dnsZones value, the solver with the most matching labels in matchLabels will be selected. If neither has more matches, the solver defined earlier in the list will be selected. - type: array - items: - type: string - matchLabels: - description: A label selector that is used to refine the set of certificate's that this challenge solver will apply to. - type: object - additionalProperties: - type: string - token: - description: The ACME challenge token for this challenge. This is the raw value returned from the ACME server. - type: string - type: - description: The type of ACME challenge this resource represents. One of "HTTP-01" or "DNS-01". - type: string - enum: - - HTTP-01 - - DNS-01 - url: - description: The URL of the ACME Challenge resource for this challenge. This can be used to lookup details about the status of this challenge. - type: string - wildcard: - description: wildcard will be true if this challenge is for a wildcard identifier, for example '*.example.com'. - type: boolean - status: - type: object - properties: - presented: - description: presented will be set to true if the challenge values for this challenge are currently 'presented'. This *does not* imply the self check is passing. Only that the values have been 'submitted' for the appropriate challenge mechanism (i.e. the DNS01 TXT record has been presented, or the HTTP01 configuration has been configured). - type: boolean - processing: - description: Used to denote whether this challenge should be processed or not. This field will only be set to true by the 'scheduling' component. It will only be set to false by the 'challenges' controller, after the challenge has reached a final state or timed out. If this field is set to false, the challenge controller will not take any more action. - type: boolean - reason: - description: Contains human readable information on why the Challenge is in the current state. - type: string - state: - description: Contains the current 'state' of the challenge. If not set, the state of the challenge is unknown. - type: string - enum: - - valid - - ready - - pending - - processing - - invalid - - expired - - errored - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: certificaterequests.cert-manager.io - labels: - app: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/name: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/instance: '{{ .Release.Name }}' - # Generated labels {{- include "labels" . | nindent 4 }} -spec: - group: cert-manager.io - names: - kind: CertificateRequest - listKind: CertificateRequestList - plural: certificaterequests - shortNames: - - cr - - crs - singular: certificaterequest - categories: - - cert-manager - scope: Namespaced - versions: - - name: v1 - subresources: - status: {} - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=="Approved")].status - name: Approved - type: string - - jsonPath: .status.conditions[?(@.type=="Denied")].status - name: Denied - type: string - - jsonPath: .status.conditions[?(@.type=="Ready")].status - name: Ready - type: string - - jsonPath: .spec.issuerRef.name - name: Issuer - type: string - - jsonPath: .spec.username - name: Requestor - type: string - - jsonPath: .status.conditions[?(@.type=="Ready")].message - name: Status - priority: 1 - type: string - - jsonPath: .metadata.creationTimestamp - description: CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - name: Age - type: date - schema: - openAPIV3Schema: - description: "A CertificateRequest is used to request a signed certificate from one of the configured issuers. \n All fields within the CertificateRequest's `spec` are immutable after creation. A CertificateRequest will either succeed or fail, as denoted by its `status.state` field. \n A CertificateRequest is a one-shot resource, meaning it represents a single point in time request for a certificate and cannot be re-used." - type: object - required: - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Desired state of the CertificateRequest resource. - type: object - required: - - issuerRef - - request - properties: - duration: - description: The requested 'duration' (i.e. lifetime) of the Certificate. This option may be ignored/overridden by some issuer types. - type: string - extra: - description: Extra contains extra attributes of the user that created the CertificateRequest. Populated by the cert-manager webhook on creation and immutable. - type: object - additionalProperties: - type: array - items: - type: string - groups: - description: Groups contains group membership of the user that created the CertificateRequest. Populated by the cert-manager webhook on creation and immutable. - type: array - items: - type: string - x-kubernetes-list-type: atomic - isCA: - description: IsCA will request to mark the certificate as valid for certificate signing when submitting to the issuer. This will automatically add the `cert sign` usage to the list of `usages`. - type: boolean - issuerRef: - description: IssuerRef is a reference to the issuer for this CertificateRequest. If the `kind` field is not set, or set to `Issuer`, an Issuer resource with the given name in the same namespace as the CertificateRequest will be used. If the `kind` field is set to `ClusterIssuer`, a ClusterIssuer with the provided name will be used. The `name` field in this stanza is required at all times. The group field refers to the API group of the issuer which defaults to `cert-manager.io` if empty. - type: object - required: - - name - properties: - group: - description: Group of the resource being referred to. - type: string - kind: - description: Kind of the resource being referred to. - type: string - name: - description: Name of the resource being referred to. - type: string - request: - description: The PEM-encoded x509 certificate signing request to be submitted to the CA for signing. - type: string - format: byte - uid: - description: UID contains the uid of the user that created the CertificateRequest. Populated by the cert-manager webhook on creation and immutable. - type: string - usages: - description: Usages is the set of x509 usages that are requested for the certificate. If usages are set they SHOULD be encoded inside the CSR spec Defaults to `digital signature` and `key encipherment` if not specified. - type: array - items: - description: "KeyUsage specifies valid usage contexts for keys. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 https://tools.ietf.org/html/rfc5280#section-4.2.1.12 \n Valid KeyUsage values are as follows: \"signing\", \"digital signature\", \"content commitment\", \"key encipherment\", \"key agreement\", \"data encipherment\", \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\", \"server auth\", \"client auth\", \"code signing\", \"email protection\", \"s/mime\", \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\", \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\"" - type: string - enum: - - signing - - digital signature - - content commitment - - key encipherment - - key agreement - - data encipherment - - cert sign - - crl sign - - encipher only - - decipher only - - any - - server auth - - client auth - - code signing - - email protection - - s/mime - - ipsec end system - - ipsec tunnel - - ipsec user - - timestamping - - ocsp signing - - microsoft sgc - - netscape sgc - username: - description: Username contains the name of the user that created the CertificateRequest. Populated by the cert-manager webhook on creation and immutable. - type: string - status: - description: Status of the CertificateRequest. This is set and managed automatically. - type: object - properties: - ca: - description: The PEM encoded x509 certificate of the signer, also known as the CA (Certificate Authority). This is set on a best-effort basis by different issuers. If not set, the CA is assumed to be unknown/not available. - type: string - format: byte - certificate: - description: The PEM encoded x509 certificate resulting from the certificate signing request. If not set, the CertificateRequest has either not been completed or has failed. More information on failure can be found by checking the `conditions` field. - type: string - format: byte - conditions: - description: List of status conditions to indicate the status of a CertificateRequest. Known condition types are `Ready` and `InvalidRequest`. - type: array - items: - description: CertificateRequestCondition contains condition information for a CertificateRequest. - type: object - required: - - status - - type - properties: - lastTransitionTime: - description: LastTransitionTime is the timestamp corresponding to the last status change of this condition. - type: string - format: date-time - message: - description: Message is a human readable description of the details of the last transition, complementing reason. - type: string - reason: - description: Reason is a brief machine readable explanation for the condition's last transition. - type: string - status: - description: Status of the condition, one of (`True`, `False`, `Unknown`). - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: Type of the condition, known values are (`Ready`, `InvalidRequest`, `Approved`, `Denied`). - type: string - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - failureTime: - description: FailureTime stores the time that this CertificateRequest failed. This is used to influence garbage collection and back-off. - type: string - format: date-time - served: true - storage: true ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: issuers.cert-manager.io - labels: - app: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/name: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/instance: '{{ .Release.Name }}' - # Generated labels {{- include "labels" . | nindent 4 }} -spec: - group: cert-manager.io - names: - kind: Issuer - listKind: IssuerList - plural: issuers - singular: issuer - categories: - - cert-manager - scope: Namespaced - versions: - - name: v1 - subresources: - status: {} - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=="Ready")].status - name: Ready - type: string - - jsonPath: .status.conditions[?(@.type=="Ready")].message - name: Status - priority: 1 - type: string - - jsonPath: .metadata.creationTimestamp - description: CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - name: Age - type: date - schema: - openAPIV3Schema: - description: An Issuer represents a certificate issuing authority which can be referenced as part of `issuerRef` fields. It is scoped to a single namespace and can therefore only be referenced by resources within the same namespace. - type: object - required: - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Desired state of the Issuer resource. - type: object - properties: - acme: - description: ACME configures this issuer to communicate with a RFC8555 (ACME) server to obtain signed x509 certificates. - type: object - required: - - privateKeySecretRef - - server - properties: - caBundle: - description: Base64-encoded bundle of PEM CAs which can be used to validate the certificate chain presented by the ACME server. Mutually exclusive with SkipTLSVerify; prefer using CABundle to prevent various kinds of security vulnerabilities. If CABundle and SkipTLSVerify are unset, the system certificate bundle inside the container is used to validate the TLS connection. - type: string - format: byte - disableAccountKeyGeneration: - description: Enables or disables generating a new ACME account key. If true, the Issuer resource will *not* request a new account but will expect the account key to be supplied via an existing secret. If false, the cert-manager system will generate a new ACME account key for the Issuer. Defaults to false. - type: boolean - email: - description: Email is the email address to be associated with the ACME account. This field is optional, but it is strongly recommended to be set. It will be used to contact you in case of issues with your account or certificates, including expiry notification emails. This field may be updated after the account is initially registered. - type: string - enableDurationFeature: - description: Enables requesting a Not After date on certificates that matches the duration of the certificate. This is not supported by all ACME servers like Let's Encrypt. If set to true when the ACME server does not support it it will create an error on the Order. Defaults to false. - type: boolean - externalAccountBinding: - description: ExternalAccountBinding is a reference to a CA external account of the ACME server. If set, upon registration cert-manager will attempt to associate the given external account credentials with the registered ACME account. - type: object - required: - - keyID - - keySecretRef - properties: - keyAlgorithm: - description: 'Deprecated: keyAlgorithm field exists for historical compatibility reasons and should not be used. The algorithm is now hardcoded to HS256 in golang/x/crypto/acme.' - type: string - enum: - - HS256 - - HS384 - - HS512 - keyID: - description: keyID is the ID of the CA key that the External Account is bound to. - type: string - keySecretRef: - description: keySecretRef is a Secret Key Selector referencing a data item in a Kubernetes Secret which holds the symmetric MAC key of the External Account Binding. The `key` is the index string that is paired with the key data in the Secret and should not be confused with the key data itself, or indeed with the External Account Binding keyID above. The secret key stored in the Secret **must** be un-padded, base64 URL encoded data. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - preferredChain: - description: 'PreferredChain is the chain to use if the ACME server outputs multiple. PreferredChain is no guarantee that this one gets delivered by the ACME endpoint. For example, for Let''s Encrypt''s DST crosssign you would use: "DST Root CA X3" or "ISRG Root X1" for the newer Let''s Encrypt root CA. This value picks the first certificate bundle in the ACME alternative chains that has a certificate with this value as its issuer''s CN' - type: string - maxLength: 64 - privateKeySecretRef: - description: PrivateKey is the name of a Kubernetes Secret resource that will be used to store the automatically generated ACME account private key. Optionally, a `key` may be specified to select a specific entry within the named Secret resource. If `key` is not specified, a default of `tls.key` will be used. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - server: - description: 'Server is the URL used to access the ACME server''s ''directory'' endpoint. For example, for Let''s Encrypt''s staging endpoint, you would use: "https://acme-staging-v02.api.letsencrypt.org/directory". Only ACME v2 endpoints (i.e. RFC 8555) are supported.' - type: string - skipTLSVerify: - description: 'INSECURE: Enables or disables validation of the ACME server TLS certificate. If true, requests to the ACME server will not have the TLS certificate chain validated. Mutually exclusive with CABundle; prefer using CABundle to prevent various kinds of security vulnerabilities. Only enable this option in development environments. If CABundle and SkipTLSVerify are unset, the system certificate bundle inside the container is used to validate the TLS connection. Defaults to false.' - type: boolean - solvers: - description: 'Solvers is a list of challenge solvers that will be used to solve ACME challenges for the matching domains. Solver configurations must be provided in order to obtain certificates from an ACME server. For more information, see: https://cert-manager.io/docs/configuration/acme/' - type: array - items: - description: An ACMEChallengeSolver describes how to solve ACME challenges for the issuer it is part of. A selector may be provided to use different solving strategies for different DNS names. Only one of HTTP01 or DNS01 must be provided. - type: object - properties: - dns01: - description: Configures cert-manager to attempt to complete authorizations by performing the DNS01 challenge flow. - type: object - properties: - acmeDNS: - description: Use the 'ACME DNS' (https://github.com/joohoi/acme-dns) API to manage DNS01 challenge records. - type: object - required: - - accountSecretRef - - host - properties: - accountSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - host: - type: string - akamai: - description: Use the Akamai DNS zone management API to manage DNS01 challenge records. - type: object - required: - - accessTokenSecretRef - - clientSecretSecretRef - - clientTokenSecretRef - - serviceConsumerDomain - properties: - accessTokenSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - clientSecretSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - clientTokenSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - serviceConsumerDomain: - type: string - azureDNS: - description: Use the Microsoft Azure DNS API to manage DNS01 challenge records. - type: object - required: - - resourceGroupName - - subscriptionID - properties: - clientID: - description: if both this and ClientSecret are left unset MSI will be used - type: string - clientSecretSecretRef: - description: if both this and ClientID are left unset MSI will be used - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - environment: - description: name of the Azure environment (default AzurePublicCloud) - type: string - enum: - - AzurePublicCloud - - AzureChinaCloud - - AzureGermanCloud - - AzureUSGovernmentCloud - hostedZoneName: - description: name of the DNS zone that should be used - type: string - managedIdentity: - description: managed identity configuration, can not be used at the same time as clientID, clientSecretSecretRef or tenantID - type: object - properties: - clientID: - description: client ID of the managed identity, can not be used at the same time as resourceID - type: string - resourceID: - description: resource ID of the managed identity, can not be used at the same time as clientID - type: string - resourceGroupName: - description: resource group the DNS zone is located in - type: string - subscriptionID: - description: ID of the Azure subscription - type: string - tenantID: - description: when specifying ClientID and ClientSecret then this field is also needed - type: string - cloudDNS: - description: Use the Google Cloud DNS API to manage DNS01 challenge records. - type: object - required: - - project - properties: - hostedZoneName: - description: HostedZoneName is an optional field that tells cert-manager in which Cloud DNS zone the challenge record has to be created. If left empty cert-manager will automatically choose a zone. - type: string - project: - type: string - serviceAccountSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - cloudflare: - description: Use the Cloudflare API to manage DNS01 challenge records. - type: object - properties: - apiKeySecretRef: - description: 'API key to use to authenticate with Cloudflare. Note: using an API token to authenticate is now the recommended method as it allows greater control of permissions.' - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - apiTokenSecretRef: - description: API token used to authenticate with Cloudflare. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - email: - description: Email of the account, only required when using API key based authentication. - type: string - cnameStrategy: - description: CNAMEStrategy configures how the DNS01 provider should handle CNAME records when found in DNS zones. - type: string - enum: - - None - - Follow - digitalocean: - description: Use the DigitalOcean DNS API to manage DNS01 challenge records. - type: object - required: - - tokenSecretRef - properties: - tokenSecretRef: - description: A reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - rfc2136: - description: Use RFC2136 ("Dynamic Updates in the Domain Name System") (https://datatracker.ietf.org/doc/rfc2136/) to manage DNS01 challenge records. - type: object - required: - - nameserver - properties: - nameserver: - description: The IP address or hostname of an authoritative DNS server supporting RFC2136 in the form host:port. If the host is an IPv6 address it must be enclosed in square brackets (e.g [2001:db8::1]) ; port is optional. This field is required. - type: string - tsigAlgorithm: - description: 'The TSIG Algorithm configured in the DNS supporting RFC2136. Used only when ``tsigSecretSecretRef`` and ``tsigKeyName`` are defined. Supported values are (case-insensitive): ``HMACMD5`` (default), ``HMACSHA1``, ``HMACSHA256`` or ``HMACSHA512``.' - type: string - tsigKeyName: - description: The TSIG Key name configured in the DNS. If ``tsigSecretSecretRef`` is defined, this field is required. - type: string - tsigSecretSecretRef: - description: The name of the secret containing the TSIG value. If ``tsigKeyName`` is defined, this field is required. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - route53: - description: Use the AWS Route53 API to manage DNS01 challenge records. - type: object - required: - - region - properties: - accessKeyID: - description: 'The AccessKeyID is used for authentication. Cannot be set when SecretAccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' - type: string - accessKeyIDSecretRef: - description: 'The SecretAccessKey is used for authentication. If set, pull the AWS access key ID from a key within a Kubernetes Secret. Cannot be set when AccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - hostedZoneID: - description: If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. - type: string - region: - description: Always set the region when using AccessKeyID and SecretAccessKey - type: string - role: - description: Role is a Role ARN which the Route53 provider will assume using either the explicit credentials AccessKeyID/SecretAccessKey or the inferred credentials from environment variables, shared credentials file or AWS Instance metadata - type: string - secretAccessKeySecretRef: - description: 'The SecretAccessKey is used for authentication. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - webhook: - description: Configure an external webhook based DNS01 challenge solver to manage DNS01 challenge records. - type: object - required: - - groupName - - solverName - properties: - config: - description: Additional configuration that should be passed to the webhook apiserver when challenges are processed. This can contain arbitrary JSON data. Secret values should not be specified in this stanza. If secret values are needed (e.g. credentials for a DNS service), you should use a SecretKeySelector to reference a Secret resource. For details on the schema of this field, consult the webhook provider implementation's documentation. - x-kubernetes-preserve-unknown-fields: true - groupName: - description: The API group name that should be used when POSTing ChallengePayload resources to the webhook apiserver. This should be the same as the GroupName specified in the webhook provider implementation. - type: string - solverName: - description: The name of the solver to use, as defined in the webhook provider implementation. This will typically be the name of the provider, e.g. 'cloudflare'. - type: string - http01: - description: Configures cert-manager to attempt to complete authorizations by performing the HTTP01 challenge flow. It is not possible to obtain certificates for wildcard domain names (e.g. `*.example.com`) using the HTTP01 challenge mechanism. - type: object - properties: - gatewayHTTPRoute: - description: The Gateway API is a sig-network community API that models service networking in Kubernetes (https://gateway-api.sigs.k8s.io/). The Gateway solver will create HTTPRoutes with the specified labels in the same namespace as the challenge. This solver is experimental, and fields / behaviour may change in the future. - type: object - properties: - labels: - description: Custom labels that will be applied to HTTPRoutes created by cert-manager while solving HTTP-01 challenges. - type: object - additionalProperties: - type: string - parentRefs: - description: 'When solving an HTTP-01 challenge, cert-manager creates an HTTPRoute. cert-manager needs to know which parentRefs should be used when creating the HTTPRoute. Usually, the parentRef references a Gateway. See: https://gateway-api.sigs.k8s.io/api-types/httproute/#attaching-to-gateways' - type: array - items: - description: "ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually a route). The only kind of parent resource with \"Core\" support is Gateway. This API may be extended in the future to support additional kinds of parent resources, such as HTTPRoute. \n The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid." - type: object - required: - - name - properties: - group: - description: "Group is the group of the referent. When unspecified, \"gateway.networking.k8s.io\" is inferred. To set the core API group (such as for a \"Service\" kind referent), Group must be explicitly set to \"\" (empty string). \n Support: Core" - type: string - default: gateway.networking.k8s.io - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - kind: - description: "Kind is kind of the referent. \n Support: Core (Gateway) \n Support: Implementation-specific (Other Resources)" - type: string - default: Gateway - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - name: - description: "Name is the name of the referent. \n Support: Core" - type: string - maxLength: 253 - minLength: 1 - namespace: - description: "Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route. \n Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. \n Support: Core" - type: string - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - port: - description: "Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource. \n When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. \n Support: Extended \n " - type: integer - format: int32 - maximum: 65535 - minimum: 1 - sectionName: - description: "SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following: \n * Gateway: Listener Name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. \n Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted. \n When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. \n Support: Core" - type: string - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - serviceType: - description: Optional service type for Kubernetes solver service. Supported values are NodePort or ClusterIP. If unset, defaults to NodePort. - type: string - ingress: - description: The ingress based HTTP01 challenge solver will solve challenges by creating or modifying Ingress resources in order to route requests for '/.well-known/acme-challenge/XYZ' to 'challenge solver' pods that are provisioned by cert-manager for each Challenge to be completed. - type: object - properties: - class: - description: The ingress class to use when creating Ingress resources to solve ACME challenges that use this challenge solver. Only one of 'class' or 'name' may be specified. - type: string - ingressTemplate: - description: Optional ingress template used to configure the ACME challenge solver ingress used for HTTP01 challenges. - type: object - properties: - metadata: - description: ObjectMeta overrides for the ingress used to solve HTTP01 challenges. Only the 'labels' and 'annotations' fields may be set. If labels or annotations overlap with in-built values, the values here will override the in-built values. - type: object - properties: - annotations: - description: Annotations that should be added to the created ACME HTTP01 solver ingress. - type: object - additionalProperties: - type: string - labels: - description: Labels that should be added to the created ACME HTTP01 solver ingress. - type: object - additionalProperties: - type: string - name: - description: The name of the ingress resource that should have ACME challenge solving routes inserted into it in order to solve HTTP01 challenges. This is typically used in conjunction with ingress controllers like ingress-gce, which maintains a 1:1 mapping between external IPs and ingress resources. - type: string - podTemplate: - description: Optional pod template used to configure the ACME challenge solver pods used for HTTP01 challenges. - type: object - properties: - metadata: - description: ObjectMeta overrides for the pod used to solve HTTP01 challenges. Only the 'labels' and 'annotations' fields may be set. If labels or annotations overlap with in-built values, the values here will override the in-built values. - type: object - properties: - annotations: - description: Annotations that should be added to the create ACME HTTP01 solver pods. - type: object - additionalProperties: - type: string - labels: - description: Labels that should be added to the created ACME HTTP01 solver pods. - type: object - additionalProperties: - type: string - spec: - description: PodSpec defines overrides for the HTTP01 challenge solver pod. Only the 'priorityClassName', 'nodeSelector', 'affinity', 'serviceAccountName' and 'tolerations' fields are supported currently. All other fields will be ignored. - type: object - properties: - affinity: - description: If specified, the pod's scheduling constraints - type: object - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the pod. - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. - type: array - items: - description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - type: object - required: - - preference - - weight - properties: - preference: - description: A node selector term, associated with the corresponding weight. - type: object - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchFields: - description: A list of node selector requirements by node's fields. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - type: object - required: - - nodeSelectorTerms - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - type: array - items: - description: A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - type: object - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchFields: - description: A list of node selector requirements by node's fields. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. - type: array - items: - type: string - x-kubernetes-map-type: atomic - x-kubernetes-map-type: atomic - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - type: array - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - type: object - required: - - podAffinityTerm - - weight - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - type: array - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - type: array - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - type: object - required: - - podAffinityTerm - - weight - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. - type: array - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - type: array - items: - type: string - matchLabels: - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". - type: array - items: - type: string - topologyKey: - description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. - type: string - nodeSelector: - description: 'NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node''s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' - type: object - additionalProperties: - type: string - priorityClassName: - description: If specified, the pod's priorityClassName. - type: string - serviceAccountName: - description: If specified, the pod's service account - type: string - tolerations: - description: If specified, the pod's tolerations. - type: array - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - type: object - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - type: integer - format: int64 - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - serviceType: - description: Optional service type for Kubernetes solver service. Supported values are NodePort or ClusterIP. If unset, defaults to NodePort. - type: string - selector: - description: Selector selects a set of DNSNames on the Certificate resource that should be solved using this challenge solver. If not specified, the solver will be treated as the 'default' solver with the lowest priority, i.e. if any other solver has a more specific match, it will be used instead. - type: object - properties: - dnsNames: - description: List of DNSNames that this solver will be used to solve. If specified and a match is found, a dnsNames selector will take precedence over a dnsZones selector. If multiple solvers match with the same dnsNames value, the solver with the most matching labels in matchLabels will be selected. If neither has more matches, the solver defined earlier in the list will be selected. - type: array - items: - type: string - dnsZones: - description: List of DNSZones that this solver will be used to solve. The most specific DNS zone match specified here will take precedence over other DNS zone matches, so a solver specifying sys.example.com will be selected over one specifying example.com for the domain www.sys.example.com. If multiple solvers match with the same dnsZones value, the solver with the most matching labels in matchLabels will be selected. If neither has more matches, the solver defined earlier in the list will be selected. - type: array - items: - type: string - matchLabels: - description: A label selector that is used to refine the set of certificate's that this challenge solver will apply to. - type: object - additionalProperties: - type: string - ca: - description: CA configures this issuer to sign certificates using a signing CA keypair stored in a Secret resource. This is used to build internal PKIs that are managed by cert-manager. - type: object - required: - - secretName - properties: - crlDistributionPoints: - description: The CRL distribution points is an X.509 v3 certificate extension which identifies the location of the CRL from which the revocation of this certificate can be checked. If not set, certificates will be issued without distribution points set. - type: array - items: - type: string - ocspServers: - description: The OCSP server list is an X.509 v3 extension that defines a list of URLs of OCSP responders. The OCSP responders can be queried for the revocation status of an issued certificate. If not set, the certificate will be issued with no OCSP servers set. For example, an OCSP server URL could be "http://ocsp.int-x3.letsencrypt.org". - type: array - items: - type: string - secretName: - description: SecretName is the name of the secret used to sign Certificates issued by this Issuer. - type: string - selfSigned: - description: SelfSigned configures this issuer to 'self sign' certificates using the private key used to create the CertificateRequest object. - type: object - properties: - crlDistributionPoints: - description: The CRL distribution points is an X.509 v3 certificate extension which identifies the location of the CRL from which the revocation of this certificate can be checked. If not set certificate will be issued without CDP. Values are strings. - type: array - items: - type: string - vault: - description: Vault configures this issuer to sign certificates using a HashiCorp Vault PKI backend. - type: object - required: - - auth - - path - - server - properties: - auth: - description: Auth configures how cert-manager authenticates with the Vault server. - type: object - properties: - appRole: - description: AppRole authenticates with Vault using the App Role auth mechanism, with the role and secret stored in a Kubernetes Secret resource. - type: object - required: - - path - - roleId - - secretRef - properties: - path: - description: 'Path where the App Role authentication backend is mounted in Vault, e.g: "approle"' - type: string - roleId: - description: RoleID configured in the App Role authentication backend when setting up the authentication backend in Vault. - type: string - secretRef: - description: Reference to a key in a Secret that contains the App Role secret used to authenticate with Vault. The `key` field must be specified and denotes which entry within the Secret resource is used as the app role secret. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - kubernetes: - description: Kubernetes authenticates with Vault by passing the ServiceAccount token stored in the named Secret resource to the Vault server. - type: object - required: - - role - - secretRef - properties: - mountPath: - description: The Vault mountPath here is the mount path to use when authenticating with Vault. For example, setting a value to `/v1/auth/foo`, will use the path `/v1/auth/foo/login` to authenticate with Vault. If unspecified, the default value "/v1/auth/kubernetes" will be used. - type: string - role: - description: A required field containing the Vault Role to assume. A Role binds a Kubernetes ServiceAccount with a set of Vault policies. - type: string - secretRef: - description: The required Secret field containing a Kubernetes ServiceAccount JWT used for authenticating with Vault. Use of 'ambient credentials' is not supported. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - tokenSecretRef: - description: TokenSecretRef authenticates with Vault by presenting a token. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - caBundle: - description: Base64-encoded bundle of PEM CAs which will be used to validate the certificate chain presented by Vault. Only used if using HTTPS to connect to Vault and ignored for HTTP connections. Mutually exclusive with CABundleSecretRef. If neither CABundle nor CABundleSecretRef are defined, the certificate bundle in the cert-manager controller container is used to validate the TLS connection. - type: string - format: byte - caBundleSecretRef: - description: Reference to a Secret containing a bundle of PEM-encoded CAs to use when verifying the certificate chain presented by Vault when using HTTPS. Mutually exclusive with CABundle. If neither CABundle nor CABundleSecretRef are defined, the certificate bundle in the cert-manager controller container is used to validate the TLS connection. If no key for the Secret is specified, cert-manager will default to 'ca.crt'. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Name of the vault namespace. Namespaces is a set of features within Vault Enterprise that allows Vault environments to support Secure Multi-tenancy. e.g: "ns1" More about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces' - type: string - path: - description: 'Path is the mount path of the Vault PKI backend''s `sign` endpoint, e.g: "my_pki_mount/sign/my-role-name".' - type: string - server: - description: 'Server is the connection address for the Vault server, e.g: "https://vault.example.com:8200".' - type: string - venafi: - description: Venafi configures this issuer to sign certificates using a Venafi TPP or Venafi Cloud policy zone. - type: object - required: - - zone - properties: - cloud: - description: Cloud specifies the Venafi cloud configuration settings. Only one of TPP or Cloud may be specified. - type: object - required: - - apiTokenSecretRef - properties: - apiTokenSecretRef: - description: APITokenSecretRef is a secret key selector for the Venafi Cloud API token. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - url: - description: URL is the base URL for Venafi Cloud. Defaults to "https://api.venafi.cloud/v1". - type: string - tpp: - description: TPP specifies Trust Protection Platform configuration settings. Only one of TPP or Cloud may be specified. - type: object - required: - - credentialsRef - - url - properties: - caBundle: - description: Base64-encoded bundle of PEM CAs which will be used to validate the certificate chain presented by the TPP server. Only used if using HTTPS; ignored for HTTP. If undefined, the certificate bundle in the cert-manager controller container is used to validate the chain. - type: string - format: byte - credentialsRef: - description: CredentialsRef is a reference to a Secret containing the username and password for the TPP server. The secret must contain two keys, 'username' and 'password'. - type: object - required: - - name - properties: - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - url: - description: 'URL is the base URL for the vedsdk endpoint of the Venafi TPP instance, for example: "https://tpp.example.com/vedsdk".' - type: string - zone: - description: Zone is the Venafi Policy Zone to use for this issuer. All requests made to the Venafi platform will be restricted by the named zone policy. This field is required. - type: string - status: - description: Status of the Issuer. This is set and managed automatically. - type: object - properties: - acme: - description: ACME specific status options. This field should only be set if the Issuer is configured to use an ACME server to issue certificates. - type: object - properties: - lastRegisteredEmail: - description: LastRegisteredEmail is the email associated with the latest registered ACME account, in order to track changes made to registered account associated with the Issuer - type: string - uri: - description: URI is the unique account identifier, which can also be used to retrieve account details from the CA - type: string - conditions: - description: List of status conditions to indicate the status of a CertificateRequest. Known condition types are `Ready`. - type: array - items: - description: IssuerCondition contains condition information for an Issuer. - type: object - required: - - status - - type - properties: - lastTransitionTime: - description: LastTransitionTime is the timestamp corresponding to the last status change of this condition. - type: string - format: date-time - message: - description: Message is a human readable description of the details of the last transition, complementing reason. - type: string - observedGeneration: - description: If set, this represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.condition[x].observedGeneration is 9, the condition is out of date with respect to the current state of the Issuer. - type: integer - format: int64 - reason: - description: Reason is a brief machine readable explanation for the condition's last transition. - type: string - status: - description: Status of the condition, one of (`True`, `False`, `Unknown`). - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: Type of the condition, known values are (`Ready`). - type: string - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - served: true - storage: true ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: certificates.cert-manager.io - labels: - app: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/name: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/instance: '{{ .Release.Name }}' - # Generated labels {{- include "labels" . | nindent 4 }} -spec: - group: cert-manager.io - names: - kind: Certificate - listKind: CertificateList - plural: certificates - shortNames: - - cert - - certs - singular: certificate - categories: - - cert-manager - scope: Namespaced - versions: - - name: v1 - subresources: - status: {} - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=="Ready")].status - name: Ready - type: string - - jsonPath: .spec.secretName - name: Secret - type: string - - jsonPath: .spec.issuerRef.name - name: Issuer - priority: 1 - type: string - - jsonPath: .status.conditions[?(@.type=="Ready")].message - name: Status - priority: 1 - type: string - - jsonPath: .metadata.creationTimestamp - description: CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - name: Age - type: date - schema: - openAPIV3Schema: - description: "A Certificate resource should be created to ensure an up to date and signed x509 certificate is stored in the Kubernetes Secret resource named in `spec.secretName`. \n The stored certificate will be renewed before it expires (as configured by `spec.renewBefore`)." - type: object - required: - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Desired state of the Certificate resource. - type: object - required: - - issuerRef - - secretName - properties: - additionalOutputFormats: - description: AdditionalOutputFormats defines extra output formats of the private key and signed certificate chain to be written to this Certificate's target Secret. This is an Alpha Feature and is only enabled with the `--feature-gates=AdditionalCertificateOutputFormats=true` option on both the controller and webhook components. - type: array - items: - description: CertificateAdditionalOutputFormat defines an additional output format of a Certificate resource. These contain supplementary data formats of the signed certificate chain and paired private key. - type: object - required: - - type - properties: - type: - description: Type is the name of the format type that should be written to the Certificate's target Secret. - type: string - enum: - - DER - - CombinedPEM - commonName: - description: 'CommonName is a common name to be used on the Certificate. The CommonName should have a length of 64 characters or fewer to avoid generating invalid CSRs. This value is ignored by TLS clients when any subject alt name is set. This is x509 behaviour: https://tools.ietf.org/html/rfc6125#section-6.4.4' - type: string - dnsNames: - description: DNSNames is a list of DNS subjectAltNames to be set on the Certificate. - type: array - items: - type: string - duration: - description: The requested 'duration' (i.e. lifetime) of the Certificate. This option may be ignored/overridden by some issuer types. If unset this defaults to 90 days. Certificate will be renewed either 2/3 through its duration or `renewBefore` period before its expiry, whichever is later. Minimum accepted duration is 1 hour. Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration - type: string - emailAddresses: - description: EmailAddresses is a list of email subjectAltNames to be set on the Certificate. - type: array - items: - type: string - encodeUsagesInRequest: - description: EncodeUsagesInRequest controls whether key usages should be present in the CertificateRequest - type: boolean - ipAddresses: - description: IPAddresses is a list of IP address subjectAltNames to be set on the Certificate. - type: array - items: - type: string - isCA: - description: IsCA will mark this Certificate as valid for certificate signing. This will automatically add the `cert sign` usage to the list of `usages`. - type: boolean - issuerRef: - description: IssuerRef is a reference to the issuer for this certificate. If the `kind` field is not set, or set to `Issuer`, an Issuer resource with the given name in the same namespace as the Certificate will be used. If the `kind` field is set to `ClusterIssuer`, a ClusterIssuer with the provided name will be used. The `name` field in this stanza is required at all times. - type: object - required: - - name - properties: - group: - description: Group of the resource being referred to. - type: string - kind: - description: Kind of the resource being referred to. - type: string - name: - description: Name of the resource being referred to. - type: string - keystores: - description: Keystores configures additional keystore output formats stored in the `secretName` Secret resource. - type: object - properties: - jks: - description: JKS configures options for storing a JKS keystore in the `spec.secretName` Secret resource. - type: object - required: - - create - - passwordSecretRef - properties: - create: - description: Create enables JKS keystore creation for the Certificate. If true, a file named `keystore.jks` will be created in the target Secret resource, encrypted using the password stored in `passwordSecretRef`. The keystore file will be updated immediately. A file named `truststore.jks` will also be created in the target Secret resource, encrypted using the password stored in `passwordSecretRef` containing the issuing Certificate Authority - type: boolean - passwordSecretRef: - description: PasswordSecretRef is a reference to a key in a Secret resource containing the password used to encrypt the JKS keystore. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - pkcs12: - description: PKCS12 configures options for storing a PKCS12 keystore in the `spec.secretName` Secret resource. - type: object - required: - - create - - passwordSecretRef - properties: - create: - description: Create enables PKCS12 keystore creation for the Certificate. If true, a file named `keystore.p12` will be created in the target Secret resource, encrypted using the password stored in `passwordSecretRef`. The keystore file will be updated immediately. A file named `truststore.p12` will also be created in the target Secret resource, encrypted using the password stored in `passwordSecretRef` containing the issuing Certificate Authority - type: boolean - passwordSecretRef: - description: PasswordSecretRef is a reference to a key in a Secret resource containing the password used to encrypt the PKCS12 keystore. - type: object - required: - - name - properties: - key: - description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. - type: string - name: - description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - literalSubject: - description: LiteralSubject is an LDAP formatted string that represents the [X.509 Subject field](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6). Use this *instead* of the Subject field if you need to ensure the correct ordering of the RDN sequence, such as when issuing certs for LDAP authentication. See https://github.com/cert-manager/cert-manager/issues/3203, https://github.com/cert-manager/cert-manager/issues/4424. This field is alpha level and is only supported by cert-manager installations where LiteralCertificateSubject feature gate is enabled on both cert-manager controller and webhook. - type: string - privateKey: - description: Options to control private keys used for the Certificate. - type: object - properties: - algorithm: - description: Algorithm is the private key algorithm of the corresponding private key for this certificate. If provided, allowed values are either `RSA`,`Ed25519` or `ECDSA` If `algorithm` is specified and `size` is not provided, key size of 256 will be used for `ECDSA` key algorithm and key size of 2048 will be used for `RSA` key algorithm. key size is ignored when using the `Ed25519` key algorithm. - type: string - enum: - - RSA - - ECDSA - - Ed25519 - encoding: - description: The private key cryptography standards (PKCS) encoding for this certificate's private key to be encoded in. If provided, allowed values are `PKCS1` and `PKCS8` standing for PKCS#1 and PKCS#8, respectively. Defaults to `PKCS1` if not specified. - type: string - enum: - - PKCS1 - - PKCS8 - rotationPolicy: - description: RotationPolicy controls how private keys should be regenerated when a re-issuance is being processed. If set to Never, a private key will only be generated if one does not already exist in the target `spec.secretName`. If one does exists but it does not have the correct algorithm or size, a warning will be raised to await user intervention. If set to Always, a private key matching the specified requirements will be generated whenever a re-issuance occurs. Default is 'Never' for backward compatibility. - type: string - enum: - - Never - - Always - size: - description: Size is the key bit size of the corresponding private key for this certificate. If `algorithm` is set to `RSA`, valid values are `2048`, `4096` or `8192`, and will default to `2048` if not specified. If `algorithm` is set to `ECDSA`, valid values are `256`, `384` or `521`, and will default to `256` if not specified. If `algorithm` is set to `Ed25519`, Size is ignored. No other values are allowed. - type: integer - renewBefore: - description: How long before the currently issued certificate's expiry cert-manager should renew the certificate. The default is 2/3 of the issued certificate's duration. Minimum accepted value is 5 minutes. Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration - type: string - revisionHistoryLimit: - description: revisionHistoryLimit is the maximum number of CertificateRequest revisions that are maintained in the Certificate's history. Each revision represents a single `CertificateRequest` created by this Certificate, either when it was created, renewed, or Spec was changed. Revisions will be removed by oldest first if the number of revisions exceeds this number. If set, revisionHistoryLimit must be a value of `1` or greater. If unset (`nil`), revisions will not be garbage collected. Default value is `nil`. - type: integer - format: int32 - secretName: - description: SecretName is the name of the secret resource that will be automatically created and managed by this Certificate resource. It will be populated with a private key and certificate, signed by the denoted issuer. - type: string - secretTemplate: - description: SecretTemplate defines annotations and labels to be copied to the Certificate's Secret. Labels and annotations on the Secret will be changed as they appear on the SecretTemplate when added or removed. SecretTemplate annotations are added in conjunction with, and cannot overwrite, the base set of annotations cert-manager sets on the Certificate's Secret. - type: object - properties: - annotations: - description: Annotations is a key value map to be copied to the target Kubernetes Secret. - type: object - additionalProperties: - type: string - labels: - description: Labels is a key value map to be copied to the target Kubernetes Secret. - type: object - additionalProperties: - type: string - subject: - description: Full X509 name specification (https://golang.org/pkg/crypto/x509/pkix/#Name). - type: object - properties: - countries: - description: Countries to be used on the Certificate. - type: array - items: - type: string - localities: - description: Cities to be used on the Certificate. - type: array - items: - type: string - organizationalUnits: - description: Organizational Units to be used on the Certificate. - type: array - items: - type: string - organizations: - description: Organizations to be used on the Certificate. - type: array - items: - type: string - postalCodes: - description: Postal codes to be used on the Certificate. - type: array - items: - type: string - provinces: - description: State/Provinces to be used on the Certificate. - type: array - items: - type: string - serialNumber: - description: Serial number to be used on the Certificate. - type: string - streetAddresses: - description: Street addresses to be used on the Certificate. - type: array - items: - type: string - uris: - description: URIs is a list of URI subjectAltNames to be set on the Certificate. - type: array - items: - type: string - usages: - description: Usages is the set of x509 usages that are requested for the certificate. Defaults to `digital signature` and `key encipherment` if not specified. - type: array - items: - description: "KeyUsage specifies valid usage contexts for keys. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 https://tools.ietf.org/html/rfc5280#section-4.2.1.12 \n Valid KeyUsage values are as follows: \"signing\", \"digital signature\", \"content commitment\", \"key encipherment\", \"key agreement\", \"data encipherment\", \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\", \"server auth\", \"client auth\", \"code signing\", \"email protection\", \"s/mime\", \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\", \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\"" - type: string - enum: - - signing - - digital signature - - content commitment - - key encipherment - - key agreement - - data encipherment - - cert sign - - crl sign - - encipher only - - decipher only - - any - - server auth - - client auth - - code signing - - email protection - - s/mime - - ipsec end system - - ipsec tunnel - - ipsec user - - timestamping - - ocsp signing - - microsoft sgc - - netscape sgc - status: - description: Status of the Certificate. This is set and managed automatically. - type: object - properties: - conditions: - description: List of status conditions to indicate the status of certificates. Known condition types are `Ready` and `Issuing`. - type: array - items: - description: CertificateCondition contains condition information for an Certificate. - type: object - required: - - status - - type - properties: - lastTransitionTime: - description: LastTransitionTime is the timestamp corresponding to the last status change of this condition. - type: string - format: date-time - message: - description: Message is a human readable description of the details of the last transition, complementing reason. - type: string - observedGeneration: - description: If set, this represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.condition[x].observedGeneration is 9, the condition is out of date with respect to the current state of the Certificate. - type: integer - format: int64 - reason: - description: Reason is a brief machine readable explanation for the condition's last transition. - type: string - status: - description: Status of the condition, one of (`True`, `False`, `Unknown`). - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: Type of the condition, known values are (`Ready`, `Issuing`). - type: string - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - failedIssuanceAttempts: - description: The number of continuous failed issuance attempts up till now. This field gets removed (if set) on a successful issuance and gets set to 1 if unset and an issuance has failed. If an issuance has failed, the delay till the next issuance will be calculated using formula time.Hour * 2 ^ (failedIssuanceAttempts - 1). - type: integer - lastFailureTime: - description: LastFailureTime is the time as recorded by the Certificate controller of the most recent failure to complete a CertificateRequest for this Certificate resource. If set, cert-manager will not re-request another Certificate until 1 hour has elapsed from this time. - type: string - format: date-time - nextPrivateKeySecretName: - description: The name of the Secret resource containing the private key to be used for the next certificate iteration. The keymanager controller will automatically set this field if the `Issuing` condition is set to `True`. It will automatically unset this field when the Issuing condition is not set or False. - type: string - notAfter: - description: The expiration time of the certificate stored in the secret named by this resource in `spec.secretName`. - type: string - format: date-time - notBefore: - description: The time after which the certificate stored in the secret named by this resource in spec.secretName is valid. - type: string - format: date-time - renewalTime: - description: RenewalTime is the time at which the certificate will be next renewed. If not set, no upcoming renewal is scheduled. - type: string - format: date-time - revision: - description: "The current 'revision' of the certificate as issued. \n When a CertificateRequest resource is created, it will have the `cert-manager.io/certificate-revision` set to one greater than the current value of this field. \n Upon issuance, this field will be set to the value of the annotation on the CertificateRequest resource used to issue the certificate. \n Persisting the value on the CertificateRequest resource allows the certificates controller to know whether a request is part of an old issuance or if it is part of the ongoing revision's issuance by checking if the revision value in the annotation is greater than this field." - type: integer - served: true - storage: true ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: orders.acme.cert-manager.io - labels: - app: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/name: '{{ template "cert-manager.name" . }}' - app.kubernetes.io/instance: '{{ .Release.Name }}' - # Generated labels {{- include "labels" . | nindent 4 }} -spec: - group: acme.cert-manager.io - names: - kind: Order - listKind: OrderList - plural: orders - singular: order - categories: - - cert-manager - - cert-manager-acme - scope: Namespaced - versions: - - name: v1 - subresources: - status: {} - additionalPrinterColumns: - - jsonPath: .status.state - name: State - type: string - - jsonPath: .spec.issuerRef.name - name: Issuer - priority: 1 - type: string - - jsonPath: .status.reason - name: Reason - priority: 1 - type: string - - jsonPath: .metadata.creationTimestamp - description: CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - name: Age - type: date - schema: - openAPIV3Schema: - description: Order is a type to represent an Order with an ACME server - type: object - required: - - metadata - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - type: object - required: - - issuerRef - - request - properties: - commonName: - description: CommonName is the common name as specified on the DER encoded CSR. If specified, this value must also be present in `dnsNames` or `ipAddresses`. This field must match the corresponding field on the DER encoded CSR. - type: string - dnsNames: - description: DNSNames is a list of DNS names that should be included as part of the Order validation process. This field must match the corresponding field on the DER encoded CSR. - type: array - items: - type: string - duration: - description: Duration is the duration for the not after date for the requested certificate. this is set on order creation as pe the ACME spec. - type: string - ipAddresses: - description: IPAddresses is a list of IP addresses that should be included as part of the Order validation process. This field must match the corresponding field on the DER encoded CSR. - type: array - items: - type: string - issuerRef: - description: IssuerRef references a properly configured ACME-type Issuer which should be used to create this Order. If the Issuer does not exist, processing will be retried. If the Issuer is not an 'ACME' Issuer, an error will be returned and the Order will be marked as failed. - type: object - required: - - name - properties: - group: - description: Group of the resource being referred to. - type: string - kind: - description: Kind of the resource being referred to. - type: string - name: - description: Name of the resource being referred to. - type: string - request: - description: Certificate signing request bytes in DER encoding. This will be used when finalizing the order. This field must be set on the order. - type: string - format: byte - status: - type: object - properties: - authorizations: - description: Authorizations contains data returned from the ACME server on what authorizations must be completed in order to validate the DNS names specified on the Order. - type: array - items: - description: ACMEAuthorization contains data returned from the ACME server on an authorization that must be completed in order validate a DNS name on an ACME Order resource. - type: object - required: - - url - properties: - challenges: - description: Challenges specifies the challenge types offered by the ACME server. One of these challenge types will be selected when validating the DNS name and an appropriate Challenge resource will be created to perform the ACME challenge process. - type: array - items: - description: Challenge specifies a challenge offered by the ACME server for an Order. An appropriate Challenge resource can be created to perform the ACME challenge process. - type: object - required: - - token - - type - - url - properties: - token: - description: Token is the token that must be presented for this challenge. This is used to compute the 'key' that must also be presented. - type: string - type: - description: Type is the type of challenge being offered, e.g. 'http-01', 'dns-01', 'tls-sni-01', etc. This is the raw value retrieved from the ACME server. Only 'http-01' and 'dns-01' are supported by cert-manager, other values will be ignored. - type: string - url: - description: URL is the URL of this challenge. It can be used to retrieve additional metadata about the Challenge from the ACME server. - type: string - identifier: - description: Identifier is the DNS name to be validated as part of this authorization - type: string - initialState: - description: InitialState is the initial state of the ACME authorization when first fetched from the ACME server. If an Authorization is already 'valid', the Order controller will not create a Challenge resource for the authorization. This will occur when working with an ACME server that enables 'authz reuse' (such as Let's Encrypt's production endpoint). If not set and 'identifier' is set, the state is assumed to be pending and a Challenge will be created. - type: string - enum: - - valid - - ready - - pending - - processing - - invalid - - expired - - errored - url: - description: URL is the URL of the Authorization that must be completed - type: string - wildcard: - description: Wildcard will be true if this authorization is for a wildcard DNS name. If this is true, the identifier will be the *non-wildcard* version of the DNS name. For example, if '*.example.com' is the DNS name being validated, this field will be 'true' and the 'identifier' field will be 'example.com'. - type: boolean - certificate: - description: Certificate is a copy of the PEM encoded certificate for this Order. This field will be populated after the order has been successfully finalized with the ACME server, and the order has transitioned to the 'valid' state. - type: string - format: byte - failureTime: - description: FailureTime stores the time that this order failed. This is used to influence garbage collection and back-off. - type: string - format: date-time - finalizeURL: - description: FinalizeURL of the Order. This is used to obtain certificates for this order once it has been completed. - type: string - reason: - description: Reason optionally provides more information about a why the order is in the current state. - type: string - state: - description: State contains the current state of this Order resource. States 'success' and 'expired' are 'final' - type: string - enum: - - valid - - ready - - pending - - processing - - invalid - - expired - - errored - url: - description: URL of the Order. This will initially be empty when the resource is first created. The Order controller will populate this field when the Order is first processed. This field will be immutable after it is initially set. - type: string - served: true - storage: true -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/deployment.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/deployment.yaml deleted file mode 100644 index 6e74f1e82..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/deployment.yaml +++ /dev/null @@ -1,174 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "cert-manager.fullname" . }} - namespace: {{ include "cert-manager.namespace" . }} - labels: - app: {{ template "cert-manager.name" . }} - app.kubernetes.io/name: {{ template "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} - {{- with .Values.deploymentAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app.kubernetes.io/name: {{ template "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- with .Values.strategy }} - strategy: - {{- toYaml . | nindent 4 }} - {{- end }} - template: - metadata: - labels: - app: {{ template "cert-manager.name" . }} - app.kubernetes.io/name: {{ template "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 8 }} - {{- with .Values.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if and .Values.prometheus.enabled (not .Values.prometheus.servicemonitor.enabled) }} - {{- if not .Values.podAnnotations }} - annotations: - {{- end }} - prometheus.io/path: "/metrics" - prometheus.io/scrape: 'true' - prometheus.io/port: '9402' - {{- end }} - spec: - serviceAccountName: {{ template "cert-manager.serviceAccountName" . }} - {{- if hasKey .Values "automountServiceAccountToken" }} - automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} - {{- end }} - {{- with .Values.global.priorityClassName }} - priorityClassName: {{ . | quote }} - {{- end }} - {{- with .Values.securityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.volumes }} - volumes: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: {{ .Chart.Name }}-controller - {{- with .Values.image }} - image: "{{- if .registry -}}{{ .registry }}/{{- end -}}{{ .repository }}{{- if (.digest) -}} @{{ .digest }}{{- else -}}:{{ default $.Chart.AppVersion .tag }} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - args: - {{- if .Values.global.logLevel }} - - --v={{ .Values.global.logLevel }} - {{- end }} - {{- if .Values.clusterResourceNamespace }} - - --cluster-resource-namespace={{ .Values.clusterResourceNamespace }} - {{- else }} - - --cluster-resource-namespace=$(POD_NAMESPACE) - {{- end }} - {{- with .Values.global.leaderElection }} - - --leader-election-namespace={{ .namespace }} - {{- if .leaseDuration }} - - --leader-election-lease-duration={{ .leaseDuration }} - {{- end }} - {{- if .renewDeadline }} - - --leader-election-renew-deadline={{ .renewDeadline }} - {{- end }} - {{- if .retryPeriod }} - - --leader-election-retry-period={{ .retryPeriod }} - {{- end }} - {{- end }} - {{- with .Values.acmesolver.image }} - - --acme-http01-solver-image={{- if .registry -}}{{ .registry }}/{{- end -}}{{ .repository }}{{- if (.digest) -}} @{{ .digest }}{{- else -}}:{{ default $.Chart.AppVersion .tag }} {{- end -}} - {{- end }} - {{- with .Values.extraArgs }} - {{- toYaml . | nindent 10 }} - {{- end }} - {{- with .Values.ingressShim }} - {{- if .defaultIssuerName }} - - --default-issuer-name={{ .defaultIssuerName }} - {{- end }} - {{- if .defaultIssuerKind }} - - --default-issuer-kind={{ .defaultIssuerKind }} - {{- end }} - {{- if .defaultIssuerGroup }} - - --default-issuer-group={{ .defaultIssuerGroup }} - {{- end }} - {{- end }} - {{- if .Values.featureGates }} - - --feature-gates={{ .Values.featureGates }} - {{- end }} - {{- if .Values.maxConcurrentChallenges }} - - --max-concurrent-challenges={{ .Values.maxConcurrentChallenges }} - {{- end }} - ports: - - containerPort: 9402 - name: http-metrics - protocol: TCP - {{- with .Values.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.volumeMounts }} - volumeMounts: - {{- toYaml . | nindent 12 }} - {{- end }} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - {{- with .Values.extraEnv }} - {{- toYaml . | nindent 10 }} - {{- end }} - {{- with .Values.http_proxy }} - - name: HTTP_PROXY - value: {{ . }} - {{- end }} - {{- with .Values.https_proxy }} - - name: HTTPS_PROXY - value: {{ . }} - {{- end }} - {{- with .Values.no_proxy }} - - name: NO_PROXY - value: {{ . }} - {{- end }} - {{- with .Values.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.podDnsPolicy }} - dnsPolicy: {{ . }} - {{- end }} - {{- with .Values.podDnsConfig }} - dnsConfig: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/networkpolicy-egress.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/networkpolicy-egress.yaml deleted file mode 100644 index 09712009d..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/networkpolicy-egress.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if .Values.webhook.networkPolicy.enabled }} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ template "webhook.fullname" . }}-allow-egress - namespace: {{ include "cert-manager.namespace" . }} -spec: - egress: - {{- with .Values.webhook.networkPolicy.egress }} - {{- toYaml . | nindent 2 }} - {{- end }} - podSelector: - matchLabels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- with .Values.webhook.podLabels }} - {{- toYaml . | nindent 6 }} - {{- end }} - policyTypes: - - Egress -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/networkpolicy-webhooks.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/networkpolicy-webhooks.yaml deleted file mode 100644 index 349877a8b..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/networkpolicy-webhooks.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.webhook.networkPolicy.enabled }} - -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ template "webhook.fullname" . }}-allow-ingress - namespace: {{ include "cert-manager.namespace" . }} -spec: - ingress: - {{- with .Values.webhook.networkPolicy.ingress }} - {{- toYaml . | nindent 2 }} - {{- end }} - podSelector: - matchLabels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- with .Values.webhook.podLabels }} - {{- toYaml . | nindent 6 }} - {{- end }} - policyTypes: - - Ingress - -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/psp-clusterrole.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/psp-clusterrole.yaml deleted file mode 100644 index 1d40a0238..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/psp-clusterrole.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.global.podSecurityPolicy.enabled }} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "cert-manager.fullname" . }}-psp - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -rules: -- apiGroups: ['policy'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: - - {{ template "cert-manager.fullname" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/psp-clusterrolebinding.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/psp-clusterrolebinding.yaml deleted file mode 100644 index 4f09b6bf3..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/psp-clusterrolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.global.podSecurityPolicy.enabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "cert-manager.fullname" . }}-psp - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "cert-manager.fullname" . }}-psp -subjects: - - kind: ServiceAccount - name: {{ template "cert-manager.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/psp.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/psp.yaml deleted file mode 100644 index 9e99f5c76..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/psp.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if .Values.global.podSecurityPolicy.enabled }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "cert-manager.fullname" . }} - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} - annotations: - seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default' - seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - {{- if .Values.global.podSecurityPolicy.useAppArmor }} - apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default' - apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - {{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - allowedCapabilities: [] # default set of capabilities are implicitly allowed - volumes: - - 'configMap' - - 'emptyDir' - - 'projected' - - 'secret' - - 'downwardAPI' - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/rbac.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/rbac.yaml deleted file mode 100644 index 361b1a223..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/rbac.yaml +++ /dev/null @@ -1,545 +0,0 @@ -{{- if .Values.global.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "cert-manager.fullname" . }}:leaderelection - namespace: {{ .Values.global.leaderElection.namespace }} - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -rules: - - apiGroups: ["coordination.k8s.io"] - resources: ["leases"] - resourceNames: ["cert-manager-controller"] - verbs: ["get", "update", "patch"] - - apiGroups: ["coordination.k8s.io"] - resources: ["leases"] - verbs: ["create"] - ---- - -# grant cert-manager permission to manage the leaderelection configmap in the -# leader election namespace -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "cert-manager.fullname" . }}:leaderelection - namespace: {{ .Values.global.leaderElection.namespace }} - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "cert-manager.fullname" . }}:leaderelection -subjects: - - apiGroup: "" - kind: ServiceAccount - name: {{ template "cert-manager.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - ---- - -# Issuer controller role -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-issuers - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -rules: - - apiGroups: ["cert-manager.io"] - resources: ["issuers", "issuers/status"] - verbs: ["update", "patch"] - - apiGroups: ["cert-manager.io"] - resources: ["issuers"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch", "create", "update", "delete"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - ---- - -# ClusterIssuer controller role -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-clusterissuers - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -rules: - - apiGroups: ["cert-manager.io"] - resources: ["clusterissuers", "clusterissuers/status"] - verbs: ["update", "patch"] - - apiGroups: ["cert-manager.io"] - resources: ["clusterissuers"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch", "create", "update", "delete"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - ---- - -# Certificates controller role -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-certificates - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -rules: - - apiGroups: ["cert-manager.io"] - resources: ["certificates", "certificates/status", "certificaterequests", "certificaterequests/status"] - verbs: ["update", "patch"] - - apiGroups: ["cert-manager.io"] - resources: ["certificates", "certificaterequests", "clusterissuers", "issuers"] - verbs: ["get", "list", "watch"] - # We require these rules to support users with the OwnerReferencesPermissionEnforcement - # admission controller enabled: - # https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement - - apiGroups: ["cert-manager.io"] - resources: ["certificates/finalizers", "certificaterequests/finalizers"] - verbs: ["update"] - - apiGroups: ["acme.cert-manager.io"] - resources: ["orders"] - verbs: ["create", "delete", "get", "list", "watch"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch", "create", "update", "delete", "patch"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - ---- - -# Orders controller role -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-orders - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -rules: - - apiGroups: ["acme.cert-manager.io"] - resources: ["orders", "orders/status"] - verbs: ["update", "patch"] - - apiGroups: ["acme.cert-manager.io"] - resources: ["orders", "challenges"] - verbs: ["get", "list", "watch"] - - apiGroups: ["cert-manager.io"] - resources: ["clusterissuers", "issuers"] - verbs: ["get", "list", "watch"] - - apiGroups: ["acme.cert-manager.io"] - resources: ["challenges"] - verbs: ["create", "delete"] - # We require these rules to support users with the OwnerReferencesPermissionEnforcement - # admission controller enabled: - # https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement - - apiGroups: ["acme.cert-manager.io"] - resources: ["orders/finalizers"] - verbs: ["update"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - ---- - -# Challenges controller role -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-challenges - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -rules: - # Use to update challenge resource status - - apiGroups: ["acme.cert-manager.io"] - resources: ["challenges", "challenges/status"] - verbs: ["update", "patch"] - # Used to watch challenge resources - - apiGroups: ["acme.cert-manager.io"] - resources: ["challenges"] - verbs: ["get", "list", "watch"] - # Used to watch challenges, issuer and clusterissuer resources - - apiGroups: ["cert-manager.io"] - resources: ["issuers", "clusterissuers"] - verbs: ["get", "list", "watch"] - # Need to be able to retrieve ACME account private key to complete challenges - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch"] - # Used to create events - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - # HTTP01 rules - - apiGroups: [""] - resources: ["pods", "services"] - verbs: ["get", "list", "watch", "create", "delete"] - - apiGroups: ["networking.k8s.io"] - resources: ["ingresses"] - verbs: ["get", "list", "watch", "create", "delete", "update"] - - apiGroups: [ "gateway.networking.k8s.io" ] - resources: [ "httproutes" ] - verbs: ["get", "list", "watch", "create", "delete", "update"] - # We require the ability to specify a custom hostname when we are creating - # new ingress resources. - # See: https://github.com/openshift/origin/blob/21f191775636f9acadb44fa42beeb4f75b255532/pkg/route/apiserver/admission/ingress_admission.go#L84-L148 - - apiGroups: ["route.openshift.io"] - resources: ["routes/custom-host"] - verbs: ["create"] - # We require these rules to support users with the OwnerReferencesPermissionEnforcement - # admission controller enabled: - # https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement - - apiGroups: ["acme.cert-manager.io"] - resources: ["challenges/finalizers"] - verbs: ["update"] - # DNS01 rules (duplicated above) - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch"] - ---- - -# ingress-shim controller role -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-ingress-shim - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -rules: - - apiGroups: ["cert-manager.io"] - resources: ["certificates", "certificaterequests"] - verbs: ["create", "update", "delete"] - - apiGroups: ["cert-manager.io"] - resources: ["certificates", "certificaterequests", "issuers", "clusterissuers"] - verbs: ["get", "list", "watch"] - - apiGroups: ["networking.k8s.io"] - resources: ["ingresses"] - verbs: ["get", "list", "watch"] - # We require these rules to support users with the OwnerReferencesPermissionEnforcement - # admission controller enabled: - # https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement - - apiGroups: ["networking.k8s.io"] - resources: ["ingresses/finalizers"] - verbs: ["update"] - - apiGroups: ["gateway.networking.k8s.io"] - resources: ["gateways", "httproutes"] - verbs: ["get", "list", "watch"] - - apiGroups: ["gateway.networking.k8s.io"] - resources: ["gateways/finalizers", "httproutes/finalizers"] - verbs: ["update"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-issuers - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "cert-manager.fullname" . }}-controller-issuers -subjects: - - name: {{ template "cert-manager.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-clusterissuers - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "cert-manager.fullname" . }}-controller-clusterissuers -subjects: - - name: {{ template "cert-manager.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-certificates - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "cert-manager.fullname" . }}-controller-certificates -subjects: - - name: {{ template "cert-manager.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-orders - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "cert-manager.fullname" . }}-controller-orders -subjects: - - name: {{ template "cert-manager.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-challenges - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "cert-manager.fullname" . }}-controller-challenges -subjects: - - name: {{ template "cert-manager.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-ingress-shim - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "cert-manager.fullname" . }}-controller-ingress-shim -subjects: - - name: {{ template "cert-manager.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "cert-manager.fullname" . }}-view - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} - {{- if .Values.global.rbac.aggregateClusterRoles }} - rbac.authorization.k8s.io/aggregate-to-view: "true" - rbac.authorization.k8s.io/aggregate-to-edit: "true" - rbac.authorization.k8s.io/aggregate-to-admin: "true" - {{- end }} -rules: - - apiGroups: ["cert-manager.io"] - resources: ["certificates", "certificaterequests", "issuers"] - verbs: ["get", "list", "watch"] - - apiGroups: ["acme.cert-manager.io"] - resources: ["challenges", "orders"] - verbs: ["get", "list", "watch"] - - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "cert-manager.fullname" . }}-edit - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} - {{- if .Values.global.rbac.aggregateClusterRoles }} - rbac.authorization.k8s.io/aggregate-to-edit: "true" - rbac.authorization.k8s.io/aggregate-to-admin: "true" - {{- end }} -rules: - - apiGroups: ["cert-manager.io"] - resources: ["certificates", "certificaterequests", "issuers"] - verbs: ["create", "delete", "deletecollection", "patch", "update"] - - apiGroups: ["cert-manager.io"] - resources: ["certificates/status"] - verbs: ["update"] - - apiGroups: ["acme.cert-manager.io"] - resources: ["challenges", "orders"] - verbs: ["create", "delete", "deletecollection", "patch", "update"] - ---- - -# Permission to approve CertificateRequests referencing cert-manager.io Issuers and ClusterIssuers -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-approve:cert-manager-io - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cert-manager" - {{- include "labels" . | nindent 4 }} -rules: - - apiGroups: ["cert-manager.io"] - resources: ["signers"] - verbs: ["approve"] - resourceNames: ["issuers.cert-manager.io/*", "clusterissuers.cert-manager.io/*"] - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-approve:cert-manager-io - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cert-manager" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "cert-manager.fullname" . }}-controller-approve:cert-manager-io -subjects: - - name: {{ template "cert-manager.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - kind: ServiceAccount - ---- - -# Permission to: -# - Update and sign CertificatSigningeRequests referencing cert-manager.io Issuers and ClusterIssuers -# - Perform SubjectAccessReviews to test whether users are able to reference Namespaced Issuers -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-certificatesigningrequests - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cert-manager" - {{- include "labels" . | nindent 4 }} -rules: - - apiGroups: ["certificates.k8s.io"] - resources: ["certificatesigningrequests"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["certificates.k8s.io"] - resources: ["certificatesigningrequests/status"] - verbs: ["update", "patch"] - - apiGroups: ["certificates.k8s.io"] - resources: ["signers"] - resourceNames: ["issuers.cert-manager.io/*", "clusterissuers.cert-manager.io/*"] - verbs: ["sign"] - - apiGroups: ["authorization.k8s.io"] - resources: ["subjectaccessreviews"] - verbs: ["create"] - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "cert-manager.fullname" . }}-controller-certificatesigningrequests - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "cert-manager" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "cert-manager.fullname" . }}-controller-certificatesigningrequests -subjects: - - name: {{ template "cert-manager.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - kind: ServiceAccount -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/service.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/service.yaml deleted file mode 100644 index ec34d5878..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/service.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- if .Values.prometheus.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "cert-manager.fullname" . }} - namespace: {{ include "cert-manager.namespace" . }} -{{- with .Values.serviceAnnotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} - {{- with .Values.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - type: ClusterIP - ports: - - protocol: TCP - port: 9402 - name: tcp-prometheus-servicemonitor - targetPort: {{ .Values.prometheus.servicemonitor.targetPort }} - selector: - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/serviceaccount.yaml deleted file mode 100644 index 6026842ff..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/serviceaccount.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -{{- with .Values.global.imagePullSecrets }} -imagePullSecrets: - {{- toYaml . | nindent 2 }} -{{- end }} -automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} -metadata: - name: {{ template "cert-manager.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} - {{- with .Values.serviceAccount.labels }} - {{ toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/servicemonitor.yaml deleted file mode 100644 index 9d9e89992..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/servicemonitor.yaml +++ /dev/null @@ -1,45 +0,0 @@ -{{- if and .Values.prometheus.enabled .Values.prometheus.servicemonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "cert-manager.fullname" . }} -{{- if .Values.prometheus.servicemonitor.namespace }} - namespace: {{ .Values.prometheus.servicemonitor.namespace }} -{{- else }} - namespace: {{ include "cert-manager.namespace" . }} -{{- end }} - labels: - app: {{ include "cert-manager.name" . }} - app.kubernetes.io/name: {{ include "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" - {{- include "labels" . | nindent 4 }} - prometheus: {{ .Values.prometheus.servicemonitor.prometheusInstance }} - {{- with .Values.prometheus.servicemonitor.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -{{- if .Values.prometheus.servicemonitor.annotations }} - annotations: - {{- with .Values.prometheus.servicemonitor.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} -spec: - jobLabel: {{ template "cert-manager.fullname" . }} - selector: - matchLabels: - app.kubernetes.io/name: {{ template "cert-manager.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "controller" -{{- if .Values.prometheus.servicemonitor.namespace }} - namespaceSelector: - matchNames: - - {{ include "cert-manager.namespace" . }} -{{- end }} - endpoints: - - targetPort: {{ .Values.prometheus.servicemonitor.targetPort }} - path: {{ .Values.prometheus.servicemonitor.path }} - interval: {{ .Values.prometheus.servicemonitor.interval }} - scrapeTimeout: {{ .Values.prometheus.servicemonitor.scrapeTimeout }} - honorLabels: {{ .Values.prometheus.servicemonitor.honorLabels }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-job.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-job.yaml deleted file mode 100644 index f55b5fe15..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-job.yaml +++ /dev/null @@ -1,77 +0,0 @@ -{{- if .Values.startupapicheck.enabled }} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "startupapicheck.fullname" . }} - namespace: {{ include "cert-manager.namespace" . }} - labels: - app: {{ include "startupapicheck.name" . }} - app.kubernetes.io/name: {{ include "startupapicheck.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "startupapicheck" - {{- include "labels" . | nindent 4 }} - {{- with .Values.startupapicheck.jobAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - backoffLimit: {{ .Values.startupapicheck.backoffLimit }} - template: - metadata: - labels: - app: {{ include "startupapicheck.name" . }} - app.kubernetes.io/name: {{ include "startupapicheck.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "startupapicheck" - {{- include "labels" . | nindent 8 }} - {{- with .Values.startupapicheck.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.startupapicheck.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - restartPolicy: OnFailure - serviceAccountName: {{ template "startupapicheck.serviceAccountName" . }} - {{- with .Values.global.priorityClassName }} - priorityClassName: {{ . | quote }} - {{- end }} - {{- with .Values.startupapicheck.securityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: {{ .Chart.Name }}-startupapicheck - {{- with .Values.startupapicheck.image }} - image: "{{- if .registry -}}{{ .registry }}/{{- end -}}{{ .repository }}{{- if (.digest) -}} @{{ .digest }}{{- else -}}:{{ default $.Chart.AppVersion .tag }} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.startupapicheck.image.pullPolicy }} - args: - - check - - api - - --wait={{ .Values.startupapicheck.timeout }} - {{- with .Values.startupapicheck.extraArgs }} - {{- toYaml . | nindent 10 }} - {{- end }} - {{- with .Values.startupapicheck.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.startupapicheck.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.startupapicheck.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.startupapicheck.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.startupapicheck.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-psp-clusterrole.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-psp-clusterrole.yaml deleted file mode 100644 index dacd4be27..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-psp-clusterrole.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if .Values.startupapicheck.enabled }} -{{- if .Values.global.podSecurityPolicy.enabled }} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "startupapicheck.fullname" . }}-psp - labels: - app: {{ include "startupapicheck.name" . }} - app.kubernetes.io/name: {{ include "startupapicheck.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "startupapicheck" - {{- include "labels" . | nindent 4 }} - {{- with .Values.startupapicheck.rbac.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -rules: -- apiGroups: ['policy'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: - - {{ template "startupapicheck.fullname" . }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-psp-clusterrolebinding.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-psp-clusterrolebinding.yaml deleted file mode 100644 index 54d5a42d6..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-psp-clusterrolebinding.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if .Values.startupapicheck.enabled }} -{{- if .Values.global.podSecurityPolicy.enabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "startupapicheck.fullname" . }}-psp - labels: - app: {{ include "startupapicheck.name" . }} - app.kubernetes.io/name: {{ include "startupapicheck.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "startupapicheck" - {{- include "labels" . | nindent 4 }} - {{- with .Values.startupapicheck.rbac.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "startupapicheck.fullname" . }}-psp -subjects: - - kind: ServiceAccount - name: {{ template "startupapicheck.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-psp.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-psp.yaml deleted file mode 100644 index f09d60d63..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-psp.yaml +++ /dev/null @@ -1,51 +0,0 @@ -{{- if .Values.startupapicheck.enabled }} -{{- if .Values.global.podSecurityPolicy.enabled }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "startupapicheck.fullname" . }} - labels: - app: {{ include "startupapicheck.name" . }} - app.kubernetes.io/name: {{ include "startupapicheck.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "startupapicheck" - {{- include "labels" . | nindent 4 }} - annotations: - seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default' - seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - {{- if .Values.global.podSecurityPolicy.useAppArmor }} - apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default' - apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - {{- end }} - {{- with .Values.startupapicheck.rbac.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - allowedCapabilities: [] # default set of capabilities are implicitly allowed - volumes: - - 'projected' - - 'secret' - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-rbac.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-rbac.yaml deleted file mode 100644 index 606e72564..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-rbac.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if .Values.startupapicheck.enabled }} -{{- if .Values.global.rbac.create }} -# create certificate role -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "startupapicheck.fullname" . }}:create-cert - namespace: {{ include "cert-manager.namespace" . }} - labels: - app: {{ include "startupapicheck.name" . }} - app.kubernetes.io/name: {{ include "startupapicheck.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "startupapicheck" - {{- include "labels" . | nindent 4 }} - {{- with .Values.startupapicheck.rbac.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -rules: - - apiGroups: ["cert-manager.io"] - resources: ["certificates"] - verbs: ["create"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "startupapicheck.fullname" . }}:create-cert - namespace: {{ include "cert-manager.namespace" . }} - labels: - app: {{ include "startupapicheck.name" . }} - app.kubernetes.io/name: {{ include "startupapicheck.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "startupapicheck" - {{- include "labels" . | nindent 4 }} - {{- with .Values.startupapicheck.rbac.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "startupapicheck.fullname" . }}:create-cert -subjects: - - kind: ServiceAccount - name: {{ template "startupapicheck.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-serviceaccount.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-serviceaccount.yaml deleted file mode 100644 index 8c417604a..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/startupapicheck-serviceaccount.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.startupapicheck.enabled }} -{{- if .Values.startupapicheck.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -automountServiceAccountToken: {{ .Values.startupapicheck.serviceAccount.automountServiceAccountToken }} -metadata: - name: {{ template "startupapicheck.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - {{- with .Values.startupapicheck.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - app: {{ include "startupapicheck.name" . }} - app.kubernetes.io/name: {{ include "startupapicheck.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "startupapicheck" - {{- include "labels" . | nindent 4 }} - {{- with .Values.startupapicheck.serviceAccount.labels }} - {{ toYaml . | nindent 4 }} - {{- end }} -{{- with .Values.global.imagePullSecrets }} -imagePullSecrets: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-config.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-config.yaml deleted file mode 100644 index f3f72f02e..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-config.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.webhook.config -}} - {{- if not .Values.webhook.config.apiVersion -}} - {{- fail "webhook.config.apiVersion must be set" -}} - {{- end -}} - - {{- if not .Values.webhook.config.kind -}} - {{- fail "webhook.config.kind must be set" -}} - {{- end -}} -{{- end -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "webhook.fullname" . }} - namespace: {{ include "cert-manager.namespace" . }} - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} -data: - {{- if .Values.webhook.config }} - config.yaml: | - {{ .Values.webhook.config | toYaml | nindent 4 }} - {{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-deployment.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-deployment.yaml deleted file mode 100644 index 259a96c79..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-deployment.yaml +++ /dev/null @@ -1,175 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "webhook.fullname" . }} - namespace: {{ include "cert-manager.namespace" . }} - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} - {{- with .Values.webhook.deploymentAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.webhook.replicaCount }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- with .Values.webhook.strategy }} - strategy: - {{- toYaml . | nindent 4 }} - {{- end }} - template: - metadata: - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 8 }} - {{- with .Values.webhook.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.webhook.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ template "webhook.serviceAccountName" . }} - {{- if hasKey .Values.webhook "automountServiceAccountToken" }} - automountServiceAccountToken: {{ .Values.webhook.automountServiceAccountToken }} - {{- end }} - {{- with .Values.global.priorityClassName }} - priorityClassName: {{ . | quote }} - {{- end }} - {{- with .Values.webhook.securityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.webhook.hostNetwork }} - hostNetwork: true - {{- end }} - containers: - - name: {{ .Chart.Name }}-webhook - {{- with .Values.webhook.image }} - image: "{{- if .registry -}}{{ .registry }}/{{- end -}}{{ .repository }}{{- if (.digest) -}} @{{ .digest }}{{- else -}}:{{ default $.Chart.AppVersion .tag }} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.webhook.image.pullPolicy }} - args: - {{- if .Values.global.logLevel }} - - --v={{ .Values.global.logLevel }} - {{- end }} - {{- if .Values.webhook.config }} - - --config=/var/cert-manager/config/config.yaml - {{- end }} - {{- $config := default .Values.webhook.config "" }} - {{ if not $config.securePort -}} - - --secure-port={{ .Values.webhook.securePort }} - {{- end }} - {{- if .Values.featureGates }} - - --feature-gates={{ .Values.featureGates }} - {{- end }} - {{- $tlsConfig := default $config.tlsConfig "" }} - {{ if or (not $config.tlsConfig) (and (not $tlsConfig.dynamic) (not $tlsConfig.filesystem) ) -}} - - --dynamic-serving-ca-secret-namespace=$(POD_NAMESPACE) - - --dynamic-serving-ca-secret-name={{ template "webhook.fullname" . }}-ca - - --dynamic-serving-dns-names={{ template "webhook.fullname" . }} - - --dynamic-serving-dns-names={{ template "webhook.fullname" . }}.$(POD_NAMESPACE) - - --dynamic-serving-dns-names={{ template "webhook.fullname" . }}.$(POD_NAMESPACE).svc - {{ if .Values.webhook.url.host }} - - --dynamic-serving-dns-names={{ .Values.webhook.url.host }} - {{- end }} - {{- end }} - {{- with .Values.webhook.extraArgs }} - {{- toYaml . | nindent 10 }} - {{- end }} - ports: - - name: https - protocol: TCP - {{- if $config.securePort }} - containerPort: {{ $config.securePort }} - {{- else if .Values.webhook.securePort }} - containerPort: {{ .Values.webhook.securePort }} - {{- else }} - containerPort: 6443 - {{- end }} - - name: healthcheck - protocol: TCP - {{- if $config.healthzPort }} - containerPort: {{ $config.healthzPort }} - {{- else }} - containerPort: 6080 - {{- end }} - livenessProbe: - httpGet: - path: /livez - {{- if $config.healthzPort }} - port: {{ $config.healthzPort }} - {{- else }} - port: 6080 - {{- end }} - scheme: HTTP - initialDelaySeconds: {{ .Values.webhook.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.webhook.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.webhook.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.webhook.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.webhook.livenessProbe.failureThreshold }} - readinessProbe: - httpGet: - path: /healthz - {{- if $config.healthzPort }} - port: {{ $config.healthzPort }} - {{- else }} - port: 6080 - {{- end }} - scheme: HTTP - initialDelaySeconds: {{ .Values.webhook.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.webhook.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.webhook.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.webhook.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.webhook.readinessProbe.failureThreshold }} - {{- with .Values.webhook.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - {{- with .Values.webhook.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.webhook.config }} - volumeMounts: - - name: config - mountPath: /var/cert-manager/config - {{- end }} - {{- with .Values.webhook.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.webhook.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.webhook.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.webhook.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.webhook.config }} - volumes: - - name: config - configMap: - name: {{ include "webhook.fullname" . }} - {{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-mutating-webhook.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-mutating-webhook.yaml deleted file mode 100644 index f3db011ef..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-mutating-webhook.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: admissionregistration.k8s.io/v1 -kind: MutatingWebhookConfiguration -metadata: - name: {{ include "webhook.fullname" . }} - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} - annotations: - cert-manager.io/inject-ca-from-secret: {{ printf "%s/%s-ca" (include "cert-manager.namespace" .) (include "webhook.fullname" .) | quote }} - {{- with .Values.webhook.mutatingWebhookConfigurationAnnotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -webhooks: - - name: webhook.cert-manager.io - rules: - - apiGroups: - - "cert-manager.io" - - "acme.cert-manager.io" - apiVersions: - - "v1" - operations: - - CREATE - - UPDATE - resources: - - "*/*" - admissionReviewVersions: ["v1"] - # This webhook only accepts v1 cert-manager resources. - # Equivalent matchPolicy ensures that non-v1 resource requests are sent to - # this webhook (after the resources have been converted to v1). - matchPolicy: Equivalent - timeoutSeconds: {{ .Values.webhook.timeoutSeconds }} - failurePolicy: Fail - # Only include 'sideEffects' field in Kubernetes 1.12+ - sideEffects: None - clientConfig: - {{- if .Values.webhook.url.host }} - url: https://{{ .Values.webhook.url.host }}/mutate - {{- else }} - service: - name: {{ template "webhook.fullname" . }} - namespace: {{ include "cert-manager.namespace" . }} - path: /mutate - {{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-psp-clusterrole.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-psp-clusterrole.yaml deleted file mode 100644 index 2a8808e7d..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-psp-clusterrole.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.global.podSecurityPolicy.enabled }} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "webhook.fullname" . }}-psp - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} -rules: -- apiGroups: ['policy'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: - - {{ template "webhook.fullname" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-psp-clusterrolebinding.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-psp-clusterrolebinding.yaml deleted file mode 100644 index 858df8ff2..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-psp-clusterrolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.global.podSecurityPolicy.enabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "webhook.fullname" . }}-psp - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "webhook.fullname" . }}-psp -subjects: - - kind: ServiceAccount - name: {{ template "webhook.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-psp.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-psp.yaml deleted file mode 100644 index 4d5d959df..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-psp.yaml +++ /dev/null @@ -1,54 +0,0 @@ -{{- if .Values.global.podSecurityPolicy.enabled }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "webhook.fullname" . }} - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} - annotations: - seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default' - seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - {{- if .Values.global.podSecurityPolicy.useAppArmor }} - apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default' - apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - {{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - allowedCapabilities: [] # default set of capabilities are implicitly allowed - volumes: - - 'configMap' - - 'emptyDir' - - 'projected' - - 'secret' - - 'downwardAPI' - hostNetwork: {{ .Values.webhook.hostNetwork }} - {{- if .Values.webhook.hostNetwork }} - hostPorts: - - max: {{ .Values.webhook.securePort }} - min: {{ .Values.webhook.securePort }} - {{- end }} - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1000 - max: 1000 -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-rbac.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-rbac.yaml deleted file mode 100644 index b075ffd46..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-rbac.yaml +++ /dev/null @@ -1,83 +0,0 @@ -{{- if .Values.global.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "webhook.fullname" . }}:dynamic-serving - namespace: {{ include "cert-manager.namespace" . }} - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} -rules: -- apiGroups: [""] - resources: ["secrets"] - resourceNames: - - '{{ template "webhook.fullname" . }}-ca' - verbs: ["get", "list", "watch", "update"] -# It's not possible to grant CREATE permission on a single resourceName. -- apiGroups: [""] - resources: ["secrets"] - verbs: ["create"] ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ template "webhook.fullname" . }}:dynamic-serving - namespace: {{ include "cert-manager.namespace" . }} - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "webhook.fullname" . }}:dynamic-serving -subjects: -- apiGroup: "" - kind: ServiceAccount - name: {{ template "webhook.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "webhook.fullname" . }}:subjectaccessreviews - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} -rules: -- apiGroups: ["authorization.k8s.io"] - resources: ["subjectaccessreviews"] - verbs: ["create"] ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "webhook.fullname" . }}:subjectaccessreviews - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "webhook.fullname" . }}:subjectaccessreviews -subjects: -- apiGroup: "" - kind: ServiceAccount - name: {{ template "webhook.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-service.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-service.yaml deleted file mode 100644 index 5f9395049..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-service.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "webhook.fullname" . }} - namespace: {{ include "cert-manager.namespace" . }} -{{- with .Values.webhook.serviceAnnotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} - {{- with .Values.webhook.serviceLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - type: {{ .Values.webhook.serviceType }} - {{- with .Values.webhook.loadBalancerIP }} - loadBalancerIP: {{ . }} - {{- end }} - ports: - - name: https - port: 443 - protocol: TCP - targetPort: "https" - selector: - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-serviceaccount.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-serviceaccount.yaml deleted file mode 100644 index dff5c0672..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-serviceaccount.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.webhook.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -automountServiceAccountToken: {{ .Values.webhook.serviceAccount.automountServiceAccountToken }} -metadata: - name: {{ template "webhook.serviceAccountName" . }} - namespace: {{ include "cert-manager.namespace" . }} - {{- with .Values.webhook.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} - {{- with .Values.webhook.serviceAccount.labels }} - {{ toYaml . | nindent 4 }} - {{- end }} -{{- with .Values.global.imagePullSecrets }} -imagePullSecrets: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-validating-webhook.yaml b/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-validating-webhook.yaml deleted file mode 100644 index a5d168e29..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/templates/webhook-validating-webhook.yaml +++ /dev/null @@ -1,55 +0,0 @@ -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - name: {{ include "webhook.fullname" . }} - labels: - app: {{ include "webhook.name" . }} - app.kubernetes.io/name: {{ include "webhook.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/component: "webhook" - {{- include "labels" . | nindent 4 }} - annotations: - cert-manager.io/inject-ca-from-secret: {{ printf "%s/%s-ca" (include "cert-manager.namespace" .) (include "webhook.fullname" .) | quote}} - {{- with .Values.webhook.validatingWebhookConfigurationAnnotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -webhooks: - - name: webhook.cert-manager.io - namespaceSelector: - matchExpressions: - - key: "cert-manager.io/disable-validation" - operator: "NotIn" - values: - - "true" - - key: "name" - operator: "NotIn" - values: - - {{ include "cert-manager.namespace" . }} - rules: - - apiGroups: - - "cert-manager.io" - - "acme.cert-manager.io" - apiVersions: - - "v1" - operations: - - CREATE - - UPDATE - resources: - - "*/*" - admissionReviewVersions: ["v1"] - # This webhook only accepts v1 cert-manager resources. - # Equivalent matchPolicy ensures that non-v1 resource requests are sent to - # this webhook (after the resources have been converted to v1). - matchPolicy: Equivalent - timeoutSeconds: {{ .Values.webhook.timeoutSeconds }} - failurePolicy: Fail - sideEffects: None - clientConfig: - {{- if .Values.webhook.url.host }} - url: https://{{ .Values.webhook.url.host }}/validate - {{- else }} - service: - name: {{ template "webhook.fullname" . }} - namespace: {{ include "cert-manager.namespace" . }} - path: /validate - {{- end }} diff --git a/charts/gitlab/gitlab/charts/cert-manager/values.yaml b/charts/gitlab/gitlab/charts/cert-manager/values.yaml deleted file mode 100644 index 35ec9766a..000000000 --- a/charts/gitlab/gitlab/charts/cert-manager/values.yaml +++ /dev/null @@ -1,619 +0,0 @@ -# Default values for cert-manager. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -global: - # Reference to one or more secrets to be used when pulling images - # ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - imagePullSecrets: [] - # - name: "image-pull-secret" - - # Labels to apply to all resources - # Please note that this does not add labels to the resources created dynamically by the controllers. - # For these resources, you have to add the labels in the template in the cert-manager custom resource: - # eg. podTemplate/ ingressTemplate in ACMEChallengeSolverHTTP01Ingress - # ref: https://cert-manager.io/docs/reference/api-docs/#acme.cert-manager.io/v1.ACMEChallengeSolverHTTP01Ingress - # eg. secretTemplate in CertificateSpec - # ref: https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.CertificateSpec - commonLabels: {} - # team_name: dev - - # Optional priority class to be used for the cert-manager pods - priorityClassName: "" - rbac: - create: true - # Aggregate ClusterRoles to Kubernetes default user-facing roles. Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - aggregateClusterRoles: true - - podSecurityPolicy: - enabled: false - useAppArmor: true - - # Set the verbosity of cert-manager. Range of 0 - 6 with 6 being the most verbose. - logLevel: 2 - - leaderElection: - # Override the namespace used for the leader election lease - namespace: "kube-system" - - # The duration that non-leader candidates will wait after observing a - # leadership renewal until attempting to acquire leadership of a led but - # unrenewed leader slot. This is effectively the maximum duration that a - # leader can be stopped before it is replaced by another candidate. - # leaseDuration: 60s - - # The interval between attempts by the acting master to renew a leadership - # slot before it stops leading. This must be less than or equal to the - # lease duration. - # renewDeadline: 40s - - # The duration the clients should wait between attempting acquisition and - # renewal of a leadership. - # retryPeriod: 15s - -installCRDs: false - -replicaCount: 1 - -strategy: {} - # type: RollingUpdate - # rollingUpdate: - # maxSurge: 0 - # maxUnavailable: 1 - -# Comma separated list of feature gates that should be enabled on the -# controller pod & webhook pod. -featureGates: "" - -# The maximum number of challenges that can be scheduled as 'processing' at once -maxConcurrentChallenges: 60 - -image: - repository: quay.io/jetstack/cert-manager-controller - # You can manage a registry with - # registry: quay.io - # repository: jetstack/cert-manager-controller - - # Override the image tag to deploy by setting this variable. - # If no value is set, the chart's appVersion will be used. - # tag: canary - - # Setting a digest will override any tag - # digest: sha256:0e072dddd1f7f8fc8909a2ca6f65e76c5f0d2fcfb8be47935ae3457e8bbceb20 - pullPolicy: IfNotPresent - -# Override the namespace used to store DNS provider credentials etc. for ClusterIssuer -# resources. By default, the same namespace as cert-manager is deployed within is -# used. This namespace will not be automatically created by the Helm chart. -clusterResourceNamespace: "" - -# This namespace allows you to define where the services will be installed into -# if not set then they will use the namespace of the release -# This is helpful when installing cert manager as a chart dependency (sub chart) -namespace: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - # name: "" - # Optional additional annotations to add to the controller's ServiceAccount - # annotations: {} - # Automount API credentials for a Service Account. - # Optional additional labels to add to the controller's ServiceAccount - # labels: {} - automountServiceAccountToken: true - -# Automounting API credentials for a particular pod -# automountServiceAccountToken: true - -# Additional command line flags to pass to cert-manager controller binary. -# To see all available flags run docker run quay.io/jetstack/cert-manager-controller: --help -extraArgs: [] - # When this flag is enabled, secrets will be automatically removed when the certificate resource is deleted - # - --enable-certificate-owner-ref=true - # Use this flag to enable or disable arbitrary controllers, for example, disable the CertificiateRequests approver - # - --controllers=*,-certificaterequests-approver - -extraEnv: [] -# - name: SOME_VAR -# value: 'some value' - -resources: {} - # requests: - # cpu: 10m - # memory: 32Mi - -# Pod Security Context -# ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -securityContext: - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - -# Container Security Context to be set on the controller component container -# ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -containerSecurityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - - -volumes: [] - -volumeMounts: [] - -# Optional additional annotations to add to the controller Deployment -# deploymentAnnotations: {} - -# Optional additional annotations to add to the controller Pods -# podAnnotations: {} - -podLabels: {} - -# Optional annotations to add to the controller Service -# serviceAnnotations: {} - -# Optional additional labels to add to the controller Service -# serviceLabels: {} - -# Optional DNS settings, useful if you have a public and private DNS zone for -# the same domain on Route 53. What follows is an example of ensuring -# cert-manager can access an ingress or DNS TXT records at all times. -# NOTE: This requires Kubernetes 1.10 or `CustomPodDNS` feature gate enabled for -# the cluster to work. -# podDnsPolicy: "None" -# podDnsConfig: -# nameservers: -# - "1.1.1.1" -# - "8.8.8.8" - -nodeSelector: - kubernetes.io/os: linux - -ingressShim: {} - # defaultIssuerName: "" - # defaultIssuerKind: "" - # defaultIssuerGroup: "" - -prometheus: - enabled: true - servicemonitor: - enabled: false - prometheusInstance: default - targetPort: 9402 - path: /metrics - interval: 60s - scrapeTimeout: 30s - labels: {} - annotations: {} - honorLabels: false - -# Use these variables to configure the HTTP_PROXY environment variables -# http_proxy: "http://proxy:8080" -# https_proxy: "https://proxy:8080" -# no_proxy: 127.0.0.1,localhost - -# expects input structure as per specification https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#affinity-v1-core -# for example: -# affinity: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: foo.bar.com/role -# operator: In -# values: -# - master -affinity: {} - -# expects input structure as per specification https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#toleration-v1-core -# for example: -# tolerations: -# - key: foo.bar.com/role -# operator: Equal -# value: master -# effect: NoSchedule -tolerations: [] - -# expects input structure as per specification https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#topologyspreadconstraint-v1-core -# for example: -# topologySpreadConstraints: -# - maxSkew: 2 -# topologyKey: topology.kubernetes.io/zone -# whenUnsatisfiable: ScheduleAnyway -# labelSelector: -# matchLabels: -# app.kubernetes.io/instance: cert-manager -# app.kubernetes.io/component: controller -topologySpreadConstraints: [] - -webhook: - replicaCount: 1 - timeoutSeconds: 10 - - # Used to configure options for the webhook pod. - # This allows setting options that'd usually be provided via flags. - # An APIVersion and Kind must be specified in your values.yaml file. - # Flags will override options that are set here. - config: - # apiVersion: webhook.config.cert-manager.io/v1alpha1 - # kind: WebhookConfiguration - - # The port that the webhook should listen on for requests. - # In GKE private clusters, by default kubernetes apiservers are allowed to - # talk to the cluster nodes only on 443 and 10250. so configuring - # securePort: 10250, will work out of the box without needing to add firewall - # rules or requiring NET_BIND_SERVICE capabilities to bind port numbers <1000. - # This should be uncommented and set as a default by the chart once we graduate - # the apiVersion of WebhookConfiguration past v1alpha1. - # securePort: 10250 - - strategy: {} - # type: RollingUpdate - # rollingUpdate: - # maxSurge: 0 - # maxUnavailable: 1 - - # Pod Security Context to be set on the webhook component Pod - # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - securityContext: - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - - # Container Security Context to be set on the webhook component container - # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - containerSecurityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - - # Optional additional annotations to add to the webhook Deployment - # deploymentAnnotations: {} - - # Optional additional annotations to add to the webhook Pods - # podAnnotations: {} - - # Optional additional annotations to add to the webhook Service - # serviceAnnotations: {} - - # Optional additional annotations to add to the webhook MutatingWebhookConfiguration - # mutatingWebhookConfigurationAnnotations: {} - - # Optional additional annotations to add to the webhook ValidatingWebhookConfiguration - # validatingWebhookConfigurationAnnotations: {} - - # Additional command line flags to pass to cert-manager webhook binary. - # To see all available flags run docker run quay.io/jetstack/cert-manager-webhook: --help - extraArgs: [] - # Path to a file containing a WebhookConfiguration object used to configure the webhook - # - --config= - - resources: {} - # requests: - # cpu: 10m - # memory: 32Mi - - ## Liveness and readiness probe values - ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes - ## - livenessProbe: - failureThreshold: 3 - initialDelaySeconds: 60 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 - readinessProbe: - failureThreshold: 3 - initialDelaySeconds: 5 - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 1 - - nodeSelector: - kubernetes.io/os: linux - - affinity: {} - - tolerations: [] - - topologySpreadConstraints: [] - - # Optional additional labels to add to the Webhook Pods - podLabels: {} - - # Optional additional labels to add to the Webhook Service - serviceLabels: {} - - image: - repository: quay.io/jetstack/cert-manager-webhook - # You can manage a registry with - # registry: quay.io - # repository: jetstack/cert-manager-webhook - - # Override the image tag to deploy by setting this variable. - # If no value is set, the chart's appVersion will be used. - # tag: canary - - # Setting a digest will override any tag - # digest: sha256:0e072dddd1f7f8fc8909a2ca6f65e76c5f0d2fcfb8be47935ae3457e8bbceb20 - - pullPolicy: IfNotPresent - - serviceAccount: - # Specifies whether a service account should be created - create: true - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - # name: "" - # Optional additional annotations to add to the controller's ServiceAccount - # annotations: {} - # Optional additional labels to add to the webhook's ServiceAccount - # labels: {} - # Automount API credentials for a Service Account. - automountServiceAccountToken: true - - # Automounting API credentials for a particular pod - # automountServiceAccountToken: true - - # The port that the webhook should listen on for requests. - # In GKE private clusters, by default kubernetes apiservers are allowed to - # talk to the cluster nodes only on 443 and 10250. so configuring - # securePort: 10250, will work out of the box without needing to add firewall - # rules or requiring NET_BIND_SERVICE capabilities to bind port numbers <1000 - securePort: 10250 - - # Specifies if the webhook should be started in hostNetwork mode. - # - # Required for use in some managed kubernetes clusters (such as AWS EKS) with custom - # CNI (such as calico), because control-plane managed by AWS cannot communicate - # with pods' IP CIDR and admission webhooks are not working - # - # Since the default port for the webhook conflicts with kubelet on the host - # network, `webhook.securePort` should be changed to an available port if - # running in hostNetwork mode. - hostNetwork: false - - # Specifies how the service should be handled. Useful if you want to expose the - # webhook to outside of the cluster. In some cases, the control plane cannot - # reach internal services. - serviceType: ClusterIP - # loadBalancerIP: - - # Overrides the mutating webhook and validating webhook so they reach the webhook - # service using the `url` field instead of a service. - url: {} - # host: - - # Enables default network policies for webhooks. - networkPolicy: - enabled: false - ingress: - - from: - - ipBlock: - cidr: 0.0.0.0/0 - egress: - - ports: - - port: 80 - protocol: TCP - - port: 443 - protocol: TCP - - port: 53 - protocol: TCP - - port: 53 - protocol: UDP - to: - - ipBlock: - cidr: 0.0.0.0/0 - -cainjector: - enabled: true - replicaCount: 1 - - strategy: {} - # type: RollingUpdate - # rollingUpdate: - # maxSurge: 0 - # maxUnavailable: 1 - - # Pod Security Context to be set on the cainjector component Pod - # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - securityContext: - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - - # Container Security Context to be set on the cainjector component container - # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - containerSecurityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - - - # Optional additional annotations to add to the cainjector Deployment - # deploymentAnnotations: {} - - # Optional additional annotations to add to the cainjector Pods - # podAnnotations: {} - - # Additional command line flags to pass to cert-manager cainjector binary. - # To see all available flags run docker run quay.io/jetstack/cert-manager-cainjector: --help - extraArgs: [] - # Enable profiling for cainjector - # - --enable-profiling=true - - resources: {} - # requests: - # cpu: 10m - # memory: 32Mi - - nodeSelector: - kubernetes.io/os: linux - - affinity: {} - - tolerations: [] - - topologySpreadConstraints: [] - - # Optional additional labels to add to the CA Injector Pods - podLabels: {} - - image: - repository: quay.io/jetstack/cert-manager-cainjector - # You can manage a registry with - # registry: quay.io - # repository: jetstack/cert-manager-cainjector - - # Override the image tag to deploy by setting this variable. - # If no value is set, the chart's appVersion will be used. - # tag: canary - - # Setting a digest will override any tag - # digest: sha256:0e072dddd1f7f8fc8909a2ca6f65e76c5f0d2fcfb8be47935ae3457e8bbceb20 - - pullPolicy: IfNotPresent - - serviceAccount: - # Specifies whether a service account should be created - create: true - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - # name: "" - # Optional additional annotations to add to the controller's ServiceAccount - # annotations: {} - # Automount API credentials for a Service Account. - # Optional additional labels to add to the cainjector's ServiceAccount - # labels: {} - automountServiceAccountToken: true - - # Automounting API credentials for a particular pod - # automountServiceAccountToken: true - -acmesolver: - image: - repository: quay.io/jetstack/cert-manager-acmesolver - # You can manage a registry with - # registry: quay.io - # repository: jetstack/cert-manager-acmesolver - - # Override the image tag to deploy by setting this variable. - # If no value is set, the chart's appVersion will be used. - # tag: canary - - # Setting a digest will override any tag - # digest: sha256:0e072dddd1f7f8fc8909a2ca6f65e76c5f0d2fcfb8be47935ae3457e8bbceb20 - -# This startupapicheck is a Helm post-install hook that waits for the webhook -# endpoints to become available. -# The check is implemented using a Kubernetes Job- if you are injecting mesh -# sidecar proxies into cert-manager pods, you probably want to ensure that they -# are not injected into this Job's pod. Otherwise the installation may time out -# due to the Job never being completed because the sidecar proxy does not exit. -# See https://github.com/cert-manager/cert-manager/pull/4414 for context. -startupapicheck: - enabled: true - - # Pod Security Context to be set on the startupapicheck component Pod - # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - securityContext: - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - - # Container Security Context to be set on the controller component container - # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - containerSecurityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - - # Timeout for 'kubectl check api' command - timeout: 1m - - # Job backoffLimit - backoffLimit: 4 - - # Optional additional annotations to add to the startupapicheck Job - jobAnnotations: - helm.sh/hook: post-install - helm.sh/hook-weight: "1" - helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded - - # Optional additional annotations to add to the startupapicheck Pods - # podAnnotations: {} - - # Additional command line flags to pass to startupapicheck binary. - # To see all available flags run docker run quay.io/jetstack/cert-manager-ctl: --help - extraArgs: [] - - resources: {} - # requests: - # cpu: 10m - # memory: 32Mi - - nodeSelector: - kubernetes.io/os: linux - - affinity: {} - - tolerations: [] - - # Optional additional labels to add to the startupapicheck Pods - podLabels: {} - - image: - repository: quay.io/jetstack/cert-manager-ctl - # You can manage a registry with - # registry: quay.io - # repository: jetstack/cert-manager-ctl - - # Override the image tag to deploy by setting this variable. - # If no value is set, the chart's appVersion will be used. - # tag: canary - - # Setting a digest will override any tag - # digest: sha256:0e072dddd1f7f8fc8909a2ca6f65e76c5f0d2fcfb8be47935ae3457e8bbceb20 - - pullPolicy: IfNotPresent - - rbac: - # annotations for the startup API Check job RBAC and PSP resources - annotations: - helm.sh/hook: post-install - helm.sh/hook-weight: "-5" - helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded - - serviceAccount: - # Specifies whether a service account should be created - create: true - - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - # name: "" - - # Optional additional annotations to add to the Job's ServiceAccount - annotations: - helm.sh/hook: post-install - helm.sh/hook-weight: "-5" - helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded - - # Automount API credentials for a Service Account. - automountServiceAccountToken: true - - # Optional additional labels to add to the startupapicheck's ServiceAccount - # labels: {} diff --git a/charts/gitlab/gitlab/charts/certmanager-issuer/Chart.yaml b/charts/gitlab/gitlab/charts/certmanager-issuer/Chart.yaml deleted file mode 100644 index 4345d8a33..000000000 --- a/charts/gitlab/gitlab/charts/certmanager-issuer/Chart.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -appVersion: 0.2.2 -description: Configuration Job to add LetsEncrypt Issuer to cert-manager -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -- cert-manager -- tls -- letsencrypt -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: certmanager-issuer -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/certmanager-issuer -- https://gitlab.com/gitlab-org/build/CNG/tree/master/kubectl -- https://github.com/jetstack/cert-manager -version: 0.1.0 diff --git a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/_create_issuer.sh b/charts/gitlab/gitlab/charts/certmanager-issuer/templates/_create_issuer.sh deleted file mode 100644 index 57b318b5c..000000000 --- a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/_create_issuer.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -e ; - -issuer_file=$1 -namespace={{ .Release.Namespace }} - -echo "Creating the certmanager issuer..." -set +e ; # The CRD may not exist yet. We need to retry until this passes -while ! kubectl --namespace=$namespace apply -f ${issuer_file:=issuer.yml}; do - sleep 1; -done ; -set -e ; # reset `e` as active diff --git a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/certmanager-issuer/templates/_helpers.tpl deleted file mode 100644 index 270e949b1..000000000 --- a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/_helpers.tpl +++ /dev/null @@ -1,40 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "certmanager-issuer.name" -}} -{{- default .Chart.Name .Values.nameOverride | 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). -*/}} -{{- define "certmanager-issuer.fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified job name. -Due to the job only being allowed to run once, we add the chart revision so helm -upgrades don't cause errors trying to create the already ran job. -Due to the helm delete not cleaning up these jobs, we add a random value to -reduce collision -*/}} -{{- define "certmanager-issuer.jobname" -}} -{{- $name := printf "%s-issuer" .Release.Name | trunc 55 | trimSuffix "-" -}} -{{- printf "%s-%d" $name .Release.Revision | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Returns the http01 solver's ingress class field. Takes the IngressClass as paramter. -If the IngressClass is "none", the field is not set. - See: https://cert-manager.io/docs/configuration/acme/http01/#class -*/}} -{{- define "certmanager-issuer.http01.ingress.class.field" -}} -{{- $ingressClass := . | default "" -}} -{{- if ne "none" $ingressClass -}} -class: {{ $ingressClass }} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/_issuer.yaml b/charts/gitlab/gitlab/charts/certmanager-issuer/templates/_issuer.yaml deleted file mode 100644 index 5061d4fff..000000000 --- a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/_issuer.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{ if (pluck "configureCertmanager" .Values.global.ingress (dict "configureCertmanager" false) | first) }} -{{- $ingressCfg := dict "global" $.Values.global.ingress "local" .ingress "context" $ -}} -{{- $ingressClassName := include "ingress.class.name" $ingressCfg -}} -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: {{ .Release.Name }}-issuer - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - acme: - # The ACME server URL - server: {{ .Values.server | quote }} - # Email address used for ACME registration - email: {{ required "You must provide an email to associate with your TLS certificates. Please set certmanager-issuer.email" .Values.email | quote }} - # Name of a secret used to store the ACME account private key - privateKeySecretRef: - name: {{ .Release.Name }}-acme-key - # Enable the HTTP-01 challenge provider - solvers: - - selector: {} - http01: - ingress: - {{ include "certmanager-issuer.http01.ingress.class.field" $ingressClassName -}} -{{ end }} diff --git a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/cert-manager.yml b/charts/gitlab/gitlab/charts/certmanager-issuer/templates/cert-manager.yml deleted file mode 100644 index 2a59eb0f1..000000000 --- a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/cert-manager.yml +++ /dev/null @@ -1,15 +0,0 @@ -{{ if (pluck "configureCertmanager" .Values.global.ingress (dict "configureCertmanager" false) | first) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }}-certmanager - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - create-issuer: | -{{ include (print $.Template.BasePath "/_create_issuer.sh") . | indent 4 }} - issuer.yml: | -{{ include (print $.Template.BasePath "/_issuer.yaml") . | indent 4 }} -{{ end }} diff --git a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/issuer-job.yaml b/charts/gitlab/gitlab/charts/certmanager-issuer/templates/issuer-job.yaml deleted file mode 100644 index 7878755db..000000000 --- a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/issuer-job.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{{ if (pluck "configureCertmanager" .Values.global.ingress (dict "configureCertmanager" false) | first) }} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.global.kubectl.image -}} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "certmanager-issuer.jobname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - activeDeadlineSeconds: 300 - template: - metadata: - labels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - spec: - {{- include "gitlab.nodeSelector" . | nindent 6 }} - securityContext: - runAsUser: {{ .Values.global.kubectl.securityContext.runAsUser }} - fsGroup: {{ .Values.global.kubectl.securityContext.fsGroup }} - {{- if .Values.rbac.create }} - serviceAccountName: {{ template "fullname" . }} - {{- end }} - restartPolicy: OnFailure - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6}} - {{- include "gitlab.priorityClassName" . | nindent 6 }} - containers: - - name: create-issuer - image: {{ include "gitlab.kubectl.image" . }} - command: ['/bin/bash', '/scripts/create-issuer', '/scripts/issuer.yml'] - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - volumeMounts: - - name: scripts - mountPath: /scripts - resources: -{{ toYaml .Values.resources | indent 12 }} - volumes: - - name: scripts - configMap: - name: {{ template "fullname" . }}-certmanager -{{- end }} diff --git a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/rbac-config.yaml b/charts/gitlab/gitlab/charts/certmanager-issuer/templates/rbac-config.yaml deleted file mode 100644 index 78fed4a5d..000000000 --- a/charts/gitlab/gitlab/charts/certmanager-issuer/templates/rbac-config.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{ if and .Values.rbac.create (pluck "configureCertmanager" .Values.global.ingress (dict "configureCertmanager" false) | first) }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - namespace: {{ .Release.Namespace }} ---- -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "fullname" . }} - namespace: {{ .Release.Namespace }} -rules: -- apiGroups: ["cert-manager.io"] - resources: ["issuers"] - verbs: ["get", "list", "update", "create", "patch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - app: {{ template "name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "fullname" . }} - namespace: {{ .Release.Namespace }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/certmanager-issuer/values.yaml b/charts/gitlab/gitlab/charts/certmanager-issuer/values.yaml deleted file mode 100644 index ac4152434..000000000 --- a/charts/gitlab/gitlab/charts/certmanager-issuer/values.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# Configure an ACME Issuer in cert-manager. Only used if global.ingress.configureCertmanager is true. -server: https://acme-v02.api.letsencrypt.org/directory - -# Provide an email to associate with your TLS certificates -# email: - -rbac: - create: true - -resources: - requests: - cpu: 50m - -# Priority class assigned to pods -priorityClassName: "" - -common: - labels: {} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab-ci.yml b/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab-ci.yml deleted file mode 100644 index 3575783ee..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab-ci.yml +++ /dev/null @@ -1,177 +0,0 @@ -############## -# Conditions # -############## - -.if-merge-request-pipeline: &if-merge-request-pipeline - if: $CI_PIPELINE_SOURCE == "merge_request_event" - -.if-default-branch: &if-default-branch - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - -.if-stable-release-branch: &if-stable-release-branch - if: $CI_COMMIT_REF_NAME =~ /\A[0-9]+-[0-9]+-stable\z/ - -.if-release-tag: &if-release-tag - if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$/ && $CI_PROJECT_URL == "https://gitlab.com/gitlab-org/charts/gitlab-runner"' - -.if-security-release-tag: &if-security-release-tag - if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$/ && $CI_PROJECT_URL == "https://gitlab.com/gitlab-org/security/charts/gitlab-runner"' - -######### -# Rules # -######### - -.rules:default: - rules: - - <<: *if-merge-request-pipeline - - <<: *if-default-branch - - <<: *if-stable-release-branch - - <<: *if-release-tag - - <<: *if-security-release-tag - -.rules:release:development: - rules: - - <<: *if-default-branch - when: never - - <<: *if-merge-request-pipeline - when: manual - -.rules:release:beta: - rules: - - <<: *if-default-branch - -.rules:release:stable: - rules: - - <<: *if-release-tag - - <<: *if-security-release-tag - -############ -# Pipeline # -############ - -default: - image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base-helm-3.7 - tags: - - gitlab-org - -variables: - GIT_CLONE_PATH: $CI_BUILDS_DIR/gitlab-runner - -stages: -- test -- release -- post-release - -lint: - extends: - - .rules:default - stage: test - script: - - helm lint . - -integration test: - extends: - - .rules:default - variables: - DOCKER_HOST: "tcp://kubernetes:2375/" - DOCKER_TLS_CERTDIR: "" - DOCKER_DRIVER: overlay2 - INTEGRATION_RUNNER_NAME: integration-test-$CI_COMMIT_SHORT_SHA - INTEGRATION_HELM_POD_RELEASE_LABEL: release=$INTEGRATION_RUNNER_NAME - stage: test - services: - - name: docker:20.10.16-dind - alias: kubernetes - image: docker:20.10.16-git - script: - # Initialize KIND cluster - - apk add --no-cache openssl curl bash curl-dev - - curl -Lo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.20.4/bin/linux/amd64/kubectl && chmod +x /usr/local/bin/kubectl - - curl -Lo /usr/local/bin/kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64 && chmod +x /usr/local/bin/kind - - kind create cluster --config=$(pwd)/scripts/kind-config.yaml - - kind get kubeconfig|sed -e 's/0.0.0.0/kubernetes/g' > kubeconfig.yaml - - export KUBECONFIG=$(pwd)/kubeconfig.yaml - - kubectl version - - kubectl cluster-info - - bash -c "for _i in {0..60}; do kubectl -n default get serviceaccount default -o name > /dev/null 2>&1 && break; sleep 1; done" - - bash -c "for _i in {0..60}; do kubectl get nodes|grep -w Ready > /dev/null 2>&1 && break; sleep 1; done" - # Install helm latest version instead of pre-installed one in registry.gitlab.com/gitlab-org/gitlab-build-images image - - curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash - # Run tests - - bash -x scripts/integration.sh - after_script: - - export KUBECONFIG=$(pwd)/kubeconfig.yaml - - bash -x scripts/integration_cleanup.sh - tags: - - gitlab-org-docker - -release development: - extends: - - .rules:release:development - stage: release - script: - - helm package . - artifacts: - paths: - - gitlab-runner*.tgz - expire_in: 7d - allow_failure: true - -release beta: - extends: - - .rules:release:beta - stage: release - variables: - S3_URL: s3://${S3_BUCKET}${S3_PATH} - REPO_URL: https://${S3_BUCKET}.s3.amazonaws.com${S3_PATH} - script: - - apk add --no-cache py-pip - - pip install awscli - - 'beta_info=$(git describe --long | sed -r "s/v[0-9\.]+(-rc[0-9]+)?-//")' - - 'build_time=$(date +%s)' - - 'sed -r "s/(version: [0-9\.]+-beta)/\1-${build_time}-${beta_info}/" -i Chart.yaml' - - 'sed -r "s/appVersion: .*/appVersion: bleeding/" -i Chart.yaml' - - 'sed -r "s/imagePullPolicy: IfNotPresent/imagePullPolicy: Always/" -i values.yaml' - - mkdir -p public/ - - aws s3 cp ${S3_URL}/index.yaml public/index.yaml || true - - (cd public; helm package ../) - - helm repo index public --merge public/index.yaml --url ${REPO_URL} - - aws s3 sync public ${S3_URL} --acl public-read - - 'echo "To install repository run: helm repo add gitlab-runner-beta ${REPO_URL} && helm repo update"' - -release stable: - extends: - - .rules:release:stable - stage: release - image: alpine:3.14 - script: - - apk add --no-cache curl - - curl --fail-with-body - --request POST - --form "token=$CI_JOB_TOKEN" - --form ref=master - --form "variables[CHART_NAME]=$CI_PROJECT_NAME" - --form "variables[RELEASE_REF]=$CI_COMMIT_REF_NAME" - https://gitlab.com/api/v4/projects/2860651/trigger/pipeline - -trigger charts update: - extends: - - .rules:release:stable - stage: post-release - image: alpine:3.14 - script: - - apk add --no-cache curl - - curl --fail-with-body - --request POST - --form "token=${GITLAB_CHARTS_TRIGGER_TOKEN}" - --form ref=master - --form "variables[DEPS_PIPELINE]=true" - https://gitlab.com/api/v4/projects/3828396/trigger/pipeline - needs: - - job: release stable - -############## -# Includes # -############## -include: - - template: Security/Dependency-Scanning.gitlab-ci.yml diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/.common.release.yml b/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/.common.release.yml deleted file mode 100644 index 9f76ddffb..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/.common.release.yml +++ /dev/null @@ -1,58 +0,0 @@ -.new-runner-version-changelog: &new-runner-version-changelog - changelog_entry: - scope: new-feature - entry: Update GitLab Runner version to v{{ .Release.AppVersion }} - -.update-chart-versions: &update-chart-versions - write: - file: Chart.yaml - contents: | - apiVersion: v1 - name: gitlab-runner - version: {{ .Release.Version }} - appVersion: {{ .Release.AppVersion }} - description: GitLab Runner - keywords: - - git - - ci - - deploy - sources: - - https://gitlab.com/gitlab-org/charts/gitlab-runner - - https://gitlab.com/gitlab-org/gitlab-runner - - https://docs.gitlab.com/runner/ - icon: https://gitlab.com/uploads/-/system/project/avatar/250833/runner_logo.png - maintainers: - - name: GitLab Inc. - email: support@gitlab.com - -.commit-chart-versions: &commit-chart-versions - commit: - files: [Chart.yaml] - message: Update Chart version to v{{ .Release.Version }} and used GitLab Runner version to v{{ .Release.AppVersion }} - -.update-chart-versions-after-merge: &update-chart-versions-after-merge - write: - file: Chart.yaml - contents: | - apiVersion: v1 - name: gitlab-runner - version: {{ .Release.VersionObject.NextMinor }}-beta - appVersion: bleeding - description: GitLab Runner - keywords: - - git - - ci - - deploy - sources: - - https://gitlab.com/gitlab-org/charts/gitlab-runner - - https://gitlab.com/gitlab-org/gitlab-runner - - https://docs.gitlab.com/runner/ - icon: https://gitlab.com/uploads/-/system/project/avatar/250833/runner_logo.png - maintainers: - - name: GitLab Inc. - email: support@gitlab.com - -.commit-chart-versions-after-merge: &commit-chart-versions-after-merge - commit: - files: [Chart.yaml] - message: Update Chart version to v{{ .Release.VersionObject.NextMinor }}-beta and used GitLab Runner version to bleeding diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/branch.release.yml b/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/branch.release.yml deleted file mode 100644 index 6c9abbcc6..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/branch.release.yml +++ /dev/null @@ -1,7 +0,0 @@ -include: - - .common.release.yml - -actions: - - *new-runner-version-changelog - - *update-chart-versions - - *commit-chart-versions diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/changelog.release.yml b/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/changelog.release.yml deleted file mode 100644 index 3baf00fa2..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/changelog.release.yml +++ /dev/null @@ -1,5 +0,0 @@ -include: - - .common.release.yml - -actions: - - *new-runner-version-changelog diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/changelog.yml b/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/changelog.yml deleted file mode 100644 index b37c90f9e..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/changelog.yml +++ /dev/null @@ -1,53 +0,0 @@ -default_scope: other -names: - new-feature: New features - security-fix: Security fixes - fix: Bug fixes - maintenance: Maintenance - runner-distribution: GitLab Runner distribution - documentation: Documentation changes - other: Other changes -order: -- new-feature -- security-fix -- fix -- maintenance -- runner-distribution -- documentation -- other -label_matchers: -- labels: - - runner-distribution - scope: runner-distribution -- labels: - - feature::addition - scope: new-feature -- labels: - - security - scope: security-fix -- labels: - - type::bug - scope: fix -- labels: - - type::maintenance - scope: maintenance -- labels: - - feature::enhancement - scope: new-feature -- labels: - - maintenance::refactor - scope: maintenance -- labels: - - maintenance::pipelines - scope: maintenance -- labels: - - maintenance::workflow - scope: maintenance -- labels: - - documentation - scope: documentation -authorship_labels: -- Community contribution -skip_changelog_labels: -- skip-changelog - diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/merge.release.yml b/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/merge.release.yml deleted file mode 100644 index 2469d50ea..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/.gitlab/merge.release.yml +++ /dev/null @@ -1,6 +0,0 @@ -include: - - .common.release.yml - -actions: - - *update-chart-versions-after-merge - - *commit-chart-versions-after-merge diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/.helmignore b/charts/gitlab/gitlab/charts/gitlab-runner/.helmignore deleted file mode 100644 index 73d4b1653..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/.helmignore +++ /dev/null @@ -1,24 +0,0 @@ -# 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 - -gitlab-runner*.tgz -scripts/ diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/CHANGELOG.md b/charts/gitlab/gitlab/charts/gitlab-runner/CHANGELOG.md deleted file mode 100644 index 8e6c9dc1b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/CHANGELOG.md +++ /dev/null @@ -1,568 +0,0 @@ -## v0.52.0 (2023-04-22) - -### New features - -- Update GitLab Runner version to v15.11.0 - -### Bug fixes - -- Enable ability to use tini instead of dumb-init !385 -- Invalid yaml when creating service account with no annotations !381 (Zev Isert @zevisert) - -### Maintenance - -- Fix failure in integration tests !390 -- Add merge release config to be executed after stable branches are merged into the main branch !387 - -## v0.48.0 (2022-12-17) - -### New features - -- Update GitLab Runner version to 15.7.0 - -## v0.47.0 (2022-11-22) - -### New features - -- Update GitLab Runner version to 15.6.0 - -## v0.46.0 (2022-10-21) - -### New features - -- Update GitLab Runner version to 15.5.0 - -## v0.45.0 (2022-09-21) - -### New features - -- Update GitLab Runner version to 15.4.0 -- Add secrets update permission to RBAC example provided !349 (Tim Hobbs @hobti01) - -### Bug fixes - -- Revert "Merge branch 'feature/unregister-one-runner' into 'main'" !362 - -### Maintenance - -- Fix the pipeline being blocked by development release !357 -- Docs: Update values.yaml comments to reference kubernetes service accounts docs !310 - -## v0.44.0 (2022-08-19) - -### New features - -- Update GitLab Runner version to 15.3.0 -- Add secrets update permission to RBAC example provided !349 (Tim Hobbs @hobti01) - -### Maintenance - -- Fix the pipeline being blocked by development release !357 - -### Documentation changes - -- Docs: Update values.yaml comments to reference kubernetes service accounts docs !310 - -## v0.43.0 (2022-07-20) - -### New features - -- Update GitLab Runner version to 15.2.0 - -### Documentation changes - -- Fix some dead links !356 (Ben Bodenmiller @bbodenmiller) - -## v0.42.0 (2022-06-20) - -### New features - -- Update GitLab Runner version to 15.1.0 -- Add priority classname !350 -- Update namespaces to be consistent across manifests !343 (blacktide @blacktide) -- Add freely configurable securityContext to deployment !354 -- Add possibility to overwrite default image registry !351 (Patrik Votoček @vrtak-cz) -- Make session server service annotations configurable !336 (Matthias Baur @m.baur) - -### Maintenance - -- Add volume and volumeMount support to runner deployment !348 -- ci: Update Helm from 3.4.1 to 3.7.2 !347 (Takuya Noguchi @tnir) -- Update Docker to 20.10 on integration test !346 (Takuya Noguchi @tnir) -- Update default registry to GitLab Runner registry !345 -- Update casing of GitLab in values YAML file !344 (Ben Bodenmiller @bbodenmiller) -- Remove unneeded rbac role !335 (Matthias Baur @m.baur) - -## v0.41.0 (2022-05-19) - -### New features - -- Update GitLab Runner version to 15.0.0 -- Add the ability to unregister only one runner !329 (LAKostis @LAKostis) -- Remove init container and instead project secrets !312 -- Don't repeat chart name if release name starts with the chart name !232 (Ahmadali Shafiee @ahmadalli) - -### Maintenance - -- Use Helm 3 instead of 2.16.9 on lint/release jobs !342 (Takuya Noguchi @tnir) - -## v0.40.0 (2022-04-20) - -### New features - -- Update GitLab Runner version to 14.10.0 -- Add the possibility to configure maximum timeout that will be set for jobs when using the runner !341 (Adrien Gooris @adrien.gooris) - -### Maintenance - -- Add a post-release CI job to trigger a deps pipeline in Charts repo !339 -- Add helm install integration test !326 -- Make loadBalancerSourceRanges of Session Server configurable !334 (Matthias Baur @m.baur) - -## v0.39.0 (2022-03-21) - -### New Features - -- Update GitLab Runner version to 14.9.0 - -### Bug fixes - -- Disable metrics endpoint by default !337 - -### Maintenance - -- Update labels according to latest taxonomy !338 - -## v0.38.1 (2022-03-02) - -### New Features - -- Update GitLab Runner version to 14.8.2 - -## v0.38.0 (2022-02-21) - -### Maintenance - -- Fix urls with runners configuration information !314 (Dmitriy Stoyanov @DmitriyStoyanov) -- k8s rbac: add more resources in comment. !307 (Chen Yufei @cyfdecyf) -- Add dependency scanning to Runner Helm Chart project !331 - -## v0.37.2 (2022-01-24) - -### Bug fixes - -- Fix appVersion to 14.7.0 - -## v0.37.1 (2022-01-20) - -### Bug fixes - -- Set sessionServer to false by default !332 - -## v0.37.0 (2022-01-19) - -### New Features - -- Update GitLab Runner version to 14.7.0 -- Add support for interactive web terminal !320 - -## v0.36.0 (2021-12-18) - -### New features - -- Update GitLab Runner version to 14.6.0 - -### Bug fixes - -- Fix prometheus annotation unquoted value !323 - -### GitLab Runner distribution - -- Fix the security release rule in .gitlab-ci.yml !324 -- Fail the stable release job on curl failures !322 - -## v0.35.3 (2021-12-13) - -### Maintenance - -- Fix prometheus annotation unquoted value !323 - -## v0.35.2 (2021-12-10) - -### Security - -- Update GitLab Runner version to 14.5.2 - -## v0.35.1 (2021-12-01) - -### Security - -- Update GitLab Runner version to 14.5.1 - -## v0.35.0 (2021-11-21) - -### New features - -- Update GitLab Runner version to 14.5.0 - -### Maintenance - -- Don't run pipelines only for MRs !318 -- Update changelog generator configuration !317 -- Adds configurable value probeTimeoutSeconds !306 (Kyle Wetzler @kwetzler1) - -## v0.34.0-rc1 (2021-10-11) - -### New features - -- Update GitLab Runner version to 14.4.0-rc1 - -### Maintenance - -- Disallow setting both replicas and runnerToken !289 - -## v0.33.0 (2021-09-29) - -### New features - -- Update GitLab Runner version to 14.3.0 - -### Maintenance - -- Update container entrypoint to use `dumb-init` to avoid zombie processes !311 (Georg Lauterbach @georglauterbach) - -## v0.32.0 (2021-08-22) - -### New features - -- Update GitLab Runner version to 14.2.0 -- Add support for revisionHistoryLimit !299 (Romain Grenet @romain.grenet1) - -## v0.31.0 (2021-07-20) - -### New features - -- Update GitLab Runner version to 14.1.0 - -### Bug fixes - -- Only add environment variables if values set !295 (Matthew Warman @mcwarman) - -## v0.30.0 (2021-06-19) - -### New features - -- Update GitLab Runner version to 14.0.0 - -### Bug fixes - -- Resolve runner ignores request_concurrency !296 - -### Maintenance - -- refactor: change default brach references to main !298 -- Add support for specifying schedulerName on deployment podspec. !284 (Dominic Bevacqua @dbevacqua) - -## v0.29.0 (2021-05-20) - -### New features - -- Update GitLab Runner version to 13.12.0 - -## v0.28.0 (2021-04-20) - -### New features - -- Update GitLab Runner version to 13.11.0 - -### Maintenance - -- Pass runners.config through the template engine !290 (Dmitriy @Nevoff89) -- Add role support of individual verbs list for different resources !280 (Horatiu Eugen Vlad @hvlad) -- Use runner namespace for role and role binding if it is specified !256 (Alex Sears @searsaw) -- Add optional configuration values for pod security context `runAsUser` and `supplementalGroups` !242 (Horatiu Eugen Vlad @hvlad) - -### Documentation changes - -- docs: add notice that we run tpl on runner config !291 -- Add comment on imagePullPolicy !288 - -## v0.27.0 (2021-03-21) - -### New features - -- Update GitLab Runner version to 13.10.0 -- Allow setting deployment replicas !286 -- Add support for specify ConfigMaps for gitlab-runner deployment !285 -- Allow to mount arbitrary Kubernetes secrets !283 - -## v0.26.0 (2021-02-22) - -### New features - -- Update GitLab Runner version to 13.9.0 -- Make executor configurable !273 (Matthias Baur @m.baur) - -### Other changes - -- Typo fix !282 (Ben Bodenmiller @bbodenmiller) - -## v0.25.0 (2021-01-20) - -### New features - -- Support secrets for Azure cache !277 -- Update GitLab Runner version to 13.8.0 - -### Maintenance - -- Fix release CI stage failing due to Helm stable deprecation !278 -- Update GitLab Changelog configuration !275 - -### Documentation changes - -- Update link to doc in README.md !276 - -## v0.24.0 (2020-12-21) - -### New features - -- Update GitLab Runner version to 13.7.0 -- add optional 'imagePullSecrets' to deployment !269 (Christian Schoofs @schoofsc) - -### Other changes - -- Make description configruable !229 (Matthias Baur @m.baur) - -## v0.23.0 (2020-11-21) - -### New features - -- Update GitLab Runner version to 13.6.0 -- Allow user to specify any runner configuraton !271 - -## v0.22.0 (2020-10-20) - -### New features - -- Update GitLab Runner version to 13.5.0 -- Add pull secrets to service account for runner image !241 (Horatiu Eugen Vlad @hvlad) - -### Maintenance - -- Set allowPrivilegeEscalation to false for gitlab-runner pod !243 (Horatiu Eugen Vlad @hvlad) - -### Documentation changes - -- Add comment on ubuntu image & securityContext !260 - -## v0.21.0 (2020-09-21) - -### Maintenance - -- Update GitLab Runner version to 13.4.0 -- Fix changelog generator config to catch all maintenance related labels !255 - -### Other changes - -- Add scripts/security-harness script !258 - -## v0.20.0 (2020-08-20) - -### New features - -- Update GitLab Runner version to 13.3.0 -- Enable custom commands !250 - -### Maintenance - -- Add `release stable` job for security fork !252 -- Update changelog generator to accept new labels !249 - -## v0.19.0 (2020-07-20) - -### New features - -- Allow user to define PodSecurityPolicy !184 (Paweł Kalemba @pkalemba) -- Update GitLab Runner version to 13.2.0 - -### Documentation changes - -- Fix external links within values.yaml !248 (Alexandre Jardin @alexandre.jardin) - -## v0.18.0 (2020-06-19) - -### Maintenance - -- Update GitLab Runner version to 13.1.0 - -### Other changes - -- Fix unregister when using token secret !231 (Bernd @arabus) -- Support specifying pod security context. !219 (Chen Yufei @cyfdecyf) - -## v0.17.1 (2020-06-01) - -### Maintenance - -- Update GitLab Runner version to 13.0.1 - -## v0.17.0 (2020-05-20) - -### New features - -- Expose settings for kubernetes resource limits and requests overwrites !220 (Alexander Petermann @lexxxel) -- Add support for setting Node Tolerations !188 (Zeyu Ye @Shuliyey) - -### Maintenance - -- Update GitLab Runner version to 13.0.0 -- Update package name in note !234 -- Pin CI jobs to gitlab-org runners !222 - -## v0.16.0 (2020-04-22) - -### New features - -- Add Service Account annotation support !211 (David Rosson @davidrosson) - -### Bug fixes - -- Support correct spelling of GCS secret !214 (Arthur Wiebe @arthur65) - -### Maintenance - -- Remove dependency of `gitlab-runner-builder` runner !221 -- Fix linting for forks with a different name than "gitlab-runner" !218 -- Install gitlab-changelog installation !217 - -### Other changes - -- Update GitLab Runner version to 12.10.1 -- Change listen address to not force IPv6 !213 (Fábio Matavelli @fabiomatavelli) - -## v0.15.0 (2020-03-20) - -### Maintenance - -- Update GitLab Runner version to 12.9.0 -- Update changelog generator configuration !212 -- Replace changelog entries generation script !209 - -### Other changes - -- Fix values.yaml typo !210 (Brian Choy @bycEEE) - -## v0.14.0 (2020-02-22) - -- Update GitLab Runner version to 12.8.0 - -## v0.13.0 (2020-01-20) - -- Add podLabels to the deployment !198 -- Mount custom-certs in configure init container !202 - -## v0.12.0 (2019-12-22) - -- Add `apiVersion: v1` to chart.yaml !195 -- Add documentation to protected Runners !193 -- Make securityContext configurable !199 -- Update GitLab Runner version to 12.6.0 - -## v0.11.0 (2019-11-20) - -- Variables for RUNNER_OUTPUT_LIMIT, and KUBERNETES_POLL_TIMEOUT !50 -- Add support for register protected Runners !185 - -## v0.10.1 (2019-10-28) - -- Update GitLab Runner to 12.4.1 - -## v0.10.0 (2019-10-21) - -- Updated GitLab Runner to 12.4.0 -- Use updated project path to release helm chart !172 -- Update resources API to stable verson !167 -- Add support for specifying log format !170 -- Use the cache.secret template to check if the secretName is set !166 -- Drop need for helm force update for now !181 -- Fix image version detection for old helm versions !173 - -## v0.9.0 (2019-09-20) - -- Use updated project path to release helm chart !172 -- Enabling horizontal pod auto-scaling based on custom metrics !127 -- Change base image used for CI jobs !156 -- Remove DJ as a listed chart maintainer !160 -- Release beta version on master using Bleeding Edge image !155 -- Update definition of 'release beta' CI jobs !164 -- Fix certs path in the comment in values file !148 -- Implement support for run-untagged option !140 -- Use new location for helm charts repo !162 -- Follow-up to adding run-untagged support !165 - -## v0.8.0 (2019-08-22) - -- Add suport for graceful stop !150 - -## v0.7.0 (2019-07-22) - -- Fix broken anchor link for gcs cache docs !135 -- Allow user to set rbac roles !112 -- Bump used Runner version to 12.1.0 !149 - -## v0.6.0 (2019-06-24) - -- Allow to manually build the package for development branches !120 -- When configuring cache: if no S3 secret assume IAM role !111 -- Allow to define request_concurrency value !121 -- Bump used Runner version to 12.0.0 !138 - -## v0.5.0 (2019-05-22) - -- Bump used Runner version to 11.11.0 !126 - -## v0.4.1 (2019-04-24) - -- Bump used Runner version to 11.10.1 !113 - -## v0.4.0 (2019-04-22) - -- Bump used Runner version to 11.10.0-rc2 !108 -- Fix a typo in values.yaml !101 -- Add pod labels for jobs !98 -- add hostAliases for pod assignment !89 -- Configurable deployment annotations !44 -- Add pod annotations for jobs !97 -- Bump used Runner version to 11.10.0-rc1 !107 - -## v0.3.0 (2019-03-22) - -- Change mount of secret with S3 distributed cache credentials !64 -- Add environment variables to runner !48 -- Replace S3_CACHE_INSECURE with CACHE_S3_INSECURE !90 -- Update values.yaml to remove invalid anchor in comments !85 -- Bump used Runner version to 11.9.0 !102 - -## v0.2.0 (2019-02-22) - -- Fix the error caused by unset 'locked' value !79 -- Create LICENSE file !76 -- Add CONTRIBUTING.md file !81 -- Add plain MIT text into LICENSE and add NOTICE !80 -- Fix incorrect custom secret documentation !71 -- Add affinity, nodeSelector and tolerations for pod assignment !56 -- Ignore scripts directory when buildin helm chart !83 -- Bump used Runner version to 11.8.0-rc1 !87 -- Fix year in Changelog - it's already 2019 !84 - -## v0.1.45 (2019-01-22) - -- Trigger release only for tagged versions !72 -- Fixes typos in values.yaml comments !60 -- Update chart to bring closer to helm standard template !43 -- Add nodeSelector config parameter for CI job pods !19 -- Prepare CHANGELOG management !75 -- Track app version in Chart.yaml !74 -- Fix the error caused by unset 'locked' value !79 -- Bump used Runner version to 11.7.0 !82 diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/CONTRIBUTING.md b/charts/gitlab/gitlab/charts/gitlab-runner/CONTRIBUTING.md deleted file mode 100644 index 1e55f9298..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/CONTRIBUTING.md +++ /dev/null @@ -1,16 +0,0 @@ -## Developer Certificate of Origin + License - -By contributing to GitLab B.V., You accept and agree to the following terms and -conditions for Your present and future Contributions submitted to GitLab B.V. -Except for the license granted herein to GitLab B.V. and recipients of software -distributed by GitLab B.V., You reserve all right, title, and interest in and to -Your Contributions. All Contributions are subject to the following DCO + License -terms. - -[DCO + License](https://gitlab.com/gitlab-org/dco/blob/master/README.md) - -All Documentation content that resides under the [docs/ directory](/docs) of this -repository is licensed under Creative Commons: -[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). - -_This notice should stay as the first item in the CONTRIBUTING.md file._ diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/Chart.yaml deleted file mode 100644 index e013aca1a..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -appVersion: 15.11.0 -description: GitLab Runner -icon: https://gitlab.com/uploads/-/system/project/avatar/250833/runner_logo.png -keywords: -- git -- ci -- deploy -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: gitlab-runner -sources: -- https://gitlab.com/gitlab-org/charts/gitlab-runner -- https://gitlab.com/gitlab-org/gitlab-runner -- https://docs.gitlab.com/runner/ -version: 0.52.0 diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/LICENSE b/charts/gitlab/gitlab/charts/gitlab-runner/LICENSE deleted file mode 100644 index df96b2969..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-2019 GitLab B.V. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/Makefile b/charts/gitlab/gitlab/charts/gitlab-runner/Makefile deleted file mode 100644 index d83671c78..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -GITLAB_CHANGELOG_VERSION ?= master -GITLAB_CHANGELOG = .tmp/gitlab-changelog-$(GITLAB_CHANGELOG_VERSION) - -.PHONY: generate_changelog -generate_changelog: export CHANGELOG_RELEASE ?= dev -generate_changelog: $(GITLAB_CHANGELOG) - # Generating new changelog entries - @$(GITLAB_CHANGELOG) -project-id 6329679 \ - -release $(CHANGELOG_RELEASE) \ - -starting-point-matcher "v[0-9]*.[0-9]*.[0-9]*" \ - -config-file .gitlab/changelog.yml \ - -changelog-file CHANGELOG.md - -$(GITLAB_CHANGELOG): OS_TYPE ?= $(shell uname -s | tr '[:upper:]' '[:lower:]') -$(GITLAB_CHANGELOG): DOWNLOAD_URL = "https://storage.googleapis.com/gitlab-runner-tools/gitlab-changelog/$(GITLAB_CHANGELOG_VERSION)/gitlab-changelog-$(OS_TYPE)-amd64" -$(GITLAB_CHANGELOG): - # Installing $(DOWNLOAD_URL) as $(GITLAB_CHANGELOG) - @mkdir -p $(shell dirname $(GITLAB_CHANGELOG)) - @curl -sL "$(DOWNLOAD_URL)" -o "$(GITLAB_CHANGELOG)" - @chmod +x "$(GITLAB_CHANGELOG)" diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/NOTICE b/charts/gitlab/gitlab/charts/gitlab-runner/NOTICE deleted file mode 100644 index aa3eb4d3d..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/NOTICE +++ /dev/null @@ -1,30 +0,0 @@ -With regard to the GitLab Software: - -The MIT License (MIT) - -Copyright (c) 2018-2019 GitLab B.V. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ---- - -For all third party components incorporated into the GitLab Software, those -components are licensed under the original license provided by the owner of the -applicable component. - diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/README.md b/charts/gitlab/gitlab/charts/gitlab-runner/README.md deleted file mode 100644 index 0bb14755e..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# GitLab Runner Helm Chart - -This chart deploys a GitLab Runner instance into your Kubernetes -cluster. For more information, please review [our documentation](https://docs.gitlab.com/charts/charts/gitlab/gitlab-runner). diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/NOTES.txt b/charts/gitlab/gitlab/charts/gitlab-runner/templates/NOTES.txt deleted file mode 100644 index 68ab758f0..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/NOTES.txt +++ /dev/null @@ -1,36 +0,0 @@ -{{- if include "gitlab-runner.gitlabUrl" . }} -Your GitLab Runner should now be registered against the GitLab instance reachable at: {{ include "gitlab-runner.gitlabUrl" . }} -{{- else -}} -############################################################################################# -## WARNING: You did not specify an gitlabUrl in your 'helm install' call. ## -############################################################################################# - -This deployment will be incomplete until you provide the URL that your -GitLab instance is reachable at: - - helm upgrade {{ .Release.Name }} \ - --set gitlabUrl=http://gitlab.your-domain.com,runnerRegistrationToken=your-registration-token \ - gitlab/gitlab-runner -{{- end -}} - -{{- if not .Values.runners.config }} -############################################################################################# -## WARNING: You don't seem to be using the GitLab Runner config template functionality. ## -## Configuring the GitLab Runner through that template is recommended as other ## -## configuration options will be deprecated in Helm Chart 1.0. Read more at ## -## https://docs.gitlab.com/runner/install/kubernetes.html#using-configuration-template. ## -############################################################################################# -{{- end }} - -{{- $runnerNamespace := regexFind "\\s*namespace\\s*=.+\\s*" (tpl .Values.runners.config $) | regexFind "=.+" | trimPrefix "=" | trim -}} -{{- if regexMatch "\\s*namespace\\s*=" .Values.runners.config }} - -Runner namespace {{ $runnerNamespace }} was found in runners.config template. -{{- if .Values.runners.namespace }} - -############################################################################################# -## WARNING: You have set the namespace in runners.config and also set in deprecated ## -## runner.namespace element. The runners.config namespace will be ignored. ## -############################################################################################# -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/_cache.tpl b/charts/gitlab/gitlab/charts/gitlab-runner/templates/_cache.tpl deleted file mode 100644 index 80b001c51..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/_cache.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{{- define "gitlab-runner.cache" }} -{{- if .Values.runners.cache.cacheType }} -- name: CACHE_TYPE - value: {{ default "" .Values.runners.cache.cacheType | quote }} -- name: CACHE_PATH - value: {{ coalesce .Values.runners.cache.cachePath .Values.runners.cache.s3CachePath | default "" | quote }} -{{- if .Values.runners.cache.cacheShared }} -- name: CACHE_SHARED - value: "true" -{{- end }} -{{- if eq .Values.runners.cache.cacheType "s3" }} -- name: CACHE_S3_SERVER_ADDRESS - value: {{ include "gitlab-runner.cache.s3ServerAddress" . }} -- name: CACHE_S3_BUCKET_NAME - value: {{ default "" .Values.runners.cache.s3BucketName | quote }} -- name: CACHE_S3_BUCKET_LOCATION - value: {{ default "" .Values.runners.cache.s3BucketLocation | quote }} -{{- if .Values.runners.cache.s3CacheInsecure }} -- name: CACHE_S3_INSECURE - value: "true" -{{- end }} -{{- end }} -{{- if eq .Values.runners.cache.cacheType "gcs" }} -- name: CACHE_GCS_BUCKET_NAME - value: {{ default "" .Values.runners.cache.gcsBucketName | quote }} -{{- end }} -{{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/_env_vars.tpl b/charts/gitlab/gitlab/charts/gitlab-runner/templates/_env_vars.tpl deleted file mode 100644 index ba3b44174..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/_env_vars.tpl +++ /dev/null @@ -1,145 +0,0 @@ -{{- define "gitlab-runner.runner-env-vars" }} -- name: CI_SERVER_URL - value: {{ include "gitlab-runner.gitlabUrl" . }} -- name: CLONE_URL - value: {{ default "" .Values.runners.cloneUrl | quote }} -{{- if .Values.runners.requestConcurrency }} -- name: RUNNER_REQUEST_CONCURRENCY - value: {{ default 1 .Values.runners.requestConcurrency | quote }} -{{- end }} -- name: RUNNER_EXECUTOR - value: {{ default "kubernetes" .Values.runners.executor | quote }} -- name: REGISTER_LOCKED - {{ if or (not (hasKey .Values.runners "locked")) .Values.runners.locked -}} - value: "true" - {{- else -}} - value: "false" - {{- end }} -- name: RUNNER_TAG_LIST - value: {{ default "" .Values.runners.tags | quote }} -{{- if .Values.runners.outputLimit }} -- name: RUNNER_OUTPUT_LIMIT - value: {{ .Values.runners.outputLimit | quote }} -{{- end}} -{{- if eq (default "kubernetes" .Values.runners.executor) "kubernetes" }} -{{- if .Values.runners.image }} -- name: KUBERNETES_IMAGE - value: {{ .Values.runners.image | quote }} -{{- end }} -{{- if .Values.runners.privileged }} -- name: KUBERNETES_PRIVILEGED - value: "true" -{{- end }} -{{- if or .Values.runners.namespace (not (regexMatch "\\s*namespace\\s*=" .Values.runners.config)) }} -- name: KUBERNETES_NAMESPACE - value: {{ default .Release.Namespace .Values.runners.namespace | quote }} -{{- end }} -{{- if .Values.runners.pollTimeout }} -- name: KUBERNETES_POLL_TIMEOUT - value: {{ .Values.runners.pollTimeout | quote }} -{{- end }} -{{- if .Values.runners.builds.cpuLimit }} -- name: KUBERNETES_CPU_LIMIT - value: {{ .Values.runners.builds.cpuLimit | quote }} -{{- end }} -{{- if .Values.runners.builds.cpuLimitOverwriteMaxAllowed }} -- name: KUBERNETES_CPU_LIMIT_OVERWRITE_MAX_ALLOWED - value: {{ .Values.runners.builds.cpuLimitOverwriteMaxAllowed | quote }} -{{- end }} -{{- if .Values.runners.builds.memoryLimit }} -- name: KUBERNETES_MEMORY_LIMIT - value: {{ .Values.runners.builds.memoryLimit | quote }} -{{- end }} -{{- if .Values.runners.builds.memoryLimitOverwriteMaxAllowed }} -- name: KUBERNETES_MEMORY_LIMIT_OVERWRITE_MAX_ALLOWED - value: {{ .Values.runners.builds.memoryLimitOverwriteMaxAllowed | quote }} -{{- end }} -{{- if .Values.runners.builds.cpuRequests }} -- name: KUBERNETES_CPU_REQUEST - value: {{ .Values.runners.builds.cpuRequests | quote }} -{{- end }} -{{- if .Values.runners.builds.cpuRequestsOverwriteMaxAllowed }} -- name: KUBERNETES_CPU_REQUEST_OVERWRITE_MAX_ALLOWED - value: {{ .Values.runners.builds.cpuRequestsOverwriteMaxAllowed | quote }} -{{- end }} -{{- if .Values.runners.builds.memoryRequests }} -- name: KUBERNETES_MEMORY_REQUEST - value: {{ .Values.runners.builds.memoryRequests| quote }} -{{- end }} -{{- if .Values.runners.builds.memoryRequestsOverwriteMaxAllowed }} -- name: KUBERNETES_MEMORY_REQUEST_OVERWRITE_MAX_ALLOWED - value: {{ .Values.runners.builds.memoryRequestsOverwriteMaxAllowed | quote }} -{{- end }} -{{- if .Values.runners.serviceAccountName }} -- name: KUBERNETES_SERVICE_ACCOUNT - value: {{ .Values.runners.serviceAccountName | quote }} -{{- end }} -{{- if .Values.runners.services.cpuLimit }} -- name: KUBERNETES_SERVICE_CPU_LIMIT - value: {{ .Values.runners.services.cpuLimit | quote }} -{{- end }} -{{- if .Values.runners.services.memoryLimit }} -- name: KUBERNETES_SERVICE_MEMORY_LIMIT - value: {{ .Values.runners.services.memoryLimit | quote }} -{{- end }} -{{- if .Values.runners.services.cpuRequests }} -- name: KUBERNETES_SERVICE_CPU_REQUEST - value: {{ .Values.runners.services.cpuRequests | quote }} -{{- end }} -{{- if .Values.runners.services.memoryRequests }} -- name: KUBERNETES_SERVICE_MEMORY_REQUEST - value: {{ .Values.runners.services.memoryRequests | quote }} -{{- end }} -{{- if .Values.runners.helpers.cpuLimit }} -- name: KUBERNETES_HELPER_CPU_LIMIT - value: {{ .Values.runners.helpers.cpuLimit | quote }} -{{- end }} -{{- if .Values.runners.helpers.memoryLimit }} -- name: KUBERNETES_HELPER_MEMORY_LIMIT - value: {{ .Values.runners.helpers.memoryLimit | quote }} -{{- end }} -{{- if .Values.runners.helpers.cpuRequests }} -- name: KUBERNETES_HELPER_CPU_REQUEST - value: {{ .Values.runners.helpers.cpuRequests | quote }} -{{- end }} -{{- if .Values.runners.helpers.memoryRequests }} -- name: KUBERNETES_HELPER_MEMORY_REQUEST - value: {{ .Values.runners.helpers.memoryRequests | quote }} -{{- end }} -{{- if .Values.runners.helpers.image }} -- name: KUBERNETES_HELPER_IMAGE - value: {{ .Values.runners.helpers.image | quote }} -{{- end }} -{{- if .Values.runners.imagePullPolicy }} -- name: KUBERNETES_PULL_POLICY - value: {{ .Values.runners.imagePullPolicy | quote }} -{{- end }} -{{- if .Values.runners.pod_security_context }} -{{- if .Values.runners.pod_security_context.run_as_non_root }} -- name: KUBERNETES_POD_SECURITY_CONTEXT_RUN_AS_NON_ROOT - value: "true" -{{- end }} -{{- if .Values.runners.pod_security_context.run_as_user }} -- name: KUBERNETES_POD_SECURITY_CONTEXT_RUN_AS_USER - value: {{ .Values.runners.pod_security_context.run_as_user | quote }} -{{- end }} -{{- if .Values.runners.pod_security_context.run_as_group }} -- name: KUBERNETES_POD_SECURITY_CONTEXT_RUN_AS_GROUP - value: {{ .Values.runners.pod_security_context.run_as_group | quote }} -{{- end }} -{{- if .Values.runners.pod_security_context.fs_group }} -- name: KUBERNETES_POD_SECURITY_CONTEXT_FS_GROUP - value: {{ .Values.runners.pod_security_context.fs_group | quote }} -{{- end }} -{{- end }} -{{- end }} -{{- if .Values.runners.cache -}} -{{ include "gitlab-runner.cache" . }} -{{- end }} -{{- if .Values.envVars -}} -{{ range .Values.envVars }} -- name: {{ .name }} - value: {{ .value | quote }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/gitlab-runner/templates/_helpers.tpl deleted file mode 100644 index dde1729d2..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/_helpers.tpl +++ /dev/null @@ -1,108 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "gitlab-runner.name" -}} -{{- default .Chart.Name .Values.nameOverride | 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). -*/}} -{{- define "gitlab-runner.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if hasPrefix $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "gitlab-runner.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Define the name of the secret containing the tokens -*/}} -{{- define "gitlab-runner.secret" -}} -{{- default (include "gitlab-runner.fullname" .) .Values.runners.secret | quote -}} -{{- end -}} - -{{/* -Define the name of the s3 cache secret -*/}} -{{- define "gitlab-runner.cache.secret" -}} -{{- if .Values.runners.cache.secretName -}} -{{- .Values.runners.cache.secretName | quote -}} -{{- end -}} -{{- end -}} - -{{/* -Template for outputing the gitlabUrl -*/}} -{{- define "gitlab-runner.gitlabUrl" -}} -{{- .Values.gitlabUrl | quote -}} -{{- end -}} - -{{/* -Template runners.cache.s3ServerAddress in order to allow overrides from external charts. -*/}} -{{- define "gitlab-runner.cache.s3ServerAddress" }} -{{- default "" .Values.runners.cache.s3ServerAddress | quote -}} -{{- end -}} - -{{/* -Define the image, using .Chart.AppVersion and GitLab Runner image as a default value -*/}} -{{- define "gitlab-runner.image" }} -{{- if kindIs "string" .Values.image -}} -{{- .Values.image }} -{{- else -}} -{{- $appVersion := ternary "bleeding" (print "v" .Chart.AppVersion) (eq .Chart.AppVersion "bleeding") -}} -{{- $appVersionImageTag := printf "alpine-%s" $appVersion -}} -{{- $imageTag := default $appVersionImageTag .Values.image.tag -}} -{{- printf "%s/%s:%s" .Values.image.registry .Values.image.image $imageTag }} -{{- end -}} -{{- end -}} - -{{/* -Define the server session timeout, using 1800 as a default value -*/}} -{{- define "gitlab-runner.server-session-timeout" }} -{{- default 1800 .Values.sessionServer.timeout }} -{{- end -}} - -{{/* -Define the server session internal port, using 9000 as a default value -*/}} -{{- define "gitlab-runner.server-session-external-port" }} -{{- default 9000 .Values.sessionServer.externalPort }} -{{- end -}} - -{{/* -Define the server session external port, using 8093 as a default value -*/}} -{{- define "gitlab-runner.server-session-internal-port" }} -{{- default 8093 .Values.sessionServer.internalPort }} -{{- end -}} - -{{/* -Unregister runners on pod stop -*/}} -{{- define "gitlab-runner.unregisterRunners" -}} -{{- if or (and (hasKey .Values "unregisterRunners") .Values.unregisterRunners) (and (not (hasKey .Values "unregisterRunners")) .Values.runnerRegistrationToken) -}} -lifecycle: - preStop: - exec: - command: ["/entrypoint", "unregister", "--all-runners"] -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/configmap.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/templates/configmap.yaml deleted file mode 100644 index d5ca5a765..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/configmap.yaml +++ /dev/null @@ -1,236 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "gitlab-runner.fullname" . }} - namespace: {{ default .Release.Namespace .Values.runners.namespace | quote }} - labels: - app: {{ include "gitlab-runner.fullname" . }} - chart: {{ include "gitlab-runner.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -data: - entrypoint: | - #!/bin/bash - set -e - - mkdir -p /home/gitlab-runner/.gitlab-runner/ - - cp /configmaps/config.toml /home/gitlab-runner/.gitlab-runner/ - - {{- if and (eq (default 1.0 .Values.replicas) 1.0) .Values.sessionServer .Values.sessionServer.enabled }} - quit() { - kill -TERM "$child" - } - - trap quit QUIT TERM - - sh /configmaps/set-session-server-address & - child=$! - wait "$child" - {{- end }} - - # Set up environment variables for cache - if [[ -f /secrets/accesskey && -f /secrets/secretkey ]]; then - export CACHE_S3_ACCESS_KEY=$(cat /secrets/accesskey) - export CACHE_S3_SECRET_KEY=$(cat /secrets/secretkey) - fi - - if [[ -f /secrets/gcs-applicaton-credentials-file ]]; then - export GOOGLE_APPLICATION_CREDENTIALS="/secrets/gcs-applicaton-credentials-file" - elif [[ -f /secrets/gcs-application-credentials-file ]]; then - export GOOGLE_APPLICATION_CREDENTIALS="/secrets/gcs-application-credentials-file" - else - if [[ -f /secrets/gcs-access-id && -f /secrets/gcs-private-key ]]; then - export CACHE_GCS_ACCESS_ID=$(cat /secrets/gcs-access-id) - # echo -e used to make private key multiline (in google json auth key private key is oneline with \n) - export CACHE_GCS_PRIVATE_KEY=$(echo -e $(cat /secrets/gcs-private-key)) - fi - fi - - if [[ -f /secrets/azure-account-name && -f /secrets/azure-account-key ]]; then - export CACHE_AZURE_ACCOUNT_NAME=$(cat /secrets/azure-account-name) - export CACHE_AZURE_ACCOUNT_KEY=$(cat /secrets/azure-account-key) - fi - - if [[ -f /secrets/runner-registration-token ]]; then - export REGISTRATION_TOKEN=$(cat /secrets/runner-registration-token) - fi - - if [[ -f /secrets/runner-token ]]; then - export CI_SERVER_TOKEN=$(cat /secrets/runner-token) - fi - - {{- if and (not (empty .Values.runnerToken)) (ne "1" ((default "1" .Values.replicas) | toString)) }} - {{- fail "Using a runner token with more than 1 replica is not supported." }} - {{- end }} - - # Validate this also at runtime in case the user has set a custom secret - if [[ ! -z "$CI_SERVER_TOKEN" && "{{ default 1 .Values.replicas }}" -ne "1" ]]; then - echo "Using a runner token with more than 1 replica is not supported." - exit 1 - fi - - # Register the runner - if ! sh /configmaps/register-the-runner; then - exit 1 - fi - - # Run pre-entrypoint-script - if ! bash /configmaps/pre-entrypoint-script; then - exit 1 - fi - - # Start the runner - exec /entrypoint run --user=gitlab-runner \ - --working-directory=/home/gitlab-runner - - config.toml: | - concurrent = {{ .Values.concurrent }} - check_interval = {{ .Values.checkInterval }} - log_level = {{ default "info" .Values.logLevel | quote }} - {{- if .Values.logFormat }} - log_format = {{ .Values.logFormat | quote }} - {{- end }} - {{- if .Values.metrics.enabled }} - listen_address = ':9252' - {{- end }} - {{- if .Values.sentryDsn }} - sentry_dsn = "{{ .Values.sentryDsn }}" - {{- end }} - {{- if and (eq (default 1.0 .Values.replicas) 1.0) .Values.sessionServer .Values.sessionServer.enabled }} - [session_server] - session_timeout = {{ include "gitlab-runner.server-session-timeout" . }} - listen_address = "0.0.0.0:{{ include "gitlab-runner.server-session-internal-port" . }}" - advertise_address = "SESSION_SERVER_IP:{{ include "gitlab-runner.server-session-external-port" . }}" - {{- end }} - - {{ if .Values.runners.config }} - config.template.toml: {{ tpl (toYaml .Values.runners.config) $ | indent 2 }} - {{ end }} - - register-the-runner: | - #!/bin/bash - MAX_REGISTER_ATTEMPTS=30 - - for i in $(seq 1 "${MAX_REGISTER_ATTEMPTS}"); do - echo "Registration attempt ${i} of ${MAX_REGISTER_ATTEMPTS}" - /entrypoint register \ - {{- range .Values.runners.imagePullSecrets }} - --kubernetes-image-pull-secrets {{ . | quote }} \ - {{- end }} - {{- range $key, $val := .Values.runners.nodeSelector }} - --kubernetes-node-selector {{ $key | quote }}:{{ $val | quote }} \ - {{- end }} - {{- range .Values.runners.nodeTolerations }} - {{- $keyValue := .key }} - {{- if eq (.operator | default "Equal") "Equal" }} - {{- $keyValue = print $keyValue "=" (.value | default "" ) }} - {{- end }} - --kubernetes-node-tolerations {{ $keyValue }}:{{ .effect | quote }} \ - {{- end }} - {{- range $key, $value := .Values.runners.podLabels }} - --kubernetes-pod-labels {{ $key | quote }}:{{ $value | quote }} \ - {{- end }} - {{- range $key, $val := .Values.runners.podAnnotations }} - --kubernetes-pod-annotations {{ $key | quote }}:{{ $val | quote }} \ - {{- end }} - {{- if and (hasKey .Values.runners "name") .Values.runners.name }} - --name={{ .Values.runners.name | quote -}} \ - {{- end }} - {{- if and (hasKey .Values.runners "maximumTimeout") .Values.runners.maximumTimeout }} - --maximum-timeout={{ .Values.runners.maximumTimeout | quote -}} \ - {{- end }} - {{- range $key, $value := .Values.runners.env }} - --env {{ $key | quote -}} = {{- $value | quote }} \ - {{- end }} - {{- if and (hasKey .Values.runners "runUntagged") .Values.runners.runUntagged }} - --run-untagged=true \ - {{- end }} - {{- if and (hasKey .Values.runners "protected") .Values.runners.protected }} - --access-level="ref_protected" \ - {{- end }} - {{- if .Values.runners.pod_security_context }} - {{- if .Values.runners.pod_security_context.supplemental_groups }} - {{- range $gid := .Values.runners.pod_security_context.supplemental_groups }} - --kubernetes-pod-security-context-supplemental-groups {{ $gid | quote }} \ - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.runners.config }} - --template-config /configmaps/config.template.toml \ - {{- end }} - --non-interactive - - retval=$? - - if [ ${retval} = 0 ]; then - break - elif [ ${i} = ${MAX_REGISTER_ATTEMPTS} ]; then - exit 1 - fi - - sleep 5 - done - - exit 0 - - check-live: | - #!/bin/bash - if /usr/bin/pgrep -f .*register-the-runner; then - exit 0 - elif /usr/bin/pgrep gitlab.*runner; then - exit 0 - else - exit 1 - fi - - {{- if and (eq (default 1.0 .Values.replicas) 1.0) .Values.sessionServer .Values.sessionServer.enabled }} - set-session-server-address: | - #!/bin/bash - - {{- if (not .Values.sessionServer.publicIP) }} - APISERVER=https://kubernetes.default.svc \ - && SERVICEACCOUNT=/var/run/secrets/kubernetes.io/serviceaccount \ - && NAMESPACE=$(cat ${SERVICEACCOUNT}/namespace) \ - && TOKEN=$(cat ${SERVICEACCOUNT}/token) \ - && CACERT=${SERVICEACCOUNT}/ca.crt \ - && header="Authorization: Bearer ${TOKEN}" - - SERVICEURL=${APISERVER}/api/v1/namespaces/${NAMESPACE}/services/{{ include "gitlab-runner.fullname" . }}-session-server - - has_address=false - while [ "${has_address}" = false ]; do - SERVICEIP=$(curl —-silent \ - --cacert ${CACERT} \ - --header "${header}" \ - -X GET ${SERVICEURL} 2>/dev/null \ - | grep '"ip":' | cut -d ":" -f2 | xargs) - - # for aws, the hostname is available but not the external IP - SERVICEHOSTNAME=$(curl —-silent \ - --cacert ${CACERT} \ - --header "${header}" \ - -X GET ${SERVICEURL} 2>/dev/null \ - | grep '"hostname":' | cut -d ":" -f2 | xargs) - - ADDRESS="${SERVICEHOSTNAME:-$SERVICEIP}" - - if [ -z "${ADDRESS}" ] - then - echo "Service LoadBalancer External Address not yet available" - has_address=false - sleep 5 - else - has_address=true - sed -i -e "s/SESSION_SERVER_IP/${ADDRESS}/g" /home/gitlab-runner/.gitlab-runner/config.toml - fi - done - {{- else }} - sed -i -e "s/SESSION_SERVER_IP/{{ .Values.sessionServer.publicIP }}/g" /home/gitlab-runner/.gitlab-runner/config.toml - {{- end}} - {{ end }} - - pre-entrypoint-script: | -{{ .Values.preEntrypointScript | default "" | indent 4 }} - -{{ if not (empty .Values.configMaps) }}{{ toYaml .Values.configMaps | indent 2 }}{{ end }} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/deployment.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/templates/deployment.yaml deleted file mode 100644 index eae2fc2bb..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/deployment.yaml +++ /dev/null @@ -1,174 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "gitlab-runner.fullname" . }} - namespace: {{ default .Release.Namespace .Values.runners.namespace | quote }} - labels: - app: {{ include "gitlab-runner.fullname" . }} - chart: {{ include "gitlab-runner.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -spec: - {{- if not .Values.hpa}} - replicas: {{ default 1 .Values.replicas }} - {{- end}} - revisionHistoryLimit: {{ default 10 .Values.revisionHistoryLimit }} - selector: - matchLabels: - app: {{ include "gitlab-runner.fullname" . }} - template: - metadata: - labels: - app: {{ include "gitlab-runner.fullname" . }} - chart: {{ include "gitlab-runner.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" - {{- range $key, $value := .Values.podLabels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} - {{- if .Values.metrics.enabled }} - prometheus.io/scrape: 'true' - prometheus.io/port: {{ .Values.metrics.port | quote }} - {{- end }} - {{- range $key, $value := .Values.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName }} - {{- end }} - securityContext: {{ toYaml .Values.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} - {{- if .Values.priorityClassName }} - priorityClassName: {{ .Values.priorityClassName | quote }} - {{- end }} - serviceAccountName: {{ if .Values.rbac.create }}{{ include "gitlab-runner.fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }} - containers: - - name: {{ include "gitlab-runner.fullname" . }} - image: {{ include "gitlab-runner.image" . }} - imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} - securityContext: {{ toYaml .Values.securityContext | nindent 10 }} - {{- include "gitlab-runner.unregisterRunners" . | nindent 8 }} - {{- if .Values.useTini }} - command: ["/usr/local/bin/tini", "--", "/bin/bash", "/configmaps/entrypoint"] - {{- else }} - command: ["/usr/bin/dumb-init", "--", "/bin/bash", "/configmaps/entrypoint"] - {{- end }} - env: - {{ include "gitlab-runner.runner-env-vars" . | indent 8 }} - livenessProbe: - exec: - command: ["/bin/bash", "/configmaps/check-live"] - initialDelaySeconds: 60 - timeoutSeconds: {{ default 1 .Values.probeTimeoutSeconds }} - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - exec: - command: ["/usr/bin/pgrep","gitlab.*runner"] - initialDelaySeconds: 10 - timeoutSeconds: {{ default 1 .Values.probeTimeoutSeconds }} - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - ports: - - name: {{ .Values.metrics.portName | quote }} - containerPort: {{ .Values.metrics.port }} - {{- if and (eq (default 1.0 .Values.replicas) 1.0) .Values.sessionServer .Values.sessionServer.enabled }} - - name: session-server - containerPort: {{ include "gitlab-runner.server-session-internal-port" . }} - protocol: TCP - {{- end }} - volumeMounts: - - name: projected-secrets - mountPath: /secrets - - name: etc-gitlab-runner - mountPath: /home/gitlab-runner/.gitlab-runner - - name: configmaps - mountPath: /configmaps - {{- if .Values.certsSecretName }} - - name: custom-certs - readOnly: true - mountPath: /home/gitlab-runner/.gitlab-runner/certs/ - {{- end }} - {{- if .Values.volumeMounts }} -{{ toYaml .Values.volumeMounts | indent 8 }} - {{- end }} - resources: -{{ toYaml .Values.resources | indent 10 }} - volumes: - - name: runner-secrets - emptyDir: - medium: "Memory" - - name: etc-gitlab-runner - emptyDir: - medium: "Memory" - - name: projected-secrets - projected: - sources: - {{- if .Values.runners.cache.cacheType }} - # .Values.runners.cache.cacheType is deprecated: https://gitlab.com/gitlab-org/charts/gitlab-runner/-/issues/224 - {{- end }} - - {{- if and .Values.runners.cache .Values.runners.cache.cacheType }} - {{- if and (include "gitlab-runner.cache.secret" .) (eq .Values.runners.cache.cacheType "s3") }} - - secret: - name: {{ include "gitlab-runner.cache.secret" . }} - {{- end }} - {{- if eq .Values.runners.cache.cacheType "gcs"}} - - secret: - # Outdated default secret "s3access" kept for compatibilty with older installs using it. - # Will be removed in next major release: https://gitlab.com/gitlab-org/charts/gitlab-runner/merge_requests/177 - name: {{ default "s3access" (include "gitlab-runner.cache.secret" .) }} - {{- end }} - {{- else if include "gitlab-runner.cache.secret" . }} - - secret: - name: {{ include "gitlab-runner.cache.secret" . }} - {{- end }} - - secret: - name: {{ include "gitlab-runner.secret" . }} - items: - - key: runner-registration-token - path: runner-registration-token - - key: runner-token - path: runner-token - - {{- range .Values.secrets }} - - secret: -{{ toYaml . | indent 16 }} - {{- end }} - {{- if .Values.certsSecretName }} - - name: custom-certs - secret: - secretName: {{ .Values.certsSecretName }} - {{- end }} - - name: configmaps - configMap: - name: {{ include "gitlab-runner.fullname" . }} - {{- if .Values.volumes }} -{{ toYaml .Values.volumes | indent 6 }} - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - {{- if .Values.affinity }} - affinity: -{{ toYaml .Values.affinity | indent 8 }} - {{- end }} - {{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 8 }} - {{- end }} - {{- if .Values.hostAliases }} - hostAliases: -{{ toYaml .Values.hostAliases | indent 8 }} - {{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/hpa.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/templates/hpa.yaml deleted file mode 100644 index d4ad4c4b8..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/hpa.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.hpa}} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "gitlab-runner.fullname" . }} - namespace: {{ default .Release.Namespace .Values.runners.namespace | quote }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "gitlab-runner.fullname" . }} - minReplicas: {{ default 1 .Values.hpa.minReplicas }} - maxReplicas: {{ default 1 .Values.hpa.maxReplicas }} - metrics: -{{ toYaml .Values.hpa.metrics | indent 2 }} -{{- end}} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/role-binding.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/templates/role-binding.yaml deleted file mode 100644 index f895594b7..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/role-binding.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: {{ if .Values.rbac.clusterWideAccess }}"ClusterRoleBinding"{{ else }}"RoleBinding"{{ end }} -metadata: - name: {{ include "gitlab-runner.fullname" . }} - labels: - app: {{ include "gitlab-runner.fullname" . }} - chart: {{ include "gitlab-runner.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" - {{ if not .Values.rbac.clusterWideAccess -}} - namespace: {{ default .Release.Namespace .Values.runners.namespace | quote }} - {{- end }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: {{ if .Values.rbac.clusterWideAccess }}"ClusterRole"{{ else }}"Role"{{ end }} - name: {{ include "gitlab-runner.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ include "gitlab-runner.fullname" . }} - namespace: "{{ .Release.Namespace }}" -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/role.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/templates/role.yaml deleted file mode 100644 index b1b8e30ad..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/role.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: {{ if .Values.rbac.clusterWideAccess }}"ClusterRole"{{ else }}"Role"{{ end }} -metadata: - name: {{ include "gitlab-runner.fullname" . }} - labels: - app: {{ include "gitlab-runner.fullname" . }} - chart: {{ include "gitlab-runner.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" - {{ if not .Values.rbac.clusterWideAccess -}} - namespace: {{ default .Release.Namespace .Values.runners.namespace | quote }} - {{- end }} -rules: -{{- if .Values.rbac.podSecurityPolicy.enabled }} -- apiGroups: ['policy'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: -{{ toYaml .Values.rbac.podSecurityPolicy.resourceNames | indent 2 }} -{{- end }} -{{- if or (empty .Values.rbac.rules) (or .Values.rbac.resources .Values.rbac.verbs) }} -- apiGroups: [""] - resources: {{ (default (list "*") .Values.rbac.resources | toJson) }} - verbs: {{ (default (list "*") .Values.rbac.verbs | toJson) }} -{{- end -}} -{{ range .Values.rbac.rules }} -- apiGroups: {{ (default (list "") .apiGroups) | toJson }} - resources: {{ (default (list "*") .resources) | toJson }} - verbs: {{ (default (list "*") .verbs) | toJson }} -{{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/secrets.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/templates/secrets.yaml deleted file mode 100644 index 043bf2075..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/secrets.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if or .Values.runnerRegistrationToken .Values.runnerToken -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "gitlab-runner.secret" . }} - namespace: {{ default .Release.Namespace .Values.runners.namespace | quote }} - labels: - app: {{ include "gitlab-runner.fullname" . }} - chart: {{ include "gitlab-runner.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -type: Opaque -data: - runner-registration-token: {{ default "" .Values.runnerRegistrationToken | b64enc | quote }} - runner-token: {{ default "" .Values.runnerToken | b64enc | quote }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/service-account.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/templates/service-account.yaml deleted file mode 100644 index c4c5a7952..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/service-account.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - {{- if .Values.rbac.serviceAccountAnnotations }} - annotations: - {{- range $key, $value := .Values.rbac.serviceAccountAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end}} - name: {{ include "gitlab-runner.fullname" . }} - namespace: {{ default .Release.Namespace .Values.runners.namespace | quote }} - labels: - app: {{ include "gitlab-runner.fullname" . }} - chart: {{ include "gitlab-runner.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -{{- if .Values.rbac.imagePullSecrets }} -imagePullSecrets: - {{- range .Values.rbac.imagePullSecrets }} - - name: {{ . | quote }} - {{- end }} -{{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/service-session-server.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/templates/service-session-server.yaml deleted file mode 100644 index be0d99b82..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/service-session-server.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if and (eq (default 1.0 .Values.replicas) 1.0) .Values.sessionServer .Values.sessionServer.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "gitlab-runner.fullname" . }}-session-server - namespace: {{ default .Release.Namespace .Values.runners.namespace | quote }} - {{- if .Values.sessionServer.annotations }} - annotations: - {{- toYaml .Values.sessionServer.annotations | nindent 4 }} - {{- end }} - labels: - app: {{ include "gitlab-runner.fullname" . }} - chart: {{ include "gitlab-runner.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -spec: - selector: - app: {{ include "gitlab-runner.fullname" . }} - release: "{{ .Release.Name }}" - type: LoadBalancer - {{- if .Values.sessionServer.publicIP }} - loadBalancerIP: {{ .Values.sessionServer.publicIP }} - {{- end }} - {{- if .Values.sessionServer.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- toYaml .Values.sessionServer.loadBalancerSourceRanges | nindent 4 }} - {{- end }} - ports: - - protocol: TCP - port: {{ include "gitlab-runner.server-session-external-port" . }} - targetPort: {{ include "gitlab-runner.server-session-internal-port" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/service.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/templates/service.yaml deleted file mode 100644 index 5609d0d9d..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/service.yaml +++ /dev/null @@ -1,52 +0,0 @@ -{{- if and .Values.service.enabled .Values.metrics.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "gitlab-runner.fullname" . | quote }} - namespace: {{ default .Release.Namespace .Values.runners.namespace | quote }} - labels: - app: {{ include "gitlab-runner.fullname" . | quote }} - chart: {{ include "gitlab-runner.chart" . | quote }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - {{- if .Values.service.labels }} - {{- toYaml .Values.service.labels | nindent 4 }} - {{- end }} - {{- if .Values.service.annotations }} - annotations: - {{- toYaml .Values.service.annotations | nindent 4 }} - {{- end }} -spec: - {{- if .Values.service.clusterIP }} - clusterIP: {{ .Values.service.clusterIP | quote }} - {{- end }} - {{- if .Values.service.externalIPs }} - externalIPs: - {{- toYaml .Values.service.externalIPs | nindent 4 }} - {{- end }} - {{- if .Values.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.service.loadBalancerIP | quote }} - {{- end }} - {{- if .Values.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.service.loadBalancerSourceRanges }} - - {{ $cidr | quote }} - {{- end }} - {{- end }} - ports: - {{- if .Values.metrics.enabled }} - - name: {{ .Values.metrics.portName | quote }} - {{- if eq .Values.service.type "NodePort" }} - nodePort: {{ .Values.service.metrics.nodePort }} - {{- end }} - port: {{ .Values.metrics.port }} - targetPort: {{ .Values.metrics.portName | quote }} - {{- end }} - {{- if .Values.service.additionalPorts }} - {{- toYaml .Values.service.additionalPorts | nindent 2 }} - {{- end }} - selector: - app: {{ include "gitlab-runner.fullname" . | quote }} - release: {{ .Release.Name | quote }} - type: {{ .Values.service.type | default "ClusterIP" | quote }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/templates/servicemonitor.yaml deleted file mode 100644 index bd3ffc9e4..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/templates/servicemonitor.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if and .Values.metrics.serviceMonitor.enabled .Values.metrics.enabled .Values.service.enabled -}} -{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "gitlab-runner.fullname" . | quote }} - namespace: {{ default .Release.Namespace .Values.runners.namespace | quote }} - labels: - app: {{ include "gitlab-runner.fullname" . | quote }} - chart: {{ include "gitlab-runner.chart" . | quote }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - {{- if .Values.metrics.serviceMonitor.labels }} - {{- toYaml .Values.metrics.serviceMonitor.labels | nindent 4 }} - {{- end }} -spec: - endpoints: - - port: {{ .Values.metrics.portName | quote }} - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scheme }} - scheme: {{ .Values.metrics.serviceMonitor.scheme | quote }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.tlsConfig }} - tlsConfig: - {{- toYaml .Values.metrics.serviceMonitor.tlsConfig | nindent 6 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: - {{- tpl (toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 6) . }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.path }} - path: {{ .Values.metrics.serviceMonitor.path }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: - {{- toYaml .Values.metrics.serviceMonitor.relabelings | nindent 6 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.jobLabel }} - jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }} - {{- end }} - namespaceSelector: - matchNames: - - {{ $.Release.Namespace | quote }} - selector: - matchLabels: - app: {{ include "gitlab-runner.fullname" . | quote }} - chart: {{ include "gitlab-runner.chart" . | quote }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab-runner/values.yaml b/charts/gitlab/gitlab/charts/gitlab-runner/values.yaml deleted file mode 100644 index acc9f0e1d..000000000 --- a/charts/gitlab/gitlab/charts/gitlab-runner/values.yaml +++ /dev/null @@ -1,722 +0,0 @@ -## GitLab Runner Image -## -## By default it's using registry.gitlab.com/gitlab-org/gitlab-runner:alpine-v{VERSION} -## where {VERSION} is taken from Chart.yaml from appVersion field -## -## DEPRECATED: Setting `image: registry.gitlab.com/gitlab-org/gitlab-runner:alpine-v11.6.0` is deprecated -## -## ref: https://gitlab.com/gitlab-org/gitlab-runner/container_registry/29383?orderBy=NAME&sort=asc&search[]=alpine-v&search[]= -## -## Note: If you change the image to the ubuntu release -## don't forget to change the securityContext; -## these images run on different user IDs. -## -image: - registry: registry.gitlab.com - image: gitlab-org/gitlab-runner - # tag: alpine-v11.6.0 - -## When using GitLab Runner Helm Chart with gitlab-runner-ubi-images (https://gitlab.com/gitlab-org/ci-cd/gitlab-runner-ubi-images/container_registry) -## the installation fails because dumb-init is not packaged in the image. However, the tini is present. -## This configuration will allow gitlab-runner-ubi-images users to explicitly enabled the use of `tini` instead of `dumb-init` -useTini: false - -## Specify a imagePullPolicy for the main runner deployment -## 'Always' if imageTag is 'latest', else set to 'IfNotPresent' -## -## Note: it does not apply to job containers launched by this executor. -## Use `pull_policy` in [runners.kubernetes] to change it. -## -## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images -## -imagePullPolicy: IfNotPresent - -## Specifying ImagePullSecrets on a Pod -## Kubernetes supports specifying container image registry keys on a Pod. -## ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod -## -# imagePullSecrets: -# - name: "image-pull-secret" - -## Timeout, in seconds, for liveness and readiness probes of a runner pod. -# probeTimeoutSeconds: 1 - -## How many runner pods to launch. -## -## Note: Using more than one replica is not supported with a runnerToken. Use a runnerRegistrationToken -## to create multiple runner replicas. -# replicas: 1 - -## How many old ReplicaSets for this Deployment you want to retain -# revisionHistoryLimit: 10 - -## The GitLab Server URL (with protocol) that want to register the runner against -## ref: https://docs.gitlab.com/runner/commands/index.html#gitlab-runner-register -## -# gitlabUrl: http://gitlab.your-domain.com/ - -## The Registration Token for adding new Runners to the GitLab Server. This must -## be retrieved from your GitLab Instance. -## ref: https://docs.gitlab.com/ce/ci/runners/index.html -## ref: https://docs.gitlab.com/runner/register/ -## -# runnerRegistrationToken: "" - -## The Runner Token for adding new Runners to the GitLab Server. This must -## be retrieved from your GitLab Instance. It is token of already registered runner. -## ref: (we don't yet have docs for that, but we want to use existing token) -## -# runnerToken: "" -# - -## Unregister all runners before termination -## -## Updating the runner's chart version or configuration will cause the runner container -## to be terminated and created again. This may cause your Gitlab instance to reference -## non-existant runners. Un-registering the runner before termination mitigates this issue. -## ref: https://docs.gitlab.com/runner/commands/index.html#gitlab-runner-unregister -## -# unregisterRunners: true - -## When stopping the runner, give it time to wait for its jobs to terminate. -## -## Updating the runner's chart version or configuration will cause the runner container -## to be terminated with a graceful stop request. terminationGracePeriodSeconds -## instructs Kubernetes to wait long enough for the runner pod to terminate gracefully. -## ref: https://docs.gitlab.com/runner/commands/#signals -terminationGracePeriodSeconds: 3600 - -## Set the certsSecretName in order to pass custom certficates for GitLab Runner to use -## Provide resource name for a Kubernetes Secret Object in the same namespace, -## this is used to populate the /home/gitlab-runner/.gitlab-runner/certs/ directory -## ref: https://docs.gitlab.com/runner/configuration/tls-self-signed.html#supported-options-for-self-signed-certificates-targeting-the-gitlab-server -## -# certsSecretName: - -## Configure the maximum number of concurrent jobs -## ref: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-global-section -## -concurrent: 10 - -## Defines in seconds how often to check GitLab for a new builds -## ref: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-global-section -## -checkInterval: 30 - -## Configure GitLab Runner's logging level. Available values are: debug, info, warn, error, fatal, panic -## ref: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-global-section -## -# logLevel: - -## Configure GitLab Runner's logging format. Available values are: runner, text, json -## ref: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-global-section -## -# logFormat: - -## Configure GitLab Runner's Sentry DSN. -## ref https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-global-section -## -# sentryDsn: - -## A custom bash script that will be executed prior to the invocation -## gitlab-runner process -# -#preEntrypointScript: | -# echo "hello" - -## Specify whether the runner should start the session server. -## Defaults to false -## ref: -## -## When sessionServer is enabled, the user can either provide a public publicIP -## or rely on the external IP auto discovery -## When a serviceAccountName is used with the automounting to the pod disable, -## we recommend the usage of the publicIP -sessionServer: - enabled: false - # annotations: {} - # timeout: 1800 - # internalPort: 8093 - # externalPort: 9000 - # publicIP: "" - # loadBalancerSourceRanges: - # - 1.2.3.4/32 - -## For RBAC support: -rbac: - create: false - - ## Define specific rbac permissions. - ## DEPRECATED: see .Values.rbac.rules - # resources: ["pods", "pods/exec", "secrets"] - # verbs: ["get", "list", "watch", "create", "patch", "delete"] - - ## Define list of rules to be added to the rbac role permissions. - ## Each rule supports the keys: - ## - apiGroups: default "" (indicates the core API group) if missing or empty. - ## - resources: default "*" if missing or empty. - ## - verbs: default "*" if missing or empty. - ## - ## Read more about the recommended rules on the following link - ## - ## ref: https://docs.gitlab.com/runner/executors/kubernetes.html#configuring-executor-service-account - ## - rules: [] - # - resources: ["configmaps", "pods", "pods/attach", "secrets", "services"] - # verbs: ["get", "list", "watch", "create", "patch", "update", "delete"] - # - apiGroups: [""] - # resources: ["pods/exec"] - # verbs: ["create", "patch", "delete"] - - ## Run the gitlab-bastion container with the ability to deploy/manage containers of jobs - ## cluster-wide or only within namespace - clusterWideAccess: false - - ## Use the following Kubernetes Service Account name if RBAC is disabled in this Helm chart (see rbac.create) - ## - # serviceAccountName: default - - ## Specify annotations for Service Accounts, useful for annotations such as eks.amazonaws.com/role-arn - ## - ## ref: https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html - ## - # serviceAccountAnnotations: {} - - ## Use podSecurity Policy - ## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ - podSecurityPolicy: - enabled: false - resourceNames: - - gitlab-runner - - ## Specify one or more imagePullSecrets used for pulling the runner image - ## - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account - ## - # imagePullSecrets: [] - -## Configure integrated Prometheus metrics exporter -## -## ref: https://docs.gitlab.com/runner/monitoring/#configuration-of-the-metrics-http-server -## -metrics: - enabled: false - - ## Define a name for the metrics port - ## - portName: metrics - - ## Provide a port number for the integrated Prometheus metrics exporter - ## - port: 9252 - - ## Configure a prometheus-operator serviceMonitor to allow autodetection of - ## the scraping target. Requires enabling the service resource below. - ## - serviceMonitor: - enabled: false - - ## Provide additional labels to the service monitor ressource - ## - ## labels: {} - - ## Define a scrape interval (otherwise prometheus default is used) - ## - ## ref: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config - ## - # interval: "" - - ## Specify the scrape protocol scheme e.g., https or http - ## - # scheme: "http" - - ## Supply a tls configuration for the service monitor - ## - ## ref: https://github.com/helm/charts/blob/master/stable/prometheus-operator/crds/crd-servicemonitor.yaml - ## - # tlsConfig: {} - - ## The URI path where prometheus metrics can be scraped from - ## - # path: "/metrics" - - ## A list of MetricRelabelConfigs to apply to samples before ingestion - ## - ## ref: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs - ## - # metricRelabelings: [] - - ## A list of RelabelConfigs to apply to samples before scraping - ## - ## ref: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config - ## - ## relabelings: [] - -## Configure a service resource e.g., to allow scraping metrics via -## prometheus-operator serviceMonitor -service: - enabled: false - - ## Provide additonal labels for the service - ## - # labels: {} - - ## Provide additonal annotations for the service - ## - # annotations: {} - - ## Define a specific ClusterIP if you do not want a dynamic one - ## - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address - ## - # clusterIP: "" - - ## Define a list of one or more external IPs for this service - ## - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#external-ips - ## - # externalIPs: [] - - ## Provide a specific loadbalancerIP e.g., of an external Loadbalancer - ## - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer - ## - # loadBalancerIP: "" - - ## Provide a list of source IP ranges to have access to this service - ## - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#aws-nlb-support - ## - # loadBalancerSourceRanges: [] - - ## Specify the service type e.g., ClusterIP, NodePort, Loadbalancer or ExternalName - ## - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types - ## - type: ClusterIP - - ## Specify the services metrics nodeport if you use a service of type nodePort - ## - # metrics: - - ## Specify the node port under which the prometheus metrics of the runner are made - ## available. - ## - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#nodeport - ## - # nodePort: "" - - ## Provide a list of additional ports to be exposed by this service - ## - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service - ## - # additionalPorts: [] - -## Configuration for the Pods that the runner launches for each new job -## -runners: - # runner configuration, where the multi line strings is evaluated as - # template so you can specify helm values inside of it. - # - # tpl: https://helm.sh/docs/howto/charts_tips_and_tricks/#using-the-tpl-function - # runner configuration: https://docs.gitlab.com/runner/configuration/advanced-configuration.html - config: | - [[runners]] - [runners.kubernetes] - namespace = "{{.Release.Namespace}}" - image = "ubuntu:16.04" - - ## Which executor should be used - ## - # executor: kubernetes - - ## Default container image to use for builds when none is specified - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # image: ubuntu:16.04 - - ## Specify one or more imagePullSecrets - ## - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # imagePullSecrets: [] - - ## Specify the image pull policy: never, if-not-present, always. The cluster default will be used if not set. - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # imagePullPolicy: "" - - ## Defines number of concurrent requests for new job from GitLab - ## ref: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # requestConcurrency: 1 - - ## Specify whether the runner should be locked to a specific project: true, false. Defaults to true. - ## - # locked: true - - ## Specify the tags associated with the runner. Comma-separated list of tags. - ## - ## ref: https://docs.gitlab.com/ee/ci/runners/configure_runners.html#use-tags-to-control-which-jobs-a-runner-can-run - ## - # tags: "" - - ## Specify the name for the runner. - ## - # name: "" - - ## Specify the maximum timeout (in seconds) that will be set for job when using this Runner - ## - # maximumTimeout: "" - - ## Specify if jobs without tags should be run. - ## If not specified, Runner will default to true if no tags were specified. In other case it will - ## default to false. - ## - ## ref: https://docs.gitlab.com/ee/ci/runners/configure_runners.html#set-a-runner-to-run-untagged-jobs - ## - # runUntagged: true - - ## Specify whether the runner should only run protected branches. - ## Defaults to false. - ## - ## ref: https://docs.gitlab.com/ee/ci/runners/configure_runners.html#prevent-runners-from-revealing-sensitive-information - ## - # protected: true - - ## Run all containers with the privileged flag enabled - ## This will allow the docker:dind image to run if you need to run Docker - ## commands. Please read the docs before turning this on: - ## ref: https://docs.gitlab.com/runner/executors/kubernetes.html#using-dockerdind - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # privileged: false - - ## The name of the secret containing runner-token and runner-registration-token - # secret: gitlab-runner - - ## Namespace to run Kubernetes jobs in (defaults to the same namespace of this release) - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # namespace: - - ## The amount of time, in seconds, that needs to pass before the runner will - ## timeout attempting to connect to the container it has just created. - ## ref: https://docs.gitlab.com/runner/executors/kubernetes.html - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # pollTimeout: 180 - - ## Set maximum build log size in kilobytes, by default set to 4096 (4MB) - ## ref: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # outputLimit: 4096 - - ## Distributed runners caching - ## ref: https://docs.gitlab.com/runner/configuration/autoscale.html#distributed-runners-caching - ## - ## If you want to use s3 based distributing caching: - ## First of all you need to uncomment General settings and S3 settings sections. - ## - ## Create a secret 's3access' containing 'accesskey' & 'secretkey' - ## ref: https://aws.amazon.com/blogs/security/wheres-my-secret-access-key/ - ## - ## $ kubectl create secret generic s3access \ - ## --from-literal=accesskey="YourAccessKey" \ - ## --from-literal=secretkey="YourSecretKey" - ## ref: https://kubernetes.io/docs/concepts/configuration/secret/ - ## - ## If you want to use gcs based distributing caching: - ## First of all you need to uncomment General settings and GCS settings sections. - ## - ## Access using credentials file: - ## Create a secret 'google-application-credentials' containing your application credentials file. - ## ref: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnerscachegcs-section - ## You could configure - ## $ kubectl create secret generic google-application-credentials \ - ## --from-file=gcs-application-credentials-file=./path-to-your-google-application-credentials-file.json - ## ref: https://kubernetes.io/docs/concepts/configuration/secret/ - ## - ## Access using access-id and private-key: - ## Create a secret 'gcsaccess' containing 'gcs-access-id' & 'gcs-private-key'. - ## ref: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnerscachegcs-section - ## You could configure - ## $ kubectl create secret generic gcsaccess \ - ## --from-literal=gcs-access-id="YourAccessID" \ - ## --from-literal=gcs-private-key="YourPrivateKey" - ## ref: https://kubernetes.io/docs/concepts/configuration/secret/ - ## - ## If you want to use Azure-based distributed caching: - ## First, uncomment General settings. - ## - ## Create a secret 'azureaccess' containing 'azure-account-name' & 'azure-account-key' - ## ref: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction - ## - ## $ kubectl create secret generic azureaccess \ - ## --from-literal=azure-account-name="YourAccountName" \ - ## --from-literal=azure-account-key="YourAccountKey" - ## ref: https://kubernetes.io/docs/concepts/configuration/secret/ - - cache: {} - ## General settings - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration and https://docs.gitlab.com/runner/install/kubernetes.html#using-cache-with-configuration-template - # cacheType: s3 - # cachePath: "gitlab_runner" - # cacheShared: true - - ## S3 settings - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration and https://docs.gitlab.com/runner/install/kubernetes.html#using-cache-with-configuration-template - # s3ServerAddress: s3.amazonaws.com - # s3BucketName: - # s3BucketLocation: - # s3CacheInsecure: false - - ## GCS settings - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration and https://docs.gitlab.com/runner/install/kubernetes.html#using-cache-with-configuration-template - # gcsBucketName: - - ## S3 the name of the secret. - # secretName: s3access - ## Use this line for access using gcs-access-id and gcs-private-key - # secretName: gcsaccess - ## Use this line for access using google-application-credentials file - # secretName: google-application-credentials - ## Use this line for access using Azure with azure-account-name and azure-account-key - # secretName: azureaccess - - - ## Build Container specific configuration - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - builds: {} - # cpuLimit: 200m - # cpuLimitOverwriteMaxAllowed: 400m - # memoryLimit: 256Mi - # memoryLimitOverwriteMaxAllowed: 512Mi - # cpuRequests: 100m - # cpuRequestsOverwriteMaxAllowed: 200m - # memoryRequests: 128Mi - # memoryRequestsOverwriteMaxAllowed: 256Mi - - ## Service Container specific configuration - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - services: {} - # cpuLimit: 200m - # memoryLimit: 256Mi - # cpuRequests: 100m - # memoryRequests: 128Mi - - ## Helper Container specific configuration - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - helpers: {} - # cpuLimit: 200m - # memoryLimit: 256Mi - # cpuRequests: 100m - # memoryRequests: 128Mi - # image: "registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-${CI_RUNNER_REVISION}" - - ## Helper container security context configuration - ## Refer to https://docs.gitlab.com/runner/executors/kubernetes.html#using-security-context - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # pod_security_context: - # run_as_non_root: true - # run_as_user: 100 - # run_as_group: 100 - # fs_group: 65533 - # supplemental_groups: [101, 102] - - ## Service Account to be used for runners - ## - # serviceAccountName: - - ## If Gitlab is not reachable through $CI_SERVER_URL - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # cloneUrl: - - ## Specify node labels for CI job pods assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # nodeSelector: {} - - ## Specify node tolerations for CI job pods assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # nodeTolerations: {} - - ## Specify pod labels for CI job pods - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # podLabels: {} - - ## Specify annotations for job pods, useful for annotations such as iam.amazonaws.com/role - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # podAnnotations: {} - - ## Configure environment variables that will be injected to the pods that are created while - ## the build is running. These variables are passed as parameters, i.e. `--env "NAME=VALUE"`, - ## to `gitlab-runner register` command. - ## - ## Note that `envVars` (see below) are only present in the runner pod, not the pods that are - ## created for each build. - ## - ## ref: https://docs.gitlab.com/runner/commands/#gitlab-runner-register - ## - ## DEPRECATED: See https://docs.gitlab.com/runner/install/kubernetes.html#additional-configuration - # env: - # NAME: VALUE - - -## Specify the name of the scheduler which used to schedule runner pods. -## Kubernetes supports multiple scheduler configurations. -## ref: https://kubernetes.io/docs/reference/scheduling -# schedulerName: "my-custom-scheduler" - -## Configure securitycontext for the main container -## ref: http://kubernetes.io/docs/user-guide/security-context/ -## -securityContext: - allowPrivilegeEscalation: false - readOnlyRootFilesystem: false - runAsNonRoot: true - privileged: false - capabilities: - drop: ["ALL"] - -## Configure securitycontext valid for the whole pod -## ref: http://kubernetes.io/docs/user-guide/security-context/ -## -podSecurityContext: - runAsUser: 100 - # runAsGroup: 65533 - fsGroup: 65533 - # supplementalGroups: [65533] - - ## Note: values for the ubuntu image: - # runAsUser: 999 - # fsGroup: 999 - -## Configure resource requests and limits -## ref: http://kubernetes.io/docs/user-guide/compute-resources/ -## -resources: {} - # limits: - # memory: 256Mi - # cpu: 200m - # requests: - # memory: 128Mi - # cpu: 100m - -## Affinity for pod assignment -## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -## -affinity: {} - -## Node labels for pod assignment -## Ref: https://kubernetes.io/docs/user-guide/node-selection/ -## -nodeSelector: {} - # Example: The gitlab runner manager should not run on spot instances so you can assign - # them to the regular worker nodes only. - # node-role.kubernetes.io/worker: "true" - -## List of node taints to tolerate (requires Kubernetes >= 1.6) -## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -## -tolerations: [] - # Example: Regular worker nodes may have a taint, thus you need to tolerate the taint - # when you assign the gitlab runner manager with nodeSelector or affinity to the nodes. - # - key: "node-role.kubernetes.io/worker" - # operator: "Exists" - -## Configure environment variables that will be present when the registration command runs -## This provides further control over the registration process and the config.toml file -## ref: `gitlab-runner register --help` -## ref: https://docs.gitlab.com/runner/configuration/advanced-configuration.html -## -# envVars: -# - name: RUNNER_EXECUTOR -# value: kubernetes - -## list of hosts and IPs that will be injected into the pod's hosts file -hostAliases: [] - # Example: - # - ip: "127.0.0.1" - # hostnames: - # - "foo.local" - # - "bar.local" - # - ip: "10.1.2.3" - # hostnames: - # - "foo.remote" - # - "bar.remote" - -## Annotations to be added to manager pod -## -podAnnotations: {} - # Example: - # iam.amazonaws.com/role: - -## Labels to be added to manager pod -## -podLabels: {} - # Example: - # owner.team: - -## HPA support for custom metrics: -## This section enables runners to autoscale based on defined custom metrics. -## In order to use this functionality, Need to enable a custom metrics API server by -## implementing "custom.metrics.k8s.io" using supported third party adapter -## Example: https://github.com/directxman12/k8s-prometheus-adapter -## -#hpa: {} - # minReplicas: 1 - # maxReplicas: 10 - # metrics: - # - type: Pods - # pods: - # metricName: gitlab_runner_jobs - # targetAverageValue: 400m - -## Configure priorityClassName for manager pod. See k8s docs for more info on how pod priority works: -## https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ -priorityClassName: "" - -## Secrets to be additionally mounted to the containers. -## All secrets are mounted through init-runner-secrets volume -## and placed as readonly at /init-secrets in the init container -## and finally copied to an in-memory volume runner-secrets that is -## mounted at /secrets. -secrets: [] - # Example: - # - name: my-secret - # - name: myOtherSecret - # items: - # - key: key_one - # path: path_one - -## Additional config files to mount in the containers in `/configmaps`. -## -## Please note that a number of keys are reserved by the runner. -## See https://gitlab.com/gitlab-org/charts/gitlab-runner/-/blob/main/templates/configmap.yaml -## for a current list. -configMaps: {} - -## Additional volumeMounts to add to the runner container -## -volumeMounts: [] - # Example: - # - name: my-volume - # mountPath: /mount/path - -## Additional volumes to add to the runner deployment -## -volumes: [] - # Example: - # - name: my-volume - # persistentVolumeClaim: - # claimName: my-pvc diff --git a/charts/gitlab/gitlab/charts/gitlab/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/Chart.yaml deleted file mode 100644 index 61eb16034..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/Chart.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -appVersion: master -description: Web-based Git-repository manager with wiki and issue-tracking features. -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: gitlab -sources: -- https://gitlab.com/gitlab-org/charts/gitlab -version: 0.1.0 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/Chart.yaml deleted file mode 100644 index f4ad0739e..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/Chart.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -appVersion: v16.0.1 -description: GitLab Geo logcursor -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: geo-logcursor -sources: -- https://gitlab.com/charts/gitlab/tree/master/charts/gitlab/charts/geo-logcursor -- https://gitlab.com/gitlab-org/build/CNG/tree/master/gitlab-rails -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/_helpers.tpl deleted file mode 100644 index 609ac3e7c..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/_helpers.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "geo-logcursor.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "geo-logcursor.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Shorthand check for is this chart is enabled -*/}} -{{- define "geo-logcursor.enabled" -}} -{{- if eq true .Values.enabled -}} -{{- if include "gitlab.geo.secondary" $ -}} -true -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/configmap.yml b/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/configmap.yml deleted file mode 100644 index 98f3a8eae..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/configmap.yml +++ /dev/null @@ -1,103 +0,0 @@ -{{- if include "geo-logcursor.enabled" $ -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - installation_type: | - gitlab-helm-chart - database.yml.erb: | - {{- include "gitlab.database.yml" . | nindent 4 }} - smtp_settings.rb: | - {{- include "gitlab.smtp_settings" . | nindent 4 }} - {{- include "gitlab.rails.redis.all" . | nindent 2 }} - gitlab.yml.erb: | - production: &base - gitlab: - host: {{ template "gitlab.gitlab.hostname" . }} - https: {{ hasPrefix "https://" (include "gitlab.gitlab.url" .) }} - {{- with .Values.global.hosts.ssh }} - ssh_host: {{ . | quote }} - {{- end }} - {{- with .Values.global.appConfig }} - {{- if .cdnHost }} - cdn_host: {{ .cdnHost | quote }} - {{- end }} - max_request_duration_seconds: {{ default (include "gitlab.appConfig.maxRequestDurationSeconds" $) .maxRequestDurationSeconds }} - impersonation_enabled: {{ .enableImpersonation }} - application_settings_cache_seconds: {{ .applicationSettingsCacheSeconds | int }} - usage_ping_enabled: {{ eq .enableUsagePing true }} - seat_link_enabled: {{ eq .enableSeatLink true }} - username_changing_enabled: {{ eq .usernameChangingEnabled true }} - issue_closing_pattern: {{ .issueClosingPattern | quote }} - default_theme: {{ .defaultTheme }} - {{- include "gitlab.appConfig.defaultProjectsFeatures.configuration" $ | nindent 8 }} - {{- if hasKey .initialDefaults "signupEnabled" }} - signup_enabled: {{ .initialDefaults.signupEnabled }} - {{- end }} - webhook_timeout: {{ .webhookTimeout }} - {{- end }} - trusted_proxies: - {{- if .Values.trusted_proxies }} - {{- toYaml .Values.trusted_proxies | nindent 10 }} - {{- end }} - time_zone: {{ .Values.global.time_zone | quote }} - email_from: {{ template "gitlab.email.from" . }} - email_display_name: {{ .Values.global.email.display_name | quote }} - email_reply_to: {{ template "gitlab.email.reply_to" . }} - email_subject_suffix: {{ .Values.global.email.subject_suffix | quote }} - {{- with .Values.global.appConfig }} - {{- if .microsoft_graph_mailer.enabled }} - {{- include "gitlab.appConfig.microsoft_graph_mailer" . | nindent 6 }} - {{- end }} - {{- if .incomingEmail.enabled }} - {{- include "gitlab.appConfig.incoming_email" . | nindent 6 }} - {{- end }} - {{- if .serviceDeskEmail.enabled }} - {{- include "gitlab.appConfig.service_desk_email" . | nindent 6 }} - {{- end }} - {{- include "gitlab.appConfig.cronJobs" . | nindent 6 }} - gravatar: - plain_url: {{ .gravatar.plainUrl }} - ssl_url: {{ .gravatar.sslUrl }} - {{- include "gitlab.appConfig.extra" . | nindent 6 }} - {{- end }} - ## Object storage not needed by geo-logcursor - artifacts: - lfs: - uploads: - packages: - external_diffs: - {{- include "gitlab.geo.config" $ | nindent 6 }} - pages: - enabled: false - mattermost: - enabled: false - gitlab_ci: - kerberos: - enabled: false - shared: - ## Gitaly configuratin is _stubbed_, not used by geo-logcursor - gitaly: - client_path: /home/git/gitaly/bin - token: - repositories: - storages: # You must have at least a `default` storage path. - {"default":{"path":"/srv/gitlab/git-data/repositories","gitaly_address":"unix:/srv/gitlab/gitaly/gitaly.socket"}} - backup: - path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/) - monitoring: - ip_whitelist: - - 0.0.0.0/0 - sidekiq_exporter: - configure: | - {{- include "gitlab.scripts.configure.secrets" (dict "required" "rails-secrets" "optional" "postgres redis") | nindent 4 }} - {{- include "gitlab.psql.ssl.initScript" . | nindent 4 }} - {{- include "gitlab.geo.psql.ssl.initScript" . | nindent 4 }} - -# Leave this here - This line denotes end of block to the parser. -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/deployment.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/deployment.yaml deleted file mode 100644 index 3923b3d01..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/deployment.yaml +++ /dev/null @@ -1,205 +0,0 @@ -{{- if include "geo-logcursor.enabled" $ }} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.image -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -{{- include "database.datamodel.prepare" . -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.deploymentAnnotations" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - {{- if .Values.deployment.strategy }} - strategy: {{ .Values.deployment.strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yml") . | sha256sum }} - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- if eq (default .Values.global.antiAffinity .Values.antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- else if eq (default .Values.global.antiAffinity .Values.antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- end }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - {{- include "gitlab.priorityClassName" . | nindent 6 }} - initContainers: - {{- include "gitlab.extraInitContainers" . | nindent 8 }} - {{- include "gitlab.certificates.initContainer" . | nindent 8 }} - - name: configure - command: ['sh'] - args: [ '-c', 'sh -x /config-logcursor/configure'] - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" $ | indent 10 }} - env: - {{- include "gitlab.extraEnv" . | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 10 }} - {{- include "gitlab.psql.ssl.volumeMount" . | nindent 10 }} - {{- include "gitlab.geo.psql.ssl.volumeMount" . | nindent 10 }} - - name: logcursor-config - mountPath: /config-logcursor - readOnly: true - - name: init-logcursor-secrets - mountPath: /init-config - readOnly: true - - name: logcursor-secrets - mountPath: /init-secrets - readOnly: false - resources: - {{- toYaml .Values.init.resources | nindent 12 }} - - name: dependencies - image: "{{ coalesce .Values.image.repository (include "image.repository" .) }}:{{ coalesce .Values.image.tag (include "gitlab.versionTag" . ) }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" $ | indent 10 }} - args: - - /scripts/wait-for-deps - env: - - name: GITALY_FEATURE_DEFAULT_ON - value: "1" - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/var/opt/gitlab/templates' - - name: CONFIG_DIRECTORY - value: '/srv/gitlab/config' - - name: DB_SCHEMA_TARGET - value: 'geo' - {{- include "gitlab.extraEnv" . | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 12 }} - - name: logcursor-config - mountPath: '/var/opt/gitlab/templates' - - name: logcursor-secrets - mountPath: '/etc/gitlab' - readOnly: true - - name: logcursor-secrets - mountPath: /srv/gitlab/config/secrets.yml - subPath: rails-secrets/secrets.yml - readOnly: true - resources: - {{- toYaml .Values.init.resources | nindent 12 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - containers: - {{- include "gitlab.extraContainers" . | nindent 8 }} - - name: {{ .Chart.Name }} - image: "{{ coalesce .Values.image.repository (include "image.repository" .) }}:{{ coalesce .Values.image.tag (include "gitlab.versionTag" . ) }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" $ | indent 10 }} - env: - - name: GITALY_FEATURE_DEFAULT_ON - value: "1" - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/var/opt/gitlab/templates' - - name: CONFIG_DIRECTORY - value: '/srv/gitlab/config' - {{- include "gitlab.extraEnv" . | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - volumeMounts: - - name: logcursor-config - mountPath: '/var/opt/gitlab/templates' - - name: logcursor-secrets - mountPath: '/etc/gitlab' - readOnly: true - - name: logcursor-secrets - mountPath: /srv/gitlab/config/secrets.yml - subPath: rails-secrets/secrets.yml - - name: logcursor-config - mountPath: '/srv/gitlab/INSTALLATION_TYPE' - subPath: installation_type - {{- include "gitlab.certificates.volumeMount" . | nindent 12 }} - {{- include "gitlab.extraVolumeMounts" . | nindent 12 }} - livenessProbe: - exec: - command: - - /scripts/healthcheck - initialDelaySeconds: {{ .Values.deployment.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.deployment.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.deployment.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.deployment.livenessProbe.failureThreshold }} - readinessProbe: - exec: - command: - - /scripts/healthcheck - initialDelaySeconds: {{ .Values.deployment.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.deployment.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.deployment.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.deployment.readinessProbe.failureThreshold }} - lifecycle: - preStop: - exec: - command: ["/bin/bash", "-c", "pkill -SIGQUIT -f 'geo_log_cursor'"] - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - {{- include "gitlab.extraVolumes" . | nindent 6 }} - {{- include "gitlab.psql.ssl.volume" . | nindent 6 }} - {{- include "gitlab.geo.psql.ssl.volume" . | nindent 6 }} - - name: logcursor-config - configMap: - name: {{ template "fullname" . }} - - name: init-logcursor-secrets - projected: - defaultMode: 0400 - sources: - - secret: - name: {{ template "gitlab.rails-secrets.secret" . }} - items: - - key: secrets.yml - path: rails-secrets/secrets.yml - {{- include "gitlab.redis.secrets" . | nindent 10 }} - {{- range $.Values.local.psql }} - {{- include "gitlab.psql.secret" . | nindent 10 }} - {{- end }} - - secret: - name: {{ template "gitlab.geo.psql.password.secret" . }} - items: - - key: {{ template "gitlab.geo.psql.password.key" . }} - path: postgres/geo-psql-password - - name: logcursor-secrets - emptyDir: - medium: "Memory" - {{- include "gitlab.certificates.volumes" . | nindent 6 }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/serviceaccount.yaml deleted file mode 100644 index 69ddca009..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/values.yaml deleted file mode 100644 index 7c058d962..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/geo-logcursor/values.yaml +++ /dev/null @@ -1,117 +0,0 @@ -# Default values for geo-logcursor. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -image: {} - # pullPolicy: IfNotPresent - # pullSecrets: [] - # repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-geo-logcursor - # tag: master -init: - image: {} - # repository: - # tag: - resources: - requests: - cpu: 50m - containerSecurityContext: {} -enabled: true -replicaCount: 1 -global: - geo: - role: primary - nodeName: - psql: - # host: '0.0.0.0' - # port: '5432' - # database: 'gitlabhq_geo_production' - # username: 'gitlab_replicator' - password: {} - # secret: gitlab-geo-postgres - # key: postgresql-password - # ssl: - # secret: gitlab-ssl-secret - # clientKey: client-key.pem - # clientCertificate: client-cert.pem - # serverCA: server-ca.pem - redis: - auth: {} - hosts: - domain: example.com - hostSuffix: - https: true - gitlab: {} - #name: gitlab.example.com - #https: false - registry: {} - #name: registry.example.com - #https: false - minio: {} - #name: minio.example.com - #https: false - -redis: - auth: {} -psql: {} -gitaly: - # host: '0.0.0.0' - # port: 8075 - # serviceName: 'gitaly' - authToken: {} - # secret: gitaly-secret - # key: token -minio: - serviceName: 'minio-svc' - port: 9000 -resources: - # limits: - # cpu: 1 - # memory: 1.5G - requests: - cpu: 300m - memory: 700M - -deployment: - livenessProbe: - initialDelaySeconds: 20 - periodSeconds: 60 - timeoutSeconds: 30 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - initialDelaySeconds: 0 - periodSeconds: 10 - timeoutSeconds: 2 - successThreshold: 1 - failureThreshold: 3 - strategy: {} - -nodeSelector: {} -tolerations: [] -affinity: - podAntiAffinity: - topologyKey: - -podLabels: {} -common: - labels: {} - -# Priority class assigned to pods -priorityClassName: "" - -## Allow to overwrite under which User and Group the Pod will be running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -## Allow to overwrite the specific security context under which the container is running. -containerSecurityContext: - runAsUser: 1000 - -## Enable deployment to use a serviceAccount -serviceAccount: - enabled: false - create: false - annotations: {} - ## Name to be used for serviceAccount, otherwise defaults to chart fullname - # name: diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/Chart.yaml deleted file mode 100644 index 5378ebcf5..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/Chart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -appVersion: 16.0.1 -description: Git RPC service for handling all the git calls made by GitLab -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -- gitaly -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: gitaly -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/gitaly -- https://gitlab.com/gitlab-org/build/CNG/tree/master/gitaly -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_configmap_spec.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_configmap_spec.yaml deleted file mode 100644 index 0095c1c27..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_configmap_spec.yaml +++ /dev/null @@ -1,188 +0,0 @@ -data: - configure: | - set -e - mkdir -p /init-secrets/gitaly /init-secrets/shell - cp -v -r -L /init-config/.gitlab_shell_secret /init-secrets/shell/.gitlab_shell_secret - cp -v -r -L /init-config/gitaly_token /init-secrets/gitaly/gitaly_token - {{- if $.Values.global.gitaly.tls.enabled }} - cp -v -L /init-config/gitaly.crt /init-secrets/gitaly/gitaly.crt - cp -v -L /init-config/gitaly.key /init-secrets/gitaly/gitaly.key - {{- end }} - {{- if .Values.gpgSigning.enabled }} - cp -v -L /init-config/signing_key.gpg /init-secrets/gitaly/signing_key.gpg - {{- end }} - config.toml.erb: | - # The directory where Gitaly's executables are stored - bin_dir = "/usr/local/bin" - - # listen on a TCP socket. This is insecure (no authentication) - listen_addr = "0.0.0.0:{{ coalesce .Values.service.internalPort .Values.global.gitaly.service.internalPort }}" - - # Directory where internal sockets reside - # note: no value will result in a `/tmp/gitlab-internal-*` path - # internal_socket_dir = "/home/git" - - {{- if $.Values.global.gitaly.tls.enabled }} - tls_listen_addr = "0.0.0.0:{{ coalesce .Values.service.tls.internalPort .Values.global.gitaly.service.tls.internalPort }}" - {{- end }} - - # If metrics collection is enabled, inform gitaly about that - {{- if .Values.metrics.enabled }} - prometheus_listen_addr = "0.0.0.0:{{ default .Values.metrics.port .Values.metrics.metricsPort }}" - {{- end }} - - {{- if $.Values.global.gitaly.tls.enabled }} - [tls] - certificate_path = '/etc/gitlab-secrets/gitaly/gitaly.crt' - key_path = '/etc/gitlab-secrets/gitaly/gitaly.key' - {{- end }} - - {{- if .storage }} - - {{- /* - Passing in "skipStorages=true" below prevents changes in the Gitaly replica counts from modifying - the contents of the ConfigMap, which would cause existing pods to restart unnecessarily. - */}} - {{ if not .skipStorages }} - <% @storages = [ {{ include "gitlab.praefect.gitaly.storageNames" . }} ] %> - {{- end }} - - <% @hostname=ENV['HOSTNAME'].strip %> - <% if @storages.any? { |s| s.include?(@hostname) } %> - [[storage]] - name = "<%= @hostname %>" - path = "/home/git/repositories" - <% else %> - <% raise Exception, "Storage for node #{@hostname} is not present in the storageNames array. Did you use kubectl to scale up? You need to solely use helm for this purpose." %> - <% end %> - - {{- else }} - - {{- /* - Passing in "skipStorages=true" below prevents changes in the Gitaly replica counts from modifying - the contents of the ConfigMap, which would cause existing pods to restart unnecessarily. - */}} - {{ if not .skipStorages }} - <% @storages = [ {{ include "gitlab.gitaly.storageNames" . }} ] %> - {{- end }} - - <% @index=`echo ${HOSTNAME##*-}`.to_i %> - <% if @storages.length > @index %> - [[storage]] - name = "<%= @storages[@index] %>" - path = "/home/git/repositories" - <% else %> - <% raise Exception, "Storage for node #{@index} is not present in the storageNames array. Did you use kubectl to scale up? You need to solely use helm for this purpose." %> - <% end %> - - {{- end }} - - [logging] - {{- with .Values.logging }} - {{- if .level }} - level = "{{ .level }}" - {{- end }} - {{- if .format }} - format = "{{ .format }}" - {{- end }} - {{- if .sentryDsn }} - sentry_dsn = "{{ .sentryDsn }}" - {{- end }} - {{- if .rubySentryDsn }} - ruby_sentry_dsn = "{{ .rubySentryDsn }}" - {{- end }} - dir = "/var/log/gitaly" - {{- if .sentryEnvironment }} - sentry_environment = "{{ .sentryEnvironment }}" - {{- end }} - {{- end }} - - {{- if .Values.prometheus.grpcLatencyBuckets }} - [prometheus] - grpc_latency_buckets = {{ .Values.prometheus.grpcLatencyBuckets }} - {{- end }} - - [auth] - token = <%= File.read('/etc/gitlab-secrets/gitaly/gitaly_token').strip.to_json %> - - [git] - use_bundled_binaries = true - ignore_gitconfig = true - {{- if .Values.gpgSigning.enabled }} - signing_key = '/etc/gitlab-secrets/gitaly/signing_key.gpg' - {{- end }} - {{- with .Values.git }} - {{- if .catFileCacheSize }} - catfile_cache_size = {{ .catFileCacheSize }} - {{- end }} - {{- end }} - {{- if .Values.git.config }} - {{- range .Values.git.config }} - - [[git.config]] - key = "{{ .key }}" - value = "{{ .value }}" - {{- end }} - {{- end }} - - [gitaly-ruby] - # The directory where gitaly-ruby is installed - dir = "/srv/gitaly-ruby" - {{- with .Values.ruby }} - {{- if .maxRss }} - max_rss = {{ .maxRss }} - {{- end }} - {{- if .gracefulRestartTimeout }} - graceful_restart_timeout = "{{ .gracefulRestartTimeout }}" - {{- end }} - {{- if .restartDelay }} - restart_delay = "{{ .restartDelay }}" - {{- end }} - {{- if .numWorkers }} - num_workers = {{ .numWorkers }} - {{- end }} - {{- end }} - - [gitlab-shell] - # The directory where gitlab-shell is installed - dir = "/srv/gitlab-shell" - - [gitlab] - # location of shared secret for GitLab Shell / API interaction - secret_file = "/etc/gitlab-secrets/shell/.gitlab_shell_secret" - # URL of API - url = "{{ template "gitlab.workhorse.url" . }}/" - - [gitlab.http-settings] - # read_timeout = 300 - # user = someone - # password = somepass - # ca_file = /etc/ssl/cert.pem - # ca_path = /etc/pki/tls/certs - - [hooks] - # directory containing custom hooks - custom_hooks_dir = "/home/git/custom_hooks" - - {{- if .Values.shell.concurrency }} - {{- range .Values.shell.concurrency }} - {{- if and .rpc .maxPerRepo }} - [[concurrency]] - rpc = "{{ .rpc }}" - max_per_repo = {{ .maxPerRepo }} - {{- end }} - {{- end }} - {{- end }} - - {{- if .Values.packObjectsCache.enabled }} - [pack_objects_cache] - enabled = true - {{- with .Values.packObjectsCache }} - {{- if .dir }} - dir = {{ .dir | quote }} - {{- end }} - {{- if .max_age }} - max_age = {{ .max_age }} - {{- end }} - {{- end }} - {{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_helpers.tpl deleted file mode 100644 index 64b73d2cd..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_helpers.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{- define "gitlab.gitaly.storageNames" -}} -{{- range (coalesce $.Values.internal.names $.Values.global.gitaly.internal.names) }} {{ . | quote }}, {{- end }} -{{- end -}} - -{{- define "gitlab.praefect.gitaly.storageNames" -}} -{{- range $_, $storage := $.Values.global.praefect.virtualStorages -}} -{{ range until ($storage.gitalyReplicas | int) }} {{ printf "%s-gitaly-%s-%d" $.Release.Name $storage.name . | quote }}, {{- end }} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_pdb_spec.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_pdb_spec.yaml deleted file mode 100644 index d2e0a3423..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_pdb_spec.yaml +++ /dev/null @@ -1,13 +0,0 @@ -spec: - {{- if .storage }} - maxUnavailable: {{ default .Values.maxUnavailable .storage.maxUnavailable }} - {{- else }} - maxUnavailable: {{ .Values.maxUnavailable }} - {{- end }} - selector: - matchLabels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - {{- if .storage }} - storage: {{ .storage.name }} - {{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_service_spec.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_service_spec.yaml deleted file mode 100644 index 1de369a80..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_service_spec.yaml +++ /dev/null @@ -1,25 +0,0 @@ -spec: - type: {{ coalesce .Values.service.type .Values.global.gitaly.service.type }} - clusterIP: "None" - ports: - - port: {{ coalesce .Values.service.externalPort .Values.global.gitaly.service.externalPort }} - # This port is NOT prefixed with `grpc` due to - # https://gitlab.com/gitlab-org/charts/gitlab/-/issues/3822 - name: tcp-{{ coalesce .Values.service.name .Values.global.gitaly.service.name }} - targetPort: grpc-gitaly - {{- if .Values.global.gitaly.tls.enabled }} - - port: {{ coalesce .Values.service.tls.externalPort .Values.global.gitaly.service.tls.externalPort }} - name: tls-{{coalesce .Values.service.name .Values.global.gitaly.service.name }} - targetPort: {{ coalesce .Values.service.tls.internalPort .Values.global.gitaly.service.tls.internalPort }} - {{- end }} - {{- if .Values.metrics.enabled }} - - port: {{ default .Values.metrics.port .Values.metrics.metricsPort }} - name: http-metrics - targetPort: http-metrics - {{- end }} - selector: - app: {{ template "name" . }} - release: {{ .Release.Name }} - {{- if .storage }} - storage: {{ .storage.name }} - {{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_statefulset_spec.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_statefulset_spec.yaml deleted file mode 100644 index a760cfe8d..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/_statefulset_spec.yaml +++ /dev/null @@ -1,332 +0,0 @@ -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.image -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -spec: - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - {{- if .storage }} - storage: {{ .storage.name }} - {{- end }} - {{- if .storage }} - serviceName: {{ include "gitlab.praefect.gitaly.serviceName" (dict "context" . "name" .storage.name) }} - {{- else }} - serviceName: {{ include "gitlab.gitaly.serviceName" . }} - {{- end }} - {{- if .storage }} - replicas: {{ default (include "gitlab.gitaly.replicas" .) .storage.gitalyReplicas }} - {{- else }} - replicas: {{ include "gitlab.gitaly.replicas" . }} - {{- end }} - podManagementPolicy: Parallel - {{- if .Values.statefulset.strategy }} - updateStrategy: {{ .Values.statefulset.strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - labels: - {{- if .storage }} - storage: {{ .storage.name }} - {{- end }} - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - {{- $cm := "/configmap.yml" -}} - {{- if .storage }} - {{- $cm = "/configmap-with-praefect.yml" -}} - {{- end }} - checksum/config: {{ include (print .Template.BasePath $cm) (merge (dict) . (dict "skipStorages" true)) | sha256sum }} - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if and $.Values.metrics.enabled (not $.Values.metrics.serviceMonitor.enabled) }} - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: {{ default $.Values.metrics.port $.Values.metrics.metricsPort | quote }} - gitlab.com/prometheus_path: {{ $.Values.metrics.path }} - prometheus.io/scrape: "true" - prometheus.io/port: {{ default $.Values.metrics.port $.Values.metrics.metricsPort | quote }} - prometheus.io/path: {{ $.Values.metrics.path }} - {{- end }} - spec: - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- include "gitlab.priorityClassName" . | nindent 6 }} - terminationGracePeriodSeconds: 30 - initContainers: - {{- include "gitlab.extraInitContainers" . | nindent 8 }} - {{- include "gitlab.certificates.initContainer" . | nindent 8 }} - - name: configure - command: ['sh', '/config/configure'] - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" .Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" . | indent 10 }} - env: - {{- include "gitlab.extraEnv" . | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 10 }} - - name: gitaly-config - mountPath: /config - readOnly: true - - name: init-gitaly-secrets - mountPath: /init-config - readOnly: true - - name: gitaly-secrets - mountPath: /init-secrets - readOnly: false - resources: - {{- toYaml .Values.init.resources | nindent 12 }} - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - {{- if eq (default .Values.global.antiAffinity .Values.antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- if .storage }} - storage: {{ .storage.name }} - {{- end }} - {{- else if eq (default .Values.global.antiAffinity .Values.antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- if .storage }} - storage: {{ .storage.name }} - {{- end }} - {{- end }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - automountServiceAccountToken: false - containers: - {{- include "gitlab.extraContainers" . | nindent 8 }} - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ coalesce .Values.image.tag (include "gitlab.parseAppVersion" (dict "appVersion" .Chart.AppVersion "prepend" "true")) }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" . | indent 10 }} - ports: - - containerPort: {{ coalesce .Values.service.internalPort .Values.global.gitaly.service.internalPort }} - name: grpc-gitaly - {{- if .Values.metrics.enabled }} - - containerPort: {{ default $.Values.metrics.port $.Values.metrics.metricsPort }} - name: http-metrics - {{- end }} - env: - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/etc/gitaly/templates' - - name: CONFIG_DIRECTORY - value: '/etc/gitaly' - - name: GITALY_CONFIG_FILE - value: '/etc/gitaly/config.toml' - - name: SSL_CERT_DIR - value: '/etc/ssl/certs' - {{- include "gitlab.tracing.env" . | nindent 12 }} - {{- include "gitlab.extraEnv" . | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 12 }} - {{- include "gitlab.certificates.volumeMount" . | nindent 12 }} - - name: gitaly-config - mountPath: '/etc/gitaly/templates' - - name: gitaly-secrets - mountPath: '/etc/gitlab-secrets' - readOnly: true - - name: repo-data - mountPath: '/home/git/repositories' - {{- if and .Values.persistence.enabled .Values.persistence.subPath }} - subPath: "{{ .Values.persistence.subPath }}" - {{- end }} - {{- with .Values.global.gitaly.hooks }} - {{- if .preReceive }} - - name: gitaly-hooks-pre-receive - mountPath: "/home/git/custom_hooks/pre-receive.d" - {{- end }} - {{- if .postReceive }} - - name: gitaly-hooks-post-receive - mountPath: "/home/git/custom_hooks/post-receive.d" - {{- end }} - {{- if .update }} - - name: gitaly-hooks-update - mountPath: "/home/git/custom_hooks/update.d" - {{- end }} - {{- end }} - livenessProbe: - exec: - command: - - /scripts/healthcheck - initialDelaySeconds: {{ .Values.statefulset.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.statefulset.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.statefulset.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.statefulset.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.statefulset.livenessProbe.failureThreshold }} - readinessProbe: - exec: - command: - - /scripts/healthcheck - initialDelaySeconds: {{ .Values.statefulset.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.statefulset.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.statefulset.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.statefulset.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.statefulset.readinessProbe.failureThreshold }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - {{- include "gitlab.extraVolumes" . | nindent 6 }} - - name: gitaly-config - configMap: - {{- $cmName := include "fullname" . -}} - {{- if .storage}} - {{- $cmName = printf "%s-%s" $cmName "praefect" -}} - {{- end }} - name: {{ $cmName }} - {{- if not .Values.persistence.enabled }} - - name: repo-data - emptyDir: {} - {{- end }} - - name: gitaly-secrets - emptyDir: - medium: "Memory" - - name: init-gitaly-secrets - projected: - defaultMode: 0440 - sources: - - secret: - name: {{ template "gitlab.gitaly.authToken.secret" . }} - items: - - key: {{ template "gitlab.gitaly.authToken.key" . }} - path: "gitaly_token" - - secret: - name: {{ template "gitlab.gitlab-shell.authToken.secret" . }} - items: - - key: {{ template "gitlab.gitlab-shell.authToken.key" . }} - path: ".gitlab_shell_secret" - {{- if .Values.gpgSigning.enabled }} - - secret: - name: {{ .Values.gpgSigning.secret }} - items: - - key: {{ .Values.gpgSigning.key }} - path: "signing_key.gpg" - {{- end }} - {{- if .Values.global.gitaly.tls.enabled }} - {{- $secretName := include "gitlab.gitaly.tls.secret" . -}} - {{- if .storage }} - {{- $secretName = .storage.tlsSecretName -}} - {{- end }} - - secret: - name: {{ $secretName }} - items: - - key: "tls.crt" - path: "gitaly.crt" - - key: "tls.key" - path: "gitaly.key" - {{- end }} - {{- with .Values.global.gitaly.hooks }} - {{- if .preReceive }} - {{- if .preReceive.configmap }} - - name: gitaly-hooks-pre-receive - configMap: - name: {{ .preReceive.configmap }} - defaultMode: 0555 - {{- end }} - {{- end }} - {{- if .postReceive }} - {{- if .postReceive.configmap }} - - name: gitaly-hooks-post-receive - configMap: - name: {{ .postReceive.configmap }} - defaultMode: 0555 - {{- end }} - {{- end }} - {{- if .update }} - {{- if .update.configmap }} - - name: gitaly-hooks-update - configMap: - name: {{ .update.configmap }} - defaultMode: 0555 - {{- end }} - {{- end }} - {{- end }} - {{- include "gitlab.certificates.volumes" . | nindent 6 }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} - - {{- $persistence := .Values.persistence.enabled -}} - {{- $accessMode := .Values.persistence.accessMode -}} - {{- $annotations := .Values.persistence.annotations -}} - {{- $size := .Values.persistence.size -}} - {{- $storageClass := .Values.persistence.storageClass -}} - {{- $matchLabels := .Values.persistence.matchLabels -}} - {{- $matchExpressions := .Values.persistence.matchExpressions -}} - {{- if .storage -}} - {{- if hasKey .storage "persistence" -}} - {{- if and (hasKey .storage.persistence "enabled") .storage.persistence.enabled -}} - {{- $persistence = .storage.persistence.enabled -}} - {{- if .storage.persistence.accessMode -}} - {{- $accessMode = .storage.persistence.accessMode -}} - {{- end -}} - {{- if .storage.persistence.annotations -}} - {{- $annotations = .storage.persistence.annotations -}} - {{- end -}} - {{- if .storage.persistence.size -}} - {{- $size = .storage.persistence.size -}} - {{- end -}} - {{- if .storage.persistence.storageClass -}} - {{- $storageClass = .storage.persistence.storageClass -}} - {{- end -}} - {{- if .storage.persistence.matchLabels -}} - {{- $matchLabels = .storage.persistence.matchLabels -}} - {{- end -}} - {{- if .storage.persistence.matchExpressions -}} - {{- $matchExpressions = .storage.persistence.matchExpressions -}} - {{- end -}} - {{- end -}} - {{- end -}} - {{- end }} - - {{ if $persistence }} - volumeClaimTemplates: - - metadata: - name: repo-data - labels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - {{- if .storage }} - storage: {{ .storage.name }} - {{- end }} - annotations: - {{- range $key, $value := $annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: - - {{ $accessMode | quote }} - resources: - requests: - storage: {{ $size | quote }} - {{- if $storageClass }} - {{- if (eq "-" $storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $storageClass }}" - {{- end -}} - {{- end }} - selector: - {{- if $matchLabels }} - matchLabels: - {{- toYaml $matchLabels | nindent 12 }} - {{- end -}} - {{- if $matchExpressions }} - matchExpressions: - {{- toYaml $matchExpressions | nindent 12 }} - {{- end -}} - {{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/configmap-with-praefect.yml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/configmap-with-praefect.yml deleted file mode 100644 index aabc00a6e..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/configmap-with-praefect.yml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if and .Values.global.gitaly.enabled .Values.global.praefect.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }}-praefect - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -{{ include (print $.Template.BasePath "/_configmap_spec.yaml") (merge (dict) . (dict "storage" "praefect")) }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/configmap.yml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/configmap.yml deleted file mode 100644 index 91679472b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/configmap.yml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if eq (include "gitlab.gitaly.includeInternalResources" $) "true" -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -{{ include (print $.Template.BasePath "/_configmap_spec.yaml") . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/pdb-with-praefect.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/pdb-with-praefect.yaml deleted file mode 100644 index 9639d327e..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/pdb-with-praefect.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.global.gitaly.enabled .Values.global.praefect.enabled -}} -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -{{- range .Values.global.praefect.virtualStorages -}} -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - name: {{ template "fullname" $ }}-{{ .name }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "gitlab.commonLabels" $ | nindent 4 }} - storage: {{ .name }} -{{ include (print $.Template.BasePath "/_pdb_spec.yaml") (merge (dict) $ (dict "storage" .)) }} ---- -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/pdb.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/pdb.yaml deleted file mode 100644 index 5d76c15ed..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/pdb.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if eq (include "gitlab.gitaly.includeInternalResources" $) "true" -}} -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -{{ include (print $.Template.BasePath "/_pdb_spec.yaml") . }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/service-with-praefect.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/service-with-praefect.yaml deleted file mode 100644 index d021129ec..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/service-with-praefect.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if and .Values.global.gitaly.enabled .Values.global.praefect.enabled -}} -{{- range .Values.global.praefect.virtualStorages -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "gitlab.praefect.gitaly.serviceName" (dict "context" $ "name" .name) }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "gitlab.commonLabels" $ | nindent 4 }} - {{- include "gitlab.serviceLabels" $ | nindent 4 }} - storage: {{ .name }} - annotations: - {{- include "gitlab.serviceAnnotations" $ | nindent 4 }} -{{ include (print $.Template.BasePath "/_service_spec.yaml") (merge (dict) $ (dict "storage" .)) }} ---- -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/service.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/service.yaml deleted file mode 100644 index 550627d6e..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq (include "gitlab.gitaly.includeInternalResources" $) "true" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "gitlab.gitaly.serviceName" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- include "gitlab.serviceLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.serviceAnnotations" . | nindent 4 }} -{{ include (print $.Template.BasePath "/_service_spec.yaml") . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/serviceaccount.yaml deleted file mode 100644 index 16435d96b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 -}} - {{- include "gitlab.commonLabels" . | nindent 4 -}} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/servicemonitor.yaml deleted file mode 100644 index ab6ec8952..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/servicemonitor.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled -}} -{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "gitlab.gitaly.serviceName" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with .Values.metrics.serviceMonitor.additionalLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - {{- if .storage }} - storage: {{ .storage.name }} - {{- end }} - endpoints: - - port: http-metrics - path: {{ .Values.metrics.path }} - {{- with .Values.metrics.serviceMonitor.endpointConfig }} - {{- toYaml . | nindent 6 }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/statefulset-with-praefect.yml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/statefulset-with-praefect.yml deleted file mode 100644 index 7edf994b3..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/statefulset-with-praefect.yml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.global.gitaly.enabled .Values.global.praefect.enabled (not .Values.global.gitaly.host) -}} -{{- range .Values.global.praefect.virtualStorages -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "gitlab.praefect.gitaly.serviceName" (dict "context" $ "name" .name) }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "gitlab.commonLabels" $ | nindent 4 }} - storage: {{ .name }} -{{ include (print $.Template.BasePath "/_statefulset_spec.yaml") (merge (dict) $ (dict "storage" .)) }} ---- -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/statefulset.yml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/statefulset.yml deleted file mode 100644 index ac310d5dd..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/templates/statefulset.yml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if eq (include "gitlab.gitaly.includeInternalResources" $) "true" -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -{{ include (print $.Template.BasePath "/_statefulset_spec.yaml") . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/values.yaml deleted file mode 100644 index 3104bf059..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitaly/values.yaml +++ /dev/null @@ -1,191 +0,0 @@ -# Default values for gitaly. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -global: - gitaly: - enabled: true - internal: - names: ["default"] - external: [] - authToken: {} - hooks: {} - # serviceName: - redis: - auth: {} - -gitaly: {} -# serviceName: - -internal: {} -image: - repository: registry.gitlab.com/gitlab-org/build/cng/gitaly - # pullPolicy: IfNotPresent - # pullSecrets: [] - # tag: master -service: - tls: {} -annotations: {} -common: - labels: {} -podLabels: {} -serviceLabels: {} - -init: - image: {} - # repository: - # tag: - resources: - requests: - cpu: 50m - containerSecurityContext: {} - -## Support for tolerations for pod scheduling -tolerations: [] - -## The Gitaly StatefulSet's priorityClassName -# priorityClassName: - -logging: - format: "json" - # level: - # sentryDsn: - # rubySentryDsn: - # sentryEnvironment: -git: {} - # catFileCacheSize: - ## Amend the default configuration Gitaly is using when spawning Git - ## commands. Accepts configuration as documented in git-config(1). - # config: - # - {key: "pack.threads", value: 4} -ruby: {} - # maxRss: - # gracefulRestartTimeout: - # restartDelay: - # numWorkers: -prometheus: {} - # grpcLatencyBuckets: "[1.0, 1.5, 2.0, 2.5]" - -workhorse: {} - # by default, Workhorse is a part of the Webservice Pods / Service - # scheme: 'http' - # host: '0.0.0.0' - # serviceName: 'webservice' - # port: 8181 -shell: - authToken: {} - concurrency: [] - # - rpc: "/gitaly.SmartHTTPService/PostUploadPack" - # maxPerRepo: 20 - # - rpc: "/gitaly.SSHService/SSHUploadPack" - # maxPerRepo: 20 - -## Enable prometheus metrics and set the port to scrape the -## container on. -metrics: - enabled: true - port: 9236 - path: /metrics - serviceMonitor: - enabled: false - additionalLabels: {} - endpointConfig: {} - # DEPRECATED in favor of `metrics.port` as seen above - metricsPort: - -## Enable persistence using Persistent Volume Claims -## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ -## -persistence: - enabled: true - - ## git repositories Persistent Volume Storage Class - ## 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: "-" - accessMode: ReadWriteOnce - size: 50Gi - - ## If subPath is set mount a sub folder of a volume instead of the root of the volume. - ## This is especially handy for volume plugins that don't natively support sub mounting (like glusterfs). - ## - subPath: "" - - ## Only bind to a volume with the following exactly matched labels with values. - ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector - matchLabels: {} - - ## Only bind to a volume with the following exppression matched labels. - ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector - matchExpressions: [] - annotations: {} - -resources: - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - requests: - cpu: 100m - memory: 200Mi - -## For PodDisruptionBudget, how many pods can be unavailable at one time -maxUnavailable: 1 - -## Allow to overwrite under which User and Group Pod will be running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -## Allow to overwrite the specific security context under which the gitaly container is running. -containerSecurityContext: - runAsUser: 1000 - -## Enable deployment to use a serviceAccount -serviceAccount: - enabled: false - create: false - annotations: {} - ## Name to be used for serviceAccount, otherwise defaults to chart fullname - # name: - -statefulset: - strategy: {} - livenessProbe: - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 3 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 3 - successThreshold: 1 - failureThreshold: 3 - -affinity: - podAntiAffinity: - topologyKey: - -## Enable the Gitaly pack-objects cache -## ref: https://docs.gitlab.com/ee/administration/gitaly/configure_gitaly.html#pack-objects-cache -packObjectsCache: {} -# enabled: false -# dir: "/home/git/repositories/+gitaly/PackObjectsCache" -# max_age: 5m - -## Enable Gitaly to GPG sign all commits created by GitLab -## ref: https://docs.gitlab.com/ee/administration/gitaly/configure_gitaly.html#configure-commit-signing-for-gitlab-ui-commits -gpgSigning: {} - # enabled: false - # secret: glGPG - # key: diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/Chart.yaml deleted file mode 100644 index c2654f1c9..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -appVersion: 13.0.0 -description: Exporter for GitLab Prometheus metrics (e.g. CI, pull mirrors) -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -- gitlab-exporter -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: gitlab-exporter -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/gitlab-exporter -- https://gitlab.com/gitlab-org/build/CNG/tree/master/gitlab-exporter -- https://gitlab.com/gitlab-org/gitlab-exporter -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/configmap.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/configmap.yaml deleted file mode 100644 index 1b418f3c1..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/configmap.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if .Values.enabled -}} -{{- include "database.datamodel.prepare" . -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - gitlab-exporter.yml.erb: | - server: - name: webrick - listen_address: 0.0.0.0 - listen_port: {{ .Values.service.internalPort }} - {{ if .Values.tls.enabled -}} - tls_enabled: true - tls_cert_path: /etc/gitlab/gitlab-exporter/tls.crt - tls_key_path: /etc/gitlab/gitlab-exporter/tls.key - {{- end }} - - probes: - db_common: &db_common - methods: - - probe_db - opts: - {{- with $.Values.local.psql.main }} - connection_string: dbname={{ template "gitlab.psql.database" . }} user={{ template "gitlab.psql.username" . }} host={{ template "gitlab.psql.host" . }} port={{ template "gitlab.psql.port" . }} password='<%= File.read({{ template "gitlab.psql.password.file" . }}).strip.gsub(/[\'\\]/) { |esc| '\\' + esc } %>' - {{- end }} - database: - multiple: true - ci_builds: - class_name: Database::CiBuildsProber - <<: *db_common - tuple_stats: - class_name: Database::TuplesProber - <<: *db_common - rows_count: - class_name: Database::RowCountProber - <<: *db_common - database_bloat: - class_name: Database::BloatProber - <<: *db_common - - sidekiq: &sidekiq - methods: - - probe_queues - - probe_workers - - probe_retries - - probe_stats - opts: - redis_url: {{ template "gitlab.redis.url" . }} - redis_enable_client: false - - ruby: &ruby - methods: - - probe_gc - opts: - quantiles: false - - metrics: - multiple: true - ruby: - <<: *ruby - sidekiq: - <<: *sidekiq - ci_builds: - class_name: Database::CiBuildsProber - <<: *db_common - tuple_stats: - class_name: Database::TuplesProber - <<: *db_common - rows_count: - class_name: Database::RowCountProber - <<: *db_common - - configure: | - {{- include "gitlab.scripts.configure.secrets" (dict "required" "none" "optional" "redis postgres gitlab-exporter") | nindent 4 }} -# Leave this here - This line denotes end of block to the parser. -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/deployment.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/deployment.yaml deleted file mode 100644 index 1be34f099..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/deployment.yaml +++ /dev/null @@ -1,175 +0,0 @@ -{{- if .Values.enabled }} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.image -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -{{- include "database.datamodel.prepare" . -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.deploymentAnnotations" . | nindent 4 }} -spec: - replicas: 1 - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - {{- if .Values.deployment.strategy }} - strategy: {{ .Values.deployment.strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- if and .Values.metrics.enabled (not .Values.metrics.serviceMonitor.enabled) }} - {{- if .Values.metrics.annotations }} - {{- toYaml .Values.metrics.annotations | nindent 8 }} - {{- else }} - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: {{ .Values.metrics.port | quote }} - gitlab.com/prometheus_path: {{ .Values.metrics.path }} - prometheus.io/scrape: "true" - prometheus.io/port: {{ .Values.metrics.port | quote }} - prometheus.io/path: {{ .Values.metrics.path }} - {{- end }} - {{- end }} - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - - spec: - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- if eq (default .Values.global.antiAffinity .antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- else if eq (default .Values.global.antiAffinity .antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- end }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - automountServiceAccountToken: false - {{- include "gitlab.priorityClassName" . | nindent 6 }} - initContainers: - {{- include "gitlab.extraInitContainers" . | nindent 8 }} - {{- include "gitlab.certificates.initContainer" . | nindent 8 }} - - name: configure - command: ['sh', '/config/configure'] - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" . | indent 10 }} - env: - {{- include "gitlab.extraEnv" . | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 10 }} - {{- include "gitlab.psql.ssl.volumeMount" . | nindent 10 }} - - name: gitlab-exporter-config - mountPath: /config - readOnly: true - - name: init-gitlab-exporter-secrets - mountPath: /init-config - readOnly: true - - name: gitlab-exporter-secrets - mountPath: /init-secrets - readOnly: false - resources: - {{- toYaml .Values.init.resources | nindent 12 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - containers: - {{- include "gitlab.extraContainers" . | nindent 8 }} - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ coalesce .Values.image.tag .Chart.AppVersion }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" . | indent 10 }} - env: - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/var/opt/gitlab-exporter/templates' - - name: CONFIG_DIRECTORY - value: '/etc/gitlab-exporter' - {{- include "gitlab.extraEnv" . | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - ports: - - containerPort: {{ .Values.service.internalPort }} - name: http-metrics - volumeMounts: - - name: gitlab-exporter-config - mountPath: /var/opt/gitlab-exporter/templates/gitlab-exporter.yml.erb - subPath: gitlab-exporter.yml.erb - - name: gitlab-exporter-secrets - mountPath: '/etc/gitlab' - readOnly: true - {{- include "gitlab.extraVolumeMounts" . | nindent 12 }} - {{- include "gitlab.certificates.volumeMount" . | nindent 12 }} - livenessProbe: - exec: - command: - - pgrep - - -f - - gitlab-exporter - readinessProbe: - exec: - command: - - pgrep - - -f - - gitlab-exporter - lifecycle: - preStop: - exec: - command: ["/bin/bash", "-c", "pkill -f 'gitlab-exporter'"] - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - {{- include "gitlab.extraVolumes" . | nindent 6 }} - {{- include "gitlab.psql.ssl.volume" . | nindent 6 }} - - name: gitlab-exporter-config - configMap: - name: {{ template "fullname" . }} - - name: init-gitlab-exporter-secrets - projected: - defaultMode: 0400 - sources: - {{- range $.Values.local.psql }} - {{- include "gitlab.psql.secret" . | nindent 10 }} - {{- end }} - {{- include "gitlab.redis.secret" . | nindent 10 }} - {{ if .Values.tls.enabled }} - - secret: - name: {{ template "gitlab.gitlab-exporter.tls.secret" . }} - items: - - key: tls.crt - path: "gitlab-exporter/tls.crt" - - key: tls.key - path: "gitlab-exporter/tls.key" - {{- end }} - - - name: gitlab-exporter-secrets - emptyDir: - medium: "Memory" - {{- include "gitlab.certificates.volumes" . | nindent 6 }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/service.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/service.yaml deleted file mode 100644 index 6f9de55d5..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/service.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- include "gitlab.serviceLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.serviceAnnotations" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.externalPort }} - targetPort: http-metrics - protocol: TCP - name: {{ .Values.tls.enabled | ternary "https" "http" }}-metrics - selector: - {{- include "gitlab.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/serviceaccount.yaml deleted file mode 100644 index 69ddca009..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/servicemonitor.yaml deleted file mode 100644 index fcc157f5f..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/templates/servicemonitor.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.enabled .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled -}} -{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with .Values.metrics.serviceMonitor.additionalLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - endpoints: - - port: http-metrics - path: {{ .Values.metrics.path }} - {{- with .Values.metrics.serviceMonitor.endpointConfig }} - {{- toYaml . | nindent 6 }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/values.yaml deleted file mode 100644 index d425ac951..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-exporter/values.yaml +++ /dev/null @@ -1,102 +0,0 @@ -# Default values for gitlab-exporter. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -image: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-exporter - # pullPolicy: IfNotPresent - # pullSecrets: [] - # tag: master - -service: - name: gitlab-exporter - type: ClusterIP - externalPort: 9168 - internalPort: 9168 - -metrics: - enabled: true - port: 9168 - path: /metrics - serviceMonitor: - enabled: false - additionalLabels: {} - endpointConfig: {} - # DEPRECATED - annotations: {} - -enabled: true - -tls: - enabled: false - # secretName: - -# Tolerations for pod scheduling -tolerations: [] - -annotations: {} - -# Priority class assigned to pods -priorityClassName: "" - -podLabels: {} -common: - labels: {} -serviceLabels: {} - -init: - image: {} - # repository: - # tag: - resources: - requests: - cpu: 50m - containerSecurityContext: {} - -global: - redis: - auth: {} - -redis: - auth: {} - -psql: {} - # port: 5432 - -resources: - # limits: - # cpu: 1 - # memory: 2G - requests: - cpu: 75m - memory: 100M - -## Allow to overwrite under which User and Group the Pod will be running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -## Allow to overwrite the specific security context under which the container is running. -containerSecurityContext: - runAsUser: 1000 - -## Enable deployment to use a serviceAccount -serviceAccount: - enabled: false - create: false - annotations: {} - ## Name to be used for serviceAccount, otherwise defaults to chart fullname - # name: - -extraEnv: - MALLOC_CONF: 'dirty_decay_ms:0,muzzy_decay_ms:0' - RUBY_GC_HEAP_INIT_SLOTS: 80000 - RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO: 0.055 - RUBY_GC_HEAP_FREE_SLOTS_MAX_RATIO: 0.111 - -deployment: - strategy: {} - -affinity: - podAntiAffinity: - topologyKey: diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/Chart.yaml deleted file mode 100644 index 3142302ce..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -appVersion: 16.0.1 -description: Daemon for serving static websites from GitLab projects -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -- pages -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: gitlab-pages -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/gitlab-pages -- https://gitlab.com/gitlab-org/build/CNG/tree/master/gitlab-pages -- https://gitlab.com/gitlab-org/gitlab-pages -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/_helpers.tpl deleted file mode 100644 index 1252fdce1..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/_helpers.tpl +++ /dev/null @@ -1,21 +0,0 @@ -{{/* -Returns the secret name for the Secret containing the TLS certificate and key. -Uses `ingress.tls.secretName` first and falls back to `global.ingress.tls.secretName` -if there is a shared tls secret for all ingresses. -*/}} -{{- define "pages.tlsSecret" -}} -{{- $defaultName := (dict "secretName" "") -}} -{{- if .Values.global.ingress.configureCertmanager -}} -{{- $_ := set $defaultName "secretName" (printf "%s-pages-tls" .Release.Name) -}} -{{- else -}} -{{- $_ := set $defaultName "secretName" (include "gitlab.wildcard-self-signed-cert-name" .) -}} -{{- end -}} -{{- pluck "secretName" .Values.ingress.tls .Values.global.ingress.tls $defaultName | first -}} -{{- end -}} - -{{/* -Return the pages-metrics TLS secret name -*/}} -{{- define "pages-metrics.tls.secret" -}} -{{- default (printf "%s-pages-metrics-tls" .Release.Name) $.Values.metrics.tls.secretName | quote -}} -{{- end -}} \ No newline at end of file diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/configmap.yml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/configmap.yml deleted file mode 100644 index 496b61a8c..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/configmap.yml +++ /dev/null @@ -1,176 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: -data: - config.tpl: | - {{- with .Values.gitlabCache }} - {{- if .cleanup }} - gitlab-cache-cleanup={{ .cleanup }} - {{- end }} - {{- if .expiry }} - gitlab-cache-expiry={{ .expiry }} - {{- end }} - {{- if .refresh }} - gitlab-cache-refresh={{ .refresh }} - {{- end }} - {{- end }} - {{- with .Values.gitlabRetrieval }} - {{- if .interval }} - gitlab-retrieval-interval={{ .interval }} - {{- end }} - {{- if .retries }} - gitlab-retrieval-retries={{ .retries }} - {{- end }} - {{- if .timeout }} - gitlab-retrieval-timeout={{ .timeout }} - {{- end }} - {{- end }} - {{- if not (empty .Values.headers) }} - {{- $headers := .Values.headers | join ";;" }} - header={{ $headers }} - {{- end }} - {{- $externalAddresses := concat $.Values.global.pages.externalHttp $.Values.global.pages.externalHttps | uniq }} - {{- if (empty ($externalAddresses)) }} - listen-proxy=0.0.0.0:{{ .Values.service.internalPort }} - listen-http=0.0.0.0:9090 - {{- else }} - {{- if not (empty $.Values.global.pages.externalHttp) }} - listen-{{ if .Values.useHTTPProxy }}proxy{{ else }}http{{ end }}=0.0.0.0:{{ .Values.service.internalPort | int }} - {{- else }} - listen-{{ if .Values.useHTTPProxy }}proxy{{ else }}http{{ end }}=0.0.0.0:9090 - {{- end }} - {{- if not (empty $.Values.global.pages.externalHttps) }} - listen-https{{ if .Values.useProxyV2 }}-proxyv2{{ end }}=0.0.0.0:{{ .Values.service.customDomains.internalHttpsPort | int }} - root-cert=/etc/gitlab-secrets/pages/{{ template "gitlab.pages.hostname" $ }}.crt - root-key=/etc/gitlab-secrets/pages/{{ template "gitlab.pages.hostname" $ }}.key - {{- end }} - {{- end }} - {{- if kindIs "bool" .Values.propagateCorrelationId }} - propagate-correlation-id={{ eq .Values.propagateCorrelationId true }} - {{- end }} - pages-domain={{ template "gitlab.pages.hostname" . }} - pages-root=/srv/gitlab-pages - log-format={{ .Values.logFormat }} - log-verbose={{ eq .Values.logVerbose true }} - redirect-http={{ eq .Values.redirectHttp true }} - insecure-ciphers={{ eq .Values.insecureCiphers true }} - artifacts-server={{ template "gitlab.pages.artifactsServer" . }} - artifacts-server-timeout={{ default 10 .Values.artifactsServerTimeout }} - gitlab-server={{ template "gitlab.pages.gitlabServer" . }} - internal-gitlab-server={{ template "gitlab.pages.internalGitlabServer" . }} - api-secret-key=/etc/gitlab-secrets/pages/secret - {{- if and .Values.metrics.enabled .Values.metrics.port }} - metrics-address=:{{ .Values.metrics.port | int }} - {{- if .Values.metrics.tls.enabled }} - metrics-certificate=/etc/gitlab-secrets/pages-metrics/pages-metrics.crt - metrics-key=/etc/gitlab-secrets/pages-metrics/pages-metrics.key - {{- end }} - {{- end }} - {{- if .Values.maxConnections }} - max-conns={{ .Values.maxConnections }} - {{- end }} - {{- if .Values.maxURILength }} - max-uri-length={{ .Values.maxURILength }} - {{- end }} - {{- if .Values.serverShutdownTimeout }} - server-shutdown-timeout={{ .Values.serverShutdownTimeout }} - {{- end }} - {{- if .Values.gitlabClientHttpTimeout }} - gitlab-client-http-timeout={{ .Values.gitlabClientHttpTimeout }} - {{- end }} - {{- if .Values.gitlabClientJwtExpiry }} - gitlab-client-jwt-expiry={{ .Values.gitlabClientJwtExpiry }} - {{- end }} - {{- if .Values.sentry.enabled }} - {{- if .Values.sentry.dsn }} - sentry-dsn={{ .Values.sentry.dsn }} - {{- end }} - {{- if .Values.sentry.environment }} - sentry-environment={{ .Values.sentry.environment }} - {{- end }} - {{- end }} - {{- if .Values.statusUri }} - pages-status={{ .Values.statusUri }} - {{- end }} - {{- if .Values.tls.minVersion }} - tls-min-version={{ .Values.tls.minVersion }} - {{- end }} - {{- if .Values.tls.maxVersion }} - tls-max-version={{ .Values.tls.maxVersion }} - {{- end }} - {{- if eq $.Values.global.pages.accessControl true }} - auth-redirect-uri={{ template "oauth.gitlab-pages.authRedirectUri" . }} - auth-client-id={% file.Read "/etc/gitlab-secrets/pages/gitlab_appid" %} - auth-client-secret={% file.Read "/etc/gitlab-secrets/pages/gitlab_appsecret" %} - auth-secret={% file.Read "/etc/gitlab-secrets/pages/auth_secret" %} - auth-scope={{ template "oauth.gitlab-pages.authScope" . }} - {{- end }} - {{- if .Values.authCookieSessionTimeout }} - auth-cookie-session-timeout={{ .Values.authCookieSessionTimeout }} - {{- end }} - {{- with .Values.zipCache }} - {{- if .cleanup }} - zip-cache-cleanup={{ .cleanup }} - {{- end }} - {{- if .expiration }} - zip-cache-expiration={{ .expiration }} - {{- end }} - {{- if .refresh }} - zip-cache-refresh={{ .refresh }} - {{- end }} - {{- end }} - {{- if .Values.zipOpenTimeout }} - zip-open-timeout={{ .Values.zipOpenTimeout }} - {{- end }} - {{- if .Values.zipHTTPClientTimeout }} - zip-http-client-timeout={{ .Values.zipHTTPClientTimeout }} - {{- end }} - {{- if .Values.rateLimitSourceIP }} - rate-limit-source-ip={{ .Values.rateLimitSourceIP }} - {{- end }} - {{- if .Values.rateLimitSourceIPBurst }} - rate-limit-source-ip-burst={{ .Values.rateLimitSourceIPBurst }} - {{- end }} - {{- if .Values.rateLimitDomain }} - rate-limit-domain={{ .Values.rateLimitDomain }} - {{- end }} - {{- if .Values.rateLimitDomainBurst }} - rate-limit-domain-burst={{ .Values.rateLimitDomainBurst }} - {{- end }} - {{- if .Values.rateLimitTLSSourceIP }} - rate-limit-tls-source-ip={{ .Values.rateLimitTLSSourceIP }} - {{- end }} - {{- if .Values.rateLimitTLSSourceIPBurst }} - rate-limit-tls-source-ip-burst={{ .Values.rateLimitTLSSourceIPBurst }} - {{- end }} - {{- if .Values.rateLimitTLSDomain }} - rate-limit-tls-domain={{ .Values.rateLimitTLSDomain }} - {{- end }} - {{- if .Values.rateLimitTLSDomainBurst }} - rate-limit-tls-domain-burst={{ .Values.rateLimitTLSDomainBurst }} - {{- end }} - {{- if .Values.serverReadTimeout }} - server-read-timeout={{ .Values.serverReadTimeout }} - {{- end }} - {{- if .Values.serverReadHeaderTimeout }} - server-read-header-timeout={{ .Values.serverReadHeaderTimeout }} - {{- end }} - {{- if .Values.serverWriteTimeout }} - server-write-timeout={{ .Values.serverWriteTimeout }} - {{- end }} - {{- if .Values.serverKeepAlive }} - server-keep-alive={{ .Values.serverKeepAlive }} - {{- end }} - configure: | - {{- include "gitlab.scripts.configure.secrets" (dict "required" "pages" "optional" "none") | nindent 4 }} - {{- if $.Values.metrics.tls.enabled }} - mkdir -p /init-secrets/pages-metrics - cp -v -L /init-config/pages-metrics/pages-metrics.crt /init-secrets/pages-metrics/pages-metrics.crt - cp -v -L /init-config/pages-metrics/pages-metrics.key /init-secrets/pages-metrics/pages-metrics.key - {{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/deployment.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/deployment.yaml deleted file mode 100644 index d046cc7a5..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/deployment.yaml +++ /dev/null @@ -1,193 +0,0 @@ -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.image -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.deploymentAnnotations" . | nindent 4 }} -spec: - {{- if .Values.deployment.strategy }} - strategy: - {{- .Values.deployment.strategy | toYaml | nindent 4 }} - {{- end }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yml") . | sha256sum }} - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if and .Values.metrics.enabled (not .Values.metrics.serviceMonitor.enabled) }} - {{- if .Values.metrics.annotations }} - {{- toYaml .Values.metrics.annotations | nindent 8 }} - {{- else }} - {{- if $.Values.metrics.tls.enabled }} - gitlab.com/prometheus_scheme: "https" - prometheus.io/scheme: "https" - {{- end }} - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: {{ .Values.metrics.port | quote }} - gitlab.com/prometheus_path: {{ .Values.metrics.path }} - prometheus.io/scrape: "true" - prometheus.io/port: {{ .Values.metrics.port | quote }} - prometheus.io/path: {{ .Values.metrics.path }} - {{- end }} - {{- end }} - spec: - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- if eq (default .Values.global.antiAffinity .antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- else if eq (default .Values.global.antiAffinity .antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- end }} - {{- if or .Values.serviceAccount.enabled $.Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - initContainers: - {{- include "gitlab.extraInitContainers" . | nindent 8 }} - {{- include "gitlab.certificates.initContainer" $ | nindent 8 }} - - name: configure - command: ['sh', '/config/configure'] - image: {{ include "gitlab.busybox.image" (dict "local" $.Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" $ | indent 10 }} - env: - {{- include "gitlab.extraEnv" $ | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" $ | nindent 10 }} - - name: pages-config - mountPath: /config - readOnly: true - - name: init-pages-secrets - mountPath: /init-config - readOnly: true - - name: pages-secrets - mountPath: /init-secrets - readOnly: false - resources: - {{- toYaml $.Values.init.resources | nindent 12 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - containers: - {{- include "gitlab.extraContainers" . | nindent 8 }} - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ coalesce .Values.image.tag (include "gitlab.parseAppVersion" (dict "appVersion" .Chart.AppVersion "prepend" "true")) }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" $ | indent 10 }} - env: - {{- include "gitlab.extraEnv" $ | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/etc/gitlab-pages/templates' - - name: CONFIG_DIRECTORY - value: '/etc/gitlab-pages' - - name: PAGES_CONFIG_FILE - value: '/etc/gitlab-pages/config' - - name: GITLAB_PAGES_LOG_FORMAT - value: {{ .Values.logFormat | quote }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" $ | nindent 12 }} - - name: pages-config - mountPath: '/etc/gitlab-pages/templates' - - name: pages-secrets - mountPath: '/etc/gitlab-secrets' - readOnly: true - {{- include "gitlab.certificates.volumeMount" . | nindent 12 }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- if .Values.metrics.enabled }} - ports: - - containerPort: {{ .Values.metrics.port | int }} - name: http-metrics - {{- end }} - # readinessProbe should always hit port used by `listen-http`, as k8s won't use TLS or ProxyV2 - {{- $externalHttp := $.Values.global.pages.externalHttp }} - readinessProbe: - httpGet: - path: {{ $.Values.statusUri | quote }} - port: {{ if $externalHttp }}{{ $.Values.service.internalPort | int }}{{ else }}9090{{ end }} - initialDelaySeconds: {{ $.Values.deployment.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ $.Values.deployment.readinessProbe.periodSeconds }} - timeoutSeconds: {{ $.Values.deployment.readinessProbe.timeoutSeconds }} - successThreshold: {{ $.Values.deployment.readinessProbe.successThreshold }} - failureThreshold: {{ $.Values.deployment.readinessProbe.failureThreshold }} - volumes: - {{- include "gitlab.extraVolumes" $ | nindent 6 }} - - name: pages-config - configMap: - name: {{ template "fullname" . }} - - name: init-pages-secrets - projected: - defaultMode: 0400 - sources: - {{- include "gitlab.pages.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.minio.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "pages" "config" $.Values.global.pages.objectStore) | nindent 10 }} - {{- if not (empty $.Values.global.pages.externalHttps) }} - - secret: - name: {{ template "pages.tlsSecret" . }} - items: - - key: tls.crt - path: pages/{{ template "gitlab.pages.hostname" $ }}.crt - - key: tls.key - path: pages/{{ template "gitlab.pages.hostname" $ }}.key - {{- end }} - {{- if eq $.Values.global.pages.accessControl true }} - - secret: - name: {{ template "oauth.gitlab-pages.secret" . }} - items: - - key: {{ template "oauth.gitlab-pages.appIdKey" . }} - path: pages/gitlab_appid - - key: {{ template "oauth.gitlab-pages.appSecretKey" . }} - path: pages/gitlab_appsecret - - secret: - name: {{ template "gitlab.pages.authSecret.secret" . }} - items: - - key: {{ template "gitlab.pages.authSecret.key" . }} - path: pages/auth_secret - {{- end }} - {{- if $.Values.metrics.tls.enabled }} - - secret: - name: {{ template "pages-metrics.tls.secret" $ }} - items: - - key: "tls.crt" - path: "pages-metrics/pages-metrics.crt" - - key: "tls.key" - path: "pages-metrics/pages-metrics.key" - {{- end }} - - name: pages-secrets - emptyDir: - medium: "Memory" - {{- include "gitlab.certificates.volumes" . | nindent 6 }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/hpa.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/hpa.yaml deleted file mode 100644 index 9ca9b4bd2..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/hpa.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- $hpaCfg := (dict "global" $.Values.global.hpa "local" .Values.hpa "context" $) -}} ---- -apiVersion: {{ template "gitlab.hpa.apiVersion" $hpaCfg }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "fullname" . }} - minReplicas: {{ .Values.hpa.minReplicas | int }} - maxReplicas: {{ .Values.hpa.maxReplicas | int }} - {{- include "gitlab.hpa.metrics" $hpaCfg | nindent 2 }} - {{- include "gitlab.hpa.behavior" $hpaCfg | nindent 2 }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/ingress.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/ingress.yaml deleted file mode 100644 index 940625b23..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/ingress.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- $externalAddresses := concat $.Values.global.pages.externalHttp $.Values.global.pages.externalHttps | uniq }} -{{- if and (empty ($externalAddresses)) (eq (include "gitlab.ingress.enabled" $) "true") -}} -{{- $hostname := include "gitlab.pages.hostname" . -}} -{{- $tlsSecret := include "pages.tlsSecret" . -}} -{{- $ingressCfg := dict "global" .Values.global.ingress "local" .Values.ingress "context" . -}} -apiVersion: {{ template "gitlab.ingress.apiVersion" $ingressCfg }} -kind: Ingress -metadata: - name: {{ template "fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{ include "ingress.class.annotation" $ingressCfg }} - kubernetes.io/ingress.provider: "{{ template "gitlab.ingress.provider" $ingressCfg }}" - {{- include "gitlab.certmanager_annotations" . | nindent 4 }} - {{- range $key, $value := merge .Values.ingress.annotations .Values.global.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - {{ include "ingress.class.field" $ingressCfg }} - rules: - - host: "*.{{ $hostname }}" - http: - paths: - - path: {{ coalesce $.Values.ingress.path $.Values.global.ingress.path }} - {{ if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (eq $.Values.global.ingress.apiVersion "networking.k8s.io/v1") -}} - pathType: {{ default "Prefix" $.Values.global.ingress.pathType }} - backend: - service: - name: {{ template "fullname" . }} - port: - number: {{ .Values.service.externalPort }} - {{- else -}} - backend: - serviceName: {{ template "fullname" . }} - servicePort: {{ .Values.service.externalPort }} - {{- end -}} - {{- if (and $tlsSecret (eq (include "gitlab.ingress.tls.enabled" $) "true" )) }} - tls: - - hosts: - - {{ $hostname }} - - "*.{{ $hostname }}" - secretName: {{ $tlsSecret }} - {{- else }} - tls: [] - {{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/networkpolicy.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/networkpolicy.yaml deleted file mode 100644 index 7a2c5f92c..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/networkpolicy.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- if .Values.networkpolicy.enabled -}} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ template "fullname" . }}-v1 - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{ toYaml .Values.networkpolicy.annotations | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - policyTypes: - {{- if .Values.networkpolicy.egress.enabled }} - - Egress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - - Ingress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - ingress: - {{ toYaml .Values.networkpolicy.ingress.rules | nindent 4 }} - {{- end -}} - {{- if .Values.networkpolicy.egress.enabled }} - egress: - {{ toYaml .Values.networkpolicy.egress.rules | nindent 4 }} - {{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/pdb.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/pdb.yaml deleted file mode 100644 index 03099e534..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/pdb.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - maxUnavailable: {{ .Values.maxUnavailable }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/service-custom-domains.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/service-custom-domains.yaml deleted file mode 100644 index ae1eb6262..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/service-custom-domains.yaml +++ /dev/null @@ -1,45 +0,0 @@ -{{- $externalAddresses := concat $.Values.global.pages.externalHttp $.Values.global.pages.externalHttps | uniq }} -{{- if not (empty ($externalAddresses)) -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "fullname" . }}-custom-domains - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- include "gitlab.serviceLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.serviceAnnotations" . | nindent 4 }} -spec: - type: {{ .Values.service.customDomains.type }} - {{- if eq .Values.service.customDomains.type "LoadBalancer" }} - {{- if len $externalAddresses | eq 1 }} - loadBalancerIP: {{ $externalAddresses | first }} - {{- else }} - externalIPs: {{ toJson $externalAddresses }} - {{- end }} - {{- end }} - ports: - {{- if not (empty $.Values.global.pages.externalHttp) }} - - port: 80 - targetPort: {{ .Values.service.internalPort | int }} - protocol: TCP - name: http-{{ template "name" . }} - {{- if and (eq .Values.service.customDomains.type "NodePort") .Values.service.customDomains.nodePort.http }} - nodePort: {{ .Values.service.customDomains.nodePort.http | int }} - {{- end }} - {{- end -}} - {{- if not (empty $.Values.global.pages.externalHttps) }} - - port: 443 - targetPort: {{ .Values.service.customDomains.internalHttpsPort | int }} - protocol: TCP - name: https-{{ template "name" . }} - {{- if and (eq .Values.service.customDomains.type "NodePort") .Values.service.customDomains.nodePort.https }} - nodePort: {{ .Values.service.customDomains.nodePort.https | int }} - {{- end }} - {{- end }} - selector: - app: {{ template "name" . }} - release: {{ .Release.Name }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/service-metrics.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/service-metrics.yaml deleted file mode 100644 index 4a4daf87a..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/service-metrics.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if .Values.metrics.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "fullname" . }}-metrics - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- include "gitlab.serviceLabels" . | nindent 4 }} - gitlab.com/metrics-service: "true" - annotations: - {{- include "gitlab.serviceAnnotations" . | nindent 4 }} -spec: - type: ClusterIP - ports: - - port: {{ .Values.metrics.port | int }} - targetPort: http-metrics - protocol: TCP - name: {{ .Values.metrics.tls.enabled | ternary "https" "http" }}-metrics - selector: - app: {{ template "name" . }} - release: {{ .Release.Name }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/service.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/service.yaml deleted file mode 100644 index 348a99b21..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/service.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- $externalAddresses := concat $.Values.global.pages.externalHttp $.Values.global.pages.externalHttps | uniq }} -{{- if empty ($externalAddresses) -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- include "gitlab.serviceLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.serviceAnnotations" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.externalPort | int }} - targetPort: {{ .Values.service.internalPort | int }} - protocol: TCP - name: http-{{ template "name" . }}-proxy - selector: - app: {{ template "name" . }} - release: {{ .Release.Name }} - {{- if .Values.service.sessionAffinity }} - sessionAffinity: {{ .Values.service.sessionAffinity }} - {{- end }} - {{- if eq .Values.service.sessionAffinity "ClientIP" }} - sessionAffinityConfig: - clientIP: - timeoutSeconds: {{ .Values.service.sessionAffinityConfig.clientIP.timeoutSeconds }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/serviceaccount.yaml deleted file mode 100644 index 687a23c59..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and .Values.global.pages.enabled $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 -}} - {{- include "gitlab.commonLabels" . | nindent 4 -}} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/servicemonitor.yaml deleted file mode 100644 index 4d6dc661f..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/templates/servicemonitor.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if and .Values.global.pages.enabled .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled -}} -{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with .Values.metrics.serviceMonitor.additionalLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - gitlab.com/metrics-service: "true" - endpoints: - - port: http-metrics - path: {{ .Values.metrics.path }} - {{- with .Values.metrics.serviceMonitor.endpointConfig }} - {{- toYaml . | nindent 6 }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/values.yaml deleted file mode 100644 index 669afe383..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-pages/values.yaml +++ /dev/null @@ -1,211 +0,0 @@ -# Default values for gitlab-pages. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -global: - pages: - enabled: false - # hosts: - # pages: - # name: pages.example.com - -hpa: - maxReplicas: 10 - minReplicas: 1 - # targetAverageValue: 100m # DEPRECATED: in favor of `hpa.cpu.targetAverageValue` below - cpu: - targetType: AverageValue # Utilization or AverageValue - targetAverageValue: 100m - # targetAverageUtilization: 75 - # memory: - # targetType: Utilization # Utilization or AverageValue - # targetAverageValue: 1G - # targetAverageUtilization: 75 - # Note that the HPA is limited to autoscaling/v2beta1, autoscaling/v2beta2 and autoscaling/v2 - customMetrics: [] # Overrides HPA metrics definition - behavior: - scaleDown: - stabilizationWindowSeconds: 300 - -networkpolicy: - enabled: false - egress: - enabled: false - rules: [] - ingress: - enabled: false - rules: [] - annotations: {} - -image: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-pages - # tag: master - # pullPolicy: IfNotPresent - # pullSecrets: [] - -service: - type: ClusterIP - externalPort: 8090 - internalPort: 8090 - customDomains: - type: LoadBalancer - internalHttpsPort: 8091 - nodePort: {} - # http - # https - # Set `sessionAffinity` to `ClientIP` to configure gitlab-pages with session affinity. - # Note that this setting only affects traffic originating within the cluster. - # To enable session affinity for traffic originating from outside the cluster - # when using NGINX, see the NGINX documentation on sticky sessions: - # https://kubernetes.github.io/ingress-nginx/examples/affinity/cookie/ - sessionAffinity: None - sessionAffinityConfig: {} - # sessionAffinityConfig: - # clientIP: - # timeoutSeconds: 10800 - -init: - image: {} - # repository: - # tag: - resources: - requests: - cpu: 50m - containerSecurityContext: {} - -deployment: - strategy: {} - readinessProbe: - initialDelaySeconds: 0 - periodSeconds: 10 - timeoutSeconds: 2 - successThreshold: 1 - failureThreshold: 3 - -ingress: - apiVersion: - annotations: {} - configureCertmanager: false - tls: {} - path: # / - -# Tolerations for pod scheduling -tolerations: [] - -cluster: true -queueSelector: false - -annotations: {} -podLabels: {} -common: - labels: {} - -serviceLabels: {} -## Additional environment variables to set -extraEnv: {} -# extraEnv: -# SOMEKEY: SOMEVALUE -# SOMEKEY2: SOMEVALUE2 - -maxUnavailable: 1 - -resources: - requests: - cpu: 900m - memory: 2G - -## Allow to overwrite under which User and Group the Pod will be running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -## Allow to overwrite the specific security context under which the container is running. -containerSecurityContext: - runAsUser: 1000 - -## Enable deployment to use a serviceAccount -serviceAccount: - enabled: false - create: false - annotations: {} - ## Name to be used for serviceAccount, otherwise defaults to chart fullname - # name: - -## Allow configuring pods' priorityClassName. This is used to control pod priority in case of eviction: -# https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ -priorityClassName: "" - -artifactsServerTimeout: 10 -artifactsServerUrl: - -# gitlabCache: -# cleanup: -# expiry: -# refresh: - -# gitlabRetrieval -# interval: -# retries: -# timeout: - -gitlabClientHttpTimeout: -gitlabClientJwtExpiry: -gitlabServer: -# Headers is to be a list of strings, Example: -# headers: -# - "Permissions-Policy: interest-cohort=()" -headers: [] -insecureCiphers: false -internalGitlabServer: -logFormat: 'json' -logVerbose: false -maxConnections: -# propagateCorrelationId: -redirectHttp: false -sentry: - enabled: false - dsn: - environment: -statusUri: '/-/readiness' -tls: - minVersion: - maxVersion: -useHTTPProxy: false -useProxyV2: false - -# zipCache: -# cleanup: -# expiration: -# refresh: - -# zipHTTPClientTimeout: - -# serverReadTimeout: -# serverReadHeaderTimeout: -# serverWriteTimeout: -# serverKeepAlive: - -metrics: - enabled: true - port: 9235 - path: /metrics - tls: - enabled: false - # secretName: - serviceMonitor: - enabled: false - additionalLabels: {} - endpointConfig: {} - # DEPRECATED - annotations: {} - -workhorse: {} - # by default, Workhorse is a part of the Webservice Pods / Service - # host: '0.0.0.0' - # serviceName: 'webservice' - # port: 8181 - -affinity: - podAntiAffinity: - topologyKey: diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/Chart.yaml deleted file mode 100644 index aa46fceff..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -appVersion: 14.20.0 -description: sshd for Gitlab -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -- sshd -- ssh -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: gitlab-shell -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/gitlab-shell -- https://gitlab.com/gitlab-org/build/CNG/tree/master/gitlab-shell -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/_shell.tpl b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/_shell.tpl deleted file mode 100644 index 9673e389c..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/_shell.tpl +++ /dev/null @@ -1,19 +0,0 @@ -{{/* -Return the string 'PROXY' - -The string 'PROXY' ensures the use of ProxyProtocol decoding in a TCP service. -This string is exactly compared with the string 'PROXY' when using nginx-ingress (in capital letters). -See: https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/ -*/}} -{{- define "gitlab.shell.tcp.proxyProtocol" -}} -{{- $inbound := "" -}} -{{- if .Values.global.shell.tcp.proxyProtocol -}} -{{- $inbound = "PROXY" -}} -{{- end -}} -{{- $outbound := "" -}} -{{- $proxySupported := not (eq .Values.config.proxyPolicy "reject" ) }} -{{- if (or .Values.config.proxyProtocol (and $proxySupported (eq .Values.sshDaemon "gitlab-sshd"))) }} -{{- $outbound = "PROXY" -}} -{{- end -}} -:{{ $inbound }}:{{ $outbound }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/configmap-sshd.yml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/configmap-sshd.yml deleted file mode 100644 index 99c85df1e..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/configmap-sshd.yml +++ /dev/null @@ -1,159 +0,0 @@ -{{- if and .Values.enabled (eq .Values.sshDaemon "openssh") -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }}-sshd - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - sshd_config: | - # $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $ - - # This is the sshd server system-wide configuration file. See - # sshd_config(5) for more information. - - # This sshd was compiled with PATH=/bin:/usr/bin:/sbin:/usr/sbin - - # The strategy used for options in the default sshd_config shipped with - # OpenSSH is to specify options with their default value where - # possible, but leave them commented. Uncommented options override the - # default value. - - Port {{ .Values.service.internalPort }} - #AddressFamily any - #ListenAddress 0.0.0.0 - #ListenAddress :: - - #HostKey /etc/ssh/ssh_host_rsa_key - #HostKey /etc/ssh/ssh_host_dsa_key - #HostKey /etc/ssh/ssh_host_ecdsa_key - #HostKey /etc/ssh/ssh_host_ed25519_key - - # Ciphers and keying - #RekeyLimit default none - - # Logging - #SyslogFacility AUTH - LogLevel {{ .Values.logging.sshdLogLevel | upper }} - - # Authentication: - - PermitRootLogin no - #StrictModes yes - #MaxAuthTries 6 - #MaxSessions 10 - - #PubkeyAuthentication yes - - #AuthorizedPrincipalsFile none - - # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts - #HostbasedAuthentication no - # Change to yes if you don't trust ~/.ssh/known_hosts for - # HostbasedAuthentication - #IgnoreUserKnownHosts no - # Don't read the user's ~/.rhosts and ~/.shosts files - #IgnoreRhosts yes - - #PermitEmptyPasswords no - - # Change to no to disable s/key passwords - #ChallengeResponseAuthentication yes - - # Kerberos options - #KerberosAuthentication no - #KerberosOrLocalPasswd yes - #KerberosTicketCleanup yes - #KerberosGetAFSToken no - - # GSSAPI options - #GSSAPIAuthentication no - #GSSAPICleanupCredentials yes - - # Set this to 'yes' to enable PAM authentication, account processing, - # and session processing. If this is enabled, PAM authentication will - # be allowed through the ChallengeResponseAuthentication and - # PasswordAuthentication. Depending on your PAM configuration, - # PAM authentication via ChallengeResponseAuthentication may bypass - # the setting of "PermitRootLogin without-password". - # If you just want the PAM account and session checks to run without - # PAM authentication, then enable this but set PasswordAuthentication - # and ChallengeResponseAuthentication to 'no'. - #UsePAM no - - #AllowAgentForwarding yes - #AllowTcpForwarding yes - #GatewayPorts no - #X11Forwarding no - #X11DisplayOffset 10 - #X11UseLocalhost yes - #PermitTTY yes - #PrintMotd yes - #PrintLastLog yes - #TCPKeepAlive yes - #UseLogin no - #PermitUserEnvironment no - #Compression delayed - ClientAliveInterval {{ .Values.config.clientAliveInterval }} - #ClientAliveCountMax 3 - #UseDNS no - PidFile /srv/sshd/sshd.pid - #PermitTunnel no - #ChrootDirectory none - #VersionAddendum none - - # no default banner path - #Banner none - - # override default of no subsystems - # Subsystem sftp /usr/lib/ssh/sftp-server - - # the following are HPN related configuration options - # tcp receive buffer polling. disable in non autotuning kernels - #TcpRcvBufPoll yes - - # disable hpn performance boosts - #HPNDisabled no - - # buffer size for hpn to non-hpn connections - #HPNBufferSize 2048 - - - # Example of overriding settings on a per-user basis - #Match User anoncvs - # X11Forwarding no - # AllowTcpForwarding no - # PermitTTY no - # ForceCommand cvs server - - # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 - # but this is overridden so installations will only check .ssh/authorized_keys - AuthorizedKeysFile .ssh/authorized_keys - - AuthorizedKeysCommand /authorized_keys %u %k - AuthorizedKeysCommandUser git - - PasswordAuthentication no - - AllowUsers git - - # Enable the use of Git protcol v2 - AcceptEnv GIT_PROTOCOL - - # Hard disable all forwarding - DisableForwarding yes - - # Specifies the maximum number of concurrent unauthenticated connections to the SSH daemon. - # See `man sshd_config(5)` - {{ if and .Values.config.maxStartups.start .Values.config.maxStartups.rate }} - MaxStartups {{ .Values.config.maxStartups.start }}:{{ .Values.config.maxStartups.rate }}:{{ .Values.config.maxStartups.full }} - {{ else }} - MaxStartups {{ .Values.config.maxStartups.full }} - {{ end }} - - # Specifies amount of time athat the server will disconnect after if the user has not successfully logged in - LoginGraceTime {{ .Values.config.loginGraceTime }} -# Leave this here - This line denotes end of block to the parser. -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/configmap.yml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/configmap.yml deleted file mode 100644 index 88ca617d3..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/configmap.yml +++ /dev/null @@ -1,100 +0,0 @@ -{{- if .Values.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - configure: | - {{- include "gitlab.scripts.configure.secrets" (dict "required" "shell" "optional" "none") | nindent 4 }} - mkdir -p /${secret_dir}/ssh - cp -v -r -L /${config_dir}/ssh_host_* /${secret_dir}/ssh/ - chmod 0400 /${secret_dir}/ssh/ssh_host_* - config.yml.tpl: | - # GitLab user. git by default - user: git - - # Url to gitlab instance. Used for api calls. Should end with a slash. - gitlab_url: "{{ template "gitlab.workhorse.url" . }}/" - - secret_file: /etc/gitlab-secrets/shell/.gitlab_shell_secret - - # File used as authorized_keys for gitlab user - auth_file: "/home/git/.ssh/authorized_keys" - - # Log file. - # Default is gitlab-shell.log in the root directory. - {{- if eq .Values.sshDaemon "gitlab-sshd"}} - log_file: "/dev/stdout" - {{- else }} - log_file: "/var/log/gitlab-shell/gitlab-shell.log" - {{- end }} - - log_format: {{ .Values.logging.format }} - - # Audit usernames. - # Set to true to see real usernames in the logs instead of key ids, which is easier to follow, but - # incurs an extra API call on every gitlab-shell command. - audit_usernames: false - - {{ if .Values.global.tracing.connection.string }} - gitlab_tracing: {{ .Values.global.tracing.connection.string }} - {{ end }} - - {{- if eq .Values.sshDaemon "gitlab-sshd"}} - # This section configures the built-in SSH server. Ignored when running on OpenSSH. - sshd: - # Address which the SSH server listens on. Defaults to [::]:2222. - listen: "[::]:{{ .Values.service.internalPort }}" - # Address which the server listens on HTTP for monitoring/health checks. Defaults to 0.0.0.0:9122. - web_listen: "0.0.0.0:{{ .Values.metrics.port }}" - # Maximum number of concurrent sessions allowed on a single SSH connection. Defaults to 100. - concurrent_sessions_limit: {{ .Values.config.maxStartups.full }} - # PROXY protocol support for correct IP address detection - proxy_protocol: {{ .Values.config.proxyProtocol }} - # PROXY protocol policy ("use", "require", "reject", "ignore"), "use" is the default value - proxy_policy: {{ .Values.config.proxyPolicy }} - # The maximum duration to wait for the PROXY protocol header. Defaults to 500ms - proxy_header_timeout: {{ .Values.config.proxyHeaderTimeout }} - # The server waits for this time (in seconds) for the ongoing connections to complete before shutting down - # The period is 5 seconds smaller than the Kubernetes termination period in order to allow gitlab-sshd exit gracefully - grace_period: {{ sub .Values.deployment.terminationGracePeriodSeconds 5 }} - # Sets an interval after which server will send keepalive message to a client - client_alive_interval: {{ .Values.config.clientAliveInterval }} - # The ciphers allowed - ciphers: - {{- .Values.config.ciphers | toYaml | nindent 8 }} - # The key exchange (KEX) algorithms allowed - kex_algorithms: - {{- .Values.config.kexAlgorithms | toYaml | nindent 8 }} - # The message authentication code (MAC) algorithms allowed - macs: - {{- .Values.config.macs | toYaml | nindent 8 }} - # The server disconnects after this time if the user has not successfully logged in - login_grace_time: {{ .Values.config.loginGraceTime }} - # SSH host key files. - # - Walking {% env.Getenv "KEYS_DIRECTORY" "/etc/ssh" %} for keys. - host_key_files: - {%- range file.Walk ( env.Getenv "KEYS_DIRECTORY" "/etc/ssh" ) %} - {%- if filepath.Base . | filepath.Match "ssh_host_*_key" %} - - {%.%} - {%- end %} - {%- end %} - # GSSAPI-related settings - gssapi: - # Enable the gssapi-with-mic authentication method. Defaults to false. - enabled: {{ .Values.config.gssapi.enabled }} - # Library path for gssapi shared library - defaults to libgssapi_krb5.so.2 - libpath: {{ .Values.config.gssapi.libpath }} - # Keytab path. Defaults to "", system default (usually /etc/krb5.keytab). - keytab: "/etc/krb5.keytab" - # The Kerberos service name to be used by sshd. Defaults to "", accepts any service name in keytab file. - service_principal_name: {{ .Values.config.gssapi.servicePrincipalName }} - {{- end }} - krb5.conf: | - {{- .Values.config.gssapi.krb5Config | nindent 4 }} -# Leave this here - This line denotes end of block to the parser. -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/deployment.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/deployment.yaml deleted file mode 100644 index 250190619..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/deployment.yaml +++ /dev/null @@ -1,217 +0,0 @@ -{{- if .Values.enabled -}} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.image -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.deploymentAnnotations" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - {{- if .Values.deployment.strategy }} - strategy: {{ .Values.deployment.strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yml") . | sha256sum }} - checksum/config-sshd: {{ include (print $.Template.BasePath "/configmap-sshd.yml") . | sha256sum }} - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if and .Values.metrics.enabled (not .Values.metrics.serviceMonitor.enabled) }} - {{- if .Values.metrics.annotations }} - {{- toYaml .Values.metrics.annotations | nindent 8 }} - {{- else }} - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: {{ .Values.metrics.port | quote }} - gitlab.com/prometheus_path: {{ .Values.metrics.path }} - prometheus.io/scrape: "true" - prometheus.io/port: {{ .Values.metrics.port | quote }} - prometheus.io/path: {{ .Values.metrics.path }} - {{- end }} - {{- end }} - spec: - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- include "gitlab.priorityClassName" . | nindent 6 }} - initContainers: - {{- include "gitlab.extraInitContainers" . | nindent 8 }} - {{- include "gitlab.certificates.initContainer" . | nindent 8 }} - - name: configure - command: ['sh', '/config/configure'] - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" . | indent 10 }} - env: - {{- include "gitlab.extraEnv" . | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 10 }} - - name: shell-config - mountPath: /config - readOnly: true - - name: shell-init-secrets - mountPath: /init-config - readOnly: true - - name: shell-secrets - mountPath: /init-secrets - readOnly: false - resources: - {{- toYaml .Values.init.resources | nindent 12 }} - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - {{- if eq (default .Values.global.antiAffinity .Values.antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- else if eq (default .Values.global.antiAffinity .Values.antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- end }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - automountServiceAccountToken: false - containers: - {{- include "gitlab.extraContainers" . | nindent 8 }} - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ coalesce .Values.image.tag (include "gitlab.parseAppVersion" (dict "appVersion" .Chart.AppVersion "prepend" "true")) }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" . | indent 10 }} - ports: - {{- if .Values.metrics.enabled }} - - containerPort: {{ .Values.metrics.port }} - name: http-metrics - {{- end }} - - containerPort: {{ .Values.service.internalPort }} - name: ssh - env: - - name: GITALY_FEATURE_DEFAULT_ON - value: "1" - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/etc/gitlab-shell' - - name: CONFIG_DIRECTORY - value: '/srv/gitlab-shell' - - name: KEYS_DIRECTORY - value: '/etc/gitlab-secrets/ssh' - - name: SSH_DAEMON - value: {{ .Values.sshDaemon | quote }} - {{- include "gitlab.extraEnv" . | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - volumeMounts: - - name: shell-config - mountPath: '/etc/gitlab-shell' - - name: shell-secrets - mountPath: '/etc/gitlab-secrets' - readOnly: true - - name: shell-config - mountPath: '/etc/krb5.conf' - subPath: krb5.conf - readOnly: true - {{- if .Values.config.gssapi.enabled }} - - name: gssapi-keytab - mountPath: '/etc/krb5.keytab' - subPath: {{ .Values.config.gssapi.keytab.key }} - readOnly: true - {{- end }} - {{- if eq .Values.sshDaemon "openssh" }} - - name: sshd-config - mountPath: /etc/ssh/sshd_config - subPath: sshd_config - readOnly: true - {{- end }} - {{- include "gitlab.extraVolumeMounts" . | nindent 12 }} - {{- include "gitlab.certificates.volumeMount" . | nindent 12 }} - livenessProbe: - {{- if eq .Values.sshDaemon "gitlab-sshd" }} - httpGet: - port: {{ .Values.metrics.port }} - path: /health - {{- else }} - exec: - command: - - /scripts/healthcheck - {{- end }} - initialDelaySeconds: {{ .Values.deployment.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.deployment.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.deployment.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.deployment.livenessProbe.failureThreshold }} - readinessProbe: - {{- if eq .Values.sshDaemon "gitlab-sshd"}} - httpGet: - port: {{ .Values.metrics.port }} - path: /start - {{- else }} - tcpSocket: - port: {{ .Values.service.internalPort }} - {{- end }} - initialDelaySeconds: {{ .Values.deployment.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.deployment.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.deployment.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.deployment.readinessProbe.failureThreshold }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- if .Values.deployment.terminationGracePeriodSeconds }} - terminationGracePeriodSeconds: {{ .Values.deployment.terminationGracePeriodSeconds | int }} - {{- end }} - volumes: - {{- include "gitlab.extraVolumes" . | nindent 6 }} - - name: shell-config - configMap: - name: {{ template "fullname" . }} - {{- if .Values.config.gssapi.enabled }} - - name: gssapi-keytab - secret: - secretName: {{ .Values.config.gssapi.keytab.secret }} - {{- end }} - {{- if eq .Values.sshDaemon "openssh" }} - - name: sshd-config - configMap: - name: {{ template "fullname" . }}-sshd - {{- end }} - - name: shell-init-secrets - projected: - defaultMode: 0440 - sources: - - secret: - name: {{ template "gitlab.gitlab-shell.hostKeys.secret" . }} - - secret: - name: {{ template "gitlab.gitlab-shell.authToken.secret" . }} - items: - - key: {{ template "gitlab.gitlab-shell.authToken.key" . }} - path: shell/.gitlab_shell_secret - # Actual config dirs that will be used in the container - - name: shell-secrets - emptyDir: - medium: "Memory" - {{- include "gitlab.certificates.volumes" . | nindent 6 }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/hpa.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/hpa.yaml deleted file mode 100644 index 63b305dea..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/hpa.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.enabled -}} -{{- $hpaCfg := (dict "global" $.Values.global.hpa "local" .Values.hpa "context" $) -}} ---- -apiVersion: {{ template "gitlab.hpa.apiVersion" $hpaCfg }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "fullname" . }} - minReplicas: {{ .Values.minReplicas }} - maxReplicas: {{ .Values.maxReplicas }} - {{- include "gitlab.hpa.metrics" $hpaCfg | nindent 2 }} - {{- include "gitlab.hpa.behavior" $hpaCfg | nindent 2 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/networkpolicy.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/networkpolicy.yaml deleted file mode 100644 index 023923364..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/networkpolicy.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.enabled -}} -{{- if .Values.networkpolicy.enabled -}} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ template "fullname" . }}-v1 - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{ toYaml .Values.networkpolicy.annotations | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - policyTypes: - {{- if .Values.networkpolicy.egress.enabled }} - - Egress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - - Ingress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - ingress: - {{ toYaml .Values.networkpolicy.ingress.rules | nindent 4 }} - {{- end -}} - {{- if .Values.networkpolicy.egress.enabled }} - egress: - {{ toYaml .Values.networkpolicy.egress.rules | nindent 4 }} - {{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/nginx-tcp-configmap.yml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/nginx-tcp-configmap.yml deleted file mode 100644 index a0b5baa1d..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/nginx-tcp-configmap.yml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if not .Values.tcpExternalConfig}} -{{- if .Values.enabled }} -{{- $port := include "gitlab.shell.port" . | int -}} -{{- $tcpProxyProtocol := include "gitlab.shell.tcp.proxyProtocol" . }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "ingress-nginx.tcp-configmap" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - {{ $port | quote }}: "{{ .Release.Namespace }}/{{ template "fullname" . }}:{{ $port }}{{ $tcpProxyProtocol }}" -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/pdb.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/pdb.yaml deleted file mode 100644 index 57cd25b88..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/pdb.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.enabled -}} -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - maxUnavailable: {{ .Values.maxUnavailable }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/service.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/service.yaml deleted file mode 100644 index af75b4970..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/service.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{{- if .Values.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- include "gitlab.serviceLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.serviceAnnotations" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - {{- if .Values.metrics.enabled }} - - port: {{ .Values.metrics.port }} - targetPort: http-metrics - protocol: TCP - name: http-metrics - {{- end }} - - port: {{ include "gitlab.shell.port" . | int }} - targetPort: {{ .Values.service.internalPort }} - protocol: TCP - name: ssh - {{- if and (eq .Values.service.type "NodePort") .Values.service.nodePort }} - nodePort: {{ .Values.service.nodePort | int64 }} - {{- end }} - {{- if or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer") }} - externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} - {{- end }} -{{- if .Values.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.service.loadBalancerIP }} -{{- end }} -{{- if .Values.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.service.loadBalancerSourceRanges }} - - {{ $cidr }} - {{- end }} -{{- end }} -{{- if .Values.service.externalIPs }} - externalIPs: - {{- toYaml .Values.service.externalIPs | nindent 4 }} -{{- end }} - selector: - {{- include "gitlab.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/serviceaccount.yaml deleted file mode 100644 index 69ddca009..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/servicemonitor.yaml deleted file mode 100644 index fcc157f5f..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/templates/servicemonitor.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.enabled .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled -}} -{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with .Values.metrics.serviceMonitor.additionalLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - endpoints: - - port: http-metrics - path: {{ .Values.metrics.path }} - {{- with .Values.metrics.serviceMonitor.endpointConfig }} - {{- toYaml . | nindent 6 }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/values.schema.json b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/values.schema.json deleted file mode 100644 index b8c9d3916..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/values.schema.json +++ /dev/null @@ -1,515 +0,0 @@ -{ - "schema": "https://json-schema.org/draft-07/schema#", - "properties": { - "annotations": { - "title": "Pod annotations", - "type": "object" - }, - "logging": { - "properties": { - "format": { - "title": "Format to be used for gitlab-shell logs", - "enum": [ - "text", - "json" - ] - }, - "sshdLogLevel": { - "title": "Log level for underlying SSH daemon", - "enum": [ - "QUIET", - "FATAL", - "ERROR", - "INFO", - "VERBOSE" - ] - } - } - }, - "config": { - "properties": { - "loginGraceTime": { - "title": "Amount of time after which server will disconnect on failed logins", - "type": "number" - }, - "maxStartups": { - "$comment": "We either need start and rate to be specified, or full to be specified", - "anyOf": [ - { - "allOf": [ - { - "required": [ - "start", - "rate" - ] - } - ] - }, - { - "required": [ - "full" - ] - } - ], - "properties": { - "full": { - "type": "number" - }, - "rate": { - "type": "number" - }, - "start": { - "type": "number" - } - }, - "title": "Maximum number of concurrent unauthenticated connections to the SSH daemon", - "type": "object" - }, - "proxyProtocol": { - "title": "Enable PROXY support for gitlab-sshd", - "type": "boolean" - }, - "proxyPolicy": { - "title": "The policy for handling PROXY protocol in gitlab-sshd", - "type": "string", - "enum": [ - "use", - "require", - "ignore", - "reject" - ] - }, - "proxyHeaderTimeout": { - "title": "The maximum duration gitlab-sshd will wait before giving up on reading the PROXY protocol header", - "pattern": "^[0-9]+(ms|s|m)$", - "type": "string" - }, - "ciphers": { - "title": "The available ciphers in gitlab-sshd", - "type": "array", - "items": { - "type": "string" - } - }, - "kexAlgorithms": { - "title": "The available KEX (Key Exchange) algorithms in gitlab-sshd", - "type": "array", - "items": { - "type": "string" - } - }, - "macs": { - "title": "The available MAC (message authentication code) algorithms in gitlab-sshd", - "type": "array", - "items": { - "type": "string" - } - }, - "gssapi": { - "properties": { - "enabled": { - "title": "Enable GSS-API support for then gitlab-sshd daemon", - "type": "boolean" - }, - "libpath": { - "title": "Library path for gssapi shared library", - "type": "string" - }, - "keytab": { - "properties": { - "secret": { - "title": "The Kubernetes secret name" - }, - "key": { - "title": "The Kubernetes secret key" - } - }, - "title": "The Kubernetes secret holding the keytab for the gssapi-with-mic authentication method", - "type": "object" - }, - "krb5Config": { - "title": "Content of the `/etc/krb5.conf` file in the gitlab-shell container", - "type": "string" - }, - "servicePrincipalName": { - "title": "The Kerberos service name to be used by the gitlab-sshd daemon", - "type": "string" - } - }, - "title": "GSS-API related settings", - "type": "object" - } - }, - "required": [ - "loginGraceTime", - "maxStartups" - ], - "title": "GitLab Shell configuration", - "type": "object" - }, - "deployment": { - "properties": { - "livenessProbe": { - "properties": { - "failureThreshold": { - "type": "number" - }, - "initialDelaySeconds": { - "type": "number" - }, - "periodSeconds": { - "type": "number" - }, - "successThreshold": { - "type": "number" - }, - "timeoutSeconds": { - "type": "number" - } - }, - "title": "Liveness probe settings", - "type": "object" - }, - "terminationGracePeriodSeconds": { - "type": "integer", - "minimum": 5 - } - }, - "required": [ - "livenessProbe" - ], - "title": "Deploment details", - "type": "object" - }, - "enabled": { - "title": "Shell enabled", - "type": "boolean" - }, - "global": { - "properties": { - "shell": { - "properties": { - "authToken": { - "properties": { - "key": { - "title": "Name of the key", - "type": "string" - }, - "secret": { - "title": "Name of the Kubernetes Secret", - "type": "string" - } - }, - "title": "Secret with GitLab Shell authToken to communicate with Workhorse", - "type": "object" - }, - "hostKeys": { - "title": "Secret with SSH Host keys", - "type": "object" - }, - "port": { - "title": "Port used by ingress to pass SSH traffic and shown in UI", - "type": "number" - } - }, - "type": "object" - } - }, - "title": "Global properties", - "type": "object" - }, - "hpa": { - "properties": { - "cpu": { - "properties": { - "targetType": { - "title": "Autoscaling CPU target type", - "type": "string" - }, - "targetAverageUtilization": { - "title": "Autoscaling CPU target utilization", - "type": "number" - }, - "targetAverageValue": { - "title": "Autoscaling CPU target value", - "type": "string" - } - } - }, - "memory": { - "properties": { - "targetType": { - "title": "Autoscaling memory target type", - "type": "string" - }, - "targetAverageUtilization": { - "title": "Autoscaling memory target utilization", - "type": "number" - }, - "targetAverageValue": { - "title": "Autoscaling memory target value", - "type": "string" - } - } - }, - "customMetrics": { - "title": "Autoscaling custom metrics", - "type": "array" - }, - "behavior": { - "title": "Autoscaling behavior definition", - "type": "object" - } - }, - "title": "Horizontal Pod Autoscaler settings", - "type": "object" - }, - "image": { - "properties": { - "pullPolicy": { - "enum": [ - "Always", - "Never", - "IfNotPresent" - ], - "title": "Image pull policy", - "type": "string" - }, - "pullSecrets": { - "title": "Secrets to be used to pull image", - "type": "array" - }, - "repository": { - "title": "Docker image repository", - "type": "string" - } - }, - "required": [ - "repository" - ], - "title": "Docker image details", - "type": "object" - }, - "init": { - "properties": { - "image": { - "properties": { - "repository": { - "title": "Image repository", - "type": "string" - }, - "resources": { - "properties": { - "requests": { - "properties": { - "cpu": { - "title": "Required CPU", - "type": [ - "string", - "number" - ] - } - }, - "title": "Resource requests", - "type": "object" - } - }, - "title": "Resources allocated to init container", - "type": "object" - }, - "tag": { - "title": "Image tag", - "type": "string" - } - }, - "title": "Init container image details", - "type": "object" - } - }, - "required": [ - "image" - ], - "title": "Init container details", - "type": "object" - }, - "maxReplicas": { - "title": "Maximum number of pod replicas", - "type": "number" - }, - "maxUnavailable": { - "title": "Maximum number of unavailable pods", - "anyOf": [ - { "type": "string" }, - { "type": "number" } - ] - }, - "minReplicas": { - "title": "Minimum number of pod replicas", - "type": "number" - }, - "metrics": { - "properties": { - "enabled": { - "title": "Enable generation of metrics via annotations or ServiceMonitor", - "type": "boolean" - }, - "port": { - "title": "Metrics port", - "type": "integer" - }, - "path": { - "title": "Metrics path", - "type": "string" - }, - "serviceMonitor": { - "properties": { - "enabled": { - "title": "Create a ServiceMonitor", - "type": "boolean" - }, - "additionalLabels": { - "title": "Additional labels", - "type": "object" - }, - "endpointConfig": { - "title": "Endpoint config", - "type": "object" - } - }, - "title": "ServiceMonitor", - "type": "object" - }, - "annotations": { - "title": "Metrics annotations", - "type": "object" - } - } - }, - "resources": { - "properties": { - "requests": { - "properties": { - "cpu": { - "title": "Required CPU", - "type": [ - "string", - "number" - ] - }, - "memory": { - "title": "Required Memory", - "type": [ - "string", - "number" - ] - } - }, - "title": "Resource requests", - "type": "object" - } - }, - "title": "Resources allocated to container", - "type": "object" - }, - "service": { - "properties": { - "externalIPs": { - "title": "List of external IPs", - "type": "array" - }, - "externalTrafficPolicy": { - "title": "Service external traffic policy", - "type": "string" - }, - "internalPort": { - "title": "Service internal port", - "type": "number" - }, - "loadBalancerIP": { - "title": "IP address to assign to LoadBalancer", - "type": "string" - }, - "loadBalancerSourceRanges": { - "title": "List of IP CIDRs allowed access to LoadBalancer", - "type": "array" - }, - "name": { - "title": "Name of the service", - "type": "string" - }, - "nodePort": { - "title": "Service node port", - "type": "number" - }, - "type": { - "title": "Type of the service", - "type": "string" - } - }, - "required": [ - "name", - "internalPort", - "type" - ], - "title": "GitLab Shell Kubernetes Service details", - "type": "object" - }, - "sshDaemon": { - "title": "SSH daemon that would be executed inside container", - "enum": [ - "openssh", - "gitlab-sshd" - ] - }, - "tolerations": { - "title": "Tolerations labels for pod assignment", - "type": "array" - }, - "priorityClassName": { - "title": "Priority class assigned to pods", - "type": "string" - }, - "workhorse": { - "properties": { - "host": { - "title": "Workhorse host", - "type": "string" - }, - "port": { - "title": "Workhorse port", - "type": "number" - }, - "serviceName": { - "title": "Workhorse service name", - "type": "string" - } - }, - "title": "Workhorse service details", - "type": "object" - } - }, - "required": [ - "enabled" - ], - "if": { - "properties": { - "enabled": { - "const": true - } - }, - "required": [ - "enabled" - ] - }, - "then": { - "required": [ - "config", - "deployment", - "hpa", - "image", - "maxReplicas", - "service", - "workhorse" - ] - } -} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/values.yaml deleted file mode 100644 index dbb72147b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/gitlab-shell/values.yaml +++ /dev/null @@ -1,169 +0,0 @@ -# Default values for gitlab-shell. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -image: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-shell - # pullPolicy: IfNotPresent - # pullSecrets: [] - # tag: master -service: - name: gitlab-shell - type: ClusterIP - internalPort: 2222 - externalTrafficPolicy: Cluster - # nodePort: xxx - # loadBalancerIP: x.x.x.x - # loadBalancerSourceRanges: - # - x.x.x.x/yy - # externalIPs: - # - x.x.x.x - # - y.y.y.y - -init: - image: {} - # repository: - # tag: - resources: - requests: - cpu: 50m - containerSecurityContext: {} - -# Tolerations for pod scheduling -tolerations: [] - -# Priority class assigned to pods -priorityClassName: "" - -global: {} - -enabled: true -annotations: {} -podLabels: {} -common: - labels: {} -serviceLabels: {} -workhorse: {} - # by default, Workhorse is a part of the webservice Pods / Service - # scheme: 'http' - # host: '0.0.0.0' - # serviceName: 'webservice' - # port: 8181 -resources: - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - requests: - cpu: 0 - memory: 6M -maxUnavailable: 1 -minReplicas: 2 -maxReplicas: 10 - -hpa: - # targetAverageValue: 100m # DEPRECATED: in favor of `hpa.cpu.targetAverageValue` below - cpu: - targetType: AverageValue # Utilization or AverageValue - targetAverageValue: 100m - # targetAverageUtilization: 75 - # memory: - # targetType: Utilization # Utilization or AverageValue - # targetAverageValue: 1G - # targetAverageUtilization: 75 - # Note that the HPA is limited to autoscaling/v2beta1, autoscaling/v2beta2 and autoscaling/v2 - customMetrics: [] # Overrides HPA metrics definition - behavior: - scaleDown: - stabilizationWindowSeconds: 300 - -deployment: - terminationGracePeriodSeconds: 30 - livenessProbe: - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 3 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - initialDelaySeconds: 10 - periodSeconds: 5 - timeoutSeconds: 3 - successThreshold: 1 - failureThreshold: 2 - strategy: {} - -logging: - format: "json" - sshdLogLevel: "ERROR" - -config: - clientAliveInterval: 0 - loginGraceTime: 60 - maxStartups: - start: 10 - rate: 30 - full: 100 - proxyProtocol: false - proxyPolicy: "use" - proxyHeaderTimeout: 500ms - ciphers: [aes128-gcm@openssh.com, chacha20-poly1305@openssh.com, aes256-gcm@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr] - kexAlgorithms: [curve25519-sha256, curve25519-sha256@libssh.org, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1] - macs: [hmac-sha2-256-etm@openssh.com, hmac-sha2-512-etm@openssh.com, hmac-sha2-256, hmac-sha2-512, hmac-sha1] - gssapi: - enabled: false - libpath: "libgssapi_krb5.so.2" - keytab: - #secret: - key: keytab - krb5Config: "" - servicePrincipalName: "" - -## Allow to overwrite under which User and Group the Pod will be running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -## Allow to overwrite the specific security context under which the gitaly container is running. -containerSecurityContext: - runAsUser: 1000 - -## Enable deployment to use a serviceAccount -serviceAccount: - enabled: false - create: false - annotations: {} - ## Name to be used for serviceAccount, otherwise defaults to chart fullname - # name: - -metrics: - enabled: false - port: 9122 - path: /metrics - serviceMonitor: - enabled: false - additionalLabels: {} - endpointConfig: {} - # DEPRECATED - annotations: {} - -networkpolicy: - enabled: false - egress: - enabled: false - rules: [] - ingress: - enabled: false - rules: [] - annotations: {} - -## Allow to select ssh daemon that would be executed inside container -## Possible values: openssh, gitlab-sshd -sshDaemon: openssh - -affinity: - podAntiAffinity: - topologyKey: diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/Chart.yaml deleted file mode 100644 index 316f3ba05..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/Chart.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -appVersion: v16.0.1 -description: GitLab Agent Server -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- agent -- gitlab -- gitlab-kas -- k8s-agent -- kas -- kubernetes -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: kas -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/gitlab-kas -- https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/_default-config.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/_default-config.yaml deleted file mode 100644 index 47c95cc64..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/_default-config.yaml +++ /dev/null @@ -1,47 +0,0 @@ -agent: - listen: - address: ":{{ .Values.service.internalPort }}" - websocket: true - {{- if $.Values.global.kas.tls.enabled }} - certificate_file: /etc/kas/tls.crt - key_file: /etc/kas/tls.key - {{- end }} - kubernetes_api: - listen: - address: ":{{ .Values.service.kubernetesApiPort }}" - {{- if $.Values.global.kas.tls.enabled }} - certificate_file: /etc/kas/tls.crt - key_file: /etc/kas/tls.key - {{- end }} - url_path_prefix: "{{ .Values.ingress.k8sApiPath }}" -gitlab: - address: "{{ template "gitlab.workhorse.url" . }}" - external_url: "{{- template "gitlab.gitlab.url" . -}}" - authentication_secret_file: "/etc/kas/.gitlab_kas_secret" -observability: - listen: - address: ":{{ .Values.observability.port }}" - liveness_probe: - url_path: "{{ .Values.observability.livenessProbe.path }}" - readiness_probe: - url_path: "{{ .Values.observability.readinessProbe.path }}" -redis: - {{- include "kas.redis" . | nindent 2 }} -api: - listen: - address: ":{{ .Values.service.apiInternalPort }}" - authentication_secret_file: "/etc/kas/.gitlab_kas_secret" - {{- if $.Values.global.kas.tls.enabled }} - certificate_file: /etc/kas/tls.crt - key_file: /etc/kas/tls.key - {{- end }} -private_api: - listen: - address: ":{{ .Values.service.privateApiPort }}" - authentication_secret_file: "/etc/kas/.gitlab_kas_private_api_secret" - {{- if or .Values.privateApi.tls.enabled $.Values.global.kas.tls.enabled }} - certificate_file: "/etc/kas/tls.crt" - key_file: "/etc/kas/tls.key" - ca_certificate_file: "/etc/ssl/certs/ca-certificates.crt" - {{- end }} - diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/_helpers.tpl deleted file mode 100644 index bb16adf36..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/_helpers.tpl +++ /dev/null @@ -1,44 +0,0 @@ -{{/* -Returns the secret name for the Secret containing the TLS certificate and key. -Uses `ingress.tls.secretName` first and falls back to `global.ingress.tls.secretName` -if there is a shared tls secret for all ingresses. -*/}} -{{- define "kas.tlsSecret" -}} -{{- $defaultName := (dict "secretName" "") -}} -{{- if .Values.global.ingress.configureCertmanager -}} -{{- $_ := set $defaultName "secretName" (printf "%s-kas-tls" .Release.Name) -}} -{{- else -}} -{{- $_ := set $defaultName "secretName" (include "gitlab.wildcard-self-signed-cert-name" .) -}} -{{- end -}} -{{- pluck "secretName" .Values.ingress.tls .Values.global.ingress.tls $defaultName | first -}} -{{- end -}} - -{{/* -Build Redis config for KAS -*/}} -{{- define "kas.redis" -}} -{{- if .Values.redis.enabled -}} -{{- if .Values.global.redis.sharedState -}} -{{- $_ := set $ "redisConfigName" "sharedState" -}} -{{- end -}} -{{- include "gitlab.redis.selectedMergedConfig" . -}} -{{- if .redisMergedConfig.password.enabled -}} -password_file: /etc/kas/redis/{{ printf "%s-password" (default "redis" .redisConfigName) }} -{{- end -}} -{{- if not .redisMergedConfig.sentinels }} -server: - address: {{ template "gitlab.redis.host" . }}:{{ template "gitlab.redis.port" . }} -{{- else }} -sentinel: - addresses: - {{- range $i, $entry := .redisMergedConfig.sentinels }} - - {{ quote (print (trim $entry.host) ":" ( default 26379 $entry.port | int ) ) -}} - {{ end }} - master_name: {{ template "gitlab.redis.host" . }} -{{- end -}} -{{- if eq (.redisMergedConfig.scheme | default "") "rediss" }} -tls: - enabled: true -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/configmap.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/configmap.yaml deleted file mode 100644 index de5a0c0e6..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/configmap.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.global.kas.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - # See https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/blob/master/pkg/kascfg/config_example.yaml - config.yaml: | - {{- $defaults := include (print $.Template.BasePath "/_default-config.yaml") . | fromYaml -}} - {{- $custom := default .Values.customConfig .Values.global.kas.customConfig -}} - {{- $merged := deepCopy $custom | mergeOverwrite $defaults -}} - {{- $merged | toYaml | nindent 4 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/deployment.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/deployment.yaml deleted file mode 100644 index 44d00008a..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/deployment.yaml +++ /dev/null @@ -1,157 +0,0 @@ -{{- if .Values.global.kas.enabled -}} -{{- $imageCfg := dict "global" $.Values.global.image "local" $.Values.image -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.deploymentAnnotations" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - {{- if .Values.deployment.strategy }} - strategy: {{ .Values.deployment.strategy | toYaml | nindent 4 }} - {{- end }} - {{- if .Values.deployment.minReadySeconds }} - minReadySeconds: {{ .Values.deployment.minReadySeconds }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" - {{- if and .Values.metrics.enabled (not .Values.metrics.serviceMonitor.enabled) }} - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: {{ .Values.observability.port | quote }} - gitlab.com/prometheus_path: {{ .Values.metrics.path }} - prometheus.io/scrape: "true" - prometheus.io/port: {{ .Values.observability.port | quote }} - prometheus.io/path: {{ .Values.metrics.path }} - {{- end }} - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - automountServiceAccountToken: false - {{- if eq (default .Values.global.antiAffinity .antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- else if eq (default .Values.global.antiAffinity .antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- end }} - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - {{- include "gitlab.priorityClassName" . | nindent 6 }} - initContainers: - {{- include "gitlab.certificates.initContainer" . | nindent 8 }} - containers: - {{- include "gitlab.extraContainers" . | nindent 8 }} - - name: {{ template "name" . }} - image: "{{ .Values.image.repository }}:{{ coalesce .Values.image.tag (include "gitlab.parseAppVersion" (dict "appVersion" .Chart.AppVersion "prepend" "true")) }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" $ | indent 10 }} - args: - - "--configuration-file=/etc/kas/config.yaml" - env: - - name: OWN_PRIVATE_API_HOST - value: {{ include "gitlab.kas.serviceHost" . }} - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - - name: OWN_PRIVATE_API_URL - value: "{{ include "gitlab.kas.internal.scheme" . }}://$(POD_IP):{{ .Values.service.privateApiPort }}" - {{- include "gitlab.extraEnv" . | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - ports: - - containerPort: {{ .Values.service.internalPort }} - name: {{ template "name" . }} - - containerPort: {{ .Values.service.kubernetesApiPort }} - name: {{ template "name" . }}-k8s-api - - containerPort: {{ .Values.service.privateApiPort }} - name: {{ template "name" . }}-private-api - - containerPort: {{ .Values.observability.port }} - name: http-metrics - readinessProbe: - httpGet: - path: {{ .Values.observability.readinessProbe.path }} - port: {{ .Values.observability.port }} - initialDelaySeconds: 5 - periodSeconds: 10 - livenessProbe: - httpGet: - path: {{ .Values.observability.livenessProbe.path }} - port: {{ .Values.observability.port }} - initialDelaySeconds: 15 - periodSeconds: 20 - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - name: init-etc-kas - mountPath: /etc/kas - readOnly: true - {{- include "gitlab.extraVolumeMounts" . | nindent 12 }} - {{- include "gitlab.certificates.volumeMount" . | nindent 12 }} - terminationGracePeriodSeconds: {{ .Values.deployment.terminationGracePeriodSeconds | int }} - volumes: - {{- include "gitlab.extraVolumes" . | nindent 6 }} - {{- include "gitlab.certificates.volumes" . | nindent 6 }} - - name: init-etc-kas - projected: - defaultMode: 0440 - sources: - - configMap: - name: {{ template "fullname" . }} - - secret: - name: {{ template "gitlab.kas.secret" . }} - items: - - key: {{ template "gitlab.kas.key" . }} - path: .gitlab_kas_secret - - secret: - name: {{ template "gitlab.kas.privateApi.secret" . }} - items: - - key: {{ template "gitlab.kas.privateApi.key" . }} - path: .gitlab_kas_private_api_secret - {{- if or $.Values.privateApi.tls.enabled $.Values.global.kas.tls.enabled }} - - secret: - name: {{ default .Values.privateApi.tls.secretName .Values.global.kas.tls.secretName | quote }} - items: - - key: tls.crt - path: tls.crt - - key: tls.key - path: tls.key - {{- end }} - {{- if .Values.redis.enabled -}} - {{- include "gitlab.redis.secrets" . | nindent 12 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/hpa.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/hpa.yaml deleted file mode 100644 index 18b5f8f61..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/hpa.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.global.kas.enabled -}} -{{- $hpaCfg := (dict "global" $.Values.global.hpa "local" .Values.hpa "context" $) -}} ---- -apiVersion: {{ template "gitlab.hpa.apiVersion" $hpaCfg }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "fullname" . }} - minReplicas: {{ .Values.minReplicas }} - maxReplicas: {{ .Values.maxReplicas }} - {{- include "gitlab.hpa.metrics" $hpaCfg | nindent 2 }} - {{- include "gitlab.hpa.behavior" $hpaCfg | nindent 2 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/ingress.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/ingress.yaml deleted file mode 100644 index ee5fc6ede..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/ingress.yaml +++ /dev/null @@ -1,76 +0,0 @@ -{{- if .Values.global.kas.enabled -}} -{{- if eq (include "gitlab.ingress.enabled" $) "true" -}} -{{- $hostname := include "gitlab.kas.hostname" . -}} -{{- $tlsSecret := include "kas.tlsSecret" . -}} -{{- $ingressCfg := dict "global" .Values.global.ingress "local" .Values.ingress "context" . -}} -apiVersion: {{ template "gitlab.ingress.apiVersion" $ingressCfg }} -kind: Ingress -metadata: - name: {{ template "fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{ include "ingress.class.annotation" $ingressCfg }} - kubernetes.io/ingress.provider: "{{ template "gitlab.ingress.provider" $ingressCfg }}" - {{- if eq "nginx" .Values.global.ingress.provider }} - nginx.ingress.kubernetes.io/proxy-buffering: "off" - nginx.ingress.kubernetes.io/custom-http-errors: "" - {{- end }} - {{- if $.Values.global.kas.tls.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: https - {{- if $.Values.global.kas.tls.verify }} - nginx.ingress.kubernetes.io/proxy-ssl-verify: 'on' - nginx.ingress.kubernetes.io/proxy-ssl-name: {{ include "fullname" . }}.{{ $.Release.Namespace }}.svc - {{- if $.Values.global.kas.tls.caSecretName }} - nginx.ingress.kubernetes.io/proxy-ssl-secret: {{ $.Release.Namespace }}/{{ $.Values.global.kas.tls.caSecretName }} - {{- end }} - {{- end }} - {{- end }} - {{- include "gitlab.certmanager_annotations" . | nindent 4 }} - {{- range $key, $value := merge .Values.ingress.annotations .Values.global.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - {{ include "ingress.class.field" $ingressCfg }} - rules: - - host: {{ $hostname }} - http: - paths: - - path: "{{ trimSuffix "/" $.Values.ingress.k8sApiPath }}{{ $.Values.global.ingress.path }}" - {{ if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (eq $.Values.global.ingress.apiVersion "networking.k8s.io/v1") -}} - pathType: {{ default "Prefix" $.Values.global.ingress.pathType }} - backend: - service: - name: {{ template "gitlab.kas.serviceName" . }} - port: - number: {{ .Values.service.kubernetesApiPort }} - {{- else -}} - backend: - serviceName: {{ template "gitlab.kas.serviceName" . }} - servicePort: {{ .Values.service.kubernetesApiPort }} - {{- end }} - - path: "{{ trimSuffix "/" $.Values.ingress.agentPath }}{{ $.Values.global.ingress.path }}" - {{ if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (eq $.Values.global.ingress.apiVersion "networking.k8s.io/v1") -}} - pathType: {{ default "Prefix" $.Values.global.ingress.pathType }} - backend: - service: - name: {{ template "gitlab.kas.serviceName" . }} - port: - number: {{ .Values.service.externalPort }} - {{- else -}} - backend: - serviceName: {{ template "gitlab.kas.serviceName" . }} - servicePort: {{ .Values.service.externalPort }} - {{- end }} - {{- if (and $tlsSecret (eq (include "gitlab.ingress.tls.enabled" $) "true" )) }} - tls: - - hosts: - - {{ $hostname }} - secretName: {{ $tlsSecret }} - {{- else }} - tls: [] - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/networkpolicy.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/networkpolicy.yaml deleted file mode 100644 index 7b2d81d1b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/networkpolicy.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.global.kas.enabled -}} -{{- if .Values.networkpolicy.enabled -}} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ template "fullname" . }}-v1 - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{ toYaml .Values.networkpolicy.annotations | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - policyTypes: - {{- if .Values.networkpolicy.egress.enabled }} - - Egress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - - Ingress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - ingress: - {{ toYaml .Values.networkpolicy.ingress.rules | nindent 4 }} - {{- end -}} - {{- if .Values.networkpolicy.egress.enabled }} - egress: - {{ toYaml .Values.networkpolicy.egress.rules | nindent 4 }} - {{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/pdb.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/pdb.yaml deleted file mode 100644 index 1329ec9ae..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/pdb.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.global.kas.enabled -}} -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - maxUnavailable: {{ .Values.maxUnavailable }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/service.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/service.yaml deleted file mode 100644 index daf05c6dd..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/service.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if .Values.global.kas.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "gitlab.kas.serviceName" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- include "gitlab.serviceLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.serviceAnnotations" . | nindent 4 }} -spec: - type: {{ .Values.service.type | quote }} - {{- if (eq .Values.service.type "LoadBalancer") }} - {{- if .Values.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.service.loadBalancerIP | quote }} - {{- end }} - {{- if .Values.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range .Values.service.loadBalancerSourceRanges }} - - {{ . | quote }} - {{- end }} - {{- end }} - {{- end }} - ports: - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - protocol: TCP - name: grpc-{{ template "name" . }}-external-api - - port: {{ .Values.global.kas.service.apiExternalPort }} - targetPort: {{ .Values.service.apiInternalPort }} - protocol: TCP - name: grpc-{{ template "name" . }}-internal-api - - port: {{ .Values.service.kubernetesApiPort }} - targetPort: {{ .Values.service.kubernetesApiPort }} - protocol: TCP - name: grpc-{{ template "name" . }}-k8s-api - {{- if .Values.metrics.enabled }} - - port: {{ .Values.observability.port }} - targetPort: http-metrics - protocol: TCP - name: http-metrics - {{- end }} - selector: - app: {{ template "name" . }} - release: {{ .Release.Name }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/serviceaccount.yaml deleted file mode 100644 index d87987fe0..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and .Values.global.kas.enabled $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 -}} - {{- include "gitlab.commonLabels" . | nindent 4 -}} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/servicemonitor.yaml deleted file mode 100644 index 7b18e2902..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/templates/servicemonitor.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if and .Values.global.kas.enabled .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled -}} -{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "gitlab.kas.serviceName" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with .Values.metrics.serviceMonitor.additionalLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - endpoints: - - port: http-metrics - path: {{ .Values.metrics.path }} - {{- with .Values.metrics.serviceMonitor.endpointConfig }} - {{- toYaml . | nindent 6 }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/kas/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/kas/values.yaml deleted file mode 100644 index 4cd6ca7d3..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/kas/values.yaml +++ /dev/null @@ -1,145 +0,0 @@ -# Default values for gitlab-kas. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -annotations: {} -global: - ingress: {} - kas: - enabled: true - redis: - # host: '0.0.0.0' - auth: {} - # hosts: - # kas: - # name: kas.example.com - # https: true - -init: - image: {} - # repository: - # tag: - resources: - requests: - cpu: 50m - containerSecurityContext: {} - -hpa: - # targetAverageValue: 100m # DEPRECATED: in favor of `hpa.cpu.targetAverageValue` below - cpu: - targetType: AverageValue # Utilization or AverageValue - targetAverageValue: 100m - # targetAverageUtilization: 75 - # memory: - # targetType: Utilization # Utilization or AverageValue - # targetAverageValue: 1G - # targetAverageUtilization: 75 - # Note that the HPA is limited to autoscaling/v2beta1, autoscaling/v2beta2 and autoscaling/v2 - customMetrics: [] # Overrides HPA metrics definition - behavior: - scaleDown: - stabilizationWindowSeconds: 300 - -image: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-kas - # tag: latest - # pullPolicy: IfNotPresent - # pullSecrets: [] -ingress: - apiVersion: - annotations: {} - tls: {} - agentPath: / - k8sApiPath: /k8s-proxy -maxReplicas: 10 -maxUnavailable: 1 -minReplicas: 2 -podLabels: {} -common: - labels: {} -serviceLabels: {} -## Additional environment variables to set -extraEnv: {} -extraEnvFrom: {} -resources: - requests: - cpu: 100m - memory: 100M -service: - externalPort: 8150 - internalPort: 8150 - apiInternalPort: 8153 - kubernetesApiPort: 8154 - privateApiPort: 8155 - type: ClusterIP - # loadBalancerIP: - # loadBalancerSourceRanges: -metrics: - enabled: true - path: /metrics - serviceMonitor: - enabled: false - additionalLabels: {} - endpointConfig: {} -observability: - port: 8151 - livenessProbe: - path: /liveness - readinessProbe: - path: /readiness -serviceAccount: - enabled: false - create: false - annotations: {} -# Tolerations for pod scheduling -tolerations: [] -workhorse: {} - # by default, Workhorse is a part of the Webservice Pods / Service - # scheme: 'http' - # host: '0.0.0.0' - # serviceName: 'webservice' - # port: 8181 -# merged with the default kas config -customConfig: {} - -privateApi: - # secret: - # key: - tls: - enabled: false # DEPRECATED: in favor of `global.kas.tls.enabled` - # secretName: # DEPRECATED: in favor of `global.kas.tls.secretName` -deployment: - terminationGracePeriodSeconds: 300 - strategy: {} - # minReadySeconds: 0 - -## Allow to overwrite under which User and Group the Pod will be running. -securityContext: - runAsUser: 65532 - runAsGroup: 65532 - fsGroup: 65532 - # fsGroupChangePolicy: OnRootMismatch - -## Allow to overwrite the specific security context under which the container is running. -containerSecurityContext: - runAsUser: 65532 - -redis: - enabled: true - -networkpolicy: - enabled: false - egress: - enabled: false - rules: [] - ingress: - enabled: false - rules: [] - annotations: {} - -affinity: - podAntiAffinity: - topologyKey: - -# Priority class assigned to pods -priorityClassName: "" diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/Chart.yaml deleted file mode 100644 index 96c098930..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/Chart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -appVersion: v16.0.1 -description: Handling incoming emails -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -- mailroom -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: mailroom -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/mailroom -- https://gitlab.com/gitlab-org/build/CNG/tree/master/gitlab-mailroom -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/_helpers.tpl deleted file mode 100644 index 4dbefb897..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/_helpers.tpl +++ /dev/null @@ -1,23 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Return the URL desired by Mail_room - -If global.redis.queues is present, use this. If not present, use global.redis -*/}} -{{- define "gitlab.mailroom.redis.url" -}} -{{- if $.Values.global.redis.queues -}} -{{- $_ := set $ "redisConfigName" "queues" }} -{{- end -}} -{{- include "gitlab.redis.url" $ -}} -{{- end -}} - -{{- define "gitlab.mailroom.redis.sentinels" -}} -{{- if $.Values.global.redis.queues -}} -{{- $_ := set $ "redisConfigName" "queues" }} -{{- end -}} -{{- $sentinels := include "gitlab.redis.sentinels" . }} -{{- if $sentinels -}} -:{{- $sentinels | replace " port:" " :port:" | replace " host:" " :host:" -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/configmap.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/configmap.yaml deleted file mode 100644 index 4616ef4f6..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/configmap.yaml +++ /dev/null @@ -1,132 +0,0 @@ -{{- if and .Values.enabled .Values.global.appConfig.incomingEmail.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - mail_room.yml: | - :health_check: - :address: 0.0.0.0 - :port: 8080 - :mailboxes: - - - {{- with .Values.global.appConfig.incomingEmail }} - :email: {{ .user }} - :name: {{ .mailbox }} - :delete_after_delivery: {{ .deleteAfterDelivery }} - :expunge_deleted: {{ .expungeDeleted }} - {{- if ne .logger.logPath "" }} - :logger: - :log_path: "{{ .logger.logPath }}" - {{- end }} - :inbox_method: {{ .inboxMethod }} - {{- if eq .inboxMethod "microsoft_graph" }} - :inbox_options: - :tenant_id: "{{ .tenantId }}" - :client_id: "{{ .clientId }}" - :client_secret: <%= File.read("/etc/gitlab/mailroom/client_id_incoming_email").strip.to_json %> - :poll_interval: {{ .pollInterval }} - {{- if .azureAdEndpoint }} - :azure_ad_endpoint: {{ .azureAdEndpoint }} - {{- end }} - {{- if .graphEndpoint }} - :graph_endpoint: {{ .graphEndpoint }} - {{- end }} - {{- else }} - :host: {{ .host }} - :port: {{ .port }} - :ssl: {{ .ssl }} - :start_tls: {{ .startTls }} - :password: <%= File.read("/etc/gitlab/mailroom/password_incoming_email").strip.to_json %> - :idle_timeout: {{ .idleTimeout }} - {{- end }} - {{- if eq .deliveryMethod "sidekiq" }} - :delivery_method: sidekiq - :delivery_options: - :redis_url: {{ include "gitlab.mailroom.redis.url" $ }} - :namespace: resque:gitlab - :queue: email_receiver - :worker: EmailReceiverWorker - {{- include "gitlab.mailroom.redis.sentinels" $ | nindent 10 }} - {{- else if eq .deliveryMethod "webhook" }} - :delivery_method: postback - :delivery_options: - :delivery_url: '{{ template "gitlab.workhorse.url" $ }}/api/v4/internal/mail_room/incoming_email' - :content_type: "text/plain" - :jwt_auth_header: "Gitlab-Mailroom-Api-Request" - :jwt_issuer: "gitlab-mailroom" - :jwt_algorithm: "HS256" - :jwt_secret_path: "/etc/gitlab/mailroom/incoming_email_webhook_secret" - {{- end }} - {{- end }} - :arbitration_method: redis - :arbitration_options: - :redis_url: {{ include "gitlab.mailroom.redis.url" . }} - :namespace: mail_room:gitlab - {{- include "gitlab.mailroom.redis.sentinels" . | nindent 10 }} - {{- if .Values.global.appConfig.serviceDeskEmail.enabled }} - - - {{- with .Values.global.appConfig.serviceDeskEmail }} - :email: {{ .user }} - :name: {{ .mailbox }} - :delete_after_delivery: {{ .deleteAfterDelivery }} - :expunge_deleted: {{ .expungeDeleted }} - {{- if ne .logger.logPath "" }} - :logger: - :log_path: "{{ .logger.logPath }}" - {{- end }} - :inbox_method: {{ .inboxMethod }} - {{- if eq .inboxMethod "microsoft_graph" }} - :inbox_options: - :tenant_id: "{{ .tenantId }}" - :client_id: "{{ .clientId }}" - :client_secret: <%= File.read("/etc/gitlab/mailroom/client_id_service_desk").strip.to_json %> - :poll_interval: {{ .pollInterval }} - {{- if .azureAdEndpoint }} - :azure_ad_endpoint: {{ .azureAdEndpoint }} - {{- end }} - {{- if .graphEndpoint }} - :graph_endpoint: {{ .graphEndpoint }} - {{- end }} - {{- else }} - :host: {{ .host }} - :port: {{ .port }} - :ssl: {{ .ssl }} - :start_tls: {{ .startTls }} - :password: <%= File.read("/etc/gitlab/mailroom/password_service_desk").strip.to_json %> - :idle_timeout: {{ .idleTimeout }} - {{- end }} - {{- if eq .deliveryMethod "sidekiq" }} - :delivery_method: sidekiq - :delivery_options: - :redis_url: {{ template "gitlab.redis.url" $ }} - :namespace: resque:gitlab - :queue: service_desk_email_receiver - :worker: ServiceDeskEmailReceiverWorker - {{- include "gitlab.mailroom.redis.sentinels" $ | nindent 10 }} - {{- else if eq .deliveryMethod "webhook" }} - :delivery_method: postback - :delivery_options: - :delivery_url: '{{ template "gitlab.workhorse.url" $ }}/api/v4/internal/mail_room/service_desk_email' - :content_type: "text/plain" - :jwt_auth_header: "Gitlab-Mailroom-Api-Request" - :jwt_issuer: "gitlab-mailroom" - :jwt_algorithm: "HS256" - :jwt_secret_path: "/etc/gitlab/mailroom/service_desk_email_webhook_secret" - {{- end }} - {{- end }} - :arbitration_method: redis - :arbitration_options: - :redis_url: {{ template "gitlab.redis.url" . }} - :namespace: mail_room:gitlab - {{- include "gitlab.mailroom.redis.sentinels" . | nindent 10 }} - {{- end }} - - configure: | - {{- include "gitlab.scripts.configure.secrets" (dict "required" "mailroom" "optional" "redis") | nindent 4 }} -# Leave this here - This line denotes end of block to the parser. -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/deployment.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/deployment.yaml deleted file mode 100644 index a3dc7c998..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/deployment.yaml +++ /dev/null @@ -1,163 +0,0 @@ -{{- if and .Values.enabled .Values.global.appConfig.incomingEmail.enabled }} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.image -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.deploymentAnnotations" . | nindent 4 }} -spec: - # Don't provide replicas when HPA are present - # replicas: {{ .Values.hpa.minReplicas }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - {{- if .Values.deployment.strategy }} - strategy: {{ .Values.deployment.strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - spec: - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- if eq (default .Values.global.antiAffinity .antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- else if eq (default .Values.global.antiAffinity .antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- end }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - {{- include "gitlab.priorityClassName" . | nindent 6 }} - initContainers: - {{- include "gitlab.extraInitContainers" . | nindent 8 }} - {{- include "gitlab.certificates.initContainer" . | nindent 8 }} - - name: configure - command: ['sh', '/config/configure'] - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" $ | indent 10 }} - env: - {{- include "gitlab.extraEnv" . | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 10 }} - - name: mailroom-config - mountPath: /config/configure - subPath: configure - readOnly: true - - name: init-mailroom-secrets - mountPath: /init-config - readOnly: true - - name: mailroom-secrets - mountPath: /init-secrets - readOnly: false - resources: - {{- toYaml .Values.init.resources | nindent 12 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - containers: - {{- include "gitlab.extraContainers" . | nindent 8 }} - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ coalesce .Values.image.tag (include "gitlab.parseAppVersion" (dict "appVersion" .Chart.AppVersion "prepend" "false")) }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" $ | indent 10 }} - env: - {{- include "gitlab.extraEnv" . | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }} - volumeMounts: - - name: mailroom-config - mountPath: /var/opt/gitlab/mail_room.yml - subPath: mail_room.yml - - name: mailroom-secrets - mountPath: '/etc/gitlab' - readOnly: true - {{- include "gitlab.extraVolumeMounts" . | nindent 12 }} - {{- include "gitlab.certificates.volumeMount" . | nindent 12 }} - livenessProbe: - httpGet: - path: /liveness - port: 8080 - readinessProbe: - exec: - command: - - /scripts/healthcheck - lifecycle: - preStop: - exec: - command: ["/bin/bash", "-c", "pkill -f 'mail_room'"] - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - {{- include "gitlab.extraVolumes" . | nindent 6 }} - - name: mailroom-config - configMap: - name: {{ template "fullname" . }} - - name: init-mailroom-secrets - projected: - defaultMode: 0400 - sources: - {{- include "gitlab.redis.secret" . | nindent 10 }} - {{- if eq .Values.global.appConfig.incomingEmail.inboxMethod "microsoft_graph" }} - - secret: - name: {{ .Values.global.appConfig.incomingEmail.clientSecret.secret | required "Missing required secret containing the OAuth2 Client ID for incoming email. Make sure to set `.Values.global.appConfig.incomingEmail.clientSecret.secret`" }} - items: - - key: {{ .Values.global.appConfig.incomingEmail.clientSecret.key }} - path: mailroom/client_id_incoming_email - {{- else }} - - secret: - name: {{ .Values.global.appConfig.incomingEmail.password.secret | required "Missing required secret containing the IMAP password for incoming email. Make sure to set `global.appConfig.incomingEmail.password.secret`" }} - items: - - key: {{ .Values.global.appConfig.incomingEmail.password.key }} - path: mailroom/password_incoming_email - {{ end }} - {{- include "gitlab.appConfig.incomingEmail.mountSecrets" $ | nindent 10 }} - {{- if .Values.global.appConfig.serviceDeskEmail.enabled }} - {{- if eq .Values.global.appConfig.serviceDeskEmail.inboxMethod "microsoft_graph" }} - - secret: - name: {{ .Values.global.appConfig.serviceDeskEmail.clientSecret.secret | required "Missing required secret containing the OAuth2 Client ID for service desk email. Make sure to set `.Values.global.appConfig.serviceDeskEmail.clientSecret.secret`" }} - items: - - key: {{ .Values.global.appConfig.serviceDeskEmail.clientSecret.key }} - path: mailroom/client_id_service_desk - {{- else }} - - secret: - name: {{ .Values.global.appConfig.serviceDeskEmail.password.secret | required "Missing required secret containing the IMAP password for service desk email. Make sure to set `global.appConfig.serviceDeskEmail.password.secret`"}} - items: - - key: {{ .Values.global.appConfig.serviceDeskEmail.password.key }} - path: mailroom/password_service_desk - {{- end }} - {{- include "gitlab.appConfig.serviceDeskEmail.mountSecrets" $ | nindent 10 }} - {{- end }} - - name: mailroom-secrets - emptyDir: - medium: "Memory" - {{- include "gitlab.certificates.volumes" . | nindent 6 }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/hpa.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/hpa.yaml deleted file mode 100644 index cc849fe23..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/hpa.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.enabled .Values.global.appConfig.incomingEmail.enabled }} -{{- $hpaCfg := (dict "global" $.Values.global.hpa "local" .Values.hpa "context" $) -}} ---- -apiVersion: {{ template "gitlab.hpa.apiVersion" $hpaCfg }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "fullname" . }} - minReplicas: {{ .Values.hpa.minReplicas }} - maxReplicas: {{ .Values.hpa.maxReplicas }} - {{- include "gitlab.hpa.metrics" $hpaCfg | nindent 2 }} - {{- include "gitlab.hpa.behavior" $hpaCfg | nindent 2 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/networkpolicy.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/networkpolicy.yaml deleted file mode 100644 index 023923364..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/networkpolicy.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.enabled -}} -{{- if .Values.networkpolicy.enabled -}} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ template "fullname" . }}-v1 - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{ toYaml .Values.networkpolicy.annotations | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - policyTypes: - {{- if .Values.networkpolicy.egress.enabled }} - - Egress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - - Ingress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - ingress: - {{ toYaml .Values.networkpolicy.ingress.rules | nindent 4 }} - {{- end -}} - {{- if .Values.networkpolicy.egress.enabled }} - egress: - {{ toYaml .Values.networkpolicy.egress.rules | nindent 4 }} - {{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/serviceaccount.yaml deleted file mode 100644 index 16435d96b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 -}} - {{- include "gitlab.commonLabels" . | nindent 4 -}} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/values.yaml deleted file mode 100644 index 97a31bd65..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/mailroom/values.yaml +++ /dev/null @@ -1,185 +0,0 @@ -image: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-mailroom - # tag: v0.9.1 - # pullPolicy: IfNotPresent - # pullSecrets: [] - -enabled: true - -init: - image: {} - # repository: - # tag: - resources: - requests: - cpu: 50m - containerSecurityContext: {} - -# Tolerations for pod scheduling -tolerations: [] - -podLabels: {} -common: - labels: {} - -workhorse: {} - # by default, Workhorse is a part of the Webservice Pods / Service - # scheme: 'http' - # host: '0.0.0.0' - # serviceName: 'webservice' - # port: 8181 - -global: - redis: - auth: {} - appConfig: - incomingEmail: - enabled: false - address: - host: - port: 993 - ssl: true - startTls: false - user: - password: - secret: "" - key: password - deleteAfterDelivery: true - expungeDeleted: false - logger: - logPath: "/dev/stdout" - mailbox: inbox - idleTimeout: 60 - inboxMethod: "imap" - clientSecret: - key: secret - pollInterval: 60 - deliveryMethod: webhook - authToken: - secret: "" - key: authToken - - serviceDeskEmail: - enabled: false - address: - host: - port: 993 - ssl: true - startTls: false - user: - password: - secret: "" - key: password - deleteAfterDelivery: true - expungeDeleted: false - logger: - logPath: "/dev/stdout" - mailbox: inbox - idleTimeout: 60 - inboxMethod: "imap" - clientSecret: - key: secret - pollInterval: 60 - deliveryMethod: webhook - authToken: - secret: "" - key: authToken - -hpa: - minReplicas: 1 - maxReplicas: 2 - cpu: - targetType: Utilization # Utilization or AverageValue - # targetAverageValue: 100m - targetAverageUtilization: 75 - # memory: - # targetType: Utilization # Utilization or AverageValue - # targetAverageValue: 1G - # targetAverageUtilization: 75 - # Note that the HPA is limited to autoscaling/v2beta1, autoscaling/v2beta2 and autoscaling/v2 - customMetrics: [] # Overrides HPA metrics definition - behavior: - scaleDown: - stabilizationWindowSeconds: 300 - -# Mailroom does not require inbound connections -# This service only requires outgoing connections to the -# IMAP service of choice, the provided or self hosted redis -# service, and DNS. -# An optimal configuration may look like the following: -# -#networkpolicy: -# enabled: true -# egress: -# enabled: true -# # The following rules enable traffic to all external -# # endpoints, except the local -# # network (except DNS requests) -# rules: -# - to: -# - ipBlock: -# cidr: 10.0.0.0/8 -# ports: -# - port: 53 -# protocol: UDP -# - to: -# - ipBlock: -# cidr: 10.0.0.0/8 -# ports: -# - port: 6379 -# protocol: TCP -# - to: -# - ipBlock: -# cidr: 10.0.0.0/8 -# ports: -# - port: 993 -# protocol: TCP - -networkpolicy: - enabled: false - egress: - enabled: false - rules: [] - ingress: - enabled: false - rules: [] - annotations: {} - -redis: - auth: {} - -resources: - # limits: - # cpu: 1 - # memory: 2G - requests: - cpu: 50m - memory: 150M - -## Allow to overwrite under which User and Group the Pod will be running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -## Allow to overwrite the specific security context under which the container is running. -containerSecurityContext: - runAsUser: 1000 - -## Enable deployment to use a serviceAccount -serviceAccount: - enabled: false - create: false - annotations: {} - ## Name to be used for serviceAccount, otherwise defaults to chart fullname - # name: - -deployment: - strategy: {} - -affinity: - podAntiAffinity: - topologyKey: - -# Priority class assigned to pods -priorityClassName: "" diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/migrations/Chart.yaml deleted file mode 100644 index 103ab26a1..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/Chart.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -appVersion: v16.0.1 -description: Database migrations and other versioning tasks for upgrading Gitlab -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: migrations -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/migrations -- https://gitlab.com/gitlab-org/build/CNG/tree/master/gitlab-rails -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/_helpers.tpl deleted file mode 100644 index c7ff8dccd..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/_helpers.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Create a default fully qualified job name. -Due to the job only being allowed to run once, we add the chart revision so helm -upgrades don't cause errors trying to create the already ran job. -Due to the helm delete not cleaning up these jobs, we add a randome value to -reduce collision -*/}} -{{- define "migrations.jobname" -}} -{{- $name := include "fullname" . | trunc 55 | trimSuffix "-" -}} -{{- printf "%s-%d" $name .Release.Revision | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/_jobspec.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/_jobspec.yaml deleted file mode 100644 index 2b0b62a26..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/_jobspec.yaml +++ /dev/null @@ -1,191 +0,0 @@ -{{- if .Values.enabled }} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.image -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -{{- include "database.datamodel.prepare" . -}} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "migrations.jobname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- if .Values.annotations }} - annotations: - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} -spec: - activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }} - backoffLimit: {{ .Values.backoffLimit }} - template: - metadata: - {{- if or .Values.PodAnnotations .Values.annotations}} - annotations: - {{- range $key, $value := merge .Values.podAnnotations (deepCopy .Values.annotations) }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - spec: - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - automountServiceAccountToken: false - {{- include "gitlab.priorityClassName" . | nindent 6 }} - initContainers: - {{- include "gitlab.extraInitContainers" . | nindent 8 }} - {{- include "gitlab.certificates.initContainer" . | nindent 8 }} - - name: configure - command: ['sh', '/config/configure'] - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" $ | indent 10 }} - env: - {{- include "gitlab.extraEnv" . | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 10 }} - {{- include "gitlab.psql.ssl.volumeMount" . | nindent 10 }} - {{- include "gitlab.geo.psql.ssl.volumeMount" . | nindent 10 }} - - name: migrations-config - mountPath: /config - readOnly: true - - name: init-migrations-secrets - mountPath: /init-config - readOnly: true - - name: migrations-secrets - mountPath: /init-secrets - readOnly: false - resources: - {{- toYaml .Values.init.resources | nindent 12 }} - restartPolicy: OnFailure - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - containers: - {{- include "gitlab.extraContainers" . | nindent 8 }} - - name: {{ .Chart.Name }} - image: "{{ coalesce .Values.image.repository (include "image.repository" .) }}:{{ coalesce .Values.image.tag (include "gitlab.versionTag" . ) }}{{ include "gitlab.image.tagSuffix" . }}" - args: - - /scripts/wait-for-deps - {{- if include "gitlab.geo.secondary" $ }} - - /scripts/geo-db-migrate - {{- else }} - - /scripts/db-migrate - {{- end}} - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" $ | indent 10 }} - env: - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/var/opt/gitlab/templates' - - name: CONFIG_DIRECTORY - value: '/srv/gitlab/config' - - name: BYPASS_SCHEMA_VERSION - value: 'true' - {{- if include "gitlab.geo.secondary" $ }} - - name: DB_SCHEMA_TARGET - value: 'geo' - {{- end }} - {{- if .Values.global.rails.bootsnap.enabled }} - - name: ENABLE_BOOTSNAP - value: '1' - {{- end }} - {{- include "gitlab.extraEnv" . | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - volumeMounts: - - name: migrations-config - mountPath: '/var/opt/gitlab/templates' - - name: migrations-secrets - mountPath: '/etc/gitlab' - readOnly: true - - name: migrations-secrets - mountPath: /srv/gitlab/config/secrets.yml - subPath: rails-secrets/secrets.yml - - name: migrations-secrets - mountPath: /srv/gitlab/config/initial_root_password - subPath: migrations/initial_root_password - - name: migrations-secrets - mountPath: /srv/gitlab/config/gitlab_shared_runners_registration_token - subPath: migrations/gitlab_shared_runners_registration_token - {{- if .Values.global.gitlab.license.secret }} - - name: migrations-secrets - mountPath: /srv/gitlab/config/Gitlab.gitlab-license - subPath: migrations/enterprise_license - {{- end }} - {{- include "gitlab.extraVolumeMounts" . | nindent 12 }} - {{- include "gitlab.certificates.volumeMount" . | nindent 12 }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - {{- include "gitlab.extraVolumes" . | nindent 6 }} - {{- include "gitlab.psql.ssl.volume" . | nindent 6 }} - {{- include "gitlab.geo.psql.ssl.volume" . | nindent 6 }} - - name: migrations-config - configMap: - name: {{ template "fullname" . }} - - name: init-migrations-secrets - projected: - defaultMode: 0400 - sources: - {{ if and (eq $.Values.global.pages.enabled true) (eq $.Values.global.pages.accessControl true) }} - - secret: - name: {{ template "oauth.gitlab-pages.secret" . }} - items: - - key: {{ template "oauth.gitlab-pages.appIdKey" . }} - path: oauth-secrets/gitlab-pages/appid - - key: {{ template "oauth.gitlab-pages.appSecretKey" . }} - path: oauth-secrets/gitlab-pages/appsecret - - configMap: - name: {{ template "fullname" . }} - items: - - key: pages_redirect_uri - path: oauth-secrets/gitlab-pages/redirecturi - {{- end }} - - secret: - name: {{ template "gitlab.rails-secrets.secret" . }} - items: - - key: secrets.yml - path: rails-secrets/secrets.yml - {{- include "gitlab.gitaly.clientSecrets" . | nindent 10 }} - {{- include "gitlab.redis.secrets" . | nindent 10 }} - {{- range $.Values.local.psql }} - {{- include "gitlab.psql.secret" . | nindent 10 }} - {{- end }} - {{- if include "gitlab.geo.secondary" $ }} - - secret: - name: {{ template "gitlab.geo.psql.password.secret" . }} - items: - - key: {{ template "gitlab.geo.psql.password.key" . }} - path: postgres/geo-psql-password - {{- end }} - - secret: - name: {{ template "gitlab.migrations.initialRootPassword.secret" . }} - items: - - key: {{ template "gitlab.migrations.initialRootPassword.key" . }} - path: migrations/initial_root_password - - secret: - name: {{ template "gitlab.gitlab-runner.registrationToken.secret" . }} - items: - - key: runner-registration-token - path: migrations/gitlab_shared_runners_registration_token - {{- if .Values.global.gitlab.license.secret }} - - secret: - name: {{ .Values.global.gitlab.license.secret }} - items: - - key: {{ template "gitlab.migrations.license.key" . }} - path: migrations/enterprise_license - {{- end }} - - name: migrations-secrets - emptyDir: - medium: "Memory" - {{- include "gitlab.certificates.volumes" . | nindent 6 }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/_serviceaccountspec.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/_serviceaccountspec.yaml deleted file mode 100644 index 16435d96b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/_serviceaccountspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 -}} - {{- include "gitlab.commonLabels" . | nindent 4 -}} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/configmap.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/configmap.yaml deleted file mode 100644 index 4ab214297..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/configmap.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- if .Values.enabled -}} -{{- include "database.datamodel.prepare" . -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - pages_redirect_uri: {{ template "oauth.gitlab-pages.authRedirectUri" . }} - installation_type: | - gitlab-helm-chart - database.yml.erb: | - {{- include "gitlab.database.yml" . | nindent 4 }} - {{- include "gitlab.rails.redis.all" . | nindent 2 }} - gitlab.yml.erb: | - production: &base - gitlab: - host: {{ template "gitlab.gitlab.hostname" . }} - {{- if hasKey .Values.global.appConfig.initialDefaults "signupEnabled" }} - signup_enabled: {{ .Values.global.appConfig.initialDefaults.signupEnabled }} - {{- end }} - {{- include "gitlab.appConfig.gitaly" . | nindent 6 }} - {{- include "gitlab.appConfig.repositories" . | nindent 6 }} - {{- include "gitlab.appConfig.sidekiq.configuration" $ | nindent 6 }} - {{- include "gitlab.geo.config" $ | nindent 6 }} - configure: | - {{- include "gitlab.scripts.configure.secrets" (dict "required" "rails-secrets migrations gitaly") | nindent 4 }} - {{- include "gitlab.psql.ssl.initScript" . | nindent 4 }} - {{- include "gitlab.geo.psql.ssl.initScript" . | nindent 4 }} -# Leave this here - This line denotes end of block to the parser. -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/job.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/job.yaml deleted file mode 100644 index 68f501c59..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/templates/job.yaml +++ /dev/null @@ -1,5 +0,0 @@ -{{- if and .Values.enabled }} -{{ include (print $.Template.BasePath "/_serviceaccountspec.yaml") . }} ---- -{{ include (print $.Template.BasePath "/_jobspec.yaml") . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/migrations/values.yaml deleted file mode 100644 index fbe04a8ea..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/migrations/values.yaml +++ /dev/null @@ -1,97 +0,0 @@ -# Default values for migrations. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -image: {} - # pullPolicy: IfNotPresent - # pullSecrets: [] - # repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-toolbox-ee - # tag: master - -init: - image: {} - # repository: - # tag: - resources: - requests: - cpu: 50m - containerSecurityContext: {} - -# Tolerations for pod scheduling -tolerations: [] - -# Annotations for the job -annotations: {} -# Annotations for the pod -podAnnotations: {} - -# Priority class assigned to pods -priorityClassName: "" - -# Labels for the job -podLabels: {} -common: - labels: {} - -enabled: true -initialRootPassword: {} -redis: - auth: {} -gitaly: - # host: '0.0.0.0' - # port: 8075 - # serviceName: 'gitaly' - authToken: {} - # secret: gitaly-secret - # key: token - -psql: {} - # port: 5432 - -global: - psql: {} - # host: '0.0.0.0' - # port: '5432' - # database: 'gitlabhq_production' - # username: 'gitlab' - # applicationName: - # preparedStatements: false - # databaseTasks: true - # password: - # secret: gitlab-postgres - # key: psql-password - # ssl: - # secret: gitlab-ssl-secret - # clientKey: client-key.pem - # clientCertificate: client-cert.pem - # serverCA: server-ca.pem - redis: - auth: {} - gitaly: - internal: - names: ["default"] - external: [] - authToken: {} -resources: - requests: - cpu: 250m - memory: 200Mi -activeDeadlineSeconds: 3600 -backoffLimit: 6 - -## Allow to overwrite under which User and Group the Pod will be running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -## Allow to overwrite the specific security context under which the container is running. -containerSecurityContext: - runAsUser: 1000 - -## Enable deployment to use a serviceAccount -serviceAccount: - enabled: false - create: false - annotations: {} - ## Name to be used for serviceAccount, otherwise defaults to chart fullname - # name: diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/praefect/Chart.yaml deleted file mode 100644 index ce7484777..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/Chart.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -appVersion: 16.0.1 -description: Praefect is a router and transaction manager for Gitaly, and a required - component for running a Gitaly Cluster. -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -- gitaly -- praefect -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: praefect -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/praefect -- https://gitlab.com/gitlab-org/build/CNG/tree/master/gitaly -- https://gitlab.com/gitlab-org/gitaly/-/tree/master/cmd/praefect -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/configmap.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/configmap.yaml deleted file mode 100644 index 80a962e59..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/configmap.yaml +++ /dev/null @@ -1,101 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - configure: | - set -e - mkdir -p /init-secrets/praefect - for f in gitaly_token praefect_token db_password - do - cp -v -r -L /init-config/${f} /init-secrets/praefect/${f} - done - {{- if $.Values.global.praefect.tls.enabled }} - cp -v -L /init-config/praefect.crt /init-secrets/praefect/praefect.crt - cp -v -L /init-config/praefect.key /init-secrets/praefect/praefect.key - {{- end }} - config.toml.erb: | - <% gitaly_token = File.read('/etc/gitlab-secrets/praefect/gitaly_token').strip.to_json %> - <% praefect_token = File.read('/etc/gitlab-secrets/praefect/praefect_token').strip.to_json %> - # TCP address to listen on - listen_addr = '0.0.0.0:{{ include "gitlab.praefect.internalPort" . }}' - - {{- if $.Values.global.praefect.tls.enabled }} - tls_listen_addr = '0.0.0.0:{{ include "gitlab.praefect.tls.internalPort" . }}' - {{- end }} - - {{- if .Values.metrics.enabled }} - prometheus_listen_addr = '0.0.0.0:{{ .Values.metrics.port }}' - {{- end }} - - prometheus_exclude_database_from_default_metrics = {{ eq true .Values.metrics.separate_database_metrics }} - - {{- if $.Values.global.praefect.tls.enabled }} - [tls] - certificate_path = '/etc/gitlab-secrets/praefect/praefect.crt' - key_path = '/etc/gitlab-secrets/praefect/praefect.key' - {{- end }} - - [failover] - enabled = {{ .Values.failover.enabled }} - read_only_after_failover = {{ .Values.failover.readonlyAfter }} - - [auth] - token = <%= praefect_token %> - transitioning = false - - [logging] - {{- with .Values.logging }} - {{- if .level }} - level = "{{ .level }}" - {{- end }} - {{- if .format }} - format = "{{ .format }}" - {{- end }} - {{- if .sentryDsn }} - sentry_dsn = "{{ .sentryDsn }}" - {{- end }} - {{- if .rubySentryDsn }} - ruby_sentry_dsn = "{{ .rubySentryDsn }}" - {{- end }} - dir = "/var/log/gitaly" - {{- if .sentryEnvironment }} - sentry_environment = "{{ .sentryEnvironment }}" - {{- end }} - {{- end }} - - {{- $scheme := "tcp" -}} - {{- $port := include "gitlab.gitaly.internalPort" $ -}} - {{- if $.Values.global.gitaly.tls.enabled -}} - {{- $scheme = "tls" -}} - {{- $port = include "gitlab.gitaly.tls.internalPort" $ -}} - {{- end -}} - {{- $globalContext := $ }} - {{ range $.Values.global.praefect.virtualStorages }} - {{- $storageName := .name }} - [[virtual_storage]] - name = '{{ $storageName }}' - {{- if .defaultReplicationFactor }} - default_replication_factor = {{ .defaultReplicationFactor }} - {{- end -}} - {{- range until (.gitalyReplicas | int) }} - [[virtual_storage.node]] - {{- $serviceName := include "gitlab.praefect.gitaly.serviceName" (dict "context" $globalContext "name" $storageName) -}} - {{- $podAddress := include "gitlab.praefect.gitaly.qualifiedServiceName" (dict "context" $globalContext "index" . "name" $storageName) }} - storage = '{{ $serviceName }}-{{ . }}' - address = '{{ printf "%s://%s.%s.svc:%s" $scheme $podAddress $globalContext.Release.Namespace $port }}' - token = <%= gitaly_token %> - {{- end }} - {{ end }} - - [database] - host = '{{ template "gitlab.praefect.psql.host" . }}' - port = {{ template "gitlab.praefect.psql.port" . }} - user = '{{ template "gitlab.praefect.psql.user" . }}' - password = <%= File.read("/etc/gitlab-secrets/praefect/db_password").strip.to_json %> - dbname = '{{ template "gitlab.praefect.psql.dbName" . }}' - sslmode = '{{ $.Values.global.praefect.psql.sslMode }}' diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/pdb.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/pdb.yaml deleted file mode 100644 index 1ce1142c2..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/pdb.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - maxUnavailable: {{ .Values.maxUnavailable }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} \ No newline at end of file diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/service.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/service.yaml deleted file mode 100644 index 0191ac9f0..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/service.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "gitlab.praefect.serviceName" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- include "gitlab.serviceLabels" . | nindent 4 }} - annotations: - {{- if .Values.metrics.enabled }} - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: "{{ .Values.metrics.metricsPort }}" - prometheus.io/scrape: "true" - prometheus.io/port: "{{ .Values.metrics.metricsPort }}" - {{- end }} - {{- include "gitlab.serviceAnnotations" . | nindent 4 }} -spec: - type: {{ coalesce .Values.service.type .Values.global.praefect.service.type }} - clusterIP: None - ports: - - name: grpc-{{ coalesce .Values.service.name .Values.global.praefect.service.name }} - port: {{ include "gitlab.praefect.externalPort" . }} - protocol: TCP - targetPort: {{ include "gitlab.praefect.internalPort" . }} - {{- if $.Values.global.praefect.tls.enabled }} - - name: tls-{{ coalesce .Values.service.name .Values.global.praefect.service.name }} - port: {{ include "gitlab.praefect.tls.externalPort" . }} - protocol: TCP - targetPort: {{ include "gitlab.praefect.tls.internalPort" . }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: http-metrics - port: {{ .Values.metrics.port }} - protocol: TCP - targetPort: http-metrics - {{- end }} - selector: - app: {{ template "name" . }} - release: {{ .Release.Name }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/serviceaccount.yaml deleted file mode 100644 index 16435d96b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 -}} - {{- include "gitlab.commonLabels" . | nindent 4 -}} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/servicemonitor.yaml deleted file mode 100644 index ebf28c04b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/servicemonitor.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled -}} -{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "gitlab.praefect.serviceName" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with .Values.metrics.serviceMonitor.additionalLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - endpoints: - - port: http-metrics - path: {{ .Values.metrics.path }} - {{- with .Values.metrics.serviceMonitor.endpointConfig }} - {{- toYaml . | nindent 6 }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/statefulset.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/statefulset.yaml deleted file mode 100644 index 6273df4ae..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/templates/statefulset.yaml +++ /dev/null @@ -1,180 +0,0 @@ -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.image -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - serviceName: {{ template "gitlab.praefect.serviceName" $ }} - replicas: {{ $.Values.replicas }} - podManagementPolicy: Parallel - {{- if .Values.statefulset.strategy }} - updateStrategy: {{ .Values.statefulset.strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if and .Values.metrics.enabled (not .Values.metrics.serviceMonitor.enabled) }} - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: {{ .Values.metrics.port | quote }} - gitlab.com/prometheus_path: {{ .Values.metrics.path }} - prometheus.io/scrape: "true" - prometheus.io/port: {{ .Values.metrics.port | quote }} - prometheus.io/path: {{ .Values.metrics.path }} - {{- end }} - spec: - {{- if eq (default .Values.global.antiAffinity .Values.antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- else if eq (default .Values.global.antiAffinity .Values.antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- end }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- include "gitlab.priorityClassName" . | nindent 6 }} - initContainers: - {{- include "gitlab.extraInitContainers" $ | nindent 8 }} - {{- include "gitlab.certificates.initContainer" $ | nindent 8 }} - - name: configure - command: ['sh', '/config/configure'] - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" .Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - env: - {{- include "gitlab.extraEnv" $ | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" $ | nindent 10 }} - - name: praefect-config - mountPath: /config - readOnly: true - - name: init-praefect-secrets - mountPath: /init-config - readOnly: true - - name: praefect-secrets - mountPath: /init-secrets - readOnly: false - resources: - {{- toYaml $.Values.init.resources | nindent 12 }} - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - containers: - {{- include "gitlab.extraContainers" . | nindent 6 }} - - name: {{ $.Chart.Name }} - image: "{{ $.Values.image.repository }}:{{ coalesce $.Values.image.tag (include "gitlab.parseAppVersion" (dict "appVersion" $.Chart.AppVersion "prepend" "true")) }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 8 }} - ports: - - containerPort: {{ include "gitlab.praefect.internalPort" $ }} - {{- if $.Values.global.praefect.tls.enabled }} - - containerPort: {{ include "gitlab.praefect.tls.internalPort" $ }} - {{- end }} - {{- if .Values.metrics.enabled }} - - containerPort: {{ .Values.metrics.port }} - name: http-metrics - {{- end }} - env: - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/etc/gitaly/templates' - - name: CONFIG_DIRECTORY - value: '/etc/gitaly' - - name: PRAEFECT_CONFIG_FILE - value: '/etc/gitaly/config.toml' - - name: SSL_CERT_DIR - value: '/etc/ssl/certs' - - name: PRAEFECT_PROMETHEUS_LISTEN_ADDR - value: ':{{ .Values.metrics.port }}' - - name: USE_PRAEFECT_SERVICE - value: '1' - - name: PRAEFECT_AUTO_MIGRATE - value: '{{ .Values.global.praefect.autoMigrate | int }}' - - name: NTP_HOST - value: '{{ .Values.global.praefect.ntpHost }}' - {{- include "gitlab.tracing.env" . | nindent 8 }} - {{- include "gitlab.extraEnv" . | nindent 8 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 8 }} - resources: - {{- toYaml .Values.resources | nindent 10 }} - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 10 }} - {{- include "gitlab.certificates.volumeMount" . | nindent 10 }} - - name: praefect-secrets - mountPath: /etc/gitlab-secrets - readOnly: true - - name: praefect-config - mountPath: /etc/gitaly/templates - dnsPolicy: ClusterFirst - restartPolicy: Always - terminationGracePeriodSeconds: 30 - volumes: - - configMap: - defaultMode: 420 - name: {{ template "fullname" . }} - name: praefect-config - - emptyDir: - medium: Memory - name: praefect-secrets - - name: init-praefect-secrets - projected: - defaultMode: 288 - sources: - - secret: - items: - - key: {{ template "gitlab.gitaly.authToken.key" . }} - path: gitaly_token - name: {{ template "gitlab.gitaly.authToken.secret" . }} - - secret: - items: - - key: {{ template "gitlab.praefect.authToken.key" . }} - path: praefect_token - name: {{ template "gitlab.praefect.authToken.secret" . }} - - secret: - items: - - key: {{ template "gitlab.praefect.dbSecret.key" . }} - path: db_password - name: {{ template "gitlab.praefect.dbSecret.secret" . }} - {{- if $.Values.global.praefect.tls.enabled }} - - secret: - name: {{ template "gitlab.praefect.tls.secret" $ }} - items: - - key: "tls.crt" - path: "praefect.crt" - - key: "tls.key" - path: "praefect.key" - {{- end }} - {{- include "gitlab.certificates.volumes" . | nindent 6 }} - diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/praefect/values.yaml deleted file mode 100644 index 51709376b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/praefect/values.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# Default values for praefect. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -failover: - enabled: true - readonlyAfter: true - -image: - repository: registry.gitlab.com/gitlab-org/build/cng/gitaly - # pullPolicy: IfNotPresent - # pullSecrets: [] - -service: - tls: {} - -init: - resources: {} - image: {} - # pullPolicy: IfNotPresent - -metrics: - enabled: true - port: 9236 - separate_database_metrics: true - path: /metrics - serviceMonitor: - enabled: false - additionalLabels: {} - endpointConfig: {} - -## Allow to overwrite under which User and Group we're running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -replicas: 2 - -resources: - requests: - cpu: 100m - memory: 200Mi - -## For PodDisruptionBudget, how many pods can be unavailable at one time -maxUnavailable: 1 - -serviceAccount: - enabled: false - create: false - annotations: {} - ## Name to be used for serviceAccount, otherwise defaults to chart fullname - # name: - -## Support for tolerations for pod scheduling -tolerations: [] - -## The Gitaly StatefulSet's priorityClassName -# priorityClassName: - -gitaly: - service: - tls: {} - # serviceName: - -common: - labels: {} -podLabels: {} -serviceLabels: {} - -statefulset: - strategy: {} - -affinity: - podAntiAffinity: - topologyKey: diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/Chart.yaml deleted file mode 100644 index a49301b2c..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/Chart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -appVersion: v16.0.1 -description: Gitlab Sidekiq for asynchronous task processing in rails -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -- sidekiq -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: sidekiq -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/sidekiq -- https://gitlab.com/gitlab-org/build/CNG/tree/master/gitlab-sidekiq -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/_helpers.tpl deleted file mode 100644 index 312b33570..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/_helpers.tpl +++ /dev/null @@ -1,57 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Returns the extraEnv keys and values to inject into containers. Allows -pod-level values for extraEnv. - -Takes a dict with `local` being the pod-level configuration and `parent` -being the chart-level configuration. - -Pod values take precedence, then chart values, and finally global -values. -*/}} -{{- define "sidekiq.podExtraEnv" -}} -{{- $allExtraEnv := merge (default (dict) .local.extraEnv) (default (dict) .context.Values.extraEnv) .context.Values.global.extraEnv -}} -{{- range $key, $value := $allExtraEnv }} -- name: {{ $key }} - value: {{ $value | quote }} -{{- end -}} -{{- end -}} - -{{/* -Returns a list of _common_ labels to be shared across all -Sidekiq deployments and other shared objects, otherwise -known as pods currently. -*/}} -{{- define "sidekiq.commonLabels" -}} -{{- $commonPodLabels := merge (default (dict) .pod) (default (dict) .global) -}} -{{- range $key, $value := $commonPodLabels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} - -{{/* -Returns a list of _pod_ labels to be shared across all -Sidekiq deployments, otherwise known as pods currently. -*/}} -{{- define "sidekiq.podLabels" -}} -{{- $commonPodLabels := default (dict) .pod -}} -{{- range $key, $value := $commonPodLabels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} - -{{/* -Create a datamodel for our common labels -*/}} -{{- define "sidekiq.pod.common.labels" -}} -{{- $default := dict "labels" (dict) -}} -{{- $_ := set . "common" (merge (default (dict) .common) $default) -}} -{{- end -}} - -{{/* -Return the sidekiq-metrics TLS secret name -*/}} -{{- define "sidekiq-metrics.tls.secret" -}} -{{- default (printf "%s-sidekiq-metrics-tls" .Release.Name) $.Values.metrics.tls.secretName | quote -}} -{{- end -}} \ No newline at end of file diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/configmap.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/configmap.yaml deleted file mode 100644 index e8c5ffbd1..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/configmap.yaml +++ /dev/null @@ -1,149 +0,0 @@ -{{- if .Values.enabled -}} -{{- include "database.datamodel.prepare" . -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - installation_type: | - gitlab-helm-chart - database.yml.erb: | - {{- include "gitlab.database.yml" . | nindent 4 }} - krb5.conf: | - {{- .Values.global.appConfig.kerberos.krb5Config | nindent 4 }} - smtp_settings.rb: | - {{- include "gitlab.smtp_settings" . | nindent 4 }} - {{- include "gitlab.rails.redis.all" . | nindent 2 }} - gitlab.yml.erb: | - production: &base - gitlab: - host: {{ template "gitlab.gitlab.hostname" . }} - https: {{ hasPrefix "https://" (include "gitlab.gitlab.url" .) }} - {{- with .Values.global.hosts.ssh }} - ssh_host: {{ . | quote }} - {{- end }} - {{- with .Values.global.appConfig }} - {{- if .cdnHost }} - cdn_host: {{ .cdnHost | quote }} - {{- end }} - max_request_duration_seconds: {{ default (include "gitlab.appConfig.maxRequestDurationSeconds" $) .maxRequestDurationSeconds }} - impersonation_enabled: {{ .enableImpersonation }} - application_settings_cache_seconds: {{ .applicationSettingsCacheSeconds | int }} - usage_ping_enabled: {{ eq .enableUsagePing true }} - seat_link_enabled: {{ eq .enableSeatLink true }} - username_changing_enabled: {{ eq .usernameChangingEnabled true }} - issue_closing_pattern: {{ .issueClosingPattern | quote }} - default_theme: {{ .defaultTheme }} - {{- include "gitlab.appConfig.defaultProjectsFeatures.configuration" $ | nindent 8 }} - {{- if hasKey .initialDefaults "signupEnabled" }} - signup_enabled: {{ .initialDefaults.signupEnabled }} - {{- end }} - webhook_timeout: {{ .webhookTimeout }} - {{- end }} - trusted_proxies: - {{- if .Values.trusted_proxies }} - {{- toYaml .Values.trusted_proxies | nindent 10 }} - {{- end }} - time_zone: {{ .Values.global.time_zone | quote }} - {{- include "gitlab.outgoing_email_settings" . | indent 8 }} - {{- with .Values.global.appConfig }} - {{- if .microsoft_graph_mailer.enabled }} - {{- include "gitlab.appConfig.microsoft_graph_mailer" . | nindent 6 }} - {{- end }} - {{- if .incomingEmail.enabled }} - {{- include "gitlab.appConfig.incoming_email" . | nindent 6 }} - {{- end }} - {{- if .serviceDeskEmail.enabled }} - {{- include "gitlab.appConfig.service_desk_email" . | nindent 6 }} - {{- end }} - {{- include "gitlab.appConfig.cronJobs" . | nindent 6 }} - gravatar: - plain_url: {{ .gravatar.plainUrl }} - ssl_url: {{ .gravatar.sslUrl }} - {{- include "gitlab.appConfig.extra" . | nindent 6 }} - {{- end }} - - {{- if $.Values.global.appConfig.object_store.enabled }} - # Consolidated object storage configuration - ## property local configuration will override object_store - {{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "object_store" "config" $.Values.global.appConfig.object_store "context" $) | nindent 6 }} - objects: - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "artifacts" "config" $.Values.global.appConfig.artifacts) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "uploads" "config" $.Values.global.appConfig.uploads) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "packages" "config" $.Values.global.appConfig.packages) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "terraform_state" "config" $.Values.global.appConfig.terraformState) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "ci_secure_files" "config" $.Values.global.appConfig.ciSecureFiles) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "dependency_proxy" "config" $.Values.global.appConfig.dependencyProxy) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "pages" "config" $.Values.global.pages.objectStore) | nindent 10 -}} - {{- end }} - {{- include "gitlab.appConfig.artifacts.configuration" (dict "config" $.Values.global.appConfig.artifacts "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.lfs.configuration" (dict "config" $.Values.global.appConfig.lfs "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.uploads.configuration" (dict "config" $.Values.global.appConfig.uploads "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.packages.configuration" (dict "config" $.Values.global.appConfig.packages "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.external_diffs.configuration" (dict "config" $.Values.global.appConfig.externalDiffs "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.terraformState.configuration" (dict "config" $.Values.global.appConfig.terraformState "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.ciSecureFiles.configuration" (dict "config" $.Values.global.appConfig.ciSecureFiles "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.dependencyProxy.configuration" (dict "config" $.Values.global.appConfig.dependencyProxy "context" $) | nindent 6 }} - {{- include "gitlab.geo.config" $ | nindent 6 }} - {{- include "gitlab.appConfig.sentry.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.sidekiq.configuration" $ | nindent 6 }} - {{- include "gitlab.pages.config" $ | nindent 6 }} - mattermost: - enabled: false - ## Registry Integration - {{- include "gitlab.appConfig.registry.configuration" $ | nindent 6 }} - gitlab_ci: - {{- include "gitlab.appConfig.ldap.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.omniauth.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.kerberos.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.duo.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.duo.configuration" $ | nindent 6 }} - shared: - {{- include "gitlab.appConfig.gitaly" . | nindent 6 }} - {{- include "gitlab.appConfig.repositories" . | nindent 6 }} - backup: - path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/) - {{- include "gitlab.appConfig.kas" . | nindent 6 }} - {{- include "gitlab.appConfig.suggested_reviewers" . | nindent 6 }} - {{- include "gitlab.appConfig.shell" . | nindent 6 }} - {{- include "gitlab.appConfig.shell.ssh_port" . | nindent 8 }} - workhorse: - git: - bin_path: /usr/bin/git - webpack: - monitoring: - ip_whitelist: - - 127.0.0.0/8 - sidekiq_exporter: - {{- if .Values.metrics.enabled }} - enabled: true - address: 0.0.0.0 - port: {{ .Values.metrics.port }} - log_enabled: {{ .Values.metrics.log_enabled }} - {{- if $.Values.metrics.tls.enabled }} - tls_enabled: true - tls_cert_path: "/etc/gitlab/sidekiq-metrics/sidekiq-metrics.crt" - tls_key_path: "/etc/gitlab/sidekiq-metrics/sidekiq-metrics.key" - {{- end }} - {{- end }} - sidekiq_health_checks: - enabled: true - address: 0.0.0.0 - port: {{ .Values.health_checks.port }} - configure: | - {{- include "gitlab.scripts.configure.secrets" (dict "required" "gitaly registry rails-secrets") | nindent 4 }} - {{- if $.Values.metrics.tls.enabled }} - mkdir -p /init-secrets/sidekiq-metrics - cp -v -L /init-config/sidekiq-metrics/sidekiq-metrics.crt /init-secrets/sidekiq-metrics/sidekiq-metrics.crt - cp -v -L /init-config/sidekiq-metrics/sidekiq-metrics.key /init-secrets/sidekiq-metrics/sidekiq-metrics.key - {{- end }} - {{- include "gitlab.psql.ssl.initScript" . | nindent 4 }} - {{- include "gitlab.geo.psql.ssl.initScript" . | nindent 4 }} -# Leave this here - This line denotes end of block to the parser. -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/deployment.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/deployment.yaml deleted file mode 100644 index 495835994..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/deployment.yaml +++ /dev/null @@ -1,389 +0,0 @@ -{{- if .Values.enabled -}} -{{- $imageCfg := dict "global" $.Values.global.image "local" $.Values.image -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -{{- include "database.datamodel.prepare" $ -}} -{{- $chart := printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" -}} -{{- $name := default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- $releaseName := .Release.Name -}} -{{- $releaseService := .Release.Service -}} -{{- $fullname := include "fullname" . -}} -{{- $image := (printf "%s:%s%s" (coalesce .Values.image.repository (include "image.repository" .)) (coalesce .Values.image.tag (include "gitlab.versionTag" . )) (include "gitlab.image.tagSuffix" .)) | toString -}} -{{- $concurrency := .Values.concurrency -}} -{{- $timeout := .Values.timeout -}} -{{- $resources := .Values.resources -}} -{{- $nodeSelector := default .Values.global.nodeSelector .Values.nodeSelector -}} -{{- $tolerations := .Values.tolerations -}} -{{- $minioEnabled := .Values.global.minio.enabled -}} -{{- $minioSecret := include "gitlab.minio.credentials.secret" . -}} -{{- $railsSecretName := include "gitlab.rails-secrets.secret" . -}} -{{- $metricsEnabled := .Values.metrics.enabled -}} -{{- $metricsPort := .Values.metrics.port -}} -{{- $metricsPath := .Values.metrics.path -}} -{{- $healthChecksPort := .Values.health_checks.port -}} -{{- $configMapChecksum := include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} -{{- range .Values.pods -}} -{{- $queueName := printf "%s-%s" $fullname .name | trunc 63 }} -{{- $podNodeSelector := default $nodeSelector .nodeSelector -}} -{{- $tolerations := default $tolerations .tolerations -}} -{{- include "sidekiq.pod.common.labels" . }} -{{- $_ := set . "podLabels" (merge (default (dict) .podLabels) (default (dict) $.Values.podLabels) (default (dict) $.Values.global.pod.labels)) -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ printf "%s-v2" ($queueName | trunc 60) }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "sidekiq.commonLabels" (dict "pod" .common.labels "global" $.Values.common.labels) | nindent 4 }} - queue-pod-name: {{ .name }} - annotations: - {{- include "gitlab.deploymentAnnotations" $ | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "gitlab.selectorLabels" $ | nindent 6 }} - queue-pod-name: {{ .name }} - {{- if or $.Values.deployment.strategy .strategy}} - strategy: {{ default $.Values.deployment.strategy .strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" $ | nindent 8 }} - {{- include "sidekiq.commonLabels" (dict "pod" .common.labels "global" $.Values.common.labels) | nindent 8 }} - {{- include "sidekiq.podLabels" (dict "pod" .podLabels ) | nindent 8 }} - queue-pod-name: {{ .name }} - annotations: - checksum/configmap: {{ $configMapChecksum }} - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" - {{- range $key, $value := $.Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if and $metricsEnabled (not $.Values.metrics.podMonitor.enabled) }} - {{- if $.Values.metrics.annotations }} - {{- toYaml $.Values.metrics.annotations | nindent 8 }} - {{- else }} - {{- if $.Values.metrics.tls.enabled }} - gitlab.com/prometheus_scheme: "https" - prometheus.io/scheme: "https" - {{- end }} - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: {{ $metricsPort | quote }} - gitlab.com/prometheus_path: {{ $metricsPath }} - prometheus.io/scrape: "true" - prometheus.io/port: {{ $metricsPort | quote }} - prometheus.io/path: {{ $metricsPath }} - {{- end }} - {{- end }} - spec: - {{- with $tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- $priorityClassName := dict "Values" (dict "global" (dict "priorityClassName" $.Values.global.priorityClassName) "priorityClassName" $.Values.priorityClassName) -}} - {{- include "gitlab.priorityClassName" $priorityClassName | nindent 6 }} - {{- include "gitlab.podSecurityContext" $.Values.securityContext | nindent 6 }} - {{- if eq (default $.Values.global.antiAffinity .antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default $.Values.global.affinity.podAntiAffinity.topologyKey $.Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" $ | nindent 18 }} - queue-pod-name: {{ .name }} - {{- else if eq (default $.Values.global.antiAffinity .antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default $.Values.global.affinity.podAntiAffinity.topologyKey $.Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" $ | nindent 18 }} - {{- end }} - {{- if or $.Values.serviceAccount.enabled $.Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" $ }} - {{- end }} - automountServiceAccountToken: false - terminationGracePeriodSeconds: {{ int (default $.Values.deployment.terminationGracePeriodSeconds .terminationGracePeriodSeconds) }} - initContainers: - {{- include "gitlab.extraInitContainers" $ | nindent 8 }} - {{- include "gitlab.certificates.initContainer" $ | nindent 8 }} - - name: configure - command: ['sh', '/config/configure'] - image: {{ include "gitlab.busybox.image" (dict "local" $.Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" $ | indent 10 }} - env: - {{- include "gitlab.extraEnv" $ | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 10 }} - volumeMounts: - {{- tpl (default "" .extraVolumeMounts) $ | nindent 10 }} - {{- include "gitlab.extraVolumeMounts" $ | nindent 10 }} - {{- include "gitlab.psql.ssl.volumeMount" $ | nindent 10 }} - {{- include "gitlab.geo.psql.ssl.volumeMount" $ | nindent 10 }} - - name: sidekiq-config - mountPath: /config - readOnly: true - - name: init-sidekiq-secrets - mountPath: /init-config - readOnly: true - - name: sidekiq-secrets - mountPath: /init-secrets - readOnly: false - resources: - {{- toYaml $.Values.init.resources | nindent 12 }} - - name: dependencies - image: "{{ $image }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" $ | indent 10 }} - args: - - /scripts/wait-for-deps - env: - - name: GITALY_FEATURE_DEFAULT_ON - value: "1" - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/var/opt/gitlab/templates' - - name: CONFIG_DIRECTORY - value: '/srv/gitlab/config' - - name: SIDEKIQ_CONCURRENCY - value: {{ default $concurrency .concurrency | quote }} - - name: SIDEKIQ_TIMEOUT - value: {{ default $timeout .timeout | quote }} - {{- if $.Values.global.rails.bootsnap.enabled }} - - name: ENABLE_BOOTSNAP - value: "1" - {{- end }} - {{- include "gitlab.extraEnv" $ | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - volumeMounts: - {{- tpl (default "" .extraVolumeMounts) $ | nindent 10 }} - {{- include "gitlab.extraVolumeMounts" $ | nindent 10 }} - {{- include "gitlab.certificates.volumeMount" $ | nindent 10 }} - - name: sidekiq-config - mountPath: '/var/opt/gitlab/templates' - readOnly: true - - name: sidekiq-secrets - mountPath: '/etc/gitlab' - readOnly: true - - name: sidekiq-secrets - mountPath: /srv/gitlab/config/secrets.yml - subPath: rails-secrets/secrets.yml - readOnly: true - resources: - {{- toYaml $.Values.init.resources | nindent 12 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - containers: - {{- include "gitlab.extraContainers" $ | nindent 8 }} - - name: {{ $name }} - image: "{{ $image }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" $ | indent 10 }} - env: - {{- if $metricsEnabled }} - - name: prometheus_multiproc_dir - value: /metrics - {{- end }} - - name: GITALY_FEATURE_DEFAULT_ON - value: "1" - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/var/opt/gitlab/templates' - - name: CONFIG_DIRECTORY - value: '/srv/gitlab/config' - - name: SIDEKIQ_QUEUE_SELECTOR - value: {{ include "gitlab.boolean.local" (dict "global" $.Values.queueSelector "local" .queueSelector "default" false) | quote }} - - name: SIDEKIQ_CONCURRENCY - value: {{ default $concurrency .concurrency | quote }} - - name: SIDEKIQ_TIMEOUT - value: {{ default $timeout .timeout | quote }} - - name: SIDEKIQ_QUEUES - value: {{ default $.Values.queues .queues | quote | nospace }} - - name: SIDEKIQ_NEGATE_QUEUES - value: {{ default $.Values.negateQueues .negateQueues | quote | nospace }} - - name: SIDEKIQ_DAEMON_MEMORY_KILLER - value: {{ int $.Values.memoryKiller.daemonMode | quote }} - {{- with default $.Values.memoryKiller .memoryKiller }} - - name: SIDEKIQ_MEMORY_KILLER_CHECK_INTERVAL - value: {{ int .checkInterval | quote }} - - name: SIDEKIQ_MEMORY_KILLER_MAX_RSS - value: {{ int .maxRss | quote }} - {{- if .hardLimitRss }} - - name: SIDEKIQ_MEMORY_KILLER_HARD_LIMIT_RSS - value: {{ int .hardLimitRss | quote }} - {{- end }} - - name: SIDEKIQ_MEMORY_KILLER_GRACE_TIME - value: {{ int .graceTime | quote }} - - name: SIDEKIQ_MEMORY_KILLER_SHUTDOWN_WAIT - value: {{ int .shutdownWait | quote }} - {{- end }} - {{- if $.Values.global.rails.bootsnap.enabled }} - - name: ENABLE_BOOTSNAP - value: "1" - {{- end }} - {{- include "gitlab.tracing.env" $ | nindent 12 }} - {{- include "sidekiq.podExtraEnv" (dict "local" . "context" $) | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} - {{- if $metricsEnabled }} - ports: - - containerPort: {{ $metricsPort }} - name: http-metrics - {{- end }} - volumeMounts: - {{- tpl (default "" .extraVolumeMounts) $ | nindent 10 }} - {{- include "gitlab.extraVolumeMounts" $ | nindent 10 }} - {{- if $metricsEnabled }} - - name: sidekiq-metrics - mountPath: '/metrics' - {{- end }} - - name: sidekiq-config - mountPath: '/var/opt/gitlab/templates' - readOnly: true - - name: sidekiq-secrets - mountPath: '/etc/gitlab' - readOnly: true - - name: sidekiq-secrets - mountPath: /srv/gitlab/config/secrets.yml - subPath: rails-secrets/secrets.yml - - name: sidekiq-config - mountPath: '/etc/krb5.conf' - subPath: krb5.conf - {{- include "gitlab.appConfig.kerberos.volumeMount" $ | nindent 10 }} - - name: sidekiq-config - mountPath: '/srv/gitlab/config/initializers/smtp_settings.rb' - subPath: smtp_settings.rb - - name: sidekiq-config - mountPath: '/srv/gitlab/INSTALLATION_TYPE' - subPath: installation_type -{{- if $.Values.global.email.smime.enabled }} - - name: smime-creds - mountPath: /home/git/gitlab - readOnly: true -{{- end }} - {{- include "gitlab.certificates.volumeMount" $ | nindent 10 }} - livenessProbe: - httpGet: - path: /liveness - port: {{ $healthChecksPort }} - initialDelaySeconds: {{ $.Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ $.Values.livenessProbe.periodSeconds }} - timeoutSeconds: {{ $.Values.livenessProbe.timeoutSeconds }} - successThreshold: {{ $.Values.livenessProbe.successThreshold }} - failureThreshold: {{ $.Values.livenessProbe.failureThreshold }} - readinessProbe: - httpGet: - path: /readiness - port: {{ $healthChecksPort }} - initialDelaySeconds: {{ $.Values.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ $.Values.readinessProbe.periodSeconds }} - timeoutSeconds: {{ $.Values.readinessProbe.timeoutSeconds }} - successThreshold: {{ $.Values.readinessProbe.successThreshold }} - failureThreshold: {{ $.Values.readinessProbe.failureThreshold }} - lifecycle: - preStop: - exec: - command: ["/bin/bash", "-c", "pkill -f 'sidekiq'"] - resources: - {{- toYaml ( default $resources .resources ) | nindent 12 }} - volumes: - {{- tpl (default "" .extraVolumes) $ | nindent 6 }} - {{- include "gitlab.extraVolumes" $ | nindent 6 }} - {{- include "gitlab.psql.ssl.volume" $ | nindent 6 }} - {{- include "gitlab.geo.psql.ssl.volume" $ | nindent 6 }} - {{- include "gitlab.appConfig.kerberos.volume" $ | nindent 6 }} - {{- if $metricsEnabled }} - - name: sidekiq-metrics - emptyDir: - medium: "Memory" - {{- end }} - - name: sidekiq-config - projected: - sources: - - configMap: - name: {{ $fullname }} - - name: init-sidekiq-secrets - projected: - defaultMode: 0400 - sources: - - secret: - name: {{ $railsSecretName }} - items: - - key: secrets.yml - path: rails-secrets/secrets.yml - {{- if $.Values.metrics.tls.enabled }} - - secret: - name: {{ template "sidekiq-metrics.tls.secret" $ }} - items: - - key: "tls.crt" - path: "sidekiq-metrics/sidekiq-metrics.crt" - - key: "tls.key" - path: "sidekiq-metrics/sidekiq-metrics.key" - {{- end }} - {{- include "gitlab.gitaly.clientSecrets" $ | nindent 10 }} - {{- include "gitlab.redis.secrets" $ | nindent 10 }} - {{- range $.Values.local.psql }} - {{- include "gitlab.psql.secret" . | nindent 10 }} - {{- end }} - {{- if include "gitlab.geo.secondary" $ }} - - secret: - name: {{ template "gitlab.geo.psql.password.secret" $ }} - items: - - key: {{ template "gitlab.geo.psql.password.key" $ }} - path: postgres/geo-psql-password - {{- end }} - - secret: - name: {{ template "gitlab.registry.certificate.secret" $ }} - items: - - key: registry-auth.key - path: registry/gitlab-registry.key - {{- include "gitlab.registry.notificationSecret.mount" $ | nindent 10 -}} - {{- include "gitlab.pages.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.kas.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.suggestedReviewers.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.minio.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "object_store" "config" $.Values.global.appConfig.object_store) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "artifacts" "config" $.Values.global.appConfig.artifacts) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "uploads" "config" $.Values.global.appConfig.uploads) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "packages" "config" $.Values.global.appConfig.packages) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "terraform_state" "config" $.Values.global.appConfig.terraformState) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "ci_secure_files" "config" $.Values.global.appConfig.ciSecureFiles) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "dependency_proxy" "config" $.Values.global.appConfig.dependencyProxy) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "pages" "config" $.Values.global.pages.objectStore) | nindent 10 }} - {{- include "gitlab.appConfig.ldap.servers.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.duo.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.omniauth.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.microsoftGraphMailer.mountSecrets" $ | nindent 10 }} - {{- if and $.Values.global.smtp.enabled $.Values.global.smtp.authentication }} - - secret: - name: {{ $.Values.global.smtp.password.secret | required "Missing required secret containing the SMTP password. Make sure to set `global.smtp.password.secret`" }} - items: - - key: {{ $.Values.global.smtp.password.key }} - path: smtp/smtp-password - {{- end }} -{{- if $.Values.global.email.smime.enabled }} - - name: smime-creds - projected: - defaultMode: 0400 - sources: - - secret: - name: {{ $.Values.global.email.smime.secretName }} - items: - - key: {{ $.Values.global.email.smime.keyName }} - path: .gitlab_smime_key - - key: {{ $.Values.global.email.smime.certName }} - path: .gitlab_smime_cert -{{- end }} - - name: sidekiq-secrets - emptyDir: - medium: "Memory" - {{- include "gitlab.certificates.volumes" $ | nindent 6 }} - {{- if $podNodeSelector }} - nodeSelector: - {{- toYaml $podNodeSelector | nindent 8 }} - {{- end }} ---- -{{ end }} -{{ end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/hpa.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/hpa.yaml deleted file mode 100644 index 741924322..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/hpa.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if .Values.enabled -}} -{{- $name := default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- $releaseName := .Release.Name -}} -{{- $fullname := printf "%s-%s" $releaseName $name | trunc 63 | trimSuffix "-" -}} -{{- range .Values.pods -}} -{{- $queueName := printf "%s-%s" $fullname .name | trunc 63 }} -{{- $hpa := merge (default dict .hpa) $.Values.hpa }} -{{- $hpaCfg := (dict "global" $.Values.global.hpa "local" $hpa "context" $) }} -{{- include "sidekiq.pod.common.labels" . }} ---- -apiVersion: {{ template "gitlab.hpa.apiVersion" $hpaCfg }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ printf "%s-v2" ($queueName | trunc 60) }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "sidekiq.commonLabels" (dict "pod" .common.labels "global" $.Values.common.labels) | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ printf "%s-v2" ($queueName | trunc 60) }} - minReplicas: {{ default $.Values.minReplicas .minReplicas }} - maxReplicas: {{ default $.Values.maxReplicas .maxReplicas }} - {{- include "gitlab.hpa.metrics" $hpaCfg | nindent 2 }} - {{- include "gitlab.hpa.behavior" $hpaCfg | nindent 2 }} -{{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/networkpolicy.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/networkpolicy.yaml deleted file mode 100644 index 023923364..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/networkpolicy.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.enabled -}} -{{- if .Values.networkpolicy.enabled -}} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ template "fullname" . }}-v1 - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{ toYaml .Values.networkpolicy.annotations | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - policyTypes: - {{- if .Values.networkpolicy.egress.enabled }} - - Egress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - - Ingress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - ingress: - {{ toYaml .Values.networkpolicy.ingress.rules | nindent 4 }} - {{- end -}} - {{- if .Values.networkpolicy.egress.enabled }} - egress: - {{ toYaml .Values.networkpolicy.egress.rules | nindent 4 }} - {{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/pdb.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/pdb.yaml deleted file mode 100644 index 08762e795..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/pdb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.enabled -}} -{{- $name := default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- $releaseName := .Release.Name -}} -{{- $fullname := printf "%s-%s" $releaseName $name | trunc 63 | trimSuffix "-" -}} -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -{{- range .Values.pods -}} -{{- $queueName := printf "%s-%s" $fullname .name | trunc 63}} -{{- include "sidekiq.pod.common.labels" . }} ---- -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - name: {{ printf "%s-v1" ($queueName | trunc 60) }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "sidekiq.commonLabels" (dict "pod" .common.labels "global" $.Values.common.labels) | nindent 4 }} -spec: - maxUnavailable: {{ default $.Values.maxUnavailable .maxUnavailable }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" $ | nindent 6 }} - queue-pod-name: {{ .name }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/podmonitor.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/podmonitor.yaml deleted file mode 100644 index 9ea151ff2..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/podmonitor.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.enabled .Values.metrics.enabled .Values.metrics.podMonitor.enabled -}} -{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}} -apiVersion: monitoring.coreos.com/v1 -kind: PodMonitor -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with .Values.metrics.podMonitor.additionalLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - podMetricsEndpoints: - - port: http-metrics - path: {{ .Values.metrics.path }} - {{- with .Values.metrics.podMonitor.endpointConfig }} - {{- toYaml . | nindent 6 }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/serviceaccount.yaml deleted file mode 100644 index 16435d96b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 -}} - {{- include "gitlab.commonLabels" . | nindent 4 -}} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/values.yaml deleted file mode 100644 index 87a03cf15..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/sidekiq/values.yaml +++ /dev/null @@ -1,341 +0,0 @@ -# Default values for sidekiq. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -image: {} - # pullPolicy: IfNotPresent - # pullSecrets: [] - # repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-sidekiq-ee - # tag: master - -init: - image: {} - # repository: - # tag: - # pullPolicy: IfNotPresent - resources: - requests: - cpu: 50m - containerSecurityContext: {} - -# Node labels for pod assignment -# nodeSelector: {} - -# Tolerations for pod scheduling -tolerations: [] - -enabled: true -queueSelector: false - -annotations: {} -podLabels: {} -common: - labels: {} - -logging: - # set to "json" for json - # structured logs - format: "json" - -networkpolicy: - enabled: false - egress: - enabled: false - rules: [] - ingress: - enabled: false - rules: [] - annotations: {} - -metrics: - enabled: true - port: 3807 - path: /metrics - log_enabled: false - podMonitor: - enabled: false - additionalLabels: {} - endpointConfig: {} - # DEPRECATED - annotations: {} - tls: - enabled: false - # secretName: - -health_checks: - port: 3808 - -redis: - auth: {} - -psql: {} - # port: 5432 - -# https://docs.gitlab.com/ee/administration/operations/sidekiq_memory_killer.html#sidekiq-memorykiller -memoryKiller: - daemonMode: true - maxRss: 2000000 - graceTime: 900 - shutdownWait: 30 - checkInterval: 3 - #hardLimitRss: 3000000 - -livenessProbe: - initialDelaySeconds: 20 - periodSeconds: 60 - timeoutSeconds: 30 - successThreshold: 1 - failureThreshold: 3 -readinessProbe: - initialDelaySeconds: 0 - periodSeconds: 10 - timeoutSeconds: 2 - successThreshold: 1 - failureThreshold: 3 - -global: - hosts: - domain: example.com - hostSuffix: - https: true - gitlab: {} - #name: gitlab.example.com - #https: false - registry: {} - #name: registry.example.com - #https: false - minio: {} - #name: minio.example.com - #https: false - psql: {} - # host: '0.0.0.0' - # port: '5432' - # database: 'gitlabhq_production' - # username: 'gitlab' - # applicationName: - # preparedStatements: false - # databaseTasks: true - # password: - # secret: gitlab-postgres - # key: psql-password - # ssl: - # secret: gitlab-ssl-secret - # clientKey: client-key.pem - # clientCertificate: client-cert.pem - # serverCA: server-ca.pem - redis: - auth: {} - gitaly: - internal: - names: ["default"] - external: [] - authToken: {} - webservice: {} - minio: - enabled: - credentials: {} - appConfig: - microsoft_graph_mailer: - enabled: false - incomingEmail: - enabled: false - address: - serviceDeskEmail: - enabled: false - address: - lfs: - enabled: true - proxy_download: true - bucket: - connection: {} - artifacts: - enabled: true - proxy_download: true - bucket: - connection: {} - uploads: - enabled: true - proxy_download: true - bucket: - connection: {} - packages: - enabled: true - proxy_download: true - bucket: - connection: {} - externalDiffs: - when: - proxy_download: true - bucket: - connection: {} - terraformState: - enabled: false - bucket: - connection: {} - dependencyProxy: - enabled: false - proxy_download: true - bucket: - connection: {} - ldap: - servers: {} - # 'main' is the GitLab 'provider ID' of this LDAP server - # main: - # label: 'LDAP' - # host: '_your_ldap_server' - # port: 636 - # uid: 'sAMAccountName' - # bind_dn: '_the_full_dn_of_the_user_you_will_bind_with' - # password: '_the_password_of_the_bind_user' - # encryption: 'plain' - omniauth: - enabled: false - autoSignInWithProvider: - syncProfileFromProvider: [] - syncProfileAttributes: ['email'] - allowSingleSignOn: ['saml'] - blockAutoCreatedUsers: true - autoLinkLdapUser: false - autoLinkSamlUser: false - autoLinkUser: [] - externalProviders: [] - allowBypassTwoFactor: [] - providers: [] - # - secret: gitlab-google-oauth2 - # key: provider - sentry: - enabled: false - dsn: - clientside_dsn: - environment: - -gitaly: - # host: '0.0.0.0' - # port: 8075 - # serviceName: 'gitaly' - authToken: {} - # secret: gitaly-secret - # key: token -minio: - serviceName: 'minio-svc' - port: 9000 - -extra: {} - -## Additional environment variables to set -## Note that these will be applied to every -## container in the pod. -extraEnv: {} -# extraEnv: -# SOMEKEY: SOMEVALUE -# SOMEKEY2: SOMEVALUE2 - -rack_attack: - git_basic_auth: - enabled: false - # enabled: true - # ip_whitelist: ["127.0.0.1"] - # maxretry: 10 - # findtime: 60 - # bantime: 3600 - -trusted_proxies: [] - -# Global defaults -minReplicas: 1 -maxReplicas: 10 -concurrency: 20 - -# `deployment.strategy` is utilized to configure the desired upgrade approach and -# configuration for the deployment. See the Kubernetes documentation -# related to this subject. -# https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy -deployment: - strategy: {} - terminationGracePeriodSeconds: 30 - -hpa: - # targetAverageValue: 350m # DEPRECATED: in favor of `hpa.cpu.targetAverageValue` below - cpu: - targetType: AverageValue # Utilization or AverageValue - targetAverageValue: 350m - # targetAverageUtilization: 75 - # memory: - # targetType: Utilization # Utilization or AverageValue - # targetAverageValue: 1G - # targetAverageUtilization: 75 - # Note that the HPA is limited to autoscaling/v2beta1, autoscaling/v2beta2 and autoscaling/v2 - customMetrics: [] # Overrides HPA metrics definition - behavior: - scaleDown: - stabilizationWindowSeconds: 300 - -timeout: 25 -resources: - # limits: - # memory: 5G - requests: - cpu: 900m - memory: 2G -maxUnavailable: 1 - -# Define queue groups into Pods -pods: - - name: all-in-1 - # concurrency: 20 - # memoryKiller: - # maxRss: 2000000 - # graceTime: 900 - # shutdownWait: 30 - # checkInterval: 3 - # minReplicas: 1 - # maxReplicas: 10 - # strategy: {} - # queues: '' - # extraVolumes - # extraVolumeMounts - # priorityClassName: "" - # hpa: - # cpu: - # targetType: AverageValue - # targetAverageValue: - # targetAverageUtilization: - # memory: - # targetType: AverageValue - # targetAverageValue: - # targetAverageUtilization: - # customMetrics: [] - # behavior: - # scaleDown: - # stabilizationWindowSeconds: - # common: - # labels: {} - # podLabels: {} - # terminationGracePeriodSeconds: 30 - # nodeSelector: {} - # tolerations: [] - -## Allow to overwrite under which User and Group the Pod will be running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -## Allow to overwrite the specific security context under which the container is running. -containerSecurityContext: - runAsUser: 1000 - -## Enable deployment to use a serviceAccount -serviceAccount: - enabled: false - create: false - annotations: {} - ## Name to be used for serviceAccount, otherwise defaults to chart fullname - # name: - -## Allow configuring pods' priorityClassName. This is used to control pod priority in case of eviction: -# https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ -priorityClassName: "" - -affinity: - podAntiAffinity: - topologyKey: diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/Chart.yaml deleted file mode 100644 index f6d0478f6..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -appVersion: 1.2.3 -description: GitLab Anti-Spam Engine -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -- spamcheck -- anti-spam engine -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: spamcheck -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/spamcheck -- https://gitlab.com/gitlab-org/spamcheck -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/configmap.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/configmap.yaml deleted file mode 100644 index 3799e86d4..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/configmap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.global.spamcheck.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - # See https://gitlab.com/gitlab-org/spamcheck/-/blob/main/config/config.example.yml - config.yaml: | - grpc_addr: {{ .Values.service.internalPort | quote }} - log_level: {{ .Values.logging.level | quote }} - filter: - allowList: {} - denyList: {} - allowed_domains: {} - -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/deployment.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/deployment.yaml deleted file mode 100644 index a4c388627..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/deployment.yaml +++ /dev/null @@ -1,111 +0,0 @@ -{{- if .Values.global.spamcheck.enabled -}} -{{- $imageCfg := dict "global" $.Values.global.image "local" $.Values.image -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.deploymentAnnotations" $ | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - {{- if .Values.deployment.strategy }} - strategy: {{ .Values.deployment.strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") $ | sha256sum }} - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - automountServiceAccountToken: false - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- if eq (default .Values.global.antiAffinity .Values.antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- else if eq (default .Values.global.antiAffinity .Values.antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 18 }} - {{- end }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - {{- include "gitlab.priorityClassName" . | nindent 6 }} - initContainers: - {{- include "gitlab.extraInitContainers" . | nindent 8 }} - {{- include "gitlab.certificates.initContainer" $ | nindent 8 }} - containers: - {{- include "gitlab.extraContainers" . | nindent 8 }} - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ coalesce .Values.image.tag (include "gitlab.parseAppVersion" (dict "appVersion" .Chart.AppVersion "prepend" "false")) }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - ports: - - name: grpc - containerPort: {{ $.Values.service.internalPort }} - env: - {{- include "gitlab.extraEnv" . | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - name: spamcheck-config-volume - mountPath: /app/config - {{- include "gitlab.certificates.volumeMount" . | nindent 12 }} - {{- include "gitlab.extraVolumeMounts" . | nindent 12 }} - livenessProbe: - exec: - command: ["health-check", "--liveness"] - initialDelaySeconds: {{ .Values.deployment.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.deployment.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.deployment.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.deployment.livenessProbe.failureThreshold }} - readinessProbe: - exec: - command: ["health-check", "--readiness"] - initialDelaySeconds: {{ .Values.deployment.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.deployment.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.deployment.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.deployment.readinessProbe.failureThreshold }} - volumes: - {{- include "gitlab.extraVolumes" $ | nindent 6 }} - - name: spamcheck-config-volume - configMap: - name: {{ template "fullname" . }} - - name: spamcheck-data-volume - emptyDir: - medium: "Memory" - {{- include "gitlab.certificates.volumes" . | nindent 6 }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/hpa.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/hpa.yaml deleted file mode 100644 index c946fa198..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/hpa.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.global.spamcheck.enabled -}} -{{- $hpaCfg := (dict "global" $.Values.global.hpa "local" .Values.hpa "context" $) -}} ---- -apiVersion: {{ template "gitlab.hpa.apiVersion" $hpaCfg }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "fullname" . }} - minReplicas: {{ .Values.hpa.minReplicas | int }} - maxReplicas: {{ .Values.hpa.maxReplicas | int }} - {{- include "gitlab.hpa.metrics" $hpaCfg | nindent 2 }} - {{- include "gitlab.hpa.behavior" $hpaCfg | nindent 2 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/pdb.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/pdb.yaml deleted file mode 100644 index c1d00ccd2..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/pdb.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.global.spamcheck.enabled -}} -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - maxUnavailable: {{ .Values.maxUnavailable }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/service.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/service.yaml deleted file mode 100644 index a7fd06676..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/service.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.global.spamcheck.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "gitlab.spamcheck.serviceName" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- include "gitlab.serviceLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.serviceAnnotations" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - protocol: TCP - name: grpc - selector: - {{- include "gitlab.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/serviceaccount.yaml deleted file mode 100644 index 6ac1e35c7..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and .Values.global.spamcheck.enabled $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 -}} - {{- include "gitlab.commonLabels" . | nindent 4 -}} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/values.yaml deleted file mode 100644 index 84eaffb6a..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/spamcheck/values.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# Default values for spamcheck. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -annotations: {} -# global: -# spamcheck: -# enabled: false - -hpa: - maxReplicas: 10 - minReplicas: 1 - # targetAverageValue: 100m # DEPRECATED: in favor of `hpa.cpu.targetAverageValue` below - cpu: - targetType: AverageValue # Utilization or AverageValue - targetAverageValue: 100m - # targetAverageUtilization: 75 - # memory: - # targetType: Utilization # Utilization or AverageValue - # targetAverageValue: 1G - # targetAverageUtilization: 75 - # Note that the HPA is limited to autoscaling/v2beta1, autoscaling/v2beta2 and autoscaling/v2 - customMetrics: [] # Overrides HPA metrics definition - behavior: - scaleDown: - stabilizationWindowSeconds: 300 - -image: - repository: registry.gitlab.com/gitlab-com/gl-security/engineering-and-research/automation-team/spam/spamcheck - -service: - type: ClusterIP - externalPort: 8001 - internalPort: 8001 - -deployment: - livenessProbe: - initialDelaySeconds: 20 - periodSeconds: 60 - timeoutSeconds: 30 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - initialDelaySeconds: 0 - periodSeconds: 10 - timeoutSeconds: 2 - successThreshold: 1 - failureThreshold: 3 - strategy: {} - -init: - resources: - requests: - cpu: 50m - -logging: - level: "info" - -## For PodDisruptionBudget, how many pods can be unavailable at one time -maxUnavailable: 1 - -# Priority class assigned to pods -priorityClassName: "" - -podLabels: {} -common: - labels: {} -serviceLabels: {} - -resources: - requests: - cpu: 100m - memory: 100M - -## Enable deployment to use a serviceAccount -serviceAccount: - enabled: false - create: false - -# Tolerations for pod scheduling -tolerations: [] - -## Allow to overwrite under which User and Group we're running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -affinity: - podAntiAffinity: - topologyKey: - diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/Chart.yaml deleted file mode 100644 index c8239ff42..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/Chart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -appVersion: v16.0.1 -description: For manually running rake tasks through kubectl -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -- rake -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: toolbox -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/toolbox -- https://gitlab.com/gitlab-org/build/CNG/tree/master/gitlab-toolbox -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/_helpers.tpl deleted file mode 100644 index 62a85a4cd..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/_helpers.tpl +++ /dev/null @@ -1,67 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{- define "toolbox.backups.cron.persistence.persistentVolumeClaim" -}} -metadata: -{{- if not .Values.backups.cron.persistence.useGenericEphemeralVolume }} - name: {{ template "fullname" . }}-backup-tmp - namespace: {{ $.Release.Namespace }} -{{- end }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - accessModes: - - {{ .Values.backups.cron.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.backups.cron.persistence.size | quote }} -{{- if .Values.backups.cron.persistence.volumeName }} - volumeName: {{ .Values.backups.cron.persistence.volumeName }} -{{- end }} -{{- if .Values.backups.cron.persistence.storageClass }} -{{- if (eq "-" .Values.backups.cron.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.backups.cron.persistence.storageClass }}" -{{- end -}} -{{- end }} - selector: -{{- if .Values.backups.cron.persistence.matchLabels }} - matchLabels: - {{- toYaml .Values.backups.cron.persistence.matchLabels | nindent 6 }} -{{- end -}} -{{- if .Values.backups.cron.persistence.matchExpressions }} - matchExpressions: - {{- toYaml .Values.backups.cron.persistence.matchExpressions | nindent 6 }} -{{- end -}} -{{- end -}} - -{{/* -Returns the secret configuring access to the object storage for backups. - -Usage: - {{ include "toolbox.backups.objectStorage.config.secret" .Values.backups.objectStorage }} - -*/}} -{{- define "toolbox.backups.objectStorage.config.secret" -}} -{{- if eq .backend "gcs" -}} -- secret: - name: {{ .config.secret }} - items: - - key: {{ default "config" .config.key }} - path: objectstorage/{{ default "config" .config.key }} -{{- else if eq .backend "azure" -}} -- secret: - name: {{ .config.secret }} - items: - - key: {{ default "config" .config.key }} - path: objectstorage/azure_config -{{- else -}} -- secret: - name: {{ .config.secret }} - items: - - key: {{ default "config" .config.key }} - path: objectstorage/.s3cfg -{{- end -}} -{{- end -}} - diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/backup-job.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/backup-job.yaml deleted file mode 100644 index 2e35ea024..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/backup-job.yaml +++ /dev/null @@ -1,227 +0,0 @@ -{{- if and .Values.enabled .Values.backups.cron.enabled }} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.image -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -{{- include "database.datamodel.prepare" . -}} -{{ if or ($.Capabilities.APIVersions.Has "batch/v1/CronJob") (eq $.Values.global.batch.cronJob.apiVersion "batch/v1") -}} -apiVersion: batch/v1 -{{- else -}} -apiVersion: batch/v1beta1 -{{- end }} -kind: CronJob -metadata: - name: {{ template "fullname" . }}-backup - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - concurrencyPolicy: {{ .Values.backups.cron.concurrencyPolicy }} - failedJobsHistoryLimit: {{ .Values.backups.cron.failedJobsHistoryLimit }} - schedule: {{ .Values.backups.cron.schedule | quote }} - startingDeadlineSeconds: {{ .Values.backups.cron.startingDeadlineSeconds }} - successfulJobsHistoryLimit: {{ .Values.backups.cron.successfulJobsHistoryLimit }} - suspend: {{ .Values.backups.cron.suspend }} - jobTemplate: - spec: - backoffLimit: {{ .Values.backups.cron.backoffLimit }} - {{- if .Values.backups.cron.activeDeadlineSeconds }} - activeDeadlineSeconds: {{ .Values.backups.cron.activeDeadlineSeconds }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 12 }} - {{- include "gitlab.commonLabels" . | nindent 12 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - cluster-autoscaler.kubernetes.io/safe-to-evict: {{ .Values.backups.cron.safeToEvict | quote }} - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - restartPolicy: {{ .Values.backups.cron.restartPolicy }} - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 12 }} - {{- end }} - securityContext: - runAsUser: {{ .Values.securityContext.runAsUser }} - fsGroup: {{ .Values.securityContext.fsGroup }} - {{- if not (empty .Values.securityContext.fsGroupChangePolicy) }} - fsGroupChangePolicy: {{ .Values.securityContext.fsGroupChangePolicy }} - {{- end }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - {{- include "gitlab.priorityClassName" . | nindent 10 }} - initContainers: - {{- include "gitlab.extraInitContainers" . | nindent 12 }} - {{- include "gitlab.certificates.initContainer" . | nindent 12 }} - - name: configure - command: ['sh', '/config/configure'] - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 14 }} - env: - {{- include "gitlab.extraEnv" $ | nindent 16 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 16 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 16 }} - {{- include "gitlab.psql.ssl.volumeMount" . | nindent 16 }} - - name: toolbox-config - mountPath: /config - readOnly: true - - name: init-toolbox-secrets - mountPath: /init-config - readOnly: true - - name: toolbox-secrets - mountPath: /init-secrets - readOnly: false - resources: - {{- toYaml .Values.init.resources | nindent 16 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 10 }} - containers: - {{- include "gitlab.extraContainers" . | nindent 12 }} - - name: {{ .Chart.Name }}-backup - args: - - /bin/bash - - -c - {{- if eq .Values.backups.objectStorage.backend "s3" }} - - cp /etc/gitlab/.s3cfg $HOME/.s3cfg && backup-utility {{ .Values.backups.cron.extraArgs }} # alpine sleep has no infinity - {{- else if eq .Values.backups.objectStorage.backend "gcs" }} - - sh /var/opt/gitlab/templates/configure-gsutil && backup-utility {{ .Values.backups.cron.extraArgs }} - {{- else if eq .Values.backups.objectStorage.backend "azure" }} - - backup-utility {{ .Values.backups.cron.extraArgs }} - {{- end }} - image: "{{ coalesce .Values.image.repository (include "image.repository" .) }}:{{ coalesce .Values.image.tag (include "gitlab.versionTag" . ) }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 14 }} - env: - {{- include "gitlab.extraEnv" $ | nindent 16 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 16 }} - - name: ARTIFACTS_BUCKET_NAME - value: {{ .Values.global.appConfig.artifacts.bucket }} - - name: REGISTRY_BUCKET_NAME - value: {{ .Values.global.registry.bucket }} - - name: LFS_BUCKET_NAME - value: {{ .Values.global.appConfig.lfs.bucket }} - - name: UPLOADS_BUCKET_NAME - value: {{ .Values.global.appConfig.uploads.bucket }} - - name: PACKAGES_BUCKET_NAME - value: {{ .Values.global.appConfig.packages.bucket }} - - name: EXTERNAL_DIFFS_BUCKET_NAME - value: {{ .Values.global.appConfig.externalDiffs.bucket }} - - name: TERRAFORM_STATE_BUCKET_NAME - value: {{ .Values.global.appConfig.terraformState.bucket }} - - name: CI_SECURE_FILES_BUCKET_NAME - value: {{ .Values.global.appConfig.ciSecureFiles.bucket }} - - name: BACKUP_BUCKET_NAME - value: {{ .Values.global.appConfig.backups.bucket }} - - name: BACKUP_BACKEND - value: {{ .Values.backups.objectStorage.backend }} - - name: TMP_BUCKET_NAME - value: {{ .Values.global.appConfig.backups.tmpBucket }} - - name: PAGES_BUCKET_NAME - value: {{ .Values.global.pages.objectStore.bucket }} - - name: GITALY_FEATURE_DEFAULT_ON - value: "1" - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/var/opt/gitlab/templates' - - name: CONFIG_DIRECTORY - value: '/srv/gitlab/config' - {{- if eq .Values.backups.objectStorage.backend "gcs" }} - - name: GOOGLE_APPLICATION_CREDENTIALS - value: '/etc/gitlab/objectstorage/{{ default "config" .Values.backups.objectStorage.config.key }}' - {{- end }} - {{- if eq .Values.backups.objectStorage.backend "azure" }} - - name: AZURE_CONFIG_FILE - value: '/etc/gitlab/objectstorage/azure_config' - {{- end }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 16 }} - - name: toolbox-config - mountPath: '/var/opt/gitlab/templates' - - name: toolbox-secrets - mountPath: '/etc/gitlab' - readOnly: true - - name: toolbox-secrets - mountPath: /srv/gitlab/config/secrets.yml - subPath: rails-secrets/secrets.yml - - name: toolbox-tmp - mountPath: '/srv/gitlab/tmp' - {{- if and .Values.backups.cron.persistence.enabled .Values.backups.cron.persistence.subPath }} - subPath: "{{ .Values.backups.cron.persistence.subPath }}" - {{- end }} - readOnly: false - {{- include "gitlab.certificates.volumeMount" . | nindent 16 }} - resources: - {{- toYaml .Values.backups.cron.resources | nindent 16 }} - volumes: - {{- include "gitlab.extraVolumes" . | nindent 12 }} - {{- include "gitlab.psql.ssl.volume" . | nindent 12 }} - - name: toolbox-config - projected: - sources: - - configMap: - name: {{ template "fullname" . }} - - name: toolbox-tmp - {{- if .Values.backups.cron.persistence.enabled }} - {{- if .Values.backups.cron.persistence.useGenericEphemeralVolume }} - ephemeral: - volumeClaimTemplate: - {{- include "toolbox.backups.cron.persistence.persistentVolumeClaim" . | nindent 18 }} - {{- else }} - persistentVolumeClaim: - claimName: {{ template "fullname" . }}-backup-tmp - {{- end }} - {{- else }} - emptyDir: {} - {{- end }} - - name: init-toolbox-secrets - projected: - defaultMode: 0400 - sources: - - secret: - name: {{ template "gitlab.rails-secrets.secret" . }} - items: - - key: secrets.yml - path: rails-secrets/secrets.yml - - secret: - name: {{ template "gitlab.gitlab-shell.authToken.secret" . }} - items: - - key: {{ template "gitlab.gitlab-shell.authToken.key" . }} - path: shell/.gitlab_shell_secret - {{- include "gitlab.gitaly.clientSecrets" . | nindent 16 }} - {{- include "gitlab.redis.secrets" . | nindent 16 }} - {{- range $.Values.local.psql }} - {{- include "gitlab.psql.secret" . | nindent 16 }} - {{- end }} - - secret: - name: {{ template "gitlab.registry.certificate.secret" . }} - items: - - key: registry-auth.key - path: registry/gitlab-registry.key - {{- include "gitlab.registry.notificationSecret.mount" $ | nindent 16 -}} - {{- if or .Values.backups.objectStorage.config (not .Values.global.minio.enabled) }} - {{- include "toolbox.backups.objectStorage.config.secret" .Values.backups.objectStorage | nindent 16 }} - {{- end }} - {{- include "gitlab.kas.mountSecrets" $ | nindent 16 }} - {{- include "gitlab.pages.mountSecrets" $ | nindent 16 }} - {{- include "gitlab.minio.mountSecrets" $ | nindent 16 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "object_store" "config" $.Values.global.appConfig.object_store) | nindent 16 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "artifacts" "config" $.Values.global.appConfig.artifacts) | nindent 16 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs) | nindent 16 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "uploads" "config" $.Values.global.appConfig.uploads) | nindent 16 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "packages" "config" $.Values.global.appConfig.packages) | nindent 16 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs) | nindent 16 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "terraform_state" "config" $.Values.global.appConfig.terraformState) | nindent 16 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "ci_secure_files" "config" $.Values.global.appConfig.ciSecureFiles) | nindent 16 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "dependency_proxy" "config" $.Values.global.appConfig.dependencyProxy) | nindent 16 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "pages" "config" $.Values.global.pages.objectStore) | nindent 16 }} - {{- include "gitlab.appConfig.ldap.servers.mountSecrets" $ | nindent 16 }} - {{- include "gitlab.appConfig.omniauth.mountSecrets" $ | nindent 16 }} - {{- include "gitlab.appConfig.microsoftGraphMailer.mountSecrets" $ | nindent 16 }} - - name: toolbox-secrets - emptyDir: - medium: "Memory" - {{- include "gitlab.certificates.volumes" . | nindent 12 }} - {{- include "gitlab.nodeSelector" . | nindent 10 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/configmap.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/configmap.yaml deleted file mode 100644 index 62aee8fe5..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/configmap.yaml +++ /dev/null @@ -1,155 +0,0 @@ -{{- if .Values.enabled -}} -{{- include "database.datamodel.prepare" . -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - database.yml.erb: | - {{- include "gitlab.database.yml" . | nindent 4 }} - krb5.conf: | - {{- .Values.global.appConfig.kerberos.krb5Config | nindent 4 }} - smtp_settings.rb: | - {{- include "gitlab.smtp_settings" . | nindent 4 }} - {{- include "gitlab.rails.redis.all" . | nindent 2 }} - gitlab.yml.erb: | - production: &base - gitlab: - host: {{ template "gitlab.gitlab.hostname" . }} - https: {{ hasPrefix "https://" (include "gitlab.gitlab.url" .) }} - {{- with .Values.global.hosts.ssh }} - ssh_host: {{ . | quote }} - {{- end }} - {{- with .Values.global.appConfig }} - {{- if .cdnHost }} - cdn_host: {{ .cdnHost | quote }} - {{- end }} - max_request_duration_seconds: {{ default (include "gitlab.appConfig.maxRequestDurationSeconds" $) .maxRequestDurationSeconds }} - impersonation_enabled: {{ .enableImpersonation }} - application_settings_cache_seconds: {{ .applicationSettingsCacheSeconds | int }} - usage_ping_enabled: {{ eq .enableUsagePing true }} - seat_link_enabled: {{ eq .enableSeatLink true }} - username_changing_enabled: {{ eq .usernameChangingEnabled true }} - issue_closing_pattern: {{ .issueClosingPattern | quote }} - default_theme: {{ .defaultTheme }} - {{- include "gitlab.appConfig.defaultProjectsFeatures.configuration" $ | nindent 8 }} - {{- if hasKey .initialDefaults "signupEnabled" }} - signup_enabled: {{ .initialDefaults.signupEnabled }} - {{- end }} - webhook_timeout: {{ .webhookTimeout }} - {{- end }} - trusted_proxies: - {{- if .Values.trusted_proxies }} - {{- toYaml .Values.trusted_proxies | nindent 10 }} - {{- end }} - time_zone: {{ .Values.global.time_zone | quote }} - {{- include "gitlab.outgoing_email_settings" . | indent 8 }} - {{- with .Values.global.appConfig }} - {{- if .microsoft_graph_mailer.enabled }} - {{- include "gitlab.appConfig.microsoft_graph_mailer" . | nindent 6 }} - {{- end }} - {{- include "gitlab.appConfig.cronJobs" . | nindent 6 }} - {{- end }} - - {{- if $.Values.global.appConfig.object_store.enabled }} - # Consolidated object storage configuration - ## property local configuration will override object_store - {{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "object_store" "config" $.Values.global.appConfig.object_store "context" $) | nindent 6 }} - objects: - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "artifacts" "config" $.Values.global.appConfig.artifacts) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "uploads" "config" $.Values.global.appConfig.uploads) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "packages" "config" $.Values.global.appConfig.packages) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "terraform_state" "config" $.Values.global.appConfig.terraformState) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "ci_secure_files" "config" $.Values.global.appConfig.ciSecureFiles) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "dependency_proxy" "config" $.Values.global.appConfig.dependencyProxy) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "pages" "config" $.Values.global.pages.objectStore) | nindent 10 -}} - {{- end }} - {{- include "gitlab.appConfig.artifacts.configuration" (dict "config" $.Values.global.appConfig.artifacts "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.lfs.configuration" (dict "config" $.Values.global.appConfig.lfs "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.uploads.configuration" (dict "config" $.Values.global.appConfig.uploads "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.packages.configuration" (dict "config" $.Values.global.appConfig.packages "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.external_diffs.configuration" (dict "config" $.Values.global.appConfig.externalDiffs "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.terraformState.configuration" (dict "config" $.Values.global.appConfig.terraformState "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.ciSecureFiles.configuration" (dict "config" $.Values.global.appConfig.ciSecureFiles "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.dependencyProxy.configuration" (dict "config" $.Values.global.appConfig.dependencyProxy "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.sidekiq.configuration" $ | nindent 6 }} - {{- include "gitlab.geo.config" $ | nindent 6 }} - {{- include "gitlab.pages.config" $ | nindent 6 }} - mattermost: - enabled: false - ## Registry Integration - {{- include "gitlab.appConfig.registry.configuration" $ | nindent 6 }} - gitlab_ci: - {{- include "gitlab.appConfig.ldap.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.omniauth.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.kerberos.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.duo.configuration" $ | nindent 6 }} - shared: - {{- include "gitlab.appConfig.gitaly" . | nindent 6 }} - {{- include "gitlab.appConfig.repositories" . | nindent 6 }} - backup: - path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/) - {{- include "gitlab.appConfig.kas" . | nindent 6 }} - {{- include "gitlab.appConfig.suggested_reviewers" . | nindent 6 }} - {{- include "gitlab.appConfig.shell" . | nindent 6 }} - {{- include "gitlab.appConfig.shell.ssh_port" . | nindent 8 }} - {{- include "gitlab.appConfig.shell.secret_file" . | nindent 8 }} - workhorse: - git: - bin_path: /usr/bin/git - webpack: - monitoring: - ip_whitelist: - - 127.0.0.0/8 - sidekiq_exporter: - extra: - {{- if .Values.extra }} - {{- toYaml .Values.extra | nindent 8 }} - {{- end }} - configure: | - {{- include "gitlab.scripts.configure.secrets" (dict "required" "shell gitaly registry rails-secrets") | nindent 4 }} - {{- include "gitlab.psql.ssl.initScript" . | nindent 4 }} - {{- include "gitlab.geo.psql.ssl.initScript" . | nindent 4 }} - - {{- if eq .Values.backups.objectStorage.backend "s3" }} - if [ ! -f "/${secret_dir}/objectstorage/.s3cfg" ]; then - cat < "/${secret_dir}/.s3cfg" - [default] - access_key = $(cat /init-secrets/minio/accesskey) - secret_key = $(cat /init-secrets/minio/secretkey) - bucket_location = us-east-1 - host_base = {{ template "gitlab.minio.hostname" . }} - host_bucket = {{ template "gitlab.minio.hostname" . }}/%(bucket) - default_mime_type = binary/octet-stream - enable_multipart = True - multipart_max_chunks = 10000 - multipart_chunk_size_mb = 128 - recursive = True - recv_chunk = 65536 - send_chunk = 65536 - server_side_encryption = False - signature_v2 = True - socket_timeout = 300 - use_mime_magic = False - verbosity = WARNING - website_endpoint = {{ template "gitlab.minio.url" . }} - EOF - else - mv "/${secret_dir}/objectstorage/.s3cfg" "/${secret_dir}/.s3cfg" - fi - {{- end }} - configure-gsutil: | - # The following script is used to configure gsutil when creating backups - # It provides inputs to the `gsutil config -e` prompt as follows: - # 1) Path to service account JSON key file - # 2) Do not set permissions for key file - # 3) GCP Project ID - # 4) Decline anonymous usage statistics - printf "$GOOGLE_APPLICATION_CREDENTIALS\nN\n{{ .Values.backups.objectStorage.config.gcpProject }}\nN\n" | gsutil config -e -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/deployment.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/deployment.yaml deleted file mode 100644 index 24da57095..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/deployment.yaml +++ /dev/null @@ -1,283 +0,0 @@ -{{- if .Values.enabled }} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.image -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -{{- include "database.datamodel.prepare" . -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.deploymentAnnotations" . | nindent 4 }} -spec: - replicas: {{ .Values.replicas | int }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" . | nindent 6 }} - {{- if .Values.deployment.strategy }} - strategy: {{ .Values.deployment.strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - automountServiceAccountToken: false - {{- include "gitlab.priorityClassName" . | nindent 6 }} - initContainers: - {{- include "gitlab.extraInitContainers" . | nindent 8 }} - {{- include "gitlab.certificates.initContainer" . | nindent 8 }} - - name: configure - command: ['sh', '/config/configure'] - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" . | indent 10 }} - env: - {{- include "gitlab.extraEnv" . | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 10 }} - {{- include "gitlab.psql.ssl.volumeMount" . | nindent 10 }} - {{- include "gitlab.geo.psql.ssl.volumeMount" . | nindent 10 }} - - name: toolbox-config - mountPath: /config - readOnly: true - - name: init-toolbox-secrets - mountPath: /init-config - readOnly: true - - name: toolbox-secrets - mountPath: /init-secrets - readOnly: false - resources: - {{- toYaml .Values.init.resources | nindent 12 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - {{- if .Values.antiAffinityLabels.matchLabels }} - {{- if eq (default .Values.global.antiAffinity .Values.antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- toYaml .Values.antiAffinityLabels.matchLabels | nindent 18 }} - release: {{ .Release.Name }} - {{- else if eq (default .Values.global.antiAffinity .Values.antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- toYaml .Values.antiAffinityLabels.matchLabels | nindent 18 }} - release: {{ .Release.Name }} - {{- end }} - {{- end }} - containers: - {{- include "gitlab.extraContainers" . | nindent 8 }} - - name: {{ .Chart.Name }} - args: - - /bin/bash - - -c - {{- if eq .Values.backups.objectStorage.backend "s3" }} - - cp -v -r -L /etc/gitlab/.s3cfg $HOME/.s3cfg && while sleep 3600; do :; done # alpine sleep has no infinity - {{- else if eq .Values.backups.objectStorage.backend "gcs" }} - - sh /var/opt/gitlab/templates/configure-gsutil && while sleep 3600; do :; done - {{- else if eq .Values.backups.objectStorage.backend "azure" }} - - while sleep 3600; do :; done - {{- end }} - image: "{{ coalesce .Values.image.repository (include "image.repository" .) }}:{{ coalesce .Values.image.tag (include "gitlab.versionTag" . ) }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" . | indent 10 }} - env: - - name: ARTIFACTS_BUCKET_NAME - value: {{ .Values.global.appConfig.artifacts.bucket }} - - name: REGISTRY_BUCKET_NAME - value: {{ .Values.global.registry.bucket }} - - name: LFS_BUCKET_NAME - value: {{ .Values.global.appConfig.lfs.bucket }} - - name: UPLOADS_BUCKET_NAME - value: {{ .Values.global.appConfig.uploads.bucket }} - - name: PACKAGES_BUCKET_NAME - value: {{ .Values.global.appConfig.packages.bucket }} - - name: EXTERNAL_DIFFS_BUCKET_NAME - value: {{ .Values.global.appConfig.externalDiffs.bucket }} - - name: TERRAFORM_STATE_BUCKET_NAME - value: {{ .Values.global.appConfig.terraformState.bucket }} - - name: CI_SECURE_FILES_BUCKET_NAME - value: {{ .Values.global.appConfig.ciSecureFiles.bucket }} - - name: BACKUP_BUCKET_NAME - value: {{ .Values.global.appConfig.backups.bucket }} - - name: BACKUP_BACKEND - value: {{ .Values.backups.objectStorage.backend }} - - name: TMP_BUCKET_NAME - value: {{ .Values.global.appConfig.backups.tmpBucket }} - - name: PAGES_BUCKET_NAME - value: {{ .Values.global.pages.objectStore.bucket }} - - name: GITALY_FEATURE_DEFAULT_ON - value: "1" - {{- if .Values.global.rails.bootsnap.enabled }} - - name: ENABLE_BOOTSNAP - value: "1" - {{- end }} - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/var/opt/gitlab/templates' - - name: CONFIG_DIRECTORY - value: '/srv/gitlab/config' - {{- if eq .Values.backups.objectStorage.backend "gcs" }} - - name: GOOGLE_APPLICATION_CREDENTIALS - value: '/etc/gitlab/objectstorage/{{ default "config" .Values.backups.objectStorage.config.key }}' - {{- end }} - {{- if eq .Values.backups.objectStorage.backend "azure" }} - - name: AZURE_CONFIG_FILE - value: '/etc/gitlab/objectstorage/azure_config' - {{- end }} - {{- include "gitlab.extraEnv" . | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" . | nindent 12 }} - - name: toolbox-config - mountPath: '/var/opt/gitlab/templates' - - name: toolbox-config - mountPath: '/etc/krb5.conf' - subPath: krb5.conf - {{- include "gitlab.appConfig.kerberos.volumeMount" $ | nindent 12 }} - - name: toolbox-config - mountPath: '/srv/gitlab/config/initializers/smtp_settings.rb' - subPath: smtp_settings.rb - - name: toolbox-secrets - mountPath: '/etc/gitlab' - readOnly: true - - name: toolbox-secrets - mountPath: /srv/gitlab/config/secrets.yml - subPath: rails-secrets/secrets.yml - - name: toolbox-tmp - mountPath: '/srv/gitlab/tmp' - {{- if and .Values.persistence.enabled .Values.persistence.subPath }} - subPath: "{{ .Values.persistence.subPath }}" - {{- end }} - readOnly: false -{{- if .Values.global.email.smime.enabled }} - - name: smime-creds - mountPath: /home/git/gitlab - readOnly: true -{{- end }} - {{- include "gitlab.certificates.volumeMount" . | nindent 12 }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumes: - {{- include "gitlab.extraVolumes" . | nindent 6 }} - {{- include "gitlab.psql.ssl.volume" . | nindent 6 }} - {{- include "gitlab.geo.psql.ssl.volume" . | nindent 6 }} - {{- include "gitlab.appConfig.kerberos.volume" $ | nindent 6 }} - - name: toolbox-config - projected: - sources: - - configMap: - name: {{ template "fullname" . }} - - name: toolbox-tmp - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ template "fullname" . }}-tmp - {{- else }} - emptyDir: {} - {{- end }} - - name: init-toolbox-secrets - projected: - defaultMode: 0400 - sources: - - secret: - name: {{ template "gitlab.rails-secrets.secret" . }} - items: - - key: secrets.yml - path: rails-secrets/secrets.yml - - secret: - name: {{ template "gitlab.gitlab-shell.authToken.secret" . }} - items: - - key: {{ template "gitlab.gitlab-shell.authToken.key" . }} - path: shell/.gitlab_shell_secret - {{- include "gitlab.gitaly.clientSecrets" . | nindent 10 }} - {{- include "gitlab.redis.secrets" . | nindent 10 }} - {{- range $.Values.local.psql }} - {{- include "gitlab.psql.secret" . | nindent 10 }} - {{- end }} - {{- if include "gitlab.geo.secondary" $ }} - - secret: - name: {{ template "gitlab.geo.psql.password.secret" . }} - items: - - key: {{ template "gitlab.geo.psql.password.key" . }} - path: postgres/geo-psql-password - {{- end }} - - secret: - name: {{ template "gitlab.registry.certificate.secret" . }} - items: - - key: registry-auth.key - path: registry/gitlab-registry.key - {{- include "gitlab.registry.notificationSecret.mount" $ | nindent 10 -}} - {{- if or .Values.backups.objectStorage.config (not (or .Values.global.minio.enabled .Values.global.appConfig.object_store.enabled)) }} - {{- include "toolbox.backups.objectStorage.config.secret" .Values.backups.objectStorage | nindent 10 }} - {{- end }} - {{- include "gitlab.pages.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.kas.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.suggestedReviewers.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.minio.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "object_store" "config" $.Values.global.appConfig.object_store) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "artifacts" "config" $.Values.global.appConfig.artifacts) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "uploads" "config" $.Values.global.appConfig.uploads) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "packages" "config" $.Values.global.appConfig.packages) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "terraform_state" "config" $.Values.global.appConfig.terraformState) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "ci_secure_files" "config" $.Values.global.appConfig.ciSecureFiles) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "dependency_proxy" "config" $.Values.global.appConfig.dependencyProxy) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "pages" "config" $.Values.global.pages.objectStore) | nindent 10 }} - {{- include "gitlab.appConfig.ldap.servers.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.duo.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.omniauth.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.microsoftGraphMailer.mountSecrets" $ | nindent 10 }} - {{- if and $.Values.global.smtp.enabled $.Values.global.smtp.authentication }} - - secret: - name: {{ $.Values.global.smtp.password.secret | required "Missing required secret containing the SMTP password. Make sure to set `global.smtp.password.secret`" }} - items: - - key: {{ $.Values.global.smtp.password.key }} - path: smtp/smtp-password - {{- end }} -{{- if .Values.global.email.smime.enabled }} - - name: smime-creds - projected: - defaultMode: 0400 - sources: - - secret: - name: {{ .Values.global.email.smime.secretName }} - items: - - key: {{ .Values.global.email.smime.keyName }} - path: .gitlab_smime_key - - key: {{ .Values.global.email.smime.certName }} - path: .gitlab_smime_cert -{{- end }} - - name: toolbox-secrets - emptyDir: - medium: "Memory" - {{- include "gitlab.certificates.volumes" . | nindent 6 }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/pvc.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/pvc.yaml deleted file mode 100644 index cc74867fa..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/pvc.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{- if and .Values.enabled .Values.persistence.enabled }} ---- -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "fullname" . }}-tmp - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - accessModes: - - {{ .Values.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} -{{- if .Values.persistence.volumeName }} - volumeName: {{ .Values.persistence.volumeName }} -{{- end }} -{{- if .Values.persistence.storageClass }} -{{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" -{{- end -}} -{{- end }} - selector: -{{- if .Values.persistence.matchLabels }} - matchLabels: - {{- toYaml .Values.persistence.matchLabels | nindent 6 }} -{{- end -}} -{{- if .Values.persistence.matchExpressions }} - matchExpressions: - {{- toYaml .Values.persistence.matchExpressions | nindent 6 }} -{{- end -}} -{{- end }} -{{- if and .Values.enabled .Values.backups.cron.enabled .Values.backups.cron.persistence.enabled }} -{{- if not .Values.backups.cron.persistence.useGenericEphemeralVolume }} ---- -kind: PersistentVolumeClaim -apiVersion: v1 -{{ include "toolbox.backups.cron.persistence.persistentVolumeClaim" . }} -{{- end -}} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/serviceaccount.yaml deleted file mode 100644 index 16435d96b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 -}} - {{- include "gitlab.commonLabels" . | nindent 4 -}} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/values.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/values.yaml deleted file mode 100644 index e35be24bb..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/toolbox/values.yaml +++ /dev/null @@ -1,274 +0,0 @@ -image: {} - # pullPolicy: IfNotPresent - # pullSecrets: [] - # repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-toolbox-ee - # tag: master - -init: - image: {} - # repository: - # tag: - # pullPolicy: IfNotPresent - resources: - requests: - cpu: 50m - containerSecurityContext: {} - -# Tolerations for pod scheduling -tolerations: [] - -extraEnv: {} - -antiAffinityLabels: - matchLabels: {} - -affinity: - podAntiAffinity: - topologyKey: - -common: - labels: {} - -enabled: true -replicas: 1 -annotations: {} -podLabels: {} - -# Priority class assigned to pods -priorityClassName: "" - -psql: {} - # port: 5432 - -global: - hosts: - domain: example.com - hostSuffix: - https: true - gitlab: {} - registry: {} - minio: {} - psql: - # host: '0.0.0.0' - # port: '5432' - # database: 'gitlabhq_production' - # username: 'gitlab' - # applicationName: - # preparedStatements: false - # databaseTasks: true - # ssl: - # secret: gitlab-ssl-secret - # clientKey: client-key.pem - # clientCertificate: client-cert.pem - # serverCA: server-ca.pem - password: {} - redis: - auth: {} - gitaly: - internal: - names: ["default"] - external: [] - authToken: {} - minio: - enabled: - credentials: {} - webservice: {} - appConfig: - lfs: - enabled: true - proxy_download: true - bucket: - connection: {} - artifacts: - enabled: true - proxy_download: true - bucket: - connection: {} - uploads: - enabled: true - proxy_download: true - bucket: - connection: {} - packages: - enabled: true - proxy_download: true - bucket: - connection: {} - externalDiffs: - when: - proxy_download: true - bucket: - connection: {} - terraformState: - enabled: false - bucket: - connection: {} - dependencyProxy: - enabled: false - proxy_download: true - bucket: - connection: {} - ldap: - servers: {} - # 'main' is the GitLab 'provider ID' of this LDAP server - # main: - # label: 'LDAP' - # host: '_your_ldap_server' - # port: 636 - # uid: 'sAMAccountName' - # bind_dn: '_the_full_dn_of_the_user_you_will_bind_with' - # password: '_the_password_of_the_bind_user' - # encryption: 'plain' - omniauth: - enabled: false - autoSignInWithProvider: - syncProfileFromProvider: [] - syncProfileAttributes: ['email'] - allowSingleSignOn: ['saml'] - blockAutoCreatedUsers: true - autoLinkLdapUser: false - autoLinkSamlUser: false - autoLinkUser: [] - externalProviders: [] - allowBypassTwoFactor: [] - providers: [] - # - secret: gitlab-google-oauth2 - # key: provider -backups: - cron: - enabled: false - concurrencyPolicy: Replace - failedJobsHistoryLimit: 1 - schedule: "0 1 * * *" - startingDeadlineSeconds: null - successfulJobsHistoryLimit: 3 - suspend: false - backoffLimit: 6 - # activeDeadlineSeconds: - safeToEvict: false - restartPolicy: "OnFailure" - extraArgs: "" - resources: - # limits: - # cpu: 1 - # memory: 2G - requests: - cpu: 50m - memory: 350M - persistence: - enabled: false - ## Use a generic ephemeral volume. - ## This kind of volume will exist only as long as the pod exists. - ## Requires at least Kubernetes version 1.23. - ## https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes - useGenericEphemeralVolume: false - ## toolbox temporarily Persistent Volume Storage Class - ## 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: "-" - accessMode: ReadWriteOnce - size: 10Gi - subPath: "" - ## if volumeName is set, use this existing PersistentVolume - # volumeName: - matchLabels: {} - matchExpressions: [] - objectStorage: - backend: s3 - config: {} - # secret: my-backup-secret - # key: config - # gcpProject: my-gcp-project-id -extra: {} - -rack_attack: - git_basic_auth: - enabled: false - # enabled: true - # ip_whitelist: ["127.0.0.1"] - # maxretry: 10 - # findtime: 60 - # bantime: 3600 - -trusted_proxies: [] - -redis: - auth: {} -gitaly: - # host: '0.0.0.0' - # port: 8075 - # serviceName: 'gitaly' - authToken: {} - # secret: gitaly-secret - # key: token -minio: - bucket: git-lfs - serviceName: 'minio-svc' - port: 9000 -resources: - # limits: - # cpu: 1 - # memory: 2G - requests: - cpu: 50m - memory: 350M - -## Enable persistence using Persistent Volume Claims -## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ -## -persistence: - enabled: false - - ## toolbox temporarily Persistent Volume Storage Class - ## 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: "-" - accessMode: ReadWriteOnce - size: 10Gi - - ## If subPath is set mount a sub folder of a volume instead of the root of the volume. - ## This is especially handy for volume plugins that don't natively support sub mounting (like glusterfs). - ## - subPath: "" - - ## if volumeName is set, use this existing PersistentVolume - # volumeName: - - ## Only bind to a volume with the following exactly matched labels with values. - ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector - matchLabels: {} - - ## Only bind to a volume with the following exppression matched labels. - ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector - matchExpressions: [] - -## Allow to overwrite under which User and Group the Pod will be running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -## Allow to overwrite the specific security context under which the container is running. -containerSecurityContext: - runAsUser: 1000 - -## Enable deployment to use a serviceAccount -serviceAccount: - enabled: false - create: false - annotations: {} - ## Name to be used for serviceAccount, otherwise defaults to chart fullname - # name: - -deployment: - strategy: - type: Recreate - rollingUpdate: null diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/Chart.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/Chart.yaml deleted file mode 100644 index fd528741f..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -appVersion: v16.0.1 -description: HTTP server for Gitlab -home: https://about.gitlab.com/ -icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.svg -keywords: -- gitlab -- webservice -- puma -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: webservice -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/gitlab/charts/webservice -- https://gitlab.com/gitlab-org/build/CNG/tree/master/gitlab-webservice -version: 7.0.1 diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/_datamodel.tpl b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/_datamodel.tpl deleted file mode 100644 index 950960c2d..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/_datamodel.tpl +++ /dev/null @@ -1,160 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -webservice.datamodel.prepare - -!! To be run against $ - -Walks `deployments` and merges `webservice.datamodel.blank` into each -item, ensuring presence of all keys. -*/}} -{{- define "webservice.datamodel.prepare" -}} -{{- $fullname := include "fullname" $ -}} -{{- $blank := dict -}} -{{/* make sure we always have at least one */}} -{{- if not $.Values.deployments -}} -{{- $blank := fromYaml (include "webservice.datamodel.blank" $) -}} -{{- $_ := set $blank.ingress "path" (coalesce $.Values.ingress.path $.Values.global.ingress.path) -}} -{{- $_ := set $.Values "deployments" (dict "default" (dict)) -}} -{{- $_ := set $.Values.deployments "default" $blank -}} -{{- end -}} -{{/* walk all entries, ensure default properties populated */}} -{{- $checks := dict "hasBasePath" false -}} -{{- range $deployment, $values := $.Values.deployments -}} -{{- $filledValues := fromYaml (include "webservice.datamodel.blank" $) -}} -{{- $_ := include "gitlab.merge.overwriteEmpty" (dict "dst" $filledValues "src" $values) -}} -{{/* mergeOverwrite does not support overlaying empty values */}} -{{/* - $_ := mergeOverwrite $filledValues $values - */}} -{{- $_ := set $filledValues "name" $deployment -}} -{{- $_ := set $filledValues "fullname" $fullname -}} -{{- $_ := set $.Values.deployments $deployment $filledValues -}} -{{- if has ($filledValues.ingress.path | toString ) (list "/" "/*") -}} -{{- $_ := set $checks "hasBasePath" true -}} -{{- end -}} -{{- end -}} -{{- if and (not $.Values.ingress.requireBaseBath) (not $checks.hasBasePath) -}} -{{- fail "FATAL: Webservice: no deployment with ingress.path '/' or '/*' specified." -}} -{{- end -}} -{{- end -}} - -{{/* -webservice.datamodel.blank - -!! To be run against $ - -Creates a copy of the data model expected for `deployments` entries, -pulling default values from the appropriate items in `.Values.xyz`. -This is output as YAML, it can be read back in as a dict via `toYaml`. -*/}} -{{- define "webservice.datamodel.blank" -}} -ingress: - path: # intentionally not setting a value. User must set. - pathType: Prefix - annotations: - {{- .Values.ingress.annotations | toYaml | nindent 4 }} - proxyConnectTimeout: {{ .Values.ingress.proxyConnectTimeout }} - proxyReadTimeout: {{ .Values.ingress.proxyReadTimeout }} - proxyBodySize: {{ .Values.ingress.proxyBodySize | quote }} -common: - labels: {{ mergeOverwrite (deepCopy .Values.global.common.labels) (deepCopy .Values.common.labels) | toYaml | nindent 4 }} -deployment: - annotations: - {{- if .Values.deployment.annotations }} - {{- toYaml .Values.deployment.annotations | nindent 4 }} - {{- end }} - labels: - {{- .Values.deployment | toYaml | nindent 2 }} -pod: - labels: # additional labels to .podLabels - annotations: # inherit from .Values.annotations - {{- if .Values.annotations }} - {{ toYaml .Values.annotations | nindent 4 }} - {{- end }} -service: - labels: # additional labels to .serviceLabels - type: {{ .Values.service.type }} - {{- if .Values.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.service.loadBalancerIP }} - {{- end }} - {{- if .Values.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range .Values.service.loadBalancerSourceRanges }} - - {{ . | quote }} - {{- end }} - {{- end }} - annotations: # additional annotations to .service.annotations - {{- if .Values.service.annotations }} - {{ toYaml .Values.service.annotations | nindent 4 }} - {{- end }} -hpa: - minReplicas: {{ .Values.minReplicas }} # defaults to .minReplicas - maxReplicas: {{ .Values.maxReplicas }} # defaults to .maxReplicas - {{- .Values.hpa | toYaml | nindent 2 }} -pdb: - maxUnavailable: {{ .Values.maxUnavailable }} # defaults to .maxUnavailable -resources: # resources for `webservice` container - {{- .Values.resources | toYaml | nindent 2 }} -sharedTmpDir: {{ .Values.sharedTmpDir | toYaml | nindent 2 }} -sharedUploadDir: {{ .Values.sharedUploadDir | toYaml | nindent 2 }} -workhorse: - {{- .Values.workhorse | toYaml | nindent 2 }} -extraEnv: - {{- .Values.extraEnv | toYaml | nindent 2 }} -extraEnvFrom: - {{- .Values.extraEnvFrom | toYaml | nindent 2 }} -puma: - {{- .Values.puma | toYaml | nindent 2 }} -workerProcesses: {{ .Values.workerProcesses | int }} -shutdown: - {{- .Values.shutdown | toYaml | nindent 2 }} -nodeSelector: # map - {{- if .Values.nodeSelector }} - {{- .Values.nodeSelector | toYaml | nindent 2 }} - {{- end }} -tolerations: # array - {{- if .Values.tolerations }} - {{- .Values.tolerations | toYaml | nindent 2 }} - {{- end }} -sshHostKeys: # map - {{- .Values.sshHostKeys | toYaml | nindent 2 }} -{{- end -}} - -{{/* -gitlab.merge.overwriteEmpty - -Call: include "gitlab.merge.overwriteEmpty" (dict "dst" .model "src" .values) -Input: (dict "dst" (&dict) "src" (&dict)) - -Operate on two dictionary, performing effectively "merge", but always -take the value of src if present, even if empty. - -- `dst` should be a complete model map -- `src` should have keys on which to overwrite -- A given Map can be emptied by supplying `item: null`, but will otherwise be merged (inherit). - -Intended to be recursion capable, implementing deepMerge WithOverwriteWithEmptyValue. -`mergeOverwrite` uses deepMerge WithOverwrite. - -See: https://godoc.org/github.com/imdario/mergo#WithOverwriteWithEmptyValue -*/}} -{{- define "gitlab.merge.overwriteEmpty" -}} -{{/* Get a unique list of all keys in both maps */}} -{{- $cache_keys := keys $.src -}} -{{/* Walk all keys in both maps */}} -{{- range $key := $cache_keys -}} -{{/* If dst and src both have this key, walk */}} -{{- if and (hasKey $.dst $key) (hasKey $.src $key) -}} -{{/* If both values are maps, go deeper */}} -{{- if and (kindIs "map" (index $.src $key)) (kindIs "map" (index $.dst $key)) -}} -{{- include "gitlab.merge.overwriteEmpty" (dict "dst" (index $.dst $key) "src" (index $.src $key)) -}} -{{- else -}} -{{/* If values are not both maps, overwrite with src's value */}} -{{- $_ := set $.dst $key (index $.src $key) -}} -{{- end -}} -{{- end -}} -{{/* If dst does not have the key in src, add it to dst */}} -{{- if not (hasKey $.dst $key) -}} -{{- $_ := set $.dst $key (index $.src $key) -}} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/_helpers.tpl deleted file mode 100644 index 9c98c8faa..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/_helpers.tpl +++ /dev/null @@ -1,254 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Create the fullname, with suffix of deployment.name -Unless `ingress.path: /` or `name: default` - -!! to be called from scope of a `deployment.xyz` entry. -*/}} -{{- define "webservice.fullname.withSuffix" -}} -{{- printf "%s-%s" .fullname .name | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Returns the secret name for the Secret containing the TLS certificate and key. -Uses `ingress.tls.secretName` first and falls back to `global.ingress.tls.secretName` -if there is a shared tls secret for all ingresses. -*/}} -{{- define "webservice.tlsSecret" -}} -{{- $defaultName := (dict "secretName" "") -}} -{{- if $.Values.global.ingress.configureCertmanager -}} -{{- $_ := set $defaultName "secretName" (printf "%s-gitlab-tls" $.Release.Name) -}} -{{- else -}} -{{- $_ := set $defaultName "secretName" (include "gitlab.wildcard-self-signed-cert-name" .) -}} -{{- end -}} -{{- pluck "secretName" $.Values.ingress.tls $.Values.global.ingress.tls $defaultName | first -}} -{{- end -}} - -{{/* -Returns the secret name for the Secret containing the TLS certificate and key for -the smartcard host. -Uses `ingress.tls.secretName` first and falls back to `global.ingress.tls.secretName` -if there is a shared tls secret for all ingresses. -*/}} -{{- define "smartcard.tlsSecret" -}} -{{- $defaultName := (dict "secretName" "") -}} -{{- if $.Values.global.ingress.configureCertmanager -}} -{{- $_ := set $defaultName "secretName" (printf "%s-gitlab-tls-smartcard" $.Release.Name) -}} -{{- else -}} -{{- $_ := set $defaultName "secretName" (include "gitlab.wildcard-self-signed-cert-name" .) -}} -{{- end -}} -{{- coalesce $.Values.ingress.tls.smartcardSecretName (pluck "secretName" $.Values.global.ingress.tls $defaultName | first) -}} -{{- end -}} - -{{/* -Returns the workhorse image repository depending on the value of global.edition. - -Used to switch the deployment from Enterprise Edition (default) to Community -Edition. If global.edition=ce, returns the Community Edition image repository -set in the Gitlab values.yaml, otherwise returns the Enterprise Edition -image repository. -*/}} -{{- define "workhorse.repository" -}} -{{- if eq "ce" $.Values.global.edition -}} -{{ index $.Values "global" "communityImages" "workhorse" "repository" }} -{{- else -}} -{{ index $.Values "global" "enterpriseImages" "workhorse" "repository" }} -{{- end -}} -{{- end -}} - -{{/* -Returns the webservice image depending on the value of global.edition. - -Used to switch the deployment from Enterprise Edition (default) to Community -Edition. If global.edition=ce, returns the Community Edition image repository -set in the Gitlab values.yaml, otherwise returns the Enterprise Edition -image repository. -*/}} -{{- define "webservice.image" -}} -{{ coalesce $.Values.image.repository (include "image.repository" .) }}:{{ coalesce .Values.image.tag (include "gitlab.versionTag" . ) }}{{ include "gitlab.image.tagSuffix" . }} -{{- end -}} - -{{/* -Returns gomplate section for Workhorse direct object storage configuration. - -If Minio in use, set AWS and keys. -If consolidated object storage is in use, read the connection YAML - If provider is AWS, render enabled as true. -*/}} -{{- define "workhorse.object_storage.config" -}} -{%- $supported_providers := slice "AWS" "AzureRM" "Google" -%} -{%- $connection := coll.Dict "provider" "" -%} -{%- if file.Exists "/etc/gitlab/minio/accesskey" %} - {%- $aws_access_key_id := file.Read "/etc/gitlab/minio/accesskey" | strings.TrimSpace -%} - {%- $aws_secret_access_key := file.Read "/etc/gitlab/minio/secretkey" | strings.TrimSpace -%} - {%- $connection = coll.Dict "provider" "AWS" "aws_access_key_id" $aws_access_key_id "aws_secret_access_key" $aws_secret_access_key -%} -{%- end %} -{%- if file.Exists "/etc/gitlab/objectstorage/object_store" %} - {%- $connection = file.Read "/etc/gitlab/objectstorage/object_store" | strings.TrimSpace | data.YAML -%} -{%- end %} -{%- if has $supported_providers $connection.provider %} -[object_storage] -provider = "{% $connection.provider %}" -{%- if eq $connection.provider "AWS" %} -{%- $connection = coll.Merge $connection (coll.Dict "aws_access_key_id" "" "aws_secret_access_key" "" ) %} -# AWS / S3 object storage configuration. -[object_storage.s3] -# access/secret can be blank! -aws_access_key_id = {% $connection.aws_access_key_id | strings.TrimSpace | data.ToJSON %} -aws_secret_access_key = {% $connection.aws_secret_access_key | strings.TrimSpace | data.ToJSON %} -{%- else if eq $connection.provider "AzureRM" %} -{%- $connection = coll.Merge $connection (coll.Dict "azure_storage_account_name" "" "azure_storage_account_name" "" ) %} -# Azure Blob storage configuration. -[object_storage.azurerm] -azure_storage_account_name = {% $connection.azure_storage_account_name | strings.TrimSpace | data.ToJSON %} -azure_storage_access_key = {% $connection.azure_storage_access_key | strings.TrimSpace | data.ToJSON %} -{%- else if eq $connection.provider "Google" %} -# Google storage configuration. -[object_storage.google] -{% $connection | coll.Omit "provider" | data.ToTOML %} -{%- end %} -{%- end %} -{{- end -}} - -{{/* -Returns the extraEnv keys and values to inject into containers. Allows -pod-level values for extraEnv. - -Takes a dict with `local` being the pod-level configuration and `parent` -being the chart-level configuration. - -Pod values take precedence, then chart values, and finally global -values. -*/}} -{{- define "webservice.podExtraEnv" -}} -{{- $allExtraEnv := merge (default (dict) .local.extraEnv) (default (dict) .context.Values.extraEnv) .context.Values.global.extraEnv -}} -{{- range $key, $value := $allExtraEnv }} -- name: {{ $key }} - value: {{ $value | quote }} -{{- end -}} -{{- end -}} - -{{/* -Output a .spec.selector YAML section - -To be consumed by: Deployment and PodDisruptionBudget -*/}} -{{- define "webservice.spec.selector" -}} -matchLabels: - app: {{ template "name" $ }} - release: {{ $.Release.Name }} - {{ template "webservice.labels" . | nindent 2 }} -{{- end -}} - -{{/* -Output labels specifically for webservice -*/}} -{{- define "webservice.labels" -}} -gitlab.com/webservice-name: {{ .name }} -{{- end -}} - -{{/* -Returns a list of _common_ labels to be shared across all -Webservice deployments and other shared objects. -*/}} -{{- define "webservice.commonLabels" -}} -{{- $commonLabels := default (dict) .common.labels -}} -{{- if $commonLabels }} -{{- range $key, $value := $commonLabels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Returns a list of _pod_ labels to be shared across all -Webservice deployments. -*/}} -{{- define "webservice.podLabels" -}} -{{- range $key, $value := .pod.labels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} - -{{/* -Returns the extraEnv keys and values to inject into containers. - -Global values will override any chart-specific values. -*/}} -{{- define "webservice.extraEnv" -}} -{{- $allExtraEnv := merge (default (dict) .local.extraEnv) .global.extraEnv -}} -{{- range $key, $value := $allExtraEnv }} -- name: {{ $key }} - value: {{ $value | quote }} -{{- end -}} -{{- end -}} - -{{/* - -*/}} -{{/* -Defines a volume containing all public host SSH keys, fingerprints of which will become available -under /help/instance_configuration for users to be able to verify the server - -It expects a dictionary with three entries: -- `local` which contains sshHostKeys configuration of a single webservice Deployment -- `Release` being a copy of .Release -- `Values` being a copy of .Values - -The `Release` and `Values` keys are needed because of the usage of the -`gitlab.gitlab-shell.hostKeys.secret` helper. -*/}} -{{- define "webservice.sshHostKeys.volume" -}} -- name: {{ .local.sshHostKeys.mountName }} - secret: - secretName: {{ template "gitlab.gitlab-shell.hostKeys.secret" . }} - items: - {{- range .local.sshHostKeys.types }} - - key: ssh_host_{{ . }}_key.pub - path: ssh_host_{{ . }}_key.pub - {{- end -}} -{{- end -}} - -{{/* -Return the webservice TLS secret name -*/}} -{{- define "webservice.tls.secret" -}} -{{- default (printf "%s-webservice-tls" .Release.Name) $.Values.tls.secretName | quote -}} -{{- end -}} - -{{/* -Return the webservice-metrics TLS secret name. -*/}} -{{- define "webservice-metrics.tls.secret" -}} -{{- $.Values.metrics.tls.secretName | default (include "webservice.tls.secret" .) }} -{{- end -}} - -{{/* -Return whether the webservice has TLS for metrics enabled. -*/}} -{{- define "webservice-metrics.tls.enabled" -}} -{{- if hasKey $.Values.metrics.tls "enabled" }} -{{- $.Values.metrics.tls.enabled }} -{{- else }} -{{- $.Values.tls.enabled }} -{{- end }} -{{- end -}} - -{{/* -Return the Workhorse TLS Secret name -*/}} -{{- define "workhorse.tls.secret" -}} -{{- default (printf "%s-workhorse-tls" .Release.Name) $.Values.workhorse.tls.secretName | quote -}} -{{- end -}} - -{{/* -Return whether the Workhorse exporter has TLS enabled. -*/}} -{{- define "workhorse.monitoring.exporter.tls.enabled" -}} -{{- if hasKey $.Values.workhorse.monitoring.exporter.tls "enabled" }} -{{- $.Values.workhorse.monitoring.exporter.tls.enabled }} -{{- else }} -{{- $.Values.global.workhorse.tls.enabled }} -{{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/configmap.yml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/configmap.yml deleted file mode 100644 index 7ca518c1b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/configmap.yml +++ /dev/null @@ -1,259 +0,0 @@ -{{- if .Values.enabled -}} -{{- include "database.datamodel.prepare" $ -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - {{- if $.Values.debugDatamodel }} - # gitlab.webservice.debugDatamodel - # helm template . -f test_values.yaml | yq -r '.data.deployments | select(. != null)' - {{- include "webservice.datamodel.prepare" $ -}} - deployments: | - blank: - {{- include "webservice.datamodel.blank" $ | nindent 6 }} - {{- toYaml .Values.deployments | nindent 4 }} - {{- end }} - installation_type: | - gitlab-helm-chart - database.yml.erb: | - {{- include "gitlab.database.yml" . | nindent 4 }} - krb5.conf: | - {{- .Values.global.appConfig.kerberos.krb5Config | nindent 4 }} - smtp_settings.rb: | - {{- include "gitlab.smtp_settings" . | nindent 4 }} - {{- include "gitlab.rails.redis.all" . | nindent 2 }} - gitlab.yml.erb: | - production: &base - gitlab: - host: {{ template "gitlab.gitlab.hostname" . }} - https: {{ hasPrefix "https://" (include "gitlab.gitlab.url" .) }} - {{- with .Values.global.hosts.ssh }} - ssh_host: {{ . | quote }} - {{- end }} - {{- with .Values.global.appConfig }} - {{- if .cdnHost }} - cdn_host: {{ .cdnHost | quote }} - {{- end }} - max_request_duration_seconds: {{ default (include "gitlab.appConfig.maxRequestDurationSeconds" $) .maxRequestDurationSeconds }} - impersonation_enabled: {{ .enableImpersonation }} - application_settings_cache_seconds: {{ .applicationSettingsCacheSeconds | int }} - usage_ping_enabled: {{ eq .enableUsagePing true }} - seat_link_enabled: {{ eq .enableSeatLink true }} - username_changing_enabled: {{ eq .usernameChangingEnabled true }} - issue_closing_pattern: {{ .issueClosingPattern | quote }} - default_theme: {{ .defaultTheme }} - {{- include "gitlab.appConfig.defaultProjectsFeatures.configuration" $ | nindent 8 }} - {{- if hasKey .initialDefaults "signupEnabled" }} - signup_enabled: {{ .initialDefaults.signupEnabled }} - {{- end }} - webhook_timeout: {{ .webhookTimeout }} - {{- end }} - trusted_proxies: - {{- if .Values.trusted_proxies }} - {{- toYaml .Values.trusted_proxies | nindent 10 }} - {{- end }} - time_zone: {{ .Values.global.time_zone | quote }} - {{- include "gitlab.outgoing_email_settings" . | indent 8 }} - {{- with .Values.global.appConfig }} - {{- if eq .contentSecurityPolicy.enabled true }} - {{- include "gitlab.appConfig.content_security_policy" . | nindent 8 }} - {{- end }} - {{- if .microsoft_graph_mailer.enabled }} - {{- include "gitlab.appConfig.microsoft_graph_mailer" . | nindent 6 }} - {{- end }} - {{- if .incomingEmail.enabled }} - {{- include "gitlab.appConfig.incoming_email" . | nindent 6 }} - {{- end }} - {{- if .serviceDeskEmail.enabled }} - {{- include "gitlab.appConfig.service_desk_email" . | nindent 6 }} - {{- end }} - {{- include "gitlab.appConfig.cronJobs" . | nindent 6 }} - gravatar: - plain_url: {{ .gravatar.plainUrl }} - ssl_url: {{ .gravatar.sslUrl }} - {{- include "gitlab.appConfig.extra" . | nindent 6 }} - {{- end }} - - {{- if $.Values.global.appConfig.object_store.enabled }} - # Consolidated object storage configuration - ## property local configuration will override object_store - {{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "object_store" "config" $.Values.global.appConfig.object_store "context" $) | nindent 6 }} - objects: - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "artifacts" "config" $.Values.global.appConfig.artifacts) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "uploads" "config" $.Values.global.appConfig.uploads) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "packages" "config" $.Values.global.appConfig.packages) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "terraform_state" "config" $.Values.global.appConfig.terraformState) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "ci_secure_files" "config" $.Values.global.appConfig.ciSecureFiles) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "dependency_proxy" "config" $.Values.global.appConfig.dependencyProxy) | nindent 10 -}} - {{- include "gitlab.appConfig.objectStorage.object" (dict "name" "pages" "config" $.Values.global.pages.objectStore) | nindent 10 -}} - {{- end }} - {{- include "gitlab.appConfig.artifacts.configuration" (dict "config" $.Values.global.appConfig.artifacts "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.lfs.configuration" (dict "config" $.Values.global.appConfig.lfs "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.uploads.configuration" (dict "config" $.Values.global.appConfig.uploads "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.packages.configuration" (dict "config" $.Values.global.appConfig.packages "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.external_diffs.configuration" (dict "config" $.Values.global.appConfig.externalDiffs "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.terraformState.configuration" (dict "config" $.Values.global.appConfig.terraformState "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.ciSecureFiles.configuration" (dict "config" $.Values.global.appConfig.ciSecureFiles "context" $) | nindent 6 }} - {{- include "gitlab.appConfig.dependencyProxy.configuration" (dict "config" $.Values.global.appConfig.dependencyProxy "context" $) | nindent 6 }} - {{- include "gitlab.geo.config" $ | nindent 6 }} - {{- include "gitlab.appConfig.sentry.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.gitlab_docs.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.sidekiq.configuration" $ | nindent 6 }} - {{- include "gitlab.pages.config" $ | nindent 6 }} - mattermost: - enabled: false - gitlab_ci: - {{- include "gitlab.appConfig.ldap.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.omniauth.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.kerberos.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.duo.configuration" $ | nindent 6 }} - shared: - {{- include "gitlab.appConfig.gitaly" . | nindent 6 }} - {{- include "gitlab.appConfig.repositories" . | nindent 6 }} - backup: - path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/) - {{- include "gitlab.appConfig.kas" . | nindent 6 }} - {{- include "gitlab.appConfig.suggested_reviewers" . | nindent 6 }} - {{- include "gitlab.appConfig.shell" . | nindent 6 }} - {{- include "gitlab.appConfig.shell.ssh_port" . | nindent 8 }} - {{- include "gitlab.appConfig.shell.secret_file" . | nindent 8 }} - workhorse: - secret_file: /etc/gitlab/gitlab-workhorse/secret - git: - bin_path: /usr/bin/git - webpack: - monitoring: - ip_whitelist: - {{- if kindIs "slice" .Values.monitoring.ipWhitelist }} - {{ toYaml .Values.monitoring.ipWhitelist | nindent 10 | trim }} - {{- end }} - web_exporter: - enabled: {{ or .Values.monitoring.exporter.enabled (and .Values.metrics.enabled (eq .Values.metrics.port .Values.monitoring.exporter.port)) }} - address: 0.0.0.0 - port: {{ .Values.monitoring.exporter.port }} - {{- if eq (include "webservice-metrics.tls.enabled" $) "true" }} - tls_enabled: true - tls_cert_path: "/etc/gitlab/webservice-metrics/webservice-metrics.crt" - tls_key_path: "/etc/gitlab/webservice-metrics/webservice-metrics.key" - {{- end }} - sidekiq_exporter: - shutdown: - blackout_seconds: <%= ENV["SHUTDOWN_BLACKOUT_SECONDS"] %> - {{- include "gitlab.appConfig.rackAttack" . | nindent 6 }} - ## Registry Integration - {{- include "gitlab.appConfig.registry.configuration" $ | nindent 6 }} - {{- include "gitlab.appConfig.smartcard.configuration" $ | nindent 6 }} - configure: | - {{- include "gitlab.scripts.configure.secrets" (dict) | nindent 4 }} - {{- include "gitlab.psql.ssl.initScript" . | nindent 4 }} - {{- include "gitlab.geo.psql.ssl.initScript" . | nindent 4 }} - {{- if $.Values.tls.enabled }} - mkdir -p /init-secrets/puma - cp -v -L /init-config/puma/puma.crt /init-secrets/puma/puma.crt - cp -v -L /init-config/puma/puma.key /init-secrets/puma/puma.key - {{- end }} - {{- if eq (include "webservice-metrics.tls.enabled" $) "true" }} - mkdir -p /init-secrets/webservice-metrics - cp -v -L /init-config/webservice-metrics/webservice-metrics.crt /init-secrets/webservice-metrics/webservice-metrics.crt - cp -v -L /init-config/webservice-metrics/webservice-metrics.key /init-secrets/webservice-metrics/webservice-metrics.key - {{- end }} - -{{- include "webservice.datamodel.prepare" $ -}} -{{/* BEGIN range deployments */}} -{{- range $.Values.deployments -}} -{{/* -From here on: -- `.` is `.deployments.xyz` value -- `.name` is the key (xyz) -*/}} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ $.Release.Name }}-workhorse-{{ .name }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "gitlab.commonLabels" $ | nindent 4 }} -data: - installation_type: | - gitlab-helm-chart - workhorse-config.toml.tpl: | - shutdown_timeout = "{{ template "gitlab.workhorse.shutdownTimeout" $ }}" - {{- if $.Values.workhorse.trustedCIDRsForPropagation }} - trusted_cidrs_for_propagation = {{ $.Values.workhorse.trustedCIDRsForPropagation | toStrings | toJson }} - {{- end }} - {{- if $.Values.workhorse.trustedCIDRsForXForwardedFor }} - trusted_cidrs_for_x_forwarded_for = {{ $.Values.workhorse.trustedCIDRsForXForwardedFor | toStrings | toJson }} - {{- end }} - - {{- if .workhorse.keywatcher }} - [redis] - {{- if not $.Values.global.redis.sentinels }} - URL = "{{ template "gitlab.redis.scheme" $ }}://{{ template "gitlab.redis.host" $ }}:{{ template "gitlab.redis.port" $ }}" - {{- else }} - SentinelMaster = "{{ template "gitlab.redis.host" $ }}" - Sentinel = [ {{ template "gitlab.redis.workhorse.sentinel-list" $ }} ] - {{- end }} - {{- if include "gitlab.redis.password.enabled" $ }} - Password = {% file.Read "/etc/gitlab/redis/redis-password" | strings.TrimSpace | data.ToJSON %} - {{- end }} - {{- end }} - {{- include "workhorse.object_storage.config" $ | nindent 4 }} - [image_resizer] - max_scaler_procs = {{ $.Values.workhorse.imageScaler.maxProcs | int }} - max_filesize = {{ $.Values.workhorse.imageScaler.maxFileSizeBytes | int }} - [[listeners]] - network = "tcp" - addr = "0.0.0.0:{{ default 8181 $.Values.service.workhorseInternalPort | int }}" - {{- if $.Values.global.workhorse.tls.enabled }} - [listeners.tls] - certificate = "/etc/gitlab/gitlab-workhorse/tls.crt" - key = "/etc/gitlab/gitlab-workhorse/tls.key" - {{- end }} - {{- if or $.Values.workhorse.monitoring.exporter.enabled $.Values.workhorse.metrics.enabled }} - [metrics_listener] - network = "tcp" - addr = "0.0.0.0:{{ $.Values.workhorse.monitoring.exporter.port }}" - {{- $workhorseExporterTlsEnabled := eq (include "workhorse.monitoring.exporter.tls.enabled" $ ) "true" }} - {{- if $workhorseExporterTlsEnabled }} - [metrics_listener.tls] - certificate = "/etc/gitlab/gitlab-workhorse/tls.crt" - key = "/etc/gitlab/gitlab-workhorse/tls.key" - {{- end }} - {{- end }} - configure: | - set -e - mkdir -p /init-secrets-workhorse/gitlab-workhorse - cp -v -r -L /init-config/gitlab-workhorse/secret /init-secrets-workhorse/gitlab-workhorse/secret - {{- if include "gitlab.redis.password.enabled" $ }} - mkdir -p /init-secrets-workhorse/redis - cp -v -r -L /init-config/redis/redis-password /init-secrets-workhorse/redis/ - {{- end }} - {{- if $.Values.global.minio.enabled }} - if [ -d /init-config/minio ]; then - mkdir -p /init-secrets-workhorse/minio - cp -v -r -L /init-config/minio/* /init-secrets-workhorse/minio/ - fi - {{- end }} - {{- if $.Values.global.appConfig.object_store.connection }} - if [ -f /init-config/objectstorage/object_store ]; then - mkdir -p /init-secrets-workhorse/objectstorage - cp -v -r -L /init-config/objectstorage/object_store /init-secrets-workhorse/objectstorage/ - fi - {{- end }} - {{- if $.Values.global.workhorse.tls.enabled }} - cp -v -L /init-config/gitlab-workhorse/tls.crt /init-secrets-workhorse/gitlab-workhorse/tls.crt - cp -v -L /init-config/gitlab-workhorse/tls.key /init-secrets-workhorse/gitlab-workhorse/tls.key - {{- end }} - -# Leave this here - This line denotes end of block to the parser. -{{- end }}{{/* END range deployments */}} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/deployment.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/deployment.yaml deleted file mode 100644 index 26a1f4396..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/deployment.yaml +++ /dev/null @@ -1,566 +0,0 @@ -{{- if $.Values.enabled }} -{{- $imageCfg := dict "global" $.Values.global.image "local" $.Values.image -}} -{{- $initImageCfg := dict "global" $.Values.global.busybox.image "local" $.Values.init.image -}} -{{- include "database.datamodel.prepare" $ -}} -{{- include "webservice.datamodel.prepare" $ -}} -{{/* BEGIN range deployments */}} -{{- range $.Values.deployments -}} -{{/* -From here on: -- `.` is `.deployments.xyz` value -- `.name` is the key (xyz) -*/}} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "webservice.fullname.withSuffix" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "webservice.labels" . | nindent 4 }} - {{- include "webservice.commonLabels" . | nindent 4 }} - {{- if .deployment.labels -}} - {{- toYaml .deployment.labels | nindent 4 }} - {{- end }} - annotations: - {{- include "gitlab.deploymentAnnotations" $ | nindent 4 }} - {{- if .deployment.annotations -}} - {{- toYaml .deployment.annotations | nindent 4 }} - {{- end }} -spec: - # Don't provide replicas when HPA are present - # replicas: {{ .hpa.minReplicas }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" $ | nindent 6 }} - {{ include "webservice.labels" . | nindent 6 }} - {{- if .deployment.strategy }} - strategy: - {{- .deployment.strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" $ | nindent 8 }} - {{- include "webservice.labels" . | nindent 8 }} - {{- include "gitlab.podLabels" $ | nindent 8 }} - {{- include "webservice.commonLabels" . | nindent 8 }} - {{- include "webservice.podLabels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yml") $ | sha256sum }} - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" - {{- range $key, $value := .pod.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if and $.Values.metrics.enabled (not $.Values.metrics.serviceMonitor.enabled) }} - {{- if $.Values.metrics.annotations }} - {{- toYaml $.Values.metrics.annotations | nindent 8 }} - {{- else }} - {{- if eq (include "webservice-metrics.tls.enabled" $) "true" }} - gitlab.com/prometheus_scheme: "https" - prometheus.io/scheme: "https" - {{- end }} - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: {{ $.Values.metrics.port | quote }} - gitlab.com/prometheus_path: {{ $.Values.metrics.path }} - prometheus.io/scrape: "true" - prometheus.io/port: {{ $.Values.metrics.port | quote }} - prometheus.io/path: {{ $.Values.metrics.path }} - {{- end }} - {{- end }} - spec: - {{- if .tolerations }} - tolerations: - {{- toYaml .tolerations | nindent 8 }} - {{- end }} - {{- $nodeSelectors := dict "Values" (dict "global" (dict "nodeSelector" $.Values.global.nodeSelector) "nodeSelector" .nodeSelector) -}} - {{- include "gitlab.nodeSelector" $nodeSelectors | nindent 6 }} - {{- $priorityClassName := dict "Values" (dict "global" (dict "priorityClassName" $.Values.global.priorityClassName) "priorityClassName" $.Values.priorityClassName) -}} - {{- include "gitlab.priorityClassName" $priorityClassName | nindent 6 }} - {{- include "gitlab.podSecurityContext" $.Values.securityContext | nindent 6 }} - {{- if eq (default $.Values.global.antiAffinity $.Values.antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default $.Values.global.affinity.podAntiAffinity.topologyKey $.Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" $ | nindent 18 }} - {{- include "webservice.labels" . | nindent 18}} - {{- else if eq (default $.Values.global.antiAffinity $.Values.antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default $.Values.global.affinity.podAntiAffinity.topologyKey $.Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - {{- include "gitlab.selectorLabels" $ | nindent 18 }} - {{- include "webservice.labels" . | nindent 18}} - {{- end }} - {{- if or $.Values.serviceAccount.enabled $.Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" $ }} - {{- end }} - automountServiceAccountToken: false - initContainers: - {{- include "gitlab.extraInitContainers" $ | nindent 8 }} - {{- include "gitlab.certificates.initContainer" $ | nindent 8 }} - - name: configure - command: ['sh'] - args: [ '-c', 'sh -x /config-webservice/configure ; sh -x /config-workhorse/configure ; mkdir -p -m 3770 /tmp/gitlab'] - image: {{ include "gitlab.busybox.image" (dict "local" $.Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" $ | indent 10 }} - env: - {{- include "webservice.extraEnv" (dict "global" $.Values.global "local" .) | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" $ | nindent 10 }} - {{- include "gitlab.psql.ssl.volumeMount" $ | nindent 10 }} - {{- include "gitlab.geo.psql.ssl.volumeMount" $ | nindent 10 }} - - name: webservice-config - mountPath: /config-webservice - readOnly: true - - name: workhorse-config - mountPath: /config-workhorse - readOnly: true - - name: init-webservice-secrets - mountPath: /init-config - readOnly: true - - name: webservice-secrets - mountPath: /init-secrets - readOnly: false - - name: workhorse-secrets - mountPath: /init-secrets-workhorse - readOnly: false - - name: shared-tmp - mountPath: /tmp - readOnly: false - resources: - {{- toYaml $.Values.init.resources | nindent 12 }} - - name: dependencies - image: {{ include "webservice.image" $ }} - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" $ | indent 10 }} - args: - - /scripts/wait-for-deps - env: - - name: GITALY_FEATURE_DEFAULT_ON - value: "1" - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/var/opt/gitlab/templates' - - name: CONFIG_DIRECTORY - value: '/srv/gitlab/config' - - name: WORKHORSE_ARCHIVE_CACHE_DISABLED - value: "1" - {{- if $.Values.global.rails.bootsnap.enabled }} - - name: ENABLE_BOOTSNAP - value: "1" - {{- end }} - {{- include "webservice.extraEnv" (dict "global" $.Values.global "local" .) | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} - volumeMounts: - {{- include "gitlab.extraVolumeMounts" $ | nindent 12 }} - {{- include "gitlab.certificates.volumeMount" $ | nindent 12 }} - - name: webservice-config - mountPath: '/var/opt/gitlab/templates' - - name: webservice-secrets - mountPath: '/etc/gitlab' - readOnly: true - - name: webservice-secrets - mountPath: /srv/gitlab/config/secrets.yml - subPath: rails-secrets/secrets.yml - readOnly: true - resources: - {{- toYaml $.Values.init.resources | nindent 12 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - containers: - {{- include "gitlab.extraContainers" $ | nindent 8 }} - - name: {{ $.Chart.Name }} - image: {{ include "webservice.image" $ }} - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" $ | indent 10 }} - ports: - {{- if $.Values.http.enabled }} - - containerPort: {{ $.Values.service.internalPort }} - name: http-webservice - {{- end }} - {{- if $.Values.tls.enabled }} - - containerPort: {{ $.Values.service.tls.internalPort }} - name: https-ws - {{- end }} - {{- if or $.Values.monitoring.exporter.enabled (and $.Values.metrics.enabled (eq $.Values.metrics.port $.Values.monitoring.exporter.port)) }} - - containerPort: {{ $.Values.monitoring.exporter.port }} - name: http-metrics-ws - {{- end }} - env: - - name: GITLAB_WEBSERVER - value: {{ $.Values.webServer }} - - name: TMPDIR - value: "/tmp/gitlab" - - name: GITALY_FEATURE_DEFAULT_ON - value: "1" - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/var/opt/gitlab/templates' - - name: CONFIG_DIRECTORY - value: '/srv/gitlab/config' - {{- if $.Values.metrics.enabled }} - - name: prometheus_multiproc_dir - value: /metrics - {{- end }} - {{- if $.Values.global.rails.bootsnap.enabled }} - - name: ENABLE_BOOTSNAP - value: "1" - {{- end }} - - name: WORKER_PROCESSES - value: "{{ .workerProcesses }}" - - name: WORKER_TIMEOUT - value: "{{ $.Values.global.webservice.workerTimeout }}" - {{- if $.Values.http.enabled }} - - name: INTERNAL_PORT - value: "{{ $.Values.service.internalPort }}" - {{- end }} - {{- if $.Values.tls.enabled }} - - name: SSL_INTERNAL_PORT - value: {{ $.Values.service.tls.internalPort | quote }} - - name: PUMA_SSL_KEY - value: "/srv/gitlab/config/puma.key" - - name: PUMA_SSL_CERT - value: "/srv/gitlab/config/puma.crt" - {{- end }} - {{- if eq $.Values.webServer "puma" }} - - name: PUMA_THREADS_MIN - value: "{{ .puma.threads.min }}" - - name: PUMA_THREADS_MAX - value: "{{ .puma.threads.max }}" - - name: PUMA_WORKER_MAX_MEMORY - value: "{{ .puma.workerMaxMemory }}" - - name: DISABLE_PUMA_WORKER_KILLER - value: "{{ .puma.disableWorkerKiller }}" - {{- end }} - - name: SHUTDOWN_BLACKOUT_SECONDS - value: "{{ .shutdown.blackoutSeconds }}" - {{- include "gitlab.tracing.env" $ | nindent 12 }} - {{- if $.Values.global.tracing.urlTemplate }} - - name: GITLAB_TRACING_URL - value: {{ $.Values.global.tracing.urlTemplate | quote }} - {{- end }} - - name: WORKHORSE_ARCHIVE_CACHE_DISABLED - value: "true" - {{- include "webservice.extraEnv" (dict "global" $.Values.global "local" .) | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} - volumeMounts: - {{- if .sshHostKeys.mount }} - - name: {{ .sshHostKeys.mountName }} - mountPath: /etc/ssh - {{- end }} - {{- if $.Values.metrics.enabled }} - - name: webservice-metrics - mountPath: '/metrics' - {{- end }} - - name: webservice-config - mountPath: '/var/opt/gitlab/templates' - - name: webservice-secrets - mountPath: '/etc/gitlab' - readOnly: true - - name: webservice-secrets - mountPath: /srv/gitlab/config/secrets.yml - subPath: rails-secrets/secrets.yml - {{- if $.Values.tls.enabled }} - - name: webservice-secrets - mountPath: /srv/gitlab/config/puma.crt - subPath: puma/puma.crt - - name: webservice-secrets - mountPath: /srv/gitlab/config/puma.key - subPath: puma/puma.key - {{- end }} - - name: webservice-config - mountPath: '/etc/krb5.conf' - subPath: krb5.conf - {{- include "gitlab.appConfig.kerberos.volumeMount" $ | nindent 12 }} - - name: webservice-config - mountPath: '/srv/gitlab/config/initializers/smtp_settings.rb' - subPath: smtp_settings.rb - - name: webservice-config - mountPath: '/srv/gitlab/INSTALLATION_TYPE' - subPath: installation_type - - name: shared-upload-directory - mountPath: /srv/gitlab/public/uploads/tmp - readOnly: false - - name: shared-tmp - mountPath: '/tmp' - readOnly: false - {{- if $.Values.global.email.smime.enabled }} - - name: smime-creds - mountPath: /home/git/gitlab - readOnly: true - {{- end }} - {{- include "gitlab.certificates.volumeMount" $ | nindent 12 }} - {{- include "gitlab.extraVolumeMounts" $ | nindent 12 }} - {{- if .deployment.startupProbe }} - startupProbe: - {{- toYaml .deployment.startupProbe | nindent 12 }} - {{- end }} - livenessProbe: - httpGet: - path: /-/liveness - {{- if and (not $.Values.http.enabled) $.Values.tls.enabled }} - scheme: HTTPS - port: {{ $.Values.service.tls.internalPort }} - {{- else }} - port: {{ $.Values.service.internalPort }} - {{- end }} - initialDelaySeconds: {{ .deployment.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .deployment.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .deployment.livenessProbe.timeoutSeconds }} - successThreshold: {{ .deployment.livenessProbe.successThreshold }} - failureThreshold: {{ .deployment.livenessProbe.failureThreshold }} - readinessProbe: - httpGet: - path: /-/readiness - {{- if and (not $.Values.http.enabled) $.Values.tls.enabled }} - scheme: HTTPS - port: {{ $.Values.service.tls.internalPort }} - {{- else }} - port: {{ $.Values.service.internalPort }} - {{- end }} - initialDelaySeconds: {{ .deployment.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .deployment.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .deployment.readinessProbe.timeoutSeconds }} - successThreshold: {{ .deployment.readinessProbe.successThreshold }} - failureThreshold: {{ .deployment.readinessProbe.failureThreshold }} - lifecycle: - preStop: - exec: - command: ["/bin/bash", "-c", "pkill -SIGINT -o ruby"] - resources: - {{- toYaml .resources | nindent 12 }} - - name: gitlab-workhorse - image: "{{ coalesce $.Values.workhorse.image (include "workhorse.repository" $) }}:{{ coalesce $.Values.workhorse.tag (include "gitlab.versionTag" $ ) }}{{ include "gitlab.image.tagSuffix" $ }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- if $.Values.workhorse.containerSecurityContext }} - securityContext: - {{- toYaml $.Values.workhorse.containerSecurityContext | nindent 12 }} - {{- end }} - ports: - - containerPort: {{ $.Values.service.workhorseInternalPort }} - name: http-workhorse - {{- if or $.Values.workhorse.monitoring.exporter.enabled $.Values.workhorse.metrics.enabled }} - - containerPort: {{ $.Values.workhorse.monitoring.exporter.port }} - name: http-metrics-wh - {{- end }} - env: - - name: TMPDIR - value: "/tmp/gitlab" - - name: GITLAB_WORKHORSE_AUTH_BACKEND - value: "http://localhost:{{ $.Values.service.internalPort }}" - - name: GITLAB_WORKHORSE_EXTRA_ARGS - value: {{ .workhorse.extraArgs | quote }} - - name: GITLAB_WORKHORSE_LISTEN_PORT - value: {{ default 8181 $.Values.service.workhorseInternalPort | int | quote }} - - name: GITLAB_WORKHORSE_LOG_FORMAT - value: {{ .workhorse.logFormat | quote }} - - name: CONFIG_TEMPLATE_DIRECTORY - value: '/var/opt/gitlab/templates' - - name: CONFIG_DIRECTORY - value: '/srv/gitlab/config' - {{- if .workhorse.sentryDSN }} - - name: GITLAB_WORKHORSE_SENTRY_DSN - value: {{ .workhorse.sentryDSN }} - {{- end }} - - name: SHUTDOWN_BLACKOUT_SECONDS - value: "{{ .shutdown.blackoutSeconds }}" - {{- include "gitlab.tracing.env" $ | nindent 12 }} - {{- include "webservice.extraEnv" (dict "global" $.Values.global "local" .) | nindent 12 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} - volumeMounts: - - name: workhorse-config - mountPath: '/var/opt/gitlab/templates' - - name: workhorse-secrets - mountPath: '/etc/gitlab' - readOnly: true - - name: shared-upload-directory - mountPath: /srv/gitlab/public/uploads/tmp - readOnly: false - - name: shared-tmp - mountPath: '/tmp' - readOnly: false - {{- include "gitlab.certificates.volumeMount" $ | nindent 12 }} - {{- include "gitlab.appConfig.kerberos.volumeMount" $ | nindent 12 }} - {{- include "gitlab.extraVolumeMounts" $ | nindent 12 }} - {{- if .workhorse.startupProbe }} - startupProbe: - {{- toYaml .workhorse.startupProbe | nindent 12 }} - {{- end }} - lifecycle: - preStop: - exec: - command: - - /bin/bash - - -c - - sleep $SHUTDOWN_BLACKOUT_SECONDS - livenessProbe: - exec: - command: - - /scripts/healthcheck - initialDelaySeconds: {{ .workhorse.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .workhorse.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .workhorse.livenessProbe.timeoutSeconds }} - successThreshold: {{ .workhorse.livenessProbe.successThreshold }} - failureThreshold: {{ .workhorse.livenessProbe.failureThreshold }} - readinessProbe: - exec: - command: - - /scripts/healthcheck - initialDelaySeconds: {{ .workhorse.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .workhorse.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .workhorse.readinessProbe.timeoutSeconds }} - successThreshold: {{ .workhorse.readinessProbe.successThreshold }} - failureThreshold: {{ .workhorse.readinessProbe.failureThreshold }} - resources: - {{- toYaml .workhorse.resources | nindent 12 }} - {{- if .deployment.terminationGracePeriodSeconds }} - terminationGracePeriodSeconds: {{ .deployment.terminationGracePeriodSeconds | int }} - {{- end }} - volumes: - {{- if .sshHostKeys.mount }} - {{- include "webservice.sshHostKeys.volume" (dict "local" . "Release" $.Release "Values" $.Values) | nindent 6 }} - {{- end }} - {{- include "gitlab.extraVolumes" $ | nindent 6 }} - {{- include "gitlab.psql.ssl.volume" $ | nindent 6 }} - {{- include "gitlab.geo.psql.ssl.volume" $ | nindent 6 }} - {{- include "gitlab.appConfig.kerberos.volume" $ | nindent 6 }} - - name: shared-tmp - {{- include "gitlab.volume.emptyDir" .sharedTmpDir | nindent 8 }} - {{- if $.Values.metrics.enabled }} - - name: webservice-metrics - emptyDir: - medium: "Memory" - {{- end }} - - name: webservice-config - configMap: - name: {{ .fullname }} - - name: workhorse-config - configMap: - name: {{ $.Release.Name }}-workhorse-{{ .name }} - - name: init-webservice-secrets - projected: - defaultMode: 0400 - sources: - - secret: - name: {{ template "gitlab.rails-secrets.secret" $ }} - items: - - key: secrets.yml - path: rails-secrets/secrets.yml - - secret: - name: {{ template "gitlab.gitlab-shell.authToken.secret" $ }} - items: - - key: {{ template "gitlab.gitlab-shell.authToken.key" $ }} - path: shell/.gitlab_shell_secret - {{- if $.Values.tls.enabled }} - - secret: - name: {{ template "webservice.tls.secret" $ }} - items: - - key: "tls.crt" - path: "puma/puma.crt" - - key: "tls.key" - path: "puma/puma.key" - {{- end }} - {{- if $.Values.global.workhorse.tls.enabled }} - - secret: - name: {{ include "workhorse.tls.secret" $ }} - items: - - key: "tls.crt" - path: "gitlab-workhorse/tls.crt" - - key: "tls.key" - path: "gitlab-workhorse/tls.key" - {{- end }} - {{- if eq (include "webservice-metrics.tls.enabled" $) "true" }} - - secret: - name: {{ template "webservice-metrics.tls.secret" $ }} - items: - - key: "tls.crt" - path: "webservice-metrics/webservice-metrics.crt" - - key: "tls.key" - path: "webservice-metrics/webservice-metrics.key" - {{- end }} - {{- include "gitlab.appConfig.microsoftGraphMailer.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.incomingEmail.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.serviceDeskEmail.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.gitaly.clientSecrets" $ | nindent 10 }} - {{- include "gitlab.redis.secrets" $ | nindent 10 }} - {{- range $.Values.local.psql }} - {{- include "gitlab.psql.secret" . | nindent 10 }} - {{- end }} - {{- if include "gitlab.geo.secondary" $ }} - - secret: - name: {{ template "gitlab.geo.psql.password.secret" $ }} - items: - - key: {{ template "gitlab.geo.psql.password.key" $ }} - path: postgres/geo-psql-password - {{- end }} - - secret: - name: {{ template "gitlab.registry.certificate.secret" $ }} - items: - - key: registry-auth.key - path: registry/gitlab-registry.key - {{- include "gitlab.registry.notificationSecret.mount" $ | nindent 10 }} - - secret: - name: {{ template "gitlab.workhorse.secret" $ }} - items: - - key: {{ template "gitlab.workhorse.key" $ }} - path: gitlab-workhorse/secret - {{- include "gitlab.pages.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.kas.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.suggestedReviewers.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.minio.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "object_store" "config" $.Values.global.appConfig.object_store) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "artifacts" "config" $.Values.global.appConfig.artifacts) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "lfs" "config" $.Values.global.appConfig.lfs) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "uploads" "config" $.Values.global.appConfig.uploads) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "packages" "config" $.Values.global.appConfig.packages) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "external_diffs" "config" $.Values.global.appConfig.externalDiffs) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "terraform_state" "config" $.Values.global.appConfig.terraformState) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "ci_secure_files" "config" $.Values.global.appConfig.ciSecureFiles) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "dependency_proxy" "config" $.Values.global.appConfig.dependencyProxy) | nindent 10 }} - {{- include "gitlab.appConfig.objectStorage.mountSecrets" (dict "name" "pages" "config" $.Values.global.pages.objectStore) | nindent 10 }} - {{- include "gitlab.appConfig.ldap.servers.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.duo.mountSecrets" $ | nindent 10 }} - {{- include "gitlab.appConfig.omniauth.mountSecrets" $ | nindent 10 }} - {{- if and $.Values.global.smtp.enabled $.Values.global.smtp.authentication }} - - secret: - name: {{ $.Values.global.smtp.password.secret | required "Missing required secret containing the SMTP password. Make sure to set `global.smtp.password.secret`" }} - items: - - key: {{ $.Values.global.smtp.password.key }} - path: smtp/smtp-password - {{- end }} - {{- if and $.Values.global.appConfig.smartcard.enabled $.Values.global.appConfig.smartcard.CASecret }} - - secret: - name: {{ $.Values.global.appConfig.smartcard.CASecret }} - items: - - key: "ca.crt" - path: rails-secrets/smartcard-ca.crt - {{- end }} - {{- if $.Values.global.email.smime.enabled }} - - name: smime-creds - secret: - secretName: {{ $.Values.global.email.smime.secretName }} - items: - - key: {{ $.Values.global.email.smime.keyName }} - path: .gitlab_smime_key - - key: {{ $.Values.global.email.smime.certName }} - path: .gitlab_smime_cert - {{- end }} - - name: webservice-secrets - emptyDir: - medium: "Memory" - - name: workhorse-secrets - emptyDir: - medium: "Memory" - - name: shared-upload-directory - {{- include "gitlab.volume.emptyDir" .sharedUploadDir | nindent 8 }} - {{- include "gitlab.certificates.volumes" $ | nindent 6 }} -{{- end }}{{/* END range deployments */}} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/hpa.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/hpa.yaml deleted file mode 100644 index 61ffd0380..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/hpa.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.enabled -}} -{{- include "webservice.datamodel.prepare" $ -}} -{{/* BEGIN range deployments */}} -{{- range $.Values.deployments -}} -{{- $hpaCfg := (dict "global" $.Values.global.hpa "local" .hpa "context" $) -}} -{{/* -From here on: -- `.` is `.deployments.xyz` value -- `.name` is the key (xyz) -*/}} ---- -apiVersion: {{ template "gitlab.hpa.apiVersion" $hpaCfg }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "webservice.fullname.withSuffix" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "webservice.labels" . | nindent 4 }} - {{- include "webservice.commonLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "webservice.fullname.withSuffix" . }} - minReplicas: {{ .hpa.minReplicas }} - maxReplicas: {{ .hpa.maxReplicas }} - {{- include "gitlab.hpa.metrics" $hpaCfg | nindent 2 }} - {{- include "gitlab.hpa.behavior" $hpaCfg | nindent 2 }} -{{- end }} -{{/* END range deployments */}} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/ingress.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/ingress.yaml deleted file mode 100644 index f07d45a34..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/ingress.yaml +++ /dev/null @@ -1,80 +0,0 @@ -{{- if .Values.enabled -}}{{/* ENABLED */}} -{{- if eq (include "gitlab.ingress.enabled" $) "true" -}}{{/* INGRESS ENABLED */}} -{{- $gitlabHostname := include "gitlab.gitlab.hostname" $ -}} -{{- if .Values.global.hosts.gitlab.hostnameOverride -}} -{{- $gitlabHostname = .Values.global.hosts.gitlab.hostnameOverride -}} -{{- end -}} -{{- $tlsSecret := include "webservice.tlsSecret" $ -}} -{{- include "webservice.datamodel.prepare" $ -}} -{{/* BEGIN range deployments */}} -{{- range $.Values.deployments -}} -{{- if .ingress.path -}}{{/* SET .ingress.path */}} -{{/* -From here on: -- `.` is `.deployments.xyz` value -- `.name` is the key (xyz) -*/}} -{{- $ingressCfg := dict "global" $.Values.global.ingress "local" .ingress "context" $ -}} ---- -apiVersion: {{ template "gitlab.ingress.apiVersion" $ingressCfg }} -kind: Ingress -metadata: - name: {{ template "webservice.fullname.withSuffix" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "webservice.labels" . | nindent 4 }} - {{- include "webservice.commonLabels" . | nindent 4 }} - annotations: - {{ include "ingress.class.annotation" $ingressCfg }} - kubernetes.io/ingress.provider: "{{ template "gitlab.ingress.provider" $ingressCfg }}" - {{- if eq "nginx" (default $.Values.global.ingress.provider .ingress.provider) }} - {{- if $.Values.global.workhorse.tls.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: https - {{- if pluck "verify" .workhorse.tls (dict "verify" true) | first }} - nginx.ingress.kubernetes.io/proxy-ssl-verify: 'on' - nginx.ingress.kubernetes.io/proxy-ssl-name: {{ include "webservice.fullname.withSuffix" . }}.{{ $.Release.Namespace }}.svc - {{- if .workhorse.tls.caSecretName }} - nginx.ingress.kubernetes.io/proxy-ssl-secret: {{ $.Release.Namespace }}/{{ .workhorse.tls.caSecretName }} - {{- end }} - {{- end }} - {{- end }} - nginx.ingress.kubernetes.io/proxy-body-size: {{ .ingress.proxyBodySize | quote }} - nginx.ingress.kubernetes.io/proxy-read-timeout: {{ .ingress.proxyReadTimeout | quote }} - nginx.ingress.kubernetes.io/proxy-connect-timeout: {{ .ingress.proxyConnectTimeout | quote }} - {{- end }} - {{- include "gitlab.certmanager_annotations" $ | nindent 4 }} - {{- range $key, $value := merge .ingress.annotations $.Values.global.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - {{ include "ingress.class.field" $ingressCfg }} - rules: - - host: {{ $gitlabHostname }} - http: - paths: - - path: {{ .ingress.path }} - {{ if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (eq $.Values.global.ingress.apiVersion "networking.k8s.io/v1") -}} - pathType: {{ default .ingress.pathType $.Values.global.ingress.pathType }} - backend: - service: - name: {{ template "webservice.fullname.withSuffix" . }} - port: - number: {{ $.Values.service.workhorseExternalPort }} - {{- else -}} - backend: - serviceName: {{ template "webservice.fullname.withSuffix" . }} - servicePort: {{ $.Values.service.workhorseExternalPort }} - {{- end -}} - {{- if (and $tlsSecret (eq (include "gitlab.ingress.tls.enabled" $) "true" )) }} - tls: - - hosts: - - {{ $gitlabHostname }} - secretName: {{ $tlsSecret }} - {{- else }} - tls: [] - {{- end }} -{{- end -}} -{{- end -}}{{/* SET .ingress.path */}} -{{- end -}}{{/* INGRESS ENABLED */}} -{{- end -}}{{/* ENABLED */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/ingress_smartcard.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/ingress_smartcard.yaml deleted file mode 100644 index 2a4055c9f..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/ingress_smartcard.yaml +++ /dev/null @@ -1,80 +0,0 @@ -{{- if $.Values.global.appConfig.smartcard.enabled -}} -{{- if eq (include "gitlab.ingress.enabled" $) "true" -}} -{{- $smartcardHostname := include "gitlab.smartcard.hostname" . -}} -{{- $tlsSecret := include "smartcard.tlsSecret" . -}} -{{/* BEGIN range deployments */}} -{{- range $.Values.deployments -}} -{{- if has .ingress.path (list "/" "/*") }} -{{/* -From here on: -- `.` is `.deployments.xyz` value -- `.name` is the key (xyz) -*/}} -{{- $ingressCfg := dict "global" $.Values.global.ingress "local" .ingress "context" $ -}} ---- -apiVersion: {{ template "gitlab.ingress.apiVersion" $ingressCfg }} -kind: Ingress -metadata: - name: {{ template "webservice.fullname.withSuffix" . }}-smartcard - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "gitlab.commonLabels" $ | nindent 4 }} - annotations: - {{ include "ingress.class.annotation" $ingressCfg }} - kubernetes.io/ingress.provider: "{{ template "gitlab.ingress.provider" $ingressCfg }}" - {{- if eq "nginx" $.Values.global.ingress.provider }} - {{- if $.Values.global.workhorse.tls.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: https - {{- if pluck "verify" .workhorse.tls (dict "verify" true) | first }} - nginx.ingress.kubernetes.io/proxy-ssl-verify: 'on' - nginx.ingress.kubernetes.io/proxy-ssl-name: {{ include "webservice.fullname.withSuffix" . }}.{{ $.Release.Namespace }}.svc - {{- if .workhorse.tls.caSecretName }} - nginx.ingress.kubernetes.io/proxy-ssl-secret: {{ $.Release.Namespace }}/{{ .workhorse.tls.caSecretName }} - {{- end }} - {{- end }} - {{- end }} - nginx.ingress.kubernetes.io/proxy-body-size: {{ $.Values.ingress.proxyBodySize | quote }} - nginx.ingress.kubernetes.io/proxy-read-timeout: {{ $.Values.ingress.proxyReadTimeout | quote }} - nginx.ingress.kubernetes.io/proxy-connect-timeout: {{ $.Values.ingress.proxyConnectTimeout | quote }} - nginx.ingress.kubernetes.io/auth-tls-verify-client: 'on' - nginx.ingress.kubernetes.io/auth-tls-verify-depth: '2' - nginx.ingress.kubernetes.io/auth-tls-secret: '{{ $.Release.Namespace }}/{{ $.Values.global.appConfig.smartcard.CASecret }}' - nginx.ingress.kubernetes.io/configuration-snippet: | - proxy_set_header X-SSL-Client-Certificate $ssl_client_escaped_cert; - {{- end }} - {{- include "gitlab.certmanager_annotations" $ | nindent 4 }} - {{- range $key, $value := merge $.Values.ingress.annotations $.Values.global.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - {{ include "ingress.class.field" $ingressCfg }} - rules: - - host: {{ $smartcardHostname }} - http: - paths: - - path: {{ .ingress.path }} - {{ if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (eq $.Values.global.ingress.apiVersion "networking.k8s.io/v1") -}} - pathType: {{ default $.Values.global.ingress.pathType .ingress.pathType }} - backend: - service: - name: {{ template "webservice.fullname.withSuffix" . }} - port: - number: {{ $.Values.service.workhorseExternalPort }} - {{- else -}} - backend: - serviceName: {{ template "webservice.fullname.withSuffix" . }} - servicePort: {{ $.Values.service.workhorseExternalPort }} - {{- end -}} - {{- if (and $tlsSecret (eq (include "gitlab.ingress.tls.enabled" $) "true" )) }} - tls: - - hosts: - - {{ $smartcardHostname }} - secretName: {{ $tlsSecret }} - {{- else }} - tls: [] - {{- end }} -{{- end -}} -{{- end -}} -{{- end -}}{{/* SET .ingress.path */}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/networkpolicy.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/networkpolicy.yaml deleted file mode 100644 index 7cc1c1ed6..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/networkpolicy.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.enabled -}} -{{- if .Values.networkpolicy.enabled -}} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ template "fullname" . }}-v1 - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{ toYaml .Values.networkpolicy.annotations | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "gitlab.selectorLabels" $ | nindent 6 }} - policyTypes: - {{- if .Values.networkpolicy.egress.enabled }} - - Egress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - - Ingress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - ingress: - {{ toYaml .Values.networkpolicy.ingress.rules | nindent 4 }} - {{- end -}} - {{- if .Values.networkpolicy.egress.enabled }} - egress: - {{ toYaml .Values.networkpolicy.egress.rules | nindent 4 }} - {{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/pdb.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/pdb.yaml deleted file mode 100644 index 59d5e0aae..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/pdb.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if .Values.enabled -}} -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -{{- include "webservice.datamodel.prepare" $ -}} -{{/* BEGIN range deployments */}} -{{- range $.Values.deployments -}} -{{/* -From here on: -- `.` is `.deployments.xyz` value -- `.name` is the key (xyz) -*/}} ---- -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - name: {{ template "webservice.fullname.withSuffix" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "webservice.labels" . | nindent 4 }} - {{- include "webservice.commonLabels" . | nindent 4 }} -spec: - maxUnavailable: {{ .pdb.maxUnavailable }} - selector: - matchLabels: - {{- include "gitlab.selectorLabels" $ | nindent 6 }} - {{ include "webservice.labels" . | nindent 6 }} -{{- end }} -{{/* END range deployments */}} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/service.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/service.yaml deleted file mode 100644 index 8162ca7ad..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/service.yaml +++ /dev/null @@ -1,78 +0,0 @@ -{{- if .Values.enabled }} -{{- include "webservice.datamodel.prepare" $ -}} -{{/* BEGIN range deployments */}} -{{- range $.Values.deployments -}} -{{/* -From here on: -- `.` is `.deployments.xyz` value -- `.name` is the key (xyz) -*/}} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ template "webservice.fullname.withSuffix" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" $ | nindent 4 }} - {{- include "gitlab.serviceLabels" $ | nindent 4 }} - {{- include "webservice.labels" . | nindent 4 }} - {{- include "webservice.commonLabels" . | nindent 4 }} - {{- if .service.labels -}} - {{- toYaml .service.labels | nindent 4 }} - {{- end }} - annotations: - {{- include "gitlab.serviceAnnotations" $ | nindent 4 }} - {{- if .service.annotations -}} - {{- toYaml .service.annotations | nindent 4 }} - {{- end }} -spec: - type: {{ .service.type }} - {{- if (and (eq .service.type "LoadBalancer") (not (empty .service.loadBalancerIP))) }} - loadBalancerIP: {{ .service.loadBalancerIP }} - {{- end }} - {{- if (and (eq .service.type "LoadBalancer") (not (empty .service.loadBalancerSourceRanges))) }} - loadBalancerSourceRanges: - {{- range .service.loadBalancerSourceRanges }} - - {{ . | quote }} - {{- end }} - {{- end }} - ports: - {{- if $.Values.http.enabled }} - - port: {{ $.Values.service.externalPort }} - targetPort: http-webservice - protocol: TCP - name: http-webservice - {{- end }} - - port: {{ $.Values.service.workhorseExternalPort }} - targetPort: http-workhorse - protocol: TCP - name: {{ $.Values.global.workhorse.tls.enabled | ternary "https" "http" }}-workhorse - {{- if $.Values.tls.enabled }} - - port: {{ $.Values.service.tls.externalPort }} - targetPort: https-ws - protocol: TCP - name: https-ws - {{- end }} - - {{- if or $.Values.monitoring.exporter.enabled (and $.Values.metrics.enabled (eq $.Values.metrics.port $.Values.monitoring.exporter.port)) }} - - port: {{ $.Values.monitoring.exporter.port }} - targetPort: http-metrics-ws - protocol: TCP - {{- $metricsTlsEnabled := eq (include "webservice-metrics.tls.enabled" $) "true" }} - name: {{ $metricsTlsEnabled | ternary "https" "http" }}-metrics-ws - {{- end }} - {{- if or $.Values.workhorse.monitoring.exporter.enabled $.Values.workhorse.metrics.enabled }} - - port: {{ $.Values.workhorse.monitoring.exporter.port }} - targetPort: http-metrics-wh - protocol: TCP - {{- $exporterTlsEnabled := eq (include "workhorse.monitoring.exporter.tls.enabled" $) "true" }} - name: {{ $exporterTlsEnabled | ternary "https" "http" }}-metrics-wh - {{- end }} - selector: - app: {{ template "name" $ }} - release: {{ $.Release.Name }} - {{ include "webservice.labels" . | nindent 4 }} -{{- end }} -{{/* END range deployments */}} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/serviceaccount.yaml deleted file mode 100644 index 16435d96b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "gitlab.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 -}} - {{- include "gitlab.commonLabels" . | nindent 4 -}} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/servicemonitor-workhorse.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/servicemonitor-workhorse.yaml deleted file mode 100644 index d442b7b44..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/servicemonitor-workhorse.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if and .Values.enabled .Values.workhorse.metrics.enabled .Values.workhorse.metrics.serviceMonitor.enabled -}} -{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "fullname" . }}-workhorse - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with .Values.workhorse.metrics.serviceMonitor.additionalLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - app: {{ template "name" $ }} - release: {{ $.Release.Name }} - endpoints: - - port: http-metrics-wh - path: {{ .Values.workhorse.metrics.path }} - {{- with .Values.workhorse.metrics.serviceMonitor.endpointConfig }} - {{- toYaml . | nindent 6 }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/servicemonitor.yaml deleted file mode 100644 index 3b1132865..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/servicemonitor.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if and .Values.enabled .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled -}} -{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with .Values.metrics.serviceMonitor.additionalLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - app: {{ template "name" $ }} - release: {{ $.Release.Name }} - endpoints: - - port: http-metrics-ws - path: {{ .Values.metrics.path }} - {{- with .Values.metrics.serviceMonitor.endpointConfig }} - {{- toYaml . | nindent 6 }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/tests/test-runner.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/tests/test-runner.yaml deleted file mode 100644 index e7b66679f..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/tests/test-runner.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if and .Values.enabled .Values.helmTests.enabled -}} -apiVersion: v1 -kind: Pod -metadata: - name: {{ template "fullname" . }}-test-runner-{{ randAlphaNum 5 | lower }} - namespace: {{ $.Release.Namespace }} - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": hook-succeeded,hook-failed,before-hook-creation - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - containers: - - name: test-runner - image: {{ include "webservice.image" . }} - command: ['sh', '/tests/test_login'] - volumeMounts: - - name: tests - mountPath: '/tests' - - name: root-password - readOnly: true - mountPath: /initial_root_password - subPath: initial_root_password - volumes: - - name: tests - configMap: - name: {{ template "fullname" . }}-tests - - name: root-password - secret: - secretName: {{ template "gitlab.migrations.initialRootPassword.secret" . }} - items: - - key: {{ template "gitlab.migrations.initialRootPassword.key" . }} - path: initial_root_password - restartPolicy: Never - {{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/tests/tests.yaml b/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/tests/tests.yaml deleted file mode 100644 index 609c571c2..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/charts/webservice/templates/tests/tests.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if and .Values.enabled .Values.helmTests.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }}-tests - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - test_login: | - set -e - echo 'Start Test' - endpoint="{{ template "gitlab.gitlab.url" . }}" - cookie_read="-c /tmp/test_login.cookie" - cookie_readwrite="$cookie_read -b /tmp/test_login.cookie" - - signin_url="$endpoint/users/sign_in" - echo "Login to create a session: $signin_url" - csrf=$(curl -L $signin_url --fail -s $cookie_read | grep -Po ' - host: {{ include "gitlab.psql.host" $context | quote }} - port: {{ template "gitlab.psql.port" $context }} - connect_timeout: {{ template "gitlab.psql.connectTimeout" $context }} - keepalives: {{ template "gitlab.psql.keepalives" $context }} - keepalives_idle: {{ template "gitlab.psql.keepalivesIdle" $context }} - keepalives_interval: {{ template "gitlab.psql.keepalivesInterval" $context }} - keepalives_count: {{ template "gitlab.psql.keepalivesCount" $context }} - tcp_user_timeout: {{ template "gitlab.psql.tcpUserTimeout" $context }} - application_name: {{ template "gitlab.psql.applicationName" $context }} - prepared_statements: {{ template "gitlab.psql.preparedStatements" $context }} - database_tasks: {{ template "gitlab.psql.databaseTasks" $context }} - {{- include "gitlab.database.loadBalancing" $context | nindent 4 }} - {{- include "gitlab.psql.ssl.config" $context | nindent 4 }} -{{- end -}} -{{- end }} -{{- if include "gitlab.geo.secondary" . }} -{{- include "gitlab.geo.database.yml" . | nindent 2 }} -{{- end }} -{{- end -}} - -{{/* -Return if the database is enabled -Returns psql.enabled if it is a boolean, -otherwise it will fallback to "true" default -*/}} -{{- define "gitlab.psql.database.enabled" -}} -{{- $globalSet := and (hasKey .Values.global.psql "enabled") (kindIs "bool" .Values.global.psql.enabled) -}} -{{- if $globalSet }} -{{- .Values.global.psql.enabled }} -{{- else }} -{{- true }} -{{- end -}} -{{- end -}} - -{{/* -Sets 'databaseTasks: false' if the additional database points to the same database -as 'main:', where the db, host and port do match. -*/}} -{{- define "gitlab.database.setDefaultForDatabaseTasks" -}} -{{- $mainDB := include "gitlab.psql.database" $.Values.local.psql.main -}} -{{- $mainHost := include "gitlab.psql.host" $.Values.local.psql.main -}} -{{- $mainPort := include "gitlab.psql.port" $.Values.local.psql.main -}} -{{- range $database := without (keys $.Values.local.psql) "main" -}} -{{- $context := get $.Values.local.psql $database -}} -{{- $currentDB := include "gitlab.psql.database" $context -}} -{{- $currentHost := include "gitlab.psql.host" $context -}} -{{- $currentPort := include "gitlab.psql.port" $context -}} -{{- if and (not (hasKey $context.Values.psql "databaseTasks")) (not (hasKey $context.Values.global.psql "databaseTasks")) -}} -{{- if and (eq $currentDB $mainDB) (eq $currentHost $mainHost) (eq $currentPort $mainPort) -}} -{{- $_ := set $context.Values.global.psql "databaseTasks" false -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the contents of `load_balancing` section of database.yml - -See https://docs.gitlab.com/ee/administration/database_load_balancing.html#enabling-load-balancing - -Note: Many `if` used here, allowing Rails to provide defaults inside the codebase. -*/}} -{{- define "gitlab.database.loadBalancing" -}} -{{- with default .Values.global.psql .Values.psql -}} -{{- if kindIs "map" .load_balancing -}} -load_balancing: - {{- if kindIs "slice" .load_balancing.hosts }} - hosts: - {{- toYaml .load_balancing.hosts | nindent 2 }} - {{- else if kindIs "map" .load_balancing.discover }} - discover: - {{- with .load_balancing.discover -}} - {{- if index . "nameserver" }} - nameserver: {{ .nameserver }} - {{- end }} - record: {{ .record | required "`psql.load_balancing.discover` requires `record` to be provided." | quote }} - {{- if index . "record_type" }} - record_type: {{ .record_type | quote }} - {{- end }} - {{- if index . "port" }} - port: {{ .port | int }} - {{- end }} - {{- if index . "interval" }} - interval: {{ .interval | int }} - {{- end }} - {{- if index . "disconnect_timeout" }} - disconnect_timeout: {{ .disconnect_timeout | int }} - {{- end }} - {{- if index . "use_tcp" }} - use_tcp: {{ empty .use_tcp | not }} - {{- end -}} - {{- if index . "max_replica_pools" }} - max_replica_pools: {{ .max_replica_pools | int }} - {{- end }} - {{- end -}} - {{- end }} - {{- if index .load_balancing "max_replication_difference" }} - max_replication_difference: {{ .load_balancing.max_replication_difference | int }} - {{- end }} - {{- if index .load_balancing "max_replication_lag_time" }} - max_replication_lag_time: {{ .load_balancing.max_replication_lag_time | int }} - {{- end }} - {{- if index .load_balancing "replica_check_interval" }} - replica_check_interval: {{ .load_balancing.replica_check_interval | int }} - {{- end }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_databaseDatamodel.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_databaseDatamodel.tpl deleted file mode 100644 index 89d923bf4..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_databaseDatamodel.tpl +++ /dev/null @@ -1,76 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -database.datamodel.blank - -Called with context of `.Values[.global].psql`. - -Returns a deepCopy of context, with some keys removed. - -Removed: - - all .knownDecompositions [main, ci, ...] -*/}} -{{- define "database.datamodel.blank" -}} -{{- $psql := deepCopy . -}} -{{- $_ := unset $psql "knownDecompositions" -}} -{{- range $decomposedDatabase := .knownDecompositions -}} -{{- $_ := unset $psql $decomposedDatabase -}} -{{- end -}} -{{ $psql | toYaml }} -{{- end -}} - -{{/* -database.datamodel.prepare - -Result: - `.Values.local.psql` contains a fully composed datamodel of psql properties - to be passed as the context to other helpers. Which Schema you are in can - be found via `.Schema`. - -How: - - mergeOverwrite `main` into `x.psql` (if present), so that `main` is the base of future blank - - ensure `main` exists in both global and local from future blank, if not present. - - ensure `ci` exists in both global and local from future blank, if not present. - - mergeOverwrite `.global.psql` `.global.psql.x` - - mergeOverwrite `.psql` `.psql.x` - - build $context dict, with .Release .Values.global.psql .Values.psql - -Example object - - local: - psql: - main: - Schema: main - Release: # pointer to $.Release - Values: - global: - psql: # mirrored from .Values.global.psql - psql: # mirrored from .Values.psql - ci: - Schema: ci - Release: # pointer to $.Release - Values: - global: - psql: # mirrored from .Values.global.psql - psql: # mirrored from .Values.psql -*/}} -{{- define "database.datamodel.prepare" -}} -{{- if not (hasKey (get $.Values "local" | default (dict)) "psql") -}} -{{- $_ := set $.Values "local" (dict "psql" (dict)) -}} -{{- $global := mergeOverwrite (deepCopy $.Values.global.psql) (deepCopy (get $.Values.global.psql "main" | default (dict))) -}} -{{- $globalBlank := fromYaml (include "database.datamodel.blank" $global) -}} -{{- $_ := set $global "main" (deepCopy (get $.Values.global.psql "main" | default $globalBlank)) -}} -{{- $_ := set $global "ci" (deepCopy (get $.Values.global.psql "ci" | default $globalBlank)) -}} -{{- $local := mergeOverwrite (deepCopy $.Values.psql) (deepCopy (get $.Values.psql "main") | default (dict)) -}} -{{- $localBlank := fromYaml (include "database.datamodel.blank" $local) -}} -{{- $_ := set $local "main" (deepCopy (get $.Values.psql "main" | default $localBlank)) -}} -{{- $_ := set $local "ci" (deepCopy (get $.Values.psql "ci" | default $localBlank)) -}} -{{- range $decomposedDatabase := $global.knownDecompositions -}} -{{- if or (hasKey $global $decomposedDatabase) (hasKey $local $decomposedDatabase) -}} -{{- $globalSchema := mergeOverwrite (deepCopy $globalBlank) (get $global $decomposedDatabase | default (dict)) -}} -{{- $localSchema := mergeOverwrite (deepCopy $localBlank) (get $local $decomposedDatabase | default (dict)) -}} -{{- $context := dict "Schema" $decomposedDatabase "Release" $.Release "Values" (dict "global" (dict "psql" $globalSchema) "psql" ($localSchema) ) -}} -{{- $_ := set $.Values.local.psql $decomposedDatabase $context -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_defaultProjectsFeatures.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_defaultProjectsFeatures.tpl deleted file mode 100644 index 7554e00eb..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_defaultProjectsFeatures.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "gitlab.appConfig.defaultProjectsFeatures.configuration" -}} -{{- with .Values.global.appConfig -}} -default_projects_features: - issues: {{ eq .defaultProjectsFeatures.issues true }} - merge_requests: {{ eq .defaultProjectsFeatures.mergeRequests true }} - wiki: {{ eq .defaultProjectsFeatures.wiki true }} - snippets: {{ eq .defaultProjectsFeatures.snippets true }} - builds: {{ eq .defaultProjectsFeatures.builds true }} - container_registry: {{ or (not (kindIs "bool" .defaultProjectsFeatures.containerRegistry)) .defaultProjectsFeatures.containerRegistry }} -{{- end -}} -{{- end -}}{{/* "gitlab.appConfig.defaultProjectsFeatures.configuration" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_dependencyProxy.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_dependencyProxy.tpl deleted file mode 100644 index 37b4c9b9b..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_dependencyProxy.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{/* -Generates a templated config for dependencyProxy keys in gitlab.yml. - -Usage: -{{ include "gitlab.appConfig.dependencyProxy.configuration" ( \ - dict \ - "config" .Values.path.to.dependencyProxy.config \ - "context" $ \ - ) }} -*/}} -{{- define "gitlab.appConfig.dependencyProxy.configuration" -}} -dependency_proxy: - enabled: {{ if kindIs "bool" .config.enabled }}{{ eq .config.enabled true }}{{ end }} - {{- if not .context.Values.global.appConfig.object_store.enabled }} - {{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "dependency_proxy" "config" .config "context" .context) | nindent 2 }} - {{- end }} -{{- end -}}{{/* "gitlab.appConfig.dependencyProxy.configuration" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_duo_auth.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_duo_auth.tpl deleted file mode 100644 index 2e5aee3ba..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_duo_auth.tpl +++ /dev/null @@ -1,38 +0,0 @@ - -{{- define "gitlab.appConfig.duo.secretKey.key" -}} -{{ with $.Values.global.appConfig }} -{{- if .duoAuth.secretKey }} -{{- default "secretKey" $.Values.global.appConfig.duoAuth.secretKey.key -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.duo.secretKey.path" -}} -{{ with $.Values.global.appConfig }} -{{- if .duoAuth.secretKey }} - {{- printf "/etc/gitlab/duo/%s/%s" .duoAuth.secretKey.secret ( include "gitlab.appConfig.duo.secretKey.key" $) -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.appConfig.duo.configuration" -}} -{{ with $.Values.global.appConfig }} -duo_auth: - enabled: {{ eq .duoAuth.enabled true }} - hostname: {{ .duoAuth.hostname }} - integration_key: {{ .duoAuth.integrationKey }} - secret_key: {{ .duoAuth.enabled | ternary (printf "<%= File.read('%s').strip.to_json() %>" (include "gitlab.duo.secretKey.path" $)) "" }} -{{- end -}} -{{- end -}} - -{{- define "gitlab.appConfig.duo.mountSecrets" -}} -{{- with $.Values.global.appConfig -}} -{{- if .duoAuth.secretKey }} -- secret: - name: {{ .duoAuth.secretKey.secret }} - items: - - key: {{ include "gitlab.appConfig.duo.secretKey.key" $ }} - path: {{ printf "duo/%s/%s" .duoAuth.secretKey.secret (include "gitlab.appConfig.duo.secretKey.key" $) }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_externaldiffs.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_externaldiffs.tpl deleted file mode 100644 index e255df477..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_externaldiffs.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{{/* -Generates a templated config for external_diffs key in gitlab.yml. - -Usage: -{{ include "gitlab.appConfig.external_diffs.configuration" ( \ - dict \ - "config" .Values.path.to.external_diffs.config \ - "context" $ \ - ) }} -*/}} -{{- define "gitlab.appConfig.external_diffs.configuration" -}} -external_diffs: - enabled: {{ if kindIs "bool" .config.enabled }}{{ eq .config.enabled true }}{{ end }} - when: {{ .config.when }} - {{- if not .context.Values.global.appConfig.object_store.enabled }} - {{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "external_diffs" "config" .config "context" .context) | nindent 2 }} - {{- end -}} -{{- end -}}{{/* "gitlab.appConfig.external_diffs.configuration" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_geo.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_geo.tpl deleted file mode 100644 index 2ac73a2c5..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_geo.tpl +++ /dev/null @@ -1,109 +0,0 @@ -{{/* ######## Geo related templates */}} -{{/* -Returns "secondary" if geo.enabled & geo.role: secondary -*/}} -{{- define "gitlab.geo.secondary" -}} -{{- with .Values.global.geo -}} -{{- if and (eq true (default false .enabled)) ( eq "secondary" (default "primary" (lower .role))) -}} -secondary -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.geo.config" -}} -{{- if .Values.global.geo.enabled -}} -geo: - node_name: {{ default "" .Values.global.geo.nodeName }} - registry_replication: - enabled: {{ eq true (default false .Values.global.geo.registry.replication.enabled) }} - primary_api_url: {{ .Values.global.geo.registry.replication.primaryApiUrl | quote }} -{{- end -}} -{{- end -}} - -{{/* -Returns the contents of the `database_geo.yml` blob - -As the Rails application checks for the existance of `database_geo.yml`, -this should not be included _at all_ unless `gitlab.geo.secondary`. As -such, we don't check that state here. -*/}} -{{- define "gitlab.geo.database.yml" -}} -geo: - adapter: postgresql - encoding: unicode - database_tasks: true - database: {{ template "gitlab.geo.psql.database" . }} - username: {{ template "gitlab.geo.psql.username" . }} - password: <%= File.read("/etc/gitlab/postgres/geo-psql-password").strip.to_json %> - host: {{ template "gitlab.geo.psql.host" . }} - port: {{ template "gitlab.geo.psql.port" . }} - # load_balancing: - # hosts: - # - host1.example.com - # - host2.example.com - {{- include "gitlab.geo.psql.ssl.config" . | nindent 2 }} -{{- end -}} - -{{/* -Returns parts for a Gitlab configuration to setup a mutual TLS connection -with the Geo PostgreSQL database. - -Consumed as part of "gitlab.geo.database.yml", no check of `global.geo.secondary` -*/}} -{{- define "gitlab.geo.psql.ssl.config" -}} -{{- if .Values.global.geo.psql.ssl }} -sslmode: verify-ca -sslrootcert: '/etc/gitlab/postgres/ssl/geo-server-ca.pem' -sslcert: '/etc/gitlab/postgres/ssl/geo-client-certificate.pem' -sslkey: '/etc/gitlab/postgres/ssl/geo-client-key.pem' -{{- end -}} -{{- end -}} - -{{/* -Returns volume definition of a secret containing information required for -a mutual TLS connection to the Geo Secondary DB. -*/}} -{{- define "gitlab.geo.psql.ssl.volume" -}} -{{- if and ( include "gitlab.geo.secondary" $ ) .Values.global.geo.psql.ssl }} -- name: geo-postgresql-ssl-secrets - projected: - defaultMode: 400 - sources: - - secret: - name: {{ .Values.global.geo.psql.ssl.secret | required "Missing required secret containing SQL SSL certificates and keys. Make sure to set `global.geo.psql.ssl.secret`" }} - items: - - key: {{ .Values.global.geo.psql.ssl.serverCA | required "Missing required key name of SQL server certificate. Make sure to set `global.geo.psql.ssl.serverCA`" }} - path: geo-server-ca.pem - - key: {{ .Values.global.geo.psql.ssl.clientCertificate | required "Missing required key name of SQL client certificate. Make sure to set `global.geo.psql.ssl.clientCertificate`" }} - path: geo-client-certificate.pem - - key: {{ .Values.global.geo.psql.ssl.clientKey | required "Missing required key name of SQL client key file. Make sure to set `global.geo.psql.ssl.clientKey`" }} - path: geo-client-key.pem -{{- end -}} -{{- end -}} - -{{/* -Returns mount definition for the volume mount definition above. -*/}} -{{- define "gitlab.geo.psql.ssl.volumeMount" -}} -{{- if and ( include "gitlab.geo.secondary" $ ) .Values.global.geo.psql.ssl }} -- name: geo-postgresql-ssl-secrets - mountPath: '/etc/postgresql/geo/ssl/' - readOnly: true -{{- end -}} -{{- end -}} - -{{/* -Returns a shell script snippet, which extends the script of a configure -container to copy the mutual TLS files to the proper location. Further -it sets the permissions correctly. -*/}} -{{- define "gitlab.geo.psql.ssl.initScript" -}} -{{- if and ( include "gitlab.geo.secondary" $ ) .Values.global.geo.psql.ssl }} -if [ -d /etc/postgresql/geo/ssl ]; then - mkdir -p /${secret_dir}/postgres/ssl - cp -v -r -L /etc/postgresql/geo/ssl/* /${secret_dir}/postgres/ssl/ - chmod 600 /${secret_dir}/postgres/ssl/* - chmod 700 /${secret_dir}/postgres/ssl -fi -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_gitaly.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_gitaly.tpl deleted file mode 100644 index 604f47f15..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_gitaly.tpl +++ /dev/null @@ -1,87 +0,0 @@ -{{/* ######### Gitaly related templates */}} - -{{/* -Return gitaly host for internal statefulsets -*/}} -{{- define "gitlab.gitaly.storage.internal" -}} -{{- $releaseName := .Release.Name -}} -{{- range $i, $storage := .Values.global.gitaly.internal.names -}} -{{- $qualServiceName := (include "gitlab.gitaly.qualifiedServiceName" (dict "index" $i "context" $ ) ) -}} -{{- printf "%s:\n" $storage -}} -{{- printf "path: /var/opt/gitlab/repo\n" | indent 2 -}} -{{- if $.Values.global.gitaly.tls.enabled }} -{{- printf "gitaly_address: tls://%s.%s.svc:%d\n" $qualServiceName $.Release.Namespace 8076 -}} -{{- else }} -{{- printf "gitaly_address: tcp://%s.%s.svc:%d\n" $qualServiceName $.Release.Namespace 8075 -}} -{{- end -}} -{{- end -}} -{{- end }} - - -{{/* -Return gitaly storage for external hosts -*/}} -{{- define "gitlab.gitaly.storage.external" -}} -{{- range $i, $storage := .Values.global.gitaly.external -}} -{{- printf "%s:\n" $storage.name -}} -{{- printf "path: /var/opt/gitlab/repo\n" | indent 2 -}} -{{- if include "gitlab.boolean.local" (dict "global" $.Values.global.gitaly.tls.enabled "local" $storage.tlsEnabled "default" false) }} -{{- printf "gitaly_address: tls://%s:%d\n" $storage.hostname (default 8076 $storage.port | int64) -}} -{{- else }} -{{- printf "gitaly_address: tcp://%s:%d\n" $storage.hostname (default 8075 $storage.port | int64) -}} -{{- end -}} -{{- end -}} -{{- end -}} - - -{{/* -Return the gitaly storages list -*/}} -{{- define "gitlab.gitaly.storages" -}} -{{- /* Create default entry when gitaly host specified */ -}} -{{- if .Values.global.gitaly.host -}} -default: - path: /var/opt/gitlab/repo - {{- if $.Values.global.gitaly.tls.enabled }} - gitaly_address: {{ printf "tls://%s:%d" .Values.global.gitaly.host (default 8076 .Values.global.gitaly.port | int64 ) }} - {{- else }} - gitaly_address: {{ printf "tcp://%s:%d" .Values.global.gitaly.host (default 8075 .Values.global.gitaly.port | int64 ) }} - {{- end -}} -{{- else -}} -{{- /* global.gitaly host is not specified */ -}} -{{- if eq (include "gitlab.gitaly.includeInternalResources" $) "true" -}} -{{- /* Internal default repo */ -}} -{{ template "gitlab.gitaly.storage.internal" . }} -{{- end -}} -{{- if .Values.global.gitaly.external -}} -{{- /* External repos */ -}} -{{ template "gitlab.gitaly.storage.external" . }} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the number of replicas set for Gitaly statefulset -*/}} -{{- define "gitlab.gitaly.replicas" -}} -{{- if .Values.global.gitaly.host }}0{{- else }}{{ len .Values.global.gitaly.internal.names }}{{- end }} -{{- end -}} - -{{/* -Return the appropriate block for the Gitaly client secret. -This differs depending on whether or not Praefect is enabled -*/}} -{{- define "gitlab.gitaly.clientSecrets" -}} -- secret: - name: {{ include "gitlab.gitaly.authToken.secret" . }} - items: - - key: {{ include "gitlab.gitaly.authToken.key" . }} - path: gitaly/gitaly_token -{{- if .Values.global.praefect.enabled }} -- secret: - name: {{ include "gitlab.praefect.authToken.secret" . }} - items: - - key: {{ include "gitlab.praefect.authToken.key" . }} - path: gitaly/gitaly_token_praefect -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_gitlab.yaml.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_gitlab.yaml.tpl deleted file mode 100644 index 49c1023a6..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_gitlab.yaml.tpl +++ /dev/null @@ -1,167 +0,0 @@ -{{- define "gitlab.appConfig.gitaly" -}} -gitaly: - client_path: /home/git/gitaly/bin - token: <%= File.read('/etc/gitlab/gitaly/gitaly_token').strip.to_json %> -{{- end -}} - -{{- define "gitlab.appConfig.repositories" -}} -repositories: - storages: # You must have at least a `default` storage path. - {{- if .Values.global.praefect.enabled }} - {{- include "gitlab.praefect.storages" . | nindent 4 }} - {{- end }} - {{- include "gitlab.gitaly.storages" . | nindent 4 }} -{{- end -}} - - -{{- define "gitlab.appConfig.microsoft_graph_mailer" -}} -microsoft_graph_mailer: - enabled: {{ eq .microsoft_graph_mailer.enabled true }} - user_id: {{ .microsoft_graph_mailer.user_id | quote }} - tenant: {{ .microsoft_graph_mailer.tenant | quote }} - client_id: {{ .microsoft_graph_mailer.client_id | quote }} - client_secret: <%= File.read('/etc/gitlab/microsoft_graph_mailer/client_secret').strip.to_json %> - azure_ad_endpoint: {{ .microsoft_graph_mailer.azure_ad_endpoint | quote }} - graph_endpoint: {{ .microsoft_graph_mailer.graph_endpoint | quote }} -{{- end -}} - -{{- define "gitlab.appConfig.incoming_email" -}} -incoming_email: - enabled: {{ eq .incomingEmail.enabled true }} - address: {{ .incomingEmail.address | quote }} - {{- if eq .incomingEmail.deliveryMethod "webhook" }} - secret_file: /etc/gitlab/mailroom/incoming_email_webhook_secret - {{- end }} -{{- end -}} - -{{- define "gitlab.appConfig.service_desk_email" -}} -service_desk_email: - enabled: {{ eq .serviceDeskEmail.enabled true }} - address: {{ .serviceDeskEmail.address | quote }} - {{- if eq .serviceDeskEmail.deliveryMethod "webhook" }} - secret_file: /etc/gitlab/mailroom/service_desk_email_webhook_secret - {{- end }} -{{- end -}} - -{{- define "gitlab.appConfig.kas" -}} -{{- if (or .Values.global.kas.enabled .Values.global.appConfig.gitlab_kas.enabled) -}} -gitlab_kas: - enabled: true - secret_file: /etc/gitlab/kas/.gitlab_kas_secret - external_url: {{ include "gitlab.appConfig.kas.externalUrl" . | quote }} - internal_url: {{ include "gitlab.appConfig.kas.internalUrl" . | quote }} -{{- end -}} -{{- end -}} - -{{- define "gitlab.appConfig.suggested_reviewers" -}} -suggested_reviewers: - secret_file: /etc/gitlab/suggested_reviewers/.gitlab_suggested_reviewers_secret -{{- end -}} - -{{- define "gitlab.appConfig.shell" -}} -gitlab_shell: - path: /home/git/gitlab-shell/ - hooks_path: /home/git/gitlab-shell/hooks/ - upload_pack: true - receive_pack: true -{{- end -}} - -{{- define "gitlab.appConfig.shell.ssh_port" -}} -ssh_port: {{ include "gitlab.shell.port" . | int }} -{{- end -}} - -{{- define "gitlab.appConfig.shell.secret_file" -}} -secret_file: /etc/gitlab/shell/.gitlab_shell_secret -{{- end -}} - -{{- define "gitlab.appConfig.extra" -}} -extra: - {{ if .extra.googleAnalyticsId }} - google_analytics_id: {{ .extra.googleAnalyticsId | quote }} - {{- end }} - {{ if .extra.matomoUrl }} - matomo_url: {{ .extra.matomoUrl | quote }} - {{- end }} - {{ if .extra.matomoSiteId }} - matomo_site_id: {{ .extra.matomoSiteId | quote }} - {{- end }} - {{- if .extra.matomoDisableCookies }} - matomo_disable_cookies: {{ eq true .extra.matomoDisableCookies }} - {{- end }} - {{ if .extra.oneTrustId }} - one_trust_id: {{ .extra.oneTrustId | quote }} - {{- end }} - {{ if .extra.googleTagManagerNonceId }} - google_tag_manager_nonce_id: {{ .extra.googleTagManagerNonceId | quote }} - {{- end }} - {{ if .extra.bizible }} - bizible: {{ eq true .extra.bizible }} - {{- end }} -{{- end -}} - -{{- define "gitlab.appConfig.rackAttack" -}} -rack_attack: - git_basic_auth: - {{- if .Values.rack_attack.git_basic_auth.enabled }} - {{- toYaml .Values.rack_attack.git_basic_auth | nindent 4 }} - {{- end }} -{{- end -}} - -{{- define "gitlab.appConfig.cronJobs" -}} -{{- if .cron_jobs }} -cron_jobs: - {{- toYaml .cron_jobs | nindent 2 }} -{{- end }} -{{- end }} - -{{- define "gitlab.appConfig.maxRequestDurationSeconds" -}} -{{/* - Unless explicitly provided, we need to set maxRequestDurationSeconds to 95% of the - workerTimeout value specified for webservice (and use its ceiling value). - However, sprig's `mul` function does not work with floats, so a - multiplication with `0.95` is not possible. To workaround this, we do the - following - 1. Scale up the value to the order of 10000 by multiplying it - with (95 * 100). - 2. Divide the scaled up value by 10000, and the result will be an integer. - 3. If a reminder was present during the division (this is checked using - modular division), we increment the result by 1. This does the function - of `ceil` in Ruby. - 4. For example, if webservice's timeout is the default value of 60, the result - we need is 57. The various values in this workaround will be - (i) $workerTimeout = 60 - (ii) $scaledResult = 570000 - (iii) $reminder = 0 - (iv) $result = 57 - 5. Another example, if webservice's timeout is 61, the result we need is - 58 (ceiling of 0.95 * 61 = 57.95). The various values in this workaround - will be - (i) $workerTimeout = 61 - (ii) $scaledResult = 579500 - (iii) $reminder = 9500 - (iv) $result = 57 - (v) $result = 58 (because there was a remainder, result got incremented) -*/}} -{{- $workerTimeout := $.Values.global.webservice.workerTimeout }} -{{- $scaledResult := mul $workerTimeout 100 95 }} -{{- $remainder := mod $scaledResult 10000 }} -{{- $doCeil := gt $remainder 0 }} -{{- $result := div $scaledResult 10000 }} -{{- if $doCeil }} -{{- $result = add1 $result }} -{{- end }} -{{- $result }} -{{- end }} -{{/* END gitlab.appConfig.maxRequestDurationSeconds */}} - -{{/* -Generates gitlab_docs configuration. - -Usage: -{{ include "gitlab.appConfig.gitlab_docs.configuration" $ }} -*/}} -{{- define "gitlab.appConfig.gitlab_docs.configuration" -}} -gitlab_docs: - enabled: {{ eq $.Values.global.appConfig.gitlab_docs.enabled true }} - host: {{ $.Values.global.appConfig.gitlab_docs.host | quote }} -{{- end -}}{{/* "gitlab.appConfig.gitlab_docs.configuration" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_helpers.tpl deleted file mode 100644 index b5e45a289..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_helpers.tpl +++ /dev/null @@ -1,108 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Return the version tag used to fetch the GitLab images -Defaults to using the information from the chart appVersion field, but can be -overridden using the global.gitlabVersion field in values. -*/}} -{{- define "gitlab.versionTag" -}} -{{- template "gitlab.parseAppVersion" (dict "appVersion" (coalesce .Values.global.gitlabVersion .Chart.AppVersion) "prepend" "true") -}} -{{- end -}} - -{{/* -Returns a image tag from the passed in app version or branchname -Usage: -{{ include "gitlab.parseAppVersion" ( \ - dict \ - "appVersion" .Chart.AppVersion \ - "prepend" "false" \ - ) }} -1. If the version is a semver version, we check the prepend flag. - 1. If it is true, we prepend a `v` and return `vx.y.z` image tag. - 2. If it is false, we do not prepend a `v` and just use the input version -2. Else we just use the version passed as the image tag -*/}} -{{- define "gitlab.parseAppVersion" -}} -{{- $appVersion := coalesce .appVersion "master" -}} -{{- if regexMatch "^\\d+\\.\\d+\\.\\d+(-rc\\d+)?(-pre)?$" $appVersion -}} -{{- if eq .prepend "true" -}} -{{- printf "v%s" $appVersion -}} -{{- else -}} -{{- $appVersion -}} -{{- end -}} -{{- else -}} -{{- $appVersion -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the image repository depending on the value of global.edition. - -Used to switch the deployment from Enterprise Edition (default) to Community -Edition. If global.edition=ce, returns the Community Edition image repository -set in the Gitlab values.yaml, otherwise returns the Enterprise Edition -image repository. -*/}} -{{- define "image.repository" -}} -{{- if eq "ce" .Values.global.edition -}} -{{ index .Values "global" "communityImages" .Chart.Name "repository" }} -{{- else -}} -{{ index .Values "global" "enterpriseImages" .Chart.Name "repository" }} -{{- end -}} -{{- end -}} - -{{- define "gitlab.extraContainers" -}} -{{ tpl (default "" .Values.extraContainers) . }} -{{- end -}} - -{{- define "gitlab.extraInitContainers" -}} -{{ tpl (default "" .Values.extraInitContainers) . }} -{{- end -}} - -{{- define "gitlab.extraVolumes" -}} -{{ tpl (default "" .Values.extraVolumes) . }} -{{- end -}} - -{{- define "gitlab.extraVolumeMounts" -}} -{{ tpl (default "" .Values.extraVolumeMounts) . }} -{{- end -}} - -{{- define "gitlab.extraEnvFrom" -}} -{{- $global := deepCopy (get .root.Values.global "extraEnvFrom" | default (dict)) -}} -{{- $values := deepCopy (get .root.Values "extraEnvFrom" | default (dict)) -}} -{{- $local := deepCopy (get .local "extraEnvFrom" | default (dict)) -}} -{{- $allExtraEnvFrom := mergeOverwrite $global $values $local -}} -{{- range $key, $value := $allExtraEnvFrom }} -- name: {{ $key }} - valueFrom: -{{ toYaml $value | nindent 4 }} -{{- end -}} -{{- end -}} - -{{/* -Returns the extraEnv keys and values to inject into containers. - -Global values will override any chart-specific values. -*/}} -{{- define "gitlab.extraEnv" -}} -{{- $allExtraEnv := merge (default (dict) .Values.extraEnv) .Values.global.extraEnv -}} -{{- range $key, $value := $allExtraEnv }} -- name: {{ $key }} - value: {{ $value | quote }} -{{- end -}} -{{- end -}} - -{{/* -Detect whether to include internal Gitaly resources. -Returns `true` when: - - Internal Gitaly is on - AND - - Either: - - Praefect is off, or - - Praefect is on, but replaceInternalGitaly is off -*/}} -{{- define "gitlab.gitaly.includeInternalResources" -}} -{{- if and .Values.global.gitaly.enabled (or (not .Values.global.praefect.enabled) (and .Values.global.praefect.enabled (not .Values.global.praefect.replaceInternalGitaly))) -}} -{{- true }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_kas.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_kas.tpl deleted file mode 100644 index 137a534b0..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_kas.tpl +++ /dev/null @@ -1,78 +0,0 @@ -{{/* ######### KAS related templates */}} - -{{- define "gitlab.kas.mountSecrets" -}} -{{- if (or .Values.global.kas.enabled .Values.global.appConfig.gitlab_kas.enabled) -}} -# mount secret for kas -- secret: - name: {{ template "gitlab.kas.secret" . }} - items: - - key: {{ template "gitlab.kas.key" . }} - path: kas/.gitlab_kas_secret -{{- end -}} -{{- end -}}{{/* "gitlab.kas.mountSecrets" */}} - -{{/* -Returns the KAS external hostname (for agentk connections) -If the hostname is set in `global.hosts.kas.name`, that will be returned, -otherwise the hostname will be assembed using `kas` as the prefix, and the `gitlab.assembleHost` function. -*/}} -{{- define "gitlab.kas.hostname" -}} -{{- coalesce $.Values.global.hosts.kas.name (include "gitlab.assembleHost" (dict "name" "kas" "context" . )) -}} -{{- end -}} - -{{/* -Returns the KAS external URL (for external agentk connections) -*/}} -{{- define "gitlab.appConfig.kas.externalUrl" -}} -{{- if .Values.global.appConfig.gitlab_kas.externalUrl -}} -{{- .Values.global.appConfig.gitlab_kas.externalUrl -}} -{{- else -}} -{{- $hostname := include "gitlab.kas.hostname" . -}} -{{- if or .Values.global.hosts.https .Values.global.hosts.kas.https -}} -{{- printf "wss://%s" $hostname -}} -{{- else -}} -{{- printf "ws://%s" $hostname -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.kas.internal.scheme" -}} -{{- $tlsEnabled := "" -}} -{{- if eq .Chart.Name "kas" -}} -{{- $tlsEnabled = .Values.privateApi.tls.enabled -}} -{{- printf "%s" (ternary "grpcs" "grpc" (or (eq $tlsEnabled true) (eq $.Values.global.kas.tls.enabled true))) -}} -{{- else -}} -{{- printf "%s" (ternary "grpcs" "grpc" (eq $.Values.global.kas.tls.enabled true)) -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the KAS internal URL (for GitLab backend connections) -*/}} -{{- define "gitlab.appConfig.kas.internalUrl" -}} -{{- if .Values.global.appConfig.gitlab_kas.internalUrl -}} -{{- .Values.global.appConfig.gitlab_kas.internalUrl -}} -{{- else -}} -{{- $serviceHost := include "gitlab.kas.serviceHost" . -}} -{{- $scheme := include "gitlab.kas.internal.scheme" . -}} -{{- $port := .Values.global.kas.service.apiExternalPort -}} -{{- printf "%s://%s:%s" $scheme $serviceHost (toString $port) -}} -{{- end -}} -{{- end -}} - -{{/* -Return the KAS service host -*/}} -{{- define "gitlab.kas.serviceHost" -}} -{{- $serviceName := include "gitlab.kas.serviceName" . -}} -{{- printf "%s.%s.svc" $serviceName $.Release.Namespace -}} -{{- end -}} - -{{/* -Return the KAS service name -*/}} -{{- define "gitlab.kas.serviceName" -}} -{{- include "gitlab.other.fullname" (dict "context" . "chartName" "kas") -}} -{{- end -}} - - diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_kerberos.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_kerberos.tpl deleted file mode 100644 index 86ab76342..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_kerberos.tpl +++ /dev/null @@ -1,31 +0,0 @@ -{{- define "gitlab.appConfig.kerberos.configuration" -}} -kerberos: - enabled: {{ .Values.global.appConfig.kerberos.enabled }} - keytab: /etc/krb5.keytab -{{- if .Values.global.appConfig.kerberos.servicePrincipalName }} - service_principal_name: {{ .Values.global.appConfig.kerberos.servicePrincipalName | quote }} -{{- end }} - use_dedicated_port: {{ .Values.global.appConfig.kerberos.dedicatedPort.enabled }} - port: {{ .Values.global.appConfig.kerberos.dedicatedPort.port }} - https: {{ .Values.global.appConfig.kerberos.dedicatedPort.https }} - simple_ldap_linking_allowed_realms: {{ toJson .Values.global.appConfig.kerberos.simpleLdapLinkingAllowedRealms }} -{{- end -}}{{/* "gitlab.appConfig.kerberos.configuration" */}} - -{{- define "gitlab.appConfig.kerberos.volume" -}} -{{- if .Values.global.appConfig.kerberos.keytab.secret }} -# volume for kerberos -- name: kerberos-keytab - secret: - secretName: {{ .Values.global.appConfig.kerberos.keytab.secret }} -{{- end -}} -{{- end -}}{{/* "gitlab.appConfig.kerberos.volume" */}} - -{{- define "gitlab.appConfig.kerberos.volumeMount" -}} -{{- if .Values.global.appConfig.kerberos.keytab.secret }} -# volume mount for kerberos -- mountPath: "/etc/krb5.keytab" - subPath: {{ .Values.global.appConfig.kerberos.keytab.key }} - name: kerberos-keytab - readOnly: true -{{- end -}} -{{- end -}}{{/* "gitlab.appConfig.kerberos.volumeMount" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_ldap.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_ldap.tpl deleted file mode 100644 index be56c87b1..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_ldap.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{{- define "gitlab.appConfig.ldap.configuration" -}} -{{- if not .Values.global.appConfig.ldap.servers -}} -ldap: - enabled: false -{{- else -}} -ldap: - enabled: true - prevent_ldap_sign_in: {{ eq true ( default false .Values.global.appConfig.ldap.preventSignin ) }} - servers: - {{- range $serverName, $serverConfig := .Values.global.appConfig.ldap.servers -}} - {{- include "gitlab.appConfig.ldap.servers.configuration" (dict "name" $serverName "config" $serverConfig) | nindent 4 -}} - {{- end -}} -{{- end -}} -{{- end -}}{{/* "gitlab.appConfig.ldap.configuration" */}} - -{{/* -Usage example: - -{{ include "gitlab.appConfig.ldap.servers.configuration" (\ - dict \ - "name" - "config" - ) }} -*/}} -{{- define "gitlab.appConfig.ldap.servers.configuration" -}} -{{- $.name }}: -{{- toYaml (omit $.config "password") | replace "\r\n" "\n" | trimSuffix "\n" | nindent 2 -}} -{{- if and $.config.password (not (kindIs "string" $.config.password ))}} - password: <%= File.read('/etc/gitlab/ldap/{{ $.name }}/password').strip.to_json %> -{{- end -}} -{{- end -}}{{/* gitlab.appConfig.ldap.servers.configuration */}} - -{{- define "gitlab.appConfig.ldap.servers.mountSecrets" -}} -# mount secrets for LDAP -{{- if .Values.global.appConfig.ldap.servers -}} -{{- range $name, $config := .Values.global.appConfig.ldap.servers -}} -{{- if and $config.password (not (kindIs "string" $config.password ))}} -- secret: - name: {{ $config.password.secret }} - items: - - key: {{ default "password" $config.password.key }} - path: ldap/{{ $name }}/password -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}}{{/* "gitlab.appConfig.ldap.servers.mountSecrets" "*/}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_lfs.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_lfs.tpl deleted file mode 100644 index 50e26f6e4..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_lfs.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{/* -Generates a templated config for lfs key in gitlab.yml. - -Usage: -{{ include "gitlab.appConfig.lfs.configuration" ( \ - dict \ - "config" .Values.path.to.lfs.config \ - "context" $ \ - ) }} -*/}} -{{- define "gitlab.appConfig.lfs.configuration" -}} -lfs: - enabled: {{ if kindIs "bool" .config.enabled }}{{ eq .config.enabled true }}{{ end }} - {{- if not .context.Values.global.appConfig.object_store.enabled }} - {{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "lfs" "config" .config "context" .context) | nindent 2 }} - {{- end }} -{{- end -}}{{/* "gitlab.appConfig.lfs.configuration" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_mailroom.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_mailroom.tpl deleted file mode 100644 index 6a144407c..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_mailroom.tpl +++ /dev/null @@ -1,43 +0,0 @@ -{{/* ######### mailroom templates */}} - -{{- define "gitlab.appConfig.incomingEmail.mountSecrets" -}} -# mount secrets for incomingEmail -{{- if and $.Values.global.appConfig.incomingEmail.enabled (eq $.Values.global.appConfig.incomingEmail.deliveryMethod "webhook") }} -- secret: - name: {{ template "gitlab.appConfig.incomingEmail.authToken.secret" . }} - items: - - key: {{ template "gitlab.appConfig.incomingEmail.authToken.key" . }} - path: mailroom/incoming_email_webhook_secret -{{- end }} -{{- end -}}{{/* "gitlab.appConfig.incomingEmail.mountSecrets" "*/}} - -{{- define "gitlab.appConfig.serviceDeskEmail.mountSecrets" -}} -# mount secrets for serviceDeskEmail -{{- if and $.Values.global.appConfig.serviceDeskEmail.enabled (eq $.Values.global.appConfig.serviceDeskEmail.deliveryMethod "webhook") }} -- secret: - name: {{ template "gitlab.appConfig.serviceDeskEmail.authToken.secret" . }} - items: - - key: {{ template "gitlab.appConfig.serviceDeskEmail.authToken.key" . }} - path: mailroom/service_desk_email_webhook_secret -{{- end }} -{{- end -}}{{/* "gitlab.appConfig.serviceDeskEmail.mountSecrets" "*/}} - -{{/* -Return the gitlab-mailroom webhook secrets -*/}} - -{{- define "gitlab.appConfig.incomingEmail.authToken.secret" -}} -{{- default (printf "%s-incoming-email-auth-token" .Release.Name) $.Values.global.appConfig.incomingEmail.authToken.secret | quote -}} -{{- end -}} - -{{- define "gitlab.appConfig.incomingEmail.authToken.key" -}} -{{- default "authToken" $.Values.global.appConfig.incomingEmail.authToken.key | quote -}} -{{- end -}} - -{{- define "gitlab.appConfig.serviceDeskEmail.authToken.secret" -}} -{{- default (printf "%s-service-desk-email-auth-token" .Release.Name) $.Values.global.appConfig.serviceDeskEmail.authToken.secret | quote -}} -{{- end -}} - -{{- define "gitlab.appConfig.serviceDeskEmail.authToken.key" -}} -{{- default "authToken" $.Values.global.appConfig.serviceDeskEmail.authToken.key | quote -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_minio.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_minio.tpl deleted file mode 100644 index f6eade0b2..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_minio.tpl +++ /dev/null @@ -1,27 +0,0 @@ -{{/* ######### Minio related templates */}} - -{{/* -Return the minio service endpoint -*/}} -{{- define "gitlab.minio.endpoint" -}} -{{- $name := default "minio-svc" .Values.minio.serviceName -}} -{{- $port := default 9000 .Values.minio.port | int -}} -{{- printf "http://%s-%s.%s.svc:%d" .Release.Name $name .Release.Namespace $port -}} -{{- end -}} - -{{/* -Minio has it's own secret mounting procedure, so it receives more special attention compared to normal objectStorage secret mounting. -*/}} -{{- define "gitlab.minio.mountSecrets" -}} -# mount secret for minio -{{- if .Values.global.minio.enabled }} -- secret: - name: {{ template "gitlab.minio.credentials.secret" . }} - items: - - key: accesskey - path: minio/accesskey - - key: secretkey - path: minio/secretkey -{{- end -}} -{{- end -}}{{/* "gitlab.minio.mountSecrets" */}} - diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_objectStorage.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_objectStorage.tpl deleted file mode 100644 index e5348e8a5..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_objectStorage.tpl +++ /dev/null @@ -1,110 +0,0 @@ -{{/* -Generates a templated object storage config. - -Usage: -{{ include "gitlab.appConfig.objectStorage.configuration" ( \ - dict \ - "name" "STORAGE_NAME" \ - "config" .Values.path.to.objectstorage.config \ - "context" $ \ - ) }} -*/}} -{{- define "gitlab.appConfig.objectStorage.configuration" -}} -object_store: - {{- if eq .name "object_store" }} - enabled: {{ ne (default false .config.enabled) false }} - {{- else }} - enabled: {{ if kindIs "bool" .config.enabled }}{{ eq .config.enabled true }}{{ end }} - remote_directory: {{ .config.bucket }} - {{- end }} - {{- if ne .name "pages" }} - proxy_download: {{ or (not (kindIs "bool" .config.proxy_download)) .config.proxy_download }} - {{- end }} - {{- if and .config.enabled .config.storage_options }} - storage_options: - server_side_encryption: {{ .config.storage_options.server_side_encryption }} - server_side_encryption_kms_key_id: {{ .config.storage_options.server_side_encryption_kms_key_id }} - {{- end -}} - {{- if and .config.enabled .config.connection }} - connection: <%= YAML.load_file("/etc/gitlab/objectstorage/{{ .name }}").to_json() %> - {{- else if and .config.enabled .context.Values.global.minio.enabled }} - {{- include "gitlab.appConfig.objectStorage.connection.minio" . | nindent 2 }} - {{- end -}} - {{- if and .config.enabled .config.cdn (eq .name "artifacts") }} - cdn: <%= YAML.load_file("/etc/gitlab/objectstorage/cdn/{{ .name }}").to_json %> - {{- end -}} -{{- end -}}{{/* "gitlab.appConfig.objectStorage.configuration" */}} - -{{/* -Generates a templated object storage connection settings for Minio. - -Usage: -{{ include "gitlab.appConfig.objectStorage.connection.minio" ( \ - dict \ - "name" "STORAGE_NAME" \ - "config" .Values.path.to.objectstorage.config \ - ) }} -*/}} -{{- define "gitlab.appConfig.objectStorage.connection.minio" -}} -connection: - provider: AWS - region: us-east-1 - host: {{ template "gitlab.minio.hostname" .context }} - endpoint: {{ template "gitlab.minio.endpoint" .context }} - path_style: true - aws_access_key_id: <%= File.read('/etc/gitlab/minio/accesskey').strip.to_json %> - aws_secret_access_key: <%= File.read('/etc/gitlab/minio/secretkey').strip.to_json %> -{{- end }} - - -{{/* -Generates a templated object storage secrets mounts. - -Usage: -{{ include "gitlab.appConfig.objectStorage.mountSecrets" ( \ - dict \ - "name" "STORAGE_NAME" \ - "config" .Values.path.to.objectstorage.config \ - ) }} -*/}} -{{- define "gitlab.appConfig.objectStorage.mountSecrets" -}} -# mount secret for {{ .name }} -{{- if .config.connection }} -- secret: - name: {{ .config.connection.secret }} - items: - - key: {{ default "connection" .config.connection.key }} - path: objectstorage/{{ .name }} -{{- end -}} -{{- if and .config.cdn (eq .name "artifacts") }} -- secret: - name: {{ .config.cdn.secret }} - items: - - key: {{ default "cdn" .config.cdn.key }} - path: objectstorage/cdn/{{ .name }} -{{- end -}} -{{- end -}}{{/* "gitlab.appConfig.objectStorage.mountSecrets" */}} - - -{{/* -Generates a templated object storage bucket config - -Usage: -{{ include "gitlab.appConfig.objectStorage.object" ( \ - dict \ - "name" "STORAGE_NAME" \ - "config" .Values.path.to.objectstorage.config \ - ) }} -*/}} -{{- define "gitlab.appConfig.objectStorage.object" -}} -{{- if default false .config.enabled -}} -{{ .name }}: - bucket: {{ .config.bucket }} -{{- if kindIs "bool" .config.proxy_download }} - proxy_download: {{ .config.proxy_download }} -{{- end -}} -{{- if and .config.cdn (eq .name "artifacts") }} - cdn: <%= YAML.load_file("/etc/gitlab/objectstorage/cdn/{{ .name }}").to_json %> -{{- end -}} -{{- end -}} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_omniauth.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_omniauth.tpl deleted file mode 100644 index 23e6520a8..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_omniauth.tpl +++ /dev/null @@ -1,42 +0,0 @@ -{{- define "gitlab.appConfig.omniauth.configuration" -}} -{{ with $.Values.global.appConfig }} -omniauth: - enabled: {{ .omniauth.enabled }} - {{- if .omniauth.autoSignInWithProvider }} - auto_sign_in_with_provider: {{ .omniauth.autoSignInWithProvider | quote }} - {{- end }} - sync_profile_from_provider: {{ toJson .omniauth.syncProfileFromProvider }} - sync_profile_attributes: {{ toJson .omniauth.syncProfileAttributes }} - allow_single_sign_on: {{ toJson .omniauth.allowSingleSignOn }} - block_auto_created_users: {{ .omniauth.blockAutoCreatedUsers }} - auto_link_ldap_user: {{ .omniauth.autoLinkLdapUser }} - auto_link_saml_user: {{ .omniauth.autoLinkSamlUser }} - {{- if .omniauth.autoLinkUser }} - auto_link_user: {{ toJson .omniauth.autoLinkUser }} - {{- end }} - external_providers: {{ .omniauth.externalProviders }} - {{- if .omniauth.allowBypassTwoFactor }} - allow_bypass_two_factor: {{ toJson .omniauth.allowBypassTwoFactor }} - {{- end -}} - {{- if .omniauth.providers }} - providers: - {{- range $index, $entry := .omniauth.providers }} - - <%= YAML.load_file({{ printf "/etc/gitlab/omniauth/%s/%s" $entry.secret (default "provider" $entry.key) | quote }}).to_json() %> - {{- end }} - {{- end }} -{{- end -}} -{{- end -}}{{/* "gitlab.appConfig.omniauth.configuration" */}} - -{{- define "gitlab.appConfig.omniauth.mountSecrets" -}} -{{- with $.Values.global.appConfig -}} -{{- if .omniauth.providers }} -{{- range $index, $entry := .omniauth.providers }} -- secret: - name: {{ $entry.secret }} - items: - - key: {{ default "provider" $entry.key }} - path: {{ printf "omniauth/%s/%s" $entry.secret (default "provider" $entry.key) | quote }} -{{- end }} -{{- end -}} -{{- end -}} -{{- end -}}{{/* "gitlab.appConfig.omniauth.mountSecrets" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_packages.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_packages.tpl deleted file mode 100644 index 5f6756845..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_packages.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{/* -Generates a templated config for packages key in gitlab.yml. - -Usage: -{{ include "gitlab.appConfig.packages.configuration" ( \ - dict \ - "config" .Values.path.to.packages.config \ - "context" $ \ - ) }} -*/}} -{{- define "gitlab.appConfig.packages.configuration" -}} -packages: - enabled: {{ if kindIs "bool" .config.enabled }}{{ eq .config.enabled true }}{{ end }} - {{- if not .context.Values.global.appConfig.object_store.enabled }} - {{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "packages" "config" .config "context" .context) | nindent 2 }} - {{- end }} -{{- end -}}{{/* "gitlab.appConfig.packages.configuration" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_pages.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_pages.tpl deleted file mode 100644 index 72ee05648..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_pages.tpl +++ /dev/null @@ -1,99 +0,0 @@ -{{/* ######## GitLab Pages related templates */}} - -{{/* -Returns the pages entry for gitlab.yml of Rails-based containers. -*/}} -{{- define "gitlab.pages.config" -}} -pages: - enabled: {{ or (eq $.Values.global.pages.enabled true) (not (empty $.Values.global.pages.host)) }} - access_control: {{ eq $.Values.global.pages.accessControl true }} - artifacts_server: {{ eq $.Values.global.pages.artifactsServer true }} - path: {{ default "/srv/gitlab/shared/pages" $.Values.global.pages.path }} - host: {{ template "gitlab.pages.hostname" $ }} - port: {{ default ( eq "true" (include "gitlab.pages.https" $) | ternary 443 80 ) $.Values.global.pages.port | int }} - https: {{ eq "true" (include "gitlab.pages.https" $) }} - secret_file: /etc/gitlab/pages/secret - external_http: {{ not (empty $.Values.global.pages.externalHttp) }} - external_https: {{ not (empty $.Values.global.pages.externalHttps) }} - {{- if not $.Values.global.appConfig.object_store.enabled }} - {{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "pages" "config" $.Values.global.pages.objectStore "context" $ ) | nindent 2 }} - {{- end }} - local_store: - enabled: {{ $.Values.global.pages.localStore.enabled }} - path: {{ $.Values.global.pages.localStore.path }} -{{- end -}} - -{{- define "gitlab.pages.mountSecrets" }} -{{- if or (eq $.Values.global.pages.enabled true) (not (empty $.Values.global.pages.host)) }} -- secret: - name: {{ template "gitlab.pages.apiSecret.secret" . }} - items: - - key: {{ template "gitlab.pages.apiSecret.key" . }} - path: pages/secret -{{- end -}} -{{- end -}} - -{{/* -Returns the Pages hostname. -If the hostname is set in `global.hosts.pages.name`, that will be returned, -otherwise the hostname will be assembed using `pages` as the prefix, and the `gitlab.assembleHost` function. -*/}} -{{- define "gitlab.pages.hostname" -}} -{{- coalesce $.Values.global.pages.host $.Values.global.hosts.pages.name (include "gitlab.assembleHost" (dict "name" "pages" "context" . )) -}} -{{- end -}} - -{{/* -Returns consolidated `pages.https` as "true" or "" - -This pulls together, in this order, accounting for `false` boolean values: -- if global.pages.https is set, use that. -- if global.hosts.pages.https is set, use that. -- if global.hosts.https is set use that. -- if somehow all are unset, return `true` - -See gitlab.boolean.local @ /templates/_boolean.tpl -*/}} -{{- define "gitlab.pages.https" -}} -{{- $global := pluck "https" $.Values.global.hosts.pages $.Values.global.hosts | first -}} -{{- include "gitlab.boolean.local" (dict "global" $global "local" $.Values.global.pages.https "default" true) -}} -{{- end -}} - -{{/* -Return the Pages artifacts server URL. -If the chart Pages artifacts server URL is provided, it will use that, -otherwise it will fallback to the API v4 endpoint of GitLab domain. -*/}} -{{- define "gitlab.pages.artifactsServer" -}} -{{- if .Values.artifactsServerUrl -}} -{{ .Values.artifactsServerUrl }} -{{- else -}} -{{ template "gitlab.pages.internalGitlabServer" . }}/api/v4 -{{- end -}} -{{- end -}} - -{{/* -Return the GitLab server URL Pages should contact. -If the chart Pages GitLab server URL is provided, it will use that, -otherwise it will fallback to the public GitLab URL of GitLab. -*/}} -{{- define "gitlab.pages.gitlabServer" -}} -{{- if .Values.gitlabServer -}} -{{ .Values.gitlabServer }} -{{- else -}} -{{- template "gitlab.gitlab.url" . }} -{{- end -}} -{{- end -}} - -{{/* -Return the Internal GitLab server URL Pages should contact. -If the chart Pages GitLab server URL is provided, it will use that, -otherwise it will fallback to the Service of the GitLab Workhorse deployed in the -cluster. -*/}} -{{- define "gitlab.pages.internalGitlabServer" -}} -{{- if .Values.internalGitlabServer -}} -{{ .Values.internalGitlabServer }} -{{- else -}} -{{ template "gitlab.workhorse.url" . }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_postgresql.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_postgresql.tpl deleted file mode 100644 index 0f6074e58..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_postgresql.tpl +++ /dev/null @@ -1,86 +0,0 @@ -{{/* -Returns parts for a Gitlab configuration to setup a mutual TLS connection -with the PostgreSQL database. -*/}} -{{- define "gitlab.psql.ssl.config" -}} -{{- if .Values.global.psql.ssl }} -sslmode: verify-ca -sslrootcert: '/etc/gitlab/postgres/ssl/server-ca.pem' -sslcert: '/etc/gitlab/postgres/ssl/client-certificate.pem' -sslkey: '/etc/gitlab/postgres/ssl/client-key.pem' -{{- end -}} -{{- end -}} - -{{/* -Returns volume definition of a secret containing information required for -a mutual TLS connection. -*/}} -{{- define "gitlab.psql.ssl.volume" -}} -{{- if .Values.global.psql.ssl }} -- name: postgresql-ssl-secrets - projected: - defaultMode: 400 - sources: - - secret: - name: {{ .Values.global.psql.ssl.secret | required "Missing required secret containing SQL SSL certificates and keys. Make sure to set `global.psql.ssl.secret`" }} - items: - - key: {{ .Values.global.psql.ssl.serverCA | required "Missing required key name of SQL server certificate. Make sure to set `global.psql.ssl.serverCA`" }} - path: server-ca.pem - - key: {{ .Values.global.psql.ssl.clientCertificate | required "Missing required key name of SQL client certificate. Make sure to set `global.psql.ssl.clientCertificate`" }} - path: client-certificate.pem - - key: {{ .Values.global.psql.ssl.clientKey | required "Missing required key name of SQL client key file. Make sure to set `global.psql.ssl.clientKey`" }} - path: client-key.pem -{{- end -}} -{{- end -}} - -{{/* -Returns mount definition for the volume mount definition above. -*/}} -{{- define "gitlab.psql.ssl.volumeMount" -}} -{{- if .Values.global.psql.ssl }} -- name: postgresql-ssl-secrets - mountPath: '/etc/postgresql/ssl/' - readOnly: true -{{- end -}} -{{- end -}} - -{{/* -Returns a shell script snippet, which extends the script of a configure -container to copy the mutual TLS files to the proper location. Further -it sets the permissions correctly. -*/}} -{{- define "gitlab.psql.ssl.initScript" -}} -{{- if .Values.global.psql.ssl }} -if [ -d /etc/postgresql/ssl ]; then - mkdir -p /${secret_dir}/postgres/ssl - cp -v -r -L /etc/postgresql/ssl/* /${secret_dir}/postgres/ssl/ - chmod 600 /${secret_dir}/postgres/ssl/* - chmod 700 /${secret_dir}/postgres/ssl -fi -{{- end -}} -{{- end -}} -{{/* -Returns the K8s Secret definition for the PostgreSQL password. -*/}} -{{- define "gitlab.psql.secret" -}} -{{- $useSecret := include "gitlab.boolean.local" (dict "local" (pluck "useSecret" (index .Values.psql "password") | first) "global" .Values.global.psql.password.useSecret "default" true) -}} -{{- if $useSecret -}} -- secret: - name: {{ template "gitlab.psql.password.secret" . }} - items: - - key: {{ template "gitlab.psql.password.key" . }} - path: postgres/psql-password-{{ .Schema }} -{{- end -}} -{{- end -}} - -{{/* -Returns the single-quoted path to the file where the PostgreSQL password is stored. -*/}} -{{- define "gitlab.psql.password.file" -}} -{{- $useSecret := include "gitlab.boolean.local" (dict "local" (pluck "useSecret" (index .Values.psql "password") | first) "global" .Values.global.psql.password.useSecret "default" true) -}} -{{- if not $useSecret -}} -{{- pluck "file" (index .Values.psql "password") (.Values.global.psql.password) | first | squote -}} -{{- else -}} -{{- printf "/etc/gitlab/postgres/psql-password-%s" .Schema | squote -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_praefect.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_praefect.tpl deleted file mode 100644 index c0f9345c9..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_praefect.tpl +++ /dev/null @@ -1,51 +0,0 @@ -{{/* -Return the default praefect storage line for gitlab.yml -*/}} -{{- define "gitlab.praefect.storages" -}} -{{- $scheme := "tcp" -}} -{{- $port := include "gitlab.praefect.externalPort" $ -}} -{{- if $.Values.global.praefect.tls.enabled -}} -{{- $scheme = "tls" -}} -{{- $port = include "gitlab.praefect.tls.externalPort" $ -}} -{{- end }} -{{- range $.Values.global.praefect.virtualStorages }} -{{ .name }}: - path: /var/opt/gitlab/repo - gitaly_address: {{ printf "%s" $scheme }}://{{ template "gitlab.praefect.serviceName" $ }}.{{$.Release.Namespace}}.svc:{{ $port }} - gitaly_token: <%= File.read('/etc/gitlab/gitaly/gitaly_token_praefect').strip.to_json %> -{{- end }} -{{- end -}} - -{{/* -Return the resolvable name of the praefect service -*/}} -{{- define "gitlab.praefect.serviceName" -}} -{{- coalesce .Values.serviceName .Values.global.praefect.serviceName (printf "%s-praefect" $.Release.Name) -}} -{{- end -}} - -{{/* -Return the service name for Gitaly when Praefect is enabled - -Call: - -``` -include "gitlab.praefect.gitaly.serviceName" (dict "context" $ "name" .name) -``` -*/}} -{{- define "gitlab.praefect.gitaly.serviceName" -}} -{{ include "gitlab.gitaly.serviceName" .context }}-{{ .name }} -{{- end -}} - -{{/* -Return the qualified service name for a given Gitaly pod. - -Call: - -``` -include "gitlab.praefect.gitaly.qualifiedServiceName" (dict "context" $ "index" $i "name" .name) -``` -*/}} -{{- define "gitlab.praefect.gitaly.qualifiedServiceName" -}} -{{- $name := include "gitlab.praefect.gitaly.serviceName" (dict "context" .context "name" .name) -}} -{{ $name }}-{{ .index }}.{{ $name }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_rails.redis.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_rails.redis.tpl deleted file mode 100644 index 019c4add9..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_rails.redis.tpl +++ /dev/null @@ -1,130 +0,0 @@ -{{/* ######### Redis related templates for Rails consumption */}} - -{{/* -Render a Redis `resque` format configuration for Rails. -Input: dict "context" $ "name" string -*/}} -{{- define "gitlab.rails.redis.yaml" -}} -{{- if $cluster := include "gitlab.redis.cluster" .context -}} -{{ .name }}.yml.erb: | - production: - {{- include "gitlab.redis.cluster.user" .context | nindent 4 }} - {{- include "gitlab.redis.cluster.password" .context | nindent 4 }} - {{- $cluster | nindent 4 }} - id: -{{- else -}} -{{ .name }}.yml.erb: | - production: - url: {{ template "gitlab.redis.url" .context }} - {{- include "gitlab.redis.sentinels" .context | nindent 4 }} - id: - {{- if eq .name "cable" }} - adapter: redis - {{- if index .context.Values.global.redis "actioncable" }} - channel_prefix: {{ .context.Values.global.redis.actioncable.channelPrefix }} - {{- end }} - {{- end }} -{{- end -}} -{{- $_ := set .context "redisConfigName" "" }} -{{- end -}} - -{{- define "gitlab.rails.redis.resque" -}} -{{- $_ := set $ "redisConfigName" "" }} -{{- include "gitlab.rails.redis.yaml" (dict "context" $ "name" "resque") -}} -{{- end -}} - -{{- define "gitlab.rails.redis.cache" -}} -{{- if .Values.global.redis.cache -}} -{{- $_ := set $ "redisConfigName" "cache" }} -{{- include "gitlab.rails.redis.yaml" (dict "context" $ "name" "redis.cache") -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.rails.redis.clusterCache" -}} -{{- if .Values.global.redis.clusterCache -}} -{{- $_ := set $ "redisConfigName" "clusterCache" }} -{{- include "gitlab.rails.redis.yaml" (dict "context" $ "name" "redis.cluster_cache") -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.rails.redis.sharedState" -}} -{{- if .Values.global.redis.sharedState -}} -{{- $_ := set $ "redisConfigName" "sharedState" }} -{{- include "gitlab.rails.redis.yaml" (dict "context" $ "name" "redis.shared_state") -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.rails.redis.traceChunks" -}} -{{- if .Values.global.redis.traceChunks -}} -{{- $_ := set $ "redisConfigName" "traceChunks" }} -{{- include "gitlab.rails.redis.yaml" (dict "context" $ "name" "redis.trace_chunks") -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.rails.redis.queues" -}} -{{- if .Values.global.redis.queues -}} -{{- $_ := set $ "redisConfigName" "queues" }} -{{- include "gitlab.rails.redis.yaml" (dict "context" $ "name" "redis.queues") -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.rails.redis.rateLimiting" -}} -{{- if .Values.global.redis.rateLimiting -}} -{{- $_ := set $ "redisConfigName" "rateLimiting" }} -{{- include "gitlab.rails.redis.yaml" (dict "context" $ "name" "redis.rate_limiting") -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.rails.redis.clusterRateLimiting" -}} -{{- if .Values.global.redis.clusterRateLimiting -}} -{{- $_ := set $ "redisConfigName" "clusterRateLimiting" }} -{{- include "gitlab.rails.redis.yaml" (dict "context" $ "name" "redis.cluster_rate_limiting") -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.rails.redis.sessions" -}} -{{- if .Values.global.redis.sessions -}} -{{- $_ := set $ "redisConfigName" "sessions" }} -{{- include "gitlab.rails.redis.yaml" (dict "context" $ "name" "redis.sessions") -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.rails.redis.repositoryCache" -}} -{{- if .Values.global.redis.repositoryCache -}} -{{- $_ := set $ "redisConfigName" "repositoryCache" }} -{{- include "gitlab.rails.redis.yaml" (dict "context" $ "name" "redis.repository_cache") -}} -{{- end -}} -{{- end -}} - -{{/* -cable.yml configuration -If no `global.redis.actioncable`, use `global.redis` -*/}} -{{- define "gitlab.rails.redis.cable" -}} -{{- if .Values.global.redis.actioncable -}} -{{- $_ := set $ "redisConfigName" "actioncable" }} -{{- end -}} -{{- include "gitlab.rails.redis.yaml" (dict "context" $ "name" "cable") -}} -{{- end -}} - -{{- define "gitlab.rails.redisYmlOverride" -}} -{{- if .Values.global.redis.redisYmlOverride -}} -redis.yml.erb: | - production: {{ toYaml .Values.global.redis.redisYmlOverride | nindent 4 }} -{{- end -}} -{{- end -}} - -{{- define "gitlab.rails.redis.all" -}} -{{ include "gitlab.rails.redis.resque" . }} -{{ include "gitlab.rails.redis.cache" . }} -{{ include "gitlab.rails.redis.clusterCache" . }} -{{ include "gitlab.rails.redis.sharedState" . }} -{{ include "gitlab.rails.redis.queues" . }} -{{ include "gitlab.rails.redis.cable" . }} -{{ include "gitlab.rails.redis.traceChunks" . }} -{{ include "gitlab.rails.redis.rateLimiting" . }} -{{ include "gitlab.rails.redis.clusterRateLimiting" . }} -{{ include "gitlab.rails.redis.sessions" . }} -{{ include "gitlab.rails.redis.repositoryCache" . }} -{{ include "gitlab.rails.redisYmlOverride" . }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_redis.cluster.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_redis.cluster.tpl deleted file mode 100644 index d615d9153..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_redis.cluster.tpl +++ /dev/null @@ -1,48 +0,0 @@ -{{/* ######### Redis Cluster related templates */}} - -{{/* -Return redis cluster user -*/}} -{{- define "gitlab.redis.cluster.user" -}} -{{- include "gitlab.redis.clusterConfig" . -}} -{{- if .redisClusterConfig.user -}} -username: {{ .redisClusterConfig.user }} -{{- end -}} -{{- end -}} - -{{/* -Return redis cluster password -*/}} -{{- define "gitlab.redis.cluster.password" -}} -{{- include "gitlab.redis.clusterConfig" . -}} -{{- if .redisClusterConfig.password -}} -{{- if .redisClusterConfig.password.enabled -}} -password: <%= File.read("/etc/gitlab/redis/{{ printf "%s-password" (default "redis" .redisConfigName) }}").strip.to_json %> -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Build the structure describing redis cluster -*/}} -{{- define "gitlab.redis.cluster" -}} -{{- include "gitlab.redis.clusterConfig" . -}} -{{- if .redisClusterConfig.cluster -}} -cluster: -{{- range $i, $entry := .redisClusterConfig.cluster }} - - host: {{ $entry.host }} - port: {{ default 6379 $entry.port }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Set redisClusterConfig, we do _not_ support inheriting from global config if the `cluster` key is set. -*/}} -{{- define "gitlab.redis.clusterConfig" -}} -{{- if .redisConfigName }} -{{- $_ := set . "redisClusterConfig" ( index .Values.global.redis .redisConfigName | default (dict) ) -}} -{{- else -}} -{{- $_ := set . "redisClusterConfig" (dict) -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_redis.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_redis.tpl deleted file mode 100644 index 437cc18a5..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_redis.tpl +++ /dev/null @@ -1,137 +0,0 @@ -{{/* ######### Redis related templates */}} - -{{/* -Return the redis hostname -If the redis host is provided, it will use that, otherwise it will fallback -to the service name -*/}} -{{- define "gitlab.redis.host" -}} -{{- include "gitlab.redis.configMerge" . -}} -{{- if .redisMergedConfig.host -}} -{{- .redisMergedConfig.host -}} -{{- else -}} -{{- $name := default "redis" .Values.redis.serviceName -}} -{{- $redisRelease := .Release.Name -}} -{{- if contains $name $redisRelease -}} -{{- $redisRelease = .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $redisRelease = printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- printf "%s-master.%s.svc" $redisRelease .Release.Namespace -}} -{{- end -}} -{{- end -}} - -{{/* -Return the redis port -If the redis port is provided, it will use that, otherwise it will fallback -to 6379 default -*/}} -{{- define "gitlab.redis.port" -}} -{{- include "gitlab.redis.configMerge" . -}} -{{- default 6379 .redisMergedConfig.port -}} -{{- end -}} - -{{/* -Return the redis scheme, or redis. Allowing people to use rediss clusters -*/}} -{{- define "gitlab.redis.scheme" -}} -{{- include "gitlab.redis.configMerge" . -}} -{{- $valid := list "redis" "rediss" "tcp" -}} -{{- $name := default "redis" .redisMergedConfig.scheme -}} -{{- if has $name $valid -}} -{{ $name }} -{{- else -}} -{{ cat "Invalid redis scheme" $name | fail }} -{{- end -}} -{{- end -}} - -{{/* -Return the redis url. -*/}} -{{- define "gitlab.redis.url" -}} -{{ template "gitlab.redis.scheme" . }}://{{ template "gitlab.redis.url.user" . }}{{ template "gitlab.redis.url.password" . }}{{ template "gitlab.redis.host" . }}:{{ template "gitlab.redis.port" . }} -{{- end -}} - -{{/* -Return the user section of the Redis URI, if needed. -*/}} -{{- define "gitlab.redis.url.user" -}} -{{- include "gitlab.redis.configMerge" . -}} -{{ .redisMergedConfig.user }} -{{- end -}} - -{{/* -Return the password section of the Redis URI, if needed. -*/}} -{{- define "gitlab.redis.url.password" -}} -{{- include "gitlab.redis.configMerge" . -}} -{{- if .redisMergedConfig.password.enabled -}}:<%= ERB::Util::url_encode(File.read("/etc/gitlab/redis/{{ printf "%s-password" (default "redis" .redisConfigName) }}").strip) %>@{{- end -}} -{{- end -}} - -{{/* -Build the structure describing sentinels -*/}} -{{- define "gitlab.redis.sentinels" -}} -{{- include "gitlab.redis.selectedMergedConfig" . -}} -{{- if .redisMergedConfig.sentinels -}} -sentinels: -{{- range $i, $entry := .redisMergedConfig.sentinels }} - - host: {{ $entry.host }} - port: {{ default 26379 $entry.port }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/*Set redisMergedConfig*/}} -{{- define "gitlab.redis.selectedMergedConfig" -}} -{{- if .redisConfigName }} -{{- $_ := set . "redisMergedConfig" ( index .Values.global.redis .redisConfigName ) -}} -{{- else -}} -{{- $_ := set . "redisMergedConfig" .Values.global.redis -}} -{{- end -}} -{{- if not (kindIs "map" (get $.redisMergedConfig "password")) -}} -{{- $_ := set $.redisMergedConfig "password" $.Values.global.redis.auth -}} -{{- end -}} -{{- range $key := keys $.Values.global.redis.auth -}} -{{- if not (hasKey $.redisMergedConfig.password $key) -}} -{{- $_ := set $.redisMergedConfig.password $key (index $.Values.global.redis.auth $key) -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return Sentinel list in format for Workhorse -Note: Workhorse only uses the primary Redis (global.redis) -*/}} -{{- define "gitlab.redis.workhorse.sentinel-list" }} -{{- $sentinelList := list }} -{{- range $i, $entry := .Values.global.redis.sentinels }} - {{- $sentinelList = append $sentinelList (quote (print "tcp://" (trim $entry.host) ":" ( default 26379 $entry.port | int ) ) ) }} -{{- end }} -{{- $sentinelList | join "," }} -{{- end -}} - -{{- define "gitlab.redis.secrets" -}} -{{- range $redis := list "cache" "clusterCache" "sharedState" "queues" "actioncable" "traceChunks" "rateLimiting" "clusterRateLimiting" "sessions" "repositoryCache" -}} -{{- if index $.Values.global.redis $redis -}} -{{- $_ := set $ "redisConfigName" $redis }} -{{ include "gitlab.redis.secret" $ }} -{{- end }} -{{- end -}} -{{/* reset 'redisConfigName', to get global.redis.auth's Secret item */}} -{{- $_ := set . "redisConfigName" "" }} -{{- if include "gitlab.redis.password.enabled" $ }} -{{ include "gitlab.redis.secret" . }} -{{- end }} -{{- end -}} - -{{- define "gitlab.redis.secret" -}} -{{- include "gitlab.redis.configMerge" . -}} -{{- if .redisMergedConfig.password.enabled }} -- secret: - name: {{ template "gitlab.redis.password.secret" . }} - items: - - key: {{ template "gitlab.redis.password.key" . }} - path: redis/{{ printf "%s-password" (default "redis" .redisConfigName) }} -{{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_registry.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_registry.tpl deleted file mode 100644 index 66800863f..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_registry.tpl +++ /dev/null @@ -1,82 +0,0 @@ -{{/* ######### Registry related templates */}} - -{{/* -Returns the Registry hostname. -If the hostname is set in `global.hosts.registry.name`, that will be returned, -otherwise the hostname will be assembed using `registry` as the prefix, and the `gitlab.assembleHost` function. -*/}} -{{- define "gitlab.registry.hostname" -}} -{{- $registryHost := pluck "host" (default (dict) .Values.registry) .Values.global.registry | first -}} -{{- coalesce $registryHost .Values.global.hosts.registry.name (include "gitlab.assembleHost" (dict "name" "registry" "context" . )) -}} -{{- end -}} - -{{/* -Return the registry api hostname -If the registry api host is provided, it will use that, otherwise it will fallback -to the service name -*/}} -{{- define "gitlab.registry.api.host" -}} -{{- $localRegistry := default (dict) .Values.registry -}} -{{- $localRegistryApi := dig "api" (dict) $localRegistry -}} -{{- $globalRegistryApi := dig "registry" "api" (dict) .Values.global -}} -{{- if or $localRegistryApi.host $globalRegistryApi.host -}} -{{- coalesce $localRegistryApi.host $globalRegistryApi.host -}} -{{- else -}} -{{- $name := coalesce $localRegistryApi.serviceName $globalRegistryApi.serviceName .Values.global.hosts.registry.serviceName -}} -{{- $name = printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- printf "%s.%s.svc" $name .Release.Namespace -}} -{{- end -}} -{{- end -}} - -{{/* -Return the registry api port -If the registry api port is provided, it will use that, otherwise it will fallback -to the service default -*/}} -{{- define "gitlab.registry.api.port" -}} -{{- $localRegistry := default (dict) .Values.registry -}} -{{- $localRegistryApi := dig "api" (dict) $localRegistry -}} -{{- $globalRegistryApi := dig "registry" "api" (dict) .Values.global -}} -{{- coalesce .Values.global.hosts.registry.servicePort $localRegistryApi.port $globalRegistryApi.port "5000" -}} -{{- end -}} - -{{/* -Return the registry api protocol -If the registry api protocol is provided, it will use that, otherwise it will fallback -to the service default -*/}} -{{- define "gitlab.registry.api.protocol" -}} -{{- $localRegistry := default (dict) .Values.registry -}} -{{- $localRegistryApi := dig "api" (dict) $localRegistry -}} -{{- $globalRegistryApi := dig "registry" "api" (dict) .Values.global -}} -{{- coalesce .Values.global.hosts.registry.protocol $localRegistryApi.protocol $globalRegistryApi.protocol "http" -}} -{{- end -}} - - -{{/* -Return the registry api url -*/}} -{{- define "gitlab.registry.api.url" -}} -{{- $scheme := include "gitlab.registry.api.protocol" . -}} -{{- $host := include "gitlab.registry.api.host" . -}} -{{- $port := include "gitlab.registry.api.port" . -}} -{{ printf "%s://%s:%s" $scheme $host $port }} -{{- end -}} - -{{- define "gitlab.appConfig.registry.configuration" -}} -{{- $registryPort := pluck "port" (default (dict) .Values.registry) .Values.global.registry | first -}} -{{- $localRegistry := default (dict) .Values.registry -}} -{{- $localRegistryEnabled := dig "enabled" false $localRegistry -}} -{{- $globalRegistryEnabled := dig "registry" "enabled" false .Values.global -}} -{{- $registryTokenIssuer := pluck "tokenIssuer" (default (dict) .Values.registry) .Values.global.registry | first -}} -registry: - enabled: {{ or (not (kindIs "bool" $localRegistryEnabled )) (not (kindIs "bool" $globalRegistryEnabled )) $localRegistryEnabled $globalRegistryEnabled }} - host: {{ template "gitlab.registry.hostname" . }} - {{- if $registryPort }} - port: {{ $registryPort }} - {{- end }} - api_url: {{ template "gitlab.registry.api.url" . }} - key: /etc/gitlab/registry/gitlab-registry.key - issuer: {{ default "gitlab-issuer" $registryTokenIssuer }} - notification_secret: <%= YAML.load_file("/etc/gitlab/registry/notificationSecret").flatten.first %> -{{- end -}}{{/* "gitlab.appConfig.registry.configuration" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_sentry.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_sentry.tpl deleted file mode 100644 index dd919b514..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_sentry.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* -Generates sentry configuration. - -Usage: -{{ include "gitlab.appConfig.sentry.configuration" $ }} -*/}} -{{- define "gitlab.appConfig.sentry.configuration" -}} -sentry: - enabled: {{ eq $.Values.global.appConfig.sentry.enabled true }} - dsn: {{ $.Values.global.appConfig.sentry.dsn }} - clientside_dsn: {{ $.Values.global.appConfig.sentry.clientside_dsn }} - environment: {{ $.Values.global.appConfig.sentry.environment }} -{{- end -}}{{/* "gitlab.appConfig.sentry.configuration" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_serviceAccount.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_serviceAccount.tpl deleted file mode 100644 index 322f9a5cc..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_serviceAccount.tpl +++ /dev/null @@ -1,10 +0,0 @@ -{{/* ######### serviceAccount template */}} - -{{/* -Return the sub-chart serviceAccount name -If that is not present it will use the global chart serviceAccount name -Failing that a serviceAccount will be generated automatically -*/}} -{{- define "gitlab.serviceAccount.name" -}} -{{- coalesce .Values.serviceAccount.name .Values.global.serviceAccount.name ( include "fullname" . ) -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_sidekiq.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_sidekiq.tpl deleted file mode 100644 index 4301f9dbb..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_sidekiq.tpl +++ /dev/null @@ -1,21 +0,0 @@ -{{/* -Generates sidekiq (client) configuration. - -Usage: -{{ include "gitlab.appConfig.sidekiq.configuration" $ }} -*/}} -{{- define "gitlab.appConfig.sidekiq.configuration" -}} -{{- with $.Values.global.appConfig.sidekiq }} -sidekiq: -{{- $loggingFormat := default "json" (pluck "format" (default (dict) $.Values.logging) | first) }} - log_format: {{ $loggingFormat }} -{{- if kindIs "slice" .routingRules }} - {{- if gt (len .routingRules) 0 }} - routing_rules: - {{- range $rule := .routingRules }} - - {{ toJson $rule }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} -{{- end -}}{{/* "gitlab.appConfig.sidekiq.configuration" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_smartcard.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_smartcard.tpl deleted file mode 100644 index fd2c6b4d2..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_smartcard.tpl +++ /dev/null @@ -1,24 +0,0 @@ -{{/* ######### Smartcard related templates */}} - -{{/* -Returns the Smartcard hostname. -If the hostname is set in `global.hosts.smartcard.name`, that will be returned, -otherwise the hostname will be assembed using `smartcard` as the prefix, and the `gitlab.assembleHost` function. -*/}} -{{- define "gitlab.smartcard.hostname" -}} -{{- coalesce .Values.global.appConfig.smartcard.clientCertificateRequiredHost .Values.global.hosts.smartcard.name (include "gitlab.assembleHost" (dict "name" "smartcard" "context" . )) -}} -{{- end -}} - - -{{- define "gitlab.appConfig.smartcard.configuration" -}} -smartcard: -{{- with $.Values.global.appConfig.smartcard }} - enabled: {{ eq true .enabled }} - ca_file: '/etc/gitlab/rails-secrets/smartcard-ca.crt' - client_certificate_required_host: {{ template "gitlab.smartcard.hostname" $ }} - client_certificate_required_port: 443 - san_extensions: {{ eq true .sanExtensions }} - required_for_git_access: {{ eq true .requiredForGitAccess }} -{{- end -}} -{{- end -}}{{/* "gitlab.appConfig.smartcard.configuration" */}} - diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_smtp.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_smtp.tpl deleted file mode 100644 index ae53509bd..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_smtp.tpl +++ /dev/null @@ -1,95 +0,0 @@ -{{/* ######### SMTP templates */}} - -{{/* - Generates smtp settings for ActionMailer to be used in webservice and sidekiq -*/}} -{{- define "gitlab.smtp_settings" -}} -{{- if .Values.global.smtp.enabled -}} -smtp_settings = { - address: {{ .Values.global.smtp.address | quote }}, - port: {{ .Values.global.smtp.port | int }}, - ca_file: "/etc/ssl/certs/ca-certificates.crt", - {{- if .Values.global.smtp.domain }} - domain: {{ .Values.global.smtp.domain | quote }}, - {{- end }} - {{ if has .Values.global.smtp.authentication (list "login" "plain" "cram_md5") }} - authentication: :{{.Values.global.smtp.authentication}}, - user_name: {{ .Values.global.smtp.user_name | quote }}, - password: File.read("/etc/gitlab/smtp/smtp-password").strip, - {{- end }} - {{- if .Values.global.smtp.starttls_auto }} - enable_starttls_auto: true, - {{- else }} - enable_starttls_auto: false, - {{- end }} - {{- if has .Values.global.smtp.tls (list true false) }} - tls: {{ .Values.global.smtp.tls }}, - {{- end }} - {{- if .Values.global.smtp.openssl_verify_mode }} - openssl_verify_mode: {{ .Values.global.smtp.openssl_verify_mode | quote }}, - {{- end }} - {{- if .Values.global.smtp.open_timeout }} - open_timeout: {{ .Values.global.smtp.open_timeout | int }}, - {{- end }} - {{- if .Values.global.smtp.read_timeout }} - read_timeout: {{ .Values.global.smtp.read_timeout | int }} - {{- end }} -} - -{{ if eq .Values.global.smtp.pool true -}} -require 'mail/smtp_pool' - -ActionMailer::Base.add_delivery_method :smtp_pool, Mail::SMTPPool - -Gitlab::Application.config.action_mailer.delivery_method = :smtp_pool -ActionMailer::Base.delivery_method = :smtp_pool - -ActionMailer::Base.smtp_pool_settings = { - pool: Mail::SMTPPool.create_pool( - smtp_settings.merge(pool_size: Gitlab::Runtime.max_threads) - ) -} -{{- else -}} -Rails.application.config.action_mailer.delivery_method = :smtp -ActionMailer::Base.delivery_method = :smtp - -ActionMailer::Base.smtp_settings = smtp_settings -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* Default from address for emails based on domain */}} -{{- define "gitlab.email.from" -}} -{{ .Values.global.email.from | default (printf "gitlab@%s" .Values.global.hosts.domain ) | quote -}} -{{- end -}} - -{{/* Default replyto address for emails based on domain */}} -{{- define "gitlab.email.reply_to" -}} -{{ .Values.global.email.reply_to | default (printf "noreply@%s" .Values.global.hosts.domain ) | quote -}} -{{- end -}} - -{{/* Outgoing email settings */}} -{{- define "gitlab.outgoing_email_settings" }} -email_from: {{ template "gitlab.email.from" . }} -email_display_name: {{ .Values.global.email.display_name | quote }} -email_reply_to: {{ template "gitlab.email.reply_to" . }} -email_subject_suffix: {{ .Values.global.email.subject_suffix | quote }} -{{- if .Values.global.email.smime.enabled }} -email_smime: - enabled: true - key_file: /home/git/gitlab/.gitlab_smime_key - cert_file: /home/git/gitlab/.gitlab_smime_cert -{{- end }} -{{- end }} - -{{/* microsoftGraphMailer secrets */}} -{{- define "gitlab.appConfig.microsoftGraphMailer.mountSecrets" -}} -# mount secrets for microsoftGraphMailer -{{- if $.Values.global.appConfig.microsoft_graph_mailer.enabled }} -- secret: - name: {{ $.Values.global.appConfig.microsoft_graph_mailer.client_secret.secret | required "Missing required secret containing the OAuth2 Client ID for outgoing email. Make sure to set `global.appConfig.microsoft_graph_mailer.client_secret.secret`" }} - items: - - key: {{ $.Values.global.appConfig.microsoft_graph_mailer.client_secret.key }} - path: microsoft_graph_mailer/client_secret -{{- end }} -{{- end -}}{{/* "gitlab.appConfig.microsoftGraphMailer.mountSecrets" "*/}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_spamcheck.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_spamcheck.tpl deleted file mode 100644 index 071eb68c7..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_spamcheck.tpl +++ /dev/null @@ -1,7 +0,0 @@ -{{/* ######### Spamcheck related templates */}} -{{/* -Return the Spamcheck service name -*/}} -{{- define "gitlab.spamcheck.serviceName" -}} -{{- include "gitlab.other.fullname" (dict "context" . "chartName" "spamcheck") -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_suggested_reviewers.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_suggested_reviewers.tpl deleted file mode 100644 index b5528582a..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_suggested_reviewers.tpl +++ /dev/null @@ -1,10 +0,0 @@ -{{/* ######### Suggested Reviewers related templates */}} - -{{- define "gitlab.suggestedReviewers.mountSecrets" -}} -# mount secret for suggested reviewers -- secret: - name: {{ template "gitlab.suggested-reviewers.secret" . }} - items: - - key: {{ template "gitlab.suggested-reviewers.key" . }} - path: suggested_reviewers/.gitlab_suggested_reviewers_secret -{{- end -}}{{/* "gitlab.suggestedReviewers.mountSecrets" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_terraformState.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_terraformState.tpl deleted file mode 100644 index 0250e65db..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_terraformState.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{/* -Generates a templated config for terraform_state key in gitlab.yml. - -Usage: -{{ include "gitlab.appConfig.terraformState.configuration" ( \ - dict \ - "config" .Values.path.to.terraform_state.config \ - "context" $ \ - ) }} -*/}} -{{- define "gitlab.appConfig.terraformState.configuration" -}} -terraform_state: - enabled: {{ if kindIs "bool" .config.enabled }}{{ eq .config.enabled true }}{{ end }} - {{- if not .context.Values.global.appConfig.object_store.enabled }} - {{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "terraform_state" "config" .config "context" .context) | nindent 2 }} - {{- end }} -{{- end -}}{{/* "gitlab.appConfig.terraformState.configuration" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_tracing.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_tracing.tpl deleted file mode 100644 index 16269cbae..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_tracing.tpl +++ /dev/null @@ -1,8 +0,0 @@ -{{/* ######### Tracing templates */}} - -{{- define "gitlab.tracing.env" -}} -{{- if .Values.global.tracing.connection.string }} -- name: GITLAB_TRACING - value: {{ .Values.global.tracing.connection.string | quote }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_uploads.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_uploads.tpl deleted file mode 100644 index ffdb524c1..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_uploads.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{/* -Generates a templated config for uploads key in gitlab.yml. - -Usage: -{{ include "gitlab.appConfig.uploads.configuration" ( \ - dict \ - "config" .Values.path.to.uploads.config \ - "context" $ \ - ) }} -*/}} -{{- define "gitlab.appConfig.uploads.configuration" -}} -uploads: - enabled: {{ if kindIs "bool" .config.enabled }}{{ eq .config.enabled true }}{{ end }} - {{- if not .context.Values.global.appConfig.object_store.enabled }} - {{- include "gitlab.appConfig.objectStorage.configuration" (dict "name" "uploads" "config" .config "context" .context) | nindent 2 }} - {{- end }} -{{- end -}}{{/* "gitlab.appConfig.uploads.configuration" */}} diff --git a/charts/gitlab/gitlab/charts/gitlab/templates/_workhorse.tpl b/charts/gitlab/gitlab/charts/gitlab/templates/_workhorse.tpl deleted file mode 100644 index ba43643f3..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/templates/_workhorse.tpl +++ /dev/null @@ -1,40 +0,0 @@ -{{/* ######### workhorse templates */}} - -{{/* -Return the workhorse url -*/}} -{{- define "gitlab.workhorse.url" -}} -{{ template "gitlab.workhorse.scheme" . }}://{{ template "gitlab.workhorse.host" . }}:{{ template "gitlab.workhorse.port" . }} -{{- end -}} - -{{- define "gitlab.workhorse.scheme" -}} -{{- $scheme := "http" -}} -{{- if .Values.global.workhorse.tls.enabled -}} -{{- $scheme = "https" -}} -{{- end -}} -{{- coalesce .Values.workhorse.scheme .Values.global.workhorse.scheme $scheme -}} -{{- end -}} - -{{/* -Return the workhorse hostname -If the workhorse host is provided, it will use that, otherwise it will fallback -to the service name -*/}} -{{- define "gitlab.workhorse.host" -}} -{{- $hostname := default .Values.global.workhorse.host .Values.workhorse.host -}} -{{- if empty $hostname -}} -{{- $name := default .Values.global.workhorse.serviceName .Values.workhorse.serviceName -}} -{{- $hostname = printf "%s-%s.%s.svc" .Release.Name $name .Release.Namespace -}} -{{- end -}} -{{- $hostname -}} -{{- end -}} - -{{- define "gitlab.workhorse.port" -}} -{{- coalesce .Values.workhorse.port .Values.global.workhorse.port "8181" -}} -{{- end -}} - -{{- define "gitlab.workhorse.shutdownTimeout" -}} -{{- $timeout := add 1 $.Values.global.webservice.workerTimeout -}} -{{- $shutdownTimeout := printf "%ss" ($timeout | toString) -}} -{{- coalesce $.Values.workhorse.shutdownTimeout $shutdownTimeout -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/gitlab/values.yaml b/charts/gitlab/gitlab/charts/gitlab/values.yaml deleted file mode 100644 index f4b231b4a..000000000 --- a/charts/gitlab/gitlab/charts/gitlab/values.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Default values for gitlab-chart. -# This is a YAML-formatted file. - -global: - edition: ee - hosts: - domain: example.com - https: true - enterpriseImages: - # Default repositories used to pull Gitlab Enterprise Edition images. - # See the image.repository and workhorse.repository template helpers. - migrations: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-toolbox-ee - sidekiq: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-sidekiq-ee - toolbox: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-toolbox-ee - webservice: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-webservice-ee - workhorse: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-workhorse-ee - geo-logcursor: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-geo-logcursor - communityImages: - # Default repositories used to pull Gitlab Community Edition images. - # See the image.repository and workhorse.repository template helpers. - migrations: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-toolbox-ce - sidekiq: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-sidekiq-ce - toolbox: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-toolbox-ce - webservice: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-webservice-ce - workhorse: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-workhorse-ce - # This exists to support template handling - psql: - knownDecompositions: - - main - - ci - - embedding - -gitlab-runner: - enabled: false diff --git a/charts/gitlab/gitlab/charts/minio/Chart.yaml b/charts/gitlab/gitlab/charts/minio/Chart.yaml deleted file mode 100644 index 3625799f2..000000000 --- a/charts/gitlab/gitlab/charts/minio/Chart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -appVersion: RELEASE.2017-12-28T01-21-00Z -description: Object storage server built for cloud applications and devops. -home: https://minio.io -icon: https://www.minio.io/img/logo_160x160.png -keywords: -- S3 -- gitlab -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: minio -sources: -- https://gitlab.com/gitlab-org/charts/gitlab/charts/minio -- https://github.com/minio/minio -version: 0.4.3 diff --git a/charts/gitlab/gitlab/charts/minio/templates/NOTES.txt b/charts/gitlab/gitlab/charts/minio/templates/NOTES.txt deleted file mode 100644 index 6e60bcb82..000000000 --- a/charts/gitlab/gitlab/charts/minio/templates/NOTES.txt +++ /dev/null @@ -1,48 +0,0 @@ -{{- if .Values.enabled }} -{{- if eq .Values.serviceType "ClusterIP" }} -Minio can be accessed via port {{ .Values.servicePort }} on the following DNS name from within your cluster: -{{ template "minio.fullname" . }}-svc.{{ .Release.Namespace }}.svc.cluster.local - -To access Minio from localhost, run the below commands: - - 1. export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "minio.fullname" . }}" -o jsonpath="{.items[0].metadata.name}") - - 2. kubectl port-forward $POD_NAME 9000 --namespace {{ .Release.Namespace }} - -Read more about port forwarding here: http://kubernetes.io/docs/user-guide/kubectl/kubectl_port-forward/ - -You can now access Minio server on http://localhost:9000. Follow the below steps to connect to Minio server with mc client: - - 1. Download the Minio mc client - https://docs.minio.io/docs/minio-client-quickstart-guide - - 2. mc config host add {{ template "minio.fullname" . }}-local http://localhost:9000 {{ .Values.accessKey }} {{ .Values.secretKey }} S3v4 - - 3. mc ls {{ template "minio.fullname" . }}-local - -Alternately, you can use your browser or the Minio SDK to access the server - https://docs.minio.io/categories/17 -{{- end }} -{{- if eq .Values.serviceType "LoadBalancer" }} -Minio can be accessed via port {{ .Values.servicePort }} on an external IP address. Get the service external IP address by: -kubectl get svc --namespace {{ .Release.Namespace }} -l app={{ template "minio.fullname" . }} - -Note that the public IP may take a couple of minutes to be available. - -You can now access Minio server on http://:9000. Follow the below steps to connect to Minio server with mc client: - - 1. Download the Minio mc client - https://docs.minio.io/docs/minio-client-quickstart-guide - - 2. mc config host add {{ template "minio.fullname" . }}-local http://:{{ .Values.servicePort }} {{ .Values.accessKey }} {{ .Values.secretKey }} S3v4 - - 3. mc ls {{ template "minio.fullname" . }}-local - -Alternately, you can use your browser or the Minio SDK to access the server - https://docs.minio.io/categories/17 -{{- end }} - -{{ if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }} -Note: Since NetworkPolicy is enabled, only pods with label -{{ template "minio.fullname" . }}-client=true" -will be able to connect to this minio cluster. -{{- end }} -{{- else }} -Minio not enabled: `enabled: {{ .Values.enabled }}`. Please set to `true` to use Minio -{{- end }} diff --git a/charts/gitlab/gitlab/charts/minio/templates/_helper_create_buckets.sh b/charts/gitlab/gitlab/charts/minio/templates/_helper_create_buckets.sh deleted file mode 100644 index 3cabb5f1f..000000000 --- a/charts/gitlab/gitlab/charts/minio/templates/_helper_create_buckets.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh -# minio/mc container has Busybox Ash, be sure to be POSIX compliant and avoid Bash-isms -set -e ; # Have script exit in the event of a failed command. - -# connectToMinio -# Use a check-sleep-check loop to wait for Minio service to be available -connectToMinio() { - set -e ; # fail if we can't read the keys. - ACCESS=$(cat /config/accesskey) ; SECRET=$(cat /config/secretkey) ; - set +e ; # The connections to minio are allowed to fail. - echo "Connecting to Minio server: http://$MINIO_ENDPOINT:$MINIO_PORT" ; - MC_COMMAND="mc config host add myminio http://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; - $MC_COMMAND ; - STATUS=$? ; - until [ $STATUS -eq 0 ] ; - do - sleep 1 ; # 1 second intervals between attempts - $MC_COMMAND ; - STATUS=$? ; - done ; - set -e ; # reset `e` as active - return 0 -} - -# checkBucketExists ($bucket) -# Check if the bucket exists, by using the exit code of `mc ls` -checkBucketExists() { - BUCKET=$1 - CMD=$(/usr/bin/mc ls myminio/$BUCKET > /dev/null 2>&1) - return $? -} - -# createBucket ($bucket, $policy, $purge) -# Ensure bucket exists, purging if asked to -createBucket() { - BUCKET=$1 - POLICY=$2 - PURGE=$3 - - - # Purge the bucket, if set & exists - # Since PURGE is user input, check explicitly for `true` - if [ $PURGE = true ]; then - if checkBucketExists $BUCKET ; then - echo "Purging bucket '$BUCKET'." - set +e ; # don't exit if this fails - /usr/bin/mc rm -r --force myminio/$BUCKET - set -e ; # reset `e` as active - else - echo "Bucket '$BUCKET' does not exist, skipping purge." - fi - fi - - # Create the bucket if it does not exist - if ! checkBucketExists $BUCKET ; then - echo "Creating bucket '$BUCKET'" - /usr/bin/mc mb myminio/$BUCKET - else - echo "Bucket '$BUCKET' already exists." - fi - - # At this point, the bucket should exist, skip checking for existance - # Set policy on the bucket - echo "Setting policy of bucket '$BUCKET' to '$POLICY'." - /usr/bin/mc policy $POLICY myminio/$BUCKET -} - -connectToMinio -{{- range $bucket := .Values.defaultBuckets }} -createBucket {{ .name }} {{ default "none" .policy }} {{ default false .purge }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/minio/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/minio/templates/_helpers.tpl deleted file mode 100644 index 83dc6b11e..000000000 --- a/charts/gitlab/gitlab/charts/minio/templates/_helpers.tpl +++ /dev/null @@ -1,54 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "minio.name" -}} -{{- default .Chart.Name .Values.nameOverride | 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). -*/}} -{{- define "minio.fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for networkpolicy. -*/}} -{{- define "minio.networkPolicy.apiVersion" -}} -{{- if and (ge .Capabilities.KubeVersion.Minor "4") (le .Capabilities.KubeVersion.Minor "6") -}} -{{- print "extensions/v1beta1" -}} -{{- else if ge .Capabilities.KubeVersion.Minor "7" -}} -{{- print "networking.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified job name for creating default buckets. -Due to the job only being allowed to run once, we add the chart revision so helm -upgrades don't cause errors trying to create the already ran job. -Due to the helm delete not cleaning up these jobs, we add a random value to -reduce collision -*/}} -{{- define "minio.createBucketsJobName" -}} -{{- $name := include "minio.fullname" . | trunc 40 | trimSuffix "-" -}} -{{- printf "%s-create-buckets-%d" $name .Release.Revision -}} -{{- end -}} - -{{/* -Returns the secret name for the Secret containing the TLS certificate and key. -Uses `ingress.tls.secretName` first and falls back to `global.ingress.tls.secretName` -if there is a shared tls secret for all ingresses. -*/}} -{{- define "minio.tlsSecret" -}} -{{- $defaultName := (dict "secretName" "") -}} -{{- if .Values.global.ingress.configureCertmanager -}} -{{- $_ := set $defaultName "secretName" (printf "%s-minio-tls" .Release.Name) -}} -{{- else -}} -{{- $_ := set $defaultName "secretName" (include "gitlab.wildcard-self-signed-cert-name" .) -}} -{{- end -}} -{{- pluck "secretName" .Values.ingress.tls .Values.global.ingress.tls $defaultName | first -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/minio/templates/create-buckets-job.yaml b/charts/gitlab/gitlab/charts/minio/templates/create-buckets-job.yaml deleted file mode 100644 index d96048852..000000000 --- a/charts/gitlab/gitlab/charts/minio/templates/create-buckets-job.yaml +++ /dev/null @@ -1,62 +0,0 @@ -{{- if and .Values.global.minio.enabled .Values.defaultBuckets }} -{{- /* Placeholder to bridge MinIO chart values with "gitlab.image.*" helper templates */ -}} -{{- $minioMcImageCfg := dict "pullPolicy" .Values.imagePullPolicy "pullSecrets" .Values.pullSecrets -}} -{{- $imageCfg := dict "global" .Values.global.image "local" $minioMcImageCfg -}} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "minio.createBucketsJobName" . }} - namespace: {{ $.Release.Namespace }} - labels: -{{- include "gitlab.standardLabels" . | nindent 4 }} -{{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - activeDeadlineSeconds: 600 - template: - metadata: - labels: - component: create-buckets - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - {{- if .Values.jobAnnotations }} - annotations: - {{- range $key, $value := .Values.jobAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - - spec: - automountServiceAccountToken: false - restartPolicy: OnFailure - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- if .Values.tolerations }} - tolerations: - {{ toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- include "gitlab.priorityClassName" . | nindent 6 }} - volumes: - - name: minio-configuration - projected: - sources: - - configMap: - name: {{ template "minio.fullname" . }}-config-cm - - secret: - name: {{ template "gitlab.minio.credentials.secret" . }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6}} - containers: - - name: minio-mc - image: {{ .Values.minioMc.image }}:{{ .Values.minioMc.tag }} - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 8 }} - command: ["/bin/sh", "/config/initialize"] - env: - - name: MINIO_ENDPOINT - value: {{ printf "%s-svc.%s.svc" (include "minio.fullname" .) .Release.Namespace }} - - name: MINIO_PORT - value: {{ .Values.servicePort | quote }} - volumeMounts: - - name: minio-configuration - mountPath: /config - resources: -{{ toYaml .Values.init.resources | indent 10 }} - {{- end }} diff --git a/charts/gitlab/gitlab/charts/minio/templates/ingress.yaml b/charts/gitlab/gitlab/charts/minio/templates/ingress.yaml deleted file mode 100644 index 1bba5cb6c..000000000 --- a/charts/gitlab/gitlab/charts/minio/templates/ingress.yaml +++ /dev/null @@ -1,56 +0,0 @@ -{{- if .Values.global.minio.enabled -}} -{{- if eq (include "gitlab.ingress.enabled" $) "true" -}} -{{- $minioHostname := include "gitlab.minio.hostname" . -}} -{{- $tlsSecret := include "minio.tlsSecret" . -}} -{{- $ingressCfg := dict "global" .Values.global.ingress "local" .Values.ingress "context" . -}} - -apiVersion: {{ template "gitlab.ingress.apiVersion" $ingressCfg }} -kind: Ingress -metadata: - name: {{ template "minio.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: -{{- include "gitlab.standardLabels" . | nindent 4 }} -{{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{ include "ingress.class.annotation" $ingressCfg }} - kubernetes.io/ingress.provider: "{{ template "gitlab.ingress.provider" $ingressCfg }}" - {{- if eq "nginx" .Values.global.ingress.provider }} - nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.ingress.proxyBodySize | quote }} - nginx.ingress.kubernetes.io/proxy-read-timeout: {{ .Values.ingress.proxyReadTimeout | quote }} - nginx.ingress.kubernetes.io/proxy-request-buffering: {{ .Values.ingress.proxyBuffering | quote }} - nginx.ingress.kubernetes.io/proxy-buffering: {{ .Values.ingress.proxyBuffering | quote }} - {{- end }} - {{- include "gitlab.certmanager_annotations" . | nindent 4 }} - {{- range $key, $value := merge .Values.ingress.annotations .Values.global.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - {{ include "ingress.class.field" $ingressCfg }} - rules: - - host: {{ $minioHostname }} - http: - paths: - - path: {{ coalesce $.Values.ingress.path $.Values.global.ingress.path }} - {{ if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (eq $.Values.global.ingress.apiVersion "networking.k8s.io/v1") -}} - pathType: {{ default "Prefix" $.Values.global.ingress.pathType }} - backend: - service: - name: {{ template "minio.fullname" . }}-svc - port: - number: {{ .Values.servicePort }} - {{- else -}} - backend: - serviceName: {{ template "minio.fullname" . }}-svc - servicePort: {{ .Values.servicePort }} - {{- end -}} - {{- if (and $tlsSecret (eq (include "gitlab.ingress.tls.enabled" $) "true" )) }} - tls: - - hosts: - - {{ $minioHostname }} - secretName: {{ $tlsSecret }} - {{- else }} - tls: [] - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/minio/templates/minio_deployment.yaml b/charts/gitlab/gitlab/charts/minio/templates/minio_deployment.yaml deleted file mode 100644 index 4cba8672b..000000000 --- a/charts/gitlab/gitlab/charts/minio/templates/minio_deployment.yaml +++ /dev/null @@ -1,109 +0,0 @@ -{{- if .Values.global.minio.enabled -}} -{{- /* Placeholder to bridge MinIO chart values with "gitlab.image.*" helper templates */ -}} -{{- $minioImageCfg := dict "pullPolicy" .Values.imagePullPolicy "pullSecrets" .Values.pullSecrets -}} -{{- $imageCfg := dict "global" .Values.global.image "local" $minioImageCfg -}} -{{- $initImageCfg := dict "global" .Values.global.busybox.image "local" .Values.init.image -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "minio.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.deploymentAnnotations" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "minio.name" . }} - release: "{{ .Release.Name }}" - component: app - {{- if .Values.deployment.strategy }} - strategy: {{ .Values.deployment.strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - name: {{ template "minio.fullname" . }} - labels: - component: app - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: -{{- if .Values.podAnnotations }} -{{ toYaml .Values.podAnnotations | trimSuffix "\n" | indent 8 }} -{{- end }} - spec: - automountServiceAccountToken: false - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- include "gitlab.priorityClassName" . | nindent 6 }} - volumes: - - name: podinfo - downwardAPI: - items: - - path: "labels" - fieldRef: - fieldPath: metadata.labels - - name: export - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ template "minio.fullname" . }} - {{- else }} - emptyDir: {} - {{- end }} - - name: minio-configuration - projected: - sources: - - configMap: - name: {{ template "minio.fullname" . }}-config-cm - - secret: - name: {{ template "gitlab.minio.credentials.secret" . }} - - name: minio-server-config - emptyDir: - medium: "Memory" - initContainers: - - name: configure - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - command: ["sh", "/config/configure"] - volumeMounts: - - name: minio-configuration - mountPath: /config - - name: minio-server-config - mountPath: /minio - resources: -{{ toYaml .Values.init.resources | indent 12 }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6}} - containers: - - name: minio - image: {{ .Values.image }}:{{ .Values.imageTag }} - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - args: ["-C", "{{ default "/tmp/.minio" .Values.configPath }}", "--quiet", "server", "{{ .Values.mountPath }}"] - volumeMounts: - - name: export - mountPath: {{ .Values.mountPath }} - {{- if and .Values.persistence.enabled .Values.persistence.subPath }} - subPath: "{{ .Values.persistence.subPath }}" - {{- end }} - - name: minio-server-config - # this path altered from upstream, for use with `securityContext`/UID 1000 - mountPath: {{ default "/tmp/.minio" .Values.configPath | quote }} - - name: podinfo - mountPath: /podinfo - readOnly: false - ports: - - name: service - containerPort: 9000 - livenessProbe: - tcpSocket: - port: 9000 - timeoutSeconds: 1 - resources: -{{ toYaml .Values.resources | indent 12 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/minio/templates/minio_networkpolicy.yaml b/charts/gitlab/gitlab/charts/minio/templates/minio_networkpolicy.yaml deleted file mode 100644 index 7d6ed3516..000000000 --- a/charts/gitlab/gitlab/charts/minio/templates/minio_networkpolicy.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if .Values.networkPolicy.enabled | and .Values.global.minio.enabled }} -kind: NetworkPolicy -apiVersion: {{ template "minio.networkPolicy.apiVersion" . }} -metadata: - name: {{ template "minio.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: -{{- include "gitlab.standardLabels" . | nindent 4 }} -{{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - podSelector: - matchLabels: - app: {{ template "minio.name" . }} - release: {{ .Release.Name }} - ingress: - - ports: - - port: {{ .Values.servicePort }} - {{- if not .Values.networkPolicy.allowExternal }} - from: - - podSelector: - matchLabels: - {{ template "minio.fullname" . }}-client: "true" - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/minio/templates/minio_pvc.yaml b/charts/gitlab/gitlab/charts/minio/templates/minio_pvc.yaml deleted file mode 100644 index bfbc0f4a1..000000000 --- a/charts/gitlab/gitlab/charts/minio/templates/minio_pvc.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if and .Values.global.minio.enabled .Values.persistence.enabled }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "minio.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: -{{- include "gitlab.standardLabels" . | nindent 4 }} -{{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - accessModes: - - {{ .Values.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} -{{- if .Values.persistence.volumeName }} - volumeName: {{ .Values.persistence.volumeName }} -{{- end }} -{{- if .Values.persistence.storageClass }} -{{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" -{{- end -}} -{{- end }} - selector: -{{- if .Values.persistence.matchLabels }} - matchLabels: -{{ toYaml .Values.persistence.matchLabels | indent 6 }} -{{- end -}} -{{- if .Values.persistence.matchExpressions }} - matchExpressions: -{{ toYaml .Values.persistence.matchExpressions | indent 6 }} -{{- end -}} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/minio/templates/minio_svc.yaml b/charts/gitlab/gitlab/charts/minio/templates/minio_svc.yaml deleted file mode 100644 index 4b5e2d4e8..000000000 --- a/charts/gitlab/gitlab/charts/minio/templates/minio_svc.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if .Values.global.minio.enabled -}} -kind: Service -apiVersion: v1 -metadata: - name: {{ template "minio.fullname" . }}-svc - namespace: {{ $.Release.Namespace }} - labels: -{{- include "gitlab.standardLabels" . | nindent 4 }} -{{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: -{{ include "gitlab.serviceAnnotations" . | indent 4 }} -spec: - type: {{ .Values.serviceType }} - {{- if eq .Values.serviceType "LoadBalancer" }} - loadBalancerIP: {{ default "" .Values.minioLoadBalancerIP }} - {{- end }} - selector: - app: {{ template "minio.name" . }} - release: {{ .Release.Name }} - component: app - ports: - - name: http - port: 9000 - targetPort: {{ .Values.servicePort }} - protocol: TCP -{{- end }} diff --git a/charts/gitlab/gitlab/charts/minio/templates/minioconfig_configmap.yaml b/charts/gitlab/gitlab/charts/minio/templates/minioconfig_configmap.yaml deleted file mode 100644 index b8bb02b80..000000000 --- a/charts/gitlab/gitlab/charts/minio/templates/minioconfig_configmap.yaml +++ /dev/null @@ -1,140 +0,0 @@ -{{- if .Values.global.minio.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "minio.fullname" . }}-config-cm - namespace: {{ $.Release.Namespace }} - labels: -{{- include "gitlab.standardLabels" . | nindent 4 }} -{{- include "gitlab.commonLabels" . | nindent 4 }} -data: - initialize: |- -{{ include (print $.Template.BasePath "/_helper_create_buckets.sh") . | indent 4 }} - configure: |- - {{ .Values.init.script }} - config.json: |- - { - "version": "20", - "credential": { - "accessKey": "ACCESS_KEY", - "secretKey": "SECRET_KEY" - }, - "region": {{ .Values.minioConfig.region | quote }}, - "browser": {{ .Values.minioConfig.browser | quote }}, - "domain": {{ .Values.minioConfig.domain | quote }}, - "logger": { - "console": { - "enable": {{ .Values.minioConfig.logger.console.enable }} - }, - "file": { - "enable": {{ .Values.minioConfig.logger.file.enable }}, - "fileName": {{ .Values.minioConfig.logger.file.filename | quote }} - } - }, - "notify": { - "amqp": { - "1": { - "enable": {{ .Values.minioConfig.aqmp.enable }}, - "url": {{ .Values.minioConfig.aqmp.url | quote }}, - "exchange": {{ .Values.minioConfig.aqmp.exchange | quote }}, - "routingKey": {{ .Values.minioConfig.aqmp.routingKey | quote }}, - "exchangeType": {{ .Values.minioConfig.aqmp.exchangeType | quote }}, - "deliveryMode": {{ .Values.minioConfig.aqmp.deliveryMode }}, - "mandatory": {{ .Values.minioConfig.aqmp.mandatory }}, - "immediate": {{ .Values.minioConfig.aqmp.immediate }}, - "durable": {{ .Values.minioConfig.aqmp.durable }}, - "internal": {{ .Values.minioConfig.aqmp.internal }}, - "noWait": {{ .Values.minioConfig.aqmp.noWait }}, - "autoDeleted": {{ .Values.minioConfig.aqmp.autoDeleted }} - } - }, - "nats": { - "1": { - "enable": {{ .Values.minioConfig.nats.enable }}, - "address": {{ .Values.minioConfig.nats.address | quote }}, - "subject": {{ .Values.minioConfig.nats.subject | quote }}, - "username": {{ .Values.minioConfig.nats.username | quote }}, - "password": {{ .Values.minioConfig.nats.password | quote }}, - "token": {{ .Values.minioConfig.nats.token | quote }}, - "secure": {{ .Values.minioConfig.nats.secure }}, - "pingInterval": {{ .Values.minioConfig.nats.pingInterval | int64 }}, - "streaming": { - "enable": {{ .Values.minioConfig.nats.enableStreaming }}, - "clusterID": {{ .Values.minioConfig.nats.clusterID | quote }}, - "clientID": {{ .Values.minioConfig.nats.clientID | quote }}, - "async": {{ .Values.minioConfig.nats.async }}, - "maxPubAcksInflight": {{ .Values.minioConfig.nats.maxPubAcksInflight | int }} - } - } - }, - "elasticsearch": { - "1": { - "enable": {{ .Values.minioConfig.elasticsearch.enable }}, - "format": {{ .Values.minioConfig.elasticsearch.format | quote }}, - "url": {{ .Values.minioConfig.elasticsearch.url | quote }}, - "index": {{ .Values.minioConfig.elasticsearch.index | quote }} - } - }, - "redis": { - "1": { - "enable": {{ .Values.minioConfig.redis.enable }}, - "format": {{ .Values.minioConfig.redis.format | quote }}, - "address": {{ .Values.minioConfig.redis.address | quote }}, - "password": {{ .Values.minioConfig.redis.password | quote }}, - "key": {{ .Values.minioConfig.redis.key | quote }} - } - }, - "postgresql": { - "1": { - "enable": {{ .Values.minioConfig.postgresql.enable }}, - "format": {{ .Values.minioConfig.postgresql.format | quote }}, - "connectionString": {{ .Values.minioConfig.postgresql.connectionString | quote }}, - "table": {{ .Values.minioConfig.postgresql.table | quote }}, - "host": {{ .Values.minioConfig.postgresql.host | quote }}, - "port": {{ .Values.minioConfig.postgresql.port | quote }}, - "user": {{ .Values.minioConfig.postgresql.user | quote }}, - "password": {{ .Values.minioConfig.postgresql.password | quote }}, - "database": {{ .Values.minioConfig.postgresql.database | quote }} - } - }, - "kafka": { - "1": { - "enable": {{ .Values.minioConfig.kafka.enable }}, - "brokers": {{ .Values.minioConfig.kafka.brokers }}, - "topic": {{ .Values.minioConfig.kafka.topic | quote }} - } - }, - "webhook": { - "1": { - "enable": {{ .Values.minioConfig.webhook.enable }}, - "endpoint": {{ .Values.minioConfig.webhook.endpoint | quote }} - } - }, - "mysql": { - "1": { - "enable": {{ .Values.minioConfig.mysql.enable }}, - "format": {{ .Values.minioConfig.mysql.format | quote }}, - "dsnString": {{ .Values.minioConfig.mysql.dsnString | quote }}, - "table": {{ .Values.minioConfig.mysql.table | quote }}, - "host": {{ .Values.minioConfig.mysql.host | quote }}, - "port": {{ .Values.minioConfig.mysql.port | quote }}, - "user": {{ .Values.minioConfig.mysql.user | quote }}, - "password": {{ .Values.minioConfig.mysql.password | quote }}, - "database": {{ .Values.minioConfig.mysql.database | quote }} - } - }, - "mqtt": { - "1": { - "enable": {{ .Values.minioConfig.mqtt.enable }}, - "broker": {{ .Values.minioConfig.mqtt.broker | quote }}, - "topic": {{ .Values.minioConfig.mqtt.topic | quote }}, - "qos": {{ .Values.minioConfig.mqtt.qos | int }}, - "clientId": {{ .Values.minioConfig.mqtt.clientId | quote }}, - "username": {{ .Values.minioConfig.mqtt.username | quote }}, - "password": {{ .Values.minioConfig.mqtt.password | quote }} - } - } - } - } -# Blank line to signal end of Block -{{- end }} diff --git a/charts/gitlab/gitlab/charts/minio/templates/pdb.yaml b/charts/gitlab/gitlab/charts/minio/templates/pdb.yaml deleted file mode 100644 index 5355c0173..000000000 --- a/charts/gitlab/gitlab/charts/minio/templates/pdb.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.global.minio.enabled -}} -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - name: {{ template "minio.fullname" . }}-v1 - namespace: {{ $.Release.Namespace }} - labels: -{{- include "gitlab.standardLabels" . | nindent 4 }} -{{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - maxUnavailable: {{ .Values.maxUnavailable }} - selector: - matchLabels: - app: {{ template "minio.name" . }} - release: {{ .Release.Name }} - component: app -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/minio/values.yaml b/charts/gitlab/gitlab/charts/minio/values.yaml deleted file mode 100644 index 1f3a8b77b..000000000 --- a/charts/gitlab/gitlab/charts/minio/values.yaml +++ /dev/null @@ -1,263 +0,0 @@ -## Set default image, imageTag, and imagePullPolicy. -## Distributed Minio ref: https://docs.minio.io/docs/distributed-minio-quickstart-guide -## -image: "minio/minio" -imageTag: "RELEASE.2017-12-28T01-21-00Z" -# imagePullPolicy: IfNotPresent -# pullSecrets: [] - -minioMc: - image: minio/mc - tag: "RELEASE.2018-07-13T00-53-22Z" - -ingress: - apiVersion: - enabled: - proxyReadTimeout: 900 - proxyBodySize: "0" - proxyBuffering: "off" - tls: {} - # secretName: - # enabled: true - annotations: {} - configureCertmanager: - path: # / - -## Support for tolerations for pod scheduling -tolerations: [] - -# Priority class assigned to pods -priorityClassName: "" - -global: - ingress: - enabled: - annotations: {} - tls: {} - # secretName: - # enabled: true - hosts: - domain: example.com - hostSuffix: - https: true - tls: {} - # secretName: - minio: {} - #name: minio.example.com - #https: false - minio: - enabled: true - -common: - labels: {} - -## Control the InitContainer behaviors. -init: - image: {} - # repository: - # tag: - # pullPolicy: IfNotPresent - script: |- - sed -e 's@ACCESS_KEY@'"$(cat /config/accesskey)"'@' -e 's@SECRET_KEY@'"$(cat /config/secretkey)"'@' /config/config.json > /minio/config.json - resources: - requests: - cpu: 50m -## Set default Minio config file path, volume mount path and -## number of nodes (only used for Minio distributed mode) -## Distributed Minio ref: https://docs.minio.io/docs/distributed-minio-quickstart-guide -## -configPath: "" -mountPath: "/export" -replicas: 4 - -## loadBalancerIP for the Minio Service (optional, cloud specific) -## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer -## -# minioLoadBalancerIP: - -## Enable persistence using Persistent Volume Claims -## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ -## -persistence: - enabled: true - - ## minio data Persistent Volume Storage Class - ## 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: "-" - accessMode: ReadWriteOnce - size: 10Gi - - ## If subPath is set mount a sub folder of a volume instead of the root of the volume. - ## This is especially handy for volume plugins that don't natively support sub mounting (like glusterfs). - ## - subPath: "" - - ## if volumeName is set, use this existing PersistentVolume - # volumeName: - - ## Only bind to a volume with the following exactly matched labels with values. - ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector - matchLabels: {} - - ## Only bind to a volume with the following exppression matched labels. - ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector - matchExpressions: [] - -## Expose the Minio service to be accessed from outside the cluster (LoadBalancer service). -## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it. -## ref: http://kubernetes.io/docs/user-guide/services/ -## -serviceType: ClusterIP -servicePort: 9000 - -## Node labels for pod assignment -## Ref: https://kubernetes.io/docs/user-guide/node-selection/ -## -nodeSelector: {} - -## Configure resource requests and limits -## ref: http://kubernetes.io/docs/user-guide/compute-resources/ -## -resources: - requests: - memory: 128Mi - cpu: 100m - -# Additational pod annotations -podAnnotations: {} - -# Additional pod labels -podLabels: {} - -# Additional job annotations -jobAnnotations: {} - -## Create a buckets after minio install -## An array of items, with name, policy, and purge -defaultBuckets: - - name: registry - - name: git-lfs - - name: runner-cache - - name: gitlab-uploads - - name: gitlab-artifacts - - name: gitlab-backups - - name: gitlab-packages - - name: tmp - - name: gitlab-mr-diffs - - name: gitlab-terraform-state - - name: gitlab-ci-secure-files - - name: gitlab-dependency-proxy - - name: gitlab-pages - # - ## If enabled, must be a string with length > 0 - # - name: example - ## Can be one of none|download|upload|public, defaults to `none` - # policy: none - ## Can be omitted. If present, and `true`, will `rm -rf` the bucket - # purge: false - -## https://docs.minio.io/docs/minio-bucket-notification-guide -## -minioConfig: - region: "us-east-1" - browser: "on" - domain: "" - logger: - console: - enable: true - file: - enable: false - filename: "" - aqmp: - enable: false - url: "" - exchange: "" - routingKey: "" - exchangeType: "" - deliveryMode: 0 - mandatory: false - immediate: false - durable: false - internal: false - noWait: false - autoDeleted: false - nats: - enable: false - address: "" - subject: "" - username: "" - password: "" - token: "" - secure: false - pingInterval: 0 - enableStreaming: false - clusterID: "" - clientID: "" - async: false - maxPubAcksInflight: 0 - elasticsearch: - enable: false - format: "namespace" - url: "" - index: "" - redis: - enable: false - format: "namespace" - address: "" - password: "" - key: "" - postgresql: - enable: false - format: "namespace" - connectionString: "" - table: "" - host: "" - port: "" - user: "" - password: "" - database: "" - kafka: - enable: false - brokers: "null" - topic: "" - webhook: - enable: false - endpoint: "" - mysql: - enable: false - format: "namespace" - dsnString: "" - table: "" - host: "" - port: "" - user: "" - password: "" - database: "" - mqtt: - enable: false - broker: "" - topic: "" - qos: 0 - clientId: "" - username: "" - password: "" -networkPolicy: - enabled: false - allowExternal: true -maxUnavailable: 1 - -## Allow to overwrite under which User and Group we're running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -deployment: - strategy: - type: Recreate - rollingUpdate: null diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/Chart.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/Chart.yaml deleted file mode 100644 index ab2f487e3..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/Chart.yaml +++ /dev/null @@ -1,25 +0,0 @@ -annotations: - artifacthub.io/changes: | - - Disable builtin ssl_session_cache - - Print warning only instead of error if no IngressClass permission is available - - Bump internal libraries versions - - Fix documentations - artifacthub.io/prerelease: "false" -apiVersion: v2 -appVersion: 1.0.4 -description: Ingress controller for Kubernetes using NGINX as a reverse proxy and - load balancer -home: https://github.com/kubernetes/ingress-nginx -icon: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png -keywords: -- ingress -- nginx -kubeVersion: '>=1.19.0-0' -maintainers: -- name: ChiefAlexander -name: nginx-ingress -sources: -- https://github.com/kubernetes/ingress-nginx -- https://gitlab.com/gitlab-org/charts/gitlab/tree/master/charts/nginx-ingress -type: application -version: 4.0.6 diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/README.md b/charts/gitlab/gitlab/charts/nginx-ingress/README.md deleted file mode 100644 index 2828f3027..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/README.md +++ /dev/null @@ -1,227 +0,0 @@ -# ingress-nginx - -[ingress-nginx](https://github.com/kubernetes/ingress-nginx) Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer - -To use, add the `kubernetes.io/ingress.class: nginx` annotation to your Ingress resources. - -This chart bootstraps an ingress-nginx deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -## Prerequisites - -- Kubernetes v1.19+ - -## Get Repo Info - -```console -helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx -helm repo update -``` - -## Install Chart - -**Important:** only helm3 is supported - -```console -helm install [RELEASE_NAME] ingress-nginx/ingress-nginx -``` - -The command deploys ingress-nginx on the Kubernetes cluster in the default configuration. - -_See [configuration](#configuration) below._ - -_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._ - -## Uninstall Chart - -```console -helm uninstall [RELEASE_NAME] -``` - -This removes all the Kubernetes components associated with the chart and deletes the release. - -_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._ - -## Upgrading Chart - -```console -helm upgrade [RELEASE_NAME] [CHART] --install -``` - -_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._ - -### Upgrading With Zero Downtime in Production - -By default the ingress-nginx controller has service interruptions whenever it's pods are restarted or redeployed. In order to fix that, see the excellent blog post by Lindsay Landry from Codecademy: [Kubernetes: Nginx and Zero Downtime in Production](https://medium.com/codecademy-engineering/kubernetes-nginx-and-zero-downtime-in-production-2c910c6a5ed8). - -### Migrating from stable/nginx-ingress - -There are two main ways to migrate a release from `stable/nginx-ingress` to `ingress-nginx/ingress-nginx` chart: - -1. For Nginx Ingress controllers used for non-critical services, the easiest method is to [uninstall](#uninstall-chart) the old release and [install](#install-chart) the new one -1. For critical services in production that require zero-downtime, you will want to: - 1. [Install](#install-chart) a second Ingress controller - 1. Redirect your DNS traffic from the old controller to the new controller - 1. Log traffic from both controllers during this changeover - 1. [Uninstall](#uninstall-chart) the old controller once traffic has fully drained from it - 1. For details on all of these steps see [Upgrading With Zero Downtime in Production](#upgrading-with-zero-downtime-in-production) - -Note that there are some different and upgraded configurations between the two charts, described by Rimas Mocevicius from JFrog in the "Upgrading to ingress-nginx Helm chart" section of [Migrating from Helm chart nginx-ingress to ingress-nginx](https://rimusz.net/migrating-to-ingress-nginx). As the `ingress-nginx/ingress-nginx` chart continues to update, you will want to check current differences by running [helm configuration](#configuration) commands on both charts. - -## Configuration - -See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands: - -```console -helm show values ingress-nginx/ingress-nginx -``` - -### PodDisruptionBudget - -Note that the PodDisruptionBudget resource will only be defined if the replicaCount is greater than one, -else it would make it impossible to evacuate a node. See [gh issue #7127](https://github.com/helm/charts/issues/7127) for more info. - -### Prometheus Metrics - -The Nginx ingress controller can export Prometheus metrics, by setting `controller.metrics.enabled` to `true`. - -You can add Prometheus annotations to the metrics service using `controller.metrics.service.annotations`. -Alternatively, if you use the Prometheus Operator, you can enable ServiceMonitor creation using `controller.metrics.serviceMonitor.enabled`. And set `controller.metrics.serviceMonitor.additionalLabels.release="prometheus"`. "release=prometheus" should match the label configured in the prometheus servicemonitor ( see `kubectl get servicemonitor prometheus-kube-prom-prometheus -oyaml -n prometheus`) - -### ingress-nginx nginx\_status page/stats server - -Previous versions of this chart had a `controller.stats.*` configuration block, which is now obsolete due to the following changes in nginx ingress controller: - -- In [0.16.1](https://github.com/kubernetes/ingress-nginx/blob/main/Changelog.md#0161), the vts (virtual host traffic status) dashboard was removed -- In [0.23.0](https://github.com/kubernetes/ingress-nginx/blob/main/Changelog.md#0230), the status page at port 18080 is now a unix socket webserver only available at localhost. - You can use `curl --unix-socket /tmp/nginx-status-server.sock http://localhost/nginx_status` inside the controller container to access it locally, or use the snippet from [nginx-ingress changelog](https://github.com/kubernetes/ingress-nginx/blob/main/Changelog.md#0230) to re-enable the http server - -### ExternalDNS Service Configuration - -Add an [ExternalDNS](https://github.com/kubernetes-incubator/external-dns) annotation to the LoadBalancer service: - -```yaml -controller: - service: - annotations: - external-dns.alpha.kubernetes.io/hostname: kubernetes-example.com. -``` - -### AWS L7 ELB with SSL Termination - -Annotate the controller as shown in the [nginx-ingress l7 patch](https://github.com/kubernetes/ingress-nginx/blob/main/deploy/aws/l7/service-l7.yaml): - -```yaml -controller: - service: - targetPorts: - http: http - https: http - annotations: - service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:XX-XXXX-X:XXXXXXXXX:certificate/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX - service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http" - service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https" - service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: '3600' -``` - -### AWS route53-mapper - -To configure the LoadBalancer service with the [route53-mapper addon](https://github.com/kubernetes/kops/tree/master/addons/route53-mapper), add the `domainName` annotation and `dns` label: - -```yaml -controller: - service: - labels: - dns: "route53" - annotations: - domainName: "kubernetes-example.com" -``` - -### Additional Internal Load Balancer - -This setup is useful when you need both external and internal load balancers but don't want to have multiple ingress controllers and multiple ingress objects per application. - -By default, the ingress object will point to the external load balancer address, but if correctly configured, you can make use of the internal one if the URL you are looking up resolves to the internal load balancer's URL. - -You'll need to set both the following values: - -`controller.service.internal.enabled` -`controller.service.internal.annotations` - -If one of them is missing the internal load balancer will not be deployed. Example you may have `controller.service.internal.enabled=true` but no annotations set, in this case no action will be taken. - -`controller.service.internal.annotations` varies with the cloud service you're using. - -Example for AWS: - -```yaml -controller: - service: - internal: - enabled: true - annotations: - # Create internal ELB - service.beta.kubernetes.io/aws-load-balancer-internal: "true" - # Any other annotation can be declared here. -``` - -Example for GCE: - -```yaml -controller: - service: - internal: - enabled: true - annotations: - # Create internal LB. More informations: https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing - # For GKE versions 1.17 and later - networking.gke.io/load-balancer-type: "Internal" - # For earlier versions - # cloud.google.com/load-balancer-type: "Internal" - - # Any other annotation can be declared here. -``` - -Example for Azure: - -```yaml -controller: - service: - annotations: - # Create internal LB - service.beta.kubernetes.io/azure-load-balancer-internal: "true" - # Any other annotation can be declared here. -``` - -Example for Oracle Cloud Infrastructure: - -```yaml -controller: - service: - annotations: - # Create internal LB - service.beta.kubernetes.io/oci-load-balancer-internal: "true" - # Any other annotation can be declared here. -``` - -An use case for this scenario is having a split-view DNS setup where the public zone CNAME records point to the external balancer URL while the private zone CNAME records point to the internal balancer URL. This way, you only need one ingress kubernetes object. - -Optionally you can set `controller.service.loadBalancerIP` if you need a static IP for the resulting `LoadBalancer`. - -### Ingress Admission Webhooks - -With nginx-ingress-controller version 0.25+, the nginx ingress controller pod exposes an endpoint that will integrate with the `validatingwebhookconfiguration` Kubernetes feature to prevent bad ingress from being added to the cluster. -**This feature is enabled by default since 0.31.0.** - -With nginx-ingress-controller in 0.25.* work only with kubernetes 1.14+, 0.26 fix [this issue](https://github.com/kubernetes/ingress-nginx/pull/4521) - -### Helm Error When Upgrading: spec.clusterIP: Invalid value: "" - -If you are upgrading this chart from a version between 0.31.0 and 1.2.2 then you may get an error like this: - -```console -Error: UPGRADE FAILED: Service "?????-controller" is invalid: spec.clusterIP: Invalid value: "": field is immutable -``` - -Detail of how and why are in [this issue](https://github.com/helm/charts/pull/13646) but to resolve this you can set `xxxx.service.omitClusterIP` to `true` where `xxxx` is the service referenced in the error. - -As of version `1.26.0` of this chart, by simply not providing any clusterIP value, `invalid: spec.clusterIP: Invalid value: "": field is immutable` will no longer occur since `clusterIP: ""` will not be rendered. diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/NOTES.txt b/charts/gitlab/gitlab/charts/nginx-ingress/templates/NOTES.txt deleted file mode 100644 index 29aeb113a..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/NOTES.txt +++ /dev/null @@ -1,74 +0,0 @@ -The ingress-nginx controller has been installed. - -{{- if contains "NodePort" .Values.controller.service.type }} -Get the application URL by running these commands: - -{{- if (not (empty .Values.controller.service.nodePorts.http)) }} - export HTTP_NODE_PORT={{ .Values.controller.service.nodePorts.http }} -{{- else }} - export HTTP_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[0].nodePort}" {{ include "ingress-nginx.controller.fullname" . }}) -{{- end }} -{{- if (not (empty .Values.controller.service.nodePorts.https)) }} - export HTTPS_NODE_PORT={{ .Values.controller.service.nodePorts.https }} -{{- else }} - export HTTPS_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[1].nodePort}" {{ include "ingress-nginx.controller.fullname" . }}) -{{- end }} - export NODE_IP=$(kubectl --namespace {{ .Release.Namespace }} get nodes -o jsonpath="{.items[0].status.addresses[1].address}") - - echo "Visit http://$NODE_IP:$HTTP_NODE_PORT to access your application via HTTP." - echo "Visit https://$NODE_IP:$HTTPS_NODE_PORT to access your application via HTTPS." -{{- else if contains "LoadBalancer" .Values.controller.service.type }} -It may take a few minutes for the LoadBalancer IP to be available. -You can watch the status by running 'kubectl --namespace {{ .Release.Namespace }} get services -o wide -w {{ include "ingress-nginx.controller.fullname" . }}' -{{- else if contains "ClusterIP" .Values.controller.service.type }} -Get the application URL by running these commands: - export POD_NAME=$(kubectl --namespace {{ .Release.Namespace }} get pods -o jsonpath="{.items[0].metadata.name}" -l "app={{ template "ingress-nginx.name" . }},component={{ .Values.controller.name }},release={{ .Release.Name }}") - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 - echo "Visit http://127.0.0.1:8080 to access your application." -{{- end }} - -An example Ingress that makes use of the controller: - - apiVersion: networking.k8s.io/v1 - kind: Ingress - metadata: - annotations: - kubernetes.io/ingress.class: {{ .Values.controller.ingressClassResource.name }} - name: example - namespace: foo - spec: - ingressClassName: example-class - rules: - - host: www.example.com - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: exampleService - port: 80 - # This section is only required if TLS is to be enabled for the Ingress - tls: - - hosts: - - www.example.com - secretName: example-tls - -If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided: - - apiVersion: v1 - kind: Secret - metadata: - name: example-tls - namespace: foo - data: - tls.crt: - tls.key: - type: kubernetes.io/tls - -{{- if .Values.controller.headers }} -################################################################################# -###### WARNING: `controller.headers` has been deprecated! ##### -###### It has been renamed to `controller.proxySetHeaders`. ##### -################################################################################# -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/nginx-ingress/templates/_helpers.tpl deleted file mode 100644 index 6551b23d6..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/_helpers.tpl +++ /dev/null @@ -1,138 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* GitLab additions included at end of file */}} - -{{/* -Expand the name of the chart. -*/}} -{{- define "ingress-nginx.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "ingress-nginx.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). -*/}} -{{- define "ingress-nginx.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified controller name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "ingress-nginx.controller.fullname" -}} -{{- printf "%s-%s" (include "ingress-nginx.fullname" .) .Values.controller.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Construct the path for the publish-service. - -By convention this will simply use the / to match the name of the -service generated. - -Users can provide an override for an explicit service they want bound via `.Values.controller.publishService.pathOverride` - -*/}} -{{- define "ingress-nginx.controller.publishServicePath" -}} -{{- $defServiceName := printf "%s/%s" "$(POD_NAMESPACE)" (include "ingress-nginx.controller.fullname" .) -}} -{{- $servicePath := default $defServiceName .Values.controller.publishService.pathOverride }} -{{- print $servicePath | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified default backend name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "ingress-nginx.defaultBackend.fullname" -}} -{{- printf "%s-%s" (include "ingress-nginx.fullname" .) .Values.defaultBackend.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "ingress-nginx.labels" -}} -helm.sh/chart: {{ include "ingress-nginx.chart" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -Previous values from the upstream chart: - app.kubernetes.io/name: {{ include "ingress-nginx.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - -Per-component label: - component: "{{ .Values.{controller,defaultBackend}.name }}" -*/}} -{{- define "ingress-nginx.selectorLabels" -}} -app: {{ include "ingress-nginx.name" . }} -release: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the controller service account to use -*/}} -{{- define "ingress-nginx.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "ingress-nginx.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the backend service account to use - only used when podsecuritypolicy is also enabled -*/}} -{{- define "ingress-nginx.defaultBackend.serviceAccountName" -}} -{{- if .Values.defaultBackend.serviceAccount.create -}} - {{ default (printf "%s-backend" (include "ingress-nginx.fullname" .)) .Values.defaultBackend.serviceAccount.name }} -{{- else -}} - {{ default "default-backend" .Values.defaultBackend.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiGroup for PodSecurityPolicy. -*/}} -{{- define "podSecurityPolicy.apiGroup" -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "policy" -}} -{{- else -}} -{{- print "extensions" -}} -{{- end -}} -{{- end -}} - -{{/* -IngressClass parameters. -*/}} -{{- define "ingressClass.parameters" -}} - {{- if .Values.controller.ingressClassResource.parameters -}} - parameters: -{{ toYaml .Values.controller.ingressClassResource.parameters | indent 4}} - {{ end }} -{{- end -}} - -{{/* GitLab-provided partials starting below */}} - -{{- define "ingress-nginx.tcp-configmap" -}} -{{ default (printf "%s-%s" (include "ingress-nginx.fullname" .) "tcp") .Values.tcpExternalConfig }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/clusterrole.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/clusterrole.yaml deleted file mode 100644 index fd762f935..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/clusterrole.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "ingress-nginx.fullname" . }}-admission - annotations: - "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: admission-webhook -rules: - - apiGroups: - - admissionregistration.k8s.io - resources: - - validatingwebhookconfigurations - verbs: - - get - - update -{{- if .Values.podSecurityPolicy.enabled }} - - apiGroups: ['extensions'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: - {{- with .Values.controller.admissionWebhooks.existingPsp }} - - {{ . }} - {{- else }} - - {{ include "ingress-nginx.fullname" . }}-admission - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/clusterrolebinding.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/clusterrolebinding.yaml deleted file mode 100644 index 4990fb1c3..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/clusterrolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "ingress-nginx.fullname" . }}-admission - annotations: - "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: admission-webhook -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ include "ingress-nginx.fullname" . }}-admission -subjects: - - kind: ServiceAccount - name: {{ include "ingress-nginx.fullname" . }}-admission - namespace: {{ .Release.Namespace | quote }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/job-createSecret.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/job-createSecret.yaml deleted file mode 100644 index f3050d325..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/job-createSecret.yaml +++ /dev/null @@ -1,69 +0,0 @@ -{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled -}} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "ingress-nginx.fullname" . }}-admission-create - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: admission-webhook -spec: -{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }} - # Alpha feature since k8s 1.12 - ttlSecondsAfterFinished: 0 -{{- end }} - template: - metadata: - name: {{ include "ingress-nginx.fullname" . }}-admission-create - {{- if .Values.controller.admissionWebhooks.patch.podAnnotations }} - annotations: {{ toYaml .Values.controller.admissionWebhooks.patch.podAnnotations | nindent 8 }} - {{- end }} - labels: - {{- include "ingress-nginx.labels" . | nindent 8 }} - app.kubernetes.io/component: admission-webhook - spec: - {{- if or $.Values.global.priorityClassName .Values.controller.admissionWebhooks.patch.priorityClassName }} - priorityClassName: {{ default $.Values.global.priorityClassName .Values.controller.admissionWebhooks.patch.priorityClassName }} - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }} - {{- end }} - containers: - - name: create - {{- with .Values.controller.admissionWebhooks.patch.image }} - image: "{{- if .repository -}}{{ .repository }}{{ else }}{{ .registry }}/{{ .image }}{{- end -}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.controller.admissionWebhooks.patch.image.pullPolicy }} - args: - - create - - --host={{ include "ingress-nginx.controller.fullname" . }}-admission,{{ include "ingress-nginx.controller.fullname" . }}-admission.$(POD_NAMESPACE).svc - - --namespace=$(POD_NAMESPACE) - - --secret-name={{ include "ingress-nginx.fullname" . }}-admission - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - {{- if .Values.controller.admissionWebhooks.createSecretJob.resources }} - resources: {{ toYaml .Values.controller.admissionWebhooks.createSecretJob.resources | nindent 12 }} - {{- end }} - restartPolicy: OnFailure - serviceAccountName: {{ include "ingress-nginx.fullname" . }}-admission - {{- if .Values.controller.admissionWebhooks.patch.nodeSelector }} - nodeSelector: {{ toYaml .Values.controller.admissionWebhooks.patch.nodeSelector | nindent 8 }} - {{- else if include "gitlab.nodeSelector" . }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- end }} - {{- if .Values.controller.admissionWebhooks.patch.tolerations }} - tolerations: {{ toYaml .Values.controller.admissionWebhooks.patch.tolerations | nindent 8 }} - {{- end }} - securityContext: - runAsNonRoot: true - runAsUser: {{ .Values.controller.admissionWebhooks.patch.runAsUser }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/job-patchWebhook.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/job-patchWebhook.yaml deleted file mode 100644 index 1716b42bf..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/job-patchWebhook.yaml +++ /dev/null @@ -1,71 +0,0 @@ -{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled -}} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "ingress-nginx.fullname" . }}-admission-patch - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: admission-webhook -spec: -{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }} - # Alpha feature since k8s 1.12 - ttlSecondsAfterFinished: 0 -{{- end }} - template: - metadata: - name: {{ include "ingress-nginx.fullname" . }}-admission-patch - {{- if .Values.controller.admissionWebhooks.patch.podAnnotations }} - annotations: {{ toYaml .Values.controller.admissionWebhooks.patch.podAnnotations | nindent 8 }} - {{- end }} - labels: - {{- include "ingress-nginx.labels" . | nindent 8 }} - app.kubernetes.io/component: admission-webhook - spec: - {{- if or .Values.global.priorityClassName .Values.controller.admissionWebhooks.patch.priorityClassName }} - priorityClassName: {{ default .Values.global.priorityClassName .Values.controller.admissionWebhooks.patch.priorityClassName }} - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }} - {{- end }} - containers: - - name: patch - {{- with .Values.controller.admissionWebhooks.patch.image }} - image: "{{- if .repository -}}{{ .repository }}{{ else }}{{ .registry }}/{{ .image }}{{- end -}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.controller.admissionWebhooks.patch.image.pullPolicy }} - args: - - patch - - --webhook-name={{ include "ingress-nginx.fullname" . }}-admission - - --namespace=$(POD_NAMESPACE) - - --patch-mutating=false - - --secret-name={{ include "ingress-nginx.fullname" . }}-admission - - --patch-failure-policy={{ .Values.controller.admissionWebhooks.failurePolicy }} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - {{- if .Values.controller.admissionWebhooks.patchWebhookJob.resources }} - resources: {{ toYaml .Values.controller.admissionWebhooks.patchWebhookJob.resources | nindent 12 }} - {{- end }} - restartPolicy: OnFailure - serviceAccountName: {{ include "ingress-nginx.fullname" . }}-admission - {{- if .Values.controller.admissionWebhooks.patch.nodeSelector }} - nodeSelector: {{ toYaml .Values.controller.admissionWebhooks.patch.nodeSelector | nindent 8 }} - {{- else if include "gitlab.nodeSelector" . }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- end }} - {{- if .Values.controller.admissionWebhooks.patch.tolerations }} - tolerations: {{ toYaml .Values.controller.admissionWebhooks.patch.tolerations | nindent 8 }} - {{- end }} - securityContext: - runAsNonRoot: true - runAsUser: {{ .Values.controller.admissionWebhooks.patch.runAsUser }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/psp.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/psp.yaml deleted file mode 100644 index d2c7de685..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/psp.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled .Values.podSecurityPolicy.enabled (empty .Values.controller.admissionWebhooks.existingPsp) -}} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ include "ingress-nginx.fullname" . }}-admission - annotations: - "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: admission-webhook -spec: - allowPrivilegeEscalation: false - fsGroup: - ranges: - - max: 65535 - min: 1 - rule: MustRunAs - requiredDropCapabilities: - - ALL - runAsUser: - rule: MustRunAsNonRoot - seLinux: - rule: RunAsAny - supplementalGroups: - ranges: - - max: 65535 - min: 1 - rule: MustRunAs - volumes: - - configMap - - emptyDir - - projected - - secret - - downwardAPI -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/role.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/role.yaml deleted file mode 100644 index 9b083ee6e..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/role.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "ingress-nginx.fullname" . }}-admission - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: admission-webhook -rules: - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - - create -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/rolebinding.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/rolebinding.yaml deleted file mode 100644 index edda07f5d..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/rolebinding.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "ingress-nginx.fullname" . }}-admission - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: admission-webhook -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ include "ingress-nginx.fullname" . }}-admission -subjects: - - kind: ServiceAccount - name: {{ include "ingress-nginx.fullname" . }}-admission - namespace: {{ .Release.Namespace | quote }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/serviceaccount.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/serviceaccount.yaml deleted file mode 100644 index 1ff0f7f0e..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/job-patch/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "ingress-nginx.fullname" . }}-admission - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: admission-webhook -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/validating-webhook.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/validating-webhook.yaml deleted file mode 100644 index 712f74fdd..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/admission-webhooks/validating-webhook.yaml +++ /dev/null @@ -1,45 +0,0 @@ -{{- if .Values.controller.admissionWebhooks.enabled -}} -# before changing this value, check the required kubernetes version -# https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#prerequisites -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - {{- if .Values.controller.admissionWebhooks.annotations }} - annotations: {{ toYaml .Values.controller.admissionWebhooks.annotations | nindent 4 }} - {{- end }} - labels: - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: admission-webhook - name: {{ include "ingress-nginx.fullname" . }}-admission -webhooks: - - name: validate.nginx.ingress.kubernetes.io - matchPolicy: Equivalent - rules: - - apiGroups: - - networking.k8s.io - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - ingresses - failurePolicy: {{ .Values.controller.admissionWebhooks.failurePolicy | default "Fail" }} - sideEffects: None - admissionReviewVersions: - - v1 - clientConfig: - service: - namespace: {{ .Release.Namespace | quote }} - name: {{ include "ingress-nginx.controller.fullname" . }}-admission - path: /networking/v1/ingresses - {{- if .Values.controller.admissionWebhooks.timeoutSeconds }} - timeoutSeconds: {{ .Values.controller.admissionWebhooks.timeoutSeconds }} - {{- end }} - {{- if .Values.controller.admissionWebhooks.namespaceSelector }} - namespaceSelector: {{ toYaml .Values.controller.admissionWebhooks.namespaceSelector | nindent 6 }} - {{- end }} - {{- if .Values.controller.admissionWebhooks.objectSelector }} - objectSelector: {{ toYaml .Values.controller.admissionWebhooks.objectSelector | nindent 6 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/clusterrole.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/clusterrole.yaml deleted file mode 100644 index f290ad538..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/clusterrole.yaml +++ /dev/null @@ -1,76 +0,0 @@ -{{- if and .Values.rbac.create (not .Values.rbac.scope) -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - name: {{ include "ingress-nginx.fullname" . }} -rules: - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - nodes - - pods - - secrets - verbs: - - list - - watch -{{- if and .Values.controller.scope.enabled .Values.controller.scope.namespace }} - - apiGroups: - - "" - resources: - - namespaces - resourceNames: - - "{{ .Values.controller.scope.namespace }}" - verbs: - - get -{{- end }} - - apiGroups: - - "" - resources: - - nodes - verbs: - - get - - apiGroups: - - "" - resources: - - services - verbs: - - get - - list - - watch - - apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - networking.k8s.io - resources: - - ingresses/status - verbs: - - update - - apiGroups: - - networking.k8s.io - resources: - - ingressclasses - verbs: - - get - - list - - watch -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/clusterrolebinding.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/clusterrolebinding.yaml deleted file mode 100644 index 79253e259..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.rbac.create (not .Values.rbac.scope) -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - name: {{ include "ingress-nginx.fullname" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ include "ingress-nginx.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "ingress-nginx.serviceAccountName" . }} - namespace: {{ .Release.Namespace | quote }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-addheaders.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-addheaders.yaml deleted file mode 100644 index c05db451b..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-addheaders.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{/* GitLab labels included below */}} -{{- if .Values.controller.addHeaders -}} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - name: {{ include "ingress-nginx.fullname" . }}-custom-add-headers - namespace: {{ .Release.Namespace }} -data: {{ toYaml .Values.controller.addHeaders | nindent 2 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-proxyheaders.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-proxyheaders.yaml deleted file mode 100644 index dbc32a90b..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-proxyheaders.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{/* GitLab labels included below */}} -{{- if or .Values.controller.proxySetHeaders .Values.controller.headers -}} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - name: {{ include "ingress-nginx.fullname" . }}-custom-proxy-headers - namespace: {{ .Release.Namespace }} -data: -{{- if .Values.controller.proxySetHeaders }} -{{ toYaml .Values.controller.proxySetHeaders | indent 2 }} -{{ else if and .Values.controller.headers (not .Values.controller.proxySetHeaders) }} -{{ toYaml .Values.controller.headers | indent 2 }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-tcp.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-tcp.yaml deleted file mode 100644 index cd299fa42..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-tcp.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{/* GitLab labels included below */}} -{{- if and .Values.tcp (not .Values.tcpExternalConfig) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller -{{- if .Values.controller.tcp.annotations }} - annotations: {{ toYaml .Values.controller.tcp.annotations | nindent 4 }} -{{- end }} - name: {{ template "ingress-nginx.tcp-configmap" . }} - namespace: {{ .Release.Namespace }} -data: {{ tpl (toYaml .Values.tcp) . | nindent 2 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-udp.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-udp.yaml deleted file mode 100644 index 0ca58eab6..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap-udp.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{/* GitLab labels included below */}} -{{- if .Values.udp -}} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller -{{- if .Values.controller.udp.annotations }} - annotations: {{ toYaml .Values.controller.udp.annotations | nindent 4 }} -{{- end }} - name: {{ include "ingress-nginx.fullname" . }}-udp - namespace: {{ .Release.Namespace }} -data: {{ tpl (toYaml .Values.udp) . | nindent 2 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap.yaml deleted file mode 100644 index c362b4d9c..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-configmap.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{/* GitLab labels included below */}} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller -{{- if .Values.controller.configAnnotations }} - annotations: {{ toYaml .Values.controller.configAnnotations | nindent 4 }} -{{- end }} - name: {{ include "ingress-nginx.controller.fullname" . }} - namespace: {{ .Release.Namespace }} -data: - allow-snippet-annotations: "{{ .Values.controller.allowSnippetAnnotations }}" -{{- if .Values.controller.addHeaders }} - add-headers: {{ .Release.Namespace }}/{{ include "ingress-nginx.fullname" . }}-custom-add-headers -{{- end }} -{{- if or .Values.controller.proxySetHeaders .Values.controller.headers }} - proxy-set-headers: {{ .Release.Namespace }}/{{ include "ingress-nginx.fullname" . }}-custom-proxy-headers -{{- end }} -{{- if .Values.dhParam }} - ssl-dh-param: {{ printf "%s/%s" .Release.Namespace (include "ingress-nginx.controller.fullname" .) }} -{{- end }} -{{- range $key, $value := .Values.controller.config }} - {{ $key | nindent 2 }}: {{ $value | quote }} -{{- end }} - diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-daemonset.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-daemonset.yaml deleted file mode 100644 index 5288d45c3..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-daemonset.yaml +++ /dev/null @@ -1,267 +0,0 @@ -{{- if or (eq .Values.controller.kind "DaemonSet") (eq .Values.controller.kind "Both") -}} -apiVersion: apps/v1 -kind: DaemonSet -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - {{- with .Values.controller.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - name: {{ include "ingress-nginx.controller.fullname" . }} - namespace: {{ .Release.Namespace }} - {{- if .Values.controller.annotations }} - annotations: {{ toYaml .Values.controller.annotations | nindent 4 }} - {{- end }} -spec: - selector: - matchLabels: - {{- include "ingress-nginx.selectorLabels" . | nindent 6 }} - component: "{{ .Values.controller.name }}" - revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} - {{- if .Values.controller.updateStrategy }} - updateStrategy: {{ toYaml .Values.controller.updateStrategy | nindent 4 }} - {{- end }} - minReadySeconds: {{ .Values.controller.minReadySeconds }} - template: - metadata: - {{- if .Values.controller.podAnnotations }} - annotations: - {{- range $key, $value := .Values.controller.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - labels: - {{- include "ingress-nginx.selectorLabels" . | nindent 8 }} - component: "{{ .Values.controller.name }}" - {{- if .Values.controller.podLabels }} - {{- toYaml .Values.controller.podLabels | nindent 8 }} - {{- end }} - spec: - {{- if .Values.controller.dnsConfig }} - dnsConfig: {{ toYaml .Values.controller.dnsConfig | nindent 8 }} - {{- end }} - {{- if .Values.controller.hostname }} - hostname: {{ toYaml .Values.controller.hostname | nindent 8 }} - {{- end }} - dnsPolicy: {{ .Values.controller.dnsPolicy }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }} - {{- end }} - {{- if or .Values.global.priorityClassName .Values.controller.priorityClassName }} - priorityClassName: {{ default .Values.global.priorityClassName .Values.controller.priorityClassName }} - {{- end }} - {{- if or .Values.controller.podSecurityContext .Values.controller.sysctls }} - securityContext: - {{- end }} - {{- if .Values.controller.podSecurityContext }} - {{- toYaml .Values.controller.podSecurityContext | nindent 8 }} - {{- end }} - {{- if .Values.controller.sysctls }} - sysctls: - {{- range $sysctl, $value := .Values.controller.sysctls }} - - name: {{ $sysctl | quote }} - value: {{ $value | quote }} - {{- end }} - {{- end }} - containers: - - name: {{ .Values.controller.containerName }} - {{- with .Values.controller.image }} - image: "{{- if .repository -}}{{ .repository }}{{ else }}{{ .registry }}/{{ .image }}{{- end -}}:{{ .tag }}{{ include "gitlab.image.tagSuffix" $ }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.controller.image.pullPolicy }} - {{- if .Values.controller.lifecycle }} - lifecycle: {{ toYaml .Values.controller.lifecycle | nindent 12 }} - {{- end }} - args: - - /nginx-ingress-controller - {{- if .Values.defaultBackend.enabled }} - - --default-backend-service=$(POD_NAMESPACE)/{{ include "ingress-nginx.defaultBackend.fullname" . }} - {{- end }} - {{- if .Values.controller.publishService.enabled }} - - --publish-service={{ template "ingress-nginx.controller.publishServicePath" . }} - {{- end }} - - --election-id={{ .Values.controller.electionID }} - - --controller-class={{ .Values.controller.ingressClassResource.controllerValue }} - - --configmap={{ default "$(POD_NAMESPACE)" .Values.controller.configMapNamespace }}/{{ include "ingress-nginx.controller.fullname" . }} - {{- if (and .Values.controller.service.enableShell (include "gitlab.shell.port" $)) }} - - --tcp-services-configmap={{ .Release.Namespace }}/{{ template "ingress-nginx.tcp-configmap" . }} - {{- else if .Values.tcp }} - - --tcp-services-configmap={{ default "$(POD_NAMESPACE)" .Values.controller.tcp.configMapNamespace }}/{{ include "ingress-nginx.fullname" . }}-tcp - {{- end }} - {{- if .Values.udp }} - - --udp-services-configmap={{ default "$(POD_NAMESPACE)" .Values.controller.udp.configMapNamespace }}/{{ include "ingress-nginx.fullname" . }}-udp - {{- end }} - {{- if .Values.controller.scope.enabled }} - - --watch-namespace={{ default "$(POD_NAMESPACE)" .Values.controller.scope.namespace }} - {{- end }} - {{- if and .Values.controller.reportNodeInternalIp .Values.controller.hostNetwork }} - - --report-node-internal-ip-address={{ .Values.controller.reportNodeInternalIp }} - {{- end }} - {{- if .Values.controller.admissionWebhooks.enabled }} - - --validating-webhook=:{{ .Values.controller.admissionWebhooks.port }} - - --validating-webhook-certificate={{ .Values.controller.admissionWebhooks.certificate }} - - --validating-webhook-key={{ .Values.controller.admissionWebhooks.key }} - {{- end }} - {{- if .Values.controller.maxmindMirror }} - - --maxmind-mirror={{ .Values.controller.maxmindMirror }} - {{- end}} - {{- if .Values.controller.maxmindLicenseKey }} - - --maxmind-license-key={{ .Values.controller.maxmindLicenseKey }} - {{- end }} - {{- if not (eq .Values.controller.healthCheckPath "/healthz") }} - - --health-check-path={{ .Values.controller.healthCheckPath }} - {{- end }} - {{- if .Values.controller.healthCheckHost }} - - --healthz-host={{ .Values.controller.healthCheckHost }} - {{- end }} - {{- if .Values.controller.ingressClassByName }} - - --ingress-class-by-name=true - {{- end }} - {{- if .Values.controller.watchIngressWithoutClass }} - - --watch-ingress-without-class=true - {{- end }} - {{- range $key, $value := .Values.controller.extraArgs }} - {{- /* Accept keys without values or with false as value */}} - {{- if eq ($value | quote | len) 2 }} - - --{{ $key }} - {{- else }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- end }} - securityContext: - capabilities: - drop: - - ALL - add: - - NET_BIND_SERVICE - runAsUser: {{ .Values.controller.image.runAsUser }} - allowPrivilegeEscalation: {{ .Values.controller.image.allowPrivilegeEscalation }} - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - {{- if .Values.controller.enableMimalloc }} - - name: LD_PRELOAD - value: /usr/local/lib/libmimalloc.so - {{- end }} - {{- if .Values.controller.extraEnvs }} - {{- toYaml .Values.controller.extraEnvs | nindent 12 }} - {{- end }} - {{- if .Values.controller.startupProbe }} - startupProbe: {{ toYaml .Values.controller.startupProbe | nindent 12 }} - {{- end }} - livenessProbe: {{ toYaml .Values.controller.livenessProbe | nindent 12 }} - readinessProbe: {{ toYaml .Values.controller.readinessProbe | nindent 12 }} - ports: - {{- range $key, $value := .Values.controller.containerPort }} - - name: {{ $key }} - containerPort: {{ $value }} - protocol: TCP - {{- if $.Values.controller.hostPort.enabled }} - hostPort: {{ index $.Values.controller.hostPort.ports $key | default $value }} - {{- end }} - {{- end }} - {{- if .Values.controller.metrics.enabled }} - - name: metrics - containerPort: {{ .Values.controller.metrics.port }} - protocol: TCP - {{- end }} - {{- if .Values.controller.admissionWebhooks.enabled }} - - name: webhook - containerPort: {{ .Values.controller.admissionWebhooks.port }} - protocol: TCP - {{- end }} - {{- if (and .Values.controller.service.enableShell (include "gitlab.shell.port" $)) }} - - name: gitlab-shell - containerPort: {{ include "gitlab.shell.port" . | int }} - protocol: TCP - {{- end }} - {{- range $key, $value := .Values.tcp }} - - name: {{ $key }}-tcp - containerPort: {{ $key }} - protocol: TCP - {{- if $.Values.controller.hostPort.enabled }} - hostPort: {{ $key }} - {{- end }} - {{- end }} - {{- range $key, $value := .Values.udp }} - - name: {{ $key }}-udp - containerPort: {{ $key }} - protocol: UDP - {{- if $.Values.controller.hostPort.enabled }} - hostPort: {{ $key }} - {{- end }} - {{- end }} - {{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumeMounts .Values.controller.admissionWebhooks.enabled) }} - volumeMounts: - {{- if .Values.controller.customTemplate.configMapName }} - - mountPath: /etc/nginx/template - name: nginx-template-volume - readOnly: true - {{- end }} - {{- if .Values.controller.admissionWebhooks.enabled }} - - name: webhook-cert - mountPath: /usr/local/certificates/ - readOnly: true - {{- end }} - {{- if .Values.controller.extraVolumeMounts }} - {{- toYaml .Values.controller.extraVolumeMounts | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.controller.resources }} - resources: {{ toYaml .Values.controller.resources | nindent 12 }} - {{- end }} - {{- if .Values.controller.extraContainers }} - {{ toYaml .Values.controller.extraContainers | nindent 8 }} - {{- end }} - {{- if .Values.controller.extraInitContainers }} - initContainers: {{ toYaml .Values.controller.extraInitContainers | nindent 8 }} - {{- end }} - {{- if .Values.controller.hostNetwork }} - hostNetwork: {{ .Values.controller.hostNetwork }} - {{- end }} - {{- if .Values.controller.nodeSelector }} - nodeSelector: {{ toYaml .Values.controller.nodeSelector | nindent 8 }} - {{- else if include "gitlab.nodeSelector" . -}} - {{- include "gitlab.nodeSelector" . | nindent 8 }} - {{- end }} - {{- if .Values.controller.tolerations }} - tolerations: {{ toYaml .Values.controller.tolerations | nindent 8 }} - {{- end }} - {{- if .Values.controller.affinity }} - affinity: {{ toYaml .Values.controller.affinity | nindent 8 }} - {{- end }} - {{- if .Values.controller.topologySpreadConstraints }} - topologySpreadConstraints: {{ toYaml .Values.controller.topologySpreadConstraints | nindent 8 }} - {{- end }} - serviceAccountName: {{ template "ingress-nginx.serviceAccountName" . }} - terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }} - {{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumeMounts .Values.controller.admissionWebhooks.enabled .Values.controller.extraVolumes) }} - volumes: - {{- if .Values.controller.customTemplate.configMapName }} - - name: nginx-template-volume - configMap: - name: {{ .Values.controller.customTemplate.configMapName }} - items: - - key: {{ .Values.controller.customTemplate.configMapKey }} - path: nginx.tmpl - {{- end }} - {{- if .Values.controller.admissionWebhooks.enabled }} - - name: webhook-cert - secret: - secretName: {{ include "ingress-nginx.fullname" . }}-admission - {{- end }} - {{- if .Values.controller.extraVolumes }} - {{ toYaml .Values.controller.extraVolumes | nindent 8 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-deployment.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-deployment.yaml deleted file mode 100644 index 18af1cd44..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-deployment.yaml +++ /dev/null @@ -1,273 +0,0 @@ -{{- if or (eq .Values.controller.kind "Deployment") (eq .Values.controller.kind "Both") -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - {{- with .Values.controller.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - name: {{ include "ingress-nginx.controller.fullname" . }} - namespace: {{ .Release.Namespace }} - annotations: - {{- if include "gitlab.deploymentAnnotations" . }} - {{- include "gitlab.deploymentAnnotations" . | nindent 4 }} - {{- end }} - {{- if .Values.controller.annotations }} - {{ toYaml .Values.controller.annotations | nindent 4 }} - {{- end }} -spec: - selector: - matchLabels: - {{- include "ingress-nginx.selectorLabels" . | nindent 6 }} - component: "{{ .Values.controller.name }}" - {{- if not .Values.controller.autoscaling.enabled }} - replicas: {{ .Values.controller.replicaCount }} - {{- end }} - revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} - {{- if .Values.controller.updateStrategy }} - strategy: - {{ toYaml .Values.controller.updateStrategy | nindent 4 }} - {{- end }} - minReadySeconds: {{ .Values.controller.minReadySeconds }} - template: - metadata: - {{- if .Values.controller.podAnnotations }} - annotations: - {{- range $key, $value := .Values.controller.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - labels: - {{- include "ingress-nginx.selectorLabels" . | nindent 8 }} - component: "{{ .Values.controller.name }}" - {{- include "gitlab.podLabels" . | nindent 8 }} - {{- if .Values.controller.podLabels }} - {{- toYaml .Values.controller.podLabels | nindent 8 }} - {{- end }} - spec: - {{- if .Values.controller.dnsConfig }} - dnsConfig: {{ toYaml .Values.controller.dnsConfig | nindent 8 }} - {{- end }} - {{- if .Values.controller.hostname }} - hostname: {{ toYaml .Values.controller.hostname | nindent 8 }} - {{- end }} - dnsPolicy: {{ .Values.controller.dnsPolicy }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }} - {{- end }} - {{- if or $.Values.global.priorityClassName .Values.controller.priorityClassName }} - priorityClassName: {{ default $.Values.global.priorityClassName .Values.controller.priorityClassName }} - {{- end }} - {{- if or .Values.controller.podSecurityContext .Values.controller.sysctls }} - securityContext: - {{- end }} - {{- if .Values.controller.podSecurityContext }} - {{- toYaml .Values.controller.podSecurityContext | nindent 8 }} - {{- end }} - {{- if .Values.controller.sysctls }} - sysctls: - {{- range $sysctl, $value := .Values.controller.sysctls }} - - name: {{ $sysctl | quote }} - value: {{ $value | quote }} - {{- end }} - {{- end }} - containers: - - name: {{ .Values.controller.containerName }} - {{- with .Values.controller.image }} - image: "{{- if .repository -}}{{ .repository }}{{ else }}{{ .registry }}/{{ .image }}{{- end -}}:{{ .tag }}{{ include "gitlab.image.tagSuffix" $ }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.controller.image.pullPolicy }} - {{- if .Values.controller.lifecycle }} - lifecycle: {{ toYaml .Values.controller.lifecycle | nindent 12 }} - {{- end }} - args: - - /nginx-ingress-controller - {{- if .Values.defaultBackend.enabled }} - - --default-backend-service=$(POD_NAMESPACE)/{{ include "ingress-nginx.defaultBackend.fullname" . }} - {{- end }} - {{- if .Values.controller.publishService.enabled }} - - --publish-service={{ template "ingress-nginx.controller.publishServicePath" . }} - {{- end }} - - --election-id={{ .Values.controller.electionID }} - - --controller-class={{ .Values.controller.ingressClassResource.controllerValue }} - - --configmap={{ default "$(POD_NAMESPACE)" .Values.controller.configMapNamespace }}/{{ include "ingress-nginx.controller.fullname" . }} - {{- if (and .Values.controller.service.enableShell (include "gitlab.shell.port" $)) }} - - --tcp-services-configmap={{ .Release.Namespace }}/{{ template "ingress-nginx.tcp-configmap" . }} - {{- else if .Values.tcp }} - - --tcp-services-configmap={{ default "$(POD_NAMESPACE)" .Values.controller.tcp.configMapNamespace }}/{{ include "ingress-nginx.fullname" . }}-tcp - {{- end }} - {{- if .Values.udp }} - - --udp-services-configmap={{ default "$(POD_NAMESPACE)" .Values.controller.udp.configMapNamespace }}/{{ include "ingress-nginx.fullname" . }}-udp - {{- end }} - {{- if .Values.controller.scope.enabled }} - - --watch-namespace={{ default "$(POD_NAMESPACE)" .Values.controller.scope.namespace }} - {{- end }} - {{- if and .Values.controller.reportNodeInternalIp .Values.controller.hostNetwork }} - - --report-node-internal-ip-address={{ .Values.controller.reportNodeInternalIp }} - {{- end }} - {{- if .Values.controller.admissionWebhooks.enabled }} - - --validating-webhook=:{{ .Values.controller.admissionWebhooks.port }} - - --validating-webhook-certificate={{ .Values.controller.admissionWebhooks.certificate }} - - --validating-webhook-key={{ .Values.controller.admissionWebhooks.key }} - {{- end }} - {{- if .Values.controller.maxmindLicenseKey }} - - --maxmind-license-key={{ .Values.controller.maxmindLicenseKey }} - {{- end }} - {{- if .Values.controller.healthCheckHost }} - - --healthz-host={{ .Values.controller.healthCheckHost }} - {{- end }} - {{- if not (eq .Values.controller.healthCheckPath "/healthz") }} - - --health-check-path={{ .Values.controller.healthCheckPath }} - {{- end }} - {{- if .Values.controller.ingressClassByName }} - - --ingress-class-by-name=true - {{- end }} - {{- if .Values.controller.watchIngressWithoutClass }} - - --watch-ingress-without-class=true - {{- end }} - {{- range $key, $value := .Values.controller.extraArgs }} - {{- /* Accept keys without values or with false as value */}} - {{- if eq ($value | quote | len) 2 }} - - --{{ $key }} - {{- else }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- end }} - securityContext: - capabilities: - drop: - - ALL - add: - - NET_BIND_SERVICE - runAsUser: {{ .Values.controller.image.runAsUser }} - allowPrivilegeEscalation: {{ .Values.controller.image.allowPrivilegeEscalation }} - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - {{- if .Values.controller.enableMimalloc }} - - name: LD_PRELOAD - value: /usr/local/lib/libmimalloc.so - {{- end }} - {{- if .Values.controller.extraEnvs }} - {{- toYaml .Values.controller.extraEnvs | nindent 12 }} - {{- end }} - {{- if .Values.controller.startupProbe }} - startupProbe: {{ toYaml .Values.controller.startupProbe | nindent 12 }} - {{- end }} - livenessProbe: {{ toYaml .Values.controller.livenessProbe | nindent 12 }} - readinessProbe: {{ toYaml .Values.controller.readinessProbe | nindent 12 }} - ports: - {{- range $key, $value := .Values.controller.containerPort }} - - name: {{ $key }} - containerPort: {{ $value }} - protocol: TCP - {{- if $.Values.controller.hostPort.enabled }} - hostPort: {{ index $.Values.controller.hostPort.ports $key | default $value }} - {{- end }} - {{- end }} - {{- if .Values.controller.metrics.enabled }} - - name: metrics - containerPort: {{ .Values.controller.metrics.port }} - protocol: TCP - {{- end }} - {{- if .Values.controller.admissionWebhooks.enabled }} - - name: webhook - containerPort: {{ .Values.controller.admissionWebhooks.port }} - protocol: TCP - {{- end }} - {{- if (and .Values.controller.service.enableShell (include "gitlab.shell.port" $)) }} - - name: gitlab-shell - containerPort: {{ include "gitlab.shell.port" $ | int }} - protocol: TCP - {{- end }} - {{- range $key, $value := .Values.tcp }} - - name: {{ $key }}-tcp - containerPort: {{ $key }} - protocol: TCP - {{- if $.Values.controller.hostPort.enabled }} - hostPort: {{ $key }} - {{- end }} - {{- end }} - {{- range $key, $value := .Values.udp }} - - name: {{ $key }}-udp - containerPort: {{ $key }} - protocol: UDP - {{- if $.Values.controller.hostPort.enabled }} - hostPort: {{ $key }} - {{- end }} - {{- end }} - {{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumeMounts .Values.controller.admissionWebhooks.enabled) }} - volumeMounts: - {{- if .Values.controller.customTemplate.configMapName }} - - mountPath: /etc/nginx/template - name: nginx-template-volume - readOnly: true - {{- end }} - {{- if .Values.controller.admissionWebhooks.enabled }} - - name: webhook-cert - mountPath: /usr/local/certificates/ - readOnly: true - {{- end }} - {{- if .Values.controller.extraVolumeMounts }} - {{- toYaml .Values.controller.extraVolumeMounts | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.controller.resources }} - resources: {{ toYaml .Values.controller.resources | nindent 12 }} - {{- end }} - {{- if .Values.controller.extraContainers }} - {{ toYaml .Values.controller.extraContainers | nindent 8 }} - {{- end }} - {{- if .Values.controller.extraInitContainers }} - initContainers: {{ toYaml .Values.controller.extraInitContainers | nindent 8 }} - {{- end }} - {{- if .Values.controller.hostNetwork }} - hostNetwork: {{ .Values.controller.hostNetwork }} - {{- end }} - {{- if .Values.controller.nodeSelector }} - nodeSelector: {{ toYaml .Values.controller.nodeSelector | nindent 8 }} - {{- else if include "gitlab.nodeSelector" . }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- end }} - {{- if .Values.controller.tolerations }} - tolerations: {{ toYaml .Values.controller.tolerations | nindent 8 }} - {{- end }} - {{- if .Values.controller.affinity }} - affinity: {{ toYaml .Values.controller.affinity | nindent 8 }} - {{- end }} - {{- if .Values.controller.topologySpreadConstraints }} - topologySpreadConstraints: {{ toYaml .Values.controller.topologySpreadConstraints | nindent 8 }} - {{- end }} - serviceAccountName: {{ template "ingress-nginx.serviceAccountName" . }} - terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }} - {{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumeMounts .Values.controller.admissionWebhooks.enabled .Values.controller.extraVolumes) }} - volumes: - {{- if .Values.controller.customTemplate.configMapName }} - - name: nginx-template-volume - configMap: - name: {{ .Values.controller.customTemplate.configMapName }} - items: - - key: {{ .Values.controller.customTemplate.configMapKey }} - path: nginx.tmpl - {{- end }} - {{- if .Values.controller.admissionWebhooks.enabled }} - - name: webhook-cert - secret: - secretName: {{ include "ingress-nginx.fullname" . }}-admission - {{- end }} - {{- if .Values.controller.extraVolumes }} - {{ toYaml .Values.controller.extraVolumes | nindent 8 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-hpa.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-hpa.yaml deleted file mode 100644 index 0875565bf..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-hpa.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{{- if and .Values.controller.autoscaling.enabled (or (eq .Values.controller.kind "Deployment") (eq .Values.controller.kind "Both")) -}} -{{- if not .Values.controller.keda.enabled }} -{{- $hpaCfg := (dict "global" $.Values.global.hpa "local" .Values.controller.autoscaling "context" $) -}} ---- -apiVersion: {{ template "gitlab.hpa.apiVersion" $hpaCfg }} -kind: HorizontalPodAutoscaler -metadata: - annotations: - {{- with .Values.controller.autoscaling.annotations }} - {{- toYaml . | trimSuffix "\n" | nindent 4 }} - {{- end }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - name: {{ include "ingress-nginx.controller.fullname" . }} - namespace: {{ .Release.Namespace }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "ingress-nginx.controller.fullname" . }} - minReplicas: {{ .Values.controller.autoscaling.minReplicas }} - maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }} - metrics: - {{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if (include "gitlab.hpa.supportsV2MetricsSpec" $hpaCfg) }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if (include "gitlab.hpa.supportsV2MetricsSpec" $hpaCfg) }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.controller.autoscalingTemplate }} - {{- toYaml . | nindent 2 }} - {{- end }} - {{- include "gitlab.hpa.behavior" $hpaCfg | nindent 2 }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-ingressclass.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-ingressclass.yaml deleted file mode 100644 index fce3eedcc..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-ingressclass.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if .Values.controller.ingressClassResource.enabled -}} -# We don't support namespaced ingressClass yet -# So a ClusterRole and a ClusterRoleBinding is required -apiVersion: networking.k8s.io/v1 -kind: IngressClass -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - {{- with .Values.controller.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - name: {{ tpl .Values.controller.ingressClassResource.name . }} -{{- if .Values.controller.ingressClassResource.default }} - annotations: - ingressclass.kubernetes.io/is-default-class: "true" -{{- end }} -spec: - controller: {{ .Values.controller.ingressClassResource.controllerValue }} - {{ template "ingressClass.parameters" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-keda.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-keda.yaml deleted file mode 100644 index f1beb5c12..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-keda.yaml +++ /dev/null @@ -1,42 +0,0 @@ -{{- if and .Values.controller.keda.enabled (or (eq .Values.controller.kind "Deployment") (eq .Values.controller.kind "Both")) -}} -# https://keda.sh/docs/ - -apiVersion: {{ .Values.controller.keda.apiVersion }} -kind: ScaledObject -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - name: {{ include "ingress-nginx.controller.fullname" . }} - {{- if .Values.controller.keda.scaledObject.annotations }} - annotations: {{ toYaml .Values.controller.keda.scaledObject.annotations | nindent 4 }} - {{- end }} -spec: - scaleTargetRef: -{{- if eq .Values.controller.keda.apiVersion "keda.k8s.io/v1alpha1" }} - deploymentName: {{ include "ingress-nginx.controller.fullname" . }} -{{- else if eq .Values.controller.keda.apiVersion "keda.sh/v1alpha1" }} - name: {{ include "ingress-nginx.controller.fullname" . }} -{{- end }} - pollingInterval: {{ .Values.controller.keda.pollingInterval }} - cooldownPeriod: {{ .Values.controller.keda.cooldownPeriod }} - minReplicaCount: {{ .Values.controller.keda.minReplicas }} - maxReplicaCount: {{ .Values.controller.keda.maxReplicas }} - triggers: -{{- with .Values.controller.keda.triggers }} -{{ toYaml . | indent 2 }} -{{ end }} - advanced: - restoreToOriginalReplicaCount: {{ .Values.controller.keda.restoreToOriginalReplicaCount }} -{{- if .Values.controller.keda.behavior }} - horizontalPodAutoscalerConfig: - behavior: -{{ with .Values.controller.keda.behavior -}} -{{ toYaml . | indent 8 }} -{{ end }} - -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-poddisruptionbudget.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-poddisruptionbudget.yaml deleted file mode 100644 index fc4cdce4f..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-poddisruptionbudget.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if or (and .Values.controller.autoscaling.enabled (gt (.Values.controller.autoscaling.minReplicas | int) 1)) (and (not .Values.controller.autoscaling.enabled) (gt (.Values.controller.replicaCount | int) 1)) }} -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - name: {{ include "ingress-nginx.controller.fullname" . }} - namespace: {{ .Release.Namespace }} -spec: - selector: - matchLabels: - {{- include "ingress-nginx.selectorLabels" . | nindent 6 }} - component: "{{ .Values.controller.name }}" - {{- if .Values.controller.maxUnavailable }} - maxUnavailable: {{ .Values.controller.maxUnavailable }} - {{- else }} - minAvailable: {{ .Values.controller.minAvailable }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-prometheusrules.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-prometheusrules.yaml deleted file mode 100644 index 4d31a4e15..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-prometheusrules.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if and .Values.controller.metrics.enabled .Values.controller.metrics.prometheusRule.enabled -}} -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - name: {{ include "ingress-nginx.controller.fullname" . }} -{{- if .Values.controller.metrics.prometheusRule.namespace }} - namespace: {{ .Values.controller.metrics.prometheusRule.namespace | quote }} -{{- end }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - {{- if .Values.controller.metrics.prometheusRule.additionalLabels }} - {{- toYaml .Values.controller.metrics.prometheusRule.additionalLabels | nindent 4 }} - {{- end }} -spec: -{{- if .Values.controller.metrics.prometheusRule.rules }} - groups: - - name: {{ template "ingress-nginx.name" . }} - rules: {{- toYaml .Values.controller.metrics.prometheusRule.rules | nindent 4 }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-psp.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-psp.yaml deleted file mode 100644 index 2bf0c0723..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-psp.yaml +++ /dev/null @@ -1,89 +0,0 @@ -{{- if and .Values.podSecurityPolicy.enabled (empty .Values.controller.existingPsp) -}} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ include "ingress-nginx.fullname" . }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller -spec: - allowedCapabilities: - - NET_BIND_SERVICE -{{- if .Values.controller.sysctls }} - allowedUnsafeSysctls: - {{- range $sysctl, $value := .Values.controller.sysctls }} - - {{ $sysctl }} - {{- end }} -{{- end }} - privileged: false - allowPrivilegeEscalation: true - # Allow core volume types. - volumes: - - 'configMap' - - 'emptyDir' - #- 'projected' - - 'secret' - #- 'downwardAPI' -{{- if .Values.controller.hostNetwork }} - hostNetwork: {{ .Values.controller.hostNetwork }} -{{- end }} -{{- if or .Values.controller.hostNetwork .Values.controller.hostPort.enabled }} - hostPorts: -{{- if .Values.controller.hostNetwork }} -{{- range $key, $value := .Values.controller.containerPort }} - # {{ $key }} - - min: {{ $value }} - max: {{ $value }} -{{- end }} -{{- else if .Values.controller.hostPort.enabled }} -{{- range $key, $value := .Values.controller.hostPort.ports }} - # {{ $key }} - - min: {{ $value }} - max: {{ $value }} -{{- end }} -{{- end }} -{{- if .Values.controller.metrics.enabled }} - # metrics - - min: {{ .Values.controller.metrics.port }} - max: {{ .Values.controller.metrics.port }} -{{- end }} -{{- if .Values.controller.admissionWebhooks.enabled }} - # admission webhooks - - min: {{ .Values.controller.admissionWebhooks.port }} - max: {{ .Values.controller.admissionWebhooks.port }} -{{- end }} -{{- range $key, $value := .Values.tcp }} - # {{ $key }}-tcp - - min: {{ $key }} - max: {{ $key }} -{{- end }} -{{- range $key, $value := .Values.udp }} - # {{ $key }}-udp - - min: {{ $key }} - max: {{ $key }} -{{- end }} -{{- end }} - hostIPC: false - hostPID: false - runAsUser: - # Require the container to run without root privileges. - rule: 'MustRunAsNonRoot' - supplementalGroups: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - readOnlyRootFilesystem: false - seLinux: - rule: 'RunAsAny' -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-role.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-role.yaml deleted file mode 100644 index 7e69d201d..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-role.yaml +++ /dev/null @@ -1,93 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - name: {{ include "ingress-nginx.fullname" . }} - namespace: {{ .Release.Namespace }} -rules: - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - apiGroups: - - "" - resources: - - configmaps - - pods - - secrets - - endpoints - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - services - verbs: - - get - - list - - watch - - apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: - - get - - list - - watch - - apiGroups: - - networking.k8s.io - resources: - - ingresses/status - verbs: - - update - - apiGroups: - - networking.k8s.io - resources: - - ingressclasses - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - configmaps - resourceNames: - - {{ .Values.controller.electionID }} - verbs: - - get - - update - - apiGroups: - - "" - resources: - - configmaps - verbs: - - create - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch -{{- if .Values.podSecurityPolicy.enabled }} - - apiGroups: [{{ template "podSecurityPolicy.apiGroup" . }}] - resources: ['podsecuritypolicies'] - verbs: ['use'] - {{- with .Values.controller.existingPsp }} - resourceNames: [{{ . }}] - {{- else }} - resourceNames: [{{ include "ingress-nginx.fullname" . }}] - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-rolebinding.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-rolebinding.yaml deleted file mode 100644 index ef6708f66..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-rolebinding.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - name: {{ include "ingress-nginx.fullname" . }} - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ include "ingress-nginx.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "ingress-nginx.serviceAccountName" . }} - namespace: {{ .Release.Namespace | quote }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service-internal.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service-internal.yaml deleted file mode 100644 index 5feacaf0a..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service-internal.yaml +++ /dev/null @@ -1,86 +0,0 @@ -{{- if and .Values.controller.service.enabled .Values.controller.service.internal.enabled .Values.controller.service.internal.annotations}} -apiVersion: v1 -kind: Service -metadata: - annotations: - {{- range $key, $value := .Values.controller.service.internal.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - {{- if .Values.controller.service.labels }} - {{- toYaml .Values.controller.service.labels | nindent 4 }} - {{- end }} - name: {{ include "ingress-nginx.controller.fullname" . }}-internal - namespace: {{ .Release.Namespace }} -spec: - type: "{{ .Values.controller.service.type }}" -{{- if .Values.controller.service.internal.loadBalancerIP }} - loadBalancerIP: {{ .Values.controller.service.internal.loadBalancerIP }} -{{- end }} -{{- if .Values.controller.service.internal.loadBalancerSourceRanges }} - loadBalancerSourceRanges: {{ toYaml .Values.controller.service.internal.loadBalancerSourceRanges | nindent 4 }} -{{- end }} -{{- if .Values.controller.service.internal.externalTrafficPolicy }} - externalTrafficPolicy: {{ .Values.controller.service.internal.externalTrafficPolicy }} -{{- end }} - ports: - {{- $setNodePorts := (or (eq .Values.controller.service.type "NodePort") (eq .Values.controller.service.type "LoadBalancer")) }} - {{- if .Values.controller.service.enableHttp }} - - name: http - port: {{ .Values.controller.service.ports.http }} - protocol: TCP - targetPort: {{ .Values.controller.service.targetPorts.http }} - {{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.http))) }} - nodePort: {{ .Values.controller.service.nodePorts.http }} - {{- end }} - {{- end }} - {{- if .Values.controller.service.enableHttps }} - - name: https - port: {{ .Values.controller.service.ports.https }} - protocol: TCP - targetPort: {{ .Values.controller.service.targetPorts.https }} - {{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.https))) }} - nodePort: {{ .Values.controller.service.nodePorts.https }} - {{- end }} - {{- end }} - {{- if (and .Values.controller.service.internal.enableShell (include "gitlab.shell.port" $)) }} - - name: gitlab-shell - port: {{ include "gitlab.shell.port" $ | int }} - protocol: TCP - targetPort: gitlab-shell - {{- $nodePort := coalesce (index .Values.controller.service.nodePorts "gitlab-shell") .Values.global.shell.port }} - {{- if (and (eq .Values.controller.service.type "NodePort") (not (empty $nodePort))) }} - nodePort: {{ $nodePort }} - {{- end }} - {{- end }} - {{- range $key, $value := .Values.tcp }} - - name: {{ $key }}-tcp - port: {{ $key }} - protocol: TCP - targetPort: {{ $key }}-tcp - {{- if $.Values.controller.service.nodePorts.tcp }} - {{- if index $.Values.controller.service.nodePorts.tcp $key }} - nodePort: {{ index $.Values.controller.service.nodePorts.tcp $key }} - {{- end }} - {{- end }} - {{- end }} - {{- range $key, $value := .Values.udp }} - - name: {{ $key }}-udp - port: {{ $key }} - protocol: UDP - targetPort: {{ $key }}-udp - {{- if $.Values.controller.service.nodePorts.udp }} - {{- if index $.Values.controller.service.nodePorts.udp $key }} - nodePort: {{ index $.Values.controller.service.nodePorts.udp $key }} - {{- end }} - {{- end }} - {{- end }} - selector: - {{- include "ingress-nginx.selectorLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service-metrics.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service-metrics.yaml deleted file mode 100644 index d785c632a..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service-metrics.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if .Values.controller.metrics.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.controller.metrics.service.annotations }} - annotations: {{ toYaml .Values.controller.metrics.service.annotations | nindent 4 }} -{{- end }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - {{- if .Values.controller.metrics.service.labels }} - {{- toYaml .Values.controller.metrics.service.labels | nindent 4 }} - {{- end }} - name: {{ include "ingress-nginx.controller.fullname" . }}-metrics - namespace: {{ .Release.Namespace }} -spec: - type: {{ .Values.controller.metrics.service.type }} -{{- if .Values.controller.metrics.service.clusterIP }} - clusterIP: {{ .Values.controller.metrics.service.clusterIP }} -{{- end }} -{{- if .Values.controller.metrics.service.externalIPs }} - externalIPs: {{ toYaml .Values.controller.metrics.service.externalIPs | nindent 4 }} -{{- end }} -{{- if .Values.controller.metrics.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.controller.metrics.service.loadBalancerIP }} -{{- end }} -{{- if .Values.controller.metrics.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: {{ toYaml .Values.controller.metrics.service.loadBalancerSourceRanges | nindent 4 }} -{{- end }} -{{- if .Values.controller.metrics.service.externalTrafficPolicy }} - externalTrafficPolicy: {{ .Values.controller.metrics.service.externalTrafficPolicy }} -{{- end }} - ports: - - name: metrics - port: {{ .Values.controller.metrics.service.servicePort }} - protocol: TCP - targetPort: metrics - {{- $setNodePorts := (or (eq .Values.controller.metrics.service.type "NodePort") (eq .Values.controller.metrics.service.type "LoadBalancer")) }} - {{- if (and $setNodePorts (not (empty .Values.controller.metrics.service.nodePort))) }} - nodePort: {{ .Values.controller.metrics.service.nodePort }} - {{- end }} - selector: - {{- include "ingress-nginx.selectorLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service-webhook.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service-webhook.yaml deleted file mode 100644 index 75340ab20..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service-webhook.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if .Values.controller.admissionWebhooks.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.controller.admissionWebhooks.service.annotations }} - annotations: {{ toYaml .Values.controller.admissionWebhooks.service.annotations | nindent 4 }} -{{- end }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - name: {{ include "ingress-nginx.controller.fullname" . }}-admission - namespace: {{ .Release.Namespace }} -spec: - type: {{ .Values.controller.admissionWebhooks.service.type }} -{{- if .Values.controller.admissionWebhooks.service.clusterIP }} - clusterIP: {{ .Values.controller.admissionWebhooks.service.clusterIP }} -{{- end }} -{{- if .Values.controller.admissionWebhooks.service.externalIPs }} - externalIPs: {{ toYaml .Values.controller.admissionWebhooks.service.externalIPs | nindent 4 }} -{{- end }} -{{- if .Values.controller.admissionWebhooks.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.controller.admissionWebhooks.service.loadBalancerIP }} -{{- end }} -{{- if .Values.controller.admissionWebhooks.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: {{ toYaml .Values.controller.admissionWebhooks.service.loadBalancerSourceRanges | nindent 4 }} -{{- end }} - ports: - - name: https-webhook - port: 443 - targetPort: webhook - selector: - {{- include "ingress-nginx.selectorLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service.yaml deleted file mode 100644 index e918fa0df..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-service.yaml +++ /dev/null @@ -1,108 +0,0 @@ -{{- if .Values.controller.service.enabled -}} -apiVersion: v1 -kind: Service -metadata: - annotations: - {{- range $key, $value := .Values.controller.service.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - {{- if .Values.controller.service.labels }} - {{- toYaml .Values.controller.service.labels | nindent 4 }} - {{- end }} - name: {{ include "ingress-nginx.controller.fullname" . }} - namespace: {{ .Release.Namespace }} -spec: - type: {{ .Values.controller.service.type }} -{{- if .Values.controller.service.clusterIP }} - clusterIP: {{ .Values.controller.service.clusterIP }} -{{- end }} -{{- if .Values.controller.service.externalIPs }} - externalIPs: {{ toYaml .Values.controller.service.externalIPs | nindent 4 }} -{{- end }} -{{- if or .Values.global.hosts.externalIP .Values.controller.service.loadBalancerIP }} - loadBalancerIP: {{ coalesce .Values.global.hosts.externalIP .Values.controller.service.loadBalancerIP }} -{{- end }} -{{- if .Values.controller.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: {{ toYaml .Values.controller.service.loadBalancerSourceRanges | nindent 4 }} -{{- end }} -{{- if .Values.controller.service.externalTrafficPolicy }} - externalTrafficPolicy: {{ .Values.controller.service.externalTrafficPolicy }} -{{- end }} -{{- if .Values.controller.service.sessionAffinity }} - sessionAffinity: {{ .Values.controller.service.sessionAffinity }} -{{- end }} -{{- if .Values.controller.service.healthCheckNodePort }} - healthCheckNodePort: {{ .Values.controller.service.healthCheckNodePort }} -{{- end }} -{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version -}} -{{- if .Values.controller.service.ipFamilyPolicy }} - ipFamilyPolicy: {{ .Values.controller.service.ipFamilyPolicy }} -{{- end }} -{{- end }} -{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version -}} -{{- if .Values.controller.service.ipFamilies }} - ipFamilies: {{ toYaml .Values.controller.service.ipFamilies | nindent 4 }} -{{- end }} -{{- end }} - ports: - {{- $setNodePorts := (or (eq .Values.controller.service.type "NodePort") (eq .Values.controller.service.type "LoadBalancer")) }} - {{- if .Values.controller.service.enableHttp }} - - name: http - port: {{ .Values.controller.service.ports.http }} - protocol: TCP - targetPort: {{ .Values.controller.service.targetPorts.http }} - {{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.http))) }} - nodePort: {{ .Values.controller.service.nodePorts.http }} - {{- end }} - {{- end }} - {{- if .Values.controller.service.enableHttps }} - - name: https - port: {{ .Values.controller.service.ports.https }} - protocol: TCP - targetPort: {{ .Values.controller.service.targetPorts.https }} - {{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.https))) }} - nodePort: {{ .Values.controller.service.nodePorts.https }} - {{- end }} - {{- end }} - {{- if (and .Values.controller.service.enableShell (include "gitlab.shell.port" $)) }} - - name: gitlab-shell - port: {{ include "gitlab.shell.port" $ | int }} - protocol: TCP - targetPort: gitlab-shell - {{- $nodePort := coalesce (index .Values.controller.service.nodePorts "gitlab-shell") .Values.global.shell.port }} - {{- if (and (eq .Values.controller.service.type "NodePort") (not (empty $nodePort))) }} - nodePort: {{ $nodePort }} - {{- end }} - {{- end }} - {{- range $key, $value := .Values.tcp }} - - name: {{ $key }}-tcp - port: {{ $key }} - protocol: TCP - targetPort: {{ $key }}-tcp - {{- if $.Values.controller.service.nodePorts.tcp }} - {{- if index $.Values.controller.service.nodePorts.tcp $key }} - nodePort: {{ index $.Values.controller.service.nodePorts.tcp $key }} - {{- end }} - {{- end }} - {{- end }} - {{- range $key, $value := .Values.udp }} - - name: {{ $key }}-udp - port: {{ $key }} - protocol: UDP - targetPort: {{ $key }}-udp - {{- if $.Values.controller.service.nodePorts.udp }} - {{- if index $.Values.controller.service.nodePorts.udp $key }} - nodePort: {{ index $.Values.controller.service.nodePorts.udp $key }} - {{- end }} - {{- end }} - {{- end }} - selector: - {{- include "ingress-nginx.selectorLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-serviceaccount.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-serviceaccount.yaml deleted file mode 100644 index b811d01f1..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-serviceaccount.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if or .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - name: {{ template "ingress-nginx.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-servicemonitor.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-servicemonitor.yaml deleted file mode 100644 index 9705189a4..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/controller-servicemonitor.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) .Values.controller.metrics.enabled .Values.controller.metrics.serviceMonitor.enabled -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "ingress-nginx.controller.fullname" . }} -{{- if .Values.controller.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.controller.metrics.serviceMonitor.namespace | quote }} -{{- end }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: controller - {{- if .Values.controller.metrics.serviceMonitor.additionalLabels }} - {{- toYaml .Values.controller.metrics.serviceMonitor.additionalLabels | nindent 4 }} - {{- end }} -spec: - endpoints: - - port: metrics - interval: {{ .Values.controller.metrics.serviceMonitor.scrapeInterval }} - {{- if .Values.controller.metrics.serviceMonitor.honorLabels }} - honorLabels: true - {{- end }} - {{- if .Values.controller.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: {{ toYaml .Values.controller.metrics.serviceMonitor.metricRelabelings | nindent 8 }} - {{- end }} -{{- if .Values.controller.metrics.serviceMonitor.jobLabel }} - jobLabel: {{ .Values.controller.metrics.serviceMonitor.jobLabel | quote }} -{{- end }} -{{- if .Values.controller.metrics.serviceMonitor.namespaceSelector }} - namespaceSelector: {{ toYaml .Values.controller.metrics.serviceMonitor.namespaceSelector | nindent 4 }} -{{ else }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end }} -{{- if .Values.controller.metrics.serviceMonitor.targetLabels }} - targetLabels: - {{- range .Values.controller.metrics.serviceMonitor.targetLabels }} - - {{ . }} - {{- end }} -{{- end }} - selector: - matchLabels: - {{- include "ingress-nginx.selectorLabels" . | nindent 6 }} - component: "{{ .Values.controller.name }}" -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-deployment.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-deployment.yaml deleted file mode 100644 index 45fff9fcc..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-deployment.yaml +++ /dev/null @@ -1,122 +0,0 @@ -{{- if .Values.defaultBackend.enabled -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.defaultBackend.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: default-backend - name: {{ include "ingress-nginx.defaultBackend.fullname" . }} - {{- if include "gitlab.deploymentAnnotations" . }} - annotations: - {{- include "gitlab.deploymentAnnotations" . | nindent 4 }} - {{- end }} - namespace: {{ .Release.Namespace }} -spec: - selector: - matchLabels: - {{- include "ingress-nginx.selectorLabels" . | nindent 6 }} - component: "{{ .Values.defaultBackend.name }}" -{{- if not .Values.defaultBackend.autoscaling.enabled }} - replicas: {{ .Values.defaultBackend.replicaCount }} -{{- end }} - revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} - template: - metadata: - {{- if .Values.defaultBackend.podAnnotations }} - annotations: {{ toYaml .Values.defaultBackend.podAnnotations | nindent 8 }} - {{- end }} - labels: - {{- include "ingress-nginx.selectorLabels" . | nindent 8 }} - component: "{{ .Values.defaultBackend.name }}" - {{- include "gitlab.podLabels" . | nindent 8 }} - {{- if .Values.defaultBackend.podLabels }} - {{- toYaml .Values.defaultBackend.podLabels | nindent 8 }} - {{- end }} - spec: - {{- if .Values.imagePullSecrets }} - imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }} - {{- end }} - {{- if or .Values.global.priorityClassName .Values.defaultBackend.priorityClassName }} - priorityClassName: {{ default .Values.global.priorityClassName .Values.defaultBackend.priorityClassName }} - {{- end }} - {{- if .Values.defaultBackend.podSecurityContext }} - securityContext: {{ toYaml .Values.defaultBackend.podSecurityContext | nindent 8 }} - {{- end }} - containers: - - name: {{ template "ingress-nginx.name" . }}-default-backend - {{- with .Values.defaultBackend.image }} - image: "{{- if .repository -}}{{ .repository }}{{ else }}{{ .registry }}/{{ .image }}{{- end -}}:{{ .tag }}{{ include "gitlab.image.tagSuffix" $ }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" - {{- end }} - imagePullPolicy: {{ .Values.defaultBackend.image.pullPolicy }} - {{- if .Values.defaultBackend.extraArgs }} - args: - {{- range $key, $value := .Values.defaultBackend.extraArgs }} - {{- /* Accept keys without values or with false as value */}} - {{- if eq ($value | quote | len) 2 }} - - --{{ $key }} - {{- else }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- end }} - {{- end }} - securityContext: - capabilities: - drop: - - ALL - runAsUser: {{ .Values.defaultBackend.image.runAsUser }} - runAsNonRoot: {{ .Values.defaultBackend.image.runAsNonRoot }} - allowPrivilegeEscalation: {{ .Values.defaultBackend.image.allowPrivilegeEscalation }} - readOnlyRootFilesystem: {{ .Values.defaultBackend.image.readOnlyRootFilesystem}} - {{- if .Values.defaultBackend.extraEnvs }} - env: {{ toYaml .Values.defaultBackend.extraEnvs | nindent 12 }} - {{- end }} - livenessProbe: - httpGet: - path: /healthz - port: {{ .Values.defaultBackend.port }} - scheme: HTTP - initialDelaySeconds: {{ .Values.defaultBackend.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.defaultBackend.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.defaultBackend.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.defaultBackend.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.defaultBackend.livenessProbe.failureThreshold }} - readinessProbe: - httpGet: - path: /healthz - port: {{ .Values.defaultBackend.port }} - scheme: HTTP - initialDelaySeconds: {{ .Values.defaultBackend.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.defaultBackend.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.defaultBackend.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.defaultBackend.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.defaultBackend.readinessProbe.failureThreshold }} - ports: - - name: http - containerPort: {{ .Values.defaultBackend.port }} - protocol: TCP - {{- if .Values.defaultBackend.extraVolumeMounts }} - volumeMounts: {{- toYaml .Values.defaultBackend.extraVolumeMounts | nindent 12 }} - {{- end }} - {{- if .Values.defaultBackend.resources }} - resources: {{ toYaml .Values.defaultBackend.resources | nindent 12 }} - {{- end }} - {{- if .Values.defaultBackend.nodeSelector }} - nodeSelector: {{ toYaml .Values.defaultBackend.nodeSelector | nindent 8 }} - {{- else if include "gitlab.nodeSelector" . }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- end }} - serviceAccountName: {{ template "ingress-nginx.defaultBackend.serviceAccountName" . }} - {{- if .Values.defaultBackend.tolerations }} - tolerations: {{ toYaml .Values.defaultBackend.tolerations | nindent 8 }} - {{- end }} - {{- if .Values.defaultBackend.affinity }} - affinity: {{ toYaml .Values.defaultBackend.affinity | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 60 - {{- if .Values.defaultBackend.extraVolumes }} - volumes: {{ toYaml .Values.defaultBackend.extraVolumes | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-hpa.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-hpa.yaml deleted file mode 100644 index 4df885152..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-hpa.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if and .Values.defaultBackend.enabled .Values.defaultBackend.autoscaling.enabled }} -{{- $hpaCfg := (dict "global" $.Values.global.hpa "local" .Values.backendConfig.autoscaling "context" $) -}} ---- -apiVersion: {{ template "gitlab.hpa.apiVersion" $hpaCfg }} -kind: HorizontalPodAutoscaler -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.defaultBackend.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: default-backend - name: {{ template "ingress-nginx.defaultBackend.fullname" . }} - namespace: {{ .Release.Namespace }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "ingress-nginx.defaultBackend.fullname" . }} - minReplicas: {{ .Values.defaultBackend.autoscaling.minReplicas }} - maxReplicas: {{ .Values.defaultBackend.autoscaling.maxReplicas }} - metrics: - {{- with .Values.defaultBackend.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if (include "gitlab.hpa.supportsV2MetricsSpec" $hpaCfg) }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.defaultBackend.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if (include "gitlab.hpa.supportsV2MetricsSpec" $hpaCfg) }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- include "gitlab.hpa.behavior" $hpaCfg | nindent 2 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-poddisruptionbudget.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-poddisruptionbudget.yaml deleted file mode 100644 index ba2165607..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-poddisruptionbudget.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if or (gt (.Values.defaultBackend.replicaCount | int) 1) (gt (.Values.defaultBackend.autoscaling.minReplicas | int) 1) }} -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.defaultBackend.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: default-backend - name: {{ include "ingress-nginx.defaultBackend.fullname" . }} - namespace: {{ .Release.Namespace }} -spec: - selector: - matchLabels: - {{- include "ingress-nginx.selectorLabels" . | nindent 6 }} - component: "{{ .Values.defaultBackend.name }}" - {{- if .Values.defaultBackend.maxUnavailable }} - maxUnavailable: {{ .Values.defaultBackend.maxUnavailable }} - {{- else }} - minAvailable: {{ .Values.defaultBackend.minAvailable }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-psp.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-psp.yaml deleted file mode 100644 index 515106817..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-psp.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if and .Values.podSecurityPolicy.enabled .Values.defaultBackend.enabled (empty .Values.defaultBackend.existingPsp) -}} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ include "ingress-nginx.fullname" . }}-backend - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.defaultBackend.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: default-backend -spec: - allowPrivilegeEscalation: false - fsGroup: - ranges: - - max: 65535 - min: 1 - rule: MustRunAs - requiredDropCapabilities: - - ALL - runAsUser: - rule: MustRunAsNonRoot - seLinux: - rule: RunAsAny - supplementalGroups: - ranges: - - max: 65535 - min: 1 - rule: MustRunAs - volumes: - - configMap - - emptyDir - - projected - - secret - - downwardAPI -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-role.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-role.yaml deleted file mode 100644 index 2c1b9546b..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-role.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if and .Values.rbac.create .Values.podSecurityPolicy.enabled .Values.defaultBackend.enabled -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.defaultBackend.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: default-backend - name: {{ include "ingress-nginx.fullname" . }}-backend - namespace: {{ .Release.Namespace }} -rules: - - apiGroups: [{{ template "podSecurityPolicy.apiGroup" . }}] - resources: ['podsecuritypolicies'] - verbs: ['use'] - {{- with .Values.defaultBackend.existingPsp }} - resourceNames: [{{ . }}] - {{- else }} - resourceNames: [{{ include "ingress-nginx.fullname" . }}-backend] - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-rolebinding.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-rolebinding.yaml deleted file mode 100644 index 6a7b4bae2..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-rolebinding.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.rbac.create .Values.podSecurityPolicy.enabled .Values.defaultBackend.enabled -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.defaultBackend.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: default-backend - name: {{ include "ingress-nginx.fullname" . }}-backend - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ include "ingress-nginx.fullname" . }}-backend -subjects: - - kind: ServiceAccount - name: {{ template "ingress-nginx.defaultBackend.serviceAccountName" . }} - namespace: {{ .Release.Namespace | quote }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-service.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-service.yaml deleted file mode 100644 index ced88be6a..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -{{- if .Values.defaultBackend.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.defaultBackend.service.annotations }} - annotations: {{ toYaml .Values.defaultBackend.service.annotations | nindent 4 }} -{{- end }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.defaultBackend.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: default-backend - name: {{ include "ingress-nginx.defaultBackend.fullname" . }} - namespace: {{ .Release.Namespace }} -spec: - type: {{ .Values.defaultBackend.service.type }} -{{- if .Values.defaultBackend.service.clusterIP }} - clusterIP: {{ .Values.defaultBackend.service.clusterIP }} -{{- end }} -{{- if .Values.defaultBackend.service.externalIPs }} - externalIPs: {{ toYaml .Values.defaultBackend.service.externalIPs | nindent 4 }} -{{- end }} -{{- if .Values.defaultBackend.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.defaultBackend.service.loadBalancerIP }} -{{- end }} -{{- if .Values.defaultBackend.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: {{ toYaml .Values.defaultBackend.service.loadBalancerSourceRanges | nindent 4 }} -{{- end }} - ports: - - name: http - port: {{ .Values.defaultBackend.service.servicePort }} - protocol: TCP - targetPort: http - selector: - {{- include "ingress-nginx.selectorLabels" . | nindent 4 }} - component: "{{ .Values.defaultBackend.name }}" -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-serviceaccount.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-serviceaccount.yaml deleted file mode 100644 index c01f2c547..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/default-backend-serviceaccount.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if and .Values.defaultBackend.enabled .Values.defaultBackend.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" . | nindent 4 }} - app.kubernetes.io/component: default-backend - name: {{ template "ingress-nginx.defaultBackend.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -automountServiceAccountToken: {{ .Values.defaultBackend.serviceAccount.automountServiceAccountToken }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/templates/dh-param-secret.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/templates/dh-param-secret.yaml deleted file mode 100644 index bed6f5e01..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/templates/dh-param-secret.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- with .Values.dhParam -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "ingress-nginx.controller.fullname" $ }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - component: "{{ .Values.controller.name }}" - {{- include "ingress-nginx.labels" $ | nindent 4 }} -data: - dhparam.pem: {{ . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/nginx-ingress/values.yaml b/charts/gitlab/gitlab/charts/nginx-ingress/values.yaml deleted file mode 100644 index 137a8943e..000000000 --- a/charts/gitlab/gitlab/charts/nginx-ingress/values.yaml +++ /dev/null @@ -1,885 +0,0 @@ -## nginx configuration -## Ref: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/index.md -## - -## Overrides for generated resource names -# See templates/_helpers.tpl -# nameOverride: -# fullnameOverride: - -controller: - name: controller - image: - registry: registry.gitlab.com - image: gitlab-org/cloud-native/mirror/images/ingress-nginx/controller - tag: "v1.2.1" - digest: sha256:5516d103a9c2ecc4f026efbd4b40662ce22dc1f824fb129ed121460aaa5c47f8 - pullPolicy: IfNotPresent - # www-data -> uid 101 - runAsUser: 101 - allowPrivilegeEscalation: true - - # Use an existing PSP instead of creating one - existingPsp: "" - - # Configures the controller container name - containerName: controller - - # Configures the ports the nginx-controller listens on - containerPort: - http: 80 - https: 443 - - # Will add custom configuration options to Nginx https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/ - config: {} - - ## Annotations to be added to the controller config configuration configmap - ## - configAnnotations: {} - - # Will add custom headers before sending traffic to backends according to https://github.com/kubernetes/ingress-nginx/tree/main/docs/examples/customization/custom-headers - proxySetHeaders: {} - - # Will add custom headers before sending response traffic to the client according to: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#add-headers - addHeaders: {} - - # Optionally customize the pod dnsConfig. - dnsConfig: {} - - # Optionally customize the pod hostname. - hostname: {} - - # Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'. - # By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller - # to keep resolving names inside the k8s network, use ClusterFirstWithHostNet. - dnsPolicy: ClusterFirst - - # Bare-metal considerations via the host network https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network - # Ingress status was blank because there is no Service exposing the NGINX Ingress controller in a configuration using the host network, the default --publish-service flag used in standard cloud setups does not apply - reportNodeInternalIp: false - - # Process Ingress objects without ingressClass annotation/ingressClassName field - # Overrides value for --watch-ingress-without-class flag of the controller binary - # Defaults to false - watchIngressWithoutClass: false - - # Process IngressClass per name (additionally as per spec.controller) - ingressClassByName: false - - # This configuration defines if Ingress Controller should allow users to set - # their own *-snippet annotations, otherwise this is forbidden / dropped - # when users add those annotations. - # Global snippets in ConfigMap are still respected - allowSnippetAnnotations: true - - # Required for use with CNI based kubernetes installations (such as ones set up by kubeadm), - # since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920 - # is merged - hostNetwork: false - - ## Use host ports 80 and 443 - ## Disabled by default - ## - hostPort: - enabled: false - ports: - http: 80 - https: 443 - - ## Election ID to use for status update - ## - electionID: ingress-controller-leader - - # This section refers to the creation of the IngressClass resource - # IngressClass resources are supported since k8s >= 1.18 and required since k8s >= 1.19 - ingressClassResource: - name: nginx - enabled: true - default: false - controllerValue: "k8s.io/ingress-nginx" - - # Parameters is a link to a custom resource containing additional - # configuration for the controller. This is optional if the controller - # does not require extra parameters. - parameters: {} - - # labels to add to the pod container metadata - podLabels: {} - # key: value - - ## Security Context policies for controller pods - ## - podSecurityContext: {} - - ## See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for - ## notes on enabling and using sysctls - ### - sysctls: {} - # sysctls: - # "net.core.somaxconn": "8192" - - ## Allows customization of the source of the IP address or FQDN to report - ## in the ingress status field. By default, it reads the information provided - ## by the service. If disable, the status field reports the IP address of the - ## node or nodes where an ingress controller pod is running. - publishService: - enabled: true - ## Allows overriding of the publish service to bind to - ## Must be / - ## - pathOverride: "" - - ## Limit the scope of the controller - ## - scope: - enabled: false - namespace: "" # defaults to $(POD_NAMESPACE) - - ## Allows customization of the configmap / nginx-configmap namespace - ## - configMapNamespace: "" # defaults to $(POD_NAMESPACE) - - ## Allows customization of the tcp-services-configmap - ## - tcp: - configMapNamespace: "" # defaults to $(POD_NAMESPACE) - ## Annotations to be added to the tcp config configmap - annotations: {} - - ## Allows customization of the udp-services-configmap - ## - udp: - configMapNamespace: "" # defaults to $(POD_NAMESPACE) - ## Annotations to be added to the udp config configmap - annotations: {} - - # Maxmind license key to download GeoLite2 Databases - # https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases - maxmindLicenseKey: "" - - ## Additional command line arguments to pass to nginx-ingress-controller - ## E.g. to specify the default SSL certificate you can use - ## extraArgs: - ## default-ssl-certificate: "/" - extraArgs: {} - - ## Additional environment variables to set - extraEnvs: [] - # extraEnvs: - # - name: FOO - # valueFrom: - # secretKeyRef: - # key: FOO - # name: secret-resource - - ## DaemonSet or Deployment - ## - kind: Deployment - - ## Annotations to be added to the controller Deployment or DaemonSet - ## - annotations: {} - # keel.sh/pollSchedule: "@every 60m" - - ## Labels to be added to the controller Deployment or DaemonSet - ## - labels: {} - # keel.sh/policy: patch - # keel.sh/trigger: poll - - - # The update strategy to apply to the Deployment or DaemonSet - ## - updateStrategy: {} - # rollingUpdate: - # maxUnavailable: 1 - # type: RollingUpdate - - # minReadySeconds to avoid killing pods before we are ready - ## - minReadySeconds: 0 - - - ## Node tolerations for server scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - ## Affinity and anti-affinity - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - # # An example of preferred pod anti-affinity, weight is in the range 1-100 - # podAntiAffinity: - # preferredDuringSchedulingIgnoredDuringExecution: - # - weight: 100 - # podAffinityTerm: - # labelSelector: - # matchExpressions: - # - key: app.kubernetes.io/name - # operator: In - # values: - # - ingress-nginx - # - key: app.kubernetes.io/instance - # operator: In - # values: - # - ingress-nginx - # - key: app.kubernetes.io/component - # operator: In - # values: - # - controller - # topologyKey: kubernetes.io/hostname - - # # An example of required pod anti-affinity - # podAntiAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # - labelSelector: - # matchExpressions: - # - key: app.kubernetes.io/name - # operator: In - # values: - # - ingress-nginx - # - key: app.kubernetes.io/instance - # operator: In - # values: - # - ingress-nginx - # - key: app.kubernetes.io/component - # operator: In - # values: - # - controller - # topologyKey: "kubernetes.io/hostname" - - ## Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in. - ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - ## - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: failure-domain.beta.kubernetes.io/zone - # whenUnsatisfiable: DoNotSchedule - # labelSelector: - # matchLabels: - # app.kubernetes.io/instance: ingress-nginx-internal - - ## terminationGracePeriodSeconds - ## wait up to five minutes for the drain of connections - ## - terminationGracePeriodSeconds: 300 - - ## Node labels for controller pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - ## GitLab change: disable default nodeSelector - # nodeSelector: - # kubernetes.io/os: linux - - ## Liveness and readiness probe values - ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes - ## - # startupProbe: - # httpGet: - # # should match container.healthCheckPath - # path: "/healthz" - # port: 10254 - # scheme: HTTP - # initialDelaySeconds: 5 - # periodSeconds: 5 - # timeoutSeconds: 2 - # successThreshold: 1 - # failureThreshold: 5 - livenessProbe: - httpGet: - # should match container.healthCheckPath - path: "/healthz" - port: 10254 - scheme: HTTP - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - httpGet: - # should match container.healthCheckPath - path: "/healthz" - port: 10254 - scheme: HTTP - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - - # Path of the health check endpoint. All requests received on the port defined by - # the healthz-port parameter are forwarded internally to this path. - healthCheckPath: "/healthz" - - # Address to bind the health check endpoint. - # It is better to set this option to the internal node address - # if the ingress nginx controller is running in the hostNetwork: true mode. - healthCheckHost: "" - - ## Annotations to be added to controller pods - ## - podAnnotations: {} - - replicaCount: 1 - - minAvailable: 1 - # maxUnavailable: - - # Define requests resources to avoid probe issues due to CPU utilization in busy nodes - # ref: https://github.com/kubernetes/ingress-nginx/issues/4735#issuecomment-551204903 - # Ideally, there should be no limits. - # https://engineering.indeedblog.com/blog/2019/12/cpu-throttling-regression-fix/ - resources: - # limits: - # cpu: 100m - # memory: 90Mi - requests: - cpu: 100m - memory: 90Mi - - # Mutually exclusive with keda autoscaling - autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 11 - targetCPUUtilizationPercentage: 50 - targetMemoryUtilizationPercentage: 50 - behavior: {} - # scaleDown: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 1 - # periodSeconds: 180 - # scaleUp: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 2 - # periodSeconds: 60 - - autoscalingTemplate: [] - # Custom or additional autoscaling metrics - # ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-custom-metrics - # - type: Pods - # pods: - # metric: - # name: nginx_ingress_controller_nginx_process_requests_total - # target: - # type: AverageValue - # averageValue: 10000m - - # Mutually exclusive with hpa autoscaling - keda: - apiVersion: "keda.sh/v1alpha1" - # apiVersion changes with keda 1.x vs 2.x - # 2.x = keda.sh/v1alpha1 - # 1.x = keda.k8s.io/v1alpha1 - enabled: false - minReplicas: 1 - maxReplicas: 11 - pollingInterval: 30 - cooldownPeriod: 300 - restoreToOriginalReplicaCount: false - scaledObject: - annotations: {} - # Custom annotations for ScaledObject resource - # annotations: - # key: value - triggers: [] - # - type: prometheus - # metadata: - # serverAddress: http://:9090 - # metricName: http_requests_total - # threshold: '100' - # query: sum(rate(http_requests_total{deployment="my-deployment"}[2m])) - - behavior: {} - # scaleDown: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 1 - # periodSeconds: 180 - # scaleUp: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 2 - # periodSeconds: 60 - - ## Enable mimalloc as a drop-in replacement for malloc. - ## ref: https://github.com/microsoft/mimalloc - ## - enableMimalloc: true - - ## Override NGINX template - customTemplate: - configMapName: "" - configMapKey: "" - - service: - enabled: true - - annotations: {} - labels: {} - # clusterIP: "" - - ## List of IP addresses at which the controller services are available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - # loadBalancerIP: "" - loadBalancerSourceRanges: [] - - enableHttp: true - enableHttps: true - enableShell: true - - ## Set external traffic policy to: "Local" to preserve source IP on providers supporting it. - ## Ref: https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer - # externalTrafficPolicy: "" - - ## Must be either "None" or "ClientIP" if set. Kubernetes will default to "None". - ## Ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - # sessionAffinity: "" - - ## Specifies the health check node port (numeric port number) for the service. If healthCheckNodePort isn’t specified, - ## the service controller allocates a port from your cluster’s NodePort range. - ## Ref: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip - # healthCheckNodePort: 0 - - ## Represents the dual-stack-ness requested or required by this Service. Possible values are - ## SingleStack, PreferDualStack or RequireDualStack. - ## The ipFamilies and clusterIPs fields depend on the value of this field. - ## Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/ - ipFamilyPolicy: "SingleStack" - - ## List of IP families (e.g. IPv4, IPv6) assigned to the service. This field is usually assigned automatically - ## based on cluster configuration and the ipFamilyPolicy field. - ## Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/ - ipFamilies: - - IPv4 - - ports: - http: 80 - https: 443 - - targetPorts: - http: http - https: https - - type: LoadBalancer - - # type: NodePort - # nodePorts: - # http: 32080 - # https: 32443 - # tcp: - # 8080: 32808 - nodePorts: - http: "" - https: "" - tcp: {} - udp: {} - - ## Enables an additional internal load balancer (besides the external one). - ## Annotations are mandatory for the load balancer to come up. Varies with the cloud service. - internal: - enabled: false - - annotations: {} - - enableShell: false - - # loadBalancerIP: "" - - ## Restrict access For LoadBalancer service. Defaults to 0.0.0.0/0. - loadBalancerSourceRanges: [] - - ## Set external traffic policy to: "Local" to preserve source IP on - ## providers supporting it - ## Ref: https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer - # externalTrafficPolicy: "" - - extraContainers: [] - ## Additional containers to be added to the controller pod. - ## See https://github.com/lemonldap-ng-controller/lemonldap-ng-controller as example. - # - name: my-sidecar - # image: nginx:latest - # - name: lemonldap-ng-controller - # image: lemonldapng/lemonldap-ng-controller:0.2.0 - # args: - # - /lemonldap-ng-controller - # - --alsologtostderr - # - --configmap=$(POD_NAMESPACE)/lemonldap-ng-configuration - # env: - # - name: POD_NAME - # valueFrom: - # fieldRef: - # fieldPath: metadata.name - # - name: POD_NAMESPACE - # valueFrom: - # fieldRef: - # fieldPath: metadata.namespace - # volumeMounts: - # - name: copy-portal-skins - # mountPath: /srv/var/lib/lemonldap-ng/portal/skins - - extraVolumeMounts: [] - ## Additional volumeMounts to the controller main container. - # - name: copy-portal-skins - # mountPath: /var/lib/lemonldap-ng/portal/skins - - extraVolumes: [] - ## Additional volumes to the controller pod. - # - name: copy-portal-skins - # emptyDir: {} - - extraInitContainers: [] - ## Containers, which are run before the app containers are started. - # - name: init-myservice - # image: busybox - # command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done;'] - - admissionWebhooks: - annotations: {} - enabled: true - failurePolicy: Fail - # timeoutSeconds: 10 - port: 8443 - certificate: "/usr/local/certificates/cert" - key: "/usr/local/certificates/key" - namespaceSelector: {} - objectSelector: {} - - # Use an existing PSP instead of creating one - existingPsp: "" - - service: - annotations: {} - # clusterIP: "" - externalIPs: [] - # loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 443 - type: ClusterIP - - createSecretJob: - resources: {} - # limits: - # cpu: 10m - # memory: 20Mi - # requests: - # cpu: 10m - # memory: 20Mi - - patchWebhookJob: - resources: {} - - patch: - enabled: true - image: - registry: registry.k8s.io - image: ingress-nginx/kube-webhook-certgen - # for backwards compatibility consider setting the full image url via the repository value below - # use *either* current default registry/image or repository format or installing chart by providing the values.yaml will fail - # repository: - tag: v1.1.1 - digest: sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660 - pullPolicy: IfNotPresent - ## Provide a priority class name to the webhook patching job - ## - priorityClassName: "" - podAnnotations: {} - ## GitLab change: disable default nodeSelector - # nodeSelector: - # kubernetes.io/os: linux - tolerations: [] - runAsUser: 2000 - - metrics: - port: 10254 - # if this port is changed, change healthz-port: in extraArgs: accordingly - enabled: false - - service: - annotations: {} - # prometheus.io/scrape: "true" - # prometheus.io/port: "10254" - - # clusterIP: "" - - ## List of IP addresses at which the stats-exporter service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - # loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 10254 - type: ClusterIP - # externalTrafficPolicy: "" - # nodePort: "" - - serviceMonitor: - enabled: false - additionalLabels: {} - # The label to use to retrieve the job name from. - # jobLabel: "app.kubernetes.io/name" - namespace: "" - namespaceSelector: {} - # Default: scrape .Release.Namespace only - # To scrape all, use the following: - # namespaceSelector: - # any: true - scrapeInterval: 30s - # honorLabels: true - targetLabels: [] - metricRelabelings: [] - - prometheusRule: - enabled: false - additionalLabels: {} - # namespace: "" - rules: [] - # # These are just examples rules, please adapt them to your needs - # - alert: NGINXConfigFailed - # expr: count(nginx_ingress_controller_config_last_reload_successful == 0) > 0 - # for: 1s - # labels: - # severity: critical - # annotations: - # description: bad ingress config - nginx config test failed - # summary: uninstall the latest ingress changes to allow config reloads to resume - # - alert: NGINXCertificateExpiry - # expr: (avg(nginx_ingress_controller_ssl_expire_time_seconds) by (host) - time()) < 604800 - # for: 1s - # labels: - # severity: critical - # annotations: - # description: ssl certificate(s) will expire in less then a week - # summary: renew expiring certificates to avoid downtime - # - alert: NGINXTooMany500s - # expr: 100 * ( sum( nginx_ingress_controller_requests{status=~"5.+"} ) / sum(nginx_ingress_controller_requests) ) > 5 - # for: 1m - # labels: - # severity: warning - # annotations: - # description: Too many 5XXs - # summary: More than 5% of all requests returned 5XX, this requires your attention - # - alert: NGINXTooMany400s - # expr: 100 * ( sum( nginx_ingress_controller_requests{status=~"4.+"} ) / sum(nginx_ingress_controller_requests) ) > 5 - # for: 1m - # labels: - # severity: warning - # annotations: - # description: Too many 4XXs - # summary: More than 5% of all requests returned 4XX, this requires your attention - - ## Improve connection draining when ingress controller pod is deleted using a lifecycle hook: - ## With this new hook, we increased the default terminationGracePeriodSeconds from 30 seconds - ## to 300, allowing the draining of connections up to five minutes. - ## If the active connections end before that, the pod will terminate gracefully at that time. - ## To effectively take advantage of this feature, the Configmap feature - ## worker-shutdown-timeout new value is 240s instead of 10s. - ## - lifecycle: - preStop: - exec: - command: - - /wait-shutdown - - priorityClassName: "" - -## Rollback limit -## -revisionHistoryLimit: 10 - -## Default 404 backend -## -defaultBackend: - ## - enabled: false - - name: defaultbackend - image: - repository: registry.gitlab.com/gitlab-org/cloud-native/mirror/images/defaultbackend-amd64 - tag: "1.5" - digest: sha256:4dc5e07c8ca4e23bddb3153737d7b8c556e5fb2f29c4558b7cd6e6df99c512c7 - pullPolicy: IfNotPresent - # nobody user -> uid 65534 - runAsUser: 65534 - runAsNonRoot: true - readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - - # Use an existing PSP instead of creating one - existingPsp: "" - - extraArgs: {} - - serviceAccount: - create: true - name: "" - automountServiceAccountToken: true - ## Additional environment variables to set for defaultBackend pods - extraEnvs: [] - - port: 8080 - - ## Readiness and liveness probes for default backend - ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ - ## - livenessProbe: - failureThreshold: 3 - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 - readinessProbe: - failureThreshold: 6 - initialDelaySeconds: 0 - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 5 - - ## Node tolerations for server scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - affinity: {} - - ## Security Context policies for controller pods - ## See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for - ## notes on enabling and using sysctls - ## - podSecurityContext: {} - - # labels to add to the pod container metadata - podLabels: {} - # key: value - - ## Node labels for default backend pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - ## GitLab change: disable default nodeSelector - # nodeSelector: - # kubernetes.io/os: linux - - ## Annotations to be added to default backend pods - ## - podAnnotations: {} - - replicaCount: 1 - - minAvailable: 1 - # maxUnavailable: - - resources: {} - # limits: - # cpu: 10m - # memory: 20Mi - # requests: - # cpu: 10m - # memory: 20Mi - - extraVolumeMounts: [] - ## Additional volumeMounts to the default backend container. - # - name: copy-portal-skins - # mountPath: /var/lib/lemonldap-ng/portal/skins - - extraVolumes: [] - ## Additional volumes to the default backend pod. - # - name: copy-portal-skins - # emptyDir: {} - - autoscaling: - annotations: {} - enabled: false - minReplicas: 1 - maxReplicas: 2 - targetCPUUtilizationPercentage: 50 - targetMemoryUtilizationPercentage: 50 - behavior: {} - - service: - annotations: {} - - # clusterIP: "" - - ## List of IP addresses at which the default backend service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - # loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 80 - type: ClusterIP - - priorityClassName: "" - -## Enable RBAC as per https://github.com/kubernetes/ingress-nginx/blob/main/docs/deploy/rbac.md and https://github.com/kubernetes/ingress-nginx/issues/266 -rbac: - create: true - scope: false - -# If true, create & use Pod Security Policy resources -# https://kubernetes.io/docs/concepts/policy/pod-security-policy/ -podSecurityPolicy: - enabled: false - -serviceAccount: - create: true - name: "" - automountServiceAccountToken: true - -## Optional array of imagePullSecrets containing private registry credentials -## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ -imagePullSecrets: [] -# - name: secretName - -# TCP service key:value pairs -# Ref: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/exposing-tcp-udp-services.md -## -tcp: {} -# 8080: "default/example-tcp-svc:9000" - -# UDP service key:value pairs -# Ref: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/exposing-tcp-udp-services.md -## -udp: {} -# 53: "kube-system/kube-dns:53" - -# A base64ed Diffie-Hellman parameter -# This can be generated with: openssl dhparam 4096 2> /dev/null | base64 -# Ref: https://github.com/kubernetes/ingress-nginx/tree/main/docs/examples/customization/ssl-dh-param -dhParam: - -## GitLab-provided values starting below - -# Use an external configmap instead of generating the configmap from this chart. -# Contents must match spec format for ingress-nginx and tcp ports must still be specified -# using `tcp` setting above (although service name is meaningless with an external config) -# e.g -# --set tcp.22=ssh --set tcpExternalConfig=mynamespace/customconfigmap -# Ref: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/tcp -## -tcpExternalConfig: "" - -common: - labels: {} diff --git a/charts/gitlab/gitlab/charts/postgresql/.helmignore b/charts/gitlab/gitlab/charts/postgresql/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/charts/gitlab/gitlab/charts/postgresql/Chart.lock b/charts/gitlab/gitlab/charts/postgresql/Chart.lock deleted file mode 100644 index 424a235e6..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: oci://registry-1.docker.io/bitnamicharts - version: 2.2.5 -digest: sha256:318f438acfeaced11d9060877d615caf1985417d2865810defaa886d3496f8d3 -generated: "2023-05-08T19:26:58.084687094Z" diff --git a/charts/gitlab/gitlab/charts/postgresql/Chart.yaml b/charts/gitlab/gitlab/charts/postgresql/Chart.yaml deleted file mode 100644 index 38b285b4c..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/Chart.yaml +++ /dev/null @@ -1,30 +0,0 @@ -annotations: - category: Database - licenses: Apache-2.0 -apiVersion: v2 -appVersion: 15.3.0 -dependencies: -- name: common - repository: oci://registry-1.docker.io/bitnamicharts - tags: - - bitnami-common - version: 2.x.x -description: PostgreSQL (Postgres) is an open source object-relational database known - for reliability and data integrity. ACID-compliant, it supports foreign keys, joins, - views, triggers and stored procedures. -home: https://bitnami.com -icon: https://bitnami.com/assets/stacks/postgresql/img/postgresql-stack-220x234.png -keywords: -- postgresql -- postgres -- database -- sql -- replication -- cluster -maintainers: -- name: VMware, Inc. - url: https://github.com/bitnami/charts -name: postgresql -sources: -- https://github.com/bitnami/charts/tree/main/bitnami/postgresql -version: 12.5.2 diff --git a/charts/gitlab/gitlab/charts/postgresql/README.md b/charts/gitlab/gitlab/charts/postgresql/README.md deleted file mode 100644 index 865a5580c..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/README.md +++ /dev/null @@ -1,683 +0,0 @@ - - -# PostgreSQL packaged by Bitnami - -PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity. ACID-compliant, it supports foreign keys, joins, views, triggers and stored procedures. - -[Overview of PostgreSQL](http://www.postgresql.org) - -Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement. - -## TL;DR - -```console -helm install my-release oci://registry-1.docker.io/bitnamicharts/postgresql -``` - -## Introduction - -This chart bootstraps a [PostgreSQL](https://github.com/bitnami/containers/tree/main/bitnami/postgresql) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -For HA, please see [this repo](https://github.com/bitnami/charts/tree/main/bitnami/postgresql-ha) - -Bitnami charts can be used with [Kubeapps](https://kubeapps.dev/) for deployment and management of Helm Charts in clusters. - -## Prerequisites - -- Kubernetes 1.19+ -- Helm 3.2.0+ -- PV provisioner support in the underlying infrastructure - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```console -helm install my-release oci://registry-1.docker.io/bitnamicharts/postgresql -``` - -The command deploys PostgreSQL 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` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```console -helm delete my-release -``` - -The command removes all the Kubernetes components but PVC's associated with the chart and deletes the release. - -To delete the PVC's associated with `my-release`: - -```console -kubectl delete pvc -l release=my-release -``` - -> **Note**: Deleting the PVC's will delete postgresql data as well. Please be cautious before doing it. - -## Parameters - -### Global parameters - -| Name | Description | Value | -| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| `global.imageRegistry` | Global Docker image registry | `""` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` | -| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` | -| `global.postgresql.auth.postgresPassword` | Password for the "postgres" admin user (overrides `auth.postgresPassword`) | `""` | -| `global.postgresql.auth.username` | Name for a custom user to create (overrides `auth.username`) | `""` | -| `global.postgresql.auth.password` | Password for the custom user to create (overrides `auth.password`) | `""` | -| `global.postgresql.auth.database` | Name for a custom database to create (overrides `auth.database`) | `""` | -| `global.postgresql.auth.existingSecret` | Name of existing secret to use for PostgreSQL credentials (overrides `auth.existingSecret`). | `""` | -| `global.postgresql.auth.secretKeys.adminPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.adminPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set. | `""` | -| `global.postgresql.auth.secretKeys.userPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.userPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set. | `""` | -| `global.postgresql.auth.secretKeys.replicationPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.replicationPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set. | `""` | -| `global.postgresql.service.ports.postgresql` | PostgreSQL service port (overrides `service.ports.postgresql`) | `""` | - -### Common parameters - -| Name | Description | Value | -| ------------------------ | -------------------------------------------------------------------------------------------- | --------------- | -| `kubeVersion` | Override Kubernetes version | `""` | -| `nameOverride` | String to partially override common.names.fullname template (will maintain the release name) | `""` | -| `fullnameOverride` | String to fully override common.names.fullname template | `""` | -| `clusterDomain` | Kubernetes Cluster Domain | `cluster.local` | -| `extraDeploy` | Array of extra objects to deploy with the release (evaluated as a template) | `[]` | -| `commonLabels` | Add labels to all the deployed resources | `{}` | -| `commonAnnotations` | Add annotations to all the deployed resources | `{}` | -| `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 statefulset | `["sleep"]` | -| `diagnosticMode.args` | Args to override all containers in the statefulset | `["infinity"]` | - -### PostgreSQL common parameters - -| Name | Description | Value | -| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | -| `image.registry` | PostgreSQL image registry | `docker.io` | -| `image.repository` | PostgreSQL image repository | `bitnami/postgresql` | -| `image.tag` | PostgreSQL image tag (immutable tags are recommended) | `15.3.0-debian-11-r0` | -| `image.digest` | PostgreSQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | -| `image.pullPolicy` | PostgreSQL image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify image pull secrets | `[]` | -| `image.debug` | Specify if debug values should be set | `false` | -| `auth.enablePostgresUser` | Assign a password to the "postgres" admin user. Otherwise, remote access will be blocked for this user | `true` | -| `auth.postgresPassword` | Password for the "postgres" admin user. Ignored if `auth.existingSecret` is provided | `""` | -| `auth.username` | Name for a custom user to create | `""` | -| `auth.password` | Password for the custom user to create. Ignored if `auth.existingSecret` is provided | `""` | -| `auth.database` | Name for a custom database to create | `""` | -| `auth.replicationUsername` | Name of the replication user | `repl_user` | -| `auth.replicationPassword` | Password for the replication user. Ignored if `auth.existingSecret` is provided | `""` | -| `auth.existingSecret` | Name of existing secret to use for PostgreSQL credentials. `auth.postgresPassword`, `auth.password`, and `auth.replicationPassword` will be ignored and picked up from this secret. The secret might also contains the key `ldap-password` if LDAP is enabled. `ldap.bind_password` will be ignored and picked from this secret in this case. | `""` | -| `auth.secretKeys.adminPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set. | `postgres-password` | -| `auth.secretKeys.userPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set. | `password` | -| `auth.secretKeys.replicationPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set. | `replication-password` | -| `auth.usePasswordFiles` | Mount credentials as a files instead of using an environment variable | `false` | -| `architecture` | PostgreSQL architecture (`standalone` or `replication`) | `standalone` | -| `replication.synchronousCommit` | Set synchronous commit mode. Allowed values: `on`, `remote_apply`, `remote_write`, `local` and `off` | `off` | -| `replication.numSynchronousReplicas` | Number of replicas that will have synchronous replication. Note: Cannot be greater than `readReplicas.replicaCount`. | `0` | -| `replication.applicationName` | Cluster application name. Useful for advanced replication settings | `my_application` | -| `containerPorts.postgresql` | PostgreSQL container port | `5432` | -| `audit.logHostname` | Log client hostnames | `false` | -| `audit.logConnections` | Add client log-in operations to the log file | `false` | -| `audit.logDisconnections` | Add client log-outs operations to the log file | `false` | -| `audit.pgAuditLog` | Add operations to log using the pgAudit extension | `""` | -| `audit.pgAuditLogCatalog` | Log catalog using pgAudit | `off` | -| `audit.clientMinMessages` | Message log level to share with the user | `error` | -| `audit.logLinePrefix` | Template for log line prefix (default if not set) | `""` | -| `audit.logTimezone` | Timezone for the log timestamps | `""` | -| `ldap.enabled` | Enable LDAP support | `false` | -| `ldap.server` | IP address or name of the LDAP server. | `""` | -| `ldap.port` | Port number on the LDAP server to connect to | `""` | -| `ldap.prefix` | String to prepend to the user name when forming the DN to bind | `""` | -| `ldap.suffix` | String to append to the user name when forming the DN to bind | `""` | -| `ldap.basedn` | Root DN to begin the search for the user in | `""` | -| `ldap.binddn` | DN of user to bind to LDAP | `""` | -| `ldap.bindpw` | Password for the user to bind to LDAP | `""` | -| `ldap.searchAttribute` | Attribute to match against the user name in the search | `""` | -| `ldap.searchFilter` | The search filter to use when doing search+bind authentication | `""` | -| `ldap.scheme` | Set to `ldaps` to use LDAPS | `""` | -| `ldap.tls.enabled` | Se to true to enable TLS encryption | `false` | -| `ldap.uri` | LDAP URL beginning in the form `ldap[s]://host[:port]/basedn`. If provided, all the other LDAP parameters will be ignored. | `""` | -| `postgresqlDataDir` | PostgreSQL data dir folder | `/bitnami/postgresql/data` | -| `postgresqlSharedPreloadLibraries` | Shared preload libraries (comma-separated list) | `pgaudit` | -| `shmVolume.enabled` | Enable emptyDir volume for /dev/shm for PostgreSQL pod(s) | `true` | -| `shmVolume.sizeLimit` | Set this to enable a size limit on the shm tmpfs | `""` | -| `tls.enabled` | Enable TLS traffic support | `false` | -| `tls.autoGenerated` | Generate automatically self-signed TLS certificates | `false` | -| `tls.preferServerCiphers` | Whether to use the server's TLS cipher preferences rather than the client's | `true` | -| `tls.certificatesSecret` | Name of an existing secret that contains the certificates | `""` | -| `tls.certFilename` | Certificate filename | `""` | -| `tls.certKeyFilename` | Certificate key filename | `""` | -| `tls.certCAFilename` | CA Certificate filename | `""` | -| `tls.crlFilename` | File containing a Certificate Revocation List | `""` | - -### PostgreSQL Primary parameters - -| Name | Description | Value | -| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------------- | -| `primary.name` | Name of the primary database (eg primary, master, leader, ...) | `primary` | -| `primary.configuration` | PostgreSQL Primary main configuration to be injected as ConfigMap | `""` | -| `primary.pgHbaConfiguration` | PostgreSQL Primary client authentication configuration | `""` | -| `primary.existingConfigmap` | Name of an existing ConfigMap with PostgreSQL Primary configuration | `""` | -| `primary.extendedConfiguration` | Extended PostgreSQL Primary configuration (appended to main or default configuration) | `""` | -| `primary.existingExtendedConfigmap` | Name of an existing ConfigMap with PostgreSQL Primary extended configuration | `""` | -| `primary.initdb.args` | PostgreSQL initdb extra arguments | `""` | -| `primary.initdb.postgresqlWalDir` | Specify a custom location for the PostgreSQL transaction log | `""` | -| `primary.initdb.scripts` | Dictionary of initdb scripts | `{}` | -| `primary.initdb.scriptsConfigMap` | ConfigMap with scripts to be run at first boot | `""` | -| `primary.initdb.scriptsSecret` | Secret with scripts to be run at first boot (in case it contains sensitive information) | `""` | -| `primary.initdb.user` | Specify the PostgreSQL username to execute the initdb scripts | `""` | -| `primary.initdb.password` | Specify the PostgreSQL password to execute the initdb scripts | `""` | -| `primary.standby.enabled` | Whether to enable current cluster's primary as standby server of another cluster or not | `false` | -| `primary.standby.primaryHost` | The Host of replication primary in the other cluster | `""` | -| `primary.standby.primaryPort` | The Port of replication primary in the other cluster | `""` | -| `primary.extraEnvVars` | Array with extra environment variables to add to PostgreSQL Primary nodes | `[]` | -| `primary.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for PostgreSQL Primary nodes | `""` | -| `primary.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for PostgreSQL Primary nodes | `""` | -| `primary.command` | Override default container command (useful when using custom images) | `[]` | -| `primary.args` | Override default container args (useful when using custom images) | `[]` | -| `primary.livenessProbe.enabled` | Enable livenessProbe on PostgreSQL Primary containers | `true` | -| `primary.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` | -| `primary.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` | -| `primary.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | -| `primary.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` | -| `primary.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | -| `primary.readinessProbe.enabled` | Enable readinessProbe on PostgreSQL Primary containers | `true` | -| `primary.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` | -| `primary.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` | -| `primary.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` | -| `primary.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` | -| `primary.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | -| `primary.startupProbe.enabled` | Enable startupProbe on PostgreSQL Primary containers | `false` | -| `primary.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `30` | -| `primary.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | -| `primary.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` | -| `primary.startupProbe.failureThreshold` | Failure threshold for startupProbe | `15` | -| `primary.startupProbe.successThreshold` | Success threshold for startupProbe | `1` | -| `primary.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | -| `primary.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | -| `primary.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | -| `primary.lifecycleHooks` | for the PostgreSQL Primary container to automate configuration before or after startup | `{}` | -| `primary.resources.limits` | The resources limits for the PostgreSQL Primary containers | `{}` | -| `primary.resources.requests.memory` | The requested memory for the PostgreSQL Primary containers | `256Mi` | -| `primary.resources.requests.cpu` | The requested cpu for the PostgreSQL Primary containers | `250m` | -| `primary.podSecurityContext.enabled` | Enable security context | `true` | -| `primary.podSecurityContext.fsGroup` | Group ID for the pod | `1001` | -| `primary.containerSecurityContext.enabled` | Enable container security context | `true` | -| `primary.containerSecurityContext.runAsUser` | User ID for the container | `1001` | -| `primary.hostAliases` | PostgreSQL primary pods host aliases | `[]` | -| `primary.hostNetwork` | Specify if host network should be enabled for PostgreSQL pod (postgresql primary) | `false` | -| `primary.hostIPC` | Specify if host IPC should be enabled for PostgreSQL pod (postgresql primary) | `false` | -| `primary.labels` | Map of labels to add to the statefulset (postgresql primary) | `{}` | -| `primary.annotations` | Annotations for PostgreSQL primary pods | `{}` | -| `primary.podLabels` | Map of labels to add to the pods (postgresql primary) | `{}` | -| `primary.podAnnotations` | Map of annotations to add to the pods (postgresql primary) | `{}` | -| `primary.podAffinityPreset` | PostgreSQL primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `primary.podAntiAffinityPreset` | PostgreSQL primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `soft` | -| `primary.nodeAffinityPreset.type` | PostgreSQL primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `primary.nodeAffinityPreset.key` | PostgreSQL primary node label key to match Ignored if `primary.affinity` is set. | `""` | -| `primary.nodeAffinityPreset.values` | PostgreSQL primary node label values to match. Ignored if `primary.affinity` is set. | `[]` | -| `primary.affinity` | Affinity for PostgreSQL primary pods assignment | `{}` | -| `primary.nodeSelector` | Node labels for PostgreSQL primary pods assignment | `{}` | -| `primary.tolerations` | Tolerations for PostgreSQL primary pods assignment | `[]` | -| `primary.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` | -| `primary.priorityClassName` | Priority Class to use for each pod (postgresql primary) | `""` | -| `primary.schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` | -| `primary.terminationGracePeriodSeconds` | Seconds PostgreSQL primary pod needs to terminate gracefully | `""` | -| `primary.updateStrategy.type` | PostgreSQL Primary statefulset strategy type | `RollingUpdate` | -| `primary.updateStrategy.rollingUpdate` | PostgreSQL Primary statefulset rolling update configuration parameters | `{}` | -| `primary.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the PostgreSQL Primary container(s) | `[]` | -| `primary.extraVolumes` | Optionally specify extra list of additional volumes for the PostgreSQL Primary pod(s) | `[]` | -| `primary.sidecars` | Add additional sidecar containers to the PostgreSQL Primary pod(s) | `[]` | -| `primary.initContainers` | Add additional init containers to the PostgreSQL Primary pod(s) | `[]` | -| `primary.extraPodSpec` | Optionally specify extra PodSpec for the PostgreSQL Primary pod(s) | `{}` | -| `primary.service.type` | Kubernetes Service type | `ClusterIP` | -| `primary.service.ports.postgresql` | PostgreSQL service port | `5432` | -| `primary.service.nodePorts.postgresql` | Node port for PostgreSQL | `""` | -| `primary.service.clusterIP` | Static clusterIP or None for headless services | `""` | -| `primary.service.annotations` | Annotations for PostgreSQL primary service | `{}` | -| `primary.service.loadBalancerIP` | Load balancer IP if service type is `LoadBalancer` | `""` | -| `primary.service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | -| `primary.service.loadBalancerSourceRanges` | Addresses that are allowed when service is LoadBalancer | `[]` | -| `primary.service.extraPorts` | Extra ports to expose in the PostgreSQL primary service | `[]` | -| `primary.service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` | -| `primary.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` | -| `primary.service.headless.annotations` | Additional custom annotations for headless PostgreSQL primary service | `{}` | -| `primary.persistence.enabled` | Enable PostgreSQL Primary data persistence using PVC | `true` | -| `primary.persistence.existingClaim` | Name of an existing PVC to use | `""` | -| `primary.persistence.mountPath` | The path the volume will be mounted at | `/bitnami/postgresql` | -| `primary.persistence.subPath` | The subdirectory of the volume to mount to | `""` | -| `primary.persistence.storageClass` | PVC Storage Class for PostgreSQL Primary data volume | `""` | -| `primary.persistence.accessModes` | PVC Access Mode for PostgreSQL volume | `["ReadWriteOnce"]` | -| `primary.persistence.size` | PVC Storage Request for PostgreSQL volume | `8Gi` | -| `primary.persistence.annotations` | Annotations for the PVC | `{}` | -| `primary.persistence.labels` | Labels for the PVC | `{}` | -| `primary.persistence.selector` | Selector to match an existing Persistent Volume (this value is evaluated as a template) | `{}` | -| `primary.persistence.dataSource` | Custom PVC data source | `{}` | - -### PostgreSQL read only replica parameters (only used when `architecture` is set to `replication`) - -| Name | Description | Value | -| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------------- | -| `readReplicas.name` | Name of the read replicas database (eg secondary, slave, ...) | `read` | -| `readReplicas.replicaCount` | Number of PostgreSQL read only replicas | `1` | -| `readReplicas.extendedConfiguration` | Extended PostgreSQL read only replicas configuration (appended to main or default configuration) | `""` | -| `readReplicas.extraEnvVars` | Array with extra environment variables to add to PostgreSQL read only nodes | `[]` | -| `readReplicas.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for PostgreSQL read only nodes | `""` | -| `readReplicas.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for PostgreSQL read only nodes | `""` | -| `readReplicas.command` | Override default container command (useful when using custom images) | `[]` | -| `readReplicas.args` | Override default container args (useful when using custom images) | `[]` | -| `readReplicas.livenessProbe.enabled` | Enable livenessProbe on PostgreSQL read only containers | `true` | -| `readReplicas.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` | -| `readReplicas.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` | -| `readReplicas.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | -| `readReplicas.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` | -| `readReplicas.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | -| `readReplicas.readinessProbe.enabled` | Enable readinessProbe on PostgreSQL read only containers | `true` | -| `readReplicas.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` | -| `readReplicas.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` | -| `readReplicas.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` | -| `readReplicas.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` | -| `readReplicas.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | -| `readReplicas.startupProbe.enabled` | Enable startupProbe on PostgreSQL read only containers | `false` | -| `readReplicas.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `30` | -| `readReplicas.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | -| `readReplicas.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` | -| `readReplicas.startupProbe.failureThreshold` | Failure threshold for startupProbe | `15` | -| `readReplicas.startupProbe.successThreshold` | Success threshold for startupProbe | `1` | -| `readReplicas.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | -| `readReplicas.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | -| `readReplicas.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | -| `readReplicas.lifecycleHooks` | for the PostgreSQL read only container to automate configuration before or after startup | `{}` | -| `readReplicas.resources.limits` | The resources limits for the PostgreSQL read only containers | `{}` | -| `readReplicas.resources.requests.memory` | The requested memory for the PostgreSQL read only containers | `256Mi` | -| `readReplicas.resources.requests.cpu` | The requested cpu for the PostgreSQL read only containers | `250m` | -| `readReplicas.podSecurityContext.enabled` | Enable security context | `true` | -| `readReplicas.podSecurityContext.fsGroup` | Group ID for the pod | `1001` | -| `readReplicas.containerSecurityContext.enabled` | Enable container security context | `true` | -| `readReplicas.containerSecurityContext.runAsUser` | User ID for the container | `1001` | -| `readReplicas.hostAliases` | PostgreSQL read only pods host aliases | `[]` | -| `readReplicas.hostNetwork` | Specify if host network should be enabled for PostgreSQL pod (PostgreSQL read only) | `false` | -| `readReplicas.hostIPC` | Specify if host IPC should be enabled for PostgreSQL pod (postgresql primary) | `false` | -| `readReplicas.labels` | Map of labels to add to the statefulset (PostgreSQL read only) | `{}` | -| `readReplicas.annotations` | Annotations for PostgreSQL read only pods | `{}` | -| `readReplicas.podLabels` | Map of labels to add to the pods (PostgreSQL read only) | `{}` | -| `readReplicas.podAnnotations` | Map of annotations to add to the pods (PostgreSQL read only) | `{}` | -| `readReplicas.podAffinityPreset` | PostgreSQL read only pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `readReplicas.podAntiAffinityPreset` | PostgreSQL read only pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `soft` | -| `readReplicas.nodeAffinityPreset.type` | PostgreSQL read only node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `readReplicas.nodeAffinityPreset.key` | PostgreSQL read only node label key to match Ignored if `primary.affinity` is set. | `""` | -| `readReplicas.nodeAffinityPreset.values` | PostgreSQL read only node label values to match. Ignored if `primary.affinity` is set. | `[]` | -| `readReplicas.affinity` | Affinity for PostgreSQL read only pods assignment | `{}` | -| `readReplicas.nodeSelector` | Node labels for PostgreSQL read only pods assignment | `{}` | -| `readReplicas.tolerations` | Tolerations for PostgreSQL read only pods assignment | `[]` | -| `readReplicas.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` | -| `readReplicas.priorityClassName` | Priority Class to use for each pod (PostgreSQL read only) | `""` | -| `readReplicas.schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` | -| `readReplicas.terminationGracePeriodSeconds` | Seconds PostgreSQL read only pod needs to terminate gracefully | `""` | -| `readReplicas.updateStrategy.type` | PostgreSQL read only statefulset strategy type | `RollingUpdate` | -| `readReplicas.updateStrategy.rollingUpdate` | PostgreSQL read only statefulset rolling update configuration parameters | `{}` | -| `readReplicas.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the PostgreSQL read only container(s) | `[]` | -| `readReplicas.extraVolumes` | Optionally specify extra list of additional volumes for the PostgreSQL read only pod(s) | `[]` | -| `readReplicas.sidecars` | Add additional sidecar containers to the PostgreSQL read only pod(s) | `[]` | -| `readReplicas.initContainers` | Add additional init containers to the PostgreSQL read only pod(s) | `[]` | -| `readReplicas.extraPodSpec` | Optionally specify extra PodSpec for the PostgreSQL read only pod(s) | `{}` | -| `readReplicas.service.type` | Kubernetes Service type | `ClusterIP` | -| `readReplicas.service.ports.postgresql` | PostgreSQL service port | `5432` | -| `readReplicas.service.nodePorts.postgresql` | Node port for PostgreSQL | `""` | -| `readReplicas.service.clusterIP` | Static clusterIP or None for headless services | `""` | -| `readReplicas.service.annotations` | Annotations for PostgreSQL read only service | `{}` | -| `readReplicas.service.loadBalancerIP` | Load balancer IP if service type is `LoadBalancer` | `""` | -| `readReplicas.service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | -| `readReplicas.service.loadBalancerSourceRanges` | Addresses that are allowed when service is LoadBalancer | `[]` | -| `readReplicas.service.extraPorts` | Extra ports to expose in the PostgreSQL read only service | `[]` | -| `readReplicas.service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` | -| `readReplicas.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` | -| `readReplicas.service.headless.annotations` | Additional custom annotations for headless PostgreSQL read only service | `{}` | -| `readReplicas.persistence.enabled` | Enable PostgreSQL read only data persistence using PVC | `true` | -| `readReplicas.persistence.existingClaim` | Name of an existing PVC to use | `""` | -| `readReplicas.persistence.mountPath` | The path the volume will be mounted at | `/bitnami/postgresql` | -| `readReplicas.persistence.subPath` | The subdirectory of the volume to mount to | `""` | -| `readReplicas.persistence.storageClass` | PVC Storage Class for PostgreSQL read only data volume | `""` | -| `readReplicas.persistence.accessModes` | PVC Access Mode for PostgreSQL volume | `["ReadWriteOnce"]` | -| `readReplicas.persistence.size` | PVC Storage Request for PostgreSQL volume | `8Gi` | -| `readReplicas.persistence.annotations` | Annotations for the PVC | `{}` | -| `readReplicas.persistence.labels` | Labels for the PVC | `{}` | -| `readReplicas.persistence.selector` | Selector to match an existing Persistent Volume (this value is evaluated as a template) | `{}` | -| `readReplicas.persistence.dataSource` | Custom PVC data source | `{}` | - -### NetworkPolicy parameters - -| Name | Description | Value | -| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| `networkPolicy.enabled` | Enable network policies | `false` | -| `networkPolicy.metrics.enabled` | Enable network policies for metrics (prometheus) | `false` | -| `networkPolicy.metrics.namespaceSelector` | Monitoring namespace selector labels. These labels will be used to identify the prometheus' namespace. | `{}` | -| `networkPolicy.metrics.podSelector` | Monitoring pod selector labels. These labels will be used to identify the Prometheus pods. | `{}` | -| `networkPolicy.ingressRules.primaryAccessOnlyFrom.enabled` | Enable ingress rule that makes PostgreSQL primary node only accessible from a particular origin. | `false` | -| `networkPolicy.ingressRules.primaryAccessOnlyFrom.namespaceSelector` | Namespace selector label that is allowed to access the PostgreSQL primary node. This label will be used to identified the allowed namespace(s). | `{}` | -| `networkPolicy.ingressRules.primaryAccessOnlyFrom.podSelector` | Pods selector label that is allowed to access the PostgreSQL primary node. This label will be used to identified the allowed pod(s). | `{}` | -| `networkPolicy.ingressRules.primaryAccessOnlyFrom.customRules` | Custom network policy for the PostgreSQL primary node. | `[]` | -| `networkPolicy.ingressRules.readReplicasAccessOnlyFrom.enabled` | Enable ingress rule that makes PostgreSQL read-only nodes only accessible from a particular origin. | `false` | -| `networkPolicy.ingressRules.readReplicasAccessOnlyFrom.namespaceSelector` | Namespace selector label that is allowed to access the PostgreSQL read-only nodes. This label will be used to identified the allowed namespace(s). | `{}` | -| `networkPolicy.ingressRules.readReplicasAccessOnlyFrom.podSelector` | Pods selector label that is allowed to access the PostgreSQL read-only nodes. This label will be used to identified the allowed pod(s). | `{}` | -| `networkPolicy.ingressRules.readReplicasAccessOnlyFrom.customRules` | Custom network policy for the PostgreSQL read-only nodes. | `[]` | -| `networkPolicy.egressRules.denyConnectionsToExternal` | Enable egress rule that denies outgoing traffic outside the cluster, except for DNS (port 53). | `false` | -| `networkPolicy.egressRules.customRules` | Custom network policy rule | `[]` | - -### Volume Permissions parameters - -| Name | Description | Value | -| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | -| `volumePermissions.enabled` | Enable init container that changes the owner and group of the persistent volume | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image repository | `bitnami/bitnami-shell` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag (immutable tags are recommended) | `11-debian-11-r115` | -| `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.resources.limits` | Init container volume-permissions resource limits | `{}` | -| `volumePermissions.resources.requests` | Init container volume-permissions resource requests | `{}` | -| `volumePermissions.containerSecurityContext.runAsUser` | User ID for the init container | `0` | - -### Other Parameters - -| Name | Description | Value | -| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| `serviceBindings.enabled` | Create secret for service binding (Experimental) | `false` | -| `serviceAccount.create` | Enable creation of ServiceAccount for PostgreSQL pod | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` | -| `serviceAccount.automountServiceAccountToken` | Allows auto mount of ServiceAccountToken on the serviceAccount created | `true` | -| `serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` | -| `rbac.create` | Create Role and RoleBinding (required for PSP to work) | `false` | -| `rbac.rules` | Custom RBAC rules to set | `[]` | -| `psp.create` | Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later | `false` | - -### Metrics Parameters - -| Name | Description | Value | -| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | --------------------------- | -| `metrics.enabled` | Start a prometheus exporter | `false` | -| `metrics.image.registry` | PostgreSQL Prometheus Exporter image registry | `docker.io` | -| `metrics.image.repository` | PostgreSQL Prometheus Exporter image repository | `bitnami/postgres-exporter` | -| `metrics.image.tag` | PostgreSQL Prometheus Exporter image tag (immutable tags are recommended) | `0.12.0-debian-11-r86` | -| `metrics.image.digest` | PostgreSQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | -| `metrics.image.pullPolicy` | PostgreSQL Prometheus Exporter image pull policy | `IfNotPresent` | -| `metrics.image.pullSecrets` | Specify image pull secrets | `[]` | -| `metrics.customMetrics` | Define additional custom metrics | `{}` | -| `metrics.extraEnvVars` | Extra environment variables to add to PostgreSQL Prometheus exporter | `[]` | -| `metrics.containerSecurityContext.enabled` | Enable PostgreSQL Prometheus exporter containers' Security Context | `true` | -| `metrics.containerSecurityContext.runAsUser` | Set PostgreSQL Prometheus exporter containers' Security Context runAsUser | `1001` | -| `metrics.containerSecurityContext.runAsNonRoot` | Set PostgreSQL Prometheus exporter containers' Security Context runAsNonRoot | `true` | -| `metrics.livenessProbe.enabled` | Enable livenessProbe on PostgreSQL Prometheus exporter containers | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `5` | -| `metrics.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` | -| `metrics.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | -| `metrics.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` | -| `metrics.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | -| `metrics.readinessProbe.enabled` | Enable readinessProbe on PostgreSQL Prometheus exporter containers | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` | -| `metrics.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` | -| `metrics.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` | -| `metrics.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` | -| `metrics.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | -| `metrics.startupProbe.enabled` | Enable startupProbe on PostgreSQL Prometheus exporter containers | `false` | -| `metrics.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `10` | -| `metrics.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | -| `metrics.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` | -| `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` | PostgreSQL Prometheus exporter metrics container port | `9187` | -| `metrics.resources.limits` | The resources limits for the PostgreSQL Prometheus exporter container | `{}` | -| `metrics.resources.requests` | The requested resources for the PostgreSQL Prometheus exporter container | `{}` | -| `metrics.service.ports.metrics` | PostgreSQL Prometheus Exporter service port | `9187` | -| `metrics.service.clusterIP` | Static clusterIP or None for headless services | `""` | -| `metrics.service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` | -| `metrics.service.annotations` | Annotations for Prometheus to auto-discover the metrics endpoint | `{}` | -| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using Prometheus Operator | `false` | -| `metrics.serviceMonitor.namespace` | Namespace for the ServiceMonitor Resource (defaults to the Release Namespace) | `""` | -| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `""` | -| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` | -| `metrics.serviceMonitor.labels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` | -| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` | -| `metrics.serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping | `[]` | -| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` | -| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` | -| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus. | `""` | -| `metrics.prometheusRule.enabled` | Create a PrometheusRule for Prometheus Operator | `false` | -| `metrics.prometheusRule.namespace` | Namespace for the PrometheusRule Resource (defaults to the Release Namespace) | `""` | -| `metrics.prometheusRule.labels` | Additional labels that can be used so PrometheusRule will be discovered by Prometheus | `{}` | -| `metrics.prometheusRule.rules` | PrometheusRule definitions | `[]` | - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```console -helm install my-release \ - --set auth.postgresPassword=secretpassword - oci://registry-1.docker.io/bitnamicharts/postgresql -``` - -The above command sets the PostgreSQL `postgres` account password to `secretpassword`. - -> NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available. -> **Warning** Setting a password will be ignored on new installation in case when previous Posgresql release was deleted through the helm command. In that case, old PVC will have an old password, and setting it through helm won't take effect. Deleting persistent volumes (PVs) will solve the issue. Refer to [issue 2061](https://github.com/bitnami/charts/issues/2061) for more details - -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-1.docker.io/bitnamicharts/postgresql -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -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. - -### Customizing primary and read replica services in a replicated configuration - -At the top level, there is a service object which defines the services for both primary and readReplicas. For deeper customization, there are service objects for both the primary and read types individually. This allows you to override the values in the top level service object so that the primary and read can be of different service types and with different clusterIPs / nodePorts. Also in the case you want the primary and read to be of type nodePort, you will need to set the nodePorts to different values to prevent a collision. The values that are deeper in the primary.service or readReplicas.service objects will take precedence over the top level service object. - -### Use a different PostgreSQL version - -To modify the application version used in this chart, specify a different version of the image using the `image.tag` parameter and/or a different repository using the `image.repository` parameter. Refer to the [chart documentation for more information on these parameters and how to use them with images from a private registry](https://docs.bitnami.com/kubernetes/infrastructure/postgresql/configuration/change-image-version/). - -### postgresql.conf / pg_hba.conf files as configMap - -This helm chart also supports to customize the PostgreSQL configuration file. You can add additional PostgreSQL configuration parameters using the `primary.extendedConfiguration`/`readReplicas.extendedConfiguration` parameters as a string. Alternatively, to replace the entire default configuration use `primary.configuration`. - -You can also add a custom pg_hba.conf using the `primary.pgHbaConfiguration` parameter. - -In addition to these options, you can also set an external ConfigMap with all the configuration files. This is done by setting the `primary.existingConfigmap` parameter. Note that this will override the two previous options. - -### Initialize a fresh instance - -The [Bitnami PostgreSQL](https://github.com/bitnami/containers/tree/main/bitnami/postgresql) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, you can specify custom scripts using the `primary.initdb.scripts` parameter as a string. - -In addition, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `primary.initdb.scriptsConfigMap` parameter. Note that this will override the two previous options. If your initialization scripts contain sensitive information such as credentials or passwords, you can use the `primary.initdb.scriptsSecret` parameter. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Securing traffic using TLS - -TLS support can be enabled in the chart by specifying the `tls.` parameters while creating a release. The following parameters should be configured to properly enable the TLS support in the chart: - -- `tls.enabled`: Enable TLS support. Defaults to `false` -- `tls.certificatesSecret`: Name of an existing secret that contains the certificates. No defaults. -- `tls.certFilename`: Certificate filename. No defaults. -- `tls.certKeyFilename`: Certificate key filename. No defaults. - -For example: - -- First, create the secret with the cetificates files: - - ```console - kubectl create secret generic certificates-tls-secret --from-file=./cert.crt --from-file=./cert.key --from-file=./ca.crt - ``` - -- Then, use the following parameters: - - ```console - volumePermissions.enabled=true - tls.enabled=true - tls.certificatesSecret="certificates-tls-secret" - tls.certFilename="cert.crt" - tls.certKeyFilename="cert.key" - ``` - - > Note TLS and VolumePermissions: PostgreSQL requires certain permissions on sensitive files (such as certificate keys) to start up. Due to an on-going [issue](https://github.com/kubernetes/kubernetes/issues/57923) regarding kubernetes permissions and the use of `containerSecurityContext.runAsUser`, you must enable `volumePermissions` to ensure everything works as expected. - -### Sidecars - -If you need additional containers to run within the same pod as PostgreSQL (e.g. an additional metrics or logging exporter), you can do so via the `sidecars` config parameter. Simply define your container according to the Kubernetes container spec. - -```yaml -# For the PostgreSQL primary -primary: - sidecars: - - name: your-image-name - image: your-image - imagePullPolicy: Always - ports: - - name: portname - containerPort: 1234 -# For the PostgreSQL replicas -readReplicas: - sidecars: - - name: your-image-name - image: your-image - imagePullPolicy: Always - ports: - - name: portname - containerPort: 1234 -``` - -### Metrics - -The chart optionally can start a metrics exporter for [prometheus](https://prometheus.io). The metrics endpoint (port 9187) is not exposed and it is expected that the metrics are collected from inside the k8s cluster using something similar as the described in the [example Prometheus scrape configuration](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml). - -The exporter allows to create custom metrics from additional SQL queries. See the Chart's `values.yaml` for an example and consult the [exporters documentation](https://github.com/wrouesnel/postgres_exporter#adding-new-metrics-via-a-config-file) for more details. - -### Use of global variables - -In more complex scenarios, we may have the following tree of dependencies - -```text - +--------------+ - | | - +------------+ Chart 1 +-----------+ - | | | | - | --------+------+ | - | | | - | | | - | | | - | | | - v v v -+-------+------+ +--------+------+ +--------+------+ -| | | | | | -| PostgreSQL | | Sub-chart 1 | | Sub-chart 2 | -| | | | | | -+--------------+ +---------------+ +---------------+ -``` - -The three charts below depend on the parent chart Chart 1. However, subcharts 1 and 2 may need to connect to PostgreSQL as well. In order to do so, subcharts 1 and 2 need to know the PostgreSQL credentials, so one option for deploying could be deploy Chart 1 with the following parameters: - -```text -postgresql.auth.username=testuser -subchart1.postgresql.auth.username=testuser -subchart2.postgresql.auth.username=testuser -postgresql.auth.password=testpass -subchart1.postgresql.auth.password=testpass -subchart2.postgresql.auth.password=testpass -postgresql.auth.database=testdb -subchart1.postgresql.auth.database=testdb -subchart2.postgresql.auth.database=testdb -``` - -If the number of dependent sub-charts increases, installing the chart with parameters can become increasingly difficult. An alternative would be to set the credentials using global variables as follows: - -```text -global.postgresql.auth.username=testuser -global.postgresql.auth.password=testpass -global.postgresql.auth.database=testdb -``` - -This way, the credentials will be available in all of the subcharts. - -## Persistence - -The [Bitnami PostgreSQL](https://github.com/bitnami/containers/tree/main/bitnami/postgresql) image stores the PostgreSQL data and configurations at the `/bitnami/postgresql` path of the container. - -Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube. -See the [Parameters](#parameters) section to configure the PVC or to disable persistence. - -If you already have data in it, you will fail to sync to standby nodes for all commits, details can refer to the [code present in the container repository](https://github.com/bitnami/containers/tree/main/bitnami/postgresql). If you need to use those data, please covert them to sql and import after `helm install` finished. - -## NetworkPolicy - -To enable network policy for PostgreSQL, install [a networking plugin that implements the Kubernetes NetworkPolicy spec](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy#before-you-begin), and set `networkPolicy.enabled` to `true`. - -For Kubernetes v1.5 & v1.6, you must also turn on NetworkPolicy by setting the DefaultDeny namespace annotation. Note: this will enforce policy for _all_ pods in the namespace: - -```console -kubectl annotate namespace default "net.beta.kubernetes.io/network-policy={\"ingress\":{\"isolation\":\"DefaultDeny\"}}" -``` - -With NetworkPolicy enabled, traffic will be limited to just port 5432. - -For more precise policy, set `networkPolicy.allowExternal=false`. This will only allow pods with the generated client label to connect to PostgreSQL. -This label will be displayed in the output of a successful install. - -## Differences between Bitnami PostgreSQL image and [Docker Official](https://hub.docker.com/_/postgres) image - -- The Docker Official PostgreSQL image does not support replication. If you pass any replication environment variable, this would be ignored. The only environment variables supported by the Docker Official image are POSTGRES_USER, POSTGRES_DB, POSTGRES_PASSWORD, POSTGRES_INITDB_ARGS, POSTGRES_INITDB_WALDIR and PGDATA. All the remaining environment variables are specific to the Bitnami PostgreSQL image. -- The Bitnami PostgreSQL image is non-root by default. This requires that you run the pod with `securityContext` and updates the permissions of the volume with an `initContainer`. A key benefit of this configuration is that the pod follows security best practices and is prepared to run on Kubernetes distributions with hard security constraints like OpenShift. -- For OpenShift up to 4.10, let set the volume permissions, security context, runAsUser and fsGroup automatically by OpenShift and disable the predefined settings of the helm chart: primary.securityContext.enabled=false,primary.containerSecurityContext.enabled=false,volumePermissions.enabled=false,shmVolume.enabled=false -- For OpenShift 4.11 and higher, let set OpenShift the runAsUser and fsGroup automatically. Configure the pod and container security context to restrictive defaults and disable the volume permissions setup: primary. - podSecurityContext.fsGroup=null,primary.podSecurityContext.seccompProfile.type=RuntimeDefault,primary.containerSecurityContext.runAsUser=null,primary.containerSecurityContext.allowPrivilegeEscalation=false,primary.containerSecurityContext.runAsNonRoot=true,primary.containerSecurityContext.seccompProfile.type=RuntimeDefault,primary.containerSecurityContext.capabilities.drop=['ALL'],volumePermissions.enabled=false,shmVolume.enabled=false - -### 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. - -## 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 12.0.0 - -This major version changes the default PostgreSQL image from 14.x to 15.x. Follow the [official instructions](https://www.postgresql.org/docs/15/upgrading.html) to upgrade to 15.x. - -### To any previous version - -Refer to the [chart documentation for more information about how to upgrade from previous releases](https://docs.bitnami.com/kubernetes/infrastructure/postgresql/administration/upgrade/). - -## License - -Copyright © 2023 Bitnami - -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/charts/gitlab/gitlab/charts/postgresql/charts/common/.helmignore b/charts/gitlab/gitlab/charts/postgresql/charts/common/.helmignore deleted file mode 100644 index 50af03172..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# 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/ diff --git a/charts/gitlab/gitlab/charts/postgresql/charts/common/Chart.yaml b/charts/gitlab/gitlab/charts/postgresql/charts/common/Chart.yaml deleted file mode 100644 index 8f0fff689..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -annotations: - category: Infrastructure - licenses: Apache-2.0 -apiVersion: v2 -appVersion: 2.2.5 -description: A Library Helm Chart for grouping common logic between bitnami charts. - This chart is not deployable by itself. -home: https://github.com/bitnami/charts/tree/main/bitnami/common -icon: https://bitnami.com/downloads/logos/bitnami-mark.png -keywords: -- common -- helper -- template -- function -- bitnami -maintainers: -- name: Bitnami - url: https://github.com/bitnami/charts -name: common -sources: -- https://github.com/bitnami/charts -- https://www.bitnami.com/ -type: library -version: 2.2.5 diff --git a/charts/gitlab/gitlab/charts/postgresql/charts/common/README.md b/charts/gitlab/gitlab/charts/postgresql/charts/common/README.md deleted file mode 100644 index 6381c3b72..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# 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: 1.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" -``` - -## Introduction - -This chart provides a common template helpers which can be used to develop new charts using [Helm](https://helm.sh) package manager. - -Bitnami charts can be used with [Kubeapps](https://kubeapps.dev/) for deployment and management of Helm Charts in clusters. - -## Prerequisites - -- Kubernetes 1.19+ -- Helm 3.2.0+ - -## Parameters - -## 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. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - -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 © 2023 Bitnami - -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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_affinities.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_affinities.tpl deleted file mode 100644 index 81902a681..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_affinities.tpl +++ /dev/null @@ -1,106 +0,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" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} -*/}} -{{- define "common.affinities.pods.soft" -}} -{{- $component := default "" .component -}} -{{- $extraMatchLabels := default (dict) .extraMatchLabels -}} -preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} - {{- if not (empty $component) }} - {{ printf "app.kubernetes.io/component: %s" $component }} - {{- end }} - {{- range $key, $value := $extraMatchLabels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} - weight: 1 -{{- end -}} - -{{/* -Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} -*/}} -{{- define "common.affinities.pods.hard" -}} -{{- $component := default "" .component -}} -{{- $extraMatchLabels := default (dict) .extraMatchLabels -}} -requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} - {{- if not (empty $component) }} - {{ printf "app.kubernetes.io/component: %s" $component }} - {{- end }} - {{- range $key, $value := $extraMatchLabels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} -{{- 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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_capabilities.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 9d9b76004..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_capabilities.tpl +++ /dev/null @@ -1,154 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Return the target Kubernetes version -*/}} -{{- define "common.capabilities.kubeVersion" -}} -{{- if .Values.global }} - {{- if .Values.global.kubeVersion }} - {{- .Values.global.kubeVersion -}} - {{- else }} - {{- default .Capabilities.KubeVersion.Version .Values.kubeVersion -}} - {{- end -}} -{{- else }} -{{- default .Capabilities.KubeVersion.Version .Values.kubeVersion -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for poddisruptionbudget. -*/}} -{{- define "common.capabilities.policy.apiVersion" -}} -{{- if semverCompare "<1.21-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "policy/v1beta1" -}} -{{- else -}} -{{- print "policy/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for networkpolicy. -*/}} -{{- define "common.capabilities.networkPolicy.apiVersion" -}} -{{- if semverCompare "<1.7-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "extensions/v1beta1" -}} -{{- else -}} -{{- print "networking.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for cronjob. -*/}} -{{- define "common.capabilities.cronjob.apiVersion" -}} -{{- if semverCompare "<1.21-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "batch/v1beta1" -}} -{{- else -}} -{{- print "batch/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for deployment. -*/}} -{{- define "common.capabilities.deployment.apiVersion" -}} -{{- if semverCompare "<1.14-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "extensions/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "common.capabilities.statefulset.apiVersion" -}} -{{- if semverCompare "<1.14-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "apps/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for ingress. -*/}} -{{- define "common.capabilities.ingress.apiVersion" -}} -{{- if .Values.ingress -}} -{{- if .Values.ingress.apiVersion -}} -{{- .Values.ingress.apiVersion -}} -{{- else if semverCompare "<1.14-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "extensions/v1beta1" -}} -{{- else if semverCompare "<1.19-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "networking.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "networking.k8s.io/v1" -}} -{{- end }} -{{- else if semverCompare "<1.14-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "extensions/v1beta1" -}} -{{- else if semverCompare "<1.19-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "networking.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "networking.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for RBAC resources. -*/}} -{{- define "common.capabilities.rbac.apiVersion" -}} -{{- if semverCompare "<1.17-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "rbac.authorization.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "rbac.authorization.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for CRDs. -*/}} -{{- define "common.capabilities.crd.apiVersion" -}} -{{- if semverCompare "<1.19-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "apiextensions.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "apiextensions.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for APIService. -*/}} -{{- define "common.capabilities.apiService.apiVersion" -}} -{{- if semverCompare "<1.10-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "apiregistration.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "apiregistration.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for Horizontal Pod Autoscaler. -*/}} -{{- define "common.capabilities.hpa.apiVersion" -}} -{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .context) -}} -{{- if .beta2 -}} -{{- print "autoscaling/v2beta2" -}} -{{- else -}} -{{- print "autoscaling/v2beta1" -}} -{{- end -}} -{{- else -}} -{{- print "autoscaling/v2" -}} -{{- 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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_errors.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e32..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_errors.tpl +++ /dev/null @@ -1,23 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Through 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 -}} diff --git a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_images.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_images.tpl deleted file mode 100644 index 2e7b15151..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_images.tpl +++ /dev/null @@ -1,80 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Return the proper image name -{{ include "common.images.image" ( dict "imageRoot" .Values.path.to.the.image "global" .Values.global ) }} -*/}} -{{- define "common.images.image" -}} -{{- $registryName := .imageRoot.registry -}} -{{- $repositoryName := .imageRoot.repository -}} -{{- $separator := ":" -}} -{{- $termination := .imageRoot.tag | toString -}} -{{- if .global }} - {{- if .global.imageRegistry }} - {{- $registryName = .global.imageRegistry -}} - {{- 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 }} - - {{- if .global }} - {{- range .global.imagePullSecrets -}} - {{- $pullSecrets = append $pullSecrets . -}} - {{- end -}} - {{- end -}} - - {{- range .images -}} - {{- range .pullSecrets -}} - {{- $pullSecrets = append $pullSecrets . -}} - {{- end -}} - {{- end -}} - - {{- if (not (empty $pullSecrets)) }} -imagePullSecrets: - {{- range $pullSecrets }} - - 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 }} - - {{- if $context.Values.global }} - {{- range $context.Values.global.imagePullSecrets -}} - {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}} - {{- end -}} - {{- end -}} - - {{- range .images -}} - {{- range .pullSecrets -}} - {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}} - {{- end -}} - {{- end -}} - - {{- if (not (empty $pullSecrets)) }} -imagePullSecrets: - {{- range $pullSecrets }} - - name: {{ . }} - {{- end }} - {{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_ingress.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_ingress.tpl deleted file mode 100644 index 831da9caa..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_ingress.tpl +++ /dev/null @@ -1,68 +0,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" -}} -{{- $apiVersion := (include "common.capabilities.ingress.apiVersion" .context) -}} -{{- if or (eq $apiVersion "extensions/v1beta1") (eq $apiVersion "networking.k8s.io/v1beta1") -}} -serviceName: {{ .serviceName }} -servicePort: {{ .servicePort }} -{{- else -}} -service: - name: {{ .serviceName }} - port: - {{- if typeIs "string" .servicePort }} - name: {{ .servicePort }} - {{- else if or (typeIs "int" .servicePort) (typeIs "float64" .servicePort) }} - number: {{ .servicePort | int }} - {{- end }} -{{- end -}} -{{- end -}} - -{{/* -Print "true" if the API pathType field is supported -Usage: -{{ include "common.ingress.supportsPathType" . }} -*/}} -{{- define "common.ingress.supportsPathType" -}} -{{- if (semverCompare "<1.18-0" (include "common.capabilities.kubeVersion" .)) -}} -{{- print "false" -}} -{{- else -}} -{{- print "true" -}} -{{- end -}} -{{- end -}} - -{{/* -Returns true if the ingressClassname field is supported -Usage: -{{ include "common.ingress.supportsIngressClassname" . }} -*/}} -{{- define "common.ingress.supportsIngressClassname" -}} -{{- if semverCompare "<1.18-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "false" -}} -{{- else -}} -{{- print "true" -}} -{{- 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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_labels.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c7e..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_labels.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Kubernetes standard labels -*/}} -{{- define "common.labels.standard" -}} -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 }} -{{- end -}} - -{{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector -*/}} -{{- define "common.labels.matchLabels" -}} -app.kubernetes.io/name: {{ include "common.names.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_names.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_names.tpl deleted file mode 100644 index 617a23489..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_names.tpl +++ /dev/null @@ -1,66 +0,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 -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_secrets.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_secrets.tpl deleted file mode 100644 index a1708b2e8..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_secrets.tpl +++ /dev/null @@ -1,165 +0,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" "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. - -The order in which this function returns a secret password: - 1. 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) - 2. Password provided via the values.yaml - (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) - 3. 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 | quote }} - {{- else }} - {{- printf "\nPASSWORDS ERROR: The secret \"%s\" does not contain the key \"%s\"\n" .secret .key | fail -}} - {{- end -}} -{{- else if $providedPasswordValue }} - {{- $password = $providedPasswordValue | toString | b64enc | quote }} -{{- else }} - - {{- if .context.Values.enabled }} - {{- $subchart = $chartName }} - {{- end -}} - - {{- $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) -}} - - {{- 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 | b64enc | quote }} - {{- else }} - {{- $password = randAlphaNum $passwordLength | b64enc | quote }} - {{- end }} -{{- end -}} -{{- printf "%s" $password -}} -{{- 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 := "" -}} -{{- $defaultValue := required "\n'common.secrets.lookup': Argument 'defaultValue' missing or empty" .defaultValue -}} -{{- $secretData := (lookup "v1" "Secret" (include "common.names.namespace" .context) .secret).data -}} -{{- if and $secretData (hasKey $secretData .key) -}} - {{- $value = index $secretData .key -}} -{{- else -}} - {{- $value = $defaultValue | toString | b64enc -}} -{{- end -}} -{{- printf "%s" $value -}} -{{- 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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_storage.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a844f..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_storage.tpl +++ /dev/null @@ -1,23 +0,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 := .persistence.storageClass -}} -{{- if .global -}} - {{- if .global.storageClass -}} - {{- $storageClass = .global.storageClass -}} - {{- end -}} -{{- end -}} - -{{- if $storageClass -}} - {{- if (eq "-" $storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" $storageClass -}} - {{- end -}} -{{- end -}} - -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_tplvalues.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db166851..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_tplvalues.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Renders a value that contains template. -Usage: -{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }} -*/}} -{{- define "common.tplvalues.render" -}} - {{- if typeIs "string" .value }} - {{- tpl .value .context }} - {{- else }} - {{- tpl (.value | toYaml) .context }} - {{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_utils.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_utils.tpl deleted file mode 100644 index b1ead50cf..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_utils.tpl +++ /dev/null @@ -1,62 +0,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 -}} diff --git a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_warnings.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa41e..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/_warnings.tpl +++ /dev/null @@ -1,14 +0,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://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ -{{- end }} - -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_cassandra.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3bc..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_cassandra.tpl +++ /dev/null @@ -1,72 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Validate Cassandra required passwords are not empty. - -Usage: -{{ include "common.validations.values.cassandra.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where Cassandra values are stored, e.g: "cassandra-passwords-secret" - - subchart - Boolean - Optional. Whether Cassandra is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.cassandra.passwords" -}} - {{- $existingSecret := include "common.cassandra.values.existingSecret" . -}} - {{- $enabled := include "common.cassandra.values.enabled" . -}} - {{- $dbUserPrefix := include "common.cassandra.values.key.dbUser" . -}} - {{- $valueKeyPassword := printf "%s.password" $dbUserPrefix -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "cassandra-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - - {{- 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.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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_mariadb.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff77..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_mariadb.tpl +++ /dev/null @@ -1,103 +0,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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_mongodb.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec107..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_mongodb.tpl +++ /dev/null @@ -1,108 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Validate MongoDB® required passwords are not empty. - -Usage: -{{ include "common.validations.values.mongodb.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where MongoDB® values are stored, e.g: "mongodb-passwords-secret" - - subchart - Boolean - Optional. Whether MongoDB® is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.mongodb.passwords" -}} - {{- $existingSecret := include "common.mongodb.values.auth.existingSecret" . -}} - {{- $enabled := include "common.mongodb.values.enabled" . -}} - {{- $authPrefix := include "common.mongodb.values.key.auth" . -}} - {{- $architecture := include "common.mongodb.values.architecture" . -}} - {{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}} - {{- $valueKeyUsername := printf "%s.username" $authPrefix -}} - {{- $valueKeyDatabase := printf "%s.database" $authPrefix -}} - {{- $valueKeyPassword := printf "%s.password" $authPrefix -}} - {{- $valueKeyReplicaSetKey := printf "%s.replicaSetKey" $authPrefix -}} - {{- $valueKeyAuthEnabled := printf "%s.enabled" $authPrefix -}} - - {{- $authEnabled := include "common.utils.getValueFromKey" (dict "key" $valueKeyAuthEnabled "context" .context) -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") (eq $authEnabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mongodb-root-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}} - - {{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }} - {{- $valueDatabase := include "common.utils.getValueFromKey" (dict "key" $valueKeyDatabase "context" .context) }} - {{- if and $valueUsername $valueDatabase -}} - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mongodb-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - {{- end -}} - - {{- if (eq $architecture "replicaset") -}} - {{- $requiredReplicaSetKey := dict "valueKey" $valueKeyReplicaSetKey "secret" .secret "field" "mongodb-replica-set-key" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredReplicaSetKey -}} - {{- 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.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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_mysql.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a061..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_mysql.tpl +++ /dev/null @@ -1,103 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Validate MySQL required passwords are not empty. - -Usage: -{{ include "common.validations.values.mysql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where MySQL values are stored, e.g: "mysql-passwords-secret" - - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.mysql.passwords" -}} - {{- $existingSecret := include "common.mysql.values.auth.existingSecret" . -}} - {{- $enabled := include "common.mysql.values.enabled" . -}} - {{- $architecture := include "common.mysql.values.architecture" . -}} - {{- $authPrefix := include "common.mysql.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" "mysql-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" "mysql-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - {{- end -}} - - {{- if (eq $architecture "replication") -}} - {{- $requiredReplicationPassword := dict "valueKey" $valueKeyReplicationPassword "secret" .secret "field" "mysql-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.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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_postgresql.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d01..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_postgresql.tpl +++ /dev/null @@ -1,129 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Validate PostgreSQL required passwords are not empty. - -Usage: -{{ include "common.validations.values.postgresql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where postgresql values are stored, e.g: "postgresql-passwords-secret" - - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.postgresql.passwords" -}} - {{- $existingSecret := include "common.postgresql.values.existingSecret" . -}} - {{- $enabled := include "common.postgresql.values.enabled" . -}} - {{- $valueKeyPostgresqlPassword := include "common.postgresql.values.key.postgressPassword" . -}} - {{- $valueKeyPostgresqlReplicationEnabled := include "common.postgresql.values.key.replicationPassword" . -}} - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - {{- $requiredPostgresqlPassword := dict "valueKey" $valueKeyPostgresqlPassword "secret" .secret "field" "postgresql-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPostgresqlPassword -}} - - {{- $enabledReplication := include "common.postgresql.values.enabled.replication" . -}} - {{- if (eq $enabledReplication "true") -}} - {{- $requiredPostgresqlReplicationPassword := dict "valueKey" $valueKeyPostgresqlReplicationEnabled "secret" .secret "field" "postgresql-replication-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPostgresqlReplicationPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - {{- end -}} -{{- end -}} - -{{/* -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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_redis.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1ae..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_redis.tpl +++ /dev/null @@ -1,76 +0,0 @@ - -{{/* vim: set filetype=mustache: */}} -{{/* -Validate Redis® required passwords are not empty. - -Usage: -{{ include "common.validations.values.redis.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where redis values are stored, e.g: "redis-passwords-secret" - - subchart - Boolean - Optional. Whether redis is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.redis.passwords" -}} - {{- $enabled := include "common.redis.values.enabled" . -}} - {{- $valueKeyPrefix := include "common.redis.values.keys.prefix" . -}} - {{- $standarizedVersion := include "common.redis.values.standarized.version" . }} - - {{- $existingSecret := ternary (printf "%s%s" $valueKeyPrefix "auth.existingSecret") (printf "%s%s" $valueKeyPrefix "existingSecret") (eq $standarizedVersion "true") }} - {{- $existingSecretValue := include "common.utils.getValueFromKey" (dict "key" $existingSecret "context" .context) }} - - {{- $valueKeyRedisPassword := ternary (printf "%s%s" $valueKeyPrefix "auth.password") (printf "%s%s" $valueKeyPrefix "password") (eq $standarizedVersion "true") }} - {{- $valueKeyRedisUseAuth := ternary (printf "%s%s" $valueKeyPrefix "auth.enabled") (printf "%s%s" $valueKeyPrefix "usePassword") (eq $standarizedVersion "true") }} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $useAuth := include "common.utils.getValueFromKey" (dict "key" $valueKeyRedisUseAuth "context" .context) -}} - {{- if eq $useAuth "true" -}} - {{- $requiredRedisPassword := dict "valueKey" $valueKeyRedisPassword "secret" .secret "field" "redis-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRedisPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - {{- end -}} -{{- end -}} - -{{/* -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/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_validations.tpl b/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf40..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/templates/validations/_validations.tpl +++ /dev/null @@ -1,46 +0,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/charts/gitlab/gitlab/charts/postgresql/charts/common/values.yaml b/charts/gitlab/gitlab/charts/postgresql/charts/common/values.yaml deleted file mode 100644 index f2df68e5e..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/charts/common/values.yaml +++ /dev/null @@ -1,5 +0,0 @@ -## bitnami/common -## It is required by CI/CD tools and processes. -## @skip exampleValue -## -exampleValue: common-chart diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/NOTES.txt b/charts/gitlab/gitlab/charts/postgresql/templates/NOTES.txt deleted file mode 100644 index 21b3d29d0..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/NOTES.txt +++ /dev/null @@ -1,91 +0,0 @@ -CHART NAME: {{ .Chart.Name }} -CHART VERSION: {{ .Chart.Version }} -APP VERSION: {{ .Chart.AppVersion }} - -** 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 -- /opt/bitnami/scripts/postgresql/entrypoint.sh /bin/bash - -In order to replicate the container startup scripts execute this command: - - /opt/bitnami/scripts/postgresql/entrypoint.sh /opt/bitnami/scripts/postgresql/run.sh - -{{- else }} - -PostgreSQL can be accessed via port {{ include "postgresql.service.port" . }} on the following DNS names from within your cluster: - - {{ include "postgresql.primary.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - Read/Write connection - -{{- if eq .Values.architecture "replication" }} - - {{ include "postgresql.readReplica.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - Read only connection - -{{- end }} - -{{- $customUser := include "postgresql.username" . }} -{{- if and (not (empty $customUser)) (ne $customUser "postgres") .Values.auth.enablePostgresUser }} - -To get the password for "postgres" run: - - export POSTGRES_ADMIN_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "postgresql.secretName" . }} -o jsonpath="{.data.{{include "postgresql.adminPasswordKey" .}}}" | base64 -d) - -To get the password for "{{ $customUser }}" run: - - export POSTGRES_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "postgresql.secretName" . }} -o jsonpath="{.data.{{include "postgresql.userPasswordKey" .}}}" | base64 -d) - -{{- else }} - -To get the password for "{{ default "postgres" $customUser }}" run: - - export POSTGRES_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "postgresql.secretName" . }} -o jsonpath="{.data.{{ ternary "password" (include "postgresql.adminPasswordKey" .) (and (not (empty $customUser)) (ne $customUser "postgres")) }}}" | base64 -d) - -{{- end }} - -To connect to your database run the following command: - - kubectl run {{ include "common.names.fullname" . }}-client --rm --tty -i --restart='Never' --namespace {{ .Release.Namespace }} --image {{ include "postgresql.image" . }} --env="PGPASSWORD=$POSTGRES_PASSWORD" \ - --command -- psql --host {{ include "postgresql.primary.fullname" . }} -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.database" . }} {{ include "postgresql.database" . }}{{- else }} postgres{{- end }} -p {{ include "postgresql.service.port" . }} - - > NOTE: If you access the container using bash, make sure that you execute "/opt/bitnami/scripts/postgresql/entrypoint.sh /bin/bash" in order to avoid the error "psql: local user with ID {{ .Values.primary.containerSecurityContext.runAsUser }}} does not exist" - -To connect to your database from outside the cluster execute the following commands: - -{{- if contains "NodePort" .Values.primary.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 "postgresql.primary.fullname" . }}) - PGPASSWORD="$POSTGRES_PASSWORD" psql --host $NODE_IP --port $NODE_PORT -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.database" . }} {{ include "postgresql.database" . }}{{- else }} postgres{{- end }} - -{{- else if contains "LoadBalancer" .Values.primary.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 "postgresql.primary.fullname" . }}' - - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "postgresql.primary.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}") - PGPASSWORD="$POSTGRES_PASSWORD" psql --host $SERVICE_IP --port {{ include "postgresql.service.port" . }} -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.database" . }} {{ include "postgresql.database" . }}{{- else }} postgres{{- end }} - -{{- else if contains "ClusterIP" .Values.primary.service.type }} - - kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "postgresql.primary.fullname" . }} {{ include "postgresql.service.port" . }}:{{ include "postgresql.service.port" . }} & - PGPASSWORD="$POSTGRES_PASSWORD" psql --host 127.0.0.1 -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.database" . }} {{ include "postgresql.database" . }}{{- else }} postgres{{- end }} -p {{ include "postgresql.service.port" . }} - -{{- end }} -{{- end }} - -WARNING: The configured password will be ignored on new installation in case when previous Posgresql release was deleted through the helm command. In that case, old PVC will have an old password, and setting it through helm won't take effect. Deleting persistent volumes (PVs) will solve the issue. - -{{- include "postgresql.validateValues" . -}} -{{- include "common.warnings.rollingTag" .Values.image -}} -{{- include "common.warnings.rollingTag" .Values.volumePermissions.image }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/postgresql/templates/_helpers.tpl deleted file mode 100644 index 818938064..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/_helpers.tpl +++ /dev/null @@ -1,399 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Create a default fully qualified app name for PostgreSQL Primary objects -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "postgresql.primary.fullname" -}} -{{- if eq .Values.architecture "replication" }} - {{- printf "%s-%s" (include "common.names.fullname" .) .Values.primary.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} - {{- include "common.names.fullname" . -}} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified app name for PostgreSQL read-only replicas objects -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "postgresql.readReplica.fullname" -}} -{{- printf "%s-%s" (include "common.names.fullname" .) .Values.readReplicas.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the default FQDN for PostgreSQL primary headless service -We truncate at 63 chars because of the DNS naming spec. -*/}} -{{- define "postgresql.primary.svc.headless" -}} -{{- printf "%s-hl" (include "postgresql.primary.fullname" .) | trunc 63 | trimSuffix "-" }} -{{- end -}} - -{{/* -Create the default FQDN for PostgreSQL read-only replicas headless service -We truncate at 63 chars because of the DNS naming spec. -*/}} -{{- define "postgresql.readReplica.svc.headless" -}} -{{- printf "%s-hl" (include "postgresql.readReplica.fullname" .) | trunc 63 | trimSuffix "-" }} -{{- end -}} - -{{/* -Return the proper PostgreSQL image name -*/}} -{{- define "postgresql.image" -}} -{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }} -{{- end -}} - -{{/* -Return the proper PostgreSQL metrics image name -*/}} -{{- define "postgresql.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 "postgresql.volumePermissions.image" -}} -{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "postgresql.imagePullSecrets" -}} -{{ include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.metrics.image .Values.volumePermissions.image) "global" .Values.global) }} -{{- end -}} - -{{/* -Return the name for a custom user to create -*/}} -{{- define "postgresql.username" -}} -{{- if .Values.global.postgresql.auth.username }} - {{- .Values.global.postgresql.auth.username -}} -{{- else -}} - {{- .Values.auth.username -}} -{{- end -}} -{{- end -}} - -{{/* -Return the name for a custom database to create -*/}} -{{- define "postgresql.database" -}} -{{- if .Values.global.postgresql.auth.database }} - {{- printf "%s" (tpl .Values.global.postgresql.auth.database $) -}} -{{- else if .Values.auth.database -}} - {{- printf "%s" (tpl .Values.auth.database $) -}} -{{- end -}} -{{- end -}} - -{{/* -Get the password secret. -*/}} -{{- define "postgresql.secretName" -}} -{{- if .Values.global.postgresql.auth.existingSecret }} - {{- printf "%s" (tpl .Values.global.postgresql.auth.existingSecret $) -}} -{{- else if .Values.auth.existingSecret -}} - {{- printf "%s" (tpl .Values.auth.existingSecret $) -}} -{{- else -}} - {{- printf "%s" (include "common.names.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Get the replication-password key. -*/}} -{{- define "postgresql.replicationPasswordKey" -}} -{{- if or .Values.global.postgresql.auth.existingSecret .Values.auth.existingSecret }} - {{- if .Values.global.postgresql.auth.secretKeys.replicationPasswordKey }} - {{- printf "%s" (tpl .Values.global.postgresql.auth.secretKeys.replicationPasswordKey $) -}} - {{- else if .Values.auth.secretKeys.replicationPasswordKey -}} - {{- printf "%s" (tpl .Values.auth.secretKeys.replicationPasswordKey $) -}} - {{- else -}} - {{- "replication-password" -}} - {{- end -}} -{{- else -}} - {{- "replication-password" -}} -{{- end -}} -{{- end -}} - -{{/* -Get the admin-password key. -*/}} -{{- define "postgresql.adminPasswordKey" -}} -{{- if or .Values.global.postgresql.auth.existingSecret .Values.auth.existingSecret }} - {{- if .Values.global.postgresql.auth.secretKeys.adminPasswordKey }} - {{- printf "%s" (tpl .Values.global.postgresql.auth.secretKeys.adminPasswordKey $) -}} - {{- else if .Values.auth.secretKeys.adminPasswordKey -}} - {{- printf "%s" (tpl .Values.auth.secretKeys.adminPasswordKey $) -}} - {{- end -}} -{{- else -}} - {{- "postgres-password" -}} -{{- end -}} -{{- end -}} - -{{/* -Get the user-password key. -*/}} -{{- define "postgresql.userPasswordKey" -}} -{{- if or .Values.global.postgresql.auth.existingSecret .Values.auth.existingSecret }} - {{- if or (empty (include "postgresql.username" .)) (eq (include "postgresql.username" .) "postgres") }} - {{- printf "%s" (include "postgresql.adminPasswordKey" .) -}} - {{- else -}} - {{- if .Values.global.postgresql.auth.secretKeys.userPasswordKey }} - {{- printf "%s" (tpl .Values.global.postgresql.auth.secretKeys.userPasswordKey $) -}} - {{- else if .Values.auth.secretKeys.userPasswordKey -}} - {{- printf "%s" (tpl .Values.auth.secretKeys.userPasswordKey $) -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- ternary "password" "postgres-password" (and (not (empty (include "postgresql.username" .))) (ne (include "postgresql.username" .) "postgres")) -}} -{{- end -}} -{{- end -}} - -{{/* -Return true if a secret object should be created -*/}} -{{- define "postgresql.createSecret" -}} -{{- if not (or .Values.global.postgresql.auth.existingSecret .Values.auth.existingSecret) -}} - {{- true -}} -{{- end -}} -{{- end -}} - -{{/* -Return PostgreSQL service port -*/}} -{{- define "postgresql.service.port" -}} -{{- if .Values.global.postgresql.service.ports.postgresql }} - {{- .Values.global.postgresql.service.ports.postgresql -}} -{{- else -}} - {{- .Values.primary.service.ports.postgresql -}} -{{- end -}} -{{- end -}} - -{{/* -Return PostgreSQL service port -*/}} -{{- define "postgresql.readReplica.service.port" -}} -{{- if .Values.global.postgresql.service.ports.postgresql }} - {{- .Values.global.postgresql.service.ports.postgresql -}} -{{- else -}} - {{- .Values.readReplicas.service.ports.postgresql -}} -{{- end -}} -{{- end -}} - -{{/* -Get the PostgreSQL primary configuration ConfigMap name. -*/}} -{{- define "postgresql.primary.configmapName" -}} -{{- if .Values.primary.existingConfigmap -}} - {{- printf "%s" (tpl .Values.primary.existingConfigmap $) -}} -{{- else -}} - {{- printf "%s-configuration" (include "postgresql.primary.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Return true if a configmap object should be created for PostgreSQL primary with the configuration -*/}} -{{- define "postgresql.primary.createConfigmap" -}} -{{- if and (or .Values.primary.configuration .Values.primary.pgHbaConfiguration) (not .Values.primary.existingConfigmap) }} - {{- true -}} -{{- else -}} -{{- end -}} -{{- end -}} - -{{/* -Get the PostgreSQL primary extended configuration ConfigMap name. -*/}} -{{- define "postgresql.primary.extendedConfigmapName" -}} -{{- if .Values.primary.existingExtendedConfigmap -}} - {{- printf "%s" (tpl .Values.primary.existingExtendedConfigmap $) -}} -{{- else -}} - {{- printf "%s-extended-configuration" (include "postgresql.primary.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Get the PostgreSQL read replica extended configuration ConfigMap name. -*/}} -{{- define "postgresql.readReplicas.extendedConfigmapName" -}} - {{- printf "%s-extended-configuration" (include "postgresql.readReplica.fullname" .) -}} -{{- end -}} - -{{/* -Return true if a configmap object should be created for PostgreSQL primary with the extended configuration -*/}} -{{- define "postgresql.primary.createExtendedConfigmap" -}} -{{- if and .Values.primary.extendedConfiguration (not .Values.primary.existingExtendedConfigmap) }} - {{- true -}} -{{- else -}} -{{- end -}} -{{- end -}} - -{{/* -Return true if a configmap object should be created for PostgreSQL read replica with the extended configuration -*/}} -{{- define "postgresql.readReplicas.createExtendedConfigmap" -}} -{{- if .Values.readReplicas.extendedConfiguration }} - {{- true -}} -{{- else -}} -{{- end -}} -{{- end -}} - -{{/* - Create the name of the service account to use - */}} -{{- define "postgresql.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return true if a configmap should be mounted with PostgreSQL configuration -*/}} -{{- define "postgresql.mountConfigurationCM" -}} -{{- if or .Values.primary.configuration .Values.primary.pgHbaConfiguration .Values.primary.existingConfigmap }} - {{- true -}} -{{- end -}} -{{- end -}} - -{{/* -Get the initialization scripts ConfigMap name. -*/}} -{{- define "postgresql.initdb.scriptsCM" -}} -{{- if .Values.primary.initdb.scriptsConfigMap -}} - {{- printf "%s" (tpl .Values.primary.initdb.scriptsConfigMap $) -}} -{{- else -}} - {{- printf "%s-init-scripts" (include "postgresql.primary.fullname" .) -}} -{{- end -}} -{{- end -}} - -{/* -Return true if TLS is enabled for LDAP connection -*/}} -{{- define "postgresql.ldap.tls.enabled" -}} -{{- if and (kindIs "string" .Values.ldap.tls) (not (empty .Values.ldap.tls)) }} - {{- true -}} -{{- else if and (kindIs "map" .Values.ldap.tls) .Values.ldap.tls.enabled }} - {{- true -}} -{{- end -}} -{{- end -}} - -{{/* -Get the readiness probe command -*/}} -{{- define "postgresql.readinessProbeCommand" -}} -{{- $customUser := include "postgresql.username" . }} -- | -{{- if (include "postgresql.database" .) }} - exec pg_isready -U {{ default "postgres" $customUser | quote }} -d "dbname={{ include "postgresql.database" . }} {{- if .Values.tls.enabled }} sslcert={{ include "postgresql.tlsCert" . }} sslkey={{ include "postgresql.tlsCertKey" . }}{{- end }}" -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }} -{{- else }} - exec pg_isready -U {{ default "postgres" $customUser | quote }} {{- if .Values.tls.enabled }} -d "sslcert={{ include "postgresql.tlsCert" . }} sslkey={{ include "postgresql.tlsCertKey" . }}"{{- end }} -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }} -{{- end }} -{{- if contains "bitnami/" .Values.image.repository }} - [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ] -{{- end -}} -{{- end -}} - -{{/* -Compile all warnings into a single message, and call fail. -*/}} -{{- define "postgresql.validateValues" -}} -{{- $messages := list -}} -{{- $messages := append $messages (include "postgresql.validateValues.ldapConfigurationMethod" .) -}} -{{- $messages := append $messages (include "postgresql.validateValues.psp" .) -}} -{{- $messages := without $messages "" -}} -{{- $message := join "\n" $messages -}} - -{{- if $message -}} -{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}} -{{- end -}} -{{- end -}} - -{{/* -Validate values of Postgresql - If ldap.url is used then you don't need the other settings for ldap -*/}} -{{- define "postgresql.validateValues.ldapConfigurationMethod" -}} -{{- if and .Values.ldap.enabled (and (not (empty .Values.ldap.url)) (not (empty .Values.ldap.server))) }} -postgresql: ldap.url, ldap.server - You cannot set both `ldap.url` and `ldap.server` at the same time. - Please provide a unique way to configure LDAP. - More info at https://www.postgresql.org/docs/current/auth-ldap.html -{{- end -}} -{{- end -}} - -{{/* -Validate values of Postgresql - If PSP is enabled RBAC should be enabled too -*/}} -{{- define "postgresql.validateValues.psp" -}} -{{- if and .Values.psp.create (not .Values.rbac.create) }} -postgresql: psp.create, rbac.create - RBAC should be enabled if PSP is enabled in order for PSP to work. - More info at https://kubernetes.io/docs/concepts/policy/pod-security-policy/#authorizing-policies -{{- end -}} -{{- end -}} - -{{/* -Return the path to the cert file. -*/}} -{{- define "postgresql.tlsCert" -}} -{{- if .Values.tls.autoGenerated }} - {{- printf "/opt/bitnami/postgresql/certs/tls.crt" -}} -{{- else -}} - {{- required "Certificate filename is required when TLS in enabled" .Values.tls.certFilename | printf "/opt/bitnami/postgresql/certs/%s" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the path to the cert key file. -*/}} -{{- define "postgresql.tlsCertKey" -}} -{{- if .Values.tls.autoGenerated }} - {{- printf "/opt/bitnami/postgresql/certs/tls.key" -}} -{{- else -}} -{{- required "Certificate Key filename is required when TLS in enabled" .Values.tls.certKeyFilename | printf "/opt/bitnami/postgresql/certs/%s" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the path to the CA cert file. -*/}} -{{- define "postgresql.tlsCACert" -}} -{{- if .Values.tls.autoGenerated }} - {{- printf "/opt/bitnami/postgresql/certs/ca.crt" -}} -{{- else -}} - {{- printf "/opt/bitnami/postgresql/certs/%s" .Values.tls.certCAFilename -}} -{{- end -}} -{{- end -}} - -{{/* -Return the path to the CRL file. -*/}} -{{- define "postgresql.tlsCRL" -}} -{{- if .Values.tls.crlFilename -}} -{{- printf "/opt/bitnami/postgresql/certs/%s" .Values.tls.crlFilename -}} -{{- end -}} -{{- end -}} - -{{/* -Return true if a TLS credentials secret object should be created -*/}} -{{- define "postgresql.createTlsSecret" -}} -{{- if and .Values.tls.autoGenerated (not .Values.tls.certificatesSecret) }} - {{- true -}} -{{- end -}} -{{- end -}} - -{{/* -Return the path to the CA cert file. -*/}} -{{- define "postgresql.tlsSecretName" -}} -{{- if .Values.tls.autoGenerated }} - {{- printf "%s-crt" (include "common.names.fullname" .) -}} -{{- else -}} - {{ required "A secret containing TLS certificates is required when TLS is enabled" .Values.tls.certificatesSecret }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/extra-list.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/extra-list.yaml deleted file mode 100644 index 9ac65f9e1..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/extra-list.yaml +++ /dev/null @@ -1,4 +0,0 @@ -{{- range .Values.extraDeploy }} ---- -{{ include "common.tplvalues.render" (dict "value" . "context" $) }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/networkpolicy-egress.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/networkpolicy-egress.yaml deleted file mode 100644 index e8621474b..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/networkpolicy-egress.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if and .Values.networkPolicy.enabled (or .Values.networkPolicy.egressRules.denyConnectionsToExternal .Values.networkPolicy.egressRules.customRules) }} -apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} -kind: NetworkPolicy -metadata: - name: {{ printf "%s-egress" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - policyTypes: - - Egress - egress: - {{- if .Values.networkPolicy.egressRules.denyConnectionsToExternal }} - - ports: - - port: 53 - protocol: UDP - - port: 53 - protocol: TCP - - to: - - namespaceSelector: {} - {{- end }} - {{- if .Values.networkPolicy.egressRules.customRules }} - {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.egressRules.customRules "context" $) | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/primary/configmap.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/primary/configmap.yaml deleted file mode 100644 index d654a2257..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/primary/configmap.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if (include "postgresql.primary.createConfigmap" .) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ printf "%s-configuration" (include "postgresql.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -data: - {{- if .Values.primary.configuration }} - postgresql.conf: |- - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.configuration "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.primary.pgHbaConfiguration }} - pg_hba.conf: | - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.pgHbaConfiguration "context" $ ) | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/primary/extended-configmap.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/primary/extended-configmap.yaml deleted file mode 100644 index d129bd3b2..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/primary/extended-configmap.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if (include "postgresql.primary.createExtendedConfigmap" .) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ printf "%s-extended-configuration" (include "postgresql.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -data: - override.conf: |- - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.extendedConfiguration "context" $ ) | nindent 4 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/primary/initialization-configmap.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/primary/initialization-configmap.yaml deleted file mode 100644 index d3d26cb8c..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/primary/initialization-configmap.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.primary.initdb.scripts (not .Values.primary.initdb.scriptsConfigMap) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ printf "%s-init-scripts" (include "postgresql.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -data: {{- include "common.tplvalues.render" (dict "value" .Values.primary.initdb.scripts "context" .) | nindent 2 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/primary/metrics-configmap.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/primary/metrics-configmap.yaml deleted file mode 100644 index 8ad2f35fc..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/primary/metrics-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.customMetrics }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ printf "%s-metrics" (include "postgresql.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -data: - custom-metrics.yaml: {{ toYaml .Values.metrics.customMetrics | quote }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/primary/metrics-svc.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/primary/metrics-svc.yaml deleted file mode 100644 index a38b52a8a..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/primary/metrics-svc.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.metrics.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ printf "%s-metrics" (include "postgresql.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.metrics.service.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} -spec: - type: ClusterIP - sessionAffinity: {{ .Values.metrics.service.sessionAffinity }} - {{- if .Values.metrics.service.clusterIP }} - clusterIP: {{ .Values.metrics.service.clusterIP }} - {{- end }} - ports: - - name: http-metrics - port: {{ .Values.metrics.service.ports.metrics }} - targetPort: http-metrics - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: primary -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/primary/networkpolicy.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/primary/networkpolicy.yaml deleted file mode 100644 index ce0052d48..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/primary/networkpolicy.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{{- if and .Values.networkPolicy.enabled (or .Values.networkPolicy.metrics.enabled .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.enabled) }} -apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} -kind: NetworkPolicy -metadata: - name: {{ printf "%s-ingress" (include "postgresql.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: primary - ingress: - {{- if and .Values.metrics.enabled .Values.networkPolicy.metrics.enabled (or .Values.networkPolicy.metrics.namespaceSelector .Values.networkPolicy.metrics.podSelector) }} - - from: - {{- if .Values.networkPolicy.metrics.namespaceSelector }} - - namespaceSelector: - matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.metrics.namespaceSelector "context" $) | nindent 14 }} - {{- end }} - {{- if .Values.networkPolicy.metrics.podSelector }} - - podSelector: - matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.metrics.podSelector "context" $) | nindent 14 }} - {{- end }} - ports: - - port: {{ .Values.metrics.containerPorts.metrics }} - {{- end }} - {{- if and .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.enabled (or .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.namespaceSelector .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.podSelector) }} - - from: - {{- if .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.namespaceSelector }} - - namespaceSelector: - matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.namespaceSelector "context" $) | nindent 14 }} - {{- end }} - {{- if .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.podSelector }} - - podSelector: - matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.podSelector "context" $) | nindent 14 }} - {{- end }} - ports: - - port: {{ .Values.containerPorts.postgresql }} - {{- end }} - {{- if and .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.enabled (eq .Values.architecture "replication") }} - - from: - - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} - app.kubernetes.io/component: read - ports: - - port: {{ .Values.containerPorts.postgresql }} - {{- end }} - {{- if .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.customRules }} - {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.customRules "context" $) | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/primary/servicemonitor.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/primary/servicemonitor.yaml deleted file mode 100644 index c4a19fe05..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/primary/servicemonitor.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "postgresql.primary.fullname" . }} - namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: metrics - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - {{- if .Values.metrics.serviceMonitor.jobLabel }} - jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }} - {{- end }} - selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - {{- if .Values.metrics.serviceMonitor.selector }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} - {{- end }} - app.kubernetes.io/component: metrics - endpoints: - - port: http-metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 6 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 6 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.honorLabels }} - honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }} - {{- end }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace | quote }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/primary/statefulset.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/primary/statefulset.yaml deleted file mode 100644 index 0e312ea63..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/primary/statefulset.yaml +++ /dev/null @@ -1,640 +0,0 @@ -{{- $customUser := include "postgresql.username" . }} -apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ include "postgresql.primary.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.primary.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.primary.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.primary.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} -spec: - replicas: 1 - serviceName: {{ include "postgresql.primary.svc.headless" . }} - {{- if .Values.primary.updateStrategy }} - updateStrategy: {{- toYaml .Values.primary.updateStrategy | nindent 4 }} - {{- end }} - selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: primary - template: - metadata: - name: {{ include "postgresql.primary.fullname" . }} - labels: {{- include "common.labels.standard" . | nindent 8 }} - app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.primary.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.podLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if or (include "postgresql.primary.createConfigmap" .) (include "postgresql.primary.createExtendedConfigmap" .) .Values.primary.podAnnotations }} - annotations: - {{- if (include "postgresql.primary.createConfigmap" .) }} - checksum/configuration: {{ include (print $.Template.BasePath "/primary/configmap.yaml") . | sha256sum }} - {{- end }} - {{- if (include "postgresql.primary.createExtendedConfigmap" .) }} - checksum/extended-configuration: {{ include (print $.Template.BasePath "/primary/extended-configmap.yaml") . | sha256sum }} - {{- end }} - {{- if .Values.primary.podAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.podAnnotations "context" $ ) | nindent 8 }} - {{- end }} - {{- end }} - spec: - {{- if .Values.primary.extraPodSpec }} - {{- include "common.tplvalues.render" (dict "value" .Values.primary.extraPodSpec "context" $) | nindent 6 }} - {{- end }} - serviceAccountName: {{ include "postgresql.serviceAccountName" . }} - {{- include "postgresql.imagePullSecrets" . | nindent 6 }} - {{- if .Values.primary.hostAliases }} - hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.primary.hostAliases "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.primary.affinity }} - affinity: {{- include "common.tplvalues.render" (dict "value" .Values.primary.affinity "context" $) | nindent 8 }} - {{- else }} - affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAffinityPreset "component" "primary" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAntiAffinityPreset "component" "primary" "context" $) | nindent 10 }} - nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.primary.nodeAffinityPreset.type "key" .Values.primary.nodeAffinityPreset.key "values" .Values.primary.nodeAffinityPreset.values) | nindent 10 }} - {{- end }} - {{- if .Values.primary.nodeSelector }} - nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.primary.nodeSelector "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.primary.tolerations }} - tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.primary.tolerations "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.primary.topologySpreadConstraints }} - topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.primary.topologySpreadConstraints "context" .) | nindent 8 }} - {{- end }} - {{- if .Values.primary.priorityClassName }} - priorityClassName: {{ .Values.primary.priorityClassName }} - {{- end }} - {{- if .Values.primary.schedulerName }} - schedulerName: {{ .Values.primary.schedulerName | quote }} - {{- end }} - {{- if .Values.primary.terminationGracePeriodSeconds }} - terminationGracePeriodSeconds: {{ .Values.primary.terminationGracePeriodSeconds }} - {{- end }} - {{- if .Values.primary.podSecurityContext.enabled }} - securityContext: {{- omit .Values.primary.podSecurityContext "enabled" | toYaml | nindent 8 }} - {{- end }} - hostNetwork: {{ .Values.primary.hostNetwork }} - hostIPC: {{ .Values.primary.hostIPC }} - {{- if or (and .Values.tls.enabled (not .Values.volumePermissions.enabled)) (and .Values.volumePermissions.enabled (or .Values.primary.persistence.enabled .Values.shmVolume.enabled)) .Values.primary.initContainers }} - initContainers: - {{- if and .Values.tls.enabled (not .Values.volumePermissions.enabled) }} - - name: copy-certs - image: {{ include "postgresql.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - {{- if .Values.primary.resources }} - resources: {{- toYaml .Values.primary.resources | nindent 12 }} - {{- end }} - # We don't require a privileged container in this case - {{- if .Values.primary.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.primary.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - command: - - /bin/sh - - -ec - - | - cp /tmp/certs/* /opt/bitnami/postgresql/certs/ - chmod 600 {{ include "postgresql.tlsCertKey" . }} - volumeMounts: - - name: raw-certificates - mountPath: /tmp/certs - - name: postgresql-certificates - mountPath: /opt/bitnami/postgresql/certs - {{- else if and .Values.volumePermissions.enabled (or .Values.primary.persistence.enabled .Values.shmVolume.enabled) }} - - name: init-chmod-data - image: {{ include "postgresql.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - {{- if .Values.volumePermissions.resources }} - resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }} - {{- end }} - command: - - /bin/sh - - -ec - - | - {{- if .Values.primary.persistence.enabled }} - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - chown `id -u`:`id -G | cut -d " " -f2` {{ .Values.primary.persistence.mountPath }} - {{- else }} - chown {{ .Values.primary.containerSecurityContext.runAsUser }}:{{ .Values.primary.podSecurityContext.fsGroup }} {{ .Values.primary.persistence.mountPath }} - {{- end }} - mkdir -p {{ .Values.primary.persistence.mountPath }}/data {{- if (include "postgresql.mountConfigurationCM" .) }} {{ .Values.primary.persistence.mountPath }}/conf {{- end }} - chmod 700 {{ .Values.primary.persistence.mountPath }}/data {{- if (include "postgresql.mountConfigurationCM" .) }} {{ .Values.primary.persistence.mountPath }}/conf {{- end }} - find {{ .Values.primary.persistence.mountPath }} -mindepth 1 -maxdepth 1 {{- if not (include "postgresql.mountConfigurationCM" .) }} -not -name "conf" {{- end }} -not -name ".snapshot" -not -name "lost+found" | \ - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - xargs -r chown -R `id -u`:`id -G | cut -d " " -f2` - {{- else }} - xargs -r chown -R {{ .Values.primary.containerSecurityContext.runAsUser }}:{{ .Values.primary.podSecurityContext.fsGroup }} - {{- end }} - {{- end }} - {{- if .Values.shmVolume.enabled }} - chmod -R 777 /dev/shm - {{- end }} - {{- if .Values.tls.enabled }} - cp /tmp/certs/* /opt/bitnami/postgresql/certs/ - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - chown -R `id -u`:`id -G | cut -d " " -f2` /opt/bitnami/postgresql/certs/ - {{- else }} - chown -R {{ .Values.primary.containerSecurityContext.runAsUser }}:{{ .Values.primary.podSecurityContext.fsGroup }} /opt/bitnami/postgresql/certs/ - {{- end }} - chmod 600 {{ include "postgresql.tlsCertKey" . }} - {{- end }} - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - securityContext: {{- omit .Values.volumePermissions.containerSecurityContext "runAsUser" | toYaml | nindent 12 }} - {{- else }} - securityContext: {{- .Values.volumePermissions.containerSecurityContext | toYaml | nindent 12 }} - {{- end }} - volumeMounts: - {{- if .Values.primary.persistence.enabled }} - - name: data - mountPath: {{ .Values.primary.persistence.mountPath }} - {{- if .Values.primary.persistence.subPath }} - subPath: {{ .Values.primary.persistence.subPath }} - {{- end }} - {{- end }} - {{- if .Values.shmVolume.enabled }} - - name: dshm - mountPath: /dev/shm - {{- end }} - {{- if .Values.tls.enabled }} - - name: raw-certificates - mountPath: /tmp/certs - - name: postgresql-certificates - mountPath: /opt/bitnami/postgresql/certs - {{- end }} - {{- end }} - {{- if .Values.primary.initContainers }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.initContainers "context" $ ) | nindent 8 }} - {{- end }} - {{- end }} - containers: - - name: postgresql - image: {{ include "postgresql.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - {{- if .Values.primary.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.primary.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} - {{- else if .Values.primary.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.primary.command "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} - {{- else if .Values.primary.args }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.primary.args "context" $) | nindent 12 }} - {{- end }} - env: - - name: BITNAMI_DEBUG - value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }} - - name: POSTGRESQL_PORT_NUMBER - value: {{ .Values.containerPorts.postgresql | quote }} - - name: POSTGRESQL_VOLUME_DIR - value: {{ .Values.primary.persistence.mountPath | quote }} - {{- if .Values.primary.persistence.mountPath }} - - name: PGDATA - value: {{ .Values.postgresqlDataDir | quote }} - {{- end }} - # Authentication - {{- if and (not (empty $customUser)) (ne $customUser "postgres") }} - - name: POSTGRES_USER - value: {{ $customUser | quote }} - {{- if .Values.auth.enablePostgresUser }} - {{- if .Values.auth.usePasswordFiles }} - - name: POSTGRES_POSTGRES_PASSWORD_FILE - value: "/opt/bitnami/postgresql/secrets/postgres-password" - {{- else }} - - name: POSTGRES_POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "postgresql.secretName" . }} - key: {{ include "postgresql.adminPasswordKey" . }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.auth.usePasswordFiles }} - - name: POSTGRES_PASSWORD_FILE - value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (ternary "password" "postgres-password" (and (not (empty $customUser)) (ne $customUser "postgres"))) }} - {{- else }} - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "postgresql.secretName" . }} - key: {{ include "postgresql.userPasswordKey" . }} - {{- end }} - {{- if (include "postgresql.database" .) }} - - name: POSTGRES_DB - value: {{ (include "postgresql.database" .) | quote }} - {{- end }} - # Replication - {{- if or (eq .Values.architecture "replication") .Values.primary.standby.enabled }} - - name: POSTGRES_REPLICATION_MODE - value: {{ ternary "slave" "master" .Values.primary.standby.enabled | quote }} - - name: POSTGRES_REPLICATION_USER - value: {{ .Values.auth.replicationUsername | quote }} - {{- if .Values.auth.usePasswordFiles }} - - name: POSTGRES_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/postgresql/secrets/replication-password" - {{- else }} - - name: POSTGRES_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "postgresql.secretName" . }} - key: {{ include "postgresql.replicationPasswordKey" . }} - {{- end }} - {{- if not (eq .Values.replication.synchronousCommit "off") }} - - name: POSTGRES_SYNCHRONOUS_COMMIT_MODE - value: {{ .Values.replication.synchronousCommit | quote }} - - name: POSTGRES_NUM_SYNCHRONOUS_REPLICAS - value: {{ .Values.replication.numSynchronousReplicas | quote }} - {{- end }} - - name: POSTGRES_CLUSTER_APP_NAME - value: {{ .Values.replication.applicationName }} - {{- end }} - # Initdb - {{- if .Values.primary.initdb.args }} - - name: POSTGRES_INITDB_ARGS - value: {{ .Values.primary.initdb.args | quote }} - {{- end }} - {{- if .Values.primary.initdb.postgresqlWalDir }} - - name: POSTGRES_INITDB_WALDIR - value: {{ .Values.primary.initdb.postgresqlWalDir | quote }} - {{- end }} - {{- if .Values.primary.initdb.user }} - - name: POSTGRESQL_INITSCRIPTS_USERNAME - value: {{ .Values.primary.initdb.user }} - {{- end }} - {{- if .Values.primary.initdb.password }} - - name: POSTGRESQL_INITSCRIPTS_PASSWORD - value: {{ .Values.primary.initdb.password | quote }} - {{- end }} - # Standby - {{- if .Values.primary.standby.enabled }} - - name: POSTGRES_MASTER_HOST - value: {{ .Values.primary.standby.primaryHost }} - - name: POSTGRES_MASTER_PORT_NUMBER - value: {{ .Values.primary.standby.primaryPort | quote }} - {{- end }} - # LDAP - - name: POSTGRESQL_ENABLE_LDAP - value: {{ ternary "yes" "no" .Values.ldap.enabled | quote }} - {{- if .Values.ldap.enabled }} - {{- if or .Values.ldap.url .Values.ldap.uri }} - - name: POSTGRESQL_LDAP_URL - value: {{ coalesce .Values.ldap.url .Values.ldap.uri }} - {{- else }} - - name: POSTGRESQL_LDAP_SERVER - value: {{ .Values.ldap.server }} - - name: POSTGRESQL_LDAP_PORT - value: {{ .Values.ldap.port | quote }} - - name: POSTGRESQL_LDAP_SCHEME - value: {{ .Values.ldap.scheme }} - {{- if (include "postgresql.ldap.tls.enabled" .) }} - - name: POSTGRESQL_LDAP_TLS - value: "1" - {{- end }} - - name: POSTGRESQL_LDAP_PREFIX - value: {{ .Values.ldap.prefix | quote }} - - name: POSTGRESQL_LDAP_SUFFIX - value: {{ .Values.ldap.suffix | quote }} - - name: POSTGRESQL_LDAP_BASE_DN - value: {{ coalesce .Values.ldap.baseDN .Values.ldap.basedn }} - - name: POSTGRESQL_LDAP_BIND_DN - value: {{ coalesce .Values.ldap.bindDN .Values.ldap.binddn}} - {{- if or (not (empty .Values.ldap.bind_password)) (not (empty .Values.ldap.bindpw)) }} - - name: POSTGRESQL_LDAP_BIND_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "postgresql.secretName" . }} - key: ldap-password - {{- end }} - - name: POSTGRESQL_LDAP_SEARCH_ATTR - value: {{ coalesce .Values.ldap.search_attr .Values.ldap.searchAttribute }} - - name: POSTGRESQL_LDAP_SEARCH_FILTER - value: {{ coalesce .Values.ldap.search_filter .Values.ldap.searchFilter }} - {{- end }} - {{- end }} - # TLS - - name: POSTGRESQL_ENABLE_TLS - value: {{ ternary "yes" "no" .Values.tls.enabled | quote }} - {{- if .Values.tls.enabled }} - - name: POSTGRESQL_TLS_PREFER_SERVER_CIPHERS - value: {{ ternary "yes" "no" .Values.tls.preferServerCiphers | quote }} - - name: POSTGRESQL_TLS_CERT_FILE - value: {{ include "postgresql.tlsCert" . }} - - name: POSTGRESQL_TLS_KEY_FILE - value: {{ include "postgresql.tlsCertKey" . }} - {{- if .Values.tls.certCAFilename }} - - name: POSTGRESQL_TLS_CA_FILE - value: {{ include "postgresql.tlsCACert" . }} - {{- end }} - {{- if .Values.tls.crlFilename }} - - name: POSTGRESQL_TLS_CRL_FILE - value: {{ include "postgresql.tlsCRL" . }} - {{- end }} - {{- end }} - # Audit - - name: POSTGRESQL_LOG_HOSTNAME - value: {{ .Values.audit.logHostname | quote }} - - name: POSTGRESQL_LOG_CONNECTIONS - value: {{ .Values.audit.logConnections | quote }} - - name: POSTGRESQL_LOG_DISCONNECTIONS - value: {{ .Values.audit.logDisconnections | quote }} - {{- if .Values.audit.logLinePrefix }} - - name: POSTGRESQL_LOG_LINE_PREFIX - value: {{ .Values.audit.logLinePrefix | quote }} - {{- end }} - {{- if .Values.audit.logTimezone }} - - name: POSTGRESQL_LOG_TIMEZONE - value: {{ .Values.audit.logTimezone | quote }} - {{- end }} - {{- if .Values.audit.pgAuditLog }} - - name: POSTGRESQL_PGAUDIT_LOG - value: {{ .Values.audit.pgAuditLog | quote }} - {{- end }} - - name: POSTGRESQL_PGAUDIT_LOG_CATALOG - value: {{ .Values.audit.pgAuditLogCatalog | quote }} - # Others - - name: POSTGRESQL_CLIENT_MIN_MESSAGES - value: {{ .Values.audit.clientMinMessages | quote }} - - name: POSTGRESQL_SHARED_PRELOAD_LIBRARIES - value: {{ .Values.postgresqlSharedPreloadLibraries | quote }} - {{- if .Values.primary.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.primary.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - {{- if or .Values.primary.extraEnvVarsCM .Values.primary.extraEnvVarsSecret }} - envFrom: - {{- if .Values.primary.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.primary.extraEnvVarsCM }} - {{- end }} - {{- if .Values.primary.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.primary.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: tcp-postgresql - containerPort: {{ .Values.containerPorts.postgresql }} - {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.primary.customStartupProbe }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.primary.customStartupProbe "context" $) | nindent 12 }} - {{- else if .Values.primary.startupProbe.enabled }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.primary.startupProbe "enabled") "context" $) | nindent 12 }} - exec: - command: - - /bin/sh - - -c - {{- if (include "postgresql.database" .) }} - - exec pg_isready -U {{ default "postgres" $customUser | quote }} -d "dbname={{ include "postgresql.database" . }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} sslcert={{ include "postgresql.tlsCert" . }} sslkey={{ include "postgresql.tlsCertKey" . }}{{- end }}" -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }} - {{- else }} - - exec pg_isready -U {{ default "postgres" $customUser | quote }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} -d "sslcert={{ include "postgresql.tlsCert" . }} sslkey={{ include "postgresql.tlsCertKey" . }}"{{- end }} -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }} - {{- end }} - {{- end }} - {{- if .Values.primary.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.primary.customLivenessProbe "context" $) | nindent 12 }} - {{- else if .Values.primary.livenessProbe.enabled }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.primary.livenessProbe "enabled") "context" $) | nindent 12 }} - exec: - command: - - /bin/sh - - -c - {{- if (include "postgresql.database" .) }} - - exec pg_isready -U {{ default "postgres" $customUser | quote }} -d "dbname={{ include "postgresql.database" . }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} sslcert={{ include "postgresql.tlsCert" . }} sslkey={{ include "postgresql.tlsCertKey" . }}{{- end }}" -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }} - {{- else }} - - exec pg_isready -U {{ default "postgres" $customUser | quote }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} -d "sslcert={{ include "postgresql.tlsCert" . }} sslkey={{ include "postgresql.tlsCertKey" . }}"{{- end }} -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }} - {{- end }} - {{- end }} - {{- if .Values.primary.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.primary.customReadinessProbe "context" $) | nindent 12 }} - {{- else if .Values.primary.readinessProbe.enabled }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.primary.readinessProbe "enabled") "context" $) | nindent 12 }} - exec: - command: - - /bin/sh - - -c - - -e - {{- include "postgresql.readinessProbeCommand" . | nindent 16 }} - {{- end }} - {{- end }} - {{- if .Values.primary.resources }} - resources: {{- toYaml .Values.primary.resources | nindent 12 }} - {{- end }} - {{- if .Values.primary.lifecycleHooks }} - lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.primary.lifecycleHooks "context" $) | nindent 12 }} - {{- end }} - volumeMounts: - {{- if or .Values.primary.initdb.scriptsConfigMap .Values.primary.initdb.scripts }} - - name: custom-init-scripts - mountPath: /docker-entrypoint-initdb.d/ - {{- end }} - {{- if .Values.primary.initdb.scriptsSecret }} - - name: custom-init-scripts-secret - mountPath: /docker-entrypoint-initdb.d/secret - {{- end }} - {{- if or .Values.primary.extendedConfiguration .Values.primary.existingExtendedConfigmap }} - - name: postgresql-extended-config - mountPath: /bitnami/postgresql/conf/conf.d/ - {{- end }} - {{- if .Values.auth.usePasswordFiles }} - - name: postgresql-password - mountPath: /opt/bitnami/postgresql/secrets/ - {{- end }} - {{- if .Values.tls.enabled }} - - name: postgresql-certificates - mountPath: /opt/bitnami/postgresql/certs - readOnly: true - {{- end }} - {{- if .Values.shmVolume.enabled }} - - name: dshm - mountPath: /dev/shm - {{- end }} - {{- if .Values.primary.persistence.enabled }} - - name: data - mountPath: {{ .Values.primary.persistence.mountPath }} - {{- if .Values.primary.persistence.subPath }} - subPath: {{ .Values.primary.persistence.subPath }} - {{- end }} - {{- end }} - {{- if or .Values.primary.configuration .Values.primary.pgHbaConfiguration .Values.primary.existingConfigmap }} - - name: postgresql-config - mountPath: /bitnami/postgresql/conf - {{- end }} - {{- if .Values.primary.extraVolumeMounts }} - {{- include "common.tplvalues.render" (dict "value" .Values.primary.extraVolumeMounts "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ include "postgresql.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - {{- if .Values.metrics.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.metrics.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- 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.metrics.customMetrics }} - args: ["--extend.query-path", "/conf/custom-metrics.yaml"] - {{- end }} - env: - {{- $database := required "In order to enable metrics you need to specify a database (.Values.auth.database or .Values.global.postgresql.auth.database)" (include "postgresql.database" .) }} - - name: DATA_SOURCE_URI - value: {{ printf "127.0.0.1:%d/%s?sslmode=disable" (int (include "postgresql.service.port" .)) $database }} - {{- if .Values.auth.usePasswordFiles }} - - name: DATA_SOURCE_PASS_FILE - value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (ternary "password" "postgres-password" (and (not (empty $customUser)) (ne $customUser "postgres"))) }} - {{- else }} - - name: DATA_SOURCE_PASS - valueFrom: - secretKeyRef: - name: {{ include "postgresql.secretName" . }} - key: {{ include "postgresql.userPasswordKey" . }} - {{- end }} - - name: DATA_SOURCE_USER - value: {{ default "postgres" $customUser | quote }} - {{- if .Values.metrics.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: {{ .Values.metrics.containerPorts.metrics }} - {{- if not .Values.diagnosticMode.enabled }} - {{- 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: http-metrics - {{- end }} - {{- 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 }} - httpGet: - path: / - port: http-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: / - port: http-metrics - {{- end }} - {{- end }} - volumeMounts: - {{- if .Values.auth.usePasswordFiles }} - - name: postgresql-password - mountPath: /opt/bitnami/postgresql/secrets/ - {{- end }} - {{- if .Values.metrics.customMetrics }} - - name: custom-metrics - mountPath: /conf - readOnly: true - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{- toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.primary.sidecars }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.sidecars "context" $ ) | nindent 8 }} - {{- end }} - volumes: - {{- if or .Values.primary.configuration .Values.primary.pgHbaConfiguration .Values.primary.existingConfigmap }} - - name: postgresql-config - configMap: - name: {{ include "postgresql.primary.configmapName" . }} - {{- end }} - {{- if or .Values.primary.extendedConfiguration .Values.primary.existingExtendedConfigmap }} - - name: postgresql-extended-config - configMap: - name: {{ include "postgresql.primary.extendedConfigmapName" . }} - {{- end }} - {{- if .Values.auth.usePasswordFiles }} - - name: postgresql-password - secret: - secretName: {{ include "postgresql.secretName" . }} - {{- end }} - {{- if or .Values.primary.initdb.scriptsConfigMap .Values.primary.initdb.scripts }} - - name: custom-init-scripts - configMap: - name: {{ include "postgresql.initdb.scriptsCM" . }} - {{- end }} - {{- if .Values.primary.initdb.scriptsSecret }} - - name: custom-init-scripts-secret - secret: - secretName: {{ tpl .Values.primary.initdb.scriptsSecret $ }} - {{- end }} - {{- if .Values.tls.enabled }} - - name: raw-certificates - secret: - secretName: {{ include "postgresql.tlsSecretName" . }} - - name: postgresql-certificates - emptyDir: {} - {{- end }} - {{- if .Values.primary.extraVolumes }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.extraVolumes "context" $ ) | nindent 8 }} - {{- end }} - {{- if and .Values.metrics.enabled .Values.metrics.customMetrics }} - - name: custom-metrics - configMap: - name: {{ printf "%s-metrics" (include "postgresql.primary.fullname" .) }} - {{- end }} - {{- if .Values.shmVolume.enabled }} - - name: dshm - emptyDir: - medium: Memory - {{- if .Values.shmVolume.sizeLimit }} - sizeLimit: {{ .Values.shmVolume.sizeLimit }} - {{- end }} - {{- end }} - {{- if and .Values.primary.persistence.enabled .Values.primary.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ tpl .Values.primary.persistence.existingClaim $ }} - {{- else if not .Values.primary.persistence.enabled }} - - name: data - emptyDir: {} - {{- else }} - volumeClaimTemplates: - - metadata: - name: data - {{- if .Values.primary.persistence.annotations }} - annotations: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.annotations "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.primary.persistence.labels }} - labels: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.labels "context" $) | nindent 10 }} - {{- end }} - spec: - accessModes: - {{- range .Values.primary.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - {{- if .Values.primary.persistence.dataSource }} - dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.dataSource "context" $) | nindent 10 }} - {{- end }} - resources: - requests: - storage: {{ .Values.primary.persistence.size | quote }} - {{- if .Values.primary.persistence.selector }} - selector: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.selector "context" $) | nindent 10 }} - {{- end }} - {{- include "common.storage.class" (dict "persistence" .Values.primary.persistence "global" .Values.global) | nindent 8 }} - {{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/primary/svc-headless.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/primary/svc-headless.yaml deleted file mode 100644 index 684177a5c..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/primary/svc-headless.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "postgresql.primary.svc.headless" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - app.kubernetes.io/component: primary - {{- if or .Values.primary.service.headless.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.primary.service.headless.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.service.headless.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} - # Use this annotation in addition to the actual publishNotReadyAddresses - # field below because the annotation will stop being respected soon but the - # field is broken in some versions of Kubernetes: - # https://github.com/kubernetes/kubernetes/issues/58662 - service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" -spec: - type: ClusterIP - clusterIP: None - # We want all pods in the StatefulSet to have their addresses published for - # the sake of the other Postgresql pods even before they're ready, since they - # have to be able to talk to each other in order to become ready. - publishNotReadyAddresses: true - ports: - - name: tcp-postgresql - port: {{ template "postgresql.service.port" . }} - targetPort: tcp-postgresql - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: primary diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/primary/svc.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/primary/svc.yaml deleted file mode 100644 index 6ddd55b7b..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/primary/svc.yaml +++ /dev/null @@ -1,53 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "postgresql.primary.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - app.kubernetes.io/component: primary - {{- if or .Values.commonAnnotations .Values.primary.service.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.primary.service.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.annotations "context" $) | nindent 4 }} - {{- end }} - {{- end }} -spec: - type: {{ .Values.primary.service.type }} - {{- if or (eq .Values.primary.service.type "LoadBalancer") (eq .Values.primary.service.type "NodePort") }} - externalTrafficPolicy: {{ .Values.primary.service.externalTrafficPolicy | quote }} - {{- end }} - {{- if and (eq .Values.primary.service.type "LoadBalancer") (not (empty .Values.primary.service.loadBalancerSourceRanges)) }} - loadBalancerSourceRanges: {{ .Values.primary.service.loadBalancerSourceRanges }} - {{- end }} - {{- if and (eq .Values.primary.service.type "LoadBalancer") (not (empty .Values.primary.service.loadBalancerIP)) }} - loadBalancerIP: {{ .Values.primary.service.loadBalancerIP }} - {{- end }} - {{- if and .Values.primary.service.clusterIP (eq .Values.primary.service.type "ClusterIP") }} - clusterIP: {{ .Values.primary.service.clusterIP }} - {{- end }} - {{- if .Values.primary.service.sessionAffinity }} - sessionAffinity: {{ .Values.primary.service.sessionAffinity }} - {{- end }} - {{- if .Values.primary.service.sessionAffinityConfig }} - sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.sessionAffinityConfig "context" $) | nindent 4 }} - {{- end }} - ports: - - name: tcp-postgresql - port: {{ template "postgresql.service.port" . }} - targetPort: tcp-postgresql - {{- if and (or (eq .Values.primary.service.type "NodePort") (eq .Values.primary.service.type "LoadBalancer")) (not (empty .Values.primary.service.nodePorts.postgresql)) }} - nodePort: {{ .Values.primary.service.nodePorts.postgresql }} - {{- else if eq .Values.primary.service.type "ClusterIP" }} - nodePort: null - {{- end }} - {{- if .Values.primary.service.extraPorts }} - {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.extraPorts "context" $) | nindent 4 }} - {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: primary diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/prometheusrule.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/prometheusrule.yaml deleted file mode 100644 index 24be7100b..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/prometheusrule.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - name: {{ include "common.names.fullname" . }} - namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.prometheusRule.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - groups: - - name: {{ include "common.names.fullname" . }} - rules: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 8 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/psp.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/psp.yaml deleted file mode 100644 index 48d11754d..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/psp.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- $pspAvailable := (semverCompare "<1.25-0" (include "common.capabilities.kubeVersion" .)) -}} -{{- if and $pspAvailable .Values.psp.create }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ include "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - privileged: false - volumes: - - 'configMap' - - 'secret' - - 'persistentVolumeClaim' - - 'emptyDir' - - 'projected' - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'RunAsAny' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - readOnlyRootFilesystem: false -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/read/extended-configmap.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/read/extended-configmap.yaml deleted file mode 100644 index e329d1385..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/read/extended-configmap.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if (include "postgresql.readReplicas.createExtendedConfigmap" .) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ printf "%s-extended-configuration" (include "postgresql.readReplica.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: read - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -data: - override.conf: |- - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.extendedConfiguration "context" $ ) | nindent 4 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/read/metrics-configmap.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/read/metrics-configmap.yaml deleted file mode 100644 index b00a6eccb..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/read/metrics-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.customMetrics (eq .Values.architecture "replication") }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ printf "%s-metrics" (include "postgresql.readReplica.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -data: - custom-metrics.yaml: {{ toYaml .Values.metrics.customMetrics | quote }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/read/metrics-svc.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/read/metrics-svc.yaml deleted file mode 100644 index 6f54ed243..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/read/metrics-svc.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if and .Values.metrics.enabled (eq .Values.architecture "replication") }} -apiVersion: v1 -kind: Service -metadata: - name: {{ printf "%s-metrics" (include "postgresql.readReplica.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: metrics-read - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.metrics.service.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} -spec: - type: ClusterIP - sessionAffinity: {{ .Values.metrics.service.sessionAffinity }} - {{- if .Values.metrics.service.clusterIP }} - clusterIP: {{ .Values.metrics.service.clusterIP }} - {{- end }} - ports: - - name: http-metrics - port: {{ .Values.metrics.service.ports.metrics }} - targetPort: http-metrics - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: read -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/read/networkpolicy.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/read/networkpolicy.yaml deleted file mode 100644 index c969cd7a7..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/read/networkpolicy.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if and .Values.networkPolicy.enabled (eq .Values.architecture "replication") .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.enabled }} -apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} -kind: NetworkPolicy -metadata: - name: {{ printf "%s-ingress" (include "postgresql.readReplica.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: read - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: read - ingress: - {{- if and .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.enabled (or .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.namespaceSelector .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.podSelector) }} - - from: - {{- if .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.namespaceSelector }} - - namespaceSelector: - matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.namespaceSelector "context" $) | nindent 14 }} - {{- end }} - {{- if .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.podSelector }} - - podSelector: - matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.podSelector "context" $) | nindent 14 }} - {{- end }} - ports: - - port: {{ .Values.containerPorts.postgresql }} - {{- end }} - {{- if .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.customRules }} - {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.customRules "context" $) | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/read/servicemonitor.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/read/servicemonitor.yaml deleted file mode 100644 index d511d6beb..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/read/servicemonitor.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled (eq .Values.architecture "replication") }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "postgresql.readReplica.fullname" . }} - namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: metrics-read - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - {{- if .Values.metrics.serviceMonitor.jobLabel }} - jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }} - {{- end }} - selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - {{- if .Values.metrics.serviceMonitor.selector }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} - {{- end }} - app.kubernetes.io/component: metrics-read - endpoints: - - port: http-metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 6 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 6 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.honorLabels }} - honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }} - {{- end }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace | quote }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/read/statefulset.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/read/statefulset.yaml deleted file mode 100644 index 6d35e4747..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/read/statefulset.yaml +++ /dev/null @@ -1,537 +0,0 @@ -{{- if eq .Values.architecture "replication" }} -{{- $customUser := include "postgresql.username" . }} -apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ include "postgresql.readReplica.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: read - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.readReplicas.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.readReplicas.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.readReplicas.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} -spec: - replicas: {{ .Values.readReplicas.replicaCount }} - serviceName: {{ include "postgresql.readReplica.svc.headless" . }} - {{- if .Values.readReplicas.updateStrategy }} - updateStrategy: {{- toYaml .Values.readReplicas.updateStrategy | nindent 4 }} - {{- end }} - selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: read - template: - metadata: - name: {{ include "postgresql.readReplica.fullname" . }} - labels: {{- include "common.labels.standard" . | nindent 8 }} - app.kubernetes.io/component: read - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.readReplicas.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.podLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if or (include "postgresql.readReplicas.createExtendedConfigmap" .) .Values.readReplicas.podAnnotations }} - annotations: - {{- if (include "postgresql.readReplicas.createExtendedConfigmap" .) }} - checksum/extended-configuration: {{ include (print $.Template.BasePath "/read/extended-configmap.yaml") . | sha256sum }} - {{- end }} - {{- if .Values.readReplicas.podAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.podAnnotations "context" $ ) | nindent 8 }} - {{- end }} - {{- end }} - spec: - {{- if .Values.readReplicas.extraPodSpec }} - {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.extraPodSpec "context" $) | nindent 6 }} - {{- end }} - serviceAccountName: {{ include "postgresql.serviceAccountName" . }} - {{- include "postgresql.imagePullSecrets" . | nindent 6 }} - {{- if .Values.readReplicas.hostAliases }} - hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.hostAliases "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.readReplicas.affinity }} - affinity: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.affinity "context" $) | nindent 8 }} - {{- else }} - affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.readReplicas.podAffinityPreset "component" "read" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.readReplicas.podAntiAffinityPreset "component" "read" "context" $) | nindent 10 }} - nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.readReplicas.nodeAffinityPreset.type "key" .Values.readReplicas.nodeAffinityPreset.key "values" .Values.readReplicas.nodeAffinityPreset.values) | nindent 10 }} - {{- end }} - {{- if .Values.readReplicas.nodeSelector }} - nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.nodeSelector "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.readReplicas.tolerations }} - tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.tolerations "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.readReplicas.topologySpreadConstraints }} - topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.topologySpreadConstraints "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.readReplicas.priorityClassName }} - priorityClassName: {{ .Values.readReplicas.priorityClassName }} - {{- end }} - {{- if .Values.readReplicas.schedulerName }} - schedulerName: {{ .Values.readReplicas.schedulerName | quote }} - {{- end }} - {{- if .Values.readReplicas.terminationGracePeriodSeconds }} - terminationGracePeriodSeconds: {{ .Values.readReplicas.terminationGracePeriodSeconds }} - {{- end }} - {{- if .Values.readReplicas.podSecurityContext.enabled }} - securityContext: {{- omit .Values.readReplicas.podSecurityContext "enabled" | toYaml | nindent 8 }} - {{- end }} - hostNetwork: {{ .Values.readReplicas.hostNetwork }} - hostIPC: {{ .Values.readReplicas.hostIPC }} - {{- if or (and .Values.tls.enabled (not .Values.volumePermissions.enabled)) (and .Values.volumePermissions.enabled (or .Values.readReplicas.persistence.enabled .Values.shmVolume.enabled)) .Values.readReplicas.initContainers }} - initContainers: - {{- if and .Values.tls.enabled (not .Values.volumePermissions.enabled) }} - - name: copy-certs - image: {{ include "postgresql.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - {{- if .Values.readReplicas.resources }} - resources: {{- toYaml .Values.readReplicas.resources | nindent 12 }} - {{- end }} - # We don't require a privileged container in this case - {{- if .Values.readReplicas.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.readReplicas.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - command: - - /bin/sh - - -ec - - | - cp /tmp/certs/* /opt/bitnami/postgresql/certs/ - chmod 600 {{ include "postgresql.tlsCertKey" . }} - volumeMounts: - - name: raw-certificates - mountPath: /tmp/certs - - name: postgresql-certificates - mountPath: /opt/bitnami/postgresql/certs - {{- else if and .Values.volumePermissions.enabled (or .Values.readReplicas.persistence.enabled .Values.shmVolume.enabled) }} - - name: init-chmod-data - image: {{ include "postgresql.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - {{- if .Values.readReplicas.resources }} - resources: {{- toYaml .Values.readReplicas.resources | nindent 12 }} - {{- end }} - command: - - /bin/sh - - -ec - - | - {{- if .Values.readReplicas.persistence.enabled }} - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - chown `id -u`:`id -G | cut -d " " -f2` {{ .Values.readReplicas.persistence.mountPath }} - {{- else }} - chown {{ .Values.readReplicas.containerSecurityContext.runAsUser }}:{{ .Values.readReplicas.podSecurityContext.fsGroup }} {{ .Values.readReplicas.persistence.mountPath }} - {{- end }} - mkdir -p {{ .Values.readReplicas.persistence.mountPath }}/data {{- if (include "postgresql.mountConfigurationCM" .) }} {{ .Values.readReplicas.persistence.mountPath }}/conf {{- end }} - chmod 700 {{ .Values.readReplicas.persistence.mountPath }}/data {{- if (include "postgresql.mountConfigurationCM" .) }} {{ .Values.readReplicas.persistence.mountPath }}/conf {{- end }} - find {{ .Values.readReplicas.persistence.mountPath }} -mindepth 1 -maxdepth 1 {{- if not (include "postgresql.mountConfigurationCM" .) }} -not -name "conf" {{- end }} -not -name ".snapshot" -not -name "lost+found" | \ - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - xargs -r chown -R `id -u`:`id -G | cut -d " " -f2` - {{- else }} - xargs -r chown -R {{ .Values.readReplicas.containerSecurityContext.runAsUser }}:{{ .Values.readReplicas.podSecurityContext.fsGroup }} - {{- end }} - {{- end }} - {{- if .Values.shmVolume.enabled }} - chmod -R 777 /dev/shm - {{- end }} - {{- if .Values.tls.enabled }} - cp /tmp/certs/* /opt/bitnami/postgresql/certs/ - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - chown -R `id -u`:`id -G | cut -d " " -f2` /opt/bitnami/postgresql/certs/ - {{- else }} - chown -R {{ .Values.readReplicas.containerSecurityContext.runAsUser }}:{{ .Values.readReplicas.podSecurityContext.fsGroup }} /opt/bitnami/postgresql/certs/ - {{- end }} - chmod 600 {{ include "postgresql.tlsCertKey" . }} - {{- end }} - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - securityContext: {{- omit .Values.volumePermissions.containerSecurityContext "runAsUser" | toYaml | nindent 12 }} - {{- else }} - securityContext: {{- .Values.volumePermissions.containerSecurityContext | toYaml | nindent 12 }} - {{- end }} - volumeMounts: - {{ if .Values.readReplicas.persistence.enabled }} - - name: data - mountPath: {{ .Values.readReplicas.persistence.mountPath }} - {{- if .Values.readReplicas.persistence.subPath }} - subPath: {{ .Values.readReplicas.persistence.subPath }} - {{- end }} - {{- end }} - {{- if .Values.shmVolume.enabled }} - - name: dshm - mountPath: /dev/shm - {{- end }} - {{- if .Values.tls.enabled }} - - name: raw-certificates - mountPath: /tmp/certs - - name: postgresql-certificates - mountPath: /opt/bitnami/postgresql/certs - {{- end }} - {{- end }} - {{- if .Values.readReplicas.initContainers }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.initContainers "context" $ ) | nindent 8 }} - {{- end }} - {{- end }} - containers: - - name: postgresql - image: {{ include "postgresql.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - {{- if .Values.readReplicas.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.readReplicas.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} - {{- else if .Values.readReplicas.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.command "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} - {{- else if .Values.readReplicas.args }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.args "context" $) | nindent 12 }} - {{- end }} - env: - - name: BITNAMI_DEBUG - value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }} - - name: POSTGRESQL_PORT_NUMBER - value: {{ .Values.containerPorts.postgresql | quote }} - - name: POSTGRESQL_VOLUME_DIR - value: {{ .Values.readReplicas.persistence.mountPath | quote }} - {{- if .Values.readReplicas.persistence.mountPath }} - - name: PGDATA - value: {{ .Values.postgresqlDataDir | quote }} - {{- end }} - # Authentication - {{- if and (not (empty $customUser)) (ne $customUser "postgres") .Values.auth.enablePostgresUser }} - {{- if .Values.auth.usePasswordFiles }} - - name: POSTGRES_POSTGRES_PASSWORD_FILE - value: "/opt/bitnami/postgresql/secrets/postgres-password" - {{- else }} - - name: POSTGRES_POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "postgresql.secretName" . }} - key: {{ include "postgresql.adminPasswordKey" . }} - {{- end }} - {{- end }} - {{- if .Values.auth.usePasswordFiles }} - - name: POSTGRES_PASSWORD_FILE - value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (ternary "password" "postgres-password" (and (not (empty $customUser)) (ne $customUser "postgres"))) }} - {{- else }} - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "postgresql.secretName" . }} - key: {{ include "postgresql.userPasswordKey" . }} - {{- end }} - # Replication - - name: POSTGRES_REPLICATION_MODE - value: "slave" - - name: POSTGRES_REPLICATION_USER - value: {{ .Values.auth.replicationUsername | quote }} - {{- if .Values.auth.usePasswordFiles }} - - name: POSTGRES_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/postgresql/secrets/replication-password" - {{- else }} - - name: POSTGRES_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "postgresql.secretName" . }} - key: {{ include "postgresql.replicationPasswordKey" . }} - {{- end }} - - name: POSTGRES_CLUSTER_APP_NAME - value: {{ .Values.replication.applicationName }} - - name: POSTGRES_MASTER_HOST - value: {{ include "postgresql.primary.fullname" . }} - - name: POSTGRES_MASTER_PORT_NUMBER - value: {{ include "postgresql.service.port" . | quote }} - # TLS - - name: POSTGRESQL_ENABLE_TLS - value: {{ ternary "yes" "no" .Values.tls.enabled | quote }} - {{- if .Values.tls.enabled }} - - name: POSTGRESQL_TLS_PREFER_SERVER_CIPHERS - value: {{ ternary "yes" "no" .Values.tls.preferServerCiphers | quote }} - - name: POSTGRESQL_TLS_CERT_FILE - value: {{ include "postgresql.tlsCert" . }} - - name: POSTGRESQL_TLS_KEY_FILE - value: {{ include "postgresql.tlsCertKey" . }} - {{- if .Values.tls.certCAFilename }} - - name: POSTGRESQL_TLS_CA_FILE - value: {{ include "postgresql.tlsCACert" . }} - {{- end }} - {{- if .Values.tls.crlFilename }} - - name: POSTGRESQL_TLS_CRL_FILE - value: {{ include "postgresql.tlsCRL" . }} - {{- end }} - {{- end }} - # Audit - - name: POSTGRESQL_LOG_HOSTNAME - value: {{ .Values.audit.logHostname | quote }} - - name: POSTGRESQL_LOG_CONNECTIONS - value: {{ .Values.audit.logConnections | quote }} - - name: POSTGRESQL_LOG_DISCONNECTIONS - value: {{ .Values.audit.logDisconnections | quote }} - {{- if .Values.audit.logLinePrefix }} - - name: POSTGRESQL_LOG_LINE_PREFIX - value: {{ .Values.audit.logLinePrefix | quote }} - {{- end }} - {{- if .Values.audit.logTimezone }} - - name: POSTGRESQL_LOG_TIMEZONE - value: {{ .Values.audit.logTimezone | quote }} - {{- end }} - {{- if .Values.audit.pgAuditLog }} - - name: POSTGRESQL_PGAUDIT_LOG - value: {{ .Values.audit.pgAuditLog | quote }} - {{- end }} - - name: POSTGRESQL_PGAUDIT_LOG_CATALOG - value: {{ .Values.audit.pgAuditLogCatalog | quote }} - # Others - - name: POSTGRESQL_CLIENT_MIN_MESSAGES - value: {{ .Values.audit.clientMinMessages | quote }} - - name: POSTGRESQL_SHARED_PRELOAD_LIBRARIES - value: {{ .Values.postgresqlSharedPreloadLibraries | quote }} - {{- if .Values.readReplicas.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - {{- if or .Values.readReplicas.extraEnvVarsCM .Values.readReplicas.extraEnvVarsSecret }} - envFrom: - {{- if .Values.readReplicas.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.readReplicas.extraEnvVarsCM }} - {{- end }} - {{- if .Values.readReplicas.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.readReplicas.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: tcp-postgresql - containerPort: {{ .Values.containerPorts.postgresql }} - {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.readReplicas.customStartupProbe }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.customStartupProbe "context" $) | nindent 12 }} - {{- else if .Values.readReplicas.startupProbe.enabled }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readReplicas.startupProbe "enabled") "context" $) | nindent 12 }} - exec: - command: - - /bin/sh - - -c - {{- if (include "postgresql.database" .) }} - - exec pg_isready -U {{ default "postgres" $customUser| quote }} -d "dbname={{ include "postgresql.database" . }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} sslcert={{ include "postgresql.tlsCert" . }} sslkey={{ include "postgresql.tlsCertKey" . }}{{- end }}" -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }} - {{- else }} - - exec pg_isready -U {{ default "postgres" $customUser | quote }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} -d "sslcert={{ include "postgresql.tlsCert" . }} sslkey={{ include "postgresql.tlsCertKey" . }}"{{- end }} -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }} - {{- end }} - {{- end }} - {{- if .Values.readReplicas.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.customLivenessProbe "context" $) | nindent 12 }} - {{- else if .Values.readReplicas.livenessProbe.enabled }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readReplicas.livenessProbe "enabled") "context" $) | nindent 12 }} - exec: - command: - - /bin/sh - - -c - {{- if (include "postgresql.database" .) }} - - exec pg_isready -U {{ default "postgres" $customUser | quote }} -d "dbname={{ include "postgresql.database" . }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} sslcert={{ include "postgresql.tlsCert" . }} sslkey={{ include "postgresql.tlsCertKey" . }}{{- end }}" -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }} - {{- else }} - - exec pg_isready -U {{default "postgres" $customUser | quote }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} -d "sslcert={{ include "postgresql.tlsCert" . }} sslkey={{ include "postgresql.tlsCertKey" . }}"{{- end }} -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }} - {{- end }} - {{- end }} - {{- if .Values.readReplicas.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.customReadinessProbe "context" $) | nindent 12 }} - {{- else if .Values.readReplicas.readinessProbe.enabled }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readReplicas.readinessProbe "enabled") "context" $) | nindent 12 }} - exec: - command: - - /bin/sh - - -c - - -e - {{- include "postgresql.readinessProbeCommand" . | nindent 16 }} - {{- end }} - {{- end }} - {{- if .Values.readReplicas.resources }} - resources: {{- toYaml .Values.readReplicas.resources | nindent 12 }} - {{- end }} - {{- if .Values.readReplicas.lifecycleHooks }} - lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.lifecycleHooks "context" $) | nindent 12 }} - {{- end }} - volumeMounts: - {{- if .Values.auth.usePasswordFiles }} - - name: postgresql-password - mountPath: /opt/bitnami/postgresql/secrets/ - {{- end }} - {{- if .Values.readReplicas.extendedConfiguration }} - - name: postgresql-extended-config - mountPath: /bitnami/postgresql/conf/conf.d/ - {{- end }} - {{- if .Values.tls.enabled }} - - name: postgresql-certificates - mountPath: /opt/bitnami/postgresql/certs - readOnly: true - {{- end }} - {{- if .Values.shmVolume.enabled }} - - name: dshm - mountPath: /dev/shm - {{- end }} - {{- if .Values.readReplicas.persistence.enabled }} - - name: data - mountPath: {{ .Values.readReplicas.persistence.mountPath }} - {{- if .Values.readReplicas.persistence.subPath }} - subPath: {{ .Values.readReplicas.persistence.subPath }} - {{- end }} - {{- end }} - {{- if .Values.readReplicas.extraVolumeMounts }} - {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.extraVolumeMounts "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ include "postgresql.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - {{- if .Values.metrics.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.metrics.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- 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.metrics.customMetrics }} - args: [ "--extend.query-path", "/conf/custom-metrics.yaml" ] - {{- end }} - env: - {{- $database := required "In order to enable metrics you need to specify a database (.Values.auth.database or .Values.global.postgresql.auth.database)" (include "postgresql.database" .) }} - - name: DATA_SOURCE_URI - value: {{ printf "127.0.0.1:%d/%s?sslmode=disable" (int (include "postgresql.service.port" .)) $database }} - {{- if .Values.auth.usePasswordFiles }} - - name: DATA_SOURCE_PASS_FILE - value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (ternary "password" "postgres-password" (and (not (empty $customUser)) (ne $customUser "postgres"))) }} - {{- else }} - - name: DATA_SOURCE_PASS - valueFrom: - secretKeyRef: - name: {{ include "postgresql.secretName" . }} - key: {{ include "postgresql.userPasswordKey" . }} - {{- end }} - - name: DATA_SOURCE_USER - value: {{ default "postgres" $customUser | quote }} - {{- if .Values.metrics.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: {{ .Values.metrics.containerPorts.metrics }} - {{- if not .Values.diagnosticMode.enabled }} - {{- 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: http-metrics - {{- end }} - {{- 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 }} - httpGet: - path: / - port: http-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: / - port: http-metrics - {{- end }} - {{- end }} - volumeMounts: - {{- if .Values.auth.usePasswordFiles }} - - name: postgresql-password - mountPath: /opt/bitnami/postgresql/secrets/ - {{- end }} - {{- if .Values.metrics.customMetrics }} - - name: custom-metrics - mountPath: /conf - readOnly: true - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{- toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.readReplicas.sidecars }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.sidecars "context" $ ) | nindent 8 }} - {{- end }} - volumes: - {{- if .Values.readReplicas.extendedConfiguration }} - - name: postgresql-extended-config - configMap: - name: {{ include "postgresql.readReplicas.extendedConfigmapName" . }} - {{- end }} - {{- if .Values.auth.usePasswordFiles }} - - name: postgresql-password - secret: - secretName: {{ include "postgresql.secretName" . }} - {{- end }} - {{- if .Values.tls.enabled }} - - name: raw-certificates - secret: - secretName: {{ include "postgresql.tlsSecretName" . }} - - name: postgresql-certificates - emptyDir: {} - {{- end }} - {{- if and .Values.metrics.enabled .Values.metrics.customMetrics }} - - name: custom-metrics - configMap: - name: {{ printf "%s-metrics" (include "postgresql.readReplica.fullname" .) }} - {{- end }} - {{- if .Values.shmVolume.enabled }} - - name: dshm - emptyDir: - medium: Memory - {{- if .Values.shmVolume.sizeLimit }} - sizeLimit: {{ .Values.shmVolume.sizeLimit }} - {{- end }} - {{- end }} - {{- if .Values.readReplicas.extraVolumes }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.extraVolumes "context" $ ) | nindent 8 }} - {{- end }} - {{- if and .Values.readReplicas.persistence.enabled .Values.readReplicas.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ tpl .Values.readReplicas.persistence.existingClaim $ }} - {{- else if not .Values.readReplicas.persistence.enabled }} - - name: data - emptyDir: {} - {{- else }} - volumeClaimTemplates: - - metadata: - name: data - {{- if .Values.readReplicas.persistence.annotations }} - annotations: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.persistence.annotations "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.readReplicas.persistence.labels }} - labels: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.persistence.labels "context" $) | nindent 10 }} - {{- end }} - spec: - accessModes: - {{- range .Values.readReplicas.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - {{- if .Values.readReplicas.persistence.dataSource }} - dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.persistence.dataSource "context" $) | nindent 10 }} - {{- end }} - resources: - requests: - storage: {{ .Values.readReplicas.persistence.size | quote }} - {{- if .Values.readReplicas.persistence.selector }} - selector: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.persistence.selector "context" $) | nindent 10 }} - {{- end -}} - {{- include "common.storage.class" (dict "persistence" .Values.readReplicas.persistence "global" .Values.global) | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/read/svc-headless.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/read/svc-headless.yaml deleted file mode 100644 index ee8f756c2..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/read/svc-headless.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if eq .Values.architecture "replication" }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "postgresql.readReplica.svc.headless" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - app.kubernetes.io/component: read - {{- if or .Values.readReplicas.service.headless.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.readReplicas.service.headless.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.service.headless.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} - # Use this annotation in addition to the actual publishNotReadyAddresses - # field below because the annotation will stop being respected soon but the - # field is broken in some versions of Kubernetes: - # https://github.com/kubernetes/kubernetes/issues/58662 - service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" -spec: - type: ClusterIP - clusterIP: None - # We want all pods in the StatefulSet to have their addresses published for - # the sake of the other Postgresql pods even before they're ready, since they - # have to be able to talk to each other in order to become ready. - publishNotReadyAddresses: true - ports: - - name: tcp-postgresql - port: {{ include "postgresql.readReplica.service.port" . }} - targetPort: tcp-postgresql - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: read -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/read/svc.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/read/svc.yaml deleted file mode 100644 index c308c3f60..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/read/svc.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- if eq .Values.architecture "replication" }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "postgresql.readReplica.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - app.kubernetes.io/component: read - {{- if or .Values.commonAnnotations .Values.readReplicas.service.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.readReplicas.service.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.service.annotations "context" $) | nindent 4 }} - {{- end }} - {{- end }} -spec: - type: {{ .Values.readReplicas.service.type }} - {{- if or (eq .Values.readReplicas.service.type "LoadBalancer") (eq .Values.readReplicas.service.type "NodePort") }} - externalTrafficPolicy: {{ .Values.readReplicas.service.externalTrafficPolicy | quote }} - {{- end }} - {{- if and (eq .Values.readReplicas.service.type "LoadBalancer") (not (empty .Values.readReplicas.service.loadBalancerSourceRanges)) }} - loadBalancerSourceRanges: {{ .Values.readReplicas.service.loadBalancerSourceRanges }} - {{- end }} - {{- if and (eq .Values.readReplicas.service.type "LoadBalancer") (not (empty .Values.readReplicas.service.loadBalancerIP)) }} - loadBalancerIP: {{ .Values.readReplicas.service.loadBalancerIP }} - {{- end }} - {{- if and .Values.readReplicas.service.clusterIP (eq .Values.readReplicas.service.type "ClusterIP") }} - clusterIP: {{ .Values.readReplicas.service.clusterIP }} - {{- end }} - {{- if .Values.readReplicas.service.sessionAffinity }} - sessionAffinity: {{ .Values.readReplicas.service.sessionAffinity }} - {{- end }} - {{- if .Values.readReplicas.service.sessionAffinityConfig }} - sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.service.sessionAffinityConfig "context" $) | nindent 4 }} - {{- end }} - ports: - - name: tcp-postgresql - port: {{ include "postgresql.readReplica.service.port" . }} - targetPort: tcp-postgresql - {{- if and (or (eq .Values.readReplicas.service.type "NodePort") (eq .Values.readReplicas.service.type "LoadBalancer")) (not (empty .Values.readReplicas.service.nodePorts.postgresql)) }} - nodePort: {{ .Values.readReplicas.service.nodePorts.postgresql }} - {{- else if eq .Values.readReplicas.service.type "ClusterIP" }} - nodePort: null - {{- end }} - {{- if .Values.readReplicas.service.extraPorts }} - {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.service.extraPorts "context" $) | nindent 4 }} - {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: read -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/role.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/role.yaml deleted file mode 100644 index 00f922232..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/role.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- if .Values.rbac.create }} -kind: Role -apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} -metadata: - name: {{ include "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -# yamllint disable rule:indentation -rules: - {{- $pspAvailable := (semverCompare "<1.25-0" (include "common.capabilities.kubeVersion" .)) -}} - {{- if and $pspAvailable .Values.psp.create }} - - apiGroups: - - 'policy' - resources: - - 'podsecuritypolicies' - verbs: - - 'use' - resourceNames: - - {{ include "common.names.fullname" . }} - {{- end }} - {{- if .Values.rbac.rules }} - {{- include "common.tplvalues.render" ( dict "value" .Values.rbac.rules "context" $ ) | nindent 2 }} - {{- end }} -# yamllint enable rule:indentation -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/rolebinding.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/rolebinding.yaml deleted file mode 100644 index 0311c0ecc..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/rolebinding.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.rbac.create }} -kind: RoleBinding -apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} -metadata: - name: {{ include "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -roleRef: - kind: Role - name: {{ include "common.names.fullname" . }} - apiGroup: rbac.authorization.k8s.io -subjects: - - kind: ServiceAccount - name: {{ include "postgresql.serviceAccountName" . }} - namespace: {{ .Release.Namespace | quote }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/secrets.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/secrets.yaml deleted file mode 100644 index e3d6e7aef..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/secrets.yaml +++ /dev/null @@ -1,103 +0,0 @@ -{{- $host := include "postgresql.primary.fullname" . }} -{{- $port := include "postgresql.service.port" . }} -{{- $postgresPassword := "" }} -{{- if .Values.auth.enablePostgresUser }} -{{- $postgresPassword = include "common.secrets.passwords.manage" (dict "secret" (include "postgresql.secretName" .) "key" $.Values.auth.secretKeys.adminPasswordKey "providedValues" (list "global.postgresql.auth.postgresPassword" "auth.postgresPassword") "context" $) | trimAll "\"" | b64dec }} -{{- end }} -{{- $replicationPassword := "" }} -{{- if eq .Values.architecture "replication" }} -{{- $replicationPassword = include "common.secrets.passwords.manage" (dict "secret" (include "postgresql.secretName" .) "key" $.Values.auth.secretKeys.replicationPasswordKey "providedValues" (list "auth.replicationPassword") "context" $) | trimAll "\"" | b64dec }} -{{- end }} -{{- $ldapPassword := "" }} -{{- if and .Values.ldap.enabled (or .Values.ldap.bind_password .Values.ldap.bindpw) }} -{{- $ldapPassword = coalesce .Values.ldap.bind_password .Values.ldap.bindpw }} -{{- end }} -{{- $customUser := include "postgresql.username" . }} -{{- $password := "" }} -{{- if not (empty (include "postgresql.username" .)) }} -{{- $password = include "common.secrets.passwords.manage" (dict "secret" (include "postgresql.secretName" .) "key" $.Values.auth.secretKeys.userPasswordKey "providedValues" (list "global.postgresql.auth.password" "auth.password") "context" $) | trimAll "\"" | b64dec }} -{{- end }} -{{- $database := include "postgresql.database" . }} -{{- if (include "postgresql.createSecret" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -type: Opaque -data: - {{- if .Values.auth.enablePostgresUser }} - postgres-password: {{ $postgresPassword | b64enc | quote }} - {{- end }} - {{- if not (empty (include "postgresql.username" .)) }} - password: {{ $password | b64enc | quote }} - {{- end }} - {{- if eq .Values.architecture "replication" }} - replication-password: {{ $replicationPassword | b64enc | quote }} - {{- end }} - # We don't auto-generate LDAP password when it's not provided as we do for other passwords - {{- if and .Values.ldap.enabled (or .Values.ldap.bind_password .Values.ldap.bindpw) }} - ldap-password: {{ $ldapPassword | b64enc | quote }} - {{- end }} -{{- end }} -{{- if .Values.serviceBindings.enabled }} -{{- if .Values.auth.enablePostgresUser }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "common.names.fullname" . }}-svcbind-postgres - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -type: servicebinding.io/postgresql -data: - provider: {{ print "bitnami" | b64enc | quote }} - type: {{ print "postgresql" | b64enc | quote }} - host: {{ $host | b64enc | quote }} - port: {{ $port | b64enc | quote }} - username: {{ print "postgres" | b64enc | quote }} - database: {{ print "postgres" | b64enc | quote }} - password: {{ $postgresPassword | b64enc | quote }} - uri: {{ printf "postgresql://postgres:%s@%s:%s/postgres" $postgresPassword $host $port | b64enc | quote }} -{{- end }} -{{- if and (not (empty $customUser)) (ne $customUser "postgres") }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "common.names.fullname" . }}-svcbind-custom-user - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -type: servicebinding.io/postgresql -data: - provider: {{ print "bitnami" | b64enc | quote }} - type: {{ print "postgresql" | b64enc | quote }} - host: {{ $host | b64enc | quote }} - port: {{ $port | b64enc | quote }} - username: {{ $customUser | b64enc | quote }} - password: {{ $password | b64enc | quote }} - {{- if $database }} - database: {{ $database | b64enc | quote }} - {{- end }} - uri: {{ printf "postgresql://%s:%s@%s:%s/%s" $customUser $password $host $port $database | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/serviceaccount.yaml deleted file mode 100644 index 179f8f2e4..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/serviceaccount.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "postgresql.serviceAccountName" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} -automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/templates/tls-secrets.yaml b/charts/gitlab/gitlab/charts/postgresql/templates/tls-secrets.yaml deleted file mode 100644 index 482e29876..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/templates/tls-secrets.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if (include "postgresql.createTlsSecret" . ) }} -{{- $secretName := printf "%s-crt" (include "common.names.fullname" .) }} -{{- $ca := genCA "postgresql-ca" 365 }} -{{- $fullname := include "common.names.fullname" . }} -{{- $releaseNamespace := .Release.Namespace }} -{{- $clusterDomain := .Values.clusterDomain }} -{{- $primaryHeadlessServiceName := include "postgresql.primary.svc.headless" . }} -{{- $readHeadlessServiceName := include "postgresql.readReplica.svc.headless" . }} -{{- $altNames := list (printf "*.%s.%s.svc.%s" $fullname $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $fullname $releaseNamespace $clusterDomain) (printf "*.%s.%s.svc.%s" $primaryHeadlessServiceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $primaryHeadlessServiceName $releaseNamespace $clusterDomain) (printf "*.%s.%s.svc.%s" $readHeadlessServiceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $readHeadlessServiceName $releaseNamespace $clusterDomain) $fullname }} -{{- $cert := genSignedCert $fullname nil $altNames 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ $secretName }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -type: kubernetes.io/tls -data: - tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }} - tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }} - ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/postgresql/values.schema.json b/charts/gitlab/gitlab/charts/postgresql/values.schema.json deleted file mode 100644 index fc41483cd..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/values.schema.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "architecture": { - "type": "string", - "title": "PostgreSQL architecture", - "form": true, - "description": "Allowed values: `standalone` or `replication`" - }, - "auth": { - "type": "object", - "title": "Authentication configuration", - "form": true, - "properties": { - "enablePostgresUser": { - "type": "boolean", - "title": "Enable \"postgres\" admin user", - "description": "Assign a password to the \"postgres\" admin user. Otherwise, remote access will be blocked for this user", - "form": true - }, - "postgresPassword": { - "type": "string", - "title": "Password for the \"postgres\" admin user", - "description": "Defaults to a random 10-character alphanumeric string if not set", - "form": true - }, - "database": { - "type": "string", - "title": "PostgreSQL custom database", - "description": "Name of the custom database to be created during the 1st initialization of PostgreSQL", - "form": true - }, - "username": { - "type": "string", - "title": "PostgreSQL custom user", - "description": "Name of the custom user to be created during the 1st initialization of PostgreSQL. This user only has permissions on the PostgreSQL custom database", - "form": true - }, - "password": { - "type": "string", - "title": "Password for the custom user to create", - "description": "Defaults to a random 10-character alphanumeric string if not set", - "form": true - }, - "replicationUsername": { - "type": "string", - "title": "PostgreSQL replication user", - "description": "Name of user used to manage replication.", - "form": true, - "hidden": { - "value": "standalone", - "path": "architecture" - } - }, - "replicationPassword": { - "type": "string", - "title": "Password for PostgreSQL replication user", - "description": "Defaults to a random 10-character alphanumeric string if not set", - "form": true, - "hidden": { - "value": "standalone", - "path": "architecture" - } - } - } - }, - "persistence": { - "type": "object", - "properties": { - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi" - } - } - }, - "resources": { - "type": "object", - "title": "Required Resources", - "description": "Configure resource requests", - "form": true, - "properties": { - "requests": { - "type": "object", - "properties": { - "memory": { - "type": "string", - "form": true, - "render": "slider", - "title": "Memory Request", - "sliderMin": 10, - "sliderMax": 2048, - "sliderUnit": "Mi" - }, - "cpu": { - "type": "string", - "form": true, - "render": "slider", - "title": "CPU Request", - "sliderMin": 10, - "sliderMax": 2000, - "sliderUnit": "m" - } - } - } - } - }, - "replication": { - "type": "object", - "form": true, - "title": "Replication Details", - "properties": { - "enabled": { - "type": "boolean", - "title": "Enable Replication", - "form": true - }, - "readReplicas": { - "type": "integer", - "title": "read Replicas", - "form": true, - "hidden": { - "value": "standalone", - "path": "architecture" - } - } - } - }, - "volumePermissions": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable Init Containers", - "description": "Change the owner of the persist volume mountpoint to RunAsUser:fsGroup" - } - } - }, - "metrics": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "title": "Configure metrics exporter", - "form": true - } - } - } - } -} diff --git a/charts/gitlab/gitlab/charts/postgresql/values.yaml b/charts/gitlab/gitlab/charts/postgresql/values.yaml deleted file mode 100644 index ec802fe44..000000000 --- a/charts/gitlab/gitlab/charts/postgresql/values.yaml +++ /dev/null @@ -1,1425 +0,0 @@ -## @section Global parameters -## Please, note that this will override the parameters, including dependencies, configured to use the global value -## -global: - ## @param global.imageRegistry Global Docker image registry - ## - imageRegistry: "" - ## @param global.imagePullSecrets Global Docker registry secret names as an array - ## e.g. - ## imagePullSecrets: - ## - myRegistryKeySecretName - ## - imagePullSecrets: [] - ## @param global.storageClass Global StorageClass for Persistent Volume(s) - ## - storageClass: "" - postgresql: - ## @param global.postgresql.auth.postgresPassword Password for the "postgres" admin user (overrides `auth.postgresPassword`) - ## @param global.postgresql.auth.username Name for a custom user to create (overrides `auth.username`) - ## @param global.postgresql.auth.password Password for the custom user to create (overrides `auth.password`) - ## @param global.postgresql.auth.database Name for a custom database to create (overrides `auth.database`) - ## @param global.postgresql.auth.existingSecret Name of existing secret to use for PostgreSQL credentials (overrides `auth.existingSecret`). - ## @param global.postgresql.auth.secretKeys.adminPasswordKey Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.adminPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set. - ## @param global.postgresql.auth.secretKeys.userPasswordKey Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.userPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set. - ## @param global.postgresql.auth.secretKeys.replicationPasswordKey Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.replicationPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set. - ## - auth: - postgresPassword: "" - username: "" - password: "" - database: "" - existingSecret: "" - secretKeys: - adminPasswordKey: "" - userPasswordKey: "" - replicationPasswordKey: "" - ## @param global.postgresql.service.ports.postgresql PostgreSQL service port (overrides `service.ports.postgresql`) - ## - service: - ports: - postgresql: "" - -## @section Common parameters -## - -## @param kubeVersion Override Kubernetes version -## -kubeVersion: "" -## @param nameOverride String to partially override common.names.fullname template (will maintain the release name) -## -nameOverride: "" -## @param fullnameOverride String to fully override common.names.fullname template -## -fullnameOverride: "" -## @param clusterDomain Kubernetes Cluster Domain -## -clusterDomain: cluster.local -## @param extraDeploy Array of extra objects to deploy with the release (evaluated as a template) -## -extraDeploy: [] -## @param commonLabels Add labels to all the deployed resources -## -commonLabels: {} -## @param commonAnnotations Add annotations to all the deployed resources -## -commonAnnotations: {} -## Enable diagnostic mode in the statefulset -## -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 statefulset - ## - command: - - sleep - ## @param diagnosticMode.args Args to override all containers in the statefulset - ## - args: - - infinity - -## @section PostgreSQL common parameters -## - -## Bitnami PostgreSQL image version -## ref: https://hub.docker.com/r/bitnami/postgresql/tags/ -## @param image.registry PostgreSQL image registry -## @param image.repository PostgreSQL image repository -## @param image.tag PostgreSQL image tag (immutable tags are recommended) -## @param image.digest PostgreSQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag -## @param image.pullPolicy PostgreSQL image pull policy -## @param image.pullSecrets Specify image pull secrets -## @param image.debug Specify if debug values should be set -## -image: - registry: docker.io - repository: bitnami/postgresql - tag: 15.3.0-debian-11-r0 - digest: "" - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-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/ - ## Example: - ## pullSecrets: - ## - myRegistryKeySecretName - ## - pullSecrets: [] - ## Set to true if you would like to see extra information on logs - ## - debug: false -## Authentication parameters -## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#setting-the-root-password-on-first-run -## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#creating-a-database-on-first-run -## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#creating-a-database-user-on-first-run -## -auth: - ## @param auth.enablePostgresUser Assign a password to the "postgres" admin user. Otherwise, remote access will be blocked for this user - ## - enablePostgresUser: true - ## @param auth.postgresPassword Password for the "postgres" admin user. Ignored if `auth.existingSecret` is provided - ## - postgresPassword: "" - ## @param auth.username Name for a custom user to create - ## - username: "" - ## @param auth.password Password for the custom user to create. Ignored if `auth.existingSecret` is provided - ## - password: "" - ## @param auth.database Name for a custom database to create - ## - database: "" - ## @param auth.replicationUsername Name of the replication user - ## - replicationUsername: repl_user - ## @param auth.replicationPassword Password for the replication user. Ignored if `auth.existingSecret` is provided - ## - replicationPassword: "" - ## @param auth.existingSecret Name of existing secret to use for PostgreSQL credentials. `auth.postgresPassword`, `auth.password`, and `auth.replicationPassword` will be ignored and picked up from this secret. The secret might also contains the key `ldap-password` if LDAP is enabled. `ldap.bind_password` will be ignored and picked from this secret in this case. - ## - existingSecret: "" - ## @param auth.secretKeys.adminPasswordKey Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set. - ## @param auth.secretKeys.userPasswordKey Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set. - ## @param auth.secretKeys.replicationPasswordKey Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set. - ## - secretKeys: - adminPasswordKey: postgres-password - userPasswordKey: password - replicationPasswordKey: replication-password - ## @param auth.usePasswordFiles Mount credentials as a files instead of using an environment variable - ## - usePasswordFiles: false -## @param architecture PostgreSQL architecture (`standalone` or `replication`) -## -architecture: standalone -## Replication configuration -## Ignored if `architecture` is `standalone` -## -replication: - ## @param replication.synchronousCommit Set synchronous commit mode. Allowed values: `on`, `remote_apply`, `remote_write`, `local` and `off` - ## @param replication.numSynchronousReplicas Number of replicas that will have synchronous replication. Note: Cannot be greater than `readReplicas.replicaCount`. - ## ref: https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT - ## - synchronousCommit: "off" - numSynchronousReplicas: 0 - ## @param replication.applicationName Cluster application name. Useful for advanced replication settings - ## - applicationName: my_application -## @param containerPorts.postgresql PostgreSQL container port -## -containerPorts: - postgresql: 5432 -## Audit settings -## https://github.com/bitnami/containers/tree/main/bitnami/postgresql#auditing -## @param audit.logHostname Log client hostnames -## @param audit.logConnections Add client log-in operations to the log file -## @param audit.logDisconnections Add client log-outs operations to the log file -## @param audit.pgAuditLog Add operations to log using the pgAudit extension -## @param audit.pgAuditLogCatalog Log catalog using pgAudit -## @param audit.clientMinMessages Message log level to share with the user -## @param audit.logLinePrefix Template for log line prefix (default if not set) -## @param audit.logTimezone Timezone for the log timestamps -## -audit: - logHostname: false - logConnections: false - logDisconnections: false - pgAuditLog: "" - pgAuditLogCatalog: "off" - clientMinMessages: error - logLinePrefix: "" - logTimezone: "" -## LDAP configuration -## @param ldap.enabled Enable LDAP support -## DEPRECATED ldap.url It will removed in a future, please use 'ldap.uri' instead -## @param ldap.server IP address or name of the LDAP server. -## @param ldap.port Port number on the LDAP server to connect to -## @param ldap.prefix String to prepend to the user name when forming the DN to bind -## @param ldap.suffix String to append to the user name when forming the DN to bind -## DEPRECATED ldap.baseDN It will removed in a future, please use 'ldap.basedn' instead -## DEPRECATED ldap.bindDN It will removed in a future, please use 'ldap.binddn' instead -## DEPRECATED ldap.bind_password It will removed in a future, please use 'ldap.bindpw' instead -## @param ldap.basedn Root DN to begin the search for the user in -## @param ldap.binddn DN of user to bind to LDAP -## @param ldap.bindpw Password for the user to bind to LDAP -## DEPRECATED ldap.search_attr It will removed in a future, please use 'ldap.searchAttribute' instead -## DEPRECATED ldap.search_filter It will removed in a future, please use 'ldap.searchFilter' instead -## @param ldap.searchAttribute Attribute to match against the user name in the search -## @param ldap.searchFilter The search filter to use when doing search+bind authentication -## @param ldap.scheme Set to `ldaps` to use LDAPS -## DEPRECATED ldap.tls as string is deprecated,please use 'ldap.tls.enabled' instead -## @param ldap.tls.enabled Se to true to enable TLS encryption -## -ldap: - enabled: false - server: "" - port: "" - prefix: "" - suffix: "" - basedn: "" - binddn: "" - bindpw: "" - searchAttribute: "" - searchFilter: "" - scheme: "" - tls: - enabled: false - ## @param ldap.uri LDAP URL beginning in the form `ldap[s]://host[:port]/basedn`. If provided, all the other LDAP parameters will be ignored. - ## Ref: https://www.postgresql.org/docs/current/auth-ldap.html - ## - uri: "" -## @param postgresqlDataDir PostgreSQL data dir folder -## -postgresqlDataDir: /bitnami/postgresql/data -## @param postgresqlSharedPreloadLibraries Shared preload libraries (comma-separated list) -## -postgresqlSharedPreloadLibraries: "pgaudit" -## Start PostgreSQL pod(s) without limitations on shm memory. -## By default docker and containerd (and possibly other container runtimes) limit `/dev/shm` to `64M` -## ref: https://github.com/docker-library/postgres/issues/416 -## ref: https://github.com/containerd/containerd/issues/3654 -## -shmVolume: - ## @param shmVolume.enabled Enable emptyDir volume for /dev/shm for PostgreSQL pod(s) - ## - enabled: true - ## @param shmVolume.sizeLimit Set this to enable a size limit on the shm tmpfs - ## Note: the size of the tmpfs counts against container's memory limit - ## e.g: - ## sizeLimit: 1Gi - ## - sizeLimit: "" -## TLS configuration -## -tls: - ## @param tls.enabled Enable TLS traffic support - ## - enabled: false - ## @param tls.autoGenerated Generate automatically self-signed TLS certificates - ## - autoGenerated: false - ## @param tls.preferServerCiphers Whether to use the server's TLS cipher preferences rather than the client's - ## - preferServerCiphers: true - ## @param tls.certificatesSecret Name of an existing secret that contains the certificates - ## - certificatesSecret: "" - ## @param tls.certFilename Certificate filename - ## - certFilename: "" - ## @param tls.certKeyFilename Certificate key filename - ## - certKeyFilename: "" - ## @param tls.certCAFilename CA Certificate filename - ## If provided, PostgreSQL will authenticate TLS/SSL clients by requesting them a certificate - ## ref: https://www.postgresql.org/docs/9.6/auth-methods.html - ## - certCAFilename: "" - ## @param tls.crlFilename File containing a Certificate Revocation List - ## - crlFilename: "" - -## @section PostgreSQL Primary parameters -## -primary: - ## @param primary.name Name of the primary database (eg primary, master, leader, ...) - ## - name: primary - ## @param primary.configuration PostgreSQL Primary main configuration to be injected as ConfigMap - ## ref: https://www.postgresql.org/docs/current/static/runtime-config.html - ## - configuration: "" - ## @param primary.pgHbaConfiguration PostgreSQL Primary client authentication configuration - ## ref: https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html - ## e.g:# - ## pgHbaConfiguration: |- - ## local all all trust - ## host all all localhost trust - ## host mydatabase mysuser 192.168.0.0/24 md5 - ## - pgHbaConfiguration: "" - ## @param primary.existingConfigmap Name of an existing ConfigMap with PostgreSQL Primary configuration - ## NOTE: `primary.configuration` and `primary.pgHbaConfiguration` will be ignored - ## - existingConfigmap: "" - ## @param primary.extendedConfiguration Extended PostgreSQL Primary configuration (appended to main or default configuration) - ## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#allow-settings-to-be-loaded-from-files-other-than-the-default-postgresqlconf - ## - extendedConfiguration: "" - ## @param primary.existingExtendedConfigmap Name of an existing ConfigMap with PostgreSQL Primary extended configuration - ## NOTE: `primary.extendedConfiguration` will be ignored - ## - existingExtendedConfigmap: "" - ## Initdb configuration - ## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#specifying-initdb-arguments - ## - initdb: - ## @param primary.initdb.args PostgreSQL initdb extra arguments - ## - args: "" - ## @param primary.initdb.postgresqlWalDir Specify a custom location for the PostgreSQL transaction log - ## - postgresqlWalDir: "" - ## @param primary.initdb.scripts Dictionary of initdb scripts - ## Specify dictionary of scripts to be run at first boot - ## e.g: - ## scripts: - ## my_init_script.sh: | - ## #!/bin/sh - ## echo "Do something." - ## - scripts: {} - ## @param primary.initdb.scriptsConfigMap ConfigMap with scripts to be run at first boot - ## NOTE: This will override `primary.initdb.scripts` - ## - scriptsConfigMap: "" - ## @param primary.initdb.scriptsSecret Secret with scripts to be run at first boot (in case it contains sensitive information) - ## NOTE: This can work along `primary.initdb.scripts` or `primary.initdb.scriptsConfigMap` - ## - scriptsSecret: "" - ## @param primary.initdb.user Specify the PostgreSQL username to execute the initdb scripts - ## - user: "" - ## @param primary.initdb.password Specify the PostgreSQL password to execute the initdb scripts - ## - password: "" - ## Configure current cluster's primary server to be the standby server in other cluster. - ## This will allow cross cluster replication and provide cross cluster high availability. - ## You will need to configure pgHbaConfiguration if you want to enable this feature with local cluster replication enabled. - ## @param primary.standby.enabled Whether to enable current cluster's primary as standby server of another cluster or not - ## @param primary.standby.primaryHost The Host of replication primary in the other cluster - ## @param primary.standby.primaryPort The Port of replication primary in the other cluster - ## - standby: - enabled: false - primaryHost: "" - primaryPort: "" - ## @param primary.extraEnvVars Array with extra environment variables to add to PostgreSQL Primary nodes - ## e.g: - ## extraEnvVars: - ## - name: FOO - ## value: "bar" - ## - extraEnvVars: [] - ## @param primary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for PostgreSQL Primary nodes - ## - extraEnvVarsCM: "" - ## @param primary.extraEnvVarsSecret Name of existing Secret containing extra env vars for PostgreSQL Primary nodes - ## - extraEnvVarsSecret: "" - ## @param primary.command Override default container command (useful when using custom images) - ## - command: [] - ## @param primary.args Override default container args (useful when using custom images) - ## - args: [] - ## Configure extra options for PostgreSQL Primary containers' liveness, readiness and startup probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes - ## @param primary.livenessProbe.enabled Enable livenessProbe on PostgreSQL Primary containers - ## @param primary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe - ## @param primary.livenessProbe.periodSeconds Period seconds for livenessProbe - ## @param primary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe - ## @param primary.livenessProbe.failureThreshold Failure threshold for livenessProbe - ## @param primary.livenessProbe.successThreshold Success threshold for livenessProbe - ## - livenessProbe: - enabled: true - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 6 - successThreshold: 1 - ## @param primary.readinessProbe.enabled Enable readinessProbe on PostgreSQL Primary containers - ## @param primary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe - ## @param primary.readinessProbe.periodSeconds Period seconds for readinessProbe - ## @param primary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe - ## @param primary.readinessProbe.failureThreshold Failure threshold for readinessProbe - ## @param primary.readinessProbe.successThreshold Success threshold for readinessProbe - ## - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 6 - successThreshold: 1 - ## @param primary.startupProbe.enabled Enable startupProbe on PostgreSQL Primary containers - ## @param primary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe - ## @param primary.startupProbe.periodSeconds Period seconds for startupProbe - ## @param primary.startupProbe.timeoutSeconds Timeout seconds for startupProbe - ## @param primary.startupProbe.failureThreshold Failure threshold for startupProbe - ## @param primary.startupProbe.successThreshold Success threshold for startupProbe - ## - startupProbe: - enabled: false - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 15 - successThreshold: 1 - ## @param primary.customLivenessProbe Custom livenessProbe that overrides the default one - ## - customLivenessProbe: {} - ## @param primary.customReadinessProbe Custom readinessProbe that overrides the default one - ## - customReadinessProbe: {} - ## @param primary.customStartupProbe Custom startupProbe that overrides the default one - ## - customStartupProbe: {} - ## @param primary.lifecycleHooks for the PostgreSQL Primary container to automate configuration before or after startup - ## - lifecycleHooks: {} - ## PostgreSQL Primary resource requests and limits - ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## @param primary.resources.limits The resources limits for the PostgreSQL Primary containers - ## @param primary.resources.requests.memory The requested memory for the PostgreSQL Primary containers - ## @param primary.resources.requests.cpu The requested cpu for the PostgreSQL Primary containers - ## - resources: - limits: {} - requests: - memory: 256Mi - cpu: 250m - ## Pod Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - ## @param primary.podSecurityContext.enabled Enable security context - ## @param primary.podSecurityContext.fsGroup Group ID for the pod - ## - podSecurityContext: - enabled: true - fsGroup: 1001 - ## Container Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - ## @param primary.containerSecurityContext.enabled Enable container security context - ## @param primary.containerSecurityContext.runAsUser User ID for the container - ## - containerSecurityContext: - enabled: true - runAsUser: 1001 - ## @param primary.hostAliases PostgreSQL primary pods host aliases - ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ - ## - hostAliases: [] - ## @param primary.hostNetwork Specify if host network should be enabled for PostgreSQL pod (postgresql primary) - ## - hostNetwork: false - ## @param primary.hostIPC Specify if host IPC should be enabled for PostgreSQL pod (postgresql primary) - ## - hostIPC: false - ## @param primary.labels Map of labels to add to the statefulset (postgresql primary) - ## - labels: {} - ## @param primary.annotations Annotations for PostgreSQL primary pods - ## - annotations: {} - ## @param primary.podLabels Map of labels to add to the pods (postgresql primary) - ## - podLabels: {} - ## @param primary.podAnnotations Map of annotations to add to the pods (postgresql primary) - ## - podAnnotations: {} - ## @param primary.podAffinityPreset PostgreSQL primary pod affinity preset. Ignored if `primary.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 primary.podAntiAffinityPreset PostgreSQL primary pod anti-affinity preset. Ignored if `primary.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 - ## PostgreSQL Primary node affinity preset - ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity - ## - nodeAffinityPreset: - ## @param primary.nodeAffinityPreset.type PostgreSQL primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` - ## - type: "" - ## @param primary.nodeAffinityPreset.key PostgreSQL primary node label key to match Ignored if `primary.affinity` is set. - ## E.g. - ## key: "kubernetes.io/e2e-az-name" - ## - key: "" - ## @param primary.nodeAffinityPreset.values PostgreSQL primary node label values to match. Ignored if `primary.affinity` is set. - ## E.g. - ## values: - ## - e2e-az1 - ## - e2e-az2 - ## - values: [] - ## @param primary.affinity Affinity for PostgreSQL primary pods assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## Note: primary.podAffinityPreset, primary.podAntiAffinityPreset, and primary.nodeAffinityPreset will be ignored when it's set - ## - affinity: {} - ## @param primary.nodeSelector Node labels for PostgreSQL primary pods assignment - ## ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - ## @param primary.tolerations Tolerations for PostgreSQL primary pods assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - ## @param primary.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 primary.priorityClassName Priority Class to use for each pod (postgresql primary) - ## - priorityClassName: "" - ## @param primary.schedulerName Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - schedulerName: "" - ## @param primary.terminationGracePeriodSeconds Seconds PostgreSQL primary pod needs to terminate gracefully - ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods - ## - terminationGracePeriodSeconds: "" - ## @param primary.updateStrategy.type PostgreSQL Primary statefulset strategy type - ## @param primary.updateStrategy.rollingUpdate PostgreSQL Primary statefulset rolling update configuration parameters - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - ## - updateStrategy: - type: RollingUpdate - rollingUpdate: {} - ## @param primary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the PostgreSQL Primary container(s) - ## - extraVolumeMounts: [] - ## @param primary.extraVolumes Optionally specify extra list of additional volumes for the PostgreSQL Primary pod(s) - ## - extraVolumes: [] - ## @param primary.sidecars Add additional sidecar containers to the PostgreSQL Primary pod(s) - ## For example: - ## sidecars: - ## - name: your-image-name - ## image: your-image - ## imagePullPolicy: Always - ## ports: - ## - name: portname - ## containerPort: 1234 - ## - sidecars: [] - ## @param primary.initContainers Add additional init containers to the PostgreSQL Primary pod(s) - ## Example - ## - ## initContainers: - ## - name: do-something - ## image: busybox - ## command: ['do', 'something'] - ## - initContainers: [] - ## @param primary.extraPodSpec Optionally specify extra PodSpec for the PostgreSQL Primary pod(s) - ## - extraPodSpec: {} - ## PostgreSQL Primary service configuration - ## - service: - ## @param primary.service.type Kubernetes Service type - ## - type: ClusterIP - ## @param primary.service.ports.postgresql PostgreSQL service port - ## - ports: - postgresql: 5432 - ## Node ports to expose - ## NOTE: choose port between <30000-32767> - ## @param primary.service.nodePorts.postgresql Node port for PostgreSQL - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - nodePorts: - postgresql: "" - ## @param primary.service.clusterIP Static clusterIP or None for headless services - ## e.g: - ## clusterIP: None - ## - clusterIP: "" - ## @param primary.service.annotations Annotations for PostgreSQL primary service - ## - annotations: {} - ## @param primary.service.loadBalancerIP Load balancer IP if service type is `LoadBalancer` - ## Set the LoadBalancer service type to internal only - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - loadBalancerIP: "" - ## @param primary.service.externalTrafficPolicy Enable client source IP preservation - ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip - ## - externalTrafficPolicy: Cluster - ## @param primary.service.loadBalancerSourceRanges Addresses that are allowed when service is LoadBalancer - ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service - ## - ## loadBalancerSourceRanges: - ## - 10.10.10.0/24 - ## - loadBalancerSourceRanges: [] - ## @param primary.service.extraPorts Extra ports to expose in the PostgreSQL primary service - ## - extraPorts: [] - ## @param primary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP" - ## If "ClientIP", consecutive client requests will be directed to the same Pod - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - ## - sessionAffinity: None - ## @param primary.service.sessionAffinityConfig Additional settings for the sessionAffinity - ## sessionAffinityConfig: - ## clientIP: - ## timeoutSeconds: 300 - ## - sessionAffinityConfig: {} - ## Headless service properties - ## - headless: - ## @param primary.service.headless.annotations Additional custom annotations for headless PostgreSQL primary service - ## - annotations: {} - ## PostgreSQL Primary persistence configuration - ## - persistence: - ## @param primary.persistence.enabled Enable PostgreSQL Primary data persistence using PVC - ## - enabled: true - ## @param primary.persistence.existingClaim Name of an existing PVC to use - ## - existingClaim: "" - ## @param primary.persistence.mountPath The path the volume will be mounted at - ## Note: useful when using custom PostgreSQL images - ## - mountPath: /bitnami/postgresql - ## @param primary.persistence.subPath The subdirectory of the volume to mount to - ## Useful in dev environments and one PV for multiple services - ## - subPath: "" - ## @param primary.persistence.storageClass PVC Storage Class for PostgreSQL Primary data volume - ## 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 primary.persistence.accessModes PVC Access Mode for PostgreSQL volume - ## - accessModes: - - ReadWriteOnce - ## @param primary.persistence.size PVC Storage Request for PostgreSQL volume - ## - size: 8Gi - ## @param primary.persistence.annotations Annotations for the PVC - ## - annotations: {} - ## @param primary.persistence.labels Labels for the PVC - ## - labels: {} - ## @param primary.persistence.selector Selector to match an existing Persistent Volume (this value is evaluated as a template) - ## selector: - ## matchLabels: - ## app: my-app - ## - selector: {} - ## @param primary.persistence.dataSource Custom PVC data source - ## - dataSource: {} - -## @section PostgreSQL read only replica parameters (only used when `architecture` is set to `replication`) -## -readReplicas: - ## @param readReplicas.name Name of the read replicas database (eg secondary, slave, ...) - ## - name: read - ## @param readReplicas.replicaCount Number of PostgreSQL read only replicas - ## - replicaCount: 1 - ## @param readReplicas.extendedConfiguration Extended PostgreSQL read only replicas configuration (appended to main or default configuration) - ## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#allow-settings-to-be-loaded-from-files-other-than-the-default-postgresqlconf - ## - extendedConfiguration: "" - ## @param readReplicas.extraEnvVars Array with extra environment variables to add to PostgreSQL read only nodes - ## e.g: - ## extraEnvVars: - ## - name: FOO - ## value: "bar" - ## - extraEnvVars: [] - ## @param readReplicas.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for PostgreSQL read only nodes - ## - extraEnvVarsCM: "" - ## @param readReplicas.extraEnvVarsSecret Name of existing Secret containing extra env vars for PostgreSQL read only nodes - ## - extraEnvVarsSecret: "" - ## @param readReplicas.command Override default container command (useful when using custom images) - ## - command: [] - ## @param readReplicas.args Override default container args (useful when using custom images) - ## - args: [] - ## Configure extra options for PostgreSQL read only containers' liveness, readiness and startup probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes - ## @param readReplicas.livenessProbe.enabled Enable livenessProbe on PostgreSQL read only containers - ## @param readReplicas.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe - ## @param readReplicas.livenessProbe.periodSeconds Period seconds for livenessProbe - ## @param readReplicas.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe - ## @param readReplicas.livenessProbe.failureThreshold Failure threshold for livenessProbe - ## @param readReplicas.livenessProbe.successThreshold Success threshold for livenessProbe - ## - livenessProbe: - enabled: true - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 6 - successThreshold: 1 - ## @param readReplicas.readinessProbe.enabled Enable readinessProbe on PostgreSQL read only containers - ## @param readReplicas.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe - ## @param readReplicas.readinessProbe.periodSeconds Period seconds for readinessProbe - ## @param readReplicas.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe - ## @param readReplicas.readinessProbe.failureThreshold Failure threshold for readinessProbe - ## @param readReplicas.readinessProbe.successThreshold Success threshold for readinessProbe - ## - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 6 - successThreshold: 1 - ## @param readReplicas.startupProbe.enabled Enable startupProbe on PostgreSQL read only containers - ## @param readReplicas.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe - ## @param readReplicas.startupProbe.periodSeconds Period seconds for startupProbe - ## @param readReplicas.startupProbe.timeoutSeconds Timeout seconds for startupProbe - ## @param readReplicas.startupProbe.failureThreshold Failure threshold for startupProbe - ## @param readReplicas.startupProbe.successThreshold Success threshold for startupProbe - ## - startupProbe: - enabled: false - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 15 - successThreshold: 1 - ## @param readReplicas.customLivenessProbe Custom livenessProbe that overrides the default one - ## - customLivenessProbe: {} - ## @param readReplicas.customReadinessProbe Custom readinessProbe that overrides the default one - ## - customReadinessProbe: {} - ## @param readReplicas.customStartupProbe Custom startupProbe that overrides the default one - ## - customStartupProbe: {} - ## @param readReplicas.lifecycleHooks for the PostgreSQL read only container to automate configuration before or after startup - ## - lifecycleHooks: {} - ## PostgreSQL read only resource requests and limits - ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## @param readReplicas.resources.limits The resources limits for the PostgreSQL read only containers - ## @param readReplicas.resources.requests.memory The requested memory for the PostgreSQL read only containers - ## @param readReplicas.resources.requests.cpu The requested cpu for the PostgreSQL read only containers - ## - resources: - limits: {} - requests: - memory: 256Mi - cpu: 250m - ## Pod Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - ## @param readReplicas.podSecurityContext.enabled Enable security context - ## @param readReplicas.podSecurityContext.fsGroup Group ID for the pod - ## - podSecurityContext: - enabled: true - fsGroup: 1001 - ## Container Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - ## @param readReplicas.containerSecurityContext.enabled Enable container security context - ## @param readReplicas.containerSecurityContext.runAsUser User ID for the container - ## - containerSecurityContext: - enabled: true - runAsUser: 1001 - ## @param readReplicas.hostAliases PostgreSQL read only pods host aliases - ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ - ## - hostAliases: [] - ## @param readReplicas.hostNetwork Specify if host network should be enabled for PostgreSQL pod (PostgreSQL read only) - ## - hostNetwork: false - ## @param readReplicas.hostIPC Specify if host IPC should be enabled for PostgreSQL pod (postgresql primary) - ## - hostIPC: false - ## @param readReplicas.labels Map of labels to add to the statefulset (PostgreSQL read only) - ## - labels: {} - ## @param readReplicas.annotations Annotations for PostgreSQL read only pods - ## - annotations: {} - ## @param readReplicas.podLabels Map of labels to add to the pods (PostgreSQL read only) - ## - podLabels: {} - ## @param readReplicas.podAnnotations Map of annotations to add to the pods (PostgreSQL read only) - ## - podAnnotations: {} - ## @param readReplicas.podAffinityPreset PostgreSQL read only pod affinity preset. Ignored if `primary.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 readReplicas.podAntiAffinityPreset PostgreSQL read only pod anti-affinity preset. Ignored if `primary.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 - ## PostgreSQL read only node affinity preset - ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity - ## - nodeAffinityPreset: - ## @param readReplicas.nodeAffinityPreset.type PostgreSQL read only node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` - ## - type: "" - ## @param readReplicas.nodeAffinityPreset.key PostgreSQL read only node label key to match Ignored if `primary.affinity` is set. - ## E.g. - ## key: "kubernetes.io/e2e-az-name" - ## - key: "" - ## @param readReplicas.nodeAffinityPreset.values PostgreSQL read only node label values to match. Ignored if `primary.affinity` is set. - ## E.g. - ## values: - ## - e2e-az1 - ## - e2e-az2 - ## - values: [] - ## @param readReplicas.affinity Affinity for PostgreSQL read only pods assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## Note: primary.podAffinityPreset, primary.podAntiAffinityPreset, and primary.nodeAffinityPreset will be ignored when it's set - ## - affinity: {} - ## @param readReplicas.nodeSelector Node labels for PostgreSQL read only pods assignment - ## ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - ## @param readReplicas.tolerations Tolerations for PostgreSQL read only pods assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - ## @param readReplicas.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 readReplicas.priorityClassName Priority Class to use for each pod (PostgreSQL read only) - ## - priorityClassName: "" - ## @param readReplicas.schedulerName Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - schedulerName: "" - ## @param readReplicas.terminationGracePeriodSeconds Seconds PostgreSQL read only pod needs to terminate gracefully - ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods - ## - terminationGracePeriodSeconds: "" - ## @param readReplicas.updateStrategy.type PostgreSQL read only statefulset strategy type - ## @param readReplicas.updateStrategy.rollingUpdate PostgreSQL read only statefulset rolling update configuration parameters - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - ## - updateStrategy: - type: RollingUpdate - rollingUpdate: {} - ## @param readReplicas.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the PostgreSQL read only container(s) - ## - extraVolumeMounts: [] - ## @param readReplicas.extraVolumes Optionally specify extra list of additional volumes for the PostgreSQL read only pod(s) - ## - extraVolumes: [] - ## @param readReplicas.sidecars Add additional sidecar containers to the PostgreSQL read only pod(s) - ## For example: - ## sidecars: - ## - name: your-image-name - ## image: your-image - ## imagePullPolicy: Always - ## ports: - ## - name: portname - ## containerPort: 1234 - ## - sidecars: [] - ## @param readReplicas.initContainers Add additional init containers to the PostgreSQL read only pod(s) - ## Example - ## - ## initContainers: - ## - name: do-something - ## image: busybox - ## command: ['do', 'something'] - ## - initContainers: [] - ## @param readReplicas.extraPodSpec Optionally specify extra PodSpec for the PostgreSQL read only pod(s) - ## - extraPodSpec: {} - ## PostgreSQL read only service configuration - ## - service: - ## @param readReplicas.service.type Kubernetes Service type - ## - type: ClusterIP - ## @param readReplicas.service.ports.postgresql PostgreSQL service port - ## - ports: - postgresql: 5432 - ## Node ports to expose - ## NOTE: choose port between <30000-32767> - ## @param readReplicas.service.nodePorts.postgresql Node port for PostgreSQL - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - nodePorts: - postgresql: "" - ## @param readReplicas.service.clusterIP Static clusterIP or None for headless services - ## e.g: - ## clusterIP: None - ## - clusterIP: "" - ## @param readReplicas.service.annotations Annotations for PostgreSQL read only service - ## - annotations: {} - ## @param readReplicas.service.loadBalancerIP Load balancer IP if service type is `LoadBalancer` - ## Set the LoadBalancer service type to internal only - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - loadBalancerIP: "" - ## @param readReplicas.service.externalTrafficPolicy Enable client source IP preservation - ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip - ## - externalTrafficPolicy: Cluster - ## @param readReplicas.service.loadBalancerSourceRanges Addresses that are allowed when service is LoadBalancer - ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service - ## - ## loadBalancerSourceRanges: - ## - 10.10.10.0/24 - ## - loadBalancerSourceRanges: [] - ## @param readReplicas.service.extraPorts Extra ports to expose in the PostgreSQL read only service - ## - extraPorts: [] - ## @param readReplicas.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP" - ## If "ClientIP", consecutive client requests will be directed to the same Pod - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - ## - sessionAffinity: None - ## @param readReplicas.service.sessionAffinityConfig Additional settings for the sessionAffinity - ## sessionAffinityConfig: - ## clientIP: - ## timeoutSeconds: 300 - ## - sessionAffinityConfig: {} - ## Headless service properties - ## - headless: - ## @param readReplicas.service.headless.annotations Additional custom annotations for headless PostgreSQL read only service - ## - annotations: {} - ## PostgreSQL read only persistence configuration - ## - persistence: - ## @param readReplicas.persistence.enabled Enable PostgreSQL read only data persistence using PVC - ## - enabled: true - ## @param readReplicas.persistence.existingClaim Name of an existing PVC to use - ## - existingClaim: "" - ## @param readReplicas.persistence.mountPath The path the volume will be mounted at - ## Note: useful when using custom PostgreSQL images - ## - mountPath: /bitnami/postgresql - ## @param readReplicas.persistence.subPath The subdirectory of the volume to mount to - ## Useful in dev environments and one PV for multiple services - ## - subPath: "" - ## @param readReplicas.persistence.storageClass PVC Storage Class for PostgreSQL read only data volume - ## 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 readReplicas.persistence.accessModes PVC Access Mode for PostgreSQL volume - ## - accessModes: - - ReadWriteOnce - ## @param readReplicas.persistence.size PVC Storage Request for PostgreSQL volume - ## - size: 8Gi - ## @param readReplicas.persistence.annotations Annotations for the PVC - ## - annotations: {} - ## @param readReplicas.persistence.labels Labels for the PVC - ## - labels: {} - ## @param readReplicas.persistence.selector Selector to match an existing Persistent Volume (this value is evaluated as a template) - ## selector: - ## matchLabels: - ## app: my-app - ## - selector: {} - ## @param readReplicas.persistence.dataSource Custom PVC data source - ## - dataSource: {} - -## @section NetworkPolicy parameters -## - -## Add networkpolicies -## -networkPolicy: - ## @param networkPolicy.enabled Enable network policies - ## - enabled: false - ## @param networkPolicy.metrics.enabled Enable network policies for metrics (prometheus) - ## @param networkPolicy.metrics.namespaceSelector [object] Monitoring namespace selector labels. These labels will be used to identify the prometheus' namespace. - ## @param networkPolicy.metrics.podSelector [object] Monitoring pod selector labels. These labels will be used to identify the Prometheus pods. - ## - metrics: - enabled: false - ## e.g: - ## namespaceSelector: - ## label: monitoring - ## - namespaceSelector: {} - ## e.g: - ## podSelector: - ## label: monitoring - ## - podSelector: {} - ## Ingress Rules - ## - ingressRules: - ## @param networkPolicy.ingressRules.primaryAccessOnlyFrom.enabled Enable ingress rule that makes PostgreSQL primary node only accessible from a particular origin. - ## @param networkPolicy.ingressRules.primaryAccessOnlyFrom.namespaceSelector [object] Namespace selector label that is allowed to access the PostgreSQL primary node. This label will be used to identified the allowed namespace(s). - ## @param networkPolicy.ingressRules.primaryAccessOnlyFrom.podSelector [object] Pods selector label that is allowed to access the PostgreSQL primary node. This label will be used to identified the allowed pod(s). - ## @param networkPolicy.ingressRules.primaryAccessOnlyFrom.customRules Custom network policy for the PostgreSQL primary node. - ## - primaryAccessOnlyFrom: - enabled: false - ## e.g: - ## namespaceSelector: - ## label: ingress - ## - namespaceSelector: {} - ## e.g: - ## podSelector: - ## label: access - ## - podSelector: {} - ## custom ingress rules - ## e.g: - ## customRules: - ## - from: - ## - namespaceSelector: - ## matchLabels: - ## label: example - ## - customRules: [] - ## @param networkPolicy.ingressRules.readReplicasAccessOnlyFrom.enabled Enable ingress rule that makes PostgreSQL read-only nodes only accessible from a particular origin. - ## @param networkPolicy.ingressRules.readReplicasAccessOnlyFrom.namespaceSelector [object] Namespace selector label that is allowed to access the PostgreSQL read-only nodes. This label will be used to identified the allowed namespace(s). - ## @param networkPolicy.ingressRules.readReplicasAccessOnlyFrom.podSelector [object] Pods selector label that is allowed to access the PostgreSQL read-only nodes. This label will be used to identified the allowed pod(s). - ## @param networkPolicy.ingressRules.readReplicasAccessOnlyFrom.customRules Custom network policy for the PostgreSQL read-only nodes. - ## - readReplicasAccessOnlyFrom: - enabled: false - ## e.g: - ## namespaceSelector: - ## label: ingress - ## - namespaceSelector: {} - ## e.g: - ## podSelector: - ## label: access - ## - podSelector: {} - ## custom ingress rules - ## e.g: - ## CustomRules: - ## - from: - ## - namespaceSelector: - ## matchLabels: - ## label: example - ## - customRules: [] - ## @param networkPolicy.egressRules.denyConnectionsToExternal Enable egress rule that denies outgoing traffic outside the cluster, except for DNS (port 53). - ## @param networkPolicy.egressRules.customRules Custom network policy rule - ## - egressRules: - # Deny connections to external. This is not compatible with an external database. - denyConnectionsToExternal: false - ## Additional custom egress rules - ## e.g: - ## customRules: - ## - to: - ## - namespaceSelector: - ## matchLabels: - ## label: example - ## - customRules: [] - -## @section Volume Permissions parameters -## - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume(s) mountpoint(s) to 'runAsUser:fsGroup' on each node -## -volumePermissions: - ## @param volumePermissions.enabled Enable init container that changes the owner and group of the persistent volume - ## - enabled: false - ## @param volumePermissions.image.registry Init container volume-permissions image registry - ## @param volumePermissions.image.repository Init container volume-permissions image repository - ## @param volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended) - ## @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/bitnami-shell - tag: 11-debian-11-r115 - 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/ - ## Example: - ## pullSecrets: - ## - myRegistryKeySecretName - ## - pullSecrets: [] - ## Init container resource requests and limits - ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## @param volumePermissions.resources.limits Init container volume-permissions resource limits - ## @param volumePermissions.resources.requests Init container volume-permissions resource requests - ## - resources: - limits: {} - requests: {} - ## Init container' Security Context - ## Note: the chown of the data folder is done to containerSecurityContext.runAsUser - ## and not the below volumePermissions.containerSecurityContext.runAsUser - ## @param volumePermissions.containerSecurityContext.runAsUser User ID for the init container - ## - containerSecurityContext: - runAsUser: 0 - -## @section Other Parameters -## - -## @param serviceBindings.enabled Create secret for service binding (Experimental) -## Ref: https://servicebinding.io/service-provider/ -## -serviceBindings: - enabled: false - -## Service account for PostgreSQL to use. -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -## -serviceAccount: - ## @param serviceAccount.create Enable creation of ServiceAccount for PostgreSQL pod - ## - create: false - ## @param serviceAccount.name The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the common.names.fullname template - ## - name: "" - ## @param serviceAccount.automountServiceAccountToken Allows auto mount of ServiceAccountToken on the serviceAccount created - ## Can be set to false if pods using this serviceAccount do not need to use K8s API - ## - automountServiceAccountToken: true - ## @param serviceAccount.annotations Additional custom annotations for the ServiceAccount - ## - annotations: {} -## Creates role for ServiceAccount -## @param rbac.create Create Role and RoleBinding (required for PSP to work) -## -rbac: - create: false - ## @param rbac.rules Custom RBAC rules to set - ## e.g: - ## rules: - ## - apiGroups: - ## - "" - ## resources: - ## - pods - ## verbs: - ## - get - ## - list - ## - rules: [] -## Pod Security Policy -## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ -## @param psp.create Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later -## -psp: - create: false - -## @section Metrics Parameters -## - -metrics: - ## @param metrics.enabled Start a prometheus exporter - ## - enabled: false - ## @param metrics.image.registry PostgreSQL Prometheus Exporter image registry - ## @param metrics.image.repository PostgreSQL Prometheus Exporter image repository - ## @param metrics.image.tag PostgreSQL Prometheus Exporter image tag (immutable tags are recommended) - ## @param metrics.image.digest PostgreSQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag - ## @param metrics.image.pullPolicy PostgreSQL Prometheus Exporter image pull policy - ## @param metrics.image.pullSecrets Specify image pull secrets - ## - image: - registry: docker.io - repository: bitnami/postgres-exporter - tag: 0.12.0-debian-11-r86 - 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/ - ## Example: - ## pullSecrets: - ## - myRegistryKeySecretName - ## - pullSecrets: [] - ## @param metrics.customMetrics Define additional custom metrics - ## ref: https://github.com/wrouesnel/postgres_exporter#adding-new-metrics-via-a-config-file - ## customMetrics: - ## pg_database: - ## query: "SELECT d.datname AS name, CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') THEN pg_catalog.pg_database_size(d.datname) ELSE 0 END AS size_bytes FROM pg_catalog.pg_database d where datname not in ('template0', 'template1', 'postgres')" - ## metrics: - ## - name: - ## usage: "LABEL" - ## description: "Name of the database" - ## - size_bytes: - ## usage: "GAUGE" - ## description: "Size of the database in bytes" - ## - customMetrics: {} - ## @param metrics.extraEnvVars Extra environment variables to add to PostgreSQL Prometheus exporter - ## see: https://github.com/wrouesnel/postgres_exporter#environment-variables - ## For example: - ## extraEnvVars: - ## - name: PG_EXPORTER_DISABLE_DEFAULT_METRICS - ## value: "true" - ## - extraEnvVars: [] - ## PostgreSQL Prometheus exporter containers' Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container - ## @param metrics.containerSecurityContext.enabled Enable PostgreSQL Prometheus exporter containers' Security Context - ## @param metrics.containerSecurityContext.runAsUser Set PostgreSQL Prometheus exporter containers' Security Context runAsUser - ## @param metrics.containerSecurityContext.runAsNonRoot Set PostgreSQL Prometheus exporter containers' Security Context runAsNonRoot - ## - containerSecurityContext: - enabled: true - runAsUser: 1001 - runAsNonRoot: true - ## Configure extra options for PostgreSQL Prometheus exporter containers' liveness, readiness and startup probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes - ## @param metrics.livenessProbe.enabled Enable livenessProbe on PostgreSQL Prometheus exporter containers - ## @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: true - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 6 - successThreshold: 1 - ## @param metrics.readinessProbe.enabled Enable readinessProbe on PostgreSQL Prometheus exporter containers - ## @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: true - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 6 - successThreshold: 1 - ## @param metrics.startupProbe.enabled Enable startupProbe on PostgreSQL Prometheus exporter containers - ## @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: 10 - periodSeconds: 10 - timeoutSeconds: 1 - 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 PostgreSQL Prometheus exporter metrics container port - ## - containerPorts: - metrics: 9187 - ## PostgreSQL Prometheus exporter resource requests and limits - ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## @param metrics.resources.limits The resources limits for the PostgreSQL Prometheus exporter container - ## @param metrics.resources.requests The requested resources for the PostgreSQL Prometheus exporter container - ## - resources: - limits: {} - requests: {} - ## Service configuration - ## - service: - ## @param metrics.service.ports.metrics PostgreSQL Prometheus Exporter service port - ## - ports: - metrics: 9187 - ## @param metrics.service.clusterIP Static clusterIP or None for headless services - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address - ## - clusterIP: "" - ## @param metrics.service.sessionAffinity Control where client requests go, to the same pod or round-robin - ## Values: ClientIP or None - ## ref: https://kubernetes.io/docs/user-guide/services/ - ## - sessionAffinity: None - ## @param metrics.service.annotations [object] Annotations for Prometheus to auto-discover the metrics endpoint - ## - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "{{ .Values.metrics.service.ports.metrics }}" - ## Prometheus Operator ServiceMonitor configuration - ## - serviceMonitor: - ## @param metrics.serviceMonitor.enabled Create ServiceMonitor Resource for scraping metrics using Prometheus Operator - ## - enabled: false - ## @param metrics.serviceMonitor.namespace Namespace for the ServiceMonitor Resource (defaults to the Release Namespace) - ## - namespace: "" - ## @param metrics.serviceMonitor.interval Interval at which metrics should be scraped. - ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint - ## - interval: "" - ## @param metrics.serviceMonitor.scrapeTimeout Timeout after which the scrape is ended - ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint - ## - scrapeTimeout: "" - ## @param metrics.serviceMonitor.labels Additional labels that can be used so ServiceMonitor will be discovered by Prometheus - ## - labels: {} - ## @param metrics.serviceMonitor.selector Prometheus instance selector labels - ## ref: https://github.com/bitnami/charts/tree/main/bitnami/prometheus-operator#prometheus-configuration - ## - selector: {} - ## @param metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping - ## - relabelings: [] - ## @param metrics.serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion - ## - metricRelabelings: [] - ## @param metrics.serviceMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint - ## - honorLabels: false - ## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus. - ## - jobLabel: "" - ## Custom PrometheusRule to be defined - ## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart - ## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions - ## - prometheusRule: - ## @param metrics.prometheusRule.enabled Create a PrometheusRule for Prometheus Operator - ## - enabled: false - ## @param metrics.prometheusRule.namespace Namespace for the PrometheusRule Resource (defaults to the Release Namespace) - ## - namespace: "" - ## @param metrics.prometheusRule.labels Additional labels that can be used so PrometheusRule will be discovered by Prometheus - ## - labels: {} - ## @param metrics.prometheusRule.rules PrometheusRule definitions - ## Make sure to constraint the rules to the current postgresql service. - ## rules: - ## - alert: HugeReplicationLag - ## expr: pg_replication_lag{service="{{ printf "%s-metrics" (include "common.names.fullname" .) }}"} / 3600 > 1 - ## for: 1m - ## labels: - ## severity: critical - ## annotations: - ## description: replication for {{ include "common.names.fullname" . }} PostgreSQL is lagging by {{ "{{ $value }}" }} hour(s). - ## summary: PostgreSQL replication is lagging by {{ "{{ $value }}" }} hour(s). - ## - rules: [] diff --git a/charts/gitlab/gitlab/charts/prometheus/.helmignore b/charts/gitlab/gitlab/charts/prometheus/.helmignore deleted file mode 100644 index 825c00779..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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 - -OWNERS diff --git a/charts/gitlab/gitlab/charts/prometheus/Chart.lock b/charts/gitlab/gitlab/charts/prometheus/Chart.lock deleted file mode 100644 index e155027d0..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: kube-state-metrics - repository: https://prometheus-community.github.io/helm-charts - version: 4.22.1 -digest: sha256:04f11ab7b2ecb900626848ab03c1282138bf25129ead625dfc9ee2b691c64613 -generated: "2022-11-04T08:29:08.939956248Z" diff --git a/charts/gitlab/gitlab/charts/prometheus/Chart.yaml b/charts/gitlab/gitlab/charts/prometheus/Chart.yaml deleted file mode 100644 index 7905f2bfd..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/Chart.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: v2 -appVersion: 2.39.1 -dependencies: -- condition: kubeStateMetrics.enabled - name: kube-state-metrics - repository: https://prometheus-community.github.io/helm-charts - version: 4.22.* -description: Prometheus is a monitoring system and time series database. -home: https://prometheus.io/ -icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png -maintainers: -- email: gianrubio@gmail.com - name: gianrubio -- email: zanhsieh@gmail.com - name: zanhsieh -- email: miroslav.hadzhiev@gmail.com - name: Xtigyro -- email: naseem@transit.app - name: naseemkullah -name: prometheus -sources: -- https://github.com/prometheus/alertmanager -- https://github.com/prometheus/prometheus -- https://github.com/prometheus/pushgateway -- https://github.com/prometheus/node_exporter -- https://github.com/kubernetes/kube-state-metrics -type: application -version: 15.18.0 diff --git a/charts/gitlab/gitlab/charts/prometheus/README.md b/charts/gitlab/gitlab/charts/prometheus/README.md deleted file mode 100644 index d8a1e9ab2..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/README.md +++ /dev/null @@ -1,226 +0,0 @@ -# Prometheus - -[Prometheus](https://prometheus.io/), a [Cloud Native Computing Foundation](https://cncf.io/) project, is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true. - -This chart bootstraps a [Prometheus](https://prometheus.io/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -## Prerequisites - -- Kubernetes 1.16+ -- Helm 3+ - -## Get Repo Info - -```console -helm repo add prometheus-community https://prometheus-community.github.io/helm-charts -helm repo update -``` - -_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ - -## Install Chart - -```console -helm install [RELEASE_NAME] prometheus-community/prometheus -``` - -_See [configuration](#configuration) below._ - -_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._ - -## Dependencies - -By default this chart installs additional, dependent charts: - -- [kube-state-metrics](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics) - -To disable the dependency during installation, set `kubeStateMetrics.enabled` to `false`. - -_See [helm dependency](https://helm.sh/docs/helm/helm_dependency/) for command documentation._ - -## Uninstall Chart - -```console -helm uninstall [RELEASE_NAME] -``` - -This removes all the Kubernetes components associated with the chart and deletes the release. - -_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._ - -## Upgrading Chart - -```console -helm upgrade [RELEASE_NAME] [CHART] --install -``` - -_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._ - -### To 15.0 - -Version 15.0.0 changes the relabeling config, aligning it with the [Prometheus community conventions](https://github.com/prometheus/prometheus/pull/9832). If you've made manual changes to the relabeling config, you have to adapt your changes. - -Before you update please execute the following command, to be able to update kube-state-metrics: - -```bash -kubectl delete deployments.apps -l app.kubernetes.io/instance=prometheus,app.kubernetes.io/name=kube-state-metrics --cascade=orphan -``` - -### To 9.0 - -Version 9.0 adds a new option to enable or disable the Prometheus Server. This supports the use case of running a Prometheus server in one k8s cluster and scraping exporters in another cluster while using the same chart for each deployment. To install the server `server.enabled` must be set to `true`. - -### To 5.0 - -As of version 5.0, this chart uses Prometheus 2.x. This version of prometheus introduces a new data format and is not compatible with prometheus 1.x. It is recommended to install this as a new release, as updating existing releases will not work. See the [prometheus docs](https://prometheus.io/docs/prometheus/latest/migration/#storage) for instructions on retaining your old data. - -Prometheus version 2.x has made changes to alertmanager, storage and recording rules. Check out the migration guide [here](https://prometheus.io/docs/prometheus/2.0/migration/). - -Users of this chart will need to update their alerting rules to the new format before they can upgrade. - -### Example Migration - -Assuming you have an existing release of the prometheus chart, named `prometheus-old`. In order to update to prometheus 2.x while keeping your old data do the following: - -1. Update the `prometheus-old` release. Disable scraping on every component besides the prometheus server, similar to the configuration below: - - ```yaml - alertmanager: - enabled: false - alertmanagerFiles: - alertmanager.yml: "" - kubeStateMetrics: - enabled: false - nodeExporter: - enabled: false - pushgateway: - enabled: false - server: - extraArgs: - storage.local.retention: 720h - serverFiles: - alerts: "" - prometheus.yml: "" - rules: "" - ``` - -1. Deploy a new release of the chart with version 5.0+ using prometheus 2.x. In the values.yaml set the scrape config as usual, and also add the `prometheus-old` instance as a remote-read target. - - ```yaml - prometheus.yml: - ... - remote_read: - - url: http://prometheus-old/api/v1/read - ... - ``` - - Old data will be available when you query the new prometheus instance. - -## Configuration - -See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands: - -```console -helm show values prometheus-community/prometheus -``` - -You may similarly use the above configuration commands on each chart [dependency](#dependencies) to see it's configurations. - -### Scraping Pod Metrics via Annotations - -This chart uses a default configuration that causes prometheus to scrape a variety of kubernetes resource types, provided they have the correct annotations. In this section we describe how to configure pods to be scraped; for information on how other resource types can be scraped you can do a `helm template` to get the kubernetes resource definitions, and then reference the prometheus configuration in the ConfigMap against the prometheus documentation for [relabel_config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) and [kubernetes_sd_config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config). - -In order to get prometheus to scrape pods, you must add annotations to the the pods as below: - -```yaml -metadata: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "8080" -``` - -You should adjust `prometheus.io/path` based on the URL that your pod serves metrics from. `prometheus.io/port` should be set to the port that your pod serves metrics from. Note that the values for `prometheus.io/scrape` and `prometheus.io/port` must be enclosed in double quotes. - -### Sharing Alerts Between Services - -Note that when [installing](#install-chart) or [upgrading](#upgrading-chart) you may use multiple values override files. This is particularly useful when you have alerts belonging to multiple services in the cluster. For example, - -```yaml -# values.yaml -# ... - -# service1-alert.yaml -serverFiles: - alerts: - service1: - - alert: anAlert - # ... - -# service2-alert.yaml -serverFiles: - alerts: - service2: - - alert: anAlert - # ... -``` - -```console -helm install [RELEASE_NAME] prometheus-community/prometheus -f values.yaml -f service1-alert.yaml -f service2-alert.yaml -``` - -### RBAC Configuration - -Roles and RoleBindings resources will be created automatically for `server` service. - -To manually setup RBAC you need to set the parameter `rbac.create=false` and specify the service account to be used for each service by setting the parameters: `serviceAccounts.{{ component }}.create` to `false` and `serviceAccounts.{{ component }}.name` to the name of a pre-existing service account. - -> **Tip**: You can refer to the default `*-clusterrole.yaml` and `*-clusterrolebinding.yaml` files in [templates](templates/) to customize your own. - -### ConfigMap Files - -AlertManager is configured through [alertmanager.yml](https://prometheus.io/docs/alerting/configuration/). This file (and any others listed in `alertmanagerFiles`) will be mounted into the `alertmanager` pod. - -Prometheus is configured through [prometheus.yml](https://prometheus.io/docs/operating/configuration/). This file (and any others listed in `serverFiles`) will be mounted into the `server` pod. - -### Ingress TLS - -If your cluster allows automatic creation/retrieval of TLS certificates (e.g. [cert-manager](https://github.com/jetstack/cert-manager)), please refer to the documentation for that mechanism. - -To manually configure TLS, first create/retrieve a key & certificate pair for the address(es) you wish to protect. Then create a TLS secret in the namespace: - -```console -kubectl create secret tls prometheus-server-tls --cert=path/to/tls.cert --key=path/to/tls.key -``` - -Include the secret's name, along with the desired hostnames, in the alertmanager/server Ingress TLS section of your custom `values.yaml` file: - -```yaml -server: - ingress: - ## If true, Prometheus server Ingress will be created - ## - enabled: true - - ## Prometheus server Ingress hostnames - ## Must be provided if Ingress is enabled - ## - hosts: - - prometheus.domain.com - - ## Prometheus server Ingress TLS configuration - ## Secrets must be manually created in the namespace - ## - tls: - - secretName: prometheus-server-tls - hosts: - - prometheus.domain.com -``` - -### NetworkPolicy - -Enabling Network Policy for Prometheus will secure connections to Alert Manager and Kube State Metrics by only accepting connections from Prometheus Server. All inbound connections to Prometheus Server are still allowed. - -To enable network policy for Prometheus, install a networking plugin that implements the Kubernetes NetworkPolicy spec, and set `networkPolicy.enabled` to true. - -If NetworkPolicy is enabled for Prometheus' scrape targets, you may also need to manually create a networkpolicy which allows it. diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/.helmignore b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/Chart.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/Chart.yaml deleted file mode 100644 index 93c119701..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/Chart.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v2 -appVersion: 2.6.0 -description: Install kube-state-metrics to generate and expose cluster-level metrics -home: https://github.com/kubernetes/kube-state-metrics/ -keywords: -- metric -- monitoring -- prometheus -- kubernetes -maintainers: -- email: tariq.ibrahim@mulesoft.com - name: tariq1890 -- email: manuel@rueg.eu - name: mrueg -- email: davidcalvertfr@gmail.com - name: dotdc -name: kube-state-metrics -sources: -- https://github.com/kubernetes/kube-state-metrics/ -type: application -version: 4.22.1 diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/README.md b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/README.md deleted file mode 100644 index 7c2e16918..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# kube-state-metrics Helm Chart - -Installs the [kube-state-metrics agent](https://github.com/kubernetes/kube-state-metrics). - -## Get Repo Info - -```console -helm repo add prometheus-community https://prometheus-community.github.io/helm-charts -helm repo update -``` - -_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ - -## Install Chart - -```console -helm install [RELEASE_NAME] prometheus-community/kube-state-metrics [flags] -``` - -_See [configuration](#configuration) below._ - -_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._ - -## Uninstall Chart - -```console -helm uninstall [RELEASE_NAME] -``` - -This removes all the Kubernetes components associated with the chart and deletes the release. - -_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._ - -## Upgrading Chart - -```console -helm upgrade [RELEASE_NAME] prometheus-community/kube-state-metrics [flags] -``` - -_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._ - -### Migrating from stable/kube-state-metrics and kubernetes/kube-state-metrics - -You can upgrade in-place: - -1. [get repo info](#get-repo-info) -1. [upgrade](#upgrading-chart) your existing release name using the new chart repo - - -## Upgrading to v3.0.0 - -v3.0.0 includes kube-state-metrics v2.0, see the [changelog](https://github.com/kubernetes/kube-state-metrics/blob/release-2.0/CHANGELOG.md) for major changes on the application-side. - -The upgraded chart now the following changes: -* Dropped support for helm v2 (helm v3 or later is required) -* collectors key was renamed to resources -* namespace key was renamed to namespaces - - -## Configuration - -See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments: - -```console -helm show values prometheus-community/kube-state-metrics -``` - -You may also run `helm show values` on this chart's [dependencies](#dependencies) for additional options. diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/NOTES.txt b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/NOTES.txt deleted file mode 100644 index 5a646e0cc..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/NOTES.txt +++ /dev/null @@ -1,10 +0,0 @@ -kube-state-metrics is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects. -The exposed metrics can be found here: -https://github.com/kubernetes/kube-state-metrics/blob/master/docs/README.md#exposed-metrics - -The metrics are exported on the HTTP endpoint /metrics on the listening port. -In your case, {{ template "kube-state-metrics.fullname" . }}.{{ template "kube-state-metrics.namespace" . }}.svc.cluster.local:{{ .Values.service.port }}/metrics - -They are served either as plaintext or protobuf depending on the Accept header. -They are designed to be consumed either by Prometheus itself or by a scraper that is compatible with scraping a Prometheus client endpoint. - diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/_helpers.tpl deleted file mode 100644 index 0d193fbc0..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/_helpers.tpl +++ /dev/null @@ -1,101 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "kube-state-metrics.name" -}} -{{- default .Chart.Name .Values.nameOverride | 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 "kube-state-metrics.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "kube-state-metrics.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "kube-state-metrics.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Allow the release namespace to be overridden for multi-namespace deployments in combined charts -*/}} -{{- define "kube-state-metrics.namespace" -}} - {{- if .Values.namespaceOverride -}} - {{- .Values.namespaceOverride -}} - {{- else -}} - {{- .Release.Namespace -}} - {{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "kube-state-metrics.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Generate basic labels -*/}} -{{- define "kube-state-metrics.labels" }} -helm.sh/chart: {{ template "kube-state-metrics.chart" . }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -app.kubernetes.io/component: metrics -app.kubernetes.io/part-of: {{ template "kube-state-metrics.name" . }} -{{- include "kube-state-metrics.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -{{- if .Values.customLabels }} -{{ toYaml .Values.customLabels }} -{{- end }} -{{- if .Values.releaseLabel }} -release: {{ .Release.Name }} -{{- end }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "kube-state-metrics.selectorLabels" }} -app.kubernetes.io/name: {{ include "kube-state-metrics.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* Sets default scrape limits for servicemonitor */}} -{{- define "servicemonitor.scrapeLimits" -}} -{{- with .sampleLimit }} -sampleLimit: {{ . }} -{{- end }} -{{- with .targetLimit }} -targetLimit: {{ . }} -{{- end }} -{{- with .labelLimit }} -labelLimit: {{ . }} -{{- end }} -{{- with .labelNameLengthLimit }} -labelNameLengthLimit: {{ . }} -{{- end }} -{{- with .labelValueLengthLimit }} -labelValueLengthLimit: {{ . }} -{{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/clusterrolebinding.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/clusterrolebinding.yaml deleted file mode 100644 index cf9f628d0..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if and .Values.rbac.create .Values.rbac.useClusterRole -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} - name: {{ template "kube-state-metrics.fullname" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole -{{- if .Values.rbac.useExistingRole }} - name: {{ .Values.rbac.useExistingRole }} -{{- else }} - name: {{ template "kube-state-metrics.fullname" . }} -{{- end }} -subjects: -- kind: ServiceAccount - name: {{ template "kube-state-metrics.serviceAccountName" . }} - namespace: {{ template "kube-state-metrics.namespace" . }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/deployment.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/deployment.yaml deleted file mode 100644 index e529d3fcc..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/deployment.yaml +++ /dev/null @@ -1,179 +0,0 @@ -apiVersion: apps/v1 -{{- if .Values.autosharding.enabled }} -kind: StatefulSet -{{- else }} -kind: Deployment -{{- end }} -metadata: - name: {{ template "kube-state-metrics.fullname" . }} - namespace: {{ template "kube-state-metrics.namespace" . }} - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} - {{- if .Values.annotations }} - annotations: -{{ toYaml .Values.annotations | indent 4 }} - {{- end }} -spec: - selector: - matchLabels: - {{- include "kube-state-metrics.selectorLabels" . | indent 6 }} - replicas: {{ .Values.replicas }} - {{- if .Values.autosharding.enabled }} - serviceName: {{ template "kube-state-metrics.fullname" . }} - volumeClaimTemplates: [] - {{- end }} - template: - metadata: - labels: - {{- include "kube-state-metrics.labels" . | indent 8 }} - {{- if .Values.podAnnotations }} - annotations: -{{ toYaml .Values.podAnnotations | indent 8 }} - {{- end }} - spec: - hostNetwork: {{ .Values.hostNetwork }} - serviceAccountName: {{ template "kube-state-metrics.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: {{- omit .Values.securityContext "enabled" | toYaml | nindent 8 }} - {{- end }} - {{- if .Values.priorityClassName }} - priorityClassName: {{ .Values.priorityClassName }} - {{- end }} - containers: - - name: {{ template "kube-state-metrics.name" . }} - {{- if .Values.autosharding.enabled }} - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - {{- end }} - args: - {{- if .Values.extraArgs }} - {{- .Values.extraArgs | toYaml | nindent 8 }} - {{- end }} - {{- if .Values.service.port }} - - --port={{ .Values.service.port | default 8080}} - {{- end }} - {{- if .Values.collectors }} - - --resources={{ .Values.collectors | join "," }} - {{- end }} - {{- if .Values.metricLabelsAllowlist }} - - --metric-labels-allowlist={{ .Values.metricLabelsAllowlist | join "," }} - {{- end }} - {{- if .Values.metricAnnotationsAllowList }} - - --metric-annotations-allowlist={{ .Values.metricAnnotationsAllowList | join "," }} - {{- end }} - {{- if .Values.metricAllowlist }} - - --metric-allowlist={{ .Values.metricAllowlist | join "," }} - {{- end }} - {{- if .Values.metricDenylist }} - - --metric-denylist={{ .Values.metricDenylist | join "," }} - {{- end }} - {{- $namespaces := list }} - {{- if .Values.namespaces }} - {{- range $ns := join "," .Values.namespaces | split "," }} - {{- $namespaces = append $namespaces (tpl $ns $) }} - {{- end }} - {{- end }} - {{- if .Values.releaseNamespace }} - {{- $namespaces = append $namespaces ( include "kube-state-metrics.namespace" . ) }} - {{- end }} - {{- if $namespaces }} - - --namespaces={{ $namespaces | mustUniq | join "," }} - {{- end }} - {{- if .Values.namespacesDenylist }} - - --namespaces-denylist={{ tpl (.Values.namespacesDenylist | join ",") $ }} - {{- end }} - {{- if .Values.autosharding.enabled }} - - --pod=$(POD_NAME) - - --pod-namespace=$(POD_NAMESPACE) - {{- end }} - {{- if .Values.kubeconfig.enabled }} - - --kubeconfig=/opt/k8s/.kube/config - {{- end }} - {{- if .Values.selfMonitor.telemetryHost }} - - --telemetry-host={{ .Values.selfMonitor.telemetryHost }} - {{- end }} - {{- if .Values.selfMonitor.telemetryPort }} - - --telemetry-port={{ .Values.selfMonitor.telemetryPort | default 8081 }} - {{- end }} - {{- if or (.Values.kubeconfig.enabled) (.Values.volumeMounts) }} - volumeMounts: - {{- if .Values.kubeconfig.enabled }} - - name: kubeconfig - mountPath: /opt/k8s/.kube/ - readOnly: true - {{- end }} - {{- if .Values.volumeMounts }} -{{ toYaml .Values.volumeMounts | indent 8 }} - {{- end }} - {{- end }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.image.sha }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}@sha256:{{ .Values.image.sha }}" - {{- else }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - {{- end }} - ports: - - containerPort: {{ .Values.service.port | default 8080}} - name: "http" - {{- if .Values.selfMonitor.enabled }} - - containerPort: {{ .Values.selfMonitor.telemetryPort | default 8081 }} - name: "metrics" - {{- end }} - livenessProbe: - httpGet: - path: /healthz - port: {{ .Values.service.port | default 8080}} - initialDelaySeconds: 5 - timeoutSeconds: 5 - readinessProbe: - httpGet: - path: / - port: {{ .Values.service.port | default 8080}} - initialDelaySeconds: 5 - timeoutSeconds: 5 - {{- if .Values.resources }} - resources: -{{ toYaml .Values.resources | indent 10 }} -{{- end }} -{{- if .Values.containerSecurityContext }} - securityContext: -{{ toYaml .Values.containerSecurityContext | indent 10 }} -{{- end }} -{{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - {{- if .Values.affinity }} - affinity: -{{ toYaml .Values.affinity | indent 8 }} - {{- end }} - {{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 8 }} - {{- end }} - {{- if .Values.topologySpreadConstraints }} - topologySpreadConstraints: -{{ toYaml .Values.topologySpreadConstraints | indent 8 }} - {{- end }} - {{- if or (.Values.kubeconfig.enabled) (.Values.volumes) }} - volumes: - {{- if .Values.kubeconfig.enabled}} - - name: kubeconfig - secret: - secretName: {{ template "kube-state-metrics.fullname" . }}-kubeconfig - {{- end }} - {{- if .Values.volumes }} -{{ toYaml .Values.volumes | indent 8 }} - {{- end }} - {{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/kubeconfig-secret.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/kubeconfig-secret.yaml deleted file mode 100644 index 6af008450..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/kubeconfig-secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.kubeconfig.enabled -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "kube-state-metrics.fullname" . }}-kubeconfig - namespace: {{ template "kube-state-metrics.namespace" . }} - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} -type: Opaque -data: - config: '{{ .Values.kubeconfig.secret }}' -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/pdb.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/pdb.yaml deleted file mode 100644 index 3771b511d..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/pdb.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.podDisruptionBudget -}} -{{ if $.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" -}} -apiVersion: policy/v1 -{{- else -}} -apiVersion: policy/v1beta1 -{{- end }} -kind: PodDisruptionBudget -metadata: - name: {{ template "kube-state-metrics.fullname" . }} - namespace: {{ template "kube-state-metrics.namespace" . }} - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} -spec: - selector: - matchLabels: - app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }} -{{ toYaml .Values.podDisruptionBudget | indent 2 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/podsecuritypolicy.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/podsecuritypolicy.yaml deleted file mode 100644 index 8905e113e..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/podsecuritypolicy.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if and .Values.podSecurityPolicy.enabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "kube-state-metrics.fullname" . }} - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} -{{- if .Values.podSecurityPolicy.annotations }} - annotations: -{{ toYaml .Values.podSecurityPolicy.annotations | indent 4 }} -{{- end }} -spec: - privileged: false - volumes: - - 'secret' -{{- if .Values.podSecurityPolicy.additionalVolumes }} -{{ toYaml .Values.podSecurityPolicy.additionalVolumes | indent 4 }} -{{- end }} - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAsNonRoot' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - readOnlyRootFilesystem: false -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/psp-clusterrole.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/psp-clusterrole.yaml deleted file mode 100644 index 654e4a3d5..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/psp-clusterrole.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.podSecurityPolicy.enabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} - name: psp-{{ template "kube-state-metrics.fullname" . }} -rules: -{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} -{{- if semverCompare "> 1.15.0-0" $kubeTargetVersion }} -- apiGroups: ['policy'] -{{- else }} -- apiGroups: ['extensions'] -{{- end }} - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: - - {{ template "kube-state-metrics.fullname" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/psp-clusterrolebinding.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/psp-clusterrolebinding.yaml deleted file mode 100644 index 5b62a18bd..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/psp-clusterrolebinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.podSecurityPolicy.enabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} - name: psp-{{ template "kube-state-metrics.fullname" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: psp-{{ template "kube-state-metrics.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "kube-state-metrics.serviceAccountName" . }} - namespace: {{ template "kube-state-metrics.namespace" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/role.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/role.yaml deleted file mode 100644 index 6474914fa..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/role.yaml +++ /dev/null @@ -1,196 +0,0 @@ -{{- if and (eq .Values.rbac.create true) (not .Values.rbac.useExistingRole) -}} -{{- range (ternary (join "," .Values.namespaces | split "," ) (list "") (eq $.Values.rbac.useClusterRole false)) }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -{{- if eq $.Values.rbac.useClusterRole false }} -kind: Role -{{- else }} -kind: ClusterRole -{{- end }} -metadata: - labels: - {{- include "kube-state-metrics.labels" $ | indent 4 }} - name: {{ template "kube-state-metrics.fullname" $ }} -{{- if eq $.Values.rbac.useClusterRole false }} - namespace: {{ . }} -{{- end }} -rules: -{{ if has "certificatesigningrequests" $.Values.collectors }} -- apiGroups: ["certificates.k8s.io"] - resources: - - certificatesigningrequests - verbs: ["list", "watch"] -{{ end -}} -{{ if has "configmaps" $.Values.collectors }} -- apiGroups: [""] - resources: - - configmaps - verbs: ["list", "watch"] -{{ end -}} -{{ if has "cronjobs" $.Values.collectors }} -- apiGroups: ["batch"] - resources: - - cronjobs - verbs: ["list", "watch"] -{{ end -}} -{{ if has "daemonsets" $.Values.collectors }} -- apiGroups: ["extensions", "apps"] - resources: - - daemonsets - verbs: ["list", "watch"] -{{ end -}} -{{ if has "deployments" $.Values.collectors }} -- apiGroups: ["extensions", "apps"] - resources: - - deployments - verbs: ["list", "watch"] -{{ end -}} -{{ if has "endpoints" $.Values.collectors }} -- apiGroups: [""] - resources: - - endpoints - verbs: ["list", "watch"] -{{ end -}} -{{ if has "horizontalpodautoscalers" $.Values.collectors }} -- apiGroups: ["autoscaling"] - resources: - - horizontalpodautoscalers - verbs: ["list", "watch"] -{{ end -}} -{{ if has "ingresses" $.Values.collectors }} -- apiGroups: ["extensions", "networking.k8s.io"] - resources: - - ingresses - verbs: ["list", "watch"] -{{ end -}} -{{ if has "jobs" $.Values.collectors }} -- apiGroups: ["batch"] - resources: - - jobs - verbs: ["list", "watch"] -{{ end -}} -{{ if has "leases" $.Values.collectors }} -- apiGroups: ["coordination.k8s.io"] - resources: - - leases - verbs: ["list", "watch"] -{{ end -}} -{{ if has "limitranges" $.Values.collectors }} -- apiGroups: [""] - resources: - - limitranges - verbs: ["list", "watch"] -{{ end -}} -{{ if has "mutatingwebhookconfigurations" $.Values.collectors }} -- apiGroups: ["admissionregistration.k8s.io"] - resources: - - mutatingwebhookconfigurations - verbs: ["list", "watch"] -{{ end -}} -{{ if has "namespaces" $.Values.collectors }} -- apiGroups: [""] - resources: - - namespaces - verbs: ["list", "watch"] -{{ end -}} -{{ if has "networkpolicies" $.Values.collectors }} -- apiGroups: ["networking.k8s.io"] - resources: - - networkpolicies - verbs: ["list", "watch"] -{{ end -}} -{{ if has "nodes" $.Values.collectors }} -- apiGroups: [""] - resources: - - nodes - verbs: ["list", "watch"] -{{ end -}} -{{ if has "persistentvolumeclaims" $.Values.collectors }} -- apiGroups: [""] - resources: - - persistentvolumeclaims - verbs: ["list", "watch"] -{{ end -}} -{{ if has "persistentvolumes" $.Values.collectors }} -- apiGroups: [""] - resources: - - persistentvolumes - verbs: ["list", "watch"] -{{ end -}} -{{ if has "poddisruptionbudgets" $.Values.collectors }} -- apiGroups: ["policy"] - resources: - - poddisruptionbudgets - verbs: ["list", "watch"] -{{ end -}} -{{ if has "pods" $.Values.collectors }} -- apiGroups: [""] - resources: - - pods - verbs: ["list", "watch"] -{{ end -}} -{{ if has "replicasets" $.Values.collectors }} -- apiGroups: ["extensions", "apps"] - resources: - - replicasets - verbs: ["list", "watch"] -{{ end -}} -{{ if has "replicationcontrollers" $.Values.collectors }} -- apiGroups: [""] - resources: - - replicationcontrollers - verbs: ["list", "watch"] -{{ end -}} -{{ if has "resourcequotas" $.Values.collectors }} -- apiGroups: [""] - resources: - - resourcequotas - verbs: ["list", "watch"] -{{ end -}} -{{ if has "secrets" $.Values.collectors }} -- apiGroups: [""] - resources: - - secrets - verbs: ["list", "watch"] -{{ end -}} -{{ if has "services" $.Values.collectors }} -- apiGroups: [""] - resources: - - services - verbs: ["list", "watch"] -{{ end -}} -{{ if has "statefulsets" $.Values.collectors }} -- apiGroups: ["apps"] - resources: - - statefulsets - verbs: ["list", "watch"] -{{ end -}} -{{ if has "storageclasses" $.Values.collectors }} -- apiGroups: ["storage.k8s.io"] - resources: - - storageclasses - verbs: ["list", "watch"] -{{ end -}} -{{ if has "validatingwebhookconfigurations" $.Values.collectors }} -- apiGroups: ["admissionregistration.k8s.io"] - resources: - - validatingwebhookconfigurations - verbs: ["list", "watch"] -{{ end -}} -{{ if has "volumeattachments" $.Values.collectors }} -- apiGroups: ["storage.k8s.io"] - resources: - - volumeattachments - verbs: ["list", "watch"] -{{ end -}} -{{ if has "verticalpodautoscalers" $.Values.collectors }} -- apiGroups: ["autoscaling.k8s.io"] - resources: - - verticalpodautoscalers - verbs: ["list", "watch"] -{{ end -}} -{{ if $.Values.rbac.extraRules }} -{{ toYaml $.Values.rbac.extraRules }} -{{ end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/rolebinding.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/rolebinding.yaml deleted file mode 100644 index 330651b73..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/rolebinding.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if and (eq .Values.rbac.create true) (eq .Values.rbac.useClusterRole false) -}} -{{- range (join "," $.Values.namespaces) | split "," }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - {{- include "kube-state-metrics.labels" $ | indent 4 }} - name: {{ template "kube-state-metrics.fullname" $ }} - namespace: {{ . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role -{{- if (not $.Values.rbac.useExistingRole) }} - name: {{ template "kube-state-metrics.fullname" $ }} -{{- else }} - name: {{ $.Values.rbac.useExistingRole }} -{{- end }} -subjects: -- kind: ServiceAccount - name: {{ template "kube-state-metrics.serviceAccountName" $ }} - namespace: {{ template "kube-state-metrics.namespace" $ }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/service.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/service.yaml deleted file mode 100644 index 92c6d4fca..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/service.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "kube-state-metrics.fullname" . }} - namespace: {{ template "kube-state-metrics.namespace" . }} - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} - annotations: - {{- if .Values.prometheusScrape }} - prometheus.io/scrape: '{{ .Values.prometheusScrape }}' - {{- end }} - {{- if .Values.service.annotations }} - {{- toYaml .Values.service.annotations | nindent 4 }} - {{- end }} -spec: - type: "{{ .Values.service.type }}" - ports: - - name: "http" - protocol: TCP - port: {{ .Values.service.port | default 8080}} - {{- if .Values.service.nodePort }} - nodePort: {{ .Values.service.nodePort }} - {{- end }} - targetPort: {{ .Values.service.port | default 8080}} - {{ if .Values.selfMonitor.enabled }} - - name: "metrics" - protocol: TCP - port: {{ .Values.selfMonitor.telemetryPort | default 8081 }} - targetPort: {{ .Values.selfMonitor.telemetryPort | default 8081 }} - {{- if .Values.selfMonitor.telemetryNodePort }} - nodePort: {{ .Values.selfMonitor.telemetryNodePort }} - {{- end }} - {{ end }} -{{- if .Values.service.loadBalancerIP }} - loadBalancerIP: "{{ .Values.service.loadBalancerIP }}" -{{- end }} -{{- if .Values.service.clusterIP }} - clusterIP: "{{ .Values.service.clusterIP }}" -{{- end }} - selector: - {{- include "kube-state-metrics.selectorLabels" . | indent 4 }} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/serviceaccount.yaml deleted file mode 100644 index e1229eb95..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/serviceaccount.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} - name: {{ template "kube-state-metrics.serviceAccountName" . }} - namespace: {{ template "kube-state-metrics.namespace" . }} -{{- if .Values.serviceAccount.annotations }} - annotations: -{{ toYaml .Values.serviceAccount.annotations | indent 4 }} -{{- end }} -imagePullSecrets: -{{ toYaml .Values.serviceAccount.imagePullSecrets | indent 2 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/servicemonitor.yaml deleted file mode 100644 index e93df4c49..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/servicemonitor.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if .Values.prometheus.monitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "kube-state-metrics.fullname" . }} - namespace: {{ template "kube-state-metrics.namespace" . }} - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} - {{- with .Values.prometheus.monitor.additionalLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - jobLabel: {{ default "app.kubernetes.io/name" .Values.prometheus.monitor.jobLabel }} - {{- include "servicemonitor.scrapeLimits" .Values.prometheus.monitor | indent 2 }} - selector: - matchLabels: - {{- with .Values.prometheus.monitor.selectorOverride }} - {{- toYaml . | nindent 6 }} - {{- else }} - {{- include "kube-state-metrics.selectorLabels" . | indent 6 }} - {{- end }} - endpoints: - - port: http - {{- if .Values.prometheus.monitor.interval }} - interval: {{ .Values.prometheus.monitor.interval }} - {{- end }} - {{- if .Values.prometheus.monitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }} - {{- end }} - {{- if .Values.prometheus.monitor.proxyUrl }} - proxyUrl: {{ .Values.prometheus.monitor.proxyUrl}} - {{- end }} - {{- if .Values.prometheus.monitor.honorLabels }} - honorLabels: true - {{- end }} - {{- if .Values.prometheus.monitor.metricRelabelings }} - metricRelabelings: - {{- toYaml .Values.prometheus.monitor.metricRelabelings | nindent 8 }} - {{- end }} - {{- if .Values.prometheus.monitor.relabelings }} - relabelings: - {{- toYaml .Values.prometheus.monitor.relabelings | nindent 8 }} - {{- end }} - {{- if .Values.prometheus.monitor.scheme }} - scheme: {{ .Values.prometheus.monitor.scheme }} - {{- end }} - {{- if .Values.prometheus.monitor.tlsConfig }} - tlsConfig: - {{- toYaml .Values.prometheus.monitor.tlsConfig | nindent 8 }} - {{- end }} - {{- if .Values.selfMonitor.enabled }} - - port: metrics - {{- if .Values.prometheus.monitor.interval }} - interval: {{ .Values.prometheus.monitor.interval }} - {{- end }} - {{- if .Values.prometheus.monitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }} - {{- end }} - {{- if .Values.prometheus.monitor.proxyUrl }} - proxyUrl: {{ .Values.prometheus.monitor.proxyUrl}} - {{- end }} - {{- if .Values.prometheus.monitor.honorLabels }} - honorLabels: true - {{- end }} - {{- if .Values.prometheus.monitor.metricRelabelings }} - metricRelabelings: - {{- toYaml .Values.prometheus.monitor.metricRelabelings | nindent 8 }} - {{- end }} - {{- if .Values.prometheus.monitor.relabelings }} - relabelings: - {{- toYaml .Values.prometheus.monitor.relabelings | nindent 8 }} - {{- end }} - {{- if .Values.prometheus.monitor.scheme }} - scheme: {{ .Values.prometheus.monitor.scheme }} - {{- end }} - {{- if .Values.prometheus.monitor.tlsConfig }} - tlsConfig: - {{- toYaml .Values.prometheus.monitor.tlsConfig | nindent 8 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/stsdiscovery-role.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/stsdiscovery-role.yaml deleted file mode 100644 index 489de147c..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/stsdiscovery-role.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if and .Values.autosharding.enabled .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: stsdiscovery-{{ template "kube-state-metrics.fullname" . }} - namespace: {{ template "kube-state-metrics.namespace" . }} - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} -rules: -- apiGroups: - - "" - resources: - - pods - verbs: - - get -- apiGroups: - - apps - resourceNames: - - {{ template "kube-state-metrics.fullname" . }} - resources: - - statefulsets - verbs: - - get - - list - - watch -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/stsdiscovery-rolebinding.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/stsdiscovery-rolebinding.yaml deleted file mode 100644 index 73b37a4f6..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/stsdiscovery-rolebinding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if and .Values.autosharding.enabled .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: stsdiscovery-{{ template "kube-state-metrics.fullname" . }} - namespace: {{ template "kube-state-metrics.namespace" . }} - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: stsdiscovery-{{ template "kube-state-metrics.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "kube-state-metrics.serviceAccountName" . }} - namespace: {{ template "kube-state-metrics.namespace" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/verticalpodautoscaler.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/verticalpodautoscaler.yaml deleted file mode 100644 index e825e5c86..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/templates/verticalpodautoscaler.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1") (.Values.verticalPodAutoscaler.enabled) }} -apiVersion: autoscaling.k8s.io/v1 -kind: VerticalPodAutoscaler -metadata: - name: {{ template "kube-state-metrics.fullname" . }} - namespace: {{ template "kube-state-metrics.namespace" . }} - labels: - {{- include "kube-state-metrics.labels" . | indent 4 }} -spec: - resourcePolicy: - containerPolicies: - - containerName: {{ template "kube-state-metrics.name" . }} - {{- if .Values.verticalPodAutoscaler.controlledResources }} - controlledResources: {{ .Values.verticalPodAutoscaler.controlledResources }} - {{- end }} - {{- if .Values.verticalPodAutoscaler.maxAllowed }} - maxAllowed: - {{ toYaml .Values.verticalPodAutoscaler.maxAllowed | nindent 8 }} - {{- end }} - {{- if .Values.verticalPodAutoscaler.minAllowed }} - minAllowed: - {{ toYaml .Values.verticalPodAutoscaler.minAllowed | nindent 8 }} - {{- end }} - targetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "kube-state-metrics.fullname" . }} - {{- if .Values.verticalPodAutoscaler.updatePolicy }} - updatePolicy: - {{- if .Values.verticalPodAutoscaler.updatePolicy.updateMode }} - updateMode: {{ .Values.verticalPodAutoscaler.updatePolicy.updateMode }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/values.yaml b/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/values.yaml deleted file mode 100644 index 67e8bca6b..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/charts/kube-state-metrics/values.yaml +++ /dev/null @@ -1,305 +0,0 @@ -# Default values for kube-state-metrics. -prometheusScrape: true -image: - repository: registry.k8s.io/kube-state-metrics/kube-state-metrics - tag: v2.6.0 - sha: "" - pullPolicy: IfNotPresent - -imagePullSecrets: [] -# - name: "image-pull-secret" - -# If set to true, this will deploy kube-state-metrics as a StatefulSet and the data -# will be automatically sharded across <.Values.replicas> pods using the built-in -# autodiscovery feature: https://github.com/kubernetes/kube-state-metrics#automated-sharding -# This is an experimental feature and there are no stability guarantees. -autosharding: - enabled: false - -replicas: 1 - -# List of additional cli arguments to configure kube-state-metrics -# for example: --enable-gzip-encoding, --log-file, etc. -# all the possible args can be found here: https://github.com/kubernetes/kube-state-metrics/blob/master/docs/cli-arguments.md -extraArgs: [] - -service: - port: 8080 - # Default to clusterIP for backward compatibility - type: ClusterIP - nodePort: 0 - loadBalancerIP: "" - clusterIP: "" - annotations: {} - -## Additional labels to add to all resources -customLabels: {} - # app: kube-state-metrics - -## set to true to add the release label so scraping of the servicemonitor with kube-prometheus-stack works out of the box -releaseLabel: false - -hostNetwork: false - -rbac: - # If true, create & use RBAC resources - create: true - - # Set to a rolename to use existing role - skipping role creating - but still doing serviceaccount and rolebinding to it, rolename set here. - # useExistingRole: your-existing-role - - # If set to false - Run without Cluteradmin privs needed - ONLY works if namespace is also set (if useExistingRole is set this name is used as ClusterRole or Role to bind to) - useClusterRole: true - - # Add permissions for CustomResources' apiGroups in Role/ClusterRole. Should be used in conjunction with Custom Resource State Metrics configuration - # Example: - # - apiGroups: ["monitoring.coreos.com"] - # resources: ["prometheuses"] - # verbs: ["list", "watch"] - extraRules: [] - -serviceAccount: - # Specifies whether a ServiceAccount should be created, require rbac true - create: true - # The name of the ServiceAccount to use. - # If not set and create is true, a name is generated using the fullname template - name: - # Reference to one or more secrets to be used when pulling images - # ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - imagePullSecrets: [] - # ServiceAccount annotations. - # Use case: AWS EKS IAM roles for service accounts - # ref: https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html - annotations: {} - -prometheus: - monitor: - enabled: false - additionalLabels: {} - namespace: "" - jobLabel: "" - interval: "" - ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted. - ## - sampleLimit: 0 - - ## TargetLimit defines a limit on the number of scraped targets that will be accepted. - ## - targetLimit: 0 - - ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer. - ## - labelLimit: 0 - - ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer. - ## - labelNameLengthLimit: 0 - - ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer. - ## - labelValueLengthLimit: 0 - scrapeTimeout: "" - proxyUrl: "" - selectorOverride: {} - honorLabels: false - metricRelabelings: [] - relabelings: [] - scheme: "" - tlsConfig: {} - -## Specify if a Pod Security Policy for kube-state-metrics must be created -## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ -## -podSecurityPolicy: - enabled: false - annotations: {} - ## Specify pod annotations - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl - ## - # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' - # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - - additionalVolumes: [] - -securityContext: - enabled: true - runAsGroup: 65534 - runAsUser: 65534 - fsGroup: 65534 - -## Specify security settings for a Container -## Allows overrides and additional options compared to (Pod) securityContext -## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container -containerSecurityContext: {} - -## Node labels for pod assignment -## Ref: https://kubernetes.io/docs/user-guide/node-selection/ -nodeSelector: {} - -## Affinity settings for pod assignment -## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ -affinity: {} - -## Tolerations for pod assignment -## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -tolerations: [] - -## Topology spread constraints for pod assignment -## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ -topologySpreadConstraints: [] - -# Annotations to be added to the deployment/statefulset -annotations: {} - -# Annotations to be added to the pod -podAnnotations: {} - -## Assign a PriorityClassName to pods if set -# priorityClassName: "" - -# Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ -podDisruptionBudget: {} - -# Comma-separated list of metrics to be exposed. -# This list comprises of exact metric names and/or regex patterns. -# The allowlist and denylist are mutually exclusive. -metricAllowlist: [] - -# Comma-separated list of metrics not to be enabled. -# This list comprises of exact metric names and/or regex patterns. -# The allowlist and denylist are mutually exclusive. -metricDenylist: [] - -# Comma-separated list of additional Kubernetes label keys that will be used in the resource's -# labels metric. By default the metric contains only name and namespace labels. -# To include additional labels, provide a list of resource names in their plural form and Kubernetes -# label keys you would like to allow for them (Example: '=namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...)'. -# A single '*' can be provided per resource instead to allow any labels, but that has -# severe performance implications (Example: '=pods=[*]'). -metricLabelsAllowlist: [] - # - namespaces=[k8s-label-1,k8s-label-n] - -# Comma-separated list of Kubernetes annotations keys that will be used in the resource' -# labels metric. By default the metric contains only name and namespace labels. -# To include additional annotations provide a list of resource names in their plural form and Kubernetes -# annotation keys you would like to allow for them (Example: '=namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...)'. -# A single '*' can be provided per resource instead to allow any annotations, but that has -# severe performance implications (Example: '=pods=[*]'). -metricAnnotationsAllowList: [] - # - pods=[k8s-annotation-1,k8s-annotation-n] - -# Available collectors for kube-state-metrics. -# By default, all available resources are enabled, comment out to disable. -collectors: - - certificatesigningrequests - - configmaps - - cronjobs - - daemonsets - - deployments - - endpoints - - horizontalpodautoscalers - - ingresses - - jobs - - leases - - limitranges - - mutatingwebhookconfigurations - - namespaces - - networkpolicies - - nodes - - persistentvolumeclaims - - persistentvolumes - - poddisruptionbudgets - - pods - - replicasets - - replicationcontrollers - - resourcequotas - - secrets - - services - - statefulsets - - storageclasses - - validatingwebhookconfigurations - - volumeattachments - # - verticalpodautoscalers # not a default resource, see also: https://github.com/kubernetes/kube-state-metrics#enabling-verticalpodautoscalers - -# Enabling kubeconfig will pass the --kubeconfig argument to the container -kubeconfig: - enabled: false - # base64 encoded kube-config file - secret: - -# Enable only the release namespace for collecting resources. By default all namespaces are collected. -# If releaseNamespace and namespaces are both set a merged list will be collected. -releaseNamespace: false - -# Comma-separated list(string) or yaml list of namespaces to be enabled for collecting resources. By default all namespaces are collected. -namespaces: "" - -# Comma-separated list of namespaces not to be enabled. If namespaces and namespaces-denylist are both set, -# only namespaces that are excluded in namespaces-denylist will be used. -namespacesDenylist: "" - -## Override the deployment namespace -## -namespaceOverride: "" - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 64Mi - # requests: - # cpu: 10m - # memory: 32Mi - -## Provide a k8s version to define apiGroups for podSecurityPolicy Cluster Role. -## For example: kubeTargetVersionOverride: 1.14.9 -## -kubeTargetVersionOverride: "" - -# Enable self metrics configuration for service and Service Monitor -# Default values for telemetry configuration can be overridden -# If you set telemetryNodePort, you must also set service.type to NodePort -selfMonitor: - enabled: false - # telemetryHost: 0.0.0.0 - # telemetryPort: 8081 - # telemetryNodePort: 0 - -# Enable vertical pod autoscaler support for kube-state-metrics -verticalPodAutoscaler: - enabled: false - # List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory - controlledResources: [] - - # Define the max allowed resources for the pod - maxAllowed: {} - # cpu: 200m - # memory: 100Mi - # Define the min allowed resources for the pod - minAllowed: {} - # cpu: 200m - # memory: 100Mi - - # updatePolicy: - # Specifies whether recommended updates are applied when a Pod is started and whether recommended updates - # are applied during the life of a Pod. Possible values are "Off", "Initial", "Recreate", and "Auto". - # updateMode: Auto - -# volumeMounts are used to add custom volume mounts to deployment. -# See example below -volumeMounts: [] -# - mountPath: /etc/config -# name: config-volume - -# volumes are used to add custom volumes to deployment -# See example below -volumes: [] -# - configMap: -# name: cm-for-volume -# name: config-volume diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/NOTES.txt b/charts/gitlab/gitlab/charts/prometheus/templates/NOTES.txt deleted file mode 100644 index 0e8868f0b..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/NOTES.txt +++ /dev/null @@ -1,112 +0,0 @@ -{{- if .Values.server.enabled -}} -The Prometheus server can be accessed via port {{ .Values.server.service.servicePort }} on the following DNS name from within your cluster: -{{ template "prometheus.server.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - -{{ if .Values.server.ingress.enabled -}} -From outside the cluster, the server URL(s) are: -{{- range .Values.server.ingress.hosts }} -http://{{ . }} -{{- end }} -{{- else }} -Get the Prometheus server URL by running these commands in the same shell: -{{- if contains "NodePort" .Values.server.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.server.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.server.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.server.fullname" . }}' - - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.server.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.server.service.servicePort }} -{{- else if contains "ClusterIP" .Values.server.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.server.name }}" -o jsonpath="{.items[0].metadata.name}") - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9090 -{{- end }} -{{- end }} - -{{- if .Values.server.persistentVolume.enabled }} -{{- else }} -################################################################################# -###### WARNING: Persistence is disabled!!! You will lose your data when ##### -###### the Server pod is terminated. ##### -################################################################################# -{{- end }} -{{- end }} - -{{ if .Values.alertmanager.enabled }} -The Prometheus alertmanager can be accessed via port {{ .Values.alertmanager.service.servicePort }} on the following DNS name from within your cluster: -{{ template "prometheus.alertmanager.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - -{{ if .Values.alertmanager.ingress.enabled -}} -From outside the cluster, the alertmanager URL(s) are: -{{- range .Values.alertmanager.ingress.hosts }} -http://{{ . }} -{{- end }} -{{- else }} -Get the Alertmanager URL by running these commands in the same shell: -{{- if contains "NodePort" .Values.alertmanager.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.alertmanager.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.alertmanager.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.alertmanager.fullname" . }}' - - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.alertmanager.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.alertmanager.service.servicePort }} -{{- else if contains "ClusterIP" .Values.alertmanager.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.alertmanager.name }}" -o jsonpath="{.items[0].metadata.name}") - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9093 -{{- end }} -{{- end }} - -{{- if .Values.alertmanager.persistentVolume.enabled }} -{{- else }} -################################################################################# -###### WARNING: Persistence is disabled!!! You will lose your data when ##### -###### the AlertManager pod is terminated. ##### -################################################################################# -{{- end }} -{{- end }} - -{{- if .Values.nodeExporter.podSecurityPolicy.enabled }} -{{- else }} -################################################################################# -###### WARNING: Pod Security Policy has been moved to a global property. ##### -###### use .Values.podSecurityPolicy.enabled with pod-based ##### -###### annotations ##### -###### (e.g. .Values.nodeExporter.podSecurityPolicy.annotations) ##### -################################################################################# -{{- end }} - -{{ if .Values.pushgateway.enabled }} -The Prometheus PushGateway can be accessed via port {{ .Values.pushgateway.service.servicePort }} on the following DNS name from within your cluster: -{{ template "prometheus.pushgateway.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - -{{ if .Values.pushgateway.ingress.enabled -}} -From outside the cluster, the pushgateway URL(s) are: -{{- range .Values.pushgateway.ingress.hosts }} -http://{{ . }} -{{- end }} -{{- else }} -Get the PushGateway URL by running these commands in the same shell: -{{- if contains "NodePort" .Values.pushgateway.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.pushgateway.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.pushgateway.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.pushgateway.fullname" . }}' - - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.pushgateway.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.pushgateway.service.servicePort }} -{{- else if contains "ClusterIP" .Values.pushgateway.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.pushgateway.name }}" -o jsonpath="{.items[0].metadata.name}") - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9091 -{{- end }} -{{- end }} -{{- end }} - -For more information on running Prometheus, visit: -https://prometheus.io/ diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/prometheus/templates/_helpers.tpl deleted file mode 100644 index 00645db70..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/_helpers.tpl +++ /dev/null @@ -1,287 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "prometheus.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "prometheus.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create unified labels for prometheus components -*/}} -{{- define "prometheus.common.matchLabels" -}} -app: {{ template "prometheus.name" . }} -release: {{ .Release.Name }} -{{- end -}} - -{{- define "prometheus.common.metaLabels" -}} -chart: {{ template "prometheus.chart" . }} -heritage: {{ .Release.Service }} -{{- end -}} - -{{- define "prometheus.alertmanager.labels" -}} -{{ include "prometheus.alertmanager.matchLabels" . }} -{{ include "prometheus.common.metaLabels" . }} -{{- end -}} - -{{- define "prometheus.alertmanager.matchLabels" -}} -component: {{ .Values.alertmanager.name | quote }} -{{ include "prometheus.common.matchLabels" . }} -{{- end -}} - -{{- define "prometheus.nodeExporter.labels" -}} -{{ include "prometheus.nodeExporter.matchLabels" . }} -{{ include "prometheus.common.metaLabels" . }} -{{- end -}} - -{{- define "prometheus.nodeExporter.matchLabels" -}} -component: {{ .Values.nodeExporter.name | quote }} -{{ include "prometheus.common.matchLabels" . }} -{{- end -}} - -{{- define "prometheus.pushgateway.labels" -}} -{{ include "prometheus.pushgateway.matchLabels" . }} -{{ include "prometheus.common.metaLabels" . }} -{{- end -}} - -{{- define "prometheus.pushgateway.matchLabels" -}} -component: {{ .Values.pushgateway.name | quote }} -{{ include "prometheus.common.matchLabels" . }} -{{- end -}} - -{{- define "prometheus.server.labels" -}} -{{ include "prometheus.server.matchLabels" . }} -{{ include "prometheus.common.metaLabels" . }} -{{- end -}} - -{{- define "prometheus.server.matchLabels" -}} -component: {{ .Values.server.name | quote }} -{{ include "prometheus.common.matchLabels" . }} -{{- 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). -*/}} -{{- define "prometheus.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a fully qualified alertmanager name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} - -{{- define "prometheus.alertmanager.fullname" -}} -{{- if .Values.alertmanager.fullnameOverride -}} -{{- .Values.alertmanager.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.alertmanager.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.alertmanager.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a fully qualified node-exporter name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "prometheus.nodeExporter.fullname" -}} -{{- if .Values.nodeExporter.fullnameOverride -}} -{{- .Values.nodeExporter.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.nodeExporter.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.nodeExporter.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a fully qualified Prometheus server name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "prometheus.server.fullname" -}} -{{- if .Values.server.fullnameOverride -}} -{{- .Values.server.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.server.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.server.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a fully qualified pushgateway name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "prometheus.pushgateway.fullname" -}} -{{- if .Values.pushgateway.fullnameOverride -}} -{{- .Values.pushgateway.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.pushgateway.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.pushgateway.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Get KubeVersion removing pre-release information. -*/}} -{{- define "prometheus.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version (regexFind "v[0-9]+\\.[0-9]+\\.[0-9]+" .Capabilities.KubeVersion.Version) -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for deployment. -*/}} -{{- define "prometheus.deployment.apiVersion" -}} -{{- print "apps/v1" -}} -{{- end -}} -{{/* -Return the appropriate apiVersion for daemonset. -*/}} -{{- define "prometheus.daemonset.apiVersion" -}} -{{- print "apps/v1" -}} -{{- end -}} -{{/* -Return the appropriate apiVersion for networkpolicy. -*/}} -{{- define "prometheus.networkPolicy.apiVersion" -}} -{{- print "networking.k8s.io/v1" -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for poddisruptionbudget. -*/}} -{{- define "prometheus.podDisruptionBudget.apiVersion" -}} -{{- if .Capabilities.APIVersions.Has "policy/v1" }} -{{- print "policy/v1" -}} -{{- else -}} -{{- print "policy/v1beta1" -}} -{{- end -}} -{{- end -}} -{{/* -Return the appropriate apiVersion for rbac. -*/}} -{{- define "rbac.apiVersion" -}} -{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }} -{{- print "rbac.authorization.k8s.io/v1" -}} -{{- else -}} -{{- print "rbac.authorization.k8s.io/v1beta1" -}} -{{- end -}} -{{- end -}} -{{/* -Return the appropriate apiVersion for ingress. -*/}} -{{- define "ingress.apiVersion" -}} - {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19.x" (include "prometheus.kubeVersion" .)) -}} - {{- print "networking.k8s.io/v1" -}} - {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} - {{- print "networking.k8s.io/v1beta1" -}} - {{- else -}} - {{- print "extensions/v1beta1" -}} - {{- end -}} -{{- end -}} - -{{/* -Return if ingress is stable. -*/}} -{{- define "ingress.isStable" -}} - {{- eq (include "ingress.apiVersion" .) "networking.k8s.io/v1" -}} -{{- end -}} - -{{/* -Return if ingress supports ingressClassName. -*/}} -{{- define "ingress.supportsIngressClassName" -}} - {{- or (eq (include "ingress.isStable" .) "true") (and (eq (include "ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18.x" (include "prometheus.kubeVersion" .))) -}} -{{- end -}} -{{/* -Return if ingress supports pathType. -*/}} -{{- define "ingress.supportsPathType" -}} - {{- or (eq (include "ingress.isStable" .) "true") (and (eq (include "ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18.x" (include "prometheus.kubeVersion" .))) -}} -{{- end -}} - -{{/* -Create the name of the service account to use for the alertmanager component -*/}} -{{- define "prometheus.serviceAccountName.alertmanager" -}} -{{- if .Values.serviceAccounts.alertmanager.create -}} - {{ default (include "prometheus.alertmanager.fullname" .) .Values.serviceAccounts.alertmanager.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.alertmanager.name }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use for the nodeExporter component -*/}} -{{- define "prometheus.serviceAccountName.nodeExporter" -}} -{{- if .Values.serviceAccounts.nodeExporter.create -}} - {{ default (include "prometheus.nodeExporter.fullname" .) .Values.serviceAccounts.nodeExporter.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.nodeExporter.name }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use for the pushgateway component -*/}} -{{- define "prometheus.serviceAccountName.pushgateway" -}} -{{- if .Values.serviceAccounts.pushgateway.create -}} - {{ default (include "prometheus.pushgateway.fullname" .) .Values.serviceAccounts.pushgateway.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.pushgateway.name }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use for the server component -*/}} -{{- define "prometheus.serviceAccountName.server" -}} -{{- if .Values.serviceAccounts.server.create -}} - {{ default (include "prometheus.server.fullname" .) .Values.serviceAccounts.server.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.server.name }} -{{- end -}} -{{- end -}} - -{{/* -Define the prometheus.namespace template if set with forceNamespace or .Release.Namespace is set -*/}} -{{- define "prometheus.namespace" -}} -{{- if .Values.forceNamespace -}} -{{ printf "namespace: %s" .Values.forceNamespace }} -{{- else -}} -{{ printf "namespace: %s" .Release.Namespace }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/clusterrole.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/clusterrole.yaml deleted file mode 100644 index c732ff4e5..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/clusterrole.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.rbac.create .Values.alertmanager.useClusterRole (not .Values.alertmanager.useExistingRole) -}} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: ClusterRole -metadata: - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - name: {{ template "prometheus.alertmanager.fullname" . }} -rules: -{{- if .Values.podSecurityPolicy.enabled }} - - apiGroups: - - extensions - resources: - - podsecuritypolicies - verbs: - - use - resourceNames: - - {{ template "prometheus.alertmanager.fullname" . }} -{{- else }} - [] -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/clusterrolebinding.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/clusterrolebinding.yaml deleted file mode 100644 index 6f13e98b5..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/clusterrolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.rbac.create .Values.alertmanager.useClusterRole -}} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: ClusterRoleBinding -metadata: - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - name: {{ template "prometheus.alertmanager.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "prometheus.serviceAccountName.alertmanager" . }} -{{ include "prometheus.namespace" . | indent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole -{{- if (not .Values.alertmanager.useExistingRole) }} - name: {{ template "prometheus.alertmanager.fullname" . }} -{{- else }} - name: {{ .Values.alertmanager.useExistingRole }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/cm.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/cm.yaml deleted file mode 100644 index 2da8b1d01..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/cm.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if and .Values.alertmanager.enabled (and (empty .Values.alertmanager.configMapOverrideName) (empty .Values.alertmanager.configFromSecret)) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - name: {{ template "prometheus.alertmanager.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -data: - allow-snippet-annotations: "false" -{{- $root := . -}} -{{- range $key, $value := .Values.alertmanagerFiles }} - {{- if $key | regexMatch ".*\\.ya?ml$" }} - {{ $key }}: | -{{ toYaml $value | default "{}" | indent 4 }} - {{- else }} - {{ $key }}: {{ toYaml $value | indent 4 }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/deploy.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/deploy.yaml deleted file mode 100644 index c3b6e8fd7..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/deploy.yaml +++ /dev/null @@ -1,213 +0,0 @@ -{{- if and .Values.alertmanager.enabled (not .Values.alertmanager.statefulSet.enabled) -}} -apiVersion: {{ template "prometheus.deployment.apiVersion" . }} -kind: Deployment -metadata: -{{- if .Values.alertmanager.deploymentAnnotations }} - annotations: - {{ toYaml .Values.alertmanager.deploymentAnnotations | nindent 4 }} -{{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - name: {{ template "prometheus.alertmanager.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - selector: - matchLabels: - {{- include "prometheus.alertmanager.matchLabels" . | nindent 6 }} - replicas: {{ .Values.alertmanager.replicaCount }} - {{- if .Values.alertmanager.strategy }} - strategy: -{{ toYaml .Values.alertmanager.strategy | trim | indent 4 }} - {{ if eq .Values.alertmanager.strategy.type "Recreate" }}rollingUpdate: null{{ end }} -{{- end }} - template: - metadata: - {{- if .Values.alertmanager.podAnnotations }} - annotations: - {{ toYaml .Values.alertmanager.podAnnotations | nindent 8 }} - {{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 8 }} - {{- if .Values.alertmanager.podLabels}} - {{ toYaml .Values.alertmanager.podLabels | nindent 8 }} - {{- end}} - spec: -{{- if .Values.alertmanager.schedulerName }} - schedulerName: "{{ .Values.alertmanager.schedulerName }}" -{{- end }} - serviceAccountName: {{ template "prometheus.serviceAccountName.alertmanager" . }} - {{- if .Values.alertmanager.extraInitContainers }} - initContainers: -{{ toYaml .Values.alertmanager.extraInitContainers | indent 8 }} - {{- end }} -{{- if .Values.alertmanager.priorityClassName }} - priorityClassName: "{{ .Values.alertmanager.priorityClassName }}" -{{- end }} - containers: - - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }} - image: "{{ .Values.alertmanager.image.repository }}:{{ .Values.alertmanager.image.tag }}" - imagePullPolicy: "{{ .Values.alertmanager.image.pullPolicy }}" - {{- with .Values.alertmanager.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - env: - {{- range $key, $value := .Values.alertmanager.extraEnv }} - - name: {{ $key }} - value: {{ $value }} - {{- end }} - - name: POD_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - args: - - --config.file=/etc/config/{{ .Values.alertmanager.configFileName }} - - --storage.path={{ .Values.alertmanager.persistentVolume.mountPath }} - {{- if .Values.alertmanager.service.enableMeshPeer }} - - --cluster.listen-address=0.0.0.0:6783 - - --cluster.advertise-address=[$(POD_IP)]:6783 - {{- else }} - - --cluster.listen-address= - {{- end }} - {{- range $key, $value := .Values.alertmanager.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- if .Values.alertmanager.baseURL }} - - --web.external-url={{ .Values.alertmanager.baseURL }} - {{- end }} - {{- range .Values.alertmanager.clusterPeers }} - - --cluster.peer={{ . }} - {{- end }} - - ports: - - containerPort: 9093 - readinessProbe: - httpGet: - path: {{ .Values.alertmanager.prefixURL }}/-/ready - port: 9093 - {{- with .Values.alertmanager.probeHeaders }} - httpHeaders: -{{- toYaml . | nindent 14 }} - {{- end }} - initialDelaySeconds: 30 - timeoutSeconds: 30 - resources: -{{ toYaml .Values.alertmanager.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - - name: storage-volume - mountPath: "{{ .Values.alertmanager.persistentVolume.mountPath }}" - subPath: "{{ .Values.alertmanager.persistentVolume.subPath }}" - {{- range .Values.alertmanager.extraSecretMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.alertmanager.extraConfigmapMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - - {{- if .Values.configmapReload.alertmanager.enabled }} - - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }}-{{ .Values.configmapReload.alertmanager.name }} - image: "{{ .Values.configmapReload.alertmanager.image.repository }}:{{ .Values.configmapReload.alertmanager.image.tag }}" - imagePullPolicy: "{{ .Values.configmapReload.alertmanager.image.pullPolicy }}" - {{- with .Values.configmapReload.alertmanager.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - args: - - --volume-dir=/etc/config - - --webhook-url=http://127.0.0.1:9093{{ .Values.alertmanager.prefixURL }}/-/reload - {{- range $key, $value := .Values.configmapReload.alertmanager.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- range .Values.configmapReload.alertmanager.extraVolumeDirs }} - - --volume-dir={{ . }} - {{- end }} - {{- if .Values.configmapReload.alertmanager.containerPort }} - ports: - - containerPort: {{ .Values.configmapReload.alertmanager.containerPort }} - {{- end }} - resources: -{{ toYaml .Values.configmapReload.alertmanager.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - readOnly: true - {{- range .Values.configmapReload.alertmanager.extraConfigmapMounts }} - - name: {{ $.Values.configmapReload.alertmanager.name }}-{{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - {{- if .Values.alertmanager.nodeSelector }} - nodeSelector: -{{ toYaml .Values.alertmanager.nodeSelector | indent 8 }} - {{- end }} - {{- with .Values.alertmanager.dnsConfig }} - dnsConfig: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.alertmanager.securityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.alertmanager.tolerations }} - tolerations: -{{ toYaml .Values.alertmanager.tolerations | indent 8 }} - {{- end }} - {{- if .Values.alertmanager.affinity }} - affinity: -{{ toYaml .Values.alertmanager.affinity | indent 8 }} - {{- end }} - volumes: - - name: config-volume - {{- if empty .Values.alertmanager.configFromSecret }} - configMap: - name: {{ if .Values.alertmanager.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.alertmanager.configMapOverrideName }}{{- else }}{{ template "prometheus.alertmanager.fullname" . }}{{- end }} - {{- else }} - secret: - secretName: {{ .Values.alertmanager.configFromSecret }} - {{- end }} - {{- range .Values.alertmanager.extraSecretMounts }} - - name: {{ .name }} - secret: - secretName: {{ .secretName }} - {{- with .optional }} - optional: {{ . }} - {{- end }} - {{- end }} - {{- range .Values.alertmanager.extraConfigmapMounts }} - - name: {{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - {{- range .Values.configmapReload.alertmanager.extraConfigmapMounts }} - - name: {{ $.Values.configmapReload.alertmanager.name }}-{{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - - name: storage-volume - {{- if .Values.alertmanager.persistentVolume.enabled }} - persistentVolumeClaim: - claimName: {{ if .Values.alertmanager.persistentVolume.existingClaim }}{{ .Values.alertmanager.persistentVolume.existingClaim }}{{- else }}{{ template "prometheus.alertmanager.fullname" . }}{{- end }} - {{- else }} - emptyDir: - {{- if .Values.alertmanager.emptyDir.sizeLimit }} - sizeLimit: {{ .Values.alertmanager.emptyDir.sizeLimit }} - {{- else }} - {} - {{- end -}} - {{- end -}} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/headless-svc.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/headless-svc.yaml deleted file mode 100644 index 8c402c408..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/headless-svc.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.alertmanager.statefulSet.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.alertmanager.statefulSet.headless.annotations }} - annotations: -{{ toYaml .Values.alertmanager.statefulSet.headless.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} -{{- if .Values.alertmanager.statefulSet.headless.labels }} -{{ toYaml .Values.alertmanager.statefulSet.headless.labels | indent 4 }} -{{- end }} - name: {{ template "prometheus.alertmanager.fullname" . }}-headless -{{ include "prometheus.namespace" . | indent 2 }} -spec: - clusterIP: None - ports: - - name: http - port: {{ .Values.alertmanager.statefulSet.headless.servicePort }} - protocol: TCP - targetPort: 9093 -{{- if .Values.alertmanager.statefulSet.headless.enableMeshPeer }} - - name: meshpeer - port: 6783 - protocol: TCP - targetPort: 6783 -{{- end }} - selector: - {{- include "prometheus.alertmanager.matchLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/ingress.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/ingress.yaml deleted file mode 100644 index 2a7b67c08..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/ingress.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.alertmanager.ingress.enabled -}} -{{- $ingressApiIsStable := eq (include "ingress.isStable" .) "true" -}} -{{- $ingressSupportsIngressClassName := eq (include "ingress.supportsIngressClassName" .) "true" -}} -{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} -{{- $releaseName := .Release.Name -}} -{{- $serviceName := include "prometheus.alertmanager.fullname" . }} -{{- $servicePort := .Values.alertmanager.service.servicePort -}} -{{- $ingressPath := .Values.alertmanager.ingress.path -}} -{{- $ingressPathType := .Values.alertmanager.ingress.pathType -}} -{{- $extraPaths := .Values.alertmanager.ingress.extraPaths -}} -apiVersion: {{ template "ingress.apiVersion" . }} -kind: Ingress -metadata: -{{- if .Values.alertmanager.ingress.annotations }} - annotations: -{{ toYaml .Values.alertmanager.ingress.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} -{{- range $key, $value := .Values.alertmanager.ingress.extraLabels }} - {{ $key }}: {{ $value }} -{{- end }} - name: {{ template "prometheus.alertmanager.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - {{- if and $ingressSupportsIngressClassName .Values.alertmanager.ingress.ingressClassName }} - ingressClassName: {{ .Values.alertmanager.ingress.ingressClassName }} - {{- end }} - rules: - {{- range .Values.alertmanager.ingress.hosts }} - {{- $url := splitList "/" . }} - - host: {{ first $url }} - http: - paths: -{{ if $extraPaths }} -{{ toYaml $extraPaths | indent 10 }} -{{- end }} - - path: {{ $ingressPath }} - {{- if $ingressSupportsPathType }} - pathType: {{ $ingressPathType }} - {{- end }} - backend: - {{- if $ingressApiIsStable }} - service: - name: {{ $serviceName }} - port: - number: {{ $servicePort }} - {{- else }} - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} - {{- end }} - {{- end -}} -{{- if .Values.alertmanager.ingress.tls }} - tls: -{{ toYaml .Values.alertmanager.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} \ No newline at end of file diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/netpol.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/netpol.yaml deleted file mode 100644 index e44ade60e..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/netpol.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.networkPolicy.enabled -}} -apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} -kind: NetworkPolicy -metadata: - name: {{ template "prometheus.alertmanager.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "prometheus.alertmanager.matchLabels" . | nindent 6 }} - ingress: - - from: - - podSelector: - matchLabels: - {{- include "prometheus.server.matchLabels" . | nindent 12 }} - - ports: - - port: 9093 -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/pdb.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/pdb.yaml deleted file mode 100644 index 75031dae3..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/pdb.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.alertmanager.podDisruptionBudget.enabled }} -apiVersion: {{ template "prometheus.podDisruptionBudget.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ template "prometheus.alertmanager.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} -spec: - maxUnavailable: {{ .Values.alertmanager.podDisruptionBudget.maxUnavailable }} - selector: - matchLabels: - {{- include "prometheus.alertmanager.labels" . | nindent 6 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/psp.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/psp.yaml deleted file mode 100644 index 9e1995871..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/psp.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.rbac.create .Values.podSecurityPolicy.enabled }} -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "prometheus.alertmanager.fullname" . }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - {{- with .Values.alertmanager.podSecurityPolicy.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - requiredDropCapabilities: - - ALL - volumes: - - 'configMap' - - 'persistentVolumeClaim' - - 'emptyDir' - - 'secret' - allowedHostPaths: - - pathPrefix: /etc - readOnly: true - - pathPrefix: {{ .Values.alertmanager.persistentVolume.mountPath }} - hostNetwork: false - hostPID: false - hostIPC: false - runAsUser: - rule: 'RunAsAny' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - readOnlyRootFilesystem: true -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/pvc.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/pvc.yaml deleted file mode 100644 index c2eec84eb..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/pvc.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if not .Values.alertmanager.statefulSet.enabled -}} -{{- if and .Values.alertmanager.enabled .Values.alertmanager.persistentVolume.enabled -}} -{{- if not .Values.alertmanager.persistentVolume.existingClaim -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - {{- if .Values.alertmanager.persistentVolume.annotations }} - annotations: -{{ toYaml .Values.alertmanager.persistentVolume.annotations | indent 4 }} - {{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - name: {{ template "prometheus.alertmanager.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - accessModes: -{{ toYaml .Values.alertmanager.persistentVolume.accessModes | indent 4 }} -{{- if .Values.alertmanager.persistentVolume.storageClass }} -{{- if (eq "-" .Values.alertmanager.persistentVolume.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.alertmanager.persistentVolume.storageClass }}" -{{- end }} -{{- end }} -{{- if .Values.alertmanager.persistentVolume.volumeBindingMode }} - volumeBindingMode: "{{ .Values.alertmanager.persistentVolume.volumeBindingMode }}" -{{- end }} - resources: - requests: - storage: "{{ .Values.alertmanager.persistentVolume.size }}" -{{- if .Values.alertmanager.persistentVolume.selector }} - selector: - {{- toYaml .Values.alertmanager.persistentVolume.selector | nindent 4 }} -{{- end -}} -{{- if .Values.alertmanager.persistentVolume.volumeName }} - volumeName: "{{ .Values.alertmanager.persistentVolume.volumeName }}" -{{- end }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/role.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/role.yaml deleted file mode 100644 index ce60eaf0a..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.rbac.create (eq .Values.alertmanager.useClusterRole false) (not .Values.alertmanager.useExistingRole) -}} -{{- range $.Values.alertmanager.namespaces }} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: Role -metadata: - labels: - {{- include "prometheus.alertmanager.labels" $ | nindent 4 }} - name: {{ template "prometheus.alertmanager.fullname" $ }} - namespace: {{ . }} -rules: -{{- if $.Values.podSecurityPolicy.enabled }} - - apiGroups: - - extensions - resources: - - podsecuritypolicies - verbs: - - use - resourceNames: - - {{ template "prometheus.alertmanager.fullname" $ }} -{{- else }} - [] -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/rolebinding.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/rolebinding.yaml deleted file mode 100644 index 906d6522d..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/rolebinding.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.rbac.create (eq .Values.alertmanager.useClusterRole false) -}} -{{ range $.Values.alertmanager.namespaces }} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: RoleBinding -metadata: - labels: - {{- include "prometheus.alertmanager.labels" $ | nindent 4 }} - name: {{ template "prometheus.alertmanager.fullname" $ }} - namespace: {{ . }} -subjects: - - kind: ServiceAccount - name: {{ template "prometheus.serviceAccountName.alertmanager" $ }} -{{ include "prometheus.namespace" $ | indent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role -{{- if (not $.Values.alertmanager.useExistingRole) }} - name: {{ template "prometheus.alertmanager.fullname" $ }} -{{- else }} - name: {{ $.Values.alertmanager.useExistingRole }} -{{- end }} -{{- end }} -{{ end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/service.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/service.yaml deleted file mode 100644 index 9edc9ac65..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/service.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if .Values.alertmanager.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.alertmanager.service.annotations }} - annotations: -{{ toYaml .Values.alertmanager.service.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} -{{- if .Values.alertmanager.service.labels }} -{{ toYaml .Values.alertmanager.service.labels | indent 4 }} -{{- end }} - name: {{ template "prometheus.alertmanager.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: -{{- if .Values.alertmanager.service.clusterIP }} - clusterIP: {{ .Values.alertmanager.service.clusterIP }} -{{- end }} -{{- if .Values.alertmanager.service.externalIPs }} - externalIPs: -{{ toYaml .Values.alertmanager.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.alertmanager.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.alertmanager.service.loadBalancerIP }} -{{- end }} -{{- if .Values.alertmanager.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.alertmanager.service.loadBalancerSourceRanges }} - - {{ $cidr }} - {{- end }} -{{- end }} - ports: - - name: http - port: {{ .Values.alertmanager.service.servicePort }} - protocol: TCP - targetPort: 9093 - {{- if .Values.alertmanager.service.nodePort }} - nodePort: {{ .Values.alertmanager.service.nodePort }} - {{- end }} -{{- if .Values.alertmanager.service.enableMeshPeer }} - - name: meshpeer - port: 6783 - protocol: TCP - targetPort: 6783 -{{- end }} - selector: - {{- include "prometheus.alertmanager.matchLabels" . | nindent 4 }} -{{- if .Values.alertmanager.service.sessionAffinity }} - sessionAffinity: {{ .Values.alertmanager.service.sessionAffinity }} -{{- end }} - type: "{{ .Values.alertmanager.service.type }}" -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/serviceaccount.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/serviceaccount.yaml deleted file mode 100644 index a5d996a85..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/serviceaccount.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.serviceAccounts.alertmanager.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - name: {{ template "prometheus.serviceAccountName.alertmanager" . }} -{{ include "prometheus.namespace" . | indent 2 }} - annotations: -{{ toYaml .Values.serviceAccounts.alertmanager.annotations | indent 4 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/sts.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/sts.yaml deleted file mode 100644 index fe6bebf66..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/alertmanager/sts.yaml +++ /dev/null @@ -1,200 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.alertmanager.statefulSet.enabled -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: -{{- if .Values.alertmanager.statefulSet.annotations }} - annotations: - {{ toYaml .Values.alertmanager.statefulSet.annotations | nindent 4 }} -{{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - {{- if .Values.alertmanager.statefulSet.labels}} - {{ toYaml .Values.alertmanager.statefulSet.labels | nindent 4 }} - {{- end}} - name: {{ template "prometheus.alertmanager.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - serviceName: {{ template "prometheus.alertmanager.fullname" . }}-headless - selector: - matchLabels: - {{- include "prometheus.alertmanager.matchLabels" . | nindent 6 }} - replicas: {{ .Values.alertmanager.replicaCount }} - podManagementPolicy: {{ .Values.alertmanager.statefulSet.podManagementPolicy }} - template: - metadata: - {{- if .Values.alertmanager.podAnnotations }} - annotations: - {{ toYaml .Values.alertmanager.podAnnotations | nindent 8 }} - {{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 8 }} - {{- if .Values.alertmanager.podLabels}} - {{ toYaml .Values.alertmanager.podLabels | nindent 8 }} - {{- end}} - spec: -{{- if .Values.alertmanager.affinity }} - affinity: -{{ toYaml .Values.alertmanager.affinity | indent 8 }} -{{- end }} -{{- if .Values.alertmanager.schedulerName }} - schedulerName: "{{ .Values.alertmanager.schedulerName }}" -{{- end }} - serviceAccountName: {{ template "prometheus.serviceAccountName.alertmanager" . }} -{{- if .Values.alertmanager.priorityClassName }} - priorityClassName: "{{ .Values.alertmanager.priorityClassName }}" -{{- end }} - containers: - - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }} - image: "{{ .Values.alertmanager.image.repository }}:{{ .Values.alertmanager.image.tag }}" - imagePullPolicy: "{{ .Values.alertmanager.image.pullPolicy }}" - {{- with .Values.alertmanager.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - env: - {{- range $key, $value := .Values.alertmanager.extraEnv }} - - name: {{ $key }} - value: {{ $value }} - {{- end }} - - name: POD_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - args: - - --config.file=/etc/config/alertmanager.yml - - --storage.path={{ .Values.alertmanager.persistentVolume.mountPath }} - {{- if .Values.alertmanager.statefulSet.headless.enableMeshPeer }} - - --cluster.advertise-address=[$(POD_IP)]:6783 - - --cluster.listen-address=0.0.0.0:6783 - {{- range $n := until (.Values.alertmanager.replicaCount | int) }} - - --cluster.peer={{ template "prometheus.alertmanager.fullname" $ }}-{{ $n }}.{{ template "prometheus.alertmanager.fullname" $ }}-headless:6783 - {{- end }} - {{- else }} - - --cluster.listen-address= - {{- end }} - {{- range $key, $value := .Values.alertmanager.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- if .Values.alertmanager.baseURL }} - - --web.external-url={{ .Values.alertmanager.baseURL }} - {{- end }} - - ports: - - containerPort: 9093 - {{- if .Values.alertmanager.statefulSet.headless.enableMeshPeer }} - - containerPort: 6783 - {{- end }} - readinessProbe: - httpGet: - path: {{ .Values.alertmanager.prefixURL }}/#/status - port: 9093 - {{- with .Values.alertmanager.probeHeaders }} - httpHeaders: -{{- toYaml . | nindent 14 }} - {{- end }} - initialDelaySeconds: 30 - timeoutSeconds: 30 - resources: -{{ toYaml .Values.alertmanager.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - - name: storage-volume - mountPath: "{{ .Values.alertmanager.persistentVolume.mountPath }}" - subPath: "{{ .Values.alertmanager.persistentVolume.subPath }}" - {{- range .Values.alertmanager.extraSecretMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- if .Values.configmapReload.alertmanager.enabled }} - - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }}-{{ .Values.configmapReload.alertmanager.name }} - image: "{{ .Values.configmapReload.alertmanager.image.repository }}:{{ .Values.configmapReload.alertmanager.image.tag }}" - imagePullPolicy: "{{ .Values.configmapReload.alertmanager.image.pullPolicy }}" - {{- with .Values.configmapReload.alertmanager.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - args: - - --volume-dir=/etc/config - - --webhook-url=http://localhost:9093{{ .Values.alertmanager.prefixURL }}/-/reload - {{- range $key, $value := .Values.configmapReload.alertmanager.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- if .Values.configmapReload.alertmanager.port }} - ports: - - containerPort: {{ .Values.configmapReload.alertmanager.port }} - {{- end }} - resources: -{{ toYaml .Values.configmapReload.alertmanager.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - readOnly: true - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - {{- if .Values.alertmanager.nodeSelector }} - nodeSelector: -{{ toYaml .Values.alertmanager.nodeSelector | indent 8 }} - {{- end }} - {{- with .Values.alertmanager.securityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.alertmanager.tolerations }} - tolerations: -{{ toYaml .Values.alertmanager.tolerations | indent 8 }} - {{- end }} - volumes: - - name: config-volume - {{- if empty .Values.alertmanager.configFromSecret }} - configMap: - name: {{ if .Values.alertmanager.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.alertmanager.configMapOverrideName }}{{- else }}{{ template "prometheus.alertmanager.fullname" . }}{{- end }} - {{- else }} - secret: - secretName: {{ .Values.alertmanager.configFromSecret }} - {{- end }} - {{- range .Values.alertmanager.extraSecretMounts }} - - name: {{ .name }} - secret: - secretName: {{ .secretName }} - {{- with .optional }} - optional: {{ . }} - {{- end }} - {{- end }} -{{- if .Values.alertmanager.persistentVolume.enabled }} - volumeClaimTemplates: - - metadata: - name: storage-volume - {{- if .Values.alertmanager.persistentVolume.annotations }} - annotations: -{{ toYaml .Values.alertmanager.persistentVolume.annotations | indent 10 }} - {{- end }} - spec: - accessModes: -{{ toYaml .Values.alertmanager.persistentVolume.accessModes | indent 10 }} - resources: - requests: - storage: "{{ .Values.alertmanager.persistentVolume.size }}" - {{- if .Values.server.persistentVolume.storageClass }} - {{- if (eq "-" .Values.server.persistentVolume.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ .Values.alertmanager.persistentVolume.storageClass }}" - {{- end }} - {{- end }} -{{- else }} - - name: storage-volume - emptyDir: - {{- if .Values.alertmanager.emptyDir.sizeLimit }} - sizeLimit: {{ .Values.alertmanager.emptyDir.sizeLimit }} - {{- else }} - {} - {{- end -}} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/extra-manifests.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/extra-manifests.yaml deleted file mode 100644 index 567f7bf32..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/extra-manifests.yaml +++ /dev/null @@ -1,4 +0,0 @@ -{{ range .Values.extraManifests }} ---- -{{ tpl (toYaml .) $ }} -{{ end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/daemonset.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/daemonset.yaml deleted file mode 100644 index d1d5cf064..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/daemonset.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if .Values.nodeExporter.enabled -}} -apiVersion: {{ template "prometheus.daemonset.apiVersion" . }} -kind: DaemonSet -metadata: -{{- if .Values.nodeExporter.deploymentAnnotations }} - annotations: -{{ toYaml .Values.nodeExporter.deploymentAnnotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} - name: {{ template "prometheus.nodeExporter.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - selector: - matchLabels: - {{- include "prometheus.nodeExporter.matchLabels" . | nindent 6 }} - {{- if .Values.nodeExporter.updateStrategy }} - updateStrategy: -{{ toYaml .Values.nodeExporter.updateStrategy | indent 4 }} - {{- end }} - template: - metadata: - {{- if .Values.nodeExporter.podAnnotations }} - annotations: -{{ toYaml .Values.nodeExporter.podAnnotations | indent 8 }} - {{- end }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 8 }} -{{- if .Values.nodeExporter.pod.labels }} -{{ toYaml .Values.nodeExporter.pod.labels | indent 8 }} -{{- end }} - spec: - serviceAccountName: {{ template "prometheus.serviceAccountName.nodeExporter" . }} - {{- if .Values.nodeExporter.extraInitContainers }} - initContainers: -{{ toYaml .Values.nodeExporter.extraInitContainers | indent 8 }} - {{- end }} -{{- if .Values.nodeExporter.priorityClassName }} - priorityClassName: "{{ .Values.nodeExporter.priorityClassName }}" -{{- end }} - containers: - - name: {{ template "prometheus.name" . }}-{{ .Values.nodeExporter.name }} - image: "{{ .Values.nodeExporter.image.repository }}:{{ .Values.nodeExporter.image.tag }}" - imagePullPolicy: "{{ .Values.nodeExporter.image.pullPolicy }}" - args: - - --path.procfs=/host/proc - - --path.sysfs=/host/sys - {{- if .Values.nodeExporter.hostRootfs }} - - --path.rootfs=/host/root - {{- end }} - {{- if .Values.nodeExporter.hostNetwork }} - - --web.listen-address=:{{ .Values.nodeExporter.service.hostPort }} - {{- end }} - {{- range $key, $value := .Values.nodeExporter.extraArgs }} - {{- if $value }} - - --{{ $key }}={{ $value }} - {{- else }} - - --{{ $key }} - {{- end }} - {{- end }} - ports: - - name: metrics - {{- if .Values.nodeExporter.hostNetwork }} - containerPort: {{ .Values.nodeExporter.service.hostPort }} - {{- else }} - containerPort: 9100 - {{- end }} - hostPort: {{ .Values.nodeExporter.service.hostPort }} - resources: -{{ toYaml .Values.nodeExporter.resources | indent 12 }} - {{- if .Values.nodeExporter.container.securityContext }} - securityContext: -{{ toYaml .Values.nodeExporter.container.securityContext | indent 12 }} - {{- end }} - volumeMounts: - - name: proc - mountPath: /host/proc - readOnly: true - - name: sys - mountPath: /host/sys - readOnly: true - {{- if .Values.nodeExporter.hostRootfs }} - - name: root - mountPath: /host/root - mountPropagation: HostToContainer - readOnly: true - {{- end }} - {{- range .Values.nodeExporter.extraHostPathMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - readOnly: {{ .readOnly }} - {{- if .mountPropagation }} - mountPropagation: {{ .mountPropagation }} - {{- end }} - {{- end }} - {{- range .Values.nodeExporter.extraConfigmapMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - {{- if .Values.nodeExporter.hostNetwork }} - hostNetwork: true - {{- end }} - {{- if .Values.nodeExporter.hostPID }} - hostPID: true - {{- end }} - {{- if .Values.nodeExporter.tolerations }} - tolerations: -{{ toYaml .Values.nodeExporter.tolerations | indent 8 }} - {{- end }} - {{- if .Values.nodeExporter.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeExporter.nodeSelector | indent 8 }} - {{- end }} - {{- with .Values.nodeExporter.dnsConfig }} - dnsConfig: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.nodeExporter.securityContext }} - securityContext: -{{ toYaml .Values.nodeExporter.securityContext | indent 8 }} - {{- end }} - volumes: - - name: proc - hostPath: - path: /proc - - name: sys - hostPath: - path: /sys - {{- if .Values.nodeExporter.hostRootfs }} - - name: root - hostPath: - path: / - {{- end }} - {{- range .Values.nodeExporter.extraHostPathMounts }} - - name: {{ .name }} - hostPath: - path: {{ .hostPath }} - {{- end }} - {{- range .Values.nodeExporter.extraConfigmapMounts }} - - name: {{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/psp.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/psp.yaml deleted file mode 100644 index 7759bce7e..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/psp.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{{- if and .Values.nodeExporter.enabled .Values.rbac.create .Values.podSecurityPolicy.enabled }} -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "prometheus.nodeExporter.fullname" . }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} - {{- with .Values.nodeExporter.podSecurityPolicy.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - requiredDropCapabilities: - - ALL - volumes: - - 'configMap' - - 'hostPath' - - 'secret' - allowedHostPaths: - - pathPrefix: /proc - readOnly: true - - pathPrefix: /sys - readOnly: true - - pathPrefix: / - readOnly: true - {{- range .Values.nodeExporter.extraHostPathMounts }} - - pathPrefix: {{ .hostPath }} - readOnly: {{ .readOnly }} - {{- end }} - hostNetwork: {{ .Values.nodeExporter.hostNetwork }} - hostPID: {{ .Values.nodeExporter.hostPID }} - hostIPC: false - runAsUser: - rule: 'RunAsAny' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - readOnlyRootFilesystem: false - hostPorts: - - min: 1 - max: 65535 -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/role.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/role.yaml deleted file mode 100644 index d8ef3ed90..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if and .Values.nodeExporter.enabled .Values.rbac.create }} -{{- if or (default .Values.nodeExporter.podSecurityPolicy.enabled false) (.Values.podSecurityPolicy.enabled) }} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: Role -metadata: - name: {{ template "prometheus.nodeExporter.fullname" . }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} -{{ include "prometheus.namespace" . | indent 2 }} -rules: -- apiGroups: ['extensions'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: - - {{ template "prometheus.nodeExporter.fullname" . }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/rolebinding.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/rolebinding.yaml deleted file mode 100644 index 06914b70a..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.nodeExporter.enabled .Values.rbac.create }} -{{- if .Values.podSecurityPolicy.enabled }} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: RoleBinding -metadata: - name: {{ template "prometheus.nodeExporter.fullname" . }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} -{{ include "prometheus.namespace" . | indent 2 }} -roleRef: - kind: Role - name: {{ template "prometheus.nodeExporter.fullname" . }} - apiGroup: rbac.authorization.k8s.io -subjects: -- kind: ServiceAccount - name: {{ template "prometheus.serviceAccountName.nodeExporter" . }} -{{ include "prometheus.namespace" . | indent 2 }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/serviceaccount.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/serviceaccount.yaml deleted file mode 100644 index 0cf91afba..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/serviceaccount.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if and .Values.nodeExporter.enabled .Values.serviceAccounts.nodeExporter.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} - name: {{ template "prometheus.serviceAccountName.nodeExporter" . }} -{{ include "prometheus.namespace" . | indent 2 }} - annotations: -{{ toYaml .Values.serviceAccounts.nodeExporter.annotations | indent 4 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/svc.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/svc.yaml deleted file mode 100644 index 26d1eaa21..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/node-exporter/svc.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{{- if .Values.nodeExporter.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.nodeExporter.service.annotations }} - annotations: -{{ toYaml .Values.nodeExporter.service.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} -{{- if .Values.nodeExporter.service.labels }} -{{ toYaml .Values.nodeExporter.service.labels | indent 4 }} -{{- end }} - name: {{ template "prometheus.nodeExporter.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: -{{- if .Values.nodeExporter.service.clusterIP }} - clusterIP: {{ .Values.nodeExporter.service.clusterIP }} -{{- end }} -{{- if .Values.nodeExporter.service.externalIPs }} - externalIPs: -{{ toYaml .Values.nodeExporter.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.nodeExporter.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.nodeExporter.service.loadBalancerIP }} -{{- end }} -{{- if .Values.nodeExporter.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.nodeExporter.service.loadBalancerSourceRanges }} - - {{ $cidr }} - {{- end }} -{{- end }} - ports: - - name: metrics - {{- if .Values.nodeExporter.hostNetwork }} - port: {{ .Values.nodeExporter.service.hostPort }} - protocol: TCP - targetPort: {{ .Values.nodeExporter.service.hostPort }} - {{- else }} - port: {{ .Values.nodeExporter.service.servicePort }} - protocol: TCP - targetPort: 9100 - {{- end }} - selector: - {{- include "prometheus.nodeExporter.matchLabels" . | nindent 4 }} - type: "{{ .Values.nodeExporter.service.type }}" -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/clusterrole.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/clusterrole.yaml deleted file mode 100644 index 76ecf053f..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/clusterrole.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.pushgateway.enabled .Values.rbac.create -}} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: ClusterRole -metadata: - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - name: {{ template "prometheus.pushgateway.fullname" . }} -rules: -{{- if .Values.podSecurityPolicy.enabled }} - - apiGroups: - - extensions - resources: - - podsecuritypolicies - verbs: - - use - resourceNames: - - {{ template "prometheus.pushgateway.fullname" . }} -{{- else }} - [] -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/clusterrolebinding.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/clusterrolebinding.yaml deleted file mode 100644 index 15770ee50..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/clusterrolebinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.pushgateway.enabled .Values.rbac.create -}} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: ClusterRoleBinding -metadata: - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - name: {{ template "prometheus.pushgateway.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "prometheus.serviceAccountName.pushgateway" . }} -{{ include "prometheus.namespace" . | indent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "prometheus.pushgateway.fullname" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/deploy.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/deploy.yaml deleted file mode 100644 index 92bed89ef..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/deploy.yaml +++ /dev/null @@ -1,129 +0,0 @@ -{{- if .Values.pushgateway.enabled -}} -apiVersion: {{ template "prometheus.deployment.apiVersion" . }} -kind: Deployment -metadata: -{{- if .Values.pushgateway.deploymentAnnotations }} - annotations: - {{ toYaml .Values.pushgateway.deploymentAnnotations | nindent 4 }} -{{- end }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - name: {{ template "prometheus.pushgateway.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - selector: - {{- if .Values.schedulerName }} - schedulerName: "{{ .Values.schedulerName }}" - {{- end }} - matchLabels: - {{- include "prometheus.pushgateway.matchLabels" . | nindent 6 }} - replicas: {{ .Values.pushgateway.replicaCount }} - {{- if .Values.pushgateway.strategy }} - strategy: -{{ toYaml .Values.pushgateway.strategy | trim | indent 4 }} - {{ if eq .Values.pushgateway.strategy.type "Recreate" }}rollingUpdate: null{{ end }} -{{- end }} - template: - metadata: - {{- if .Values.pushgateway.podAnnotations }} - annotations: - {{ toYaml .Values.pushgateway.podAnnotations | nindent 8 }} - {{- end }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 8 }} - {{- if .Values.pushgateway.podLabels }} - {{ toYaml .Values.pushgateway.podLabels | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ template "prometheus.serviceAccountName.pushgateway" . }} - {{- if .Values.pushgateway.extraInitContainers }} - initContainers: -{{ toYaml .Values.pushgateway.extraInitContainers | indent 8 }} - {{- end }} -{{- if .Values.pushgateway.priorityClassName }} - priorityClassName: "{{ .Values.pushgateway.priorityClassName }}" -{{- end }} - containers: - - name: {{ template "prometheus.name" . }}-{{ .Values.pushgateway.name }} - image: "{{ .Values.pushgateway.image.repository }}:{{ .Values.pushgateway.image.tag }}" - imagePullPolicy: "{{ .Values.pushgateway.image.pullPolicy }}" - securityContext: - {{- toYaml .Values.pushgateway.containerSecurityContext | nindent 12 }} - args: - {{- range $key, $value := .Values.pushgateway.extraArgs }} - {{- $stringvalue := toString $value }} - {{- if eq $stringvalue "true" }} - - --{{ $key }} - {{- else }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- end }} - ports: - - containerPort: 9091 - livenessProbe: - httpGet: - {{- if (index .Values "pushgateway" "extraArgs" "web.route-prefix") }} - path: /{{ index .Values "pushgateway" "extraArgs" "web.route-prefix" }}/-/healthy - {{- else }} - path: /-/healthy - {{- end }} - port: 9091 - {{- with .Values.pushgateway.probeHeaders }} - httpHeaders: - {{- toYaml . | nindent 16 }} - {{- end }} - initialDelaySeconds: 10 - timeoutSeconds: 10 - readinessProbe: - httpGet: - {{- if (index .Values "pushgateway" "extraArgs" "web.route-prefix") }} - path: /{{ index .Values "pushgateway" "extraArgs" "web.route-prefix" }}/-/ready - {{- else }} - path: /-/ready - {{- end }} - port: 9091 - {{- with .Values.pushgateway.probeHeaders }} - httpHeaders: - {{- toYaml . | nindent 16 }} - {{- end }} - initialDelaySeconds: 10 - timeoutSeconds: 10 - resources: -{{ toYaml .Values.pushgateway.resources | indent 12 }} - {{- if .Values.pushgateway.persistentVolume.enabled }} - volumeMounts: - - name: storage-volume - mountPath: "{{ .Values.pushgateway.persistentVolume.mountPath }}" - subPath: "{{ .Values.pushgateway.persistentVolume.subPath }}" - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - {{- if .Values.pushgateway.nodeSelector }} - nodeSelector: -{{ toYaml .Values.pushgateway.nodeSelector | indent 8 }} - {{- end }} - {{- with .Values.pushgateway.dnsConfig }} - dnsConfig: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.pushgateway.securityContext }} - securityContext: -{{ toYaml .Values.pushgateway.securityContext | indent 8 }} - {{- end }} - {{- if .Values.pushgateway.tolerations }} - tolerations: -{{ toYaml .Values.pushgateway.tolerations | indent 8 }} - {{- end }} - {{- if .Values.pushgateway.affinity }} - affinity: -{{ toYaml .Values.pushgateway.affinity | indent 8 }} - {{- end }} - {{- if .Values.pushgateway.persistentVolume.enabled }} - volumes: - - name: storage-volume - persistentVolumeClaim: - claimName: {{ if .Values.pushgateway.persistentVolume.existingClaim }}{{ .Values.pushgateway.persistentVolume.existingClaim }}{{- else }}{{ template "prometheus.pushgateway.fullname" . }}{{- end }} - {{- end -}} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/ingress.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/ingress.yaml deleted file mode 100644 index 2ff72abd5..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/ingress.yaml +++ /dev/null @@ -1,54 +0,0 @@ -{{- if and .Values.pushgateway.enabled .Values.pushgateway.ingress.enabled -}} -{{- $ingressApiIsStable := eq (include "ingress.isStable" .) "true" -}} -{{- $ingressSupportsIngressClassName := eq (include "ingress.supportsIngressClassName" .) "true" -}} -{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} -{{- $releaseName := .Release.Name -}} -{{- $serviceName := include "prometheus.pushgateway.fullname" . }} -{{- $servicePort := .Values.pushgateway.service.servicePort -}} -{{- $ingressPath := .Values.pushgateway.ingress.path -}} -{{- $ingressPathType := .Values.pushgateway.ingress.pathType -}} -{{- $extraPaths := .Values.pushgateway.ingress.extraPaths -}} -apiVersion: {{ template "ingress.apiVersion" . }} -kind: Ingress -metadata: -{{- if .Values.pushgateway.ingress.annotations }} - annotations: -{{ toYaml .Values.pushgateway.ingress.annotations | indent 4}} -{{- end }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - name: {{ template "prometheus.pushgateway.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - {{- if and $ingressSupportsIngressClassName .Values.pushgateway.ingress.ingressClassName }} - ingressClassName: {{ .Values.pushgateway.ingress.ingressClassName }} - {{- end }} - rules: - {{- range .Values.pushgateway.ingress.hosts }} - {{- $url := splitList "/" . }} - - host: {{ first $url }} - http: - paths: -{{ if $extraPaths }} -{{ toYaml $extraPaths | indent 10 }} -{{- end }} - - path: {{ $ingressPath }} - {{- if $ingressSupportsPathType }} - pathType: {{ $ingressPathType }} - {{- end }} - backend: - {{- if $ingressApiIsStable }} - service: - name: {{ $serviceName }} - port: - number: {{ $servicePort }} - {{- else }} - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} - {{- end }} - {{- end -}} -{{- if .Values.pushgateway.ingress.tls }} - tls: -{{ toYaml .Values.pushgateway.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} \ No newline at end of file diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/netpol.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/netpol.yaml deleted file mode 100644 index c8d1fb37e..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/netpol.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if and .Values.pushgateway.enabled .Values.networkPolicy.enabled -}} -apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} -kind: NetworkPolicy -metadata: - name: {{ template "prometheus.pushgateway.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "prometheus.pushgateway.matchLabels" . | nindent 6 }} - ingress: - - from: - - podSelector: - matchLabels: - {{- include "prometheus.server.matchLabels" . | nindent 12 }} - - ports: - - port: 9091 -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/pdb.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/pdb.yaml deleted file mode 100644 index 36543ba59..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/pdb.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.pushgateway.podDisruptionBudget.enabled }} -apiVersion: {{ template "prometheus.podDisruptionBudget.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ template "prometheus.pushgateway.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} -spec: - maxUnavailable: {{ .Values.pushgateway.podDisruptionBudget.maxUnavailable }} - selector: - matchLabels: - {{- include "prometheus.pushgateway.labels" . | nindent 6 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/psp.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/psp.yaml deleted file mode 100644 index 0b5a53430..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/psp.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{- if and .Values.pushgateway.enabled .Values.rbac.create .Values.podSecurityPolicy.enabled }} -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "prometheus.pushgateway.fullname" . }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - {{- with .Values.pushgateway.podSecurityPolicy.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - requiredDropCapabilities: - - ALL - volumes: - - 'persistentVolumeClaim' - - 'secret' - allowedHostPaths: - - pathPrefix: {{ .Values.pushgateway.persistentVolume.mountPath }} - hostNetwork: false - hostPID: false - hostIPC: false - runAsUser: - rule: 'RunAsAny' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - readOnlyRootFilesystem: true -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/pvc.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/pvc.yaml deleted file mode 100644 index fcb6efb50..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/pvc.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- if .Values.pushgateway.persistentVolume.enabled -}} -{{- if not .Values.pushgateway.persistentVolume.existingClaim -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - {{- if .Values.pushgateway.persistentVolume.annotations }} - annotations: -{{ toYaml .Values.pushgateway.persistentVolume.annotations | indent 4 }} - {{- end }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - name: {{ template "prometheus.pushgateway.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - accessModes: -{{ toYaml .Values.pushgateway.persistentVolume.accessModes | indent 4 }} -{{- if .Values.pushgateway.persistentVolume.storageClass }} -{{- if (eq "-" .Values.pushgateway.persistentVolume.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.pushgateway.persistentVolume.storageClass }}" -{{- end }} -{{- end }} -{{- if .Values.pushgateway.persistentVolume.volumeBindingMode }} - volumeBindingMode: "{{ .Values.pushgateway.persistentVolume.volumeBindingMode }}" -{{- end }} - resources: - requests: - storage: "{{ .Values.pushgateway.persistentVolume.size }}" -{{- if .Values.pushgateway.persistentVolume.volumeName }} - volumeName: "{{ .Values.pushgateway.persistentVolume.volumeName }}" -{{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/service.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/service.yaml deleted file mode 100644 index a49f47b27..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/service.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{- if .Values.pushgateway.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.pushgateway.service.annotations }} - annotations: -{{ toYaml .Values.pushgateway.service.annotations | indent 4}} -{{- end }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} -{{- if .Values.pushgateway.service.labels }} -{{ toYaml .Values.pushgateway.service.labels | indent 4}} -{{- end }} - name: {{ template "prometheus.pushgateway.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: -{{- if .Values.pushgateway.service.clusterIP }} - clusterIP: {{ .Values.pushgateway.service.clusterIP }} -{{- end }} -{{- if .Values.pushgateway.service.externalIPs }} - externalIPs: -{{ toYaml .Values.pushgateway.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.pushgateway.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.pushgateway.service.loadBalancerIP }} -{{- end }} -{{- if .Values.pushgateway.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.pushgateway.service.loadBalancerSourceRanges }} - - {{ $cidr }} - {{- end }} -{{- end }} - ports: - - name: http - port: {{ .Values.pushgateway.service.servicePort }} - protocol: TCP - targetPort: 9091 - {{- if .Values.pushgateway.service.nodePort }} - nodePort: {{ .Values.pushgateway.service.nodePort }} - {{- end }} - selector: - {{- include "prometheus.pushgateway.matchLabels" . | nindent 4 }} - type: "{{ .Values.pushgateway.service.type }}" -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/serviceaccount.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/serviceaccount.yaml deleted file mode 100644 index 8c0b876f3..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/serviceaccount.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if and .Values.pushgateway.enabled .Values.serviceAccounts.pushgateway.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - name: {{ template "prometheus.serviceAccountName.pushgateway" . }} -{{ include "prometheus.namespace" . | indent 2 }} - annotations: -{{ toYaml .Values.serviceAccounts.pushgateway.annotations | indent 4 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/vpa.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/vpa.yaml deleted file mode 100644 index 0ac54f9fe..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/pushgateway/vpa.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.pushgateway.enabled -}} -{{- if .Values.pushgateway.verticalAutoscaler.enabled -}} -apiVersion: autoscaling.k8s.io/v1beta2 -kind: VerticalPodAutoscaler -metadata: - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - name: {{ template "prometheus.pushgateway.fullname" . }}-vpa -{{ include "prometheus.namespace" . | indent 2 }} -spec: - targetRef: - apiVersion: "apps/v1" - kind: Deployment - name: {{ template "prometheus.pushgateway.fullname" . }} - updatePolicy: - updateMode: {{ .Values.pushgateway.verticalAutoscaler.updateMode | default "Off" | quote }} - resourcePolicy: - containerPolicies: {{ .Values.pushgateway.verticalAutoscaler.containerPolicies | default list | toYaml | trim | nindent 4 }} -{{- end -}} {{/* if .Values.pushgateway.verticalAutoscaler.enabled */}} -{{- end -}} {{/* .Values.pushgateway.enabled */}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/clusterrole.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/clusterrole.yaml deleted file mode 100644 index 2520235ab..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/clusterrole.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if and .Values.server.enabled .Values.rbac.create (empty .Values.server.useExistingClusterRoleName) -}} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: ClusterRole -metadata: - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.server.fullname" . }} -rules: -{{- if .Values.podSecurityPolicy.enabled }} - - apiGroups: - - extensions - resources: - - podsecuritypolicies - verbs: - - use - resourceNames: - - {{ template "prometheus.server.fullname" . }} -{{- end }} - - apiGroups: - - "" - resources: - - nodes - - nodes/proxy - - nodes/metrics - - services - - endpoints - - pods - - ingresses - - configmaps - verbs: - - get - - list - - watch - - apiGroups: - - "extensions" - - "networking.k8s.io" - resources: - - ingresses/status - - ingresses - verbs: - - get - - list - - watch - - nonResourceURLs: - - "/metrics" - verbs: - - get -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/clusterrolebinding.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/clusterrolebinding.yaml deleted file mode 100644 index 5a79611ff..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/clusterrolebinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.server.enabled .Values.rbac.create (empty .Values.server.namespaces) (empty .Values.server.useExistingClusterRoleName) -}} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: ClusterRoleBinding -metadata: - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.server.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "prometheus.serviceAccountName.server" . }} -{{ include "prometheus.namespace" . | indent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "prometheus.server.fullname" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/cm.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/cm.yaml deleted file mode 100644 index 92693edba..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/cm.yaml +++ /dev/null @@ -1,89 +0,0 @@ -{{- if .Values.server.enabled -}} -{{- if (empty .Values.server.configMapOverrideName) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - {{- with .Values.server.extraConfigmapLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} - name: {{ template "prometheus.server.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -data: - allow-snippet-annotations: "false" -{{- $root := . -}} -{{- range $key, $value := .Values.ruleFiles }} - {{ $key }}: {{- toYaml $value | indent 2 }} -{{- end }} -{{- range $key, $value := .Values.serverFiles }} - {{ $key }}: | -{{- if eq $key "prometheus.yml" }} - global: -{{ $root.Values.server.global | toYaml | trimSuffix "\n" | indent 6 }} -{{- if $root.Values.server.remoteWrite }} - remote_write: -{{ $root.Values.server.remoteWrite | toYaml | indent 4 }} -{{- end }} -{{- if $root.Values.server.remoteRead }} - remote_read: -{{ $root.Values.server.remoteRead | toYaml | indent 4 }} -{{- end }} -{{- end }} -{{- if eq $key "alerts" }} -{{- if and (not (empty $value)) (empty $value.groups) }} - groups: -{{- range $ruleKey, $ruleValue := $value }} - - name: {{ $ruleKey -}}.rules - rules: -{{ $ruleValue | toYaml | trimSuffix "\n" | indent 6 }} -{{- end }} -{{- else }} -{{ toYaml $value | indent 4 }} -{{- end }} -{{- else }} -{{ toYaml $value | default "{}" | indent 4 }} -{{- end }} -{{- if eq $key "prometheus.yml" -}} -{{- if $root.Values.extraScrapeConfigs }} -{{ tpl $root.Values.extraScrapeConfigs $root | indent 4 }} -{{- end -}} -{{- if or ($root.Values.alertmanager.enabled) ($root.Values.server.alertmanagers) }} - alerting: -{{- if $root.Values.alertRelabelConfigs }} -{{ $root.Values.alertRelabelConfigs | toYaml | trimSuffix "\n" | indent 6 }} -{{- end }} - alertmanagers: -{{- if $root.Values.server.alertmanagers }} -{{ toYaml $root.Values.server.alertmanagers | indent 8 }} -{{- else }} - - kubernetes_sd_configs: - - role: pod - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - {{- if $root.Values.alertmanager.prefixURL }} - path_prefix: {{ $root.Values.alertmanager.prefixURL }} - {{- end }} - relabel_configs: - - source_labels: [__meta_kubernetes_namespace] - regex: {{ $root.Release.Namespace }} - action: keep - - source_labels: [__meta_kubernetes_pod_label_app] - regex: {{ template "prometheus.name" $root }} - action: keep - - source_labels: [__meta_kubernetes_pod_label_component] - regex: alertmanager - action: keep - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_probe] - regex: {{ index $root.Values.alertmanager.podAnnotations "prometheus.io/probe" | default ".*" }} - action: keep - - source_labels: [__meta_kubernetes_pod_container_port_number] - regex: "9093" - action: keep -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/deploy.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/deploy.yaml deleted file mode 100644 index 45de5d187..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/deploy.yaml +++ /dev/null @@ -1,324 +0,0 @@ -{{- if .Values.server.enabled -}} -{{- if not .Values.server.statefulSet.enabled -}} -apiVersion: {{ template "prometheus.deployment.apiVersion" . }} -kind: Deployment -metadata: -{{- if .Values.server.deploymentAnnotations }} - annotations: - {{ toYaml .Values.server.deploymentAnnotations | nindent 4 }} -{{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.server.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - selector: - matchLabels: - {{- include "prometheus.server.matchLabels" . | nindent 6 }} - replicas: {{ .Values.server.replicaCount }} - {{- if .Values.server.strategy }} - strategy: -{{ toYaml .Values.server.strategy | trim | indent 4 }} - {{ if eq .Values.server.strategy.type "Recreate" }}rollingUpdate: null{{ end }} -{{- end }} - template: - metadata: - {{- if .Values.server.podAnnotations }} - annotations: - {{ toYaml .Values.server.podAnnotations | nindent 8 }} - {{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 8 }} - {{- if .Values.server.podLabels}} - {{ toYaml .Values.server.podLabels | nindent 8 }} - {{- end}} - spec: -{{- if .Values.server.priorityClassName }} - priorityClassName: "{{ .Values.server.priorityClassName }}" -{{- end }} -{{- if .Values.server.schedulerName }} - schedulerName: "{{ .Values.server.schedulerName }}" -{{- end }} -{{- if semverCompare ">=1.13-0" .Capabilities.KubeVersion.GitVersion }} - {{- if or (.Values.server.enableServiceLinks) (eq (.Values.server.enableServiceLinks | toString) "") }} - enableServiceLinks: true - {{- else }} - enableServiceLinks: false - {{- end }} -{{- end }} - serviceAccountName: {{ template "prometheus.serviceAccountName.server" . }} - {{- if .Values.server.extraInitContainers }} - initContainers: -{{ toYaml .Values.server.extraInitContainers | indent 8 }} - {{- end }} - containers: - {{- if .Values.configmapReload.prometheus.enabled }} - - name: {{ template "prometheus.name" . }}-{{ .Values.server.name }}-{{ .Values.configmapReload.prometheus.name }} - image: "{{ .Values.configmapReload.prometheus.image.repository }}:{{ .Values.configmapReload.prometheus.image.tag }}" - imagePullPolicy: "{{ .Values.configmapReload.prometheus.image.pullPolicy }}" - {{- with .Values.configmapReload.prometheus.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - args: - - --volume-dir=/etc/config - - --webhook-url=http://127.0.0.1:9090{{ .Values.server.prefixURL }}/-/reload - {{- range $key, $value := .Values.configmapReload.prometheus.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- range .Values.configmapReload.prometheus.extraVolumeDirs }} - - --volume-dir={{ . }} - {{- end }} - {{- if .Values.configmapReload.prometheus.containerPort }} - ports: - - containerPort: {{ .Values.configmapReload.prometheus.containerPort }} - {{- end }} - resources: -{{ toYaml .Values.configmapReload.prometheus.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - readOnly: true - {{- range .Values.configmapReload.prometheus.extraConfigmapMounts }} - - name: {{ $.Values.configmapReload.prometheus.name }}-{{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- end }} - - - name: {{ template "prometheus.name" . }}-{{ .Values.server.name }} - image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}" - imagePullPolicy: "{{ .Values.server.image.pullPolicy }}" - {{- if .Values.server.env }} - env: -{{ toYaml .Values.server.env | indent 12}} - {{- end }} - args: - {{- if .Values.server.defaultFlagsOverride }} - {{ toYaml .Values.server.defaultFlagsOverride | nindent 12}} - {{- else }} - {{- if .Values.server.retention }} - - --storage.tsdb.retention.time={{ .Values.server.retention }} - {{- end }} - - --config.file={{ .Values.server.configPath }} - {{- if .Values.server.storagePath }} - - --storage.tsdb.path={{ .Values.server.storagePath }} - {{- else }} - - --storage.tsdb.path={{ .Values.server.persistentVolume.mountPath }} - {{- end }} - - --web.console.libraries=/etc/prometheus/console_libraries - - --web.console.templates=/etc/prometheus/consoles - {{- range .Values.server.extraFlags }} - - --{{ . }} - {{- end }} - {{- range $key, $value := .Values.server.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- if .Values.server.prefixURL }} - - --web.route-prefix={{ .Values.server.prefixURL }} - {{- end }} - {{- if .Values.server.baseURL }} - - --web.external-url={{ .Values.server.baseURL }} - {{- end }} - {{- end }} - ports: - - containerPort: 9090 - {{- if .Values.server.hostPort }} - hostPort: {{ .Values.server.hostPort }} - {{- end }} - readinessProbe: - {{- if not .Values.server.tcpSocketProbeEnabled }} - httpGet: - path: {{ .Values.server.prefixURL }}/-/ready - port: 9090 - scheme: {{ .Values.server.probeScheme }} - {{- with .Values.server.probeHeaders }} - httpHeaders: -{{- toYaml . | nindent 14 }} - {{- end }} - {{- else }} - tcpSocket: - port: 9090 - {{- end }} - initialDelaySeconds: {{ .Values.server.readinessProbeInitialDelay }} - periodSeconds: {{ .Values.server.readinessProbePeriodSeconds }} - timeoutSeconds: {{ .Values.server.readinessProbeTimeout }} - failureThreshold: {{ .Values.server.readinessProbeFailureThreshold }} - successThreshold: {{ .Values.server.readinessProbeSuccessThreshold }} - livenessProbe: - {{- if not .Values.server.tcpSocketProbeEnabled }} - httpGet: - path: {{ .Values.server.prefixURL }}/-/healthy - port: 9090 - scheme: {{ .Values.server.probeScheme }} - {{- with .Values.server.probeHeaders }} - httpHeaders: -{{- toYaml . | nindent 14 }} - {{- end }} - {{- else }} - tcpSocket: - port: 9090 - {{- end }} - initialDelaySeconds: {{ .Values.server.livenessProbeInitialDelay }} - periodSeconds: {{ .Values.server.livenessProbePeriodSeconds }} - timeoutSeconds: {{ .Values.server.livenessProbeTimeout }} - failureThreshold: {{ .Values.server.livenessProbeFailureThreshold }} - successThreshold: {{ .Values.server.livenessProbeSuccessThreshold }} - {{- if .Values.server.startupProbe.enabled }} - startupProbe: - {{- if not .Values.server.tcpSocketProbeEnabled }} - httpGet: - path: {{ .Values.server.prefixURL }}/-/healthy - port: 9090 - scheme: {{ .Values.server.probeScheme }} - {{- if .Values.server.probeHeaders }} - httpHeaders: - {{- range .Values.server.probeHeaders}} - - name: {{ .name }} - value: {{ .value }} - {{- end }} - {{- end }} - {{- else }} - tcpSocket: - port: 9090 - {{- end }} - failureThreshold: {{ .Values.server.startupProbe.failureThreshold }} - periodSeconds: {{ .Values.server.startupProbe.periodSeconds }} - timeoutSeconds: {{ .Values.server.startupProbe.timeoutSeconds }} - {{- end }} - resources: -{{ toYaml .Values.server.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - - name: storage-volume - mountPath: {{ .Values.server.persistentVolume.mountPath }} - subPath: "{{ .Values.server.persistentVolume.subPath }}" - {{- range .Values.server.extraHostPathMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.server.extraConfigmapMounts }} - - name: {{ $.Values.server.name }}-{{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.server.extraSecretMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- if .Values.server.extraVolumeMounts }} - {{ toYaml .Values.server.extraVolumeMounts | nindent 12 }} - {{- end }} - {{- with .Values.server.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.server.sidecarContainers }} - {{- range $name, $spec := .Values.server.sidecarContainers }} - - name: {{ $name }} - {{- if kindIs "string" $spec }} - {{- tpl $spec $ | nindent 10 }} - {{- else }} - {{- toYaml $spec | nindent 10 }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.server.hostNetwork }} - hostNetwork: true - dnsPolicy: ClusterFirstWithHostNet - {{- else }} - dnsPolicy: {{ .Values.server.dnsPolicy }} - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - {{- if .Values.server.nodeSelector }} - nodeSelector: -{{ toYaml .Values.server.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.server.hostAliases }} - hostAliases: -{{ toYaml .Values.server.hostAliases | indent 8 }} - {{- end }} - {{- if .Values.server.dnsConfig }} - dnsConfig: -{{ toYaml .Values.server.dnsConfig | indent 8 }} - {{- end }} - {{- with .Values.server.securityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.server.tolerations }} - tolerations: -{{ toYaml .Values.server.tolerations | indent 8 }} - {{- end }} - {{- if .Values.server.affinity }} - affinity: -{{ toYaml .Values.server.affinity | indent 8 }} - {{- end }} - terminationGracePeriodSeconds: {{ .Values.server.terminationGracePeriodSeconds }} - volumes: - - name: config-volume - {{- if empty .Values.server.configFromSecret }} - configMap: - name: {{ if .Values.server.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.server.configMapOverrideName }}{{- else }}{{ template "prometheus.server.fullname" . }}{{- end }} - {{- else }} - secret: - secretName: {{ .Values.server.configFromSecret }} - {{- end }} - {{- range .Values.server.extraHostPathMounts }} - - name: {{ .name }} - hostPath: - path: {{ .hostPath }} - {{- end }} - {{- range .Values.configmapReload.prometheus.extraConfigmapMounts }} - - name: {{ $.Values.configmapReload.prometheus.name }}-{{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - {{- range .Values.server.extraConfigmapMounts }} - - name: {{ $.Values.server.name }}-{{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - {{- range .Values.server.extraSecretMounts }} - - name: {{ .name }} - secret: - secretName: {{ .secretName }} - {{- with .optional }} - optional: {{ . }} - {{- end }} - {{- end }} - {{- range .Values.configmapReload.prometheus.extraConfigmapMounts }} - - name: {{ .name }} - configMap: - name: {{ .configMap }} - {{- with .optional }} - optional: {{ . }} - {{- end }} - {{- end }} -{{- if .Values.server.extraVolumes }} -{{ toYaml .Values.server.extraVolumes | indent 8}} -{{- end }} - - name: storage-volume - {{- if .Values.server.persistentVolume.enabled }} - persistentVolumeClaim: - claimName: {{ if .Values.server.persistentVolume.existingClaim }}{{ .Values.server.persistentVolume.existingClaim }}{{- else }}{{ template "prometheus.server.fullname" . }}{{- end }} - {{- else }} - emptyDir: - {{- if .Values.server.emptyDir.sizeLimit }} - sizeLimit: {{ .Values.server.emptyDir.sizeLimit }} - {{- else }} - {} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/extra-manifests.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/extra-manifests.yaml deleted file mode 100644 index 7560f5a6a..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/extra-manifests.yaml +++ /dev/null @@ -1,9 +0,0 @@ -{{ range .Values.server.extraObjects }} ---- -{{ tpl (toYaml .) $ }} -{{ end }} - -{{- range .Values.server.extraTemplates }} ---- -{{ tpl . $ -}} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/headless-svc.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/headless-svc.yaml deleted file mode 100644 index d519f4e0e..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/headless-svc.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if .Values.server.enabled -}} -{{- if .Values.server.statefulSet.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.server.statefulSet.headless.annotations }} - annotations: -{{ toYaml .Values.server.statefulSet.headless.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} -{{- if .Values.server.statefulSet.headless.labels }} -{{ toYaml .Values.server.statefulSet.headless.labels | indent 4 }} -{{- end }} - name: {{ template "prometheus.server.fullname" . }}-headless -{{ include "prometheus.namespace" . | indent 2 }} -spec: - clusterIP: None - ports: - - name: http - port: {{ .Values.server.statefulSet.headless.servicePort }} - protocol: TCP - targetPort: 9090 - {{- if .Values.server.statefulSet.headless.gRPC.enabled }} - - name: grpc - port: {{ .Values.server.statefulSet.headless.gRPC.servicePort }} - protocol: TCP - targetPort: 10901 - {{- if .Values.server.statefulSet.headless.gRPC.nodePort }} - nodePort: {{ .Values.server.statefulSet.headless.gRPC.nodePort }} - {{- end }} - {{- end }} - - selector: - {{- include "prometheus.server.matchLabels" . | nindent 4 }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/ingress.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/ingress.yaml deleted file mode 100644 index 000f39cab..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/ingress.yaml +++ /dev/null @@ -1,59 +0,0 @@ -{{- if .Values.server.enabled -}} -{{- if .Values.server.ingress.enabled -}} -{{- $ingressApiIsStable := eq (include "ingress.isStable" .) "true" -}} -{{- $ingressSupportsIngressClassName := eq (include "ingress.supportsIngressClassName" .) "true" -}} -{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} -{{- $releaseName := .Release.Name -}} -{{- $serviceName := include "prometheus.server.fullname" . }} -{{- $servicePort := .Values.server.service.servicePort -}} -{{- $ingressPath := .Values.server.ingress.path -}} -{{- $ingressPathType := .Values.server.ingress.pathType -}} -{{- $extraPaths := .Values.server.ingress.extraPaths -}} -apiVersion: {{ template "ingress.apiVersion" . }} -kind: Ingress -metadata: -{{- if .Values.server.ingress.annotations }} - annotations: -{{ toYaml .Values.server.ingress.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} -{{- range $key, $value := .Values.server.ingress.extraLabels }} - {{ $key }}: {{ $value }} -{{- end }} - name: {{ template "prometheus.server.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - {{- if and $ingressSupportsIngressClassName .Values.server.ingress.ingressClassName }} - ingressClassName: {{ .Values.server.ingress.ingressClassName }} - {{- end }} - rules: - {{- range .Values.server.ingress.hosts }} - {{- $url := splitList "/" . }} - - host: {{ first $url }} - http: - paths: -{{ if $extraPaths }} -{{ toYaml $extraPaths | indent 10 }} -{{- end }} - - path: {{ $ingressPath }} - {{- if $ingressSupportsPathType }} - pathType: {{ $ingressPathType }} - {{- end }} - backend: - {{- if $ingressApiIsStable }} - service: - name: {{ $serviceName }} - port: - number: {{ $servicePort }} - {{- else }} - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} - {{- end }} - {{- end -}} -{{- if .Values.server.ingress.tls }} - tls: -{{ toYaml .Values.server.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/netpol.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/netpol.yaml deleted file mode 100644 index c8870e9ff..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/netpol.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.server.enabled -}} -{{- if .Values.networkPolicy.enabled }} -apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} -kind: NetworkPolicy -metadata: - name: {{ template "prometheus.server.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "prometheus.server.matchLabels" . | nindent 6 }} - ingress: - - ports: - - port: 9090 -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/pdb.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/pdb.yaml deleted file mode 100644 index 5a6ab42f8..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/pdb.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.server.podDisruptionBudget.enabled }} -apiVersion: {{ template "prometheus.podDisruptionBudget.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ template "prometheus.server.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} -spec: - maxUnavailable: {{ .Values.server.podDisruptionBudget.maxUnavailable }} - selector: - matchLabels: - {{- include "prometheus.server.labels" . | nindent 6 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/psp.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/psp.yaml deleted file mode 100644 index e2e926ed4..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/psp.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if and .Values.server.enabled .Values.rbac.create .Values.podSecurityPolicy.enabled }} -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "prometheus.server.fullname" . }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - {{- with .Values.server.podSecurityPolicy.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - allowedCapabilities: - - 'CHOWN' - volumes: - - 'configMap' - - 'persistentVolumeClaim' - - 'emptyDir' - - 'secret' - - 'hostPath' - allowedHostPaths: - - pathPrefix: /etc - readOnly: true - - pathPrefix: {{ .Values.server.persistentVolume.mountPath }} - {{- range .Values.server.extraHostPathMounts }} - - pathPrefix: {{ .hostPath }} - readOnly: {{ .readOnly }} - {{- end }} - hostNetwork: false - hostPID: false - hostIPC: false - runAsUser: - rule: 'RunAsAny' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - readOnlyRootFilesystem: false -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/pvc.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/pvc.yaml deleted file mode 100644 index d86fdda80..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/pvc.yaml +++ /dev/null @@ -1,42 +0,0 @@ -{{- if .Values.server.enabled -}} -{{- if not .Values.server.statefulSet.enabled -}} -{{- if .Values.server.persistentVolume.enabled -}} -{{- if not .Values.server.persistentVolume.existingClaim -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - {{- if .Values.server.persistentVolume.annotations }} - annotations: -{{ toYaml .Values.server.persistentVolume.annotations | indent 4 }} - {{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.server.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - accessModes: -{{ toYaml .Values.server.persistentVolume.accessModes | indent 4 }} -{{- if .Values.server.persistentVolume.storageClass }} -{{- if (eq "-" .Values.server.persistentVolume.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.server.persistentVolume.storageClass }}" -{{- end }} -{{- end }} -{{- if .Values.server.persistentVolume.volumeBindingMode }} - volumeBindingMode: "{{ .Values.server.persistentVolume.volumeBindingMode }}" -{{- end }} - resources: - requests: - storage: "{{ .Values.server.persistentVolume.size }}" -{{- if .Values.server.persistentVolume.selector }} - selector: - {{- toYaml .Values.server.persistentVolume.selector | nindent 4 }} -{{- end -}} -{{- if .Values.server.persistentVolume.volumeName }} - volumeName: "{{ .Values.server.persistentVolume.volumeName }}" -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/rolebinding.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/rolebinding.yaml deleted file mode 100644 index 93ce3ee13..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/rolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if and .Values.server.enabled .Values.rbac.create .Values.server.useExistingClusterRoleName .Values.server.namespaces -}} -{{ range $.Values.server.namespaces -}} ---- -apiVersion: {{ template "rbac.apiVersion" $ }} -kind: RoleBinding -metadata: - labels: - {{- include "prometheus.server.labels" $ | nindent 4 }} - name: {{ template "prometheus.server.fullname" $ }} - namespace: {{ . }} -subjects: - - kind: ServiceAccount - name: {{ template "prometheus.serviceAccountName.server" $ }} -{{ include "prometheus.namespace" $ | indent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ $.Values.server.useExistingClusterRoleName }} -{{ end -}} -{{ end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/service.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/service.yaml deleted file mode 100644 index 01c5a4a8a..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/service.yaml +++ /dev/null @@ -1,60 +0,0 @@ -{{- if and .Values.server.enabled .Values.server.service.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.server.service.annotations }} - annotations: -{{ toYaml .Values.server.service.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} -{{- if .Values.server.service.labels }} -{{ toYaml .Values.server.service.labels | indent 4 }} -{{- end }} - name: {{ template "prometheus.server.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: -{{- if .Values.server.service.clusterIP }} - clusterIP: {{ .Values.server.service.clusterIP }} -{{- end }} -{{- if .Values.server.service.externalIPs }} - externalIPs: -{{ toYaml .Values.server.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.server.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.server.service.loadBalancerIP }} -{{- end }} -{{- if .Values.server.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.server.service.loadBalancerSourceRanges }} - - {{ $cidr }} - {{- end }} -{{- end }} - ports: - - name: http - port: {{ .Values.server.service.servicePort }} - protocol: TCP - targetPort: 9090 - {{- if .Values.server.service.nodePort }} - nodePort: {{ .Values.server.service.nodePort }} - {{- end }} - {{- if .Values.server.service.gRPC.enabled }} - - name: grpc - port: {{ .Values.server.service.gRPC.servicePort }} - protocol: TCP - targetPort: 10901 - {{- if .Values.server.service.gRPC.nodePort }} - nodePort: {{ .Values.server.service.gRPC.nodePort }} - {{- end }} - {{- end }} - selector: - {{- if and .Values.server.statefulSet.enabled .Values.server.service.statefulsetReplica.enabled }} - statefulset.kubernetes.io/pod-name: {{ template "prometheus.server.fullname" . }}-{{ .Values.server.service.statefulsetReplica.replica }} - {{- else -}} - {{- include "prometheus.server.matchLabels" . | nindent 4 }} -{{- if .Values.server.service.sessionAffinity }} - sessionAffinity: {{ .Values.server.service.sessionAffinity }} -{{- end }} - {{- end }} - type: "{{ .Values.server.service.type }}" -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/serviceaccount.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/serviceaccount.yaml deleted file mode 100644 index 9c0502ab7..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.server.enabled -}} -{{- if .Values.serviceAccounts.server.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.serviceAccountName.server" . }} -{{ include "prometheus.namespace" . | indent 2 }} - annotations: -{{ toYaml .Values.serviceAccounts.server.annotations | indent 4 }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/sts.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/sts.yaml deleted file mode 100644 index f137d214e..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/sts.yaml +++ /dev/null @@ -1,344 +0,0 @@ -{{- if .Values.server.enabled -}} -{{- if .Values.server.statefulSet.enabled -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: -{{- if .Values.server.statefulSet.annotations }} - annotations: - {{ toYaml .Values.server.statefulSet.annotations | nindent 4 }} -{{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - {{- if .Values.server.statefulSet.labels}} - {{ toYaml .Values.server.statefulSet.labels | nindent 4 }} - {{- end}} - name: {{ template "prometheus.server.fullname" . }} -{{ include "prometheus.namespace" . | indent 2 }} -spec: - serviceName: {{ template "prometheus.server.fullname" . }}-headless - selector: - matchLabels: - {{- include "prometheus.server.matchLabels" . | nindent 6 }} - replicas: {{ .Values.server.replicaCount }} - podManagementPolicy: {{ .Values.server.statefulSet.podManagementPolicy }} - template: - metadata: - {{- if .Values.server.podAnnotations }} - annotations: - {{ toYaml .Values.server.podAnnotations | nindent 8 }} - {{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 8 }} - {{- if .Values.server.podLabels}} - {{ toYaml .Values.server.podLabels | nindent 8 }} - {{- end}} - spec: -{{- if .Values.server.priorityClassName }} - priorityClassName: "{{ .Values.server.priorityClassName }}" -{{- end }} -{{- if .Values.server.schedulerName }} - schedulerName: "{{ .Values.server.schedulerName }}" -{{- end }} -{{- if semverCompare ">=1.13-0" .Capabilities.KubeVersion.GitVersion }} - {{- if or (.Values.server.enableServiceLinks) (eq (.Values.server.enableServiceLinks | toString) "") }} - enableServiceLinks: true - {{- else }} - enableServiceLinks: false - {{- end }} -{{- end }} - serviceAccountName: {{ template "prometheus.serviceAccountName.server" . }} - {{- if .Values.server.extraInitContainers }} - initContainers: -{{ toYaml .Values.server.extraInitContainers | indent 8 }} - {{- end }} - containers: - {{- if .Values.configmapReload.prometheus.enabled }} - - name: {{ template "prometheus.name" . }}-{{ .Values.server.name }}-{{ .Values.configmapReload.prometheus.name }} - image: "{{ .Values.configmapReload.prometheus.image.repository }}:{{ .Values.configmapReload.prometheus.image.tag }}" - imagePullPolicy: "{{ .Values.configmapReload.prometheus.image.pullPolicy }}" - {{- with .Values.configmapReload.prometheus.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - args: - - --volume-dir=/etc/config - - --webhook-url=http://127.0.0.1:9090{{ .Values.server.prefixURL }}/-/reload - {{- range $key, $value := .Values.configmapReload.prometheus.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- range .Values.configmapReload.prometheus.extraVolumeDirs }} - - --volume-dir={{ . }} - {{- end }} - {{- if .Values.configmapReload.prometheus.containerPort }} - ports: - - containerPort: {{ .Values.configmapReload.prometheus.containerPort }} - {{- end }} - resources: -{{ toYaml .Values.configmapReload.prometheus.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - readOnly: true - {{- range .Values.configmapReload.prometheus.extraConfigmapMounts }} - - name: {{ $.Values.configmapReload.prometheus.name }}-{{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- end }} - - - name: {{ template "prometheus.name" . }}-{{ .Values.server.name }} - image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}" - imagePullPolicy: "{{ .Values.server.image.pullPolicy }}" - {{- if .Values.server.env }} - env: -{{ toYaml .Values.server.env | indent 12}} - {{- end }} - args: - {{- if .Values.server.defaultFlagsOverride }} - {{ toYaml .Values.server.defaultFlagsOverride | nindent 12}} - {{- else }} - {{- if .Values.server.prefixURL }} - - --web.route-prefix={{ .Values.server.prefixURL }} - {{- end }} - {{- if .Values.server.retention }} - - --storage.tsdb.retention.time={{ .Values.server.retention }} - {{- end }} - - --config.file={{ .Values.server.configPath }} - {{- if .Values.server.storagePath }} - - --storage.tsdb.path={{ .Values.server.storagePath }} - {{- else }} - - --storage.tsdb.path={{ .Values.server.persistentVolume.mountPath }} - {{- end }} - - --web.console.libraries=/etc/prometheus/console_libraries - - --web.console.templates=/etc/prometheus/consoles - {{- range .Values.server.extraFlags }} - - --{{ . }} - {{- end }} - {{- range $key, $value := .Values.server.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- if .Values.server.baseURL }} - - --web.external-url={{ .Values.server.baseURL }} - {{- end }} - {{- end }} - ports: - - containerPort: 9090 - {{- if .Values.server.hostPort }} - hostPort: {{ .Values.server.hostPort }} - {{- end }} - readinessProbe: - {{- if not .Values.server.tcpSocketProbeEnabled }} - httpGet: - path: {{ .Values.server.prefixURL }}/-/ready - port: 9090 - scheme: {{ .Values.server.probeScheme }} - {{- with .Values.server.probeHeaders }} - httpHeaders: -{{- toYaml . | nindent 14 }} - {{- end }} - {{- else }} - tcpSocket: - port: 9090 - {{- end }} - initialDelaySeconds: {{ .Values.server.readinessProbeInitialDelay }} - periodSeconds: {{ .Values.server.readinessProbePeriodSeconds }} - timeoutSeconds: {{ .Values.server.readinessProbeTimeout }} - failureThreshold: {{ .Values.server.readinessProbeFailureThreshold }} - successThreshold: {{ .Values.server.readinessProbeSuccessThreshold }} - livenessProbe: - {{- if not .Values.server.tcpSocketProbeEnabled }} - httpGet: - path: {{ .Values.server.prefixURL }}/-/healthy - port: 9090 - scheme: {{ .Values.server.probeScheme }} - {{- with .Values.server.probeHeaders }} - httpHeaders: -{{- toYaml . | nindent 14 }} - {{- end }} - {{- else }} - tcpSocket: - port: 9090 - {{- end }} - initialDelaySeconds: {{ .Values.server.livenessProbeInitialDelay }} - periodSeconds: {{ .Values.server.livenessProbePeriodSeconds }} - timeoutSeconds: {{ .Values.server.livenessProbeTimeout }} - failureThreshold: {{ .Values.server.livenessProbeFailureThreshold }} - successThreshold: {{ .Values.server.livenessProbeSuccessThreshold }} - {{- if .Values.server.startupProbe.enabled }} - startupProbe: - {{- if not .Values.server.tcpSocketProbeEnabled }} - httpGet: - path: {{ .Values.server.prefixURL }}/-/healthy - port: 9090 - scheme: {{ .Values.server.probeScheme }} - {{- if .Values.server.probeHeaders }} - httpHeaders: - {{- range .Values.server.probeHeaders}} - - name: {{ .name }} - value: {{ .value }} - {{- end }} - {{- end }} - {{- else }} - tcpSocket: - port: 9090 - {{- end }} - failureThreshold: {{ .Values.server.startupProbe.failureThreshold }} - periodSeconds: {{ .Values.server.startupProbe.periodSeconds }} - timeoutSeconds: {{ .Values.server.startupProbe.timeoutSeconds }} - {{- end }} - resources: -{{ toYaml .Values.server.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - - name: storage-volume - mountPath: {{ .Values.server.persistentVolume.mountPath }} - subPath: "{{ .Values.server.persistentVolume.subPath }}" - {{- range .Values.server.extraHostPathMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.server.extraConfigmapMounts }} - - name: {{ $.Values.server.name }}-{{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.server.extraSecretMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- if .Values.server.extraVolumeMounts }} - {{ toYaml .Values.server.extraVolumeMounts | nindent 12 }} - {{- end }} - {{- with .Values.server.containerSecurityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.server.sidecarContainers }} - {{- range $name, $spec := .Values.server.sidecarContainers }} - - name: {{ $name }} - {{- if kindIs "string" $spec }} - {{- tpl $spec $ | nindent 10 }} - {{- else }} - {{- toYaml $spec | nindent 10 }} - {{- end }} - {{- end }} - {{- end }} - hostNetwork: {{ .Values.server.hostNetwork }} - {{- if .Values.server.dnsPolicy }} - dnsPolicy: {{ .Values.server.dnsPolicy }} - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - {{- if .Values.server.nodeSelector }} - nodeSelector: -{{ toYaml .Values.server.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.server.hostAliases }} - hostAliases: -{{ toYaml .Values.server.hostAliases | indent 8 }} - {{- end }} - {{- if .Values.server.dnsConfig }} - dnsConfig: -{{ toYaml .Values.server.dnsConfig | indent 8 }} - {{- end }} - {{- with .Values.server.securityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.server.tolerations }} - tolerations: -{{ toYaml .Values.server.tolerations | indent 8 }} - {{- end }} - {{- if .Values.server.affinity }} - affinity: -{{ toYaml .Values.server.affinity | indent 8 }} - {{- end }} - terminationGracePeriodSeconds: {{ .Values.server.terminationGracePeriodSeconds }} - volumes: - - name: config-volume - {{- if empty .Values.server.configFromSecret }} - configMap: - name: {{ if .Values.server.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.server.configMapOverrideName }}{{- else }}{{ template "prometheus.server.fullname" . }}{{- end }} - {{- else }} - secret: - secretName: {{ .Values.server.configFromSecret }} - {{- end }} - {{- range .Values.server.extraHostPathMounts }} - - name: {{ .name }} - hostPath: - path: {{ .hostPath }} - {{- end }} - {{- range .Values.configmapReload.prometheus.extraConfigmapMounts }} - - name: {{ $.Values.configmapReload.prometheus.name }}-{{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - {{- range .Values.server.extraConfigmapMounts }} - - name: {{ $.Values.server.name }}-{{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - {{- range .Values.server.extraSecretMounts }} - - name: {{ .name }} - secret: - secretName: {{ .secretName }} - {{- with .optional }} - optional: {{ . }} - {{- end }} - {{- end }} - {{- range .Values.configmapReload.prometheus.extraConfigmapMounts }} - - name: {{ .name }} - configMap: - name: {{ .configMap }} - {{- with .optional }} - optional: {{ . }} - {{- end }} - {{- end }} -{{- if .Values.server.extraVolumes }} -{{ toYaml .Values.server.extraVolumes | indent 8}} -{{- end }} -{{- if .Values.server.persistentVolume.enabled }} - volumeClaimTemplates: - - metadata: - name: storage-volume - {{- if .Values.server.persistentVolume.annotations }} - annotations: -{{ toYaml .Values.server.persistentVolume.annotations | indent 10 }} - {{- end }} - {{- if .Values.server.persistentVolume.labels }} - labels: -{{ toYaml .Values.server.persistentVolume.labels | indent 10 }} - {{- end }} - spec: - accessModes: -{{ toYaml .Values.server.persistentVolume.accessModes | indent 10 }} - resources: - requests: - storage: "{{ .Values.server.persistentVolume.size }}" - {{- if .Values.server.persistentVolume.storageClass }} - {{- if (eq "-" .Values.server.persistentVolume.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ .Values.server.persistentVolume.storageClass }}" - {{- end }} - {{- end }} -{{- else }} - - name: storage-volume - emptyDir: - {{- if .Values.server.emptyDir.sizeLimit }} - sizeLimit: {{ .Values.server.emptyDir.sizeLimit }} - {{- else }} - {} - {{- end -}} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/prometheus/templates/server/vpa.yaml b/charts/gitlab/gitlab/charts/prometheus/templates/server/vpa.yaml deleted file mode 100644 index 981a9b485..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/templates/server/vpa.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if .Values.server.enabled -}} -{{- if .Values.server.verticalAutoscaler.enabled -}} -apiVersion: autoscaling.k8s.io/v1beta2 -kind: VerticalPodAutoscaler -metadata: - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.server.fullname" . }}-vpa -{{ include "prometheus.namespace" . | indent 2 }} -spec: - targetRef: - apiVersion: "apps/v1" -{{- if .Values.server.statefulSet.enabled }} - kind: StatefulSet -{{- else }} - kind: Deployment -{{- end }} - name: {{ template "prometheus.server.fullname" . }} - updatePolicy: - updateMode: {{ .Values.server.verticalAutoscaler.updateMode | default "Off" | quote }} - resourcePolicy: - containerPolicies: {{ .Values.server.verticalAutoscaler.containerPolicies | default list | toYaml | trim | nindent 4 }} -{{- end -}} {{/* if .Values.server.verticalAutoscaler.enabled */}} -{{- end -}} {{/* .Values.server.enabled */}} diff --git a/charts/gitlab/gitlab/charts/prometheus/values.yaml b/charts/gitlab/gitlab/charts/prometheus/values.yaml deleted file mode 100644 index 3b373826b..000000000 --- a/charts/gitlab/gitlab/charts/prometheus/values.yaml +++ /dev/null @@ -1,1915 +0,0 @@ -rbac: - create: true - -podSecurityPolicy: - enabled: false - -imagePullSecrets: -# - name: "image-pull-secret" - -## Define serviceAccount names for components. Defaults to component's fully qualified name. -## -serviceAccounts: - alertmanager: - create: true - name: - annotations: {} - nodeExporter: - create: true - name: - annotations: {} - pushgateway: - create: true - name: - annotations: {} - server: - create: true - name: - annotations: {} - -alertmanager: - ## If false, alertmanager will not be installed - ## - enabled: true - - ## Use a ClusterRole (and ClusterRoleBinding) - ## - If set to false - we define a Role and RoleBinding in the defined namespaces ONLY - ## This makes alertmanager work - for users who do not have ClusterAdmin privs, but wants alertmanager to operate on their own namespaces, instead of clusterwide. - useClusterRole: true - - ## Set to a rolename to use existing role - skipping role creating - but still doing serviceaccount and rolebinding to the rolename set here. - useExistingRole: false - - ## alertmanager container name - ## - name: alertmanager - - ## alertmanager container image - ## - image: - repository: quay.io/prometheus/alertmanager - tag: v0.24.0 - pullPolicy: IfNotPresent - - ## alertmanager priorityClassName - ## - priorityClassName: "" - - ## Custom HTTP headers for Readiness Probe - ## - ## Useful for providing HTTP Basic Auth to healthchecks - probeHeaders: [] - - ## Additional alertmanager container arguments - ## - extraArgs: {} - - ## Additional InitContainers to initialize the pod - ## - extraInitContainers: [] - - ## The URL prefix at which the container can be accessed. Useful in the case the '-web.external-url' includes a slug - ## so that the various internal URLs are still able to access as they are in the default case. - ## (Optional) - prefixURL: "" - - ## External URL which can access alertmanager - baseURL: "http://localhost:9093" - - ## Additional alertmanager container environment variable - ## For instance to add a http_proxy - ## - extraEnv: {} - - ## Additional alertmanager Secret mounts - # Defines additional mounts with secrets. Secrets must be manually created in the namespace. - extraSecretMounts: [] - # - name: secret-files - # mountPath: /etc/secrets - # subPath: "" - # secretName: alertmanager-secret-files - # readOnly: true - - ## Additional alertmanager Configmap mounts - extraConfigmapMounts: [] - # - name: template-files - # mountPath: /etc/config/templates.d - # configMap: alertmanager-template-files - # readOnly: true - - ## ConfigMap override where fullname is {{.Release.Name}}-{{.Values.alertmanager.configMapOverrideName}} - ## Defining configMapOverrideName will cause templates/alertmanager-configmap.yaml - ## to NOT generate a ConfigMap resource - ## - configMapOverrideName: "" - - ## The name of a secret in the same kubernetes namespace which contains the Alertmanager config - ## Defining configFromSecret will cause templates/alertmanager-configmap.yaml - ## to NOT generate a ConfigMap resource - ## - configFromSecret: "" - - ## The configuration file name to be loaded to alertmanager - ## Must match the key within configuration loaded from ConfigMap/Secret - ## - configFileName: alertmanager.yml - - ingress: - ## If true, alertmanager Ingress will be created - ## - enabled: false - - # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName - # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress - # ingressClassName: nginx - - ## alertmanager Ingress annotations - ## - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: 'true' - - ## alertmanager Ingress additional labels - ## - extraLabels: {} - - ## alertmanager Ingress hostnames with optional path - ## Must be provided if Ingress is enabled - ## - hosts: [] - # - alertmanager.domain.com - # - domain.com/alertmanager - - path: / - - # pathType is only for k8s >= 1.18 - pathType: Prefix - - ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services. - extraPaths: [] - # - path: /* - # backend: - # serviceName: ssl-redirect - # servicePort: use-annotation - - ## alertmanager Ingress TLS configuration - ## Secrets must be manually created in the namespace - ## - tls: [] - # - secretName: prometheus-alerts-tls - # hosts: - # - alertmanager.domain.com - - ## Alertmanager Deployment Strategy type - # strategy: - # type: Recreate - - ## Node tolerations for alertmanager scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - ## Node labels for alertmanager pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Pod affinity - ## - affinity: {} - - ## PodDisruptionBudget settings - ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ - ## - podDisruptionBudget: - enabled: false - maxUnavailable: 1 - - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - persistentVolume: - ## If true, alertmanager will create/use a Persistent Volume Claim - ## If false, use emptyDir - ## - enabled: true - - ## alertmanager data Persistent Volume access modes - ## Must match those of existing PV or dynamic provisioner - ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - accessModes: - - ReadWriteOnce - - ## alertmanager data Persistent Volume Claim annotations - ## - annotations: {} - - ## alertmanager data Persistent Volume existing claim name - ## Requires alertmanager.persistentVolume.enabled: true - ## If defined, PVC must be created manually before volume will be bound - existingClaim: "" - - ## alertmanager data Persistent Volume mount root path - ## - mountPath: /data - - ## alertmanager data Persistent Volume size - ## - size: 2Gi - - ## alertmanager data Persistent Volume Storage Class - ## 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: "-" - - ## alertmanager data Persistent Volume Binding Mode - ## If defined, volumeBindingMode: - ## If undefined (the default) or set to null, no volumeBindingMode spec is - ## set, choosing the default mode. - ## - # volumeBindingMode: "" - - ## Subdirectory of alertmanager data Persistent Volume to mount - ## Useful if the volume's root directory is not empty - ## - subPath: "" - - ## Persistent Volume Claim Selector - ## Useful if Persistent Volumes have been provisioned in advance - ## Ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector - ## - # selector: - # matchLabels: - # release: "stable" - # matchExpressions: - # - { key: environment, operator: In, values: [ dev ] } - - ## Persistent Volume Name - ## Useful if Persistent Volumes have been provisioned in advance and you want to use a specific one - ## - # volumeName: "" - - emptyDir: - ## alertmanager emptyDir volume size limit - ## - sizeLimit: "" - - ## Annotations to be added to alertmanager pods - ## - podAnnotations: {} - ## Tell prometheus to use a specific set of alertmanager pods - ## instead of all alertmanager pods found in the same namespace - ## Useful if you deploy multiple releases within the same namespace - ## - ## prometheus.io/probe: alertmanager-teamA - - ## Labels to be added to Prometheus AlertManager pods - ## - podLabels: {} - - ## Specify if a Pod Security Policy for node-exporter must be created - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ - ## - podSecurityPolicy: - annotations: {} - ## Specify pod annotations - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl - ## - # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' - # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - - ## Use a StatefulSet if replicaCount needs to be greater than 1 (see below) - ## - replicaCount: 1 - - ## Annotations to be added to deployment - ## - deploymentAnnotations: {} - - statefulSet: - ## If true, use a statefulset instead of a deployment for pod management. - ## This allows to scale replicas to more than 1 pod - ## - enabled: false - - annotations: {} - labels: {} - podManagementPolicy: OrderedReady - - ## Alertmanager headless service to use for the statefulset - ## - headless: - annotations: {} - labels: {} - - ## Enabling peer mesh service end points for enabling the HA alert manager - ## Ref: https://github.com/prometheus/alertmanager/blob/master/README.md - enableMeshPeer: false - - servicePort: 80 - - ## alertmanager resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - # limits: - # cpu: 10m - # memory: 32Mi - # requests: - # cpu: 10m - # memory: 32Mi - - # Custom DNS configuration to be added to alertmanager pods - dnsConfig: {} - # nameservers: - # - 1.2.3.4 - # searches: - # - ns1.svc.cluster-domain.example - # - my.dns.search.suffix - # options: - # - name: ndots - # value: "2" - # - name: edns0 - - ## Security context to be added to alertmanager pods - ## - securityContext: - runAsUser: 65534 - runAsNonRoot: true - runAsGroup: 65534 - fsGroup: 65534 - - ## Security context to be added to alertmanager container - ## - containerSecurityContext: {} - - service: - annotations: {} - labels: {} - clusterIP: "" - - ## Enabling peer mesh service end points for enabling the HA alert manager - ## Ref: https://github.com/prometheus/alertmanager/blob/master/README.md - # enableMeshPeer : true - - ## List of IP addresses at which the alertmanager service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 80 - # nodePort: 30000 - sessionAffinity: None - type: ClusterIP - - ## List of initial peers - ## Ref: https://github.com/prometheus/alertmanager/blob/main/README.md#high-availability - clusterPeers: [] - -## Monitors ConfigMap changes and POSTs to a URL -## Ref: https://github.com/jimmidyson/configmap-reload -## -configmapReload: - prometheus: - ## If false, the configmap-reload container will not be deployed - ## - enabled: true - - ## configmap-reload container name - ## - name: configmap-reload - - ## configmap-reload container image - ## - image: - repository: jimmidyson/configmap-reload - tag: v0.5.0 - pullPolicy: IfNotPresent - - # containerPort: 9533 - - ## Additional configmap-reload container arguments - ## - extraArgs: {} - ## Additional configmap-reload volume directories - ## - extraVolumeDirs: [] - - - ## Additional configmap-reload mounts - ## - extraConfigmapMounts: [] - # - name: prometheus-alerts - # mountPath: /etc/alerts.d - # subPath: "" - # configMap: prometheus-alerts - # readOnly: true - - ## Security context to be added to configmap-reload container - containerSecurityContext: {} - - ## configmap-reload resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - alertmanager: - ## If false, the configmap-reload container will not be deployed - ## - enabled: true - - ## configmap-reload container name - ## - name: configmap-reload - - ## configmap-reload container image - ## - image: - repository: jimmidyson/configmap-reload - tag: v0.5.0 - pullPolicy: IfNotPresent - - # containerPort: 9533 - - ## Additional configmap-reload container arguments - ## - extraArgs: {} - ## Additional configmap-reload volume directories - ## - extraVolumeDirs: [] - - - ## Additional configmap-reload mounts - ## - extraConfigmapMounts: [] - # - name: prometheus-alerts - # mountPath: /etc/alerts.d - # subPath: "" - # configMap: prometheus-alerts - # readOnly: true - - ## Security context to be added to configmap-reload container - containerSecurityContext: {} - - ## configmap-reload resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - -kubeStateMetrics: - ## If false, kube-state-metrics sub-chart will not be installed - ## - enabled: true - -## kube-state-metrics sub-chart configurable values -## Please see https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics -## -# kube-state-metrics: - -nodeExporter: - ## If false, node-exporter will not be installed - ## - enabled: true - - ## If true, node-exporter pods share the host network namespace - ## - hostNetwork: true - - ## If true, node-exporter pods share the host PID namespace - ## - hostPID: true - - ## If true, node-exporter pods mounts host / at /host/root - ## - hostRootfs: true - - ## node-exporter container name - ## - name: node-exporter - - ## node-exporter container image - ## - image: - repository: quay.io/prometheus/node-exporter - tag: v1.3.1 - pullPolicy: IfNotPresent - - ## Specify if a Pod Security Policy for node-exporter must be created - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ - ## - podSecurityPolicy: - annotations: {} - ## Specify pod annotations - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl - ## - # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' - # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - - ## node-exporter priorityClassName - ## - priorityClassName: "" - - ## Custom Update Strategy - ## - updateStrategy: - type: RollingUpdate - - ## Additional node-exporter container arguments - ## - extraArgs: {} - - ## Additional InitContainers to initialize the pod - ## - extraInitContainers: [] - - ## Additional node-exporter hostPath mounts - ## - extraHostPathMounts: [] - # - name: textfile-dir - # mountPath: /srv/txt_collector - # hostPath: /var/lib/node-exporter - # readOnly: true - # mountPropagation: HostToContainer - - extraConfigmapMounts: [] - # - name: certs-configmap - # mountPath: /prometheus - # configMap: certs-configmap - # readOnly: true - - ## Node tolerations for node-exporter scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - ## Node labels for node-exporter pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Annotations to be added to node-exporter pods - ## - podAnnotations: {} - - ## Labels to be added to node-exporter pods - ## - pod: - labels: {} - - ## PodDisruptionBudget settings - ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ - ## - podDisruptionBudget: - enabled: false - maxUnavailable: 1 - - ## node-exporter resource limits & requests - ## Ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - # limits: - # cpu: 200m - # memory: 50Mi - # requests: - # cpu: 100m - # memory: 30Mi - container: - securityContext: - allowPrivilegeEscalation: false - # Custom DNS configuration to be added to node-exporter pods - dnsConfig: {} - # nameservers: - # - 1.2.3.4 - # searches: - # - ns1.svc.cluster-domain.example - # - my.dns.search.suffix - # options: - # - name: ndots - # value: "2" - # - name: edns0 - - ## Security context to be added to node-exporter pods - ## - securityContext: - fsGroup: 65534 - runAsGroup: 65534 - runAsNonRoot: true - runAsUser: 65534 - - service: - annotations: - prometheus.io/scrape: "true" - labels: {} - - # Exposed as a headless service: - # https://kubernetes.io/docs/concepts/services-networking/service/#headless-services - clusterIP: "" - - ## List of IP addresses at which the node-exporter service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - hostPort: 9100 - loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 9100 - type: ClusterIP - -server: - ## Prometheus server container name - ## - enabled: true - - ## Use a ClusterRole (and ClusterRoleBinding) - ## - If set to false - we define a RoleBinding in the defined namespaces ONLY - ## - ## NB: because we need a Role with nonResourceURL's ("/metrics") - you must get someone with Cluster-admin privileges to define this role for you, before running with this setting enabled. - ## This makes prometheus work - for users who do not have ClusterAdmin privs, but wants prometheus to operate on their own namespaces, instead of clusterwide. - ## - ## You MUST also set namespaces to the ones you have access to and want monitored by Prometheus. - ## - # useExistingClusterRoleName: nameofclusterrole - - ## namespaces to monitor (instead of monitoring all - clusterwide). Needed if you want to run without Cluster-admin privileges. - # namespaces: - # - yournamespace - - name: server - - # sidecarContainers - add more containers to prometheus server - # Key/Value where Key is the sidecar `- name: ` - # Example: - # sidecarContainers: - # webserver: - # image: nginx - sidecarContainers: {} - - # sidecarTemplateValues - context to be used in template for sidecarContainers - # Example: - # sidecarTemplateValues: *your-custom-globals - # sidecarContainers: - # webserver: |- - # {{ include "webserver-container-template" . }} - # Template for `webserver-container-template` might looks like this: - # image: "{{ .Values.server.sidecarTemplateValues.repository }}:{{ .Values.server.sidecarTemplateValues.tag }}" - # ... - # - sidecarTemplateValues: {} - - ## Prometheus server container image - ## - image: - repository: quay.io/prometheus/prometheus - tag: v2.39.1 - pullPolicy: IfNotPresent - - ## prometheus server priorityClassName - ## - priorityClassName: "" - - ## EnableServiceLinks indicates whether information about services should be injected - ## into pod's environment variables, matching the syntax of Docker links. - ## WARNING: the field is unsupported and will be skipped in K8s prior to v1.13.0. - ## - enableServiceLinks: true - - ## The URL prefix at which the container can be accessed. Useful in the case the '-web.external-url' includes a slug - ## so that the various internal URLs are still able to access as they are in the default case. - ## (Optional) - prefixURL: "" - - ## External URL which can access prometheus - ## Maybe same with Ingress host name - baseURL: "" - - ## Additional server container environment variables - ## - ## You specify this manually like you would a raw deployment manifest. - ## This means you can bind in environment variables from secrets. - ## - ## e.g. static environment variable: - ## - name: DEMO_GREETING - ## value: "Hello from the environment" - ## - ## e.g. secret environment variable: - ## - name: USERNAME - ## valueFrom: - ## secretKeyRef: - ## name: mysecret - ## key: username - env: [] - - # List of flags to override default parameters, e.g: - # - --enable-feature=agent - # - --storage.agent.retention.max-time=30m - defaultFlagsOverride: [] - - extraFlags: - - web.enable-lifecycle - ## web.enable-admin-api flag controls access to the administrative HTTP API which includes functionality such as - ## deleting time series. This is disabled by default. - # - web.enable-admin-api - ## - ## storage.tsdb.no-lockfile flag controls BD locking - # - storage.tsdb.no-lockfile - ## - ## storage.tsdb.wal-compression flag enables compression of the write-ahead log (WAL) - # - storage.tsdb.wal-compression - - ## Path to a configuration file on prometheus server container FS - configPath: /etc/config/prometheus.yml - - ### The data directory used by prometheus to set --storage.tsdb.path - ### When empty server.persistentVolume.mountPath is used instead - storagePath: "" - - global: - ## How frequently to scrape targets by default - ## - scrape_interval: 1m - ## How long until a scrape request times out - ## - scrape_timeout: 10s - ## How frequently to evaluate rules - ## - evaluation_interval: 1m - ## https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write - ## - remoteWrite: [] - ## https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_read - ## - remoteRead: [] - - ## Custom HTTP headers for Liveness/Readiness/Startup Probe - ## - ## Useful for providing HTTP Basic Auth to healthchecks - probeHeaders: [] - # - name: "Authorization" - # value: "Bearer ABCDEabcde12345" - - ## Additional Prometheus server container arguments - ## - extraArgs: {} - - ## Additional InitContainers to initialize the pod - ## - extraInitContainers: [] - - ## Additional Prometheus server Volume mounts - ## - extraVolumeMounts: [] - - ## Additional Prometheus server Volumes - ## - extraVolumes: [] - - ## Additional Prometheus server hostPath mounts - ## - extraHostPathMounts: [] - # - name: certs-dir - # mountPath: /etc/kubernetes/certs - # subPath: "" - # hostPath: /etc/kubernetes/certs - # readOnly: true - - extraConfigmapMounts: [] - # - name: certs-configmap - # mountPath: /prometheus - # subPath: "" - # configMap: certs-configmap - # readOnly: true - - ## Additional Prometheus server Secret mounts - # Defines additional mounts with secrets. Secrets must be manually created in the namespace. - extraSecretMounts: [] - # - name: secret-files - # mountPath: /etc/secrets - # subPath: "" - # secretName: prom-secret-files - # readOnly: true - - ## ConfigMap override where fullname is {{.Release.Name}}-{{.Values.server.configMapOverrideName}} - ## Defining configMapOverrideName will cause templates/server-configmap.yaml - ## to NOT generate a ConfigMap resource - ## - configMapOverrideName: "" - - ## Extra labels for Prometheus server ConfigMap (ConfigMap that holds serverFiles) - extraConfigmapLabels: {} - - ingress: - ## If true, Prometheus server Ingress will be created - ## - enabled: false - - # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName - # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress - # ingressClassName: nginx - - ## Prometheus server Ingress annotations - ## - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: 'true' - - ## Prometheus server Ingress additional labels - ## - extraLabels: {} - - ## Prometheus server Ingress hostnames with optional path - ## Must be provided if Ingress is enabled - ## - hosts: [] - # - prometheus.domain.com - # - domain.com/prometheus - - path: / - - # pathType is only for k8s >= 1.18 - pathType: Prefix - - ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services. - extraPaths: [] - # - path: /* - # backend: - # serviceName: ssl-redirect - # servicePort: use-annotation - - ## Prometheus server Ingress TLS configuration - ## Secrets must be manually created in the namespace - ## - tls: [] - # - secretName: prometheus-server-tls - # hosts: - # - prometheus.domain.com - - ## Server Deployment Strategy type - # strategy: - # type: Recreate - - ## hostAliases allows adding entries to /etc/hosts inside the containers - hostAliases: [] - # - ip: "127.0.0.1" - # hostnames: - # - "example.com" - - ## Node tolerations for server scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - ## Node labels for Prometheus server pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Pod affinity - ## - affinity: {} - - ## PodDisruptionBudget settings - ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ - ## - podDisruptionBudget: - enabled: false - maxUnavailable: 1 - - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - persistentVolume: - ## If true, Prometheus server will create/use a Persistent Volume Claim - ## If false, use emptyDir - ## - enabled: true - - ## Prometheus server data Persistent Volume access modes - ## Must match those of existing PV or dynamic provisioner - ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - accessModes: - - ReadWriteOnce - - ## Prometheus server data Persistent Volume labels - ## - labels: {} - - ## Prometheus server data Persistent Volume annotations - ## - annotations: {} - - ## Prometheus server data Persistent Volume existing claim name - ## Requires server.persistentVolume.enabled: true - ## If defined, PVC must be created manually before volume will be bound - existingClaim: "" - - ## Prometheus server data Persistent Volume mount root path - ## - mountPath: /data - - ## Prometheus server data Persistent Volume size - ## - size: 8Gi - - ## Prometheus server data Persistent Volume Storage Class - ## 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: "-" - - ## Prometheus server data Persistent Volume Binding Mode - ## If defined, volumeBindingMode: - ## If undefined (the default) or set to null, no volumeBindingMode spec is - ## set, choosing the default mode. - ## - # volumeBindingMode: "" - - ## Subdirectory of Prometheus server data Persistent Volume to mount - ## Useful if the volume's root directory is not empty - ## - subPath: "" - - ## Persistent Volume Claim Selector - ## Useful if Persistent Volumes have been provisioned in advance - ## Ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector - ## - # selector: - # matchLabels: - # release: "stable" - # matchExpressions: - # - { key: environment, operator: In, values: [ dev ] } - - ## Persistent Volume Name - ## Useful if Persistent Volumes have been provisioned in advance and you want to use a specific one - ## - # volumeName: "" - - emptyDir: - ## Prometheus server emptyDir volume size limit - ## - sizeLimit: "" - - ## Annotations to be added to Prometheus server pods - ## - podAnnotations: {} - # iam.amazonaws.com/role: prometheus - - ## Labels to be added to Prometheus server pods - ## - podLabels: {} - - ## Prometheus AlertManager configuration - ## - alertmanagers: [] - - ## Specify if a Pod Security Policy for node-exporter must be created - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ - ## - podSecurityPolicy: - annotations: {} - ## Specify pod annotations - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl - ## - # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' - # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - - ## Use a StatefulSet if replicaCount needs to be greater than 1 (see below) - ## - replicaCount: 1 - - ## Annotations to be added to deployment - ## - deploymentAnnotations: {} - - statefulSet: - ## If true, use a statefulset instead of a deployment for pod management. - ## This allows to scale replicas to more than 1 pod - ## - enabled: false - - annotations: {} - labels: {} - podManagementPolicy: OrderedReady - - ## Alertmanager headless service to use for the statefulset - ## - headless: - annotations: {} - labels: {} - servicePort: 80 - ## Enable gRPC port on service to allow auto discovery with thanos-querier - gRPC: - enabled: false - servicePort: 10901 - # nodePort: 10901 - - ## Prometheus server readiness and liveness probe initial delay and timeout - ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ - ## - tcpSocketProbeEnabled: false - probeScheme: HTTP - readinessProbeInitialDelay: 30 - readinessProbePeriodSeconds: 5 - readinessProbeTimeout: 4 - readinessProbeFailureThreshold: 3 - readinessProbeSuccessThreshold: 1 - livenessProbeInitialDelay: 30 - livenessProbePeriodSeconds: 15 - livenessProbeTimeout: 10 - livenessProbeFailureThreshold: 3 - livenessProbeSuccessThreshold: 1 - startupProbe: - enabled: false - periodSeconds: 5 - failureThreshold: 30 - timeoutSeconds: 10 - - ## Prometheus server resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - # limits: - # cpu: 500m - # memory: 512Mi - # requests: - # cpu: 500m - # memory: 512Mi - - # Required for use in managed kubernetes clusters (such as AWS EKS) with custom CNI (such as calico), - # because control-plane managed by AWS cannot communicate with pods' IP CIDR and admission webhooks are not working - ## - hostNetwork: false - - # When hostNetwork is enabled, this will set to ClusterFirstWithHostNet automatically - dnsPolicy: ClusterFirst - - # Use hostPort - # hostPort: 9090 - - ## Vertical Pod Autoscaler config - ## Ref: https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler - verticalAutoscaler: - ## If true a VPA object will be created for the controller (either StatefulSet or Deployemnt, based on above configs) - enabled: false - # updateMode: "Auto" - # containerPolicies: - # - containerName: 'prometheus-server' - - # Custom DNS configuration to be added to prometheus server pods - dnsConfig: {} - # nameservers: - # - 1.2.3.4 - # searches: - # - ns1.svc.cluster-domain.example - # - my.dns.search.suffix - # options: - # - name: ndots - # value: "2" - # - name: edns0 - - ## Security context to be added to server pods - ## - securityContext: - runAsUser: 65534 - runAsNonRoot: true - runAsGroup: 65534 - fsGroup: 65534 - - ## Security context to be added to server container - ## - containerSecurityContext: {} - - service: - ## If false, no Service will be created for the Prometheus server - ## - enabled: true - - annotations: {} - labels: {} - clusterIP: "" - - ## List of IP addresses at which the Prometheus server service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 80 - sessionAffinity: None - type: ClusterIP - - ## Enable gRPC port on service to allow auto discovery with thanos-querier - gRPC: - enabled: false - servicePort: 10901 - # nodePort: 10901 - - ## If using a statefulSet (statefulSet.enabled=true), configure the - ## service to connect to a specific replica to have a consistent view - ## of the data. - statefulsetReplica: - enabled: false - replica: 0 - - ## Prometheus server pod termination grace period - ## - terminationGracePeriodSeconds: 300 - - ## Prometheus data retention period (default if not specified is 15 days) - ## - retention: "15d" - - ## Array of extra Kubernetes manifests, in form of YAML object, - ## if you want to deploy - extraObjects: [] - # - apiVersion: v1 - # kind: ConfigMap - # metadata: - # name: '{{ template "prometheus.name" . }}-extra-config' - - ## Array of extra Kubernetes manifest, in form of template string, - ## if you want to deploy - extraTemplates: [] - # - | - # apiVersion: v1 - # kind: ConfigMap - # metadata: - # name: extra-config - # labels: - # {{- include "prometheus.server.labels" . | nindent 4 }} - -pushgateway: - ## If false, pushgateway will not be installed - ## - enabled: true - - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - ## pushgateway container name - ## - name: pushgateway - - ## pushgateway container image - ## - image: - repository: prom/pushgateway - tag: v1.4.3 - pullPolicy: IfNotPresent - - ## pushgateway priorityClassName - ## - priorityClassName: "" - - ## Additional pushgateway container arguments - ## - ## for example: persistence.file: /data/pushgateway.data - extraArgs: {} - - ## Additional InitContainers to initialize the pod - ## - extraInitContainers: [] - - ingress: - ## If true, pushgateway Ingress will be created - ## - enabled: false - - # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName - # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress - # ingressClassName: nginx - - ## pushgateway Ingress annotations - ## - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: 'true' - - ## pushgateway Ingress hostnames with optional path - ## Must be provided if Ingress is enabled - ## - hosts: [] - # - pushgateway.domain.com - # - domain.com/pushgateway - - path: / - - # pathType is only for k8s >= 1.18 - pathType: Prefix - - ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services. - extraPaths: [] - # - path: /* - # backend: - # serviceName: ssl-redirect - # servicePort: use-annotation - - ## pushgateway Ingress TLS configuration - ## Secrets must be manually created in the namespace - ## - tls: [] - # - secretName: prometheus-alerts-tls - # hosts: - # - pushgateway.domain.com - - ## Node tolerations for pushgateway scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - ## Node labels for pushgateway pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Annotations to be added to pushgateway pods - ## - podAnnotations: {} - - ## Labels to be added to pushgateway pods - ## - podLabels: {} - - ## Specify if a Pod Security Policy for node-exporter must be created - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ - ## - podSecurityPolicy: - annotations: {} - ## Specify pod annotations - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl - ## - # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' - # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - - replicaCount: 1 - - ## Annotations to be added to deployment - ## - deploymentAnnotations: {} - - ## PodDisruptionBudget settings - ## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ - ## - podDisruptionBudget: - enabled: false - maxUnavailable: 1 - - ## pushgateway resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - # limits: - # cpu: 10m - # memory: 32Mi - # requests: - # cpu: 10m - # memory: 32Mi - - ## Vertical Pod Autoscaler config - ## Ref: https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler - verticalAutoscaler: - ## If true a VPA object will be created for the controller - enabled: false - # updateMode: "Auto" - # containerPolicies: - # - containerName: 'prometheus-pushgateway' - - # Custom DNS configuration to be added to push-gateway pods - dnsConfig: {} - # nameservers: - # - 1.2.3.4 - # searches: - # - ns1.svc.cluster-domain.example - # - my.dns.search.suffix - # options: - # - name: ndots - # value: "2" - # - name: edns0 - - ## Security context to be added to push-gateway pods - ## - securityContext: - runAsUser: 65534 - runAsNonRoot: true - - ## Security context to be added to push-gateway container - containerSecurityContext: {} - - service: - annotations: - prometheus.io/probe: pushgateway - labels: {} - clusterIP: "" - - ## List of IP addresses at which the pushgateway service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 9091 - type: ClusterIP - - ## pushgateway Deployment Strategy type - # strategy: - # type: Recreate - - ## Custom HTTP headers for Liveness/Readiness/Startup Probe - ## - ## Useful for providing HTTP Basic Auth to healthchecks - probeHeaders: [] - # - name: "Authorization" - # value: "Bearer ABCDEabcde12345" - - persistentVolume: - ## If true, pushgateway will create/use a Persistent Volume Claim - ## - enabled: false - - ## pushgateway data Persistent Volume access modes - ## Must match those of existing PV or dynamic provisioner - ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - accessModes: - - ReadWriteOnce - - ## pushgateway data Persistent Volume Claim annotations - ## - annotations: {} - - ## pushgateway data Persistent Volume existing claim name - ## Requires pushgateway.persistentVolume.enabled: true - ## If defined, PVC must be created manually before volume will be bound - existingClaim: "" - - ## pushgateway data Persistent Volume mount root path - ## - mountPath: /data - - ## pushgateway data Persistent Volume size - ## - size: 2Gi - - ## pushgateway data Persistent Volume Storage Class - ## 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: "-" - - ## pushgateway data Persistent Volume Binding Mode - ## If defined, volumeBindingMode: - ## If undefined (the default) or set to null, no volumeBindingMode spec is - ## set, choosing the default mode. - ## - # volumeBindingMode: "" - - ## Subdirectory of pushgateway data Persistent Volume to mount - ## Useful if the volume's root directory is not empty - ## - subPath: "" - - ## Persistent Volume Name - ## Useful if Persistent Volumes have been provisioned in advance and you want to use a specific one - ## - # volumeName: "" - -## alertmanager ConfigMap entries -## -alertmanagerFiles: - alertmanager.yml: - global: {} - # slack_api_url: '' - - receivers: - - name: default-receiver - # slack_configs: - # - channel: '@you' - # send_resolved: true - - route: - group_wait: 10s - group_interval: 5m - receiver: default-receiver - repeat_interval: 3h - -## Prometheus server ConfigMap entries for rule files (allow prometheus labels interpolation) -ruleFiles: {} - -## Prometheus server ConfigMap entries -## -serverFiles: - - ## Alerts configuration - ## Ref: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/ - alerting_rules.yml: {} - # groups: - # - name: Instances - # rules: - # - alert: InstanceDown - # expr: up == 0 - # for: 5m - # labels: - # severity: page - # annotations: - # description: '{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes.' - # summary: 'Instance {{ $labels.instance }} down' - ## DEPRECATED DEFAULT VALUE, unless explicitly naming your files, please use alerting_rules.yml - alerts: {} - - ## Records configuration - ## Ref: https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/ - recording_rules.yml: {} - ## DEPRECATED DEFAULT VALUE, unless explicitly naming your files, please use recording_rules.yml - rules: {} - - prometheus.yml: - rule_files: - - /etc/config/recording_rules.yml - - /etc/config/alerting_rules.yml - ## Below two files are DEPRECATED will be removed from this default values file - - /etc/config/rules - - /etc/config/alerts - - scrape_configs: - - job_name: prometheus - static_configs: - - targets: - - localhost:9090 - - # A scrape configuration for running Prometheus on a Kubernetes cluster. - # This uses separate scrape configs for cluster components (i.e. API server, node) - # and services to allow each to use different authentication configs. - # - # Kubernetes labels will be added as Prometheus labels on metrics via the - # `labelmap` relabeling action. - - # Scrape config for API servers. - # - # Kubernetes exposes API servers as endpoints to the default/kubernetes - # service so this uses `endpoints` role and uses relabelling to only keep - # the endpoints associated with the default/kubernetes service using the - # default named port `https`. This works for single API server deployments as - # well as HA API server deployments. - - job_name: 'kubernetes-apiservers' - - kubernetes_sd_configs: - - role: endpoints - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - # Keep only the default/kubernetes service endpoints for the https port. This - # will add targets for each API server which Kubernetes adds an endpoint to - # the default/kubernetes service. - relabel_configs: - - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: default;kubernetes;https - - - job_name: 'kubernetes-nodes' - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - kubernetes_sd_configs: - - role: node - - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/$1/proxy/metrics - - - - job_name: 'kubernetes-nodes-cadvisor' - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - kubernetes_sd_configs: - - role: node - - # This configuration will work only on kubelet 1.7.3+ - # As the scrape endpoints for cAdvisor have changed - # if you are using older version you need to change the replacement to - # replacement: /api/v1/nodes/$1:4194/proxy/metrics - # more info here https://github.com/coreos/prometheus-operator/issues/633 - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor - - # Scrape config for service endpoints. - # - # The relabeling allows the actual service scrape endpoint to be configured - # via the following annotations: - # - # * `prometheus.io/scrape`: Only scrape services that have a value of - # `true`, except if `prometheus.io/scrape-slow` is set to `true` as well. - # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need - # to set this to `https` & most likely set the `tls_config` of the scrape config. - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: If the metrics are exposed on a different port to the - # service then set this appropriately. - # * `prometheus.io/param_`: If the metrics endpoint uses parameters - # then you can set any parameter - - job_name: 'kubernetes-service-endpoints' - honor_labels: true - - kubernetes_sd_configs: - - role: endpoints - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape_slow] - action: drop - regex: true - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] - action: replace - target_label: __scheme__ - regex: (https?) - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] - action: replace - target_label: __address__ - regex: (.+?)(?::\d+)?;(\d+) - replacement: $1:$2 - - action: labelmap - regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+) - replacement: __param_$1 - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: namespace - - source_labels: [__meta_kubernetes_service_name] - action: replace - target_label: service - - source_labels: [__meta_kubernetes_pod_node_name] - action: replace - target_label: node - - # Scrape config for slow service endpoints; same as above, but with a larger - # timeout and a larger interval - # - # The relabeling allows the actual service scrape endpoint to be configured - # via the following annotations: - # - # * `prometheus.io/scrape-slow`: Only scrape services that have a value of `true` - # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need - # to set this to `https` & most likely set the `tls_config` of the scrape config. - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: If the metrics are exposed on a different port to the - # service then set this appropriately. - # * `prometheus.io/param_`: If the metrics endpoint uses parameters - # then you can set any parameter - - job_name: 'kubernetes-service-endpoints-slow' - honor_labels: true - - scrape_interval: 5m - scrape_timeout: 30s - - kubernetes_sd_configs: - - role: endpoints - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape_slow] - action: keep - regex: true - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] - action: replace - target_label: __scheme__ - regex: (https?) - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] - action: replace - target_label: __address__ - regex: (.+?)(?::\d+)?;(\d+) - replacement: $1:$2 - - action: labelmap - regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+) - replacement: __param_$1 - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: namespace - - source_labels: [__meta_kubernetes_service_name] - action: replace - target_label: service - - source_labels: [__meta_kubernetes_pod_node_name] - action: replace - target_label: node - - - job_name: 'prometheus-pushgateway' - honor_labels: true - - kubernetes_sd_configs: - - role: service - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe] - action: keep - regex: pushgateway - - # Example scrape config for probing services via the Blackbox Exporter. - # - # The relabeling allows the actual service scrape endpoint to be configured - # via the following annotations: - # - # * `prometheus.io/probe`: Only probe services that have a value of `true` - - job_name: 'kubernetes-services' - honor_labels: true - - metrics_path: /probe - params: - module: [http_2xx] - - kubernetes_sd_configs: - - role: service - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe] - action: keep - regex: true - - source_labels: [__address__] - target_label: __param_target - - target_label: __address__ - replacement: blackbox - - source_labels: [__param_target] - target_label: instance - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - target_label: namespace - - source_labels: [__meta_kubernetes_service_name] - target_label: service - - # Example scrape config for pods - # - # The relabeling allows the actual pod scrape endpoint to be configured via the - # following annotations: - # - # * `prometheus.io/scrape`: Only scrape pods that have a value of `true`, - # except if `prometheus.io/scrape-slow` is set to `true` as well. - # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need - # to set this to `https` & most likely set the `tls_config` of the scrape config. - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`. - - job_name: 'kubernetes-pods' - honor_labels: true - - kubernetes_sd_configs: - - role: pod - - relabel_configs: - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape_slow] - action: drop - regex: true - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme] - action: replace - regex: (https?) - target_label: __scheme__ - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - action: replace - regex: (.+?)(?::\d+)?;(\d+) - replacement: $1:$2 - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+) - replacement: __param_$1 - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: namespace - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: pod - - source_labels: [__meta_kubernetes_pod_phase] - regex: Pending|Succeeded|Failed|Completed - action: drop - - # Example Scrape config for pods which should be scraped slower. An useful example - # would be stackriver-exporter which queries an API on every scrape of the pod - # - # The relabeling allows the actual pod scrape endpoint to be configured via the - # following annotations: - # - # * `prometheus.io/scrape-slow`: Only scrape pods that have a value of `true` - # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need - # to set this to `https` & most likely set the `tls_config` of the scrape config. - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`. - - job_name: 'kubernetes-pods-slow' - honor_labels: true - - scrape_interval: 5m - scrape_timeout: 30s - - kubernetes_sd_configs: - - role: pod - - relabel_configs: - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape_slow] - action: keep - regex: true - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme] - action: replace - regex: (https?) - target_label: __scheme__ - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - action: replace - regex: (.+?)(?::\d+)?;(\d+) - replacement: $1:$2 - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+) - replacement: __param_$1 - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: namespace - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: pod - - source_labels: [__meta_kubernetes_pod_phase] - regex: Pending|Succeeded|Failed|Completed - action: drop - -# adds additional scrape configs to prometheus.yml -# must be a string so you have to add a | after extraScrapeConfigs: -# example adds prometheus-blackbox-exporter scrape config -extraScrapeConfigs: - # - job_name: 'prometheus-blackbox-exporter' - # metrics_path: /probe - # params: - # module: [http_2xx] - # static_configs: - # - targets: - # - https://example.com - # relabel_configs: - # - source_labels: [__address__] - # target_label: __param_target - # - source_labels: [__param_target] - # target_label: instance - # - target_label: __address__ - # replacement: prometheus-blackbox-exporter:9115 - -# Adds option to add alert_relabel_configs to avoid duplicate alerts in alertmanager -# useful in H/A prometheus with different external labels but the same alerts -alertRelabelConfigs: - # alert_relabel_configs: - # - source_labels: [dc] - # regex: (.+)\d+ - # target_label: dc - -networkPolicy: - ## Enable creation of NetworkPolicy resources. - ## - enabled: false - -# Force namespace of namespaced resources -forceNamespace: null - -# Extra manifests to deploy as an array -extraManifests: [] - # - apiVersion: v1 - # kind: ConfigMap - # metadata: - # labels: - # name: prometheus-extra - # data: - # extra-data: "value" diff --git a/charts/gitlab/gitlab/charts/redis/.helmignore b/charts/gitlab/gitlab/charts/redis/.helmignore deleted file mode 100644 index f0c131944..000000000 --- a/charts/gitlab/gitlab/charts/redis/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/charts/gitlab/gitlab/charts/redis/Chart.lock b/charts/gitlab/gitlab/charts/redis/Chart.lock deleted file mode 100644 index ced3e292c..000000000 --- a/charts/gitlab/gitlab/charts/redis/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: https://charts.bitnami.com/bitnami - version: 1.16.0 -digest: sha256:f41cb9ff725b7c9fa2725634196a6813566d630342f86a74903ed114b282c8c0 -generated: "2022-06-06T12:59:41.280407782Z" diff --git a/charts/gitlab/gitlab/charts/redis/Chart.yaml b/charts/gitlab/gitlab/charts/redis/Chart.yaml deleted file mode 100644 index e89b01631..000000000 --- a/charts/gitlab/gitlab/charts/redis/Chart.yaml +++ /dev/null @@ -1,28 +0,0 @@ -annotations: - category: Database -apiVersion: v2 -appVersion: 6.2.7 -dependencies: -- name: common - repository: https://charts.bitnami.com/bitnami - tags: - - bitnami-common - version: 1.x.x -description: Redis(R) is an open source, advanced key-value store. It is often referred - to as a data structure server since keys can contain strings, hashes, lists, sets - and sorted sets. -home: https://github.com/bitnami/charts/tree/master/bitnami/redis -icon: https://bitnami.com/assets/stacks/redis/img/redis-stack-220x234.png -keywords: -- redis -- keyvalue -- database -maintainers: -- name: Bitnami - url: https://github.com/bitnami/charts -- email: cedric@desaintmartin.fr - name: desaintmartin -name: redis -sources: -- https://github.com/bitnami/bitnami-docker-redis -version: 16.13.2 diff --git a/charts/gitlab/gitlab/charts/redis/README.md b/charts/gitlab/gitlab/charts/redis/README.md deleted file mode 100644 index 5113c0572..000000000 --- a/charts/gitlab/gitlab/charts/redis/README.md +++ /dev/null @@ -1,898 +0,0 @@ - - -# Bitnami package for Redis(R) - -Redis(R) is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. - -[Overview of Redis®](http://redis.io) - -Disclaimer: Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd. Any use by Bitnami is for referential purposes only and does not indicate any sponsorship, endorsement, or affiliation between Redis Ltd. - -## TL;DR - -```bash -$ helm repo add bitnami https://charts.bitnami.com/bitnami -$ helm install my-release bitnami/redis -``` - -## Introduction - -This chart bootstraps a [Redis®](https://github.com/bitnami/bitnami-docker-redis) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -Bitnami charts can be used with [Kubeapps](https://kubeapps.dev/) for deployment and management of Helm Charts in clusters. - -### Choose between Redis® Helm Chart and Redis® Cluster Helm Chart - -You can choose any of the two Redis® Helm charts for deploying a Redis® cluster. - -1. [Redis® Helm Chart](https://github.com/bitnami/charts/tree/master/bitnami/redis) will deploy a master-replica cluster, with the [option](https://github.com/bitnami/charts/tree/master/bitnami/redis#redis-sentinel-configuration-parameters) of enabling using Redis® Sentinel. -2. [Redis® Cluster Helm Chart](https://github.com/bitnami/charts/tree/master/bitnami/redis-cluster) will deploy a Redis® Cluster topology with sharding. - -The main features of each chart are the following: - -| Redis® | Redis® Cluster | -|--------------------------------------------------------|------------------------------------------------------------------------| -| Supports multiple databases | Supports only one database. Better if you have a big dataset | -| Single write point (single master) | Multiple write points (multiple masters) | -| ![Redis® Topology](img/redis-topology.png) | ![Redis® Cluster Topology](img/redis-cluster-topology.png) | - -## Prerequisites - -- Kubernetes 1.19+ -- Helm 3.2.0+ -- PV provisioner support in the underlying infrastructure - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```bash -$ helm install my-release bitnami/redis -``` - -The command deploys Redis® 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` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -### Global parameters - -| Name | Description | Value | -| ------------------------- | ------------------------------------------------------ | ----- | -| `global.imageRegistry` | Global Docker image registry | `""` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` | -| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` | -| `global.redis.password` | Global Redis® password (overrides `auth.password`) | `""` | - - -### Common parameters - -| Name | Description | Value | -| ------------------------ | --------------------------------------------------------------------------------------- | --------------- | -| `kubeVersion` | Override Kubernetes version | `""` | -| `nameOverride` | String to partially override common.names.fullname | `""` | -| `fullnameOverride` | String to fully override common.names.fullname | `""` | -| `commonLabels` | Labels to add to all deployed objects | `{}` | -| `commonAnnotations` | Annotations to add to all deployed objects | `{}` | -| `secretAnnotations` | Annotations to add to secret | `{}` | -| `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"]` | - - -### Redis® Image parameters - -| Name | Description | Value | -| ------------------- | ----------------------------------------------------- | --------------------- | -| `image.registry` | Redis® image registry | `docker.io` | -| `image.repository` | Redis® image repository | `bitnami/redis` | -| `image.tag` | Redis® image tag (immutable tags are recommended) | `6.2.7-debian-11-r11` | -| `image.pullPolicy` | Redis® image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Redis® image pull secrets | `[]` | -| `image.debug` | Enable image debug mode | `false` | - - -### Redis® common configuration parameters - -| Name | Description | Value | -| -------------------------------- | ------------------------------------------------------------------------------------- | ------------- | -| `architecture` | Redis® architecture. Allowed values: `standalone` or `replication` | `replication` | -| `auth.enabled` | Enable password authentication | `true` | -| `auth.sentinel` | Enable password authentication on sentinels too | `true` | -| `auth.password` | Redis® password | `""` | -| `auth.existingSecret` | The name of an existing secret with Redis® credentials | `""` | -| `auth.existingSecretPasswordKey` | Password key to be retrieved from existing secret | `""` | -| `auth.usePasswordFiles` | Mount credentials as files instead of using an environment variable | `false` | -| `commonConfiguration` | Common configuration to be added into the ConfigMap | `""` | -| `existingConfigmap` | The name of an existing ConfigMap with your custom configuration for Redis® nodes | `""` | - - -### Redis® master configuration parameters - -| Name | Description | Value | -| ------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------ | -| `master.count` | Number of Redis® master instances to deploy (experimental, requires additional configuration) | `1` | -| `master.configuration` | Configuration for Redis® master nodes | `""` | -| `master.disableCommands` | Array with Redis® commands to disable on master nodes | `["FLUSHDB","FLUSHALL"]` | -| `master.command` | Override default container command (useful when using custom images) | `[]` | -| `master.args` | Override default container args (useful when using custom images) | `[]` | -| `master.preExecCmds` | Additional commands to run prior to starting Redis® master | `[]` | -| `master.extraFlags` | Array with additional command line flags for Redis® master | `[]` | -| `master.extraEnvVars` | Array with extra environment variables to add to Redis® master nodes | `[]` | -| `master.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Redis® master nodes | `""` | -| `master.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Redis® master nodes | `""` | -| `master.containerPorts.redis` | Container port to open on Redis® master nodes | `6379` | -| `master.startupProbe.enabled` | Enable startupProbe on Redis® master nodes | `false` | -| `master.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `20` | -| `master.startupProbe.periodSeconds` | Period seconds for startupProbe | `5` | -| `master.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` | -| `master.startupProbe.failureThreshold` | Failure threshold for startupProbe | `5` | -| `master.startupProbe.successThreshold` | Success threshold for startupProbe | `1` | -| `master.livenessProbe.enabled` | Enable livenessProbe on Redis® master nodes | `true` | -| `master.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `20` | -| `master.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `5` | -| `master.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | -| `master.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `5` | -| `master.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | -| `master.readinessProbe.enabled` | Enable readinessProbe on Redis® master nodes | `true` | -| `master.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `20` | -| `master.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `5` | -| `master.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` | -| `master.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `5` | -| `master.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | -| `master.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | -| `master.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | -| `master.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | -| `master.resources.limits` | The resources limits for the Redis® master containers | `{}` | -| `master.resources.requests` | The requested resources for the Redis® master containers | `{}` | -| `master.podSecurityContext.enabled` | Enabled Redis® master pods' Security Context | `true` | -| `master.podSecurityContext.fsGroup` | Set Redis® master pod's Security Context fsGroup | `1001` | -| `master.containerSecurityContext.enabled` | Enabled Redis® master containers' Security Context | `true` | -| `master.containerSecurityContext.runAsUser` | Set Redis® master containers' Security Context runAsUser | `1001` | -| `master.kind` | Use either Deployment or StatefulSet (default) | `StatefulSet` | -| `master.schedulerName` | Alternate scheduler for Redis® master pods | `""` | -| `master.updateStrategy.type` | Redis® master statefulset strategy type | `RollingUpdate` | -| `master.priorityClassName` | Redis® master pods' priorityClassName | `""` | -| `master.hostAliases` | Redis® master pods host aliases | `[]` | -| `master.podLabels` | Extra labels for Redis® master pods | `{}` | -| `master.podAnnotations` | Annotations for Redis® master pods | `{}` | -| `master.shareProcessNamespace` | Share a single process namespace between all of the containers in Redis® master pods | `false` | -| `master.podAffinityPreset` | Pod affinity preset. Ignored if `master.affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `master.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `master.affinity` is set. Allowed values: `soft` or `hard` | `soft` | -| `master.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `master.affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `master.nodeAffinityPreset.key` | Node label key to match. Ignored if `master.affinity` is set | `""` | -| `master.nodeAffinityPreset.values` | Node label values to match. Ignored if `master.affinity` is set | `[]` | -| `master.affinity` | Affinity for Redis® master pods assignment | `{}` | -| `master.nodeSelector` | Node labels for Redis® master pods assignment | `{}` | -| `master.tolerations` | Tolerations for Redis® master pods assignment | `[]` | -| `master.topologySpreadConstraints` | Spread Constraints for Redis® master pod assignment | `[]` | -| `master.dnsPolicy` | DNS Policy for Redis® master pod | `""` | -| `master.dnsConfig` | DNS Configuration for Redis® master pod | `{}` | -| `master.lifecycleHooks` | for the Redis® master container(s) to automate configuration before or after startup | `{}` | -| `master.extraVolumes` | Optionally specify extra list of additional volumes for the Redis® master pod(s) | `[]` | -| `master.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Redis® master container(s) | `[]` | -| `master.sidecars` | Add additional sidecar containers to the Redis® master pod(s) | `[]` | -| `master.initContainers` | Add additional init containers to the Redis® master pod(s) | `[]` | -| `master.persistence.enabled` | Enable persistence on Redis® master nodes using Persistent Volume Claims | `true` | -| `master.persistence.medium` | Provide a medium for `emptyDir` volumes. | `""` | -| `master.persistence.sizeLimit` | Set this to enable a size limit for `emptyDir` volumes. | `""` | -| `master.persistence.path` | The path the volume will be mounted at on Redis® master containers | `/data` | -| `master.persistence.subPath` | The subdirectory of the volume to mount on Redis® master containers | `""` | -| `master.persistence.storageClass` | Persistent Volume storage class | `""` | -| `master.persistence.accessModes` | Persistent Volume access modes | `["ReadWriteOnce"]` | -| `master.persistence.size` | Persistent Volume size | `8Gi` | -| `master.persistence.annotations` | Additional custom annotations for the PVC | `{}` | -| `master.persistence.selector` | Additional labels to match for the PVC | `{}` | -| `master.persistence.dataSource` | Custom PVC data source | `{}` | -| `master.persistence.existingClaim` | Use a existing PVC which must be created manually before bound | `""` | -| `master.service.type` | Redis® master service type | `ClusterIP` | -| `master.service.ports.redis` | Redis® master service port | `6379` | -| `master.service.nodePorts.redis` | Node port for Redis® master | `""` | -| `master.service.externalTrafficPolicy` | Redis® master service external traffic policy | `Cluster` | -| `master.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` | -| `master.service.internalTrafficPolicy` | Redis® master service internal traffic policy (requires Kubernetes v1.22 or greater to be usable) | `Cluster` | -| `master.service.clusterIP` | Redis® master service Cluster IP | `""` | -| `master.service.loadBalancerIP` | Redis® master service Load Balancer IP | `""` | -| `master.service.loadBalancerSourceRanges` | Redis® master service Load Balancer sources | `[]` | -| `master.service.annotations` | Additional custom annotations for Redis® master service | `{}` | -| `master.service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` | -| `master.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` | -| `master.terminationGracePeriodSeconds` | Integer setting the termination grace period for the redis-master pods | `30` | - - -### Redis® replicas configuration parameters - -| Name | Description | Value | -| -------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------ | -| `replica.replicaCount` | Number of Redis® replicas to deploy | `3` | -| `replica.configuration` | Configuration for Redis® replicas nodes | `""` | -| `replica.disableCommands` | Array with Redis® commands to disable on replicas nodes | `["FLUSHDB","FLUSHALL"]` | -| `replica.command` | Override default container command (useful when using custom images) | `[]` | -| `replica.args` | Override default container args (useful when using custom images) | `[]` | -| `replica.preExecCmds` | Additional commands to run prior to starting Redis® replicas | `[]` | -| `replica.extraFlags` | Array with additional command line flags for Redis® replicas | `[]` | -| `replica.extraEnvVars` | Array with extra environment variables to add to Redis® replicas nodes | `[]` | -| `replica.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Redis® replicas nodes | `""` | -| `replica.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Redis® replicas nodes | `""` | -| `replica.externalMaster.enabled` | Use external master for bootstrapping | `false` | -| `replica.externalMaster.host` | External master host to bootstrap from | `""` | -| `replica.externalMaster.port` | Port for Redis service external master host | `6379` | -| `replica.containerPorts.redis` | Container port to open on Redis® replicas nodes | `6379` | -| `replica.startupProbe.enabled` | Enable startupProbe on Redis® replicas nodes | `true` | -| `replica.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `10` | -| `replica.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | -| `replica.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` | -| `replica.startupProbe.failureThreshold` | Failure threshold for startupProbe | `22` | -| `replica.startupProbe.successThreshold` | Success threshold for startupProbe | `1` | -| `replica.livenessProbe.enabled` | Enable livenessProbe on Redis® replicas nodes | `true` | -| `replica.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `20` | -| `replica.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `5` | -| `replica.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | -| `replica.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `5` | -| `replica.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | -| `replica.readinessProbe.enabled` | Enable readinessProbe on Redis® replicas nodes | `true` | -| `replica.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `20` | -| `replica.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `5` | -| `replica.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` | -| `replica.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `5` | -| `replica.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | -| `replica.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | -| `replica.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | -| `replica.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | -| `replica.resources.limits` | The resources limits for the Redis® replicas containers | `{}` | -| `replica.resources.requests` | The requested resources for the Redis® replicas containers | `{}` | -| `replica.podSecurityContext.enabled` | Enabled Redis® replicas pods' Security Context | `true` | -| `replica.podSecurityContext.fsGroup` | Set Redis® replicas pod's Security Context fsGroup | `1001` | -| `replica.containerSecurityContext.enabled` | Enabled Redis® replicas containers' Security Context | `true` | -| `replica.containerSecurityContext.runAsUser` | Set Redis® replicas containers' Security Context runAsUser | `1001` | -| `replica.schedulerName` | Alternate scheduler for Redis® replicas pods | `""` | -| `replica.updateStrategy.type` | Redis® replicas statefulset strategy type | `RollingUpdate` | -| `replica.priorityClassName` | Redis® replicas pods' priorityClassName | `""` | -| `replica.podManagementPolicy` | podManagementPolicy to manage scaling operation of %%MAIN_CONTAINER_NAME%% pods | `""` | -| `replica.hostAliases` | Redis® replicas pods host aliases | `[]` | -| `replica.podLabels` | Extra labels for Redis® replicas pods | `{}` | -| `replica.podAnnotations` | Annotations for Redis® replicas pods | `{}` | -| `replica.shareProcessNamespace` | Share a single process namespace between all of the containers in Redis® replicas pods | `false` | -| `replica.podAffinityPreset` | Pod affinity preset. Ignored if `replica.affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `replica.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `replica.affinity` is set. Allowed values: `soft` or `hard` | `soft` | -| `replica.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `replica.affinity` is set. Allowed values: `soft` or `hard` | `""` | -| `replica.nodeAffinityPreset.key` | Node label key to match. Ignored if `replica.affinity` is set | `""` | -| `replica.nodeAffinityPreset.values` | Node label values to match. Ignored if `replica.affinity` is set | `[]` | -| `replica.affinity` | Affinity for Redis® replicas pods assignment | `{}` | -| `replica.nodeSelector` | Node labels for Redis® replicas pods assignment | `{}` | -| `replica.tolerations` | Tolerations for Redis® replicas pods assignment | `[]` | -| `replica.topologySpreadConstraints` | Spread Constraints for Redis® replicas pod assignment | `[]` | -| `replica.dnsPolicy` | DNS Policy for Redis® replica pods | `""` | -| `replica.dnsConfig` | DNS Configuration for Redis® replica pods | `{}` | -| `replica.lifecycleHooks` | for the Redis® replica container(s) to automate configuration before or after startup | `{}` | -| `replica.extraVolumes` | Optionally specify extra list of additional volumes for the Redis® replicas pod(s) | `[]` | -| `replica.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Redis® replicas container(s) | `[]` | -| `replica.sidecars` | Add additional sidecar containers to the Redis® replicas pod(s) | `[]` | -| `replica.initContainers` | Add additional init containers to the Redis® replicas pod(s) | `[]` | -| `replica.persistence.enabled` | Enable persistence on Redis® replicas nodes using Persistent Volume Claims | `true` | -| `replica.persistence.medium` | Provide a medium for `emptyDir` volumes. | `""` | -| `replica.persistence.sizeLimit` | Set this to enable a size limit for `emptyDir` volumes. | `""` | -| `replica.persistence.path` | The path the volume will be mounted at on Redis® replicas containers | `/data` | -| `replica.persistence.subPath` | The subdirectory of the volume to mount on Redis® replicas containers | `""` | -| `replica.persistence.storageClass` | Persistent Volume storage class | `""` | -| `replica.persistence.accessModes` | Persistent Volume access modes | `["ReadWriteOnce"]` | -| `replica.persistence.size` | Persistent Volume size | `8Gi` | -| `replica.persistence.annotations` | Additional custom annotations for the PVC | `{}` | -| `replica.persistence.selector` | Additional labels to match for the PVC | `{}` | -| `replica.persistence.dataSource` | Custom PVC data source | `{}` | -| `replica.persistence.existingClaim` | Use a existing PVC which must be created manually before bound | `""` | -| `replica.service.type` | Redis® replicas service type | `ClusterIP` | -| `replica.service.ports.redis` | Redis® replicas service port | `6379` | -| `replica.service.nodePorts.redis` | Node port for Redis® replicas | `""` | -| `replica.service.externalTrafficPolicy` | Redis® replicas service external traffic policy | `Cluster` | -| `replica.service.internalTrafficPolicy` | Redis® replicas service internal traffic policy (requires Kubernetes v1.22 or greater to be usable) | `Cluster` | -| `replica.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` | -| `replica.service.clusterIP` | Redis® replicas service Cluster IP | `""` | -| `replica.service.loadBalancerIP` | Redis® replicas service Load Balancer IP | `""` | -| `replica.service.loadBalancerSourceRanges` | Redis® replicas service Load Balancer sources | `[]` | -| `replica.service.annotations` | Additional custom annotations for Redis® replicas service | `{}` | -| `replica.service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` | -| `replica.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` | -| `replica.terminationGracePeriodSeconds` | Integer setting the termination grace period for the redis-replicas pods | `30` | -| `replica.autoscaling.enabled` | Enable replica autoscaling settings | `false` | -| `replica.autoscaling.minReplicas` | Minimum replicas for the pod autoscaling | `1` | -| `replica.autoscaling.maxReplicas` | Maximum replicas for the pod autoscaling | `11` | -| `replica.autoscaling.targetCPU` | Percentage of CPU to consider when autoscaling | `""` | -| `replica.autoscaling.targetMemory` | Percentage of Memory to consider when autoscaling | `""` | - - -### Redis® Sentinel configuration parameters - -| Name | Description | Value | -| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | -| `sentinel.enabled` | Use Redis® Sentinel on Redis® pods. | `false` | -| `sentinel.image.registry` | Redis® Sentinel image registry | `docker.io` | -| `sentinel.image.repository` | Redis® Sentinel image repository | `bitnami/redis-sentinel` | -| `sentinel.image.tag` | Redis® Sentinel image tag (immutable tags are recommended) | `6.2.7-debian-11-r12` | -| `sentinel.image.pullPolicy` | Redis® Sentinel image pull policy | `IfNotPresent` | -| `sentinel.image.pullSecrets` | Redis® Sentinel image pull secrets | `[]` | -| `sentinel.image.debug` | Enable image debug mode | `false` | -| `sentinel.masterSet` | Master set name | `mymaster` | -| `sentinel.quorum` | Sentinel Quorum | `2` | -| `sentinel.getMasterTimeout` | Amount of time to allow before get_sentinel_master_info() times out. | `220` | -| `sentinel.automateClusterRecovery` | Automate cluster recovery in cases where the last replica is not considered a good replica and Sentinel won't automatically failover to it. | `false` | -| `sentinel.downAfterMilliseconds` | Timeout for detecting a Redis® node is down | `60000` | -| `sentinel.failoverTimeout` | Timeout for performing a election failover | `18000` | -| `sentinel.parallelSyncs` | Number of replicas that can be reconfigured in parallel to use the new master after a failover | `1` | -| `sentinel.configuration` | Configuration for Redis® Sentinel nodes | `""` | -| `sentinel.command` | Override default container command (useful when using custom images) | `[]` | -| `sentinel.args` | Override default container args (useful when using custom images) | `[]` | -| `sentinel.preExecCmds` | Additional commands to run prior to starting Redis® Sentinel | `[]` | -| `sentinel.extraEnvVars` | Array with extra environment variables to add to Redis® Sentinel nodes | `[]` | -| `sentinel.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Redis® Sentinel nodes | `""` | -| `sentinel.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Redis® Sentinel nodes | `""` | -| `sentinel.externalMaster.enabled` | Use external master for bootstrapping | `false` | -| `sentinel.externalMaster.host` | External master host to bootstrap from | `""` | -| `sentinel.externalMaster.port` | Port for Redis service external master host | `6379` | -| `sentinel.containerPorts.sentinel` | Container port to open on Redis® Sentinel nodes | `26379` | -| `sentinel.startupProbe.enabled` | Enable startupProbe on Redis® Sentinel nodes | `true` | -| `sentinel.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `10` | -| `sentinel.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | -| `sentinel.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` | -| `sentinel.startupProbe.failureThreshold` | Failure threshold for startupProbe | `22` | -| `sentinel.startupProbe.successThreshold` | Success threshold for startupProbe | `1` | -| `sentinel.livenessProbe.enabled` | Enable livenessProbe on Redis® Sentinel nodes | `true` | -| `sentinel.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `20` | -| `sentinel.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `5` | -| `sentinel.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | -| `sentinel.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `5` | -| `sentinel.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | -| `sentinel.readinessProbe.enabled` | Enable readinessProbe on Redis® Sentinel nodes | `true` | -| `sentinel.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `20` | -| `sentinel.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `5` | -| `sentinel.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` | -| `sentinel.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `5` | -| `sentinel.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | -| `sentinel.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | -| `sentinel.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | -| `sentinel.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | -| `sentinel.persistence.enabled` | Enable persistence on Redis® sentinel nodes using Persistent Volume Claims (Experimental) | `false` | -| `sentinel.persistence.storageClass` | Persistent Volume storage class | `""` | -| `sentinel.persistence.accessModes` | Persistent Volume access modes | `["ReadWriteOnce"]` | -| `sentinel.persistence.size` | Persistent Volume size | `100Mi` | -| `sentinel.persistence.annotations` | Additional custom annotations for the PVC | `{}` | -| `sentinel.persistence.selector` | Additional labels to match for the PVC | `{}` | -| `sentinel.persistence.dataSource` | Custom PVC data source | `{}` | -| `sentinel.persistence.medium` | Provide a medium for `emptyDir` volumes. | `""` | -| `sentinel.resources.limits` | The resources limits for the Redis® Sentinel containers | `{}` | -| `sentinel.resources.requests` | The requested resources for the Redis® Sentinel containers | `{}` | -| `sentinel.containerSecurityContext.enabled` | Enabled Redis® Sentinel containers' Security Context | `true` | -| `sentinel.containerSecurityContext.runAsUser` | Set Redis® Sentinel containers' Security Context runAsUser | `1001` | -| `sentinel.lifecycleHooks` | for the Redis® sentinel container(s) to automate configuration before or after startup | `{}` | -| `sentinel.extraVolumes` | Optionally specify extra list of additional volumes for the Redis® Sentinel | `[]` | -| `sentinel.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Redis® Sentinel container(s) | `[]` | -| `sentinel.service.type` | Redis® Sentinel service type | `ClusterIP` | -| `sentinel.service.ports.redis` | Redis® service port for Redis® | `6379` | -| `sentinel.service.ports.sentinel` | Redis® service port for Redis® Sentinel | `26379` | -| `sentinel.service.nodePorts.redis` | Node port for Redis® | `""` | -| `sentinel.service.nodePorts.sentinel` | Node port for Sentinel | `""` | -| `sentinel.service.externalTrafficPolicy` | Redis® Sentinel service external traffic policy | `Cluster` | -| `sentinel.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` | -| `sentinel.service.clusterIP` | Redis® Sentinel service Cluster IP | `""` | -| `sentinel.service.loadBalancerIP` | Redis® Sentinel service Load Balancer IP | `""` | -| `sentinel.service.loadBalancerSourceRanges` | Redis® Sentinel service Load Balancer sources | `[]` | -| `sentinel.service.annotations` | Additional custom annotations for Redis® Sentinel service | `{}` | -| `sentinel.service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` | -| `sentinel.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` | -| `sentinel.terminationGracePeriodSeconds` | Integer setting the termination grace period for the redis-node pods | `30` | - - -### Other Parameters - -| Name | Description | Value | -| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| `networkPolicy.enabled` | Enable creation of NetworkPolicy resources | `false` | -| `networkPolicy.allowExternal` | Don't require client label for connections | `true` | -| `networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` | -| `networkPolicy.extraEgress` | Add extra egress 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 | `{}` | -| `podSecurityPolicy.create` | Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later | `false` | -| `podSecurityPolicy.enabled` | Enable PodSecurityPolicy's RBAC rules | `false` | -| `rbac.create` | Specifies whether RBAC resources should be created | `false` | -| `rbac.rules` | Custom RBAC rules to set | `[]` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` | -| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` | -| `serviceAccount.automountServiceAccountToken` | Whether to auto mount the service account token | `true` | -| `serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` | -| `pdb.create` | Specifies whether a PodDisruptionBudget should be created | `false` | -| `pdb.minAvailable` | Min number of pods that must still be available after the eviction | `1` | -| `pdb.maxUnavailable` | Max number of pods that can be unavailable after the eviction | `""` | -| `tls.enabled` | Enable TLS traffic | `false` | -| `tls.authClients` | Require clients to authenticate | `true` | -| `tls.autoGenerated` | Enable autogenerated certificates | `false` | -| `tls.existingSecret` | The name of the existing secret that contains the TLS certificates | `""` | -| `tls.certificatesSecret` | DEPRECATED. Use existingSecret instead. | `""` | -| `tls.certFilename` | Certificate filename | `""` | -| `tls.certKeyFilename` | Certificate Key filename | `""` | -| `tls.certCAFilename` | CA Certificate filename | `""` | -| `tls.dhParamsFilename` | File containing DH params (in order to support DH based ciphers) | `""` | - - -### Metrics Parameters - -| Name | Description | Value | -| -------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------ | -| `metrics.enabled` | Start a sidecar prometheus exporter to expose Redis® metrics | `false` | -| `metrics.image.registry` | Redis® Exporter image registry | `docker.io` | -| `metrics.image.repository` | Redis® Exporter image repository | `bitnami/redis-exporter` | -| `metrics.image.tag` | Redis® Redis® Exporter image tag (immutable tags are recommended) | `1.43.0-debian-11-r4` | -| `metrics.image.pullPolicy` | Redis® Exporter image pull policy | `IfNotPresent` | -| `metrics.image.pullSecrets` | Redis® Exporter image pull secrets | `[]` | -| `metrics.command` | Override default metrics container init command (useful when using custom images) | `[]` | -| `metrics.redisTargetHost` | A way to specify an alternative Redis® hostname | `localhost` | -| `metrics.extraArgs` | Extra arguments for Redis® exporter, for example: | `{}` | -| `metrics.extraEnvVars` | Array with extra environment variables to add to Redis® exporter | `[]` | -| `metrics.containerSecurityContext.enabled` | Enabled Redis® exporter containers' Security Context | `true` | -| `metrics.containerSecurityContext.runAsUser` | Set Redis® exporter containers' Security Context runAsUser | `1001` | -| `metrics.extraVolumes` | Optionally specify extra list of additional volumes for the Redis® metrics sidecar | `[]` | -| `metrics.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Redis® metrics sidecar | `[]` | -| `metrics.resources.limits` | The resources limits for the Redis® exporter container | `{}` | -| `metrics.resources.requests` | The requested resources for the Redis® exporter container | `{}` | -| `metrics.podLabels` | Extra labels for Redis® exporter pods | `{}` | -| `metrics.podAnnotations` | Annotations for Redis® exporter pods | `{}` | -| `metrics.service.type` | Redis® exporter service type | `ClusterIP` | -| `metrics.service.port` | Redis® exporter service port | `9121` | -| `metrics.service.externalTrafficPolicy` | Redis® exporter service external traffic policy | `Cluster` | -| `metrics.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` | -| `metrics.service.loadBalancerIP` | Redis® exporter service Load Balancer IP | `""` | -| `metrics.service.loadBalancerSourceRanges` | Redis® exporter service Load Balancer sources | `[]` | -| `metrics.service.annotations` | Additional custom annotations for Redis® exporter service | `{}` | -| `metrics.serviceMonitor.enabled` | Create ServiceMonitor resource(s) for scraping metrics using PrometheusOperator | `false` | -| `metrics.serviceMonitor.namespace` | The namespace in which the ServiceMonitor will be created | `""` | -| `metrics.serviceMonitor.interval` | The interval at which metrics should be scraped | `30s` | -| `metrics.serviceMonitor.scrapeTimeout` | The timeout after which the scrape is ended | `""` | -| `metrics.serviceMonitor.relabellings` | Metrics RelabelConfigs to apply to samples before scraping. | `[]` | -| `metrics.serviceMonitor.metricRelabelings` | Metrics RelabelConfigs to apply to samples before ingestion. | `[]` | -| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` | -| `metrics.serviceMonitor.additionalLabels` | Additional labels that can be used so ServiceMonitor resource(s) can be discovered by Prometheus | `{}` | -| `metrics.prometheusRule.enabled` | Create a custom prometheusRule Resource for scraping metrics using PrometheusOperator | `false` | -| `metrics.prometheusRule.namespace` | The namespace in which the prometheusRule will be created | `""` | -| `metrics.prometheusRule.additionalLabels` | Additional labels for the prometheusRule | `{}` | -| `metrics.prometheusRule.rules` | Custom Prometheus rules | `[]` | - - -### Init Container Parameters - -| Name | Description | Value | -| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | ----------------------- | -| `volumePermissions.enabled` | Enable init container that changes the owner/group of the PV mount point to `runAsUser:fsGroup` | `false` | -| `volumePermissions.image.registry` | Bitnami Shell image registry | `docker.io` | -| `volumePermissions.image.repository` | Bitnami Shell image repository | `bitnami/bitnami-shell` | -| `volumePermissions.image.tag` | Bitnami Shell image tag (immutable tags are recommended) | `11-debian-11-r11` | -| `volumePermissions.image.pullPolicy` | Bitnami Shell image pull policy | `IfNotPresent` | -| `volumePermissions.image.pullSecrets` | Bitnami Shell image pull secrets | `[]` | -| `volumePermissions.resources.limits` | The resources limits for the init container | `{}` | -| `volumePermissions.resources.requests` | The requested resources for the init container | `{}` | -| `volumePermissions.containerSecurityContext.runAsUser` | Set init container's Security Context runAsUser | `0` | -| `sysctl.enabled` | Enable init container to modify Kernel settings | `false` | -| `sysctl.image.registry` | Bitnami Shell image registry | `docker.io` | -| `sysctl.image.repository` | Bitnami Shell image repository | `bitnami/bitnami-shell` | -| `sysctl.image.tag` | Bitnami Shell image tag (immutable tags are recommended) | `11-debian-11-r11` | -| `sysctl.image.pullPolicy` | Bitnami Shell image pull policy | `IfNotPresent` | -| `sysctl.image.pullSecrets` | Bitnami Shell image pull secrets | `[]` | -| `sysctl.command` | Override default init-sysctl container command (useful when using custom images) | `[]` | -| `sysctl.mountHostSys` | Mount the host `/sys` folder to `/host-sys` | `false` | -| `sysctl.resources.limits` | The resources limits for the init container | `{}` | -| `sysctl.resources.requests` | The requested resources for the init container | `{}` | - - -### useExternalDNS Parameters - -| Name | Description | Value | -| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | -| `useExternalDNS.enabled` | Enable various syntax that would enable external-dns to work. Note this requires a working installation of `external-dns` to be usable. | `false` | -| `useExternalDNS.additionalAnnotations` | Extra annotations to be utilized when `external-dns` is enabled. | `{}` | -| `useExternalDNS.annotationKey` | The annotation key utilized when `external-dns` is enabled. | `external-dns.alpha.kubernetes.io/` | -| `useExternalDNS.suffix` | The DNS suffix utilized when `external-dns` is enabled. Note that we prepend the suffix with the full name of the release. | `""` | - - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set auth.password=secretpassword \ - bitnami/redis -``` - -The above command sets the Redis® server password to `secretpassword`. - -> NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/redis -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -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. - -### Use a different Redis® version - -To modify the application version used in this chart, specify a different version of the image using the `image.tag` parameter and/or a different repository using the `image.repository` parameter. Refer to the [chart documentation for more information on these parameters and how to use them with images from a private registry](https://docs.bitnami.com/kubernetes/infrastructure/redis/configuration/change-image-version/). - -### Bootstrapping with an External Cluster - -This chart is equipped with the ability to bring online a set of Pods that connect to an existing Redis deployment that lies outside of Kubernetes. This effectively creates a hybrid Redis Deployment where both Pods in Kubernetes and Instances such as Virtual Machines can partake in a single Redis Deployment. This is helpful in situations where one may be migrating Redis from Virtual Machines into Kubernetes, for example. To take advantage of this, use the following as an example configuration: - -```yaml -replica: - externalMaster: - enabled: true - host: external-redis-0.internal -sentinel: - externalMaster: - enabled: true - host: external-redis-0.internal -``` - -:warning: This is currently limited to clusters in which Sentinel and Redis run on the same node! :warning: - -Please also note that the external sentinel must be listening on port `26379`, and this is currently not configurable. - -Once the Kubernetes Redis Deployment is online and confirmed to be working with the existing cluster, the configuration can then be removed and the cluster will remain connected. - -### External DNS - -This chart is equipped to allow leveraging the ExternalDNS project. Doing so will enable ExternalDNS to publish the FQDN for each instance, in the format of `..`. -Example, when using the following configuration: - -```yaml -useExternalDNS: - enabled: true - suffix: prod.example.org - additionalAnnotations: - ttl: 10 -``` - -On a cluster where the name of the Helm release is `a`, the hostname of a Pod is generated as: `a-redis-node-0.a-redis.prod.example.org`. The IP of that FQDN will match that of the associated Pod. This modifies the following parameters of the Redis/Sentinel configuration using this new FQDN: - -* `replica-announce-ip` -* `known-sentinel` -* `known-replica` -* `announce-ip` - -:warning: This requires a working installation of `external-dns` to be fully functional. :warning: - -See the [official ExternalDNS documentation](https://github.com/kubernetes-sigs/external-dns) for additional configuration options. - -### Cluster topologies - -#### Default: Master-Replicas - -When installing the chart with `architecture=replication`, it will deploy a Redis® master StatefulSet and a Redis® replicas StatefulSet. The replicas will be read-replicas of the master. Two services will be exposed: - -- Redis® Master service: Points to the master, where read-write operations can be performed -- Redis® Replicas service: Points to the replicas, where only read operations are allowed by default. - -In case the master crashes, the replicas will wait until the master node is respawned again by the Kubernetes Controller Manager. - -#### Standalone - -When installing the chart with `architecture=standalone`, it will deploy a standalone Redis® StatefulSet. A single service will be exposed: - -- Redis® Master service: Points to the master, where read-write operations can be performed - -#### Master-Replicas with Sentinel - -When installing the chart with `architecture=replication` and `sentinel.enabled=true`, it will deploy a Redis® master StatefulSet (only one master allowed) and a Redis® replicas StatefulSet. In this case, the pods will contain an extra container with Redis® Sentinel. This container will form a cluster of Redis® Sentinel nodes, which will promote a new master in case the actual one fails. In addition to this, only one service is exposed: - -- Redis® service: Exposes port 6379 for Redis® read-only operations and port 26379 for accessing Redis® Sentinel. - -For read-only operations, access the service using port 6379. For write operations, it's necessary to access the Redis® Sentinel cluster and query the current master using the command below (using redis-cli or similar): - -``` -SENTINEL get-master-addr-by-name -``` - -This command will return the address of the current master, which can be accessed from inside the cluster. - -In case the current master crashes, the Sentinel containers will elect a new master node. - -`master.count` greater than `1` is not designed for use when `sentinel.enabled=true`. - -### Multiple masters (experimental) - -When `master.count` is greater than `1`, special care must be taken to create a consistent setup. - -An example of use case is the creation of a redundant set of standalone masters or master-replicas per Kubernetes node where you must ensure: -- No more than `1` master can be deployed per Kubernetes node -- Replicas and writers can only see the single master of their own Kubernetes node - -One way of achieving this is by setting `master.service.internalTrafficPolicy=Local` in combination with a `master.affinity.podAntiAffinity` spec to never schedule more than one master per Kubernetes node. - -It's recommended to only change `master.count` if you know what you are doing. -`master.count` greater than `1` is not designed for use when `sentinel.enabled=true`. - -### Using a password file - -To use a password file for Redis® you need to create a secret containing the password and then deploy the chart using that secret. - -Refer to the chart documentation for more information on [using a password file for Redis®](https://docs.bitnami.com/kubernetes/infrastructure/redis/administration/use-password-file/). - -### Securing traffic using TLS - -TLS support can be enabled in the chart by specifying the `tls.` parameters while creating a release. The following parameters should be configured to properly enable the TLS support in the chart: - -- `tls.enabled`: Enable TLS support. Defaults to `false` -- `tls.existingSecret`: Name of the secret that contains the certificates. No defaults. -- `tls.certFilename`: Certificate filename. No defaults. -- `tls.certKeyFilename`: Certificate key filename. No defaults. -- `tls.certCAFilename`: CA Certificate filename. No defaults. - -Refer to the chart documentation for more information on [creating the secret and a TLS deployment example](https://docs.bitnami.com/kubernetes/infrastructure/redis/administration/enable-tls/). - -### Metrics - -The chart optionally can start a metrics exporter for [prometheus](https://prometheus.io). The metrics endpoint (port 9121) is exposed in the service. Metrics can be scraped from within the cluster using something similar as the described in the [example Prometheus scrape configuration](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml). If metrics are to be scraped from outside the cluster, the Kubernetes API proxy can be utilized to access the endpoint. - -If you have enabled TLS by specifying `tls.enabled=true` you also need to specify TLS option to the metrics exporter. You can do that via `metrics.extraArgs`. You can find the metrics exporter CLI flags for TLS [here](https://github.com/oliver006/redis_exporter#command-line-flags). For example: - -You can either specify `metrics.extraArgs.skip-tls-verification=true` to skip TLS verification or providing the following values under `metrics.extraArgs` for TLS client authentication: - -```console -tls-client-key-file -tls-client-cert-file -tls-ca-cert-file -``` - -### Host Kernel Settings - -Redis® may require some changes in the kernel of the host machine to work as expected, in particular increasing the `somaxconn` value and disabling transparent huge pages. - -Refer to the chart documentation for more information on [configuring host kernel settings with an example](https://docs.bitnami.com/kubernetes/infrastructure/redis/administration/configure-kernel-settings/). - -## Persistence - -By default, the chart mounts a [Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) at the `/data` path. The volume is created using dynamic volume provisioning. If a Persistent Volume Claim already exists, specify it during installation. - -### Existing PersistentVolumeClaim - -1. Create the PersistentVolume -2. Create the PersistentVolumeClaim -3. Install the chart - -```bash -$ helm install my-release --set master.persistence.existingClaim=PVC_NAME bitnami/redis -``` - -## Backup and restore - -Refer to the chart documentation for more information on [backing up and restoring Redis® deployments](https://docs.bitnami.com/kubernetes/infrastructure/redis/administration/backup-restore/). - -## NetworkPolicy - -To enable network policy for Redis®, install [a networking plugin that implements the Kubernetes NetworkPolicy spec](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy#before-you-begin), and set `networkPolicy.enabled` to `true`. - -Refer to the chart documenation for more information on [enabling the network policy in Redis® deployments](https://docs.bitnami.com/kubernetes/infrastructure/redis/administration/enable-network-policy/). - -### 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/master/bitnami/common#affinities) chart. To do so, set the `XXX.podAffinityPreset`, `XXX.podAntiAffinityPreset`, or `XXX.nodeAffinityPreset` parameters. - -## 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 - -A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions. - -### To 16.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: -- `master.service.port` renamed as `master.service.ports.redis`. -- `master.service.nodePort` renamed as `master.service.nodePorts.redis`. -- `replica.service.port` renamed as `replica.service.ports.redis`. -- `replica.service.nodePort` renamed as `replica.service.nodePorts.redis`. -- `sentinel.service.port` renamed as `sentinel.service.ports.redis`. -- `sentinel.service.sentinelPort` renamed as `sentinel.service.ports.sentinel`. -- `master.containerPort` renamed as `master.containerPorts.redis`. -- `replica.containerPort` renamed as `replica.containerPorts.redis`. -- `sentinel.containerPort` renamed as `sentinel.containerPorts.sentinel`. -- `master.spreadConstraints` renamed as `master.topologySpreadConstraints` -- `replica.spreadConstraints` renamed as `replica.topologySpreadConstraints` - -### To 15.0.0 - -The parameter to enable the usage of StaticIDs was removed. The behavior is to [always use StaticIDs](https://github.com/bitnami/charts/pull/7278). - -### To 14.8.0 - -The Redis® sentinel exporter was removed in this version because the upstream project was deprecated. The regular Redis® exporter is included in the sentinel scenario as usual. - -### To 14.0.0 - -- Several parameters were renamed or disappeared in favor of new ones on this major version: - - The term *slave* has been replaced by the term *replica*. Therefore, parameters prefixed with `slave` are now prefixed with `replicas`. - - Credentials parameter are reorganized under the `auth` parameter. - - `cluster.enabled` parameter is deprecated in favor of `architecture` parameter that accepts two values: `standalone` and `replication`. - - `securityContext.*` is deprecated in favor of `XXX.podSecurityContext` and `XXX.containerSecurityContext`. - - `sentinel.metrics.*` parameters are deprecated in favor of `metrics.sentinel.*` ones. -- New parameters to add custom command, environment variables, sidecars, init containers, etc. were added. -- Chart labels were adapted to follow the [Helm charts standard labels](https://helm.sh/docs/chart_best_practices/labels/#standard-labels). -- values.yaml metadata was adapted to follow the format supported by [Readme Generator for Helm](https://github.com/bitnami-labs/readme-generator-for-helm). - -Consequences: - -Backwards compatibility is not guaranteed. To upgrade to `14.0.0`, install a new release of the Redis® chart, and migrate the data from your previous release. You have 2 alternatives to do so: - -- Create a backup of the database, and restore it on the new release as explained in the [Backup and restore](#backup-and-restore) section. -- Reuse the PVC used to hold the master data on your previous release. To do so, use the `master.persistence.existingClaim` parameter. The following example assumes that the release name is `redis`: - -```bash -$ helm install redis bitnami/redis --set auth.password=[PASSWORD] --set master.persistence.existingClaim=[EXISTING_PVC] -``` - -| Note: you need to substitute the placeholder _[EXISTING_PVC]_ with the name of the PVC used on your previous release, and _[PASSWORD]_ with the password used in your previous release. - -### To 13.0.0 - -This major version updates the Redis® docker image version used from `6.0` to `6.2`, the new stable version. There are no major changes in the chart and there shouldn't be any breaking changes in it as `6.2` is basically a stricter superset of `6.0`. For more information, please refer to [Redis® 6.2 release notes](https://raw.githubusercontent.com/redis/redis/6.2/00-RELEASENOTES). - -### To 12.3.0 - -This version also 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/master/bitnami/common#bitnami-common-library-chart). Please, make sure that you have updated the chart dependencies before executing any upgrade. - -### To 12.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** - -- https://docs.bitnami.com/tutorials/resolve-helm2-helm3-post-migration-issues/ -- https://helm.sh/docs/topics/v2_v3_migration/ -- https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/ - -### To 11.0.0 - -When deployed with sentinel enabled, only a group of nodes is deployed and the master/slave role is handled in the group. To avoid breaking the compatibility, the settings for this nodes are given through the `slave.xxxx` parameters in `values.yaml` - -### To 9.0.0 - -The metrics exporter has been changed from a separate deployment to a sidecar container, due to the latest changes in the Redis® exporter code. Check the [official page](https://github.com/oliver006/redis_exporter/) for more information. The metrics container image was changed from oliver006/redis_exporter to bitnami/redis-exporter (Bitnami's maintained package of oliver006/redis_exporter). - -### To 7.0.0 - -In order to improve the performance in case of slave failure, we added persistence to the read-only slaves. That means that we moved from Deployment to StatefulSets. This should not affect upgrades from previous versions of the chart, as the deployments did not contain any persistence at all. - -This version also allows enabling Redis® Sentinel containers inside of the Redis® Pods (feature disabled by default). In case the master crashes, a new Redis® node will be elected as master. In order to query the current master (no redis master service is exposed), you need to query first the Sentinel cluster. Find more information [in this section](#master-slave-with-sentinel). - -### To 11.0.0 - -When using sentinel, a new statefulset called `-node` was introduced. This will break upgrading from a previous version where the statefulsets are called master and slave. Hence the PVC will not match the new naming and won't be reused. If you want to keep your data, you will need to perform a backup and then a restore the data in this new version. - -### To 10.0.0 - -For releases with `usePassword: true`, the value `sentinel.usePassword` controls whether the password authentication also applies to the sentinel port. This defaults to `true` for a secure configuration, however it is possible to disable to account for the following cases: - -- Using a version of redis-sentinel prior to `5.0.1` where the authentication feature was introduced. -- Where redis clients need to be updated to support sentinel authentication. - -If using a master/slave topology, or with `usePassword: false`, no action is required. - -### To 8.0.18 - -For releases with `metrics.enabled: true` the default tag for the exporter image is now `v1.x.x`. This introduces many changes including metrics names. You'll want to use [this dashboard](https://github.com/oliver006/redis_exporter/blob/master/contrib/grafana_prometheus_redis_dashboard.json) now. Please see the [redis_exporter github page](https://github.com/oliver006/redis_exporter#upgrading-from-0x-to-1x) for more details. - -### To 7.0.0 - -This version causes a change in the Redis® Master StatefulSet definition, so the command helm upgrade would not work out of the box. As an alternative, one of the following could be done: - -- Recommended: Create a clone of the Redis® Master PVC (for example, using projects like [this one](https://github.com/edseymour/pvc-transfer)). Then launch a fresh release reusing this cloned PVC. - - ``` - helm install my-release bitnami/redis --set persistence.existingClaim= - ``` - -- Alternative (not recommended, do at your own risk): `helm delete --purge` does not remove the PVC assigned to the Redis® Master StatefulSet. As a consequence, the following commands can be done to upgrade the release - - ``` - helm delete --purge - helm install bitnami/redis - ``` - -Previous versions of the chart were not using persistence in the slaves, so this upgrade would add it to them. Another important change is that no values are inherited from master to slaves. For example, in 6.0.0 `slaves.readinessProbe.periodSeconds`, if empty, would be set to `master.readinessProbe.periodSeconds`. This approach lacked transparency and was difficult to maintain. From now on, all the slave parameters must be configured just as it is done with the masters. - -Some values have changed as well: - -- `master.port` and `slave.port` have been changed to `redisPort` (same value for both master and slaves) -- `master.securityContext` and `slave.securityContext` have been changed to `securityContext`(same values for both master and slaves) - -By default, the upgrade will not change the cluster topology. In case you want to use Redis® Sentinel, you must explicitly set `sentinel.enabled` to `true`. - -### To 6.0.0 - -Previous versions of the chart were using an init-container to change the permissions of the volumes. This was done in case the `securityContext` directive in the template was not enough for that (for example, with cephFS). In this new version of the chart, this container is disabled by default (which should not affect most of the deployments). If your installation still requires that init container, execute `helm upgrade` with the `--set volumePermissions.enabled=true`. - -### To 5.0.0 - -The default image in this release may be switched out for any image containing the `redis-server` -and `redis-cli` binaries. If `redis-server` is not the default image ENTRYPOINT, `master.command` -must be specified. - -#### Breaking changes - -- `master.args` and `slave.args` are removed. Use `master.command` or `slave.command` instead in order to override the image entrypoint, or `master.extraFlags` to pass additional flags to `redis-server`. -- `disableCommands` is now interpreted as an array of strings instead of a string of comma separated values. -- `master.persistence.path` now defaults to `/data`. - -### To 4.0.0 - -This version removes the `chart` label from the `spec.selector.matchLabels` -which is immutable since `StatefulSet apps/v1beta2`. It has been inadvertently -added, causing any subsequent upgrade to fail. See https://github.com/helm/charts/issues/7726. - -It also fixes https://github.com/helm/charts/issues/7726 where a deployment `extensions/v1beta1` can not be upgraded if `spec.selector` is not explicitly set. - -Finally, it fixes https://github.com/helm/charts/issues/7803 by removing mutable labels in `spec.VolumeClaimTemplate.metadata.labels` so that it is upgradable. - -In order to upgrade, delete the Redis® StatefulSet before upgrading: - -```bash -kubectl delete statefulsets.apps --cascade=false my-release-redis-master -``` - -And edit the Redis® slave (and metrics if enabled) deployment: - -```bash -kubectl patch deployments my-release-redis-slave --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]' -kubectl patch deployments my-release-redis-metrics --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]' -``` - -## License - -Copyright © 2022 Bitnami - -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 - - http://www.apache.org/licenses/LICENSE-2.0 - -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/charts/gitlab/gitlab/charts/redis/charts/common/.helmignore b/charts/gitlab/gitlab/charts/redis/charts/common/.helmignore deleted file mode 100644 index 50af03172..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# 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/ diff --git a/charts/gitlab/gitlab/charts/redis/charts/common/Chart.yaml b/charts/gitlab/gitlab/charts/redis/charts/common/Chart.yaml deleted file mode 100644 index bd152e31e..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -annotations: - category: Infrastructure -apiVersion: v2 -appVersion: 1.16.0 -description: A Library Helm Chart for grouping common logic between bitnami charts. - This chart is not deployable by itself. -home: https://github.com/bitnami/charts/tree/master/bitnami/common -icon: https://bitnami.com/downloads/logos/bitnami-mark.png -keywords: -- common -- helper -- template -- function -- bitnami -maintainers: -- name: Bitnami - url: https://github.com/bitnami/charts -name: common -sources: -- https://github.com/bitnami/charts -- https://www.bitnami.com/ -type: library -version: 1.16.0 diff --git a/charts/gitlab/gitlab/charts/redis/charts/common/README.md b/charts/gitlab/gitlab/charts/redis/charts/common/README.md deleted file mode 100644 index 3b5e09c51..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/README.md +++ /dev/null @@ -1,350 +0,0 @@ -# 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: 1.x.x - repository: https://charts.bitnami.com/bitnami -``` - -```bash -$ helm dependency update -``` - -```yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.names.fullname" . }} -data: - myvalue: "Hello World" -``` - -## Introduction - -This chart provides a common template helpers which can be used to develop new charts using [Helm](https://helm.sh) package manager. - -Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of [Bitnami Kubernetes Production Runtime](https://kubeprod.io/) (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications. - -## Prerequisites - -- Kubernetes 1.19+ -- Helm 3.2.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.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" $` | - -### 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.cronjob.apiVersion` | Return the appropriate apiVersion for cronjob. | `.` 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.supportsHelmVersion` | Returns true if the used Helm version is 3.3+ | `.` Chart 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" $` | - -### 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" $` | - -### 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.supportsPathType` | Prints "true" if the pathType field is supported | `.` Chart context | -| `common.ingress.supportsIngressClassname` | Prints "true" if the ingressClassname field is supported | `.` Chart context | -| `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 | - -### 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.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" "context" $`, length, strong and chartNAme fields are optional. | -| `common.secrets.exists` | Returns whether a previous generated secret already exists. | `dict "secret" "secret-name" "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 `.` | - -### 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" $` | - -### 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. | -| `common.validations.values.mysql.passwords` | This helper will ensure required password for MySQL are not empty. It returns a shared error for all the values. | `dict "secret" "mysql-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use mysql chart and the helper. | -| `common.validations.values.postgresql.passwords` | This helper will ensure required password for PostgreSQL are not empty. It returns a shared error for all the values. | `dict "secret" "postgresql-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use postgresql chart and the helper. | -| `common.validations.values.redis.passwords` | This helper will ensure required password for Redis® are not empty. It returns a shared error for all the values. | `dict "secret" "redis-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use redis chart and the helper. | -| `common.validations.values.cassandra.passwords` | This helper will ensure required password for Cassandra are not empty. It returns a shared error for all the values. | `dict "secret" "cassandra-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use cassandra chart and the helper. | -| `common.validations.values.mongodb.passwords` | This helper will ensure required password for MongoDB® are not empty. It returns a shared error for all the values. | `dict "secret" "mongodb-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use mongodb 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. | - -## 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. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - -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** - -- https://docs.bitnami.com/tutorials/resolve-helm2-helm3-post-migration-issues/ -- https://helm.sh/docs/topics/v2_v3_migration/ -- https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/ - -## License - -Copyright © 2022 Bitnami - -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 - - http://www.apache.org/licenses/LICENSE-2.0 - -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/charts/gitlab/gitlab/charts/redis/charts/common/templates/_affinities.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_affinities.tpl deleted file mode 100644 index 189ea403d..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_affinities.tpl +++ /dev/null @@ -1,102 +0,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 soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "context" $) -}} -*/}} -{{- define "common.affinities.pods.soft" -}} -{{- $component := default "" .component -}} -{{- $extraMatchLabels := default (dict) .extraMatchLabels -}} -preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} - {{- if not (empty $component) }} - {{ printf "app.kubernetes.io/component: %s" $component }} - {{- end }} - {{- range $key, $value := $extraMatchLabels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - namespaces: - - {{ .context.Release.Namespace | quote }} - topologyKey: kubernetes.io/hostname - weight: 1 -{{- end -}} - -{{/* -Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "context" $) -}} -*/}} -{{- define "common.affinities.pods.hard" -}} -{{- $component := default "" .component -}} -{{- $extraMatchLabels := default (dict) .extraMatchLabels -}} -requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} - {{- if not (empty $component) }} - {{ printf "app.kubernetes.io/component: %s" $component }} - {{- end }} - {{- range $key, $value := $extraMatchLabels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - namespaces: - - {{ .context.Release.Namespace | quote }} - topologyKey: kubernetes.io/hostname -{{- 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/charts/gitlab/gitlab/charts/redis/charts/common/templates/_capabilities.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 9d9b76004..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_capabilities.tpl +++ /dev/null @@ -1,154 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Return the target Kubernetes version -*/}} -{{- define "common.capabilities.kubeVersion" -}} -{{- if .Values.global }} - {{- if .Values.global.kubeVersion }} - {{- .Values.global.kubeVersion -}} - {{- else }} - {{- default .Capabilities.KubeVersion.Version .Values.kubeVersion -}} - {{- end -}} -{{- else }} -{{- default .Capabilities.KubeVersion.Version .Values.kubeVersion -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for poddisruptionbudget. -*/}} -{{- define "common.capabilities.policy.apiVersion" -}} -{{- if semverCompare "<1.21-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "policy/v1beta1" -}} -{{- else -}} -{{- print "policy/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for networkpolicy. -*/}} -{{- define "common.capabilities.networkPolicy.apiVersion" -}} -{{- if semverCompare "<1.7-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "extensions/v1beta1" -}} -{{- else -}} -{{- print "networking.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for cronjob. -*/}} -{{- define "common.capabilities.cronjob.apiVersion" -}} -{{- if semverCompare "<1.21-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "batch/v1beta1" -}} -{{- else -}} -{{- print "batch/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for deployment. -*/}} -{{- define "common.capabilities.deployment.apiVersion" -}} -{{- if semverCompare "<1.14-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "extensions/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "common.capabilities.statefulset.apiVersion" -}} -{{- if semverCompare "<1.14-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "apps/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for ingress. -*/}} -{{- define "common.capabilities.ingress.apiVersion" -}} -{{- if .Values.ingress -}} -{{- if .Values.ingress.apiVersion -}} -{{- .Values.ingress.apiVersion -}} -{{- else if semverCompare "<1.14-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "extensions/v1beta1" -}} -{{- else if semverCompare "<1.19-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "networking.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "networking.k8s.io/v1" -}} -{{- end }} -{{- else if semverCompare "<1.14-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "extensions/v1beta1" -}} -{{- else if semverCompare "<1.19-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "networking.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "networking.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for RBAC resources. -*/}} -{{- define "common.capabilities.rbac.apiVersion" -}} -{{- if semverCompare "<1.17-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "rbac.authorization.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "rbac.authorization.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for CRDs. -*/}} -{{- define "common.capabilities.crd.apiVersion" -}} -{{- if semverCompare "<1.19-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "apiextensions.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "apiextensions.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for APIService. -*/}} -{{- define "common.capabilities.apiService.apiVersion" -}} -{{- if semverCompare "<1.10-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "apiregistration.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "apiregistration.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for Horizontal Pod Autoscaler. -*/}} -{{- define "common.capabilities.hpa.apiVersion" -}} -{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .context) -}} -{{- if .beta2 -}} -{{- print "autoscaling/v2beta2" -}} -{{- else -}} -{{- print "autoscaling/v2beta1" -}} -{{- end -}} -{{- else -}} -{{- print "autoscaling/v2" -}} -{{- 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/charts/gitlab/gitlab/charts/redis/charts/common/templates/_errors.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e32..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_errors.tpl +++ /dev/null @@ -1,23 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Through 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 -}} diff --git a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_images.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_images.tpl deleted file mode 100644 index 42ffbc722..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_images.tpl +++ /dev/null @@ -1,75 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Return the proper image name -{{ include "common.images.image" ( dict "imageRoot" .Values.path.to.the.image "global" $) }} -*/}} -{{- define "common.images.image" -}} -{{- $registryName := .imageRoot.registry -}} -{{- $repositoryName := .imageRoot.repository -}} -{{- $tag := .imageRoot.tag | toString -}} -{{- if .global }} - {{- if .global.imageRegistry }} - {{- $registryName = .global.imageRegistry -}} - {{- end -}} -{{- end -}} -{{- if $registryName }} -{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- else -}} -{{- printf "%s:%s" $repositoryName $tag -}} -{{- 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 }} - - {{- if .global }} - {{- range .global.imagePullSecrets -}} - {{- $pullSecrets = append $pullSecrets . -}} - {{- end -}} - {{- end -}} - - {{- range .images -}} - {{- range .pullSecrets -}} - {{- $pullSecrets = append $pullSecrets . -}} - {{- end -}} - {{- end -}} - - {{- if (not (empty $pullSecrets)) }} -imagePullSecrets: - {{- range $pullSecrets }} - - 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 }} - - {{- if $context.Values.global }} - {{- range $context.Values.global.imagePullSecrets -}} - {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}} - {{- end -}} - {{- end -}} - - {{- range .images -}} - {{- range .pullSecrets -}} - {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}} - {{- end -}} - {{- end -}} - - {{- if (not (empty $pullSecrets)) }} -imagePullSecrets: - {{- range $pullSecrets }} - - name: {{ . }} - {{- end }} - {{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_ingress.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_ingress.tpl deleted file mode 100644 index 8caf73a61..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_ingress.tpl +++ /dev/null @@ -1,68 +0,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" -}} -{{- $apiVersion := (include "common.capabilities.ingress.apiVersion" .context) -}} -{{- if or (eq $apiVersion "extensions/v1beta1") (eq $apiVersion "networking.k8s.io/v1beta1") -}} -serviceName: {{ .serviceName }} -servicePort: {{ .servicePort }} -{{- else -}} -service: - name: {{ .serviceName }} - port: - {{- if typeIs "string" .servicePort }} - name: {{ .servicePort }} - {{- else if or (typeIs "int" .servicePort) (typeIs "float64" .servicePort) }} - number: {{ .servicePort | int }} - {{- end }} -{{- end -}} -{{- end -}} - -{{/* -Print "true" if the API pathType field is supported -Usage: -{{ include "common.ingress.supportsPathType" . }} -*/}} -{{- define "common.ingress.supportsPathType" -}} -{{- if (semverCompare "<1.18-0" (include "common.capabilities.kubeVersion" .)) -}} -{{- print "false" -}} -{{- else -}} -{{- print "true" -}} -{{- end -}} -{{- end -}} - -{{/* -Returns true if the ingressClassname field is supported -Usage: -{{ include "common.ingress.supportsIngressClassname" . }} -*/}} -{{- define "common.ingress.supportsIngressClassname" -}} -{{- if semverCompare "<1.18-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "false" -}} -{{- else -}} -{{- print "true" -}} -{{- 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") }} - {{- true -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_labels.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c7e..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_labels.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Kubernetes standard labels -*/}} -{{- define "common.labels.standard" -}} -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 }} -{{- end -}} - -{{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector -*/}} -{{- define "common.labels.matchLabels" -}} -app.kubernetes.io/name: {{ include "common.names.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_names.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_names.tpl deleted file mode 100644 index 1bdac8b77..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_names.tpl +++ /dev/null @@ -1,70 +0,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 -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $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" -}} -{{- if .Values.namespaceOverride -}} -{{- .Values.namespaceOverride -}} -{{- else -}} -{{- .Release.Namespace -}} -{{- end -}} -{{- 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/charts/gitlab/gitlab/charts/redis/charts/common/templates/_secrets.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_secrets.tpl deleted file mode 100644 index a53fb44f7..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_secrets.tpl +++ /dev/null @@ -1,140 +0,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/master/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/master/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" "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. - -The order in which this function returns a secret password: - 1. 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) - 2. Password provided via the values.yaml - (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) - 3. 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" $.context.Release.Namespace .secret).data }} -{{- if $secretData }} - {{- if hasKey $secretData .key }} - {{- $password = index $secretData .key }} - {{- else }} - {{- printf "\nPASSWORDS ERROR: The secret \"%s\" does not contain the key \"%s\"\n" .secret .key | fail -}} - {{- end -}} -{{- else if $providedPasswordValue }} - {{- $password = $providedPasswordValue | toString | b64enc | quote }} -{{- else }} - - {{- if .context.Values.enabled }} - {{- $subchart = $chartName }} - {{- end -}} - - {{- $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) -}} - - {{- 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 | b64enc | quote }} - {{- else }} - {{- $password = randAlphaNum $passwordLength | b64enc | quote }} - {{- end }} -{{- end -}} -{{- printf "%s" $password -}} -{{- 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" $.context.Release.Namespace .secret) }} -{{- if $secret }} - {{- true -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_storage.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a844f..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_storage.tpl +++ /dev/null @@ -1,23 +0,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 := .persistence.storageClass -}} -{{- if .global -}} - {{- if .global.storageClass -}} - {{- $storageClass = .global.storageClass -}} - {{- end -}} -{{- end -}} - -{{- if $storageClass -}} - {{- if (eq "-" $storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" $storageClass -}} - {{- end -}} -{{- end -}} - -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_tplvalues.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db166851..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_tplvalues.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Renders a value that contains template. -Usage: -{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }} -*/}} -{{- define "common.tplvalues.render" -}} - {{- if typeIs "string" .value }} - {{- tpl .value .context }} - {{- else }} - {{- tpl (.value | toYaml) .context }} - {{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_utils.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_utils.tpl deleted file mode 100644 index 8c22b2a38..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_utils.tpl +++ /dev/null @@ -1,62 +0,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 {{ .context.Release.Namespace | 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 -}} diff --git a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_warnings.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa41e..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/_warnings.tpl +++ /dev/null @@ -1,14 +0,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://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ -{{- end }} - -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_cassandra.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3bc..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_cassandra.tpl +++ /dev/null @@ -1,72 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Validate Cassandra required passwords are not empty. - -Usage: -{{ include "common.validations.values.cassandra.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where Cassandra values are stored, e.g: "cassandra-passwords-secret" - - subchart - Boolean - Optional. Whether Cassandra is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.cassandra.passwords" -}} - {{- $existingSecret := include "common.cassandra.values.existingSecret" . -}} - {{- $enabled := include "common.cassandra.values.enabled" . -}} - {{- $dbUserPrefix := include "common.cassandra.values.key.dbUser" . -}} - {{- $valueKeyPassword := printf "%s.password" $dbUserPrefix -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "cassandra-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - - {{- 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.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/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_mariadb.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff77..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_mariadb.tpl +++ /dev/null @@ -1,103 +0,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/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_mongodb.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec107..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_mongodb.tpl +++ /dev/null @@ -1,108 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Validate MongoDB® required passwords are not empty. - -Usage: -{{ include "common.validations.values.mongodb.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where MongoDB® values are stored, e.g: "mongodb-passwords-secret" - - subchart - Boolean - Optional. Whether MongoDB® is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.mongodb.passwords" -}} - {{- $existingSecret := include "common.mongodb.values.auth.existingSecret" . -}} - {{- $enabled := include "common.mongodb.values.enabled" . -}} - {{- $authPrefix := include "common.mongodb.values.key.auth" . -}} - {{- $architecture := include "common.mongodb.values.architecture" . -}} - {{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}} - {{- $valueKeyUsername := printf "%s.username" $authPrefix -}} - {{- $valueKeyDatabase := printf "%s.database" $authPrefix -}} - {{- $valueKeyPassword := printf "%s.password" $authPrefix -}} - {{- $valueKeyReplicaSetKey := printf "%s.replicaSetKey" $authPrefix -}} - {{- $valueKeyAuthEnabled := printf "%s.enabled" $authPrefix -}} - - {{- $authEnabled := include "common.utils.getValueFromKey" (dict "key" $valueKeyAuthEnabled "context" .context) -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") (eq $authEnabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mongodb-root-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}} - - {{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }} - {{- $valueDatabase := include "common.utils.getValueFromKey" (dict "key" $valueKeyDatabase "context" .context) }} - {{- if and $valueUsername $valueDatabase -}} - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mongodb-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - {{- end -}} - - {{- if (eq $architecture "replicaset") -}} - {{- $requiredReplicaSetKey := dict "valueKey" $valueKeyReplicaSetKey "secret" .secret "field" "mongodb-replica-set-key" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredReplicaSetKey -}} - {{- 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.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/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_mysql.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a061..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_mysql.tpl +++ /dev/null @@ -1,103 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Validate MySQL required passwords are not empty. - -Usage: -{{ include "common.validations.values.mysql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where MySQL values are stored, e.g: "mysql-passwords-secret" - - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.mysql.passwords" -}} - {{- $existingSecret := include "common.mysql.values.auth.existingSecret" . -}} - {{- $enabled := include "common.mysql.values.enabled" . -}} - {{- $architecture := include "common.mysql.values.architecture" . -}} - {{- $authPrefix := include "common.mysql.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" "mysql-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" "mysql-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - {{- end -}} - - {{- if (eq $architecture "replication") -}} - {{- $requiredReplicationPassword := dict "valueKey" $valueKeyReplicationPassword "secret" .secret "field" "mysql-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.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/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_postgresql.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d01..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_postgresql.tpl +++ /dev/null @@ -1,129 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Validate PostgreSQL required passwords are not empty. - -Usage: -{{ include "common.validations.values.postgresql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where postgresql values are stored, e.g: "postgresql-passwords-secret" - - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.postgresql.passwords" -}} - {{- $existingSecret := include "common.postgresql.values.existingSecret" . -}} - {{- $enabled := include "common.postgresql.values.enabled" . -}} - {{- $valueKeyPostgresqlPassword := include "common.postgresql.values.key.postgressPassword" . -}} - {{- $valueKeyPostgresqlReplicationEnabled := include "common.postgresql.values.key.replicationPassword" . -}} - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - {{- $requiredPostgresqlPassword := dict "valueKey" $valueKeyPostgresqlPassword "secret" .secret "field" "postgresql-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPostgresqlPassword -}} - - {{- $enabledReplication := include "common.postgresql.values.enabled.replication" . -}} - {{- if (eq $enabledReplication "true") -}} - {{- $requiredPostgresqlReplicationPassword := dict "valueKey" $valueKeyPostgresqlReplicationEnabled "secret" .secret "field" "postgresql-replication-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPostgresqlReplicationPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - {{- end -}} -{{- end -}} - -{{/* -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/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_redis.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1ae..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_redis.tpl +++ /dev/null @@ -1,76 +0,0 @@ - -{{/* vim: set filetype=mustache: */}} -{{/* -Validate Redis® required passwords are not empty. - -Usage: -{{ include "common.validations.values.redis.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where redis values are stored, e.g: "redis-passwords-secret" - - subchart - Boolean - Optional. Whether redis is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.redis.passwords" -}} - {{- $enabled := include "common.redis.values.enabled" . -}} - {{- $valueKeyPrefix := include "common.redis.values.keys.prefix" . -}} - {{- $standarizedVersion := include "common.redis.values.standarized.version" . }} - - {{- $existingSecret := ternary (printf "%s%s" $valueKeyPrefix "auth.existingSecret") (printf "%s%s" $valueKeyPrefix "existingSecret") (eq $standarizedVersion "true") }} - {{- $existingSecretValue := include "common.utils.getValueFromKey" (dict "key" $existingSecret "context" .context) }} - - {{- $valueKeyRedisPassword := ternary (printf "%s%s" $valueKeyPrefix "auth.password") (printf "%s%s" $valueKeyPrefix "password") (eq $standarizedVersion "true") }} - {{- $valueKeyRedisUseAuth := ternary (printf "%s%s" $valueKeyPrefix "auth.enabled") (printf "%s%s" $valueKeyPrefix "usePassword") (eq $standarizedVersion "true") }} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $useAuth := include "common.utils.getValueFromKey" (dict "key" $valueKeyRedisUseAuth "context" .context) -}} - {{- if eq $useAuth "true" -}} - {{- $requiredRedisPassword := dict "valueKey" $valueKeyRedisPassword "secret" .secret "field" "redis-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRedisPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - {{- end -}} -{{- end -}} - -{{/* -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/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_validations.tpl b/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf40..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/templates/validations/_validations.tpl +++ /dev/null @@ -1,46 +0,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/charts/gitlab/gitlab/charts/redis/charts/common/values.yaml b/charts/gitlab/gitlab/charts/redis/charts/common/values.yaml deleted file mode 100644 index f2df68e5e..000000000 --- a/charts/gitlab/gitlab/charts/redis/charts/common/values.yaml +++ /dev/null @@ -1,5 +0,0 @@ -## bitnami/common -## It is required by CI/CD tools and processes. -## @skip exampleValue -## -exampleValue: common-chart diff --git a/charts/gitlab/gitlab/charts/redis/img/redis-cluster-topology.png b/charts/gitlab/gitlab/charts/redis/img/redis-cluster-topology.png deleted file mode 100644 index f0a02a9f8..000000000 Binary files a/charts/gitlab/gitlab/charts/redis/img/redis-cluster-topology.png and /dev/null differ diff --git a/charts/gitlab/gitlab/charts/redis/img/redis-topology.png b/charts/gitlab/gitlab/charts/redis/img/redis-topology.png deleted file mode 100644 index 3f5280feb..000000000 Binary files a/charts/gitlab/gitlab/charts/redis/img/redis-topology.png and /dev/null differ diff --git a/charts/gitlab/gitlab/charts/redis/templates/NOTES.txt b/charts/gitlab/gitlab/charts/redis/templates/NOTES.txt deleted file mode 100644 index 2623ade3a..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/NOTES.txt +++ /dev/null @@ -1,191 +0,0 @@ -CHART NAME: {{ .Chart.Name }} -CHART VERSION: {{ .Chart.Version }} -APP VERSION: {{ .Chart.AppVersion }} - -** 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: - -For Redis: - - /opt/bitnami/scripts/redis/entrypoint.sh /opt/bitnami/scripts/redis/run.sh - -{{- if .Values.sentinel.enabled }} - -For Redis Sentinel: - - /opt/bitnami/scripts/redis-sentinel/entrypoint.sh /opt/bitnami/scripts/redis-sentinel/run.sh - -{{- end }} -{{- else }} - -{{- if contains .Values.master.service.type "LoadBalancer" }} -{{- if not .Values.auth.enabled }} -{{ if and (not .Values.networkPolicy.enabled) (.Values.networkPolicy.allowExternal) }} - -------------------------------------------------------------------------------- - WARNING - - By specifying "master.service.type=LoadBalancer" and "auth.enabled=false" you have - most likely exposed the Redis® service externally without any authentication - mechanism. - - For security reasons, we strongly suggest that you switch to "ClusterIP" or - "NodePort". As alternative, you can also switch to "auth.enabled=true" - providing a valid password on "password" parameter. - -------------------------------------------------------------------------------- -{{- end }} -{{- end }} -{{- end }} - -{{- if eq .Values.architecture "replication" }} -{{- if .Values.sentinel.enabled }} - -Redis® can be accessed via port {{ .Values.sentinel.service.ports.redis }} on the following DNS name from within your cluster: - - {{ template "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} for read only operations - -For read/write operations, first access the Redis® Sentinel cluster, which is available in port {{ .Values.sentinel.service.ports.sentinel }} using the same domain name above. - -{{- else }} - -Redis® can be accessed on the following DNS names from within your cluster: - - {{ printf "%s-master.%s.svc.%s" (include "common.names.fullname" .) .Release.Namespace .Values.clusterDomain }} for read/write operations (port {{ .Values.master.service.ports.redis }}) - {{ printf "%s-replicas.%s.svc.%s" (include "common.names.fullname" .) .Release.Namespace .Values.clusterDomain }} for read-only operations (port {{ .Values.replica.service.ports.redis }}) - -{{- end }} -{{- else }} - -Redis® can be accessed via port {{ .Values.master.service.ports.redis }} on the following DNS name from within your cluster: - - {{ template "common.names.fullname" . }}-master.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} - -{{- end }} - -{{ if .Values.auth.enabled }} - -To get your password run: - - export REDIS_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "redis.secretName" . }} -o jsonpath="{.data.redis-password}" | base64 -d) - -{{- end }} - -To connect to your Redis® server: - -1. Run a Redis® pod that you can use as a client: - - kubectl run --namespace {{ .Release.Namespace }} redis-client --restart='Never' {{ if .Values.auth.enabled }} --env REDIS_PASSWORD=$REDIS_PASSWORD {{ end }} --image {{ template "redis.image" . }} --command -- sleep infinity - -{{- if .Values.tls.enabled }} - - Copy your TLS certificates to the pod: - - kubectl cp --namespace {{ .Release.Namespace }} /path/to/client.cert redis-client:/tmp/client.cert - kubectl cp --namespace {{ .Release.Namespace }} /path/to/client.key redis-client:/tmp/client.key - kubectl cp --namespace {{ .Release.Namespace }} /path/to/CA.cert redis-client:/tmp/CA.cert - -{{- end }} - - Use the following command to attach to the pod: - - kubectl exec --tty -i redis-client \ - {{- if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}--labels="{{ template "common.names.fullname" . }}-client=true" \{{- end }} - --namespace {{ .Release.Namespace }} -- bash - -2. Connect using the Redis® CLI: - -{{- if eq .Values.architecture "replication" }} - {{- if .Values.sentinel.enabled }} - {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ template "common.names.fullname" . }} -p {{ .Values.sentinel.service.ports.redis }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} # Read only operations - {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ template "common.names.fullname" . }} -p {{ .Values.sentinel.service.ports.sentinel }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} # Sentinel access - {{- else }} - {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ printf "%s-master" (include "common.names.fullname" .) }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} - {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ printf "%s-replicas" (include "common.names.fullname" .) }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} - {{- end }} -{{- else }} - {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ template "common.names.fullname" . }}-master{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} -{{- end }} - -{{- if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }} - -Note: Since NetworkPolicy is enabled, only pods with label {{ template "common.names.fullname" . }}-client=true" will be able to connect to redis. - -{{- else }} - -To connect to your database from outside the cluster execute the following commands: - -{{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled }} -{{- if contains "NodePort" .Values.sentinel.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 {{ template "common.names.fullname" . }}) - {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $NODE_IP -p $NODE_PORT {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} - -{{- else if contains "LoadBalancer" .Values.sentinel.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 {{ template "common.names.fullname" . }}' - - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}") - {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $SERVICE_IP -p {{ .Values.sentinel.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} - -{{- else if contains "ClusterIP" .Values.sentinel.service.type }} - - kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "common.names.fullname" . }} {{ .Values.sentinel.service.ports.redis }}:{{ .Values.sentinel.service.ports.redis }} & - {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h 127.0.0.1 -p {{ .Values.sentinel.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} - -{{- end }} -{{- else }} -{{- if contains "NodePort" .Values.master.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 {{ printf "%s-master" (include "common.names.fullname" .) }}) - {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $NODE_IP -p $NODE_PORT {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} - -{{- else if contains "LoadBalancer" .Values.master.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 {{ template "common.names.fullname" . }}' - - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ printf "%s-master" (include "common.names.fullname" .) }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}") - {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $SERVICE_IP -p {{ .Values.master.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} - -{{- else if contains "ClusterIP" .Values.master.service.type }} - - kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ printf "%s-master" (include "common.names.fullname" .) }} {{ .Values.master.service.ports.redis }}:{{ .Values.master.service.ports.redis }} & - {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h 127.0.0.1 -p {{ .Values.master.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} - -{{- end }} -{{- end }} - -{{- end }} -{{- end }} -{{- include "redis.checkRollingTags" . }} -{{- include "common.warnings.rollingTag" .Values.volumePermissions.image }} -{{- include "common.warnings.rollingTag" .Values.sysctl.image }} -{{- include "redis.validateValues" . }} - -{{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled (eq .Values.sentinel.service.type "NodePort") (not .Release.IsUpgrade ) }} -{{- if $.Values.sentinel.service.nodePorts.sentinel }} -No need to upgrade, ports and nodeports have been set from values -{{- else }} -#!#!#!#!#!#!#!# IMPORTANT #!#!#!#!#!#!#!# -YOU NEED TO PERFORM AN UPGRADE FOR THE SERVICES AND WORKLOAD TO BE CREATED -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/redis/templates/_helpers.tpl deleted file mode 100644 index f6f47d9b7..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/_helpers.tpl +++ /dev/null @@ -1,291 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Return the proper Redis image name -*/}} -{{- define "redis.image" -}} -{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }} -{{- end -}} - -{{/* -Return the proper Redis Sentinel image name -*/}} -{{- define "redis.sentinel.image" -}} -{{ include "common.images.image" (dict "imageRoot" .Values.sentinel.image "global" .Values.global) }} -{{- end -}} - -{{/* -Return the proper image name (for the metrics image) -*/}} -{{- define "redis.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 "redis.volumePermissions.image" -}} -{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }} -{{- end -}} - -{{/* -Return sysctl image -*/}} -{{- define "redis.sysctl.image" -}} -{{ include "common.images.image" (dict "imageRoot" .Values.sysctl.image "global" .Values.global) }} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "redis.imagePullSecrets" -}} -{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.sentinel.image .Values.metrics.image .Values.volumePermissions.image .Values.sysctl.image) "global" .Values.global) -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for networkpolicy. -*/}} -{{- define "networkPolicy.apiVersion" -}} -{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "extensions/v1beta1" -}} -{{- else -}} -{{- print "networking.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiGroup for PodSecurityPolicy. -*/}} -{{- define "podSecurityPolicy.apiGroup" -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "policy" -}} -{{- else -}} -{{- print "extensions" -}} -{{- end -}} -{{- end -}} - -{{/* -Return true if a TLS secret object should be created -*/}} -{{- define "redis.createTlsSecret" -}} -{{- if and .Values.tls.enabled .Values.tls.autoGenerated (and (not .Values.tls.existingSecret) (not .Values.tls.certificatesSecret)) }} - {{- true -}} -{{- end -}} -{{- end -}} - -{{/* -Return the secret containing Redis TLS certificates -*/}} -{{- define "redis.tlsSecretName" -}} -{{- $secretName := coalesce .Values.tls.existingSecret .Values.tls.certificatesSecret -}} -{{- if $secretName -}} - {{- printf "%s" (tpl $secretName $) -}} -{{- else -}} - {{- printf "%s-crt" (include "common.names.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Return the path to the cert file. -*/}} -{{- define "redis.tlsCert" -}} -{{- if (include "redis.createTlsSecret" . ) -}} - {{- printf "/opt/bitnami/redis/certs/%s" "tls.crt" -}} -{{- else -}} - {{- required "Certificate filename is required when TLS in enabled" .Values.tls.certFilename | printf "/opt/bitnami/redis/certs/%s" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the path to the cert key file. -*/}} -{{- define "redis.tlsCertKey" -}} -{{- if (include "redis.createTlsSecret" . ) -}} - {{- printf "/opt/bitnami/redis/certs/%s" "tls.key" -}} -{{- else -}} - {{- required "Certificate Key filename is required when TLS in enabled" .Values.tls.certKeyFilename | printf "/opt/bitnami/redis/certs/%s" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the path to the CA cert file. -*/}} -{{- define "redis.tlsCACert" -}} -{{- if (include "redis.createTlsSecret" . ) -}} - {{- printf "/opt/bitnami/redis/certs/%s" "ca.crt" -}} -{{- else -}} - {{- required "Certificate CA filename is required when TLS in enabled" .Values.tls.certCAFilename | printf "/opt/bitnami/redis/certs/%s" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the path to the DH params file. -*/}} -{{- define "redis.tlsDHParams" -}} -{{- if .Values.tls.dhParamsFilename -}} -{{- printf "/opt/bitnami/redis/certs/%s" .Values.tls.dhParamsFilename -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "redis.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the configuration configmap name -*/}} -{{- define "redis.configmapName" -}} -{{- if .Values.existingConfigmap -}} - {{- printf "%s" (tpl .Values.existingConfigmap $) -}} -{{- else -}} - {{- printf "%s-configuration" (include "common.names.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Return true if a configmap object should be created -*/}} -{{- define "redis.createConfigmap" -}} -{{- if empty .Values.existingConfigmap }} - {{- true -}} -{{- end -}} -{{- end -}} - -{{/* -Get the password secret. -*/}} -{{- define "redis.secretName" -}} -{{- if .Values.auth.existingSecret -}} -{{- printf "%s" .Values.auth.existingSecret -}} -{{- else -}} -{{- printf "%s" (include "common.names.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Get the password key to be retrieved from Redis® secret. -*/}} -{{- define "redis.secretPasswordKey" -}} -{{- if and .Values.auth.existingSecret .Values.auth.existingSecretPasswordKey -}} -{{- printf "%s" .Values.auth.existingSecretPasswordKey -}} -{{- else -}} -{{- printf "redis-password" -}} -{{- end -}} -{{- end -}} - - -{{/* -Returns the available value for certain key in an existing secret (if it exists), -otherwise it generates a random value. -*/}} -{{- define "getValueFromSecret" }} - {{- $len := (default 16 .Length) | int -}} - {{- $obj := (lookup "v1" "Secret" .Namespace .Name).data -}} - {{- if $obj }} - {{- index $obj .Key | b64dec -}} - {{- else -}} - {{- randAlphaNum $len -}} - {{- end -}} -{{- end }} - -{{/* -Return Redis® password -*/}} -{{- define "redis.password" -}} -{{- if not (empty .Values.global.redis.password) }} - {{- .Values.global.redis.password -}} -{{- else if not (empty .Values.auth.password) -}} - {{- .Values.auth.password -}} -{{- else -}} - {{- include "getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "common.names.fullname" .) "Length" 10 "Key" "redis-password") -}} -{{- end -}} -{{- end -}} - -{{/* Check if there are rolling tags in the images */}} -{{- define "redis.checkRollingTags" -}} -{{- include "common.warnings.rollingTag" .Values.image }} -{{- include "common.warnings.rollingTag" .Values.sentinel.image }} -{{- include "common.warnings.rollingTag" .Values.metrics.image }} -{{- end -}} - -{{/* -Compile all warnings into a single message, and call fail. -*/}} -{{- define "redis.validateValues" -}} -{{- $messages := list -}} -{{- $messages := append $messages (include "redis.validateValues.topologySpreadConstraints" .) -}} -{{- $messages := append $messages (include "redis.validateValues.architecture" .) -}} -{{- $messages := append $messages (include "redis.validateValues.podSecurityPolicy.create" .) -}} -{{- $messages := append $messages (include "redis.validateValues.tls" .) -}} -{{- $messages := without $messages "" -}} -{{- $message := join "\n" $messages -}} - -{{- if $message -}} -{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}} -{{- end -}} -{{- end -}} - -{{/* Validate values of Redis® - spreadConstrainsts K8s version */}} -{{- define "redis.validateValues.topologySpreadConstraints" -}} -{{- if and (semverCompare "<1.16-0" .Capabilities.KubeVersion.GitVersion) .Values.replica.topologySpreadConstraints -}} -redis: topologySpreadConstraints - Pod Topology Spread Constraints are only available on K8s >= 1.16 - Find more information at https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ -{{- end -}} -{{- end -}} - -{{/* Validate values of Redis® - must provide a valid architecture */}} -{{- define "redis.validateValues.architecture" -}} -{{- if and (ne .Values.architecture "standalone") (ne .Values.architecture "replication") -}} -redis: architecture - Invalid architecture selected. Valid values are "standalone" and - "replication". Please set a valid architecture (--set architecture="xxxx") -{{- end -}} -{{- if and .Values.sentinel.enabled (not (eq .Values.architecture "replication")) }} -redis: architecture - Using redis sentinel on standalone mode is not supported. - To deploy redis sentinel, please select the "replication" mode - (--set "architecture=replication,sentinel.enabled=true") -{{- end -}} -{{- end -}} - -{{/* Validate values of Redis® - PodSecurityPolicy create */}} -{{- define "redis.validateValues.podSecurityPolicy.create" -}} -{{- if and .Values.podSecurityPolicy.create (not .Values.podSecurityPolicy.enabled) }} -redis: podSecurityPolicy.create - In order to create PodSecurityPolicy, you also need to enable - podSecurityPolicy.enabled field -{{- end -}} -{{- end -}} - -{{/* Validate values of Redis® - TLS enabled */}} -{{- define "redis.validateValues.tls" -}} -{{- if and .Values.tls.enabled (not .Values.tls.autoGenerated) (not .Values.tls.existingSecret) (not .Values.tls.certificatesSecret) }} -redis: tls.enabled - In order to enable TLS, you also need to provide - an existing secret containing the TLS certificates or - enable auto-generated certificates. -{{- end -}} -{{- end -}} - -{{/* Define the suffix utilized for external-dns */}} -{{- define "redis.externalDNS.suffix" -}} -{{ printf "%s.%s" (include "common.names.fullname" .) .Values.useExternalDNS.suffix }} -{{- end -}} - -{{/* Compile all annotations utilized for external-dns */}} -{{- define "redis.externalDNS.annotations" -}} -{{- if .Values.useExternalDNS.enabled }} -{{ .Values.useExternalDNS.annotationKey }}hostname: {{ include "redis.externalDNS.suffix" . }} -{{- range $key, $val := .Values.useExternalDNS.additionalAnnotations }} -{{ $.Values.useExternalDNS.annotationKey }}{{ $key }}: {{ $val | quote }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/configmap.yaml b/charts/gitlab/gitlab/charts/redis/templates/configmap.yaml deleted file mode 100644 index 9e70a3873..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/configmap.yaml +++ /dev/null @@ -1,59 +0,0 @@ -{{- if (include "redis.createConfigmap" .) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ printf "%s-configuration" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -data: - redis.conf: |- - # User-supplied common configuration: - {{- if .Values.commonConfiguration }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonConfiguration "context" $ ) | nindent 4 }} - {{- end }} - # End of common configuration - master.conf: |- - dir {{ .Values.master.persistence.path }} - # User-supplied master configuration: - {{- if .Values.master.configuration }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.configuration "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.master.disableCommands }} - {{- range .Values.master.disableCommands }} - rename-command {{ . }} "" - {{- end }} - {{- end }} - # End of master configuration - replica.conf: |- - dir {{ .Values.replica.persistence.path }} - # User-supplied replica configuration: - {{- if .Values.replica.configuration }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.configuration "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.replica.disableCommands }} - {{- range .Values.replica.disableCommands }} - rename-command {{ . }} "" - {{- end }} - {{- end }} - # End of replica configuration - {{- if .Values.sentinel.enabled }} - sentinel.conf: |- - dir "/tmp" - port {{ .Values.sentinel.containerPorts.sentinel }} - sentinel monitor {{ .Values.sentinel.masterSet }} {{ template "common.names.fullname" . }}-node-0.{{ template "common.names.fullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} {{ .Values.sentinel.service.ports.redis }} {{ .Values.sentinel.quorum }} - sentinel down-after-milliseconds {{ .Values.sentinel.masterSet }} {{ .Values.sentinel.downAfterMilliseconds }} - sentinel failover-timeout {{ .Values.sentinel.masterSet }} {{ .Values.sentinel.failoverTimeout }} - sentinel parallel-syncs {{ .Values.sentinel.masterSet }} {{ .Values.sentinel.parallelSyncs }} - # User-supplied sentinel configuration: - {{- if .Values.sentinel.configuration }} - {{- include "common.tplvalues.render" ( dict "value" .Values.sentinel.configuration "context" $ ) | nindent 4 }} - {{- end }} - # End of sentinel configuration - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/extra-list.yaml b/charts/gitlab/gitlab/charts/redis/templates/extra-list.yaml deleted file mode 100644 index 9ac65f9e1..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/extra-list.yaml +++ /dev/null @@ -1,4 +0,0 @@ -{{- range .Values.extraDeploy }} ---- -{{ include "common.tplvalues.render" (dict "value" . "context" $) }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/headless-svc.yaml b/charts/gitlab/gitlab/charts/redis/templates/headless-svc.yaml deleted file mode 100644 index d798a0b5a..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/headless-svc.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ printf "%s-headless" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- include "redis.externalDNS.annotations" . | nindent 4 }} -spec: - type: ClusterIP - clusterIP: None - {{- if .Values.sentinel.enabled }} - publishNotReadyAddresses: true - {{- end }} - ports: - - name: tcp-redis - port: {{ if .Values.sentinel.enabled }}{{ .Values.sentinel.service.ports.redis }}{{ else }}{{ .Values.master.service.ports.redis }}{{ end }} - targetPort: redis - {{- if .Values.sentinel.enabled }} - - name: tcp-sentinel - port: {{ .Values.sentinel.service.ports.sentinel }} - targetPort: redis-sentinel - {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/health-configmap.yaml b/charts/gitlab/gitlab/charts/redis/templates/health-configmap.yaml deleted file mode 100644 index 41f3145d3..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/health-configmap.yaml +++ /dev/null @@ -1,192 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ printf "%s-health" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -data: - ping_readiness_local.sh: |- - #!/bin/bash - - [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")" - [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD" - response=$( - timeout -s 3 $1 \ - redis-cli \ - -h localhost \ -{{- if .Values.tls.enabled }} - -p $REDIS_TLS_PORT \ - --tls \ - --cacert {{ template "redis.tlsCACert" . }} \ - {{- if .Values.tls.authClients }} - --cert {{ template "redis.tlsCert" . }} \ - --key {{ template "redis.tlsCertKey" . }} \ - {{- end }} -{{- else }} - -p $REDIS_PORT \ -{{- end }} - ping - ) - if [ "$?" -eq "124" ]; then - echo "Timed out" - exit 1 - fi - if [ "$response" != "PONG" ]; then - echo "$response" - exit 1 - fi - ping_liveness_local.sh: |- - #!/bin/bash - - [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")" - [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD" - response=$( - timeout -s 3 $1 \ - redis-cli \ - -h localhost \ -{{- if .Values.tls.enabled }} - -p $REDIS_TLS_PORT \ - --tls \ - --cacert {{ template "redis.tlsCACert" . }} \ - {{- if .Values.tls.authClients }} - --cert {{ template "redis.tlsCert" . }} \ - --key {{ template "redis.tlsCertKey" . }} \ - {{- end }} -{{- else }} - -p $REDIS_PORT \ -{{- end }} - ping - ) - if [ "$?" -eq "124" ]; then - echo "Timed out" - exit 1 - fi - responseFirstWord=$(echo $response | head -n1 | awk '{print $1;}') - if [ "$response" != "PONG" ] && [ "$responseFirstWord" != "LOADING" ] && [ "$responseFirstWord" != "MASTERDOWN" ]; then - echo "$response" - exit 1 - fi -{{- if .Values.sentinel.enabled }} - ping_sentinel.sh: |- - #!/bin/bash - -{{- if .Values.auth.sentinel }} - [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")" - [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD" -{{- end }} - response=$( - timeout -s 3 $1 \ - redis-cli \ - -h localhost \ -{{- if .Values.tls.enabled }} - -p $REDIS_SENTINEL_TLS_PORT_NUMBER \ - --tls \ - --cacert "$REDIS_SENTINEL_TLS_CA_FILE" \ - {{- if .Values.tls.authClients }} - --cert "$REDIS_SENTINEL_TLS_CERT_FILE" \ - --key "$REDIS_SENTINEL_TLS_KEY_FILE" \ - {{- end }} -{{- else }} - -p $REDIS_SENTINEL_PORT \ -{{- end }} - ping - ) - if [ "$?" -eq "124" ]; then - echo "Timed out" - exit 1 - fi - if [ "$response" != "PONG" ]; then - echo "$response" - exit 1 - fi - parse_sentinels.awk: |- - /ip/ {FOUND_IP=1} - /port/ {FOUND_PORT=1} - /runid/ {FOUND_RUNID=1} - !/ip|port|runid/ { - if (FOUND_IP==1) { - IP=$1; FOUND_IP=0; - } - else if (FOUND_PORT==1) { - PORT=$1; - FOUND_PORT=0; - } else if (FOUND_RUNID==1) { - printf "\nsentinel known-sentinel {{ .Values.sentinel.masterSet }} %s %s %s", IP, PORT, $0; FOUND_RUNID=0; - } - } -{{- end }} - ping_readiness_master.sh: |- - #!/bin/bash - - [[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")" - [[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD" - response=$( - timeout -s 3 $1 \ - redis-cli \ - -h $REDIS_MASTER_HOST \ - -p $REDIS_MASTER_PORT_NUMBER \ -{{- if .Values.tls.enabled }} - --tls \ - --cacert {{ template "redis.tlsCACert" . }} \ - {{- if .Values.tls.authClients }} - --cert {{ template "redis.tlsCert" . }} \ - --key {{ template "redis.tlsCertKey" . }} \ - {{- end }} -{{- end }} - ping - ) - if [ "$?" -eq "124" ]; then - echo "Timed out" - exit 1 - fi - if [ "$response" != "PONG" ]; then - echo "$response" - exit 1 - fi - ping_liveness_master.sh: |- - #!/bin/bash - - [[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")" - [[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD" - response=$( - timeout -s 3 $1 \ - redis-cli \ - -h $REDIS_MASTER_HOST \ - -p $REDIS_MASTER_PORT_NUMBER \ -{{- if .Values.tls.enabled }} - --tls \ - --cacert {{ template "redis.tlsCACert" . }} \ - {{- if .Values.tls.authClients }} - --cert {{ template "redis.tlsCert" . }} \ - --key {{ template "redis.tlsCertKey" . }} \ - {{- end }} -{{- end }} - ping - ) - if [ "$?" -eq "124" ]; then - echo "Timed out" - exit 1 - fi - responseFirstWord=$(echo $response | head -n1 | awk '{print $1;}') - if [ "$response" != "PONG" ] && [ "$responseFirstWord" != "LOADING" ]; then - echo "$response" - exit 1 - fi - ping_readiness_local_and_master.sh: |- - script_dir="$(dirname "$0")" - exit_status=0 - "$script_dir/ping_readiness_local.sh" $1 || exit_status=$? - "$script_dir/ping_readiness_master.sh" $1 || exit_status=$? - exit $exit_status - ping_liveness_local_and_master.sh: |- - script_dir="$(dirname "$0")" - exit_status=0 - "$script_dir/ping_liveness_local.sh" $1 || exit_status=$? - "$script_dir/ping_liveness_master.sh" $1 || exit_status=$? - exit $exit_status diff --git a/charts/gitlab/gitlab/charts/redis/templates/master/application.yaml b/charts/gitlab/gitlab/charts/redis/templates/master/application.yaml deleted file mode 100644 index 85d584762..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/master/application.yaml +++ /dev/null @@ -1,473 +0,0 @@ -{{- if or (not (eq .Values.architecture "replication")) (not .Values.sentinel.enabled) }} -apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }} -kind: {{ .Values.master.kind }} -metadata: - name: {{ printf "%s-master" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: master - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.master.count }} - selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: master - {{- if (eq .Values.master.kind "StatefulSet") }} - serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) }} - {{- end }} - {{- if .Values.master.updateStrategy }} - {{- if (eq .Values.master.kind "Deployment") }} - strategy: {{- toYaml .Values.master.updateStrategy | nindent 4 }} - {{- else }} - updateStrategy: {{- toYaml .Values.master.updateStrategy | nindent 4 }} - {{- end }} - {{- end }} - template: - metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} - app.kubernetes.io/component: master - {{- if .Values.master.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.podLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if and .Values.metrics.enabled .Values.metrics.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podLabels "context" $ ) | nindent 8 }} - {{- end }} - annotations: - {{- if (include "redis.createConfigmap" .) }} - checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- end }} - checksum/health: {{ include (print $.Template.BasePath "/health-configmap.yaml") . | sha256sum }} - checksum/scripts: {{ include (print $.Template.BasePath "/scripts-configmap.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- if .Values.master.podAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.podAnnotations "context" $ ) | nindent 8 }} - {{- end }} - {{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podAnnotations "context" $ ) | nindent 8 }} - {{- end }} - spec: - {{- include "redis.imagePullSecrets" . | nindent 6 }} - {{- if .Values.master.hostAliases }} - hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.master.hostAliases "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.master.podSecurityContext.enabled }} - securityContext: {{- omit .Values.master.podSecurityContext "enabled" | toYaml | nindent 8 }} - {{- end }} - serviceAccountName: {{ template "redis.serviceAccountName" . }} - {{- if .Values.master.priorityClassName }} - priorityClassName: {{ .Values.master.priorityClassName | quote }} - {{- end }} - {{- if .Values.master.affinity }} - affinity: {{- include "common.tplvalues.render" (dict "value" .Values.master.affinity "context" $) | nindent 8 }} - {{- else }} - affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAffinityPreset "component" "master" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAntiAffinityPreset "component" "master" "context" $) | nindent 10 }} - nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.master.nodeAffinityPreset.type "key" .Values.master.nodeAffinityPreset.key "values" .Values.master.nodeAffinityPreset.values) | nindent 10 }} - {{- end }} - {{- if .Values.master.nodeSelector }} - nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.master.nodeSelector "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.master.tolerations }} - tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.master.tolerations "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.master.topologySpreadConstraints }} - topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.master.topologySpreadConstraints "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.master.shareProcessNamespace }} - shareProcessNamespace: {{ .Values.master.shareProcessNamespace }} - {{- end }} - {{- if .Values.master.schedulerName }} - schedulerName: {{ .Values.master.schedulerName | quote }} - {{- end }} - {{- if .Values.master.dnsPolicy }} - dnsPolicy: {{ .Values.master.dnsPolicy }} - {{- end }} - {{- if .Values.master.dnsConfig }} - dnsConfig: {{- include "common.tplvalues.render" (dict "value" .Values.master.dnsConfig "context" $) | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: {{ .Values.master.terminationGracePeriodSeconds }} - containers: - - name: redis - image: {{ template "redis.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - {{- if .Values.master.lifecycleHooks }} - lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.master.lifecycleHooks "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.master.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.master.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} - {{- else if .Values.master.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.master.command "context" $) | nindent 12 }} - {{- else }} - command: - - /bin/bash - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} - {{- else if .Values.master.args }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.master.args "context" $) | nindent 12 }} - {{- else }} - args: - - -c - - /opt/bitnami/scripts/start-scripts/start-master.sh - {{- end }} - env: - - name: BITNAMI_DEBUG - value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }} - - name: REDIS_REPLICATION_MODE - value: master - - name: ALLOW_EMPTY_PASSWORD - value: {{ ternary "no" "yes" .Values.auth.enabled | quote }} - {{- if .Values.auth.enabled }} - {{- if .Values.auth.usePasswordFiles }} - - name: REDIS_PASSWORD_FILE - value: "/opt/bitnami/redis/secrets/redis-password" - {{- else }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: {{ template "redis.secretPasswordKey" . }} - {{- end }} - {{- end }} - - name: REDIS_TLS_ENABLED - value: {{ ternary "yes" "no" .Values.tls.enabled | quote }} - {{- if .Values.tls.enabled }} - - name: REDIS_TLS_PORT - value: {{ .Values.master.containerPorts.redis | quote }} - - name: REDIS_TLS_AUTH_CLIENTS - value: {{ ternary "yes" "no" .Values.tls.authClients | quote }} - - name: REDIS_TLS_CERT_FILE - value: {{ template "redis.tlsCert" . }} - - name: REDIS_TLS_KEY_FILE - value: {{ template "redis.tlsCertKey" . }} - - name: REDIS_TLS_CA_FILE - value: {{ template "redis.tlsCACert" . }} - {{- if .Values.tls.dhParamsFilename }} - - name: REDIS_TLS_DH_PARAMS_FILE - value: {{ template "redis.tlsDHParams" . }} - {{- end }} - {{- else }} - - name: REDIS_PORT - value: {{ .Values.master.containerPorts.redis | quote }} - {{- end }} - {{- if .Values.master.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.master.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} - envFrom: - {{- if .Values.master.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.master.extraEnvVarsCM }} - {{- end }} - {{- if .Values.master.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.master.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: redis - containerPort: {{ .Values.master.containerPorts.redis }} - {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.master.startupProbe.enabled }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.master.startupProbe "enabled") "context" $) | nindent 12 }} - tcpSocket: - port: redis - {{- else if .Values.master.customStartupProbe }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.master.customStartupProbe "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.master.livenessProbe.enabled }} - livenessProbe: - initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} - # One second longer than command timeout should prevent generation of zombie processes. - timeoutSeconds: {{ add1 .Values.master.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_liveness_local.sh {{ .Values.master.livenessProbe.timeoutSeconds }} - {{- else if .Values.master.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.master.customLivenessProbe "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.master.readinessProbe.enabled }} - readinessProbe: - initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} - timeoutSeconds: {{ add1 .Values.master.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_readiness_local.sh {{ .Values.master.readinessProbe.timeoutSeconds }} - {{- else if .Values.master.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.master.customReadinessProbe "context" $) | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.master.resources }} - resources: {{- toYaml .Values.master.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: start-scripts - mountPath: /opt/bitnami/scripts/start-scripts - - name: health - mountPath: /health - {{- if .Values.auth.usePasswordFiles }} - - name: redis-password - mountPath: /opt/bitnami/redis/secrets/ - {{- end }} - - name: redis-data - mountPath: {{ .Values.master.persistence.path }} - subPath: {{ .Values.master.persistence.subPath }} - - name: config - mountPath: /opt/bitnami/redis/mounted-etc - - name: redis-tmp-conf - mountPath: /opt/bitnami/redis/etc/ - - name: tmp - mountPath: /tmp - {{- if .Values.tls.enabled }} - - name: redis-certificates - mountPath: /opt/bitnami/redis/certs - readOnly: true - {{- end }} - {{- if .Values.master.extraVolumeMounts }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.extraVolumeMounts "context" $ ) | nindent 12 }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ include "redis.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - {{- if .Values.metrics.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.metrics.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} - {{- else }} - command: - - /bin/bash - - -c - - | - if [[ -f '/secrets/redis-password' ]]; then - export REDIS_PASSWORD=$(cat /secrets/redis-password) - fi - redis_exporter{{- range $key, $value := .Values.metrics.extraArgs }} --{{ $key }}={{ $value }}{{- end }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} - {{- end }} - env: - - name: REDIS_ALIAS - value: {{ template "common.names.fullname" . }} - {{- if .Values.auth.enabled }} - - name: REDIS_USER - value: default - {{- if (not .Values.auth.usePasswordFiles) }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: {{ template "redis.secretPasswordKey" . }} - {{- end }} - {{- end }} - {{- if .Values.tls.enabled }} - - name: REDIS_ADDR - value: rediss://{{ .Values.metrics.redisTargetHost }}:{{ .Values.master.containerPorts.redis }} - {{- if .Values.tls.authClients }} - - name: REDIS_EXPORTER_TLS_CLIENT_KEY_FILE - value: {{ template "redis.tlsCertKey" . }} - - name: REDIS_EXPORTER_TLS_CLIENT_CERT_FILE - value: {{ template "redis.tlsCert" . }} - {{- end }} - - name: REDIS_EXPORTER_TLS_CA_CERT_FILE - value: {{ template "redis.tlsCACert" . }} - {{- end }} - {{- if .Values.metrics.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - ports: - - name: metrics - containerPort: 9121 - {{- if .Values.metrics.resources }} - resources: {{- toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - volumeMounts: - {{- if .Values.auth.usePasswordFiles }} - - name: redis-password - mountPath: /secrets/ - {{- end }} - {{- if .Values.tls.enabled }} - - name: redis-certificates - mountPath: /opt/bitnami/redis/certs - readOnly: true - {{- end }} - {{- if .Values.metrics.extraVolumeMounts }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumeMounts "context" $ ) | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.master.sidecars }} - {{- include "common.tplvalues.render" (dict "value" .Values.master.sidecars "context" $) | nindent 8 }} - {{- end }} - {{- $needsVolumePermissions := and .Values.volumePermissions.enabled .Values.master.persistence.enabled .Values.master.podSecurityContext.enabled .Values.master.containerSecurityContext.enabled }} - {{- if or .Values.master.initContainers $needsVolumePermissions .Values.sysctl.enabled }} - initContainers: - {{- if .Values.master.initContainers }} - {{- include "common.tplvalues.render" (dict "value" .Values.master.initContainers "context" $) | nindent 8 }} - {{- end }} - {{- if $needsVolumePermissions }} - - name: volume-permissions - image: {{ include "redis.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: - - /bin/bash - - -ec - - | - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - chown -R `id -u`:`id -G | cut -d " " -f2` {{ .Values.master.persistence.path }} - {{- else }} - chown -R {{ .Values.master.containerSecurityContext.runAsUser }}:{{ .Values.master.podSecurityContext.fsGroup }} {{ .Values.master.persistence.path }} - {{- end }} - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - securityContext: {{- omit .Values.volumePermissions.containerSecurityContext "runAsUser" | toYaml | nindent 12 }} - {{- else }} - securityContext: {{- .Values.volumePermissions.containerSecurityContext | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.volumePermissions.resources }} - resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: redis-data - mountPath: {{ .Values.master.persistence.path }} - subPath: {{ .Values.master.persistence.subPath }} - {{- end }} - {{- if .Values.sysctl.enabled }} - - name: init-sysctl - image: {{ include "redis.sysctl.image" . }} - imagePullPolicy: {{ default "" .Values.sysctl.image.pullPolicy | quote }} - securityContext: - privileged: true - runAsUser: 0 - {{- if .Values.sysctl.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.sysctl.command "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.sysctl.resources }} - resources: {{- toYaml .Values.sysctl.resources | nindent 12 }} - {{- end }} - {{- if .Values.sysctl.mountHostSys }} - volumeMounts: - - name: host-sys - mountPath: /host-sys - {{- end }} - {{- end }} - {{- end }} - volumes: - - name: start-scripts - configMap: - name: {{ printf "%s-scripts" (include "common.names.fullname" .) }} - defaultMode: 0755 - - name: health - configMap: - name: {{ printf "%s-health" (include "common.names.fullname" .) }} - defaultMode: 0755 - {{- if .Values.auth.usePasswordFiles }} - - name: redis-password - secret: - secretName: {{ template "redis.secretName" . }} - items: - - key: {{ template "redis.secretPasswordKey" . }} - path: redis-password - {{- end }} - - name: config - configMap: - name: {{ include "redis.configmapName" . }} - {{- if .Values.sysctl.mountHostSys }} - - name: host-sys - hostPath: - path: /sys - {{- end }} - - name: redis-tmp-conf - {{- if .Values.master.persistence.medium }} - emptyDir: - medium: {{ .Values.master.persistence.medium | quote }} - {{- if .Values.master.persistence.sizeLimit }} - sizeLimit: {{ .Values.master.persistence.sizeLimit | quote }} - {{- end }} - {{- else }} - emptyDir: {} - {{- end }} - - name: tmp - {{- if .Values.master.persistence.medium }} - emptyDir: - medium: {{ .Values.master.persistence.medium | quote }} - {{- if .Values.master.persistence.sizeLimit }} - sizeLimit: {{ .Values.master.persistence.sizeLimit | quote }} - {{- end }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.tls.enabled }} - - name: redis-certificates - secret: - secretName: {{ include "redis.tlsSecretName" . }} - defaultMode: 256 - {{- end }} - {{- if .Values.master.extraVolumes }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.extraVolumes "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.metrics.extraVolumes }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumes "context" $ ) | nindent 8 }} - {{- end }} - {{- if not .Values.master.persistence.enabled }} - - name: redis-data - {{- if .Values.master.persistence.medium }} - emptyDir: { - medium: {{ .Values.master.persistence.medium | quote }} - } - {{- else }} - emptyDir: {} - {{- end }} - {{- else if .Values.master.persistence.existingClaim }} - - name: redis-data - persistentVolumeClaim: - claimName: {{ printf "%s" (tpl .Values.master.persistence.existingClaim .) }} - {{- else if (eq .Values.master.kind "Deployment") }} - - name: redis-data - persistentVolumeClaim: - claimName: {{ printf "redis-data-%s-master" (include "common.names.fullname" .) }} - {{- else }} - volumeClaimTemplates: - - metadata: - name: redis-data - labels: {{- include "common.labels.matchLabels" . | nindent 10 }} - app.kubernetes.io/component: master - {{- if .Values.master.persistence.annotations }} - annotations: {{- toYaml .Values.master.persistence.annotations | nindent 10 }} - {{- end }} - spec: - accessModes: - {{- range .Values.master.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.master.persistence.size | quote }} - {{- if .Values.master.persistence.selector }} - selector: {{- include "common.tplvalues.render" (dict "value" .Values.master.persistence.selector "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.master.persistence.dataSource }} - dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.master.persistence.dataSource "context" $) | nindent 10 }} - {{- end }} - {{- include "common.storage.class" (dict "persistence" .Values.master.persistence "global" .Values.global) | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/master/psp.yaml b/charts/gitlab/gitlab/charts/redis/templates/master/psp.yaml deleted file mode 100644 index 2ba93b6e1..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/master/psp.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{{- $pspAvailable := (semverCompare "<1.25-0" (include "common.capabilities.kubeVersion" .)) -}} -{{- if and $pspAvailable .Values.podSecurityPolicy.create }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ printf "%s-master" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - allowPrivilegeEscalation: false - fsGroup: - rule: 'MustRunAs' - ranges: - - min: {{ .Values.master.podSecurityContext.fsGroup }} - max: {{ .Values.master.podSecurityContext.fsGroup }} - hostIPC: false - hostNetwork: false - hostPID: false - privileged: false - readOnlyRootFilesystem: false - requiredDropCapabilities: - - ALL - runAsUser: - rule: 'MustRunAs' - ranges: - - min: {{ .Values.master.containerSecurityContext.runAsUser }} - max: {{ .Values.master.containerSecurityContext.runAsUser }} - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: {{ .Values.master.containerSecurityContext.runAsUser }} - max: {{ .Values.master.containerSecurityContext.runAsUser }} - volumes: - - 'configMap' - - 'secret' - - 'emptyDir' - - 'persistentVolumeClaim' -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/master/pvc.yaml b/charts/gitlab/gitlab/charts/redis/templates/master/pvc.yaml deleted file mode 100644 index e5fddb034..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/master/pvc.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and (eq .Values.architecture "standalone") (eq .Values.master.kind "Deployment") (.Values.master.persistence.enabled) (not .Values.master.persistence.existingClaim) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ printf "redis-data-%s-master" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: master - {{- if .Values.master.persistence.annotations }} - annotations: {{- toYaml .Values.master.persistence.annotations | nindent 4 }} - {{- end }} -spec: - accessModes: - {{- range .Values.master.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.master.persistence.size | quote }} - {{- if .Values.master.persistence.selector }} - selector: {{- include "common.tplvalues.render" (dict "value" .Values.master.persistence.selector "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.master.persistence.dataSource }} - dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.master.persistence.dataSource "context" $) | nindent 4 }} - {{- end }} - {{- include "common.storage.class" (dict "persistence" .Values.master.persistence "global" .Values.global) | nindent 2 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/master/service.yaml b/charts/gitlab/gitlab/charts/redis/templates/master/service.yaml deleted file mode 100644 index 92b513aa8..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/master/service.yaml +++ /dev/null @@ -1,58 +0,0 @@ -{{- if not .Values.sentinel.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ printf "%s-master" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: master - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.master.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.master.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} -spec: - type: {{ .Values.master.service.type }} - {{- if or (eq .Values.master.service.type "LoadBalancer") (eq .Values.master.service.type "NodePort") }} - externalTrafficPolicy: {{ .Values.master.service.externalTrafficPolicy | quote }} - {{- end }} - {{- if (semverCompare ">=1.22-0" (include "common.capabilities.kubeVersion" .)) }} - internalTrafficPolicy: {{ .Values.master.service.internalTrafficPolicy }} - {{- end }} - {{- if and (eq .Values.master.service.type "LoadBalancer") (not (empty .Values.master.service.loadBalancerIP)) }} - loadBalancerIP: {{ .Values.master.service.loadBalancerIP }} - {{- end }} - {{- if and (eq .Values.master.service.type "LoadBalancer") (not (empty .Values.master.service.loadBalancerSourceRanges)) }} - loadBalancerSourceRanges: {{ .Values.master.service.loadBalancerSourceRanges }} - {{- end }} - {{- if and .Values.master.service.clusterIP (eq .Values.master.service.type "ClusterIP") }} - clusterIP: {{ .Values.master.service.clusterIP }} - {{- end }} - {{- if .Values.master.service.sessionAffinity }} - sessionAffinity: {{ .Values.master.service.sessionAffinity }} - {{- end }} - {{- if .Values.master.service.sessionAffinityConfig }} - sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.master.service.sessionAffinityConfig "context" $) | nindent 4 }} - {{- end }} - ports: - - name: tcp-redis - port: {{ .Values.master.service.ports.redis }} - targetPort: redis - {{- if and (or (eq .Values.master.service.type "NodePort") (eq .Values.master.service.type "LoadBalancer")) .Values.master.service.nodePorts.redis}} - nodePort: {{ .Values.master.service.nodePorts.redis}} - {{- else if eq .Values.master.service.type "ClusterIP" }} - nodePort: null - {{- end }} - {{- if .Values.master.service.extraPorts }} - {{- include "common.tplvalues.render" (dict "value" .Values.master.service.extraPorts "context" $) | nindent 4 }} - {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: master -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/metrics-svc.yaml b/charts/gitlab/gitlab/charts/redis/templates/metrics-svc.yaml deleted file mode 100644 index 13c552f38..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/metrics-svc.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.metrics.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ printf "%s-metrics" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.metrics.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.metrics.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} -spec: - type: {{ .Values.metrics.service.type }} - {{- if eq .Values.metrics.service.type "LoadBalancer" }} - externalTrafficPolicy: {{ .Values.metrics.service.externalTrafficPolicy }} - {{- end }} - {{- if and (eq .Values.metrics.service.type "LoadBalancer") .Values.metrics.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.metrics.service.loadBalancerIP }} - {{- end }} - {{- if and (eq .Values.metrics.service.type "LoadBalancer") .Values.metrics.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: {{- toYaml .Values.metrics.service.loadBalancerSourceRanges | nindent 4 }} - {{- end }} - ports: - - name: http-metrics - port: {{ .Values.metrics.service.port }} - protocol: TCP - targetPort: metrics - {{- if .Values.metrics.service.extraPorts }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.service.extraPorts "context" $) | nindent 4 }} - {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/networkpolicy.yaml b/charts/gitlab/gitlab/charts/redis/templates/networkpolicy.yaml deleted file mode 100644 index 64c05050b..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/networkpolicy.yaml +++ /dev/null @@ -1,78 +0,0 @@ -{{- if .Values.networkPolicy.enabled }} -kind: NetworkPolicy -apiVersion: {{ template "networkPolicy.apiVersion" . }} -metadata: - name: {{ template "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - policyTypes: - - Ingress - {{- if or (eq .Values.architecture "replication") .Values.networkPolicy.extraEgress }} - - Egress - egress: - {{- if eq .Values.architecture "replication" }} - # Allow dns resolution - - ports: - - port: 53 - protocol: UDP - # Allow outbound connections to other cluster pods - - ports: - - port: {{ .Values.master.containerPorts.redis }} - {{- if .Values.sentinel.enabled }} - - port: {{ .Values.sentinel.containerPorts.sentinel }} - {{- end }} - to: - - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} - {{- end }} - {{- if .Values.networkPolicy.extraEgress }} - {{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraEgress "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} - ingress: - # Allow inbound connections - - ports: - - port: {{ .Values.master.containerPorts.redis }} - {{- if .Values.sentinel.enabled }} - - port: {{ .Values.sentinel.containerPorts.sentinel }} - {{- end }} - {{- if not .Values.networkPolicy.allowExternal }} - from: - - podSelector: - matchLabels: - {{ template "common.names.fullname" . }}-client: "true" - - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | 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.metrics.enabled }} - # Allow prometheus scrapes for metrics - - ports: - - port: 9121 - {{- end }} - {{- if .Values.networkPolicy.extraIngress }} - {{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraIngress "context" $ ) | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/pdb.yaml b/charts/gitlab/gitlab/charts/redis/templates/pdb.yaml deleted file mode 100644 index f82d278af..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/pdb.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if .Values.pdb.create }} -apiVersion: {{ include "common.capabilities.policy.apiVersion" . }} -kind: PodDisruptionBudget -metadata: - name: {{ template "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - {{- if .Values.pdb.minAvailable }} - minAvailable: {{ .Values.pdb.minAvailable }} - {{- end }} - {{- if .Values.pdb.maxUnavailable }} - maxUnavailable: {{ .Values.pdb.maxUnavailable }} - {{- end }} - selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/prometheusrule.yaml b/charts/gitlab/gitlab/charts/redis/templates/prometheusrule.yaml deleted file mode 100644 index 41cf6b88a..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/prometheusrule.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - name: {{ template "common.names.fullname" . }} - namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.metrics.prometheusRule.additionalLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - {{- with .Values.metrics.prometheusRule.rules }} - groups: - - name: {{ template "common.names.name" $ }} - rules: {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/replicas/hpa.yaml b/charts/gitlab/gitlab/charts/redis/templates/replicas/hpa.yaml deleted file mode 100644 index 67d1cc18a..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/replicas/hpa.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{{- if and .Values.replica.autoscaling.enabled (not .Values.sentinel.enabled) }} -apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ printf "%s-replicas" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: replica - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - scaleTargetRef: - apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} - kind: StatefulSet - name: {{ printf "%s-replicas" (include "common.names.fullname" .) }} - minReplicas: {{ .Values.replica.autoscaling.minReplicas }} - maxReplicas: {{ .Values.replica.autoscaling.maxReplicas }} - metrics: - {{- if .Values.replica.autoscaling.targetCPU }} - - type: Resource - resource: - name: cpu - {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} - targetAverageUtilization: {{ .Values.replica.autoscaling.targetCPU }} - {{- else }} - target: - type: Utilization - averageUtilization: {{ .Values.replica.autoscaling.targetCPU }} - {{- end }} - {{- end }} - {{- if .Values.replica.autoscaling.targetMemory }} - - type: Resource - resource: - name: memory - {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} - targetAverageUtilization: {{ .Values.replica.autoscaling.targetMemory }} - {{- else }} - target: - type: Utilization - averageUtilization: {{ .Values.replica.autoscaling.targetMemory }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/replicas/service.yaml b/charts/gitlab/gitlab/charts/redis/templates/replicas/service.yaml deleted file mode 100644 index f2619266a..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/replicas/service.yaml +++ /dev/null @@ -1,58 +0,0 @@ -{{- if and (eq .Values.architecture "replication") (not .Values.sentinel.enabled) }} -apiVersion: v1 -kind: Service -metadata: - name: {{ printf "%s-replicas" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: replica - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.replica.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.replica.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} -spec: - type: {{ .Values.replica.service.type }} - {{- if or (eq .Values.replica.service.type "LoadBalancer") (eq .Values.replica.service.type "NodePort") }} - externalTrafficPolicy: {{ .Values.replica.service.externalTrafficPolicy | quote }} - {{- end }} - {{- if (semverCompare ">=1.22-0" (include "common.capabilities.kubeVersion" .)) }} - internalTrafficPolicy: {{ .Values.replica.service.internalTrafficPolicy }} - {{- end }} - {{- if and (eq .Values.replica.service.type "LoadBalancer") (not (empty .Values.replica.service.loadBalancerIP)) }} - loadBalancerIP: {{ .Values.replica.service.loadBalancerIP }} - {{- end }} - {{- if and (eq .Values.replica.service.type "LoadBalancer") (not (empty .Values.replica.service.loadBalancerSourceRanges)) }} - loadBalancerSourceRanges: {{ .Values.replica.service.loadBalancerSourceRanges }} - {{- end }} - {{- if and .Values.replica.service.clusterIP (eq .Values.replica.service.type "ClusterIP") }} - clusterIP: {{ .Values.replica.service.clusterIP }} - {{- end }} - {{- if .Values.replica.service.sessionAffinity }} - sessionAffinity: {{ .Values.replica.service.sessionAffinity }} - {{- end }} - {{- if .Values.replica.service.sessionAffinityConfig }} - sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.replica.service.sessionAffinityConfig "context" $) | nindent 4 }} - {{- end }} - ports: - - name: tcp-redis - port: {{ .Values.replica.service.ports.redis }} - targetPort: redis - {{- if and (or (eq .Values.replica.service.type "NodePort") (eq .Values.replica.service.type "LoadBalancer")) .Values.replica.service.nodePorts.redis}} - nodePort: {{ .Values.replica.service.nodePorts.redis}} - {{- else if eq .Values.replica.service.type "ClusterIP" }} - nodePort: null - {{- end }} - {{- if .Values.replica.service.extraPorts }} - {{- include "common.tplvalues.render" (dict "value" .Values.replica.service.extraPorts "context" $) | nindent 4 }} - {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: replica -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/replicas/statefulset.yaml b/charts/gitlab/gitlab/charts/redis/templates/replicas/statefulset.yaml deleted file mode 100644 index 8ddc86c9a..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/replicas/statefulset.yaml +++ /dev/null @@ -1,471 +0,0 @@ -{{- if and (eq .Values.architecture "replication") (not .Values.sentinel.enabled) }} -apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ printf "%s-replicas" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: replica - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - {{- if not .Values.replica.autoscaling.enabled }} - replicas: {{ .Values.replica.replicaCount }} - {{- end }} - selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: replica - serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) }} - {{- if .Values.replica.updateStrategy }} - updateStrategy: {{- toYaml .Values.replica.updateStrategy | nindent 4 }} - {{- end }} - {{- if .Values.replica.podManagementPolicy }} - podManagementPolicy: {{ .Values.replica.podManagementPolicy | quote }} - {{- end }} - template: - metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} - app.kubernetes.io/component: replica - {{- if .Values.replica.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.podLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if and .Values.metrics.enabled .Values.metrics.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podLabels "context" $ ) | nindent 8 }} - {{- end }} - annotations: - {{- if (include "redis.createConfigmap" .) }} - checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- end }} - checksum/health: {{ include (print $.Template.BasePath "/health-configmap.yaml") . | sha256sum }} - checksum/scripts: {{ include (print $.Template.BasePath "/scripts-configmap.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- if .Values.replica.podAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.podAnnotations "context" $ ) | nindent 8 }} - {{- end }} - {{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podAnnotations "context" $ ) | nindent 8 }} - {{- end }} - spec: - {{- include "redis.imagePullSecrets" . | nindent 6 }} - {{- if .Values.replica.hostAliases }} - hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.replica.hostAliases "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.replica.podSecurityContext.enabled }} - securityContext: {{- omit .Values.replica.podSecurityContext "enabled" | toYaml | nindent 8 }} - {{- end }} - serviceAccountName: {{ template "redis.serviceAccountName" . }} - {{- if .Values.replica.priorityClassName }} - priorityClassName: {{ .Values.replica.priorityClassName | quote }} - {{- end }} - {{- if .Values.replica.affinity }} - affinity: {{- include "common.tplvalues.render" (dict "value" .Values.replica.affinity "context" $) | nindent 8 }} - {{- else }} - affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAffinityPreset "component" "replica" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAntiAffinityPreset "component" "replica" "context" $) | nindent 10 }} - nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.replica.nodeAffinityPreset.type "key" .Values.replica.nodeAffinityPreset.key "values" .Values.replica.nodeAffinityPreset.values) | nindent 10 }} - {{- end }} - {{- if .Values.replica.nodeSelector }} - nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.replica.nodeSelector "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.replica.tolerations }} - tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.replica.tolerations "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.replica.topologySpreadConstraints }} - topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.replica.topologySpreadConstraints "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.replica.shareProcessNamespace }} - shareProcessNamespace: {{ .Values.replica.shareProcessNamespace }} - {{- end }} - {{- if .Values.replica.schedulerName }} - schedulerName: {{ .Values.replica.schedulerName | quote }} - {{- end }} - {{- if .Values.replica.dnsPolicy }} - dnsPolicy: {{ .Values.replica.dnsPolicy }} - {{- end }} - {{- if .Values.replica.dnsConfig }} - dnsConfig: {{- include "common.tplvalues.render" (dict "value" .Values.replica.dnsConfig "context" $) | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: {{ .Values.replica.terminationGracePeriodSeconds }} - containers: - - name: redis - image: {{ template "redis.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.replica.lifecycleHooks }} - lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.replica.lifecycleHooks "context" $) | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.replica.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.replica.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} - {{- else if .Values.replica.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.replica.command "context" $) | nindent 12 }} - {{- else }} - command: - - /bin/bash - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} - {{- else if .Values.replica.args }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.replica.args "context" $) | nindent 12 }} - {{- else }} - args: - - -c - - /opt/bitnami/scripts/start-scripts/start-replica.sh - {{- end }} - env: - - name: BITNAMI_DEBUG - value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }} - - name: REDIS_REPLICATION_MODE - value: slave - - name: REDIS_MASTER_HOST - {{- if and (eq (int64 .Values.master.count) 1) (ne .Values.master.kind "Deployment") }} - value: {{ template "common.names.fullname" . }}-master-0.{{ template "common.names.fullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} - {{- else }} - value: {{ template "common.names.fullname" . }}-master.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} - {{- end }} - - name: REDIS_MASTER_PORT_NUMBER - value: {{ .Values.master.containerPorts.redis | quote }} - - name: ALLOW_EMPTY_PASSWORD - value: {{ ternary "no" "yes" .Values.auth.enabled | quote }} - {{- if .Values.auth.enabled }} - {{- if .Values.auth.usePasswordFiles }} - - name: REDIS_PASSWORD_FILE - value: "/opt/bitnami/redis/secrets/redis-password" - - name: REDIS_MASTER_PASSWORD_FILE - value: "/opt/bitnami/redis/secrets/redis-password" - {{- else }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: {{ template "redis.secretPasswordKey" . }} - - name: REDIS_MASTER_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: {{ template "redis.secretPasswordKey" . }} - {{- end }} - {{- end }} - - name: REDIS_TLS_ENABLED - value: {{ ternary "yes" "no" .Values.tls.enabled | quote }} - {{- if .Values.tls.enabled }} - - name: REDIS_TLS_PORT - value: {{ .Values.replica.containerPorts.redis | quote }} - - name: REDIS_TLS_AUTH_CLIENTS - value: {{ ternary "yes" "no" .Values.tls.authClients | quote }} - - name: REDIS_TLS_CERT_FILE - value: {{ template "redis.tlsCert" . }} - - name: REDIS_TLS_KEY_FILE - value: {{ template "redis.tlsCertKey" . }} - - name: REDIS_TLS_CA_FILE - value: {{ template "redis.tlsCACert" . }} - {{- if .Values.tls.dhParamsFilename }} - - name: REDIS_TLS_DH_PARAMS_FILE - value: {{ template "redis.tlsDHParams" . }} - {{- end }} - {{- else }} - - name: REDIS_PORT - value: {{ .Values.replica.containerPorts.redis | quote }} - {{- end }} - {{- if .Values.replica.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.replica.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - {{- if or .Values.replica.extraEnvVarsCM .Values.replica.extraEnvVarsSecret }} - envFrom: - {{- if .Values.replica.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.replica.extraEnvVarsCM }} - {{- end }} - {{- if .Values.replica.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.replica.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: redis - containerPort: {{ .Values.replica.containerPorts.redis }} - {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.replica.startupProbe.enabled }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.replica.startupProbe "enabled") "context" $) | nindent 12 }} - tcpSocket: - port: redis - {{- else if .Values.replica.customStartupProbe }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.replica.customStartupProbe "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.replica.livenessProbe.enabled }} - livenessProbe: - initialDelaySeconds: {{ .Values.replica.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.replica.livenessProbe.periodSeconds }} - timeoutSeconds: {{ add1 .Values.replica.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.replica.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.replica.livenessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_liveness_local_and_master.sh {{ .Values.replica.livenessProbe.timeoutSeconds }} - {{- else if .Values.replica.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.replica.customLivenessProbe "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.replica.readinessProbe.enabled }} - readinessProbe: - initialDelaySeconds: {{ .Values.replica.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.replica.readinessProbe.periodSeconds }} - timeoutSeconds: {{ add1 .Values.replica.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.replica.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.replica.readinessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_readiness_local_and_master.sh {{ .Values.replica.readinessProbe.timeoutSeconds }} - {{- else if .Values.replica.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.replica.customReadinessProbe "context" $) | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.replica.resources }} - resources: {{- toYaml .Values.replica.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: start-scripts - mountPath: /opt/bitnami/scripts/start-scripts - - name: health - mountPath: /health - {{- if .Values.auth.usePasswordFiles }} - - name: redis-password - mountPath: /opt/bitnami/redis/secrets/ - {{- end }} - - name: redis-data - mountPath: /data - subPath: {{ .Values.replica.persistence.subPath }} - - name: config - mountPath: /opt/bitnami/redis/mounted-etc - - name: redis-tmp-conf - mountPath: /opt/bitnami/redis/etc - {{- if .Values.tls.enabled }} - - name: redis-certificates - mountPath: /opt/bitnami/redis/certs - readOnly: true - {{- end }} - {{- if .Values.replica.extraVolumeMounts }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.extraVolumeMounts "context" $ ) | nindent 12 }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ include "redis.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - {{- if .Values.metrics.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.metrics.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} - {{- else if .Values.metrics.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.command "context" $) | nindent 12 }} - {{- else }} - command: - - /bin/bash - - -c - - | - if [[ -f '/secrets/redis-password' ]]; then - export REDIS_PASSWORD=$(cat /secrets/redis-password) - fi - redis_exporter{{- range $key, $value := .Values.metrics.extraArgs }} --{{ $key }}={{ $value }}{{- end }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} - {{- end }} - env: - - name: REDIS_ALIAS - value: {{ template "common.names.fullname" . }} - {{- if .Values.auth.enabled }} - - name: REDIS_USER - value: default - {{- if (not .Values.auth.usePasswordFiles) }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: {{ template "redis.secretPasswordKey" . }} - {{- end }} - {{- end }} - {{- if .Values.tls.enabled }} - - name: REDIS_ADDR - value: rediss://{{ .Values.metrics.redisTargetHost }}:{{ .Values.replica.containerPorts.redis }} - {{- if .Values.tls.authClients }} - - name: REDIS_EXPORTER_TLS_CLIENT_KEY_FILE - value: {{ template "redis.tlsCertKey" . }} - - name: REDIS_EXPORTER_TLS_CLIENT_CERT_FILE - value: {{ template "redis.tlsCert" . }} - {{- end }} - - name: REDIS_EXPORTER_TLS_CA_CERT_FILE - value: {{ template "redis.tlsCACert" . }} - {{- end }} - ports: - - name: metrics - containerPort: 9121 - {{- if .Values.metrics.resources }} - resources: {{- toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - volumeMounts: - {{- if .Values.auth.usePasswordFiles }} - - name: redis-password - mountPath: /secrets/ - {{- end }} - {{- if .Values.tls.enabled }} - - name: redis-certificates - mountPath: /opt/bitnami/redis/certs - readOnly: true - {{- end }} - {{- if .Values.metrics.extraVolumeMounts }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumeMounts "context" $ ) | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.replica.sidecars }} - {{- include "common.tplvalues.render" (dict "value" .Values.replica.sidecars "context" $) | nindent 8 }} - {{- end }} - {{- $needsVolumePermissions := and .Values.volumePermissions.enabled .Values.replica.persistence.enabled .Values.replica.podSecurityContext.enabled .Values.replica.containerSecurityContext.enabled }} - {{- if or .Values.replica.initContainers $needsVolumePermissions .Values.sysctl.enabled }} - initContainers: - {{- if .Values.replica.initContainers }} - {{- include "common.tplvalues.render" (dict "value" .Values.replica.initContainers "context" $) | nindent 8 }} - {{- end }} - {{- if $needsVolumePermissions }} - - name: volume-permissions - image: {{ include "redis.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: - - /bin/bash - - -ec - - | - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - chown -R `id -u`:`id -G | cut -d " " -f2` {{ .Values.replica.persistence.path }} - {{- else }} - chown -R {{ .Values.replica.containerSecurityContext.runAsUser }}:{{ .Values.replica.podSecurityContext.fsGroup }} {{ .Values.replica.persistence.path }} - {{- end }} - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - securityContext: {{- omit .Values.volumePermissions.containerSecurityContext "runAsUser" | toYaml | nindent 12 }} - {{- else }} - securityContext: {{- .Values.volumePermissions.containerSecurityContext | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.volumePermissions.resources }} - resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: redis-data - mountPath: {{ .Values.replica.persistence.path }} - subPath: {{ .Values.replica.persistence.subPath }} - {{- end }} - {{- if .Values.sysctl.enabled }} - - name: init-sysctl - image: {{ include "redis.sysctl.image" . }} - imagePullPolicy: {{ default "" .Values.sysctl.image.pullPolicy | quote }} - securityContext: - privileged: true - runAsUser: 0 - {{- if .Values.sysctl.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.sysctl.command "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.sysctl.resources }} - resources: {{- toYaml .Values.sysctl.resources | nindent 12 }} - {{- end }} - {{- if .Values.sysctl.mountHostSys }} - volumeMounts: - - name: host-sys - mountPath: /host-sys - {{- end }} - {{- end }} - {{- end }} - volumes: - - name: start-scripts - configMap: - name: {{ printf "%s-scripts" (include "common.names.fullname" .) }} - defaultMode: 0755 - - name: health - configMap: - name: {{ printf "%s-health" (include "common.names.fullname" .) }} - defaultMode: 0755 - {{- if .Values.auth.usePasswordFiles }} - - name: redis-password - secret: - secretName: {{ template "redis.secretName" . }} - items: - - key: {{ template "redis.secretPasswordKey" . }} - path: redis-password - {{- end }} - - name: config - configMap: - name: {{ include "redis.configmapName" . }} - {{- if .Values.sysctl.mountHostSys }} - - name: host-sys - hostPath: - path: /sys - {{- end }} - - name: redis-tmp-conf - {{- if .Values.replica.persistence.medium }} - emptyDir: - medium: {{ .Values.replica.persistence.medium | quote }} - {{- if .Values.replica.persistence.sizeLimit }} - sizeLimit: {{ .Values.replica.persistence.sizeLimit | quote }} - {{- end }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.tls.enabled }} - - name: redis-certificates - secret: - secretName: {{ include "redis.tlsSecretName" . }} - defaultMode: 256 - {{- end }} - {{- if .Values.replica.extraVolumes }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.extraVolumes "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.metrics.extraVolumes }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumes "context" $ ) | nindent 8 }} - {{- end }} - {{- if not .Values.replica.persistence.enabled }} - - name: redis-data - {{- if .Values.replica.persistence.medium }} - emptyDir: { - medium: {{ .Values.replica.persistence.medium | quote }} - } - {{- else }} - emptyDir: {} - {{- end }} - {{- else if .Values.replica.persistence.existingClaim }} - - name: redis-data - persistentVolumeClaim: - claimName: {{ printf "%s" (tpl .Values.replica.persistence.existingClaim .) }} - {{- else }} - volumeClaimTemplates: - - metadata: - name: redis-data - labels: {{- include "common.labels.matchLabels" . | nindent 10 }} - app.kubernetes.io/component: replica - {{- if .Values.replica.persistence.annotations }} - annotations: {{- toYaml .Values.replica.persistence.annotations | nindent 10 }} - {{- end }} - spec: - accessModes: - {{- range .Values.replica.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.replica.persistence.size | quote }} - {{- if .Values.replica.persistence.selector }} - selector: {{- include "common.tplvalues.render" (dict "value" .Values.replica.persistence.selector "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.replica.persistence.dataSource }} - dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.replica.persistence.dataSource "context" $) | nindent 10 }} - {{- end }} - {{- include "common.storage.class" (dict "persistence" .Values.replica.persistence "global" .Values.global) | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/role.yaml b/charts/gitlab/gitlab/charts/redis/templates/role.yaml deleted file mode 100644 index 596466f30..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/role.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.rbac.create }} -apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} -kind: Role -metadata: - name: {{ template "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -rules: - {{- $pspAvailable := (semverCompare "<1.25-0" (include "common.capabilities.kubeVersion" .)) -}} - {{- if and $pspAvailable .Values.podSecurityPolicy.enabled }} - - apiGroups: - - '{{ template "podSecurityPolicy.apiGroup" . }}' - resources: - - 'podsecuritypolicies' - verbs: - - 'use' - resourceNames: [{{ printf "%s-master" (include "common.names.fullname" .) }}] - {{- end }} - {{- if .Values.rbac.rules }} - {{- include "common.tplvalues.render" ( dict "value" .Values.rbac.rules "context" $ ) | nindent 2 }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/rolebinding.yaml b/charts/gitlab/gitlab/charts/redis/templates/rolebinding.yaml deleted file mode 100644 index 74968b8ff..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/rolebinding.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.rbac.create }} -apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} -kind: RoleBinding -metadata: - name: {{ template "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "common.names.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "redis.serviceAccountName" . }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/scripts-configmap.yaml b/charts/gitlab/gitlab/charts/redis/templates/scripts-configmap.yaml deleted file mode 100644 index 7447646dd..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/scripts-configmap.yaml +++ /dev/null @@ -1,627 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ printf "%s-scripts" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -data: -{{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled }} - start-node.sh: | - #!/bin/bash - - . /opt/bitnami/scripts/libos.sh - . /opt/bitnami/scripts/liblog.sh - . /opt/bitnami/scripts/libvalidations.sh - - get_port() { - hostname="$1" - type="$2" - - port_var=$(echo "${hostname^^}_SERVICE_PORT_$type" | sed "s/-/_/g") - port=${!port_var} - - if [ -z "$port" ]; then - case $type in - "SENTINEL") - echo {{ .Values.sentinel.containerPorts.sentinel }} - ;; - "REDIS") - echo {{ .Values.master.containerPorts.redis }} - ;; - esac - else - echo $port - fi - } - - get_full_hostname() { - hostname="$1" - - {{- if .Values.useExternalDNS.enabled }} - echo "${hostname}.{{- include "redis.externalDNS.suffix" . }}" - {{- else if eq .Values.sentinel.service.type "NodePort" }} - echo "${hostname}.{{- .Release.Namespace }}" - {{- else }} - echo "${hostname}.${HEADLESS_SERVICE}" - {{- end }} - } - - REDISPORT=$(get_port "$HOSTNAME" "REDIS") - - HEADLESS_SERVICE="{{ template "common.names.fullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}" - - if [ -n "$REDIS_EXTERNAL_MASTER_HOST" ]; then - REDIS_SERVICE="$REDIS_EXTERNAL_MASTER_HOST" - else - REDIS_SERVICE="{{ template "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}" - fi - - SENTINEL_SERVICE_PORT=$(get_port "{{ include "common.names.fullname" . }}" "TCP_SENTINEL") - validate_quorum() { - if is_boolean_yes "$REDIS_SENTINEL_TLS_ENABLED"; then - quorum_info_command="{{- if and .Values.auth.enabled .Values.auth.sentinel }}REDISCLI_AUTH="\$REDIS_PASSWORD" {{ end }}redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_SENTINEL_TLS_CERT_FILE} --key ${REDIS_SENTINEL_TLS_KEY_FILE} --cacert ${REDIS_SENTINEL_TLS_CA_FILE} sentinel master {{ .Values.sentinel.masterSet }}" - else - quorum_info_command="{{- if and .Values.auth.enabled .Values.auth.sentinel }}REDISCLI_AUTH="\$REDIS_PASSWORD" {{ end }}redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel master {{ .Values.sentinel.masterSet }}" - fi - info "about to run the command: $quorum_info_command" - eval $quorum_info_command | grep -Fq "s_down" - } - - trigger_manual_failover() { - if is_boolean_yes "$REDIS_SENTINEL_TLS_ENABLED"; then - failover_command="{{- if and .Values.auth.enabled .Values.auth.sentinel }}REDISCLI_AUTH="\$REDIS_PASSWORD" {{ end }}redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_SENTINEL_TLS_CERT_FILE} --key ${REDIS_SENTINEL_TLS_KEY_FILE} --cacert ${REDIS_SENTINEL_TLS_CA_FILE} sentinel failover {{ .Values.sentinel.masterSet }}" - else - failover_command="{{- if and .Values.auth.enabled .Values.auth.sentinel }}REDISCLI_AUTH="\$REDIS_PASSWORD" {{ end }}redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel failover {{ .Values.sentinel.masterSet }}" - fi - - info "about to run the command: $failover_command" - eval $failover_command - } - - get_sentinel_master_info() { - if is_boolean_yes "$REDIS_SENTINEL_TLS_ENABLED"; then - sentinel_info_command="{{- if and .Values.auth.enabled .Values.auth.sentinel }}REDISCLI_AUTH="\$REDIS_PASSWORD" {{ end }}timeout {{ .Values.sentinel.getMasterTimeout }} redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_SENTINEL_TLS_CERT_FILE} --key ${REDIS_SENTINEL_TLS_KEY_FILE} --cacert ${REDIS_SENTINEL_TLS_CA_FILE} sentinel get-master-addr-by-name {{ .Values.sentinel.masterSet }}" - else - sentinel_info_command="{{- if and .Values.auth.enabled .Values.auth.sentinel }}REDISCLI_AUTH="\$REDIS_PASSWORD" {{ end }}timeout {{ .Values.sentinel.getMasterTimeout }} redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel get-master-addr-by-name {{ .Values.sentinel.masterSet }}" - fi - - info "about to run the command: $sentinel_info_command" - eval $sentinel_info_command - } - - {{- if and .Values.replica.containerSecurityContext.runAsUser (eq (.Values.replica.containerSecurityContext.runAsUser | int) 0) }} - useradd redis - chown -R redis {{ .Values.replica.persistence.path }} - {{- end }} - - [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")" - [[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")" - - # check if there is a master - master_in_persisted_conf="$(get_full_hostname "$HOSTNAME")" - master_port_in_persisted_conf="$REDIS_MASTER_PORT_NUMBER" - master_in_sentinel="$(get_sentinel_master_info)" - redisRetVal=$? - - {{- if .Values.sentinel.persistence.enabled }} - if [[ -f /opt/bitnami/redis-sentinel/etc/sentinel.conf ]]; then - master_in_persisted_conf="$(awk '/monitor/ {print $4}' /opt/bitnami/redis-sentinel/etc/sentinel.conf)" - master_port_in_persisted_conf="$(awk '/monitor/ {print $5}' /opt/bitnami/redis-sentinel/etc/sentinel.conf)" - info "Found previous master ${master_in_persisted_conf}:${master_port_in_persisted_conf} in /opt/bitnami/redis-sentinel/etc/sentinel.conf" - debug "$(cat /opt/bitnami/redis-sentinel/etc/sentinel.conf | grep monitor)" - touch /opt/bitnami/redis-sentinel/etc/.node_read - fi - {{- end }} - - if [[ $redisRetVal -ne 0 ]]; then - if [[ "$master_in_persisted_conf" == "$(get_full_hostname "$HOSTNAME")" ]]; then - # Case 1: No active sentinel and in previous sentinel.conf we were the master --> MASTER - info "Configuring the node as master" - export REDIS_REPLICATION_MODE="master" - else - # Case 2: No active sentinel and in previous sentinel.conf we were not master --> REPLICA - info "Configuring the node as replica" - export REDIS_REPLICATION_MODE="slave" - REDIS_MASTER_HOST=${master_in_persisted_conf} - REDIS_MASTER_PORT_NUMBER=${master_port_in_persisted_conf} - fi - else - # Fetches current master's host and port - REDIS_SENTINEL_INFO=($(get_sentinel_master_info)) - info "Current master: REDIS_SENTINEL_INFO=(${REDIS_SENTINEL_INFO[0]},${REDIS_SENTINEL_INFO[1]})" - REDIS_MASTER_HOST=${REDIS_SENTINEL_INFO[0]} - REDIS_MASTER_PORT_NUMBER=${REDIS_SENTINEL_INFO[1]} - - if [[ "$REDIS_MASTER_HOST" == "$(get_full_hostname "$HOSTNAME")" ]]; then - # Case 3: Active sentinel and master it is this node --> MASTER - info "Configuring the node as master" - export REDIS_REPLICATION_MODE="master" - else - # Case 4: Active sentinel and master is not this node --> REPLICA - info "Configuring the node as replica" - export REDIS_REPLICATION_MODE="slave" - - {{- if and .Values.sentinel.automateClusterRecovery (le (int .Values.sentinel.downAfterMilliseconds) 2000) }} - retry_count=1 - while validate_quorum - do - info "sleeping, waiting for Redis master to come up" - sleep 1s - if ! ((retry_count % 11)); then - info "Trying to manually failover" - failover_result=$(trigger_manual_failover) - - debug "Failover result: $failover_result" - fi - - ((retry_count+=1)) - done - info "Redis master is up now" - {{- end }} - fi - fi - - if [[ -n "$REDIS_EXTERNAL_MASTER_HOST" ]]; then - REDIS_MASTER_HOST="$REDIS_EXTERNAL_MASTER_HOST" - REDIS_MASTER_PORT_NUMBER="${REDIS_EXTERNAL_MASTER_PORT}" - fi - - if [[ ! -f /opt/bitnami/redis/etc/replica.conf ]];then - cp /opt/bitnami/redis/mounted-etc/replica.conf /opt/bitnami/redis/etc/replica.conf - fi - - if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then - cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf - fi - - echo "" >> /opt/bitnami/redis/etc/replica.conf - echo "replica-announce-port $REDISPORT" >> /opt/bitnami/redis/etc/replica.conf - echo "replica-announce-ip $(get_full_hostname "$HOSTNAME")" >> /opt/bitnami/redis/etc/replica.conf - - {{- if .Values.tls.enabled }} - ARGS=("--port" "0") - ARGS+=("--tls-port" "${REDIS_TLS_PORT}") - ARGS+=("--tls-cert-file" "${REDIS_TLS_CERT_FILE}") - ARGS+=("--tls-key-file" "${REDIS_TLS_KEY_FILE}") - ARGS+=("--tls-ca-cert-file" "${REDIS_TLS_CA_FILE}") - ARGS+=("--tls-auth-clients" "${REDIS_TLS_AUTH_CLIENTS}") - ARGS+=("--tls-replication" "yes") - {{- if .Values.tls.dhParamsFilename }} - ARGS+=("--tls-dh-params-file" "${REDIS_TLS_DH_PARAMS_FILE}") - {{- end }} - {{- else }} - ARGS=("--port" "${REDIS_PORT}") - {{- end }} - - if [[ "$REDIS_REPLICATION_MODE" = "slave" ]]; then - ARGS+=("--replicaof" "${REDIS_MASTER_HOST}" "${REDIS_MASTER_PORT_NUMBER}") - fi - - {{- if .Values.auth.enabled }} - ARGS+=("--requirepass" "${REDIS_PASSWORD}") - ARGS+=("--masterauth" "${REDIS_MASTER_PASSWORD}") - {{- else }} - ARGS+=("--protected-mode" "no") - {{- end }} - ARGS+=("--include" "/opt/bitnami/redis/etc/replica.conf") - ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf") - {{- if .Values.replica.extraFlags }} - {{- range .Values.replica.extraFlags }} - ARGS+=({{ . | quote }}) - {{- end }} - {{- end }} - - {{- if .Values.replica.preExecCmds }} - {{- .Values.replica.preExecCmds | nindent 4 }} - {{- end }} - - {{- if .Values.replica.command }} - exec {{ .Values.replica.command }} "${ARGS[@]}" - {{- else }} - exec redis-server "${ARGS[@]}" - {{- end }} - - start-sentinel.sh: | - #!/bin/bash - - . /opt/bitnami/scripts/libos.sh - . /opt/bitnami/scripts/libvalidations.sh - . /opt/bitnami/scripts/libfile.sh - - HEADLESS_SERVICE="{{ template "common.names.fullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}" - REDIS_SERVICE="{{ template "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}" - - get_port() { - hostname="$1" - type="$2" - - port_var=$(echo "${hostname^^}_SERVICE_PORT_$type" | sed "s/-/_/g") - port=${!port_var} - - if [ -z "$port" ]; then - case $type in - "SENTINEL") - echo {{ .Values.sentinel.containerPorts.sentinel }} - ;; - "REDIS") - echo {{ .Values.master.containerPorts.redis }} - ;; - esac - else - echo $port - fi - } - - get_full_hostname() { - hostname="$1" - - {{- if .Values.useExternalDNS.enabled }} - echo "${hostname}.{{- include "redis.externalDNS.suffix" . }}" - {{- else if eq .Values.sentinel.service.type "NodePort" }} - echo "${hostname}.{{- .Release.Namespace }}" - {{- else }} - echo "${hostname}.${HEADLESS_SERVICE}" - {{- end }} - } - - SERVPORT=$(get_port "$HOSTNAME" "SENTINEL") - REDISPORT=$(get_port "$HOSTNAME" "REDIS") - SENTINEL_SERVICE_PORT=$(get_port "{{ include "common.names.fullname" . }}" "TCP_SENTINEL") - - sentinel_conf_set() { - local -r key="${1:?missing key}" - local value="${2:-}" - - # Sanitize inputs - value="${value//\\/\\\\}" - value="${value//&/\\&}" - value="${value//\?/\\?}" - [[ "$value" = "" ]] && value="\"$value\"" - - replace_in_file "/opt/bitnami/redis-sentinel/etc/sentinel.conf" "^#*\s*${key} .*" "${key} ${value}" false - } - sentinel_conf_add() { - echo $'\n'"$@" >> "/opt/bitnami/redis-sentinel/etc/sentinel.conf" - } - host_id() { - echo "$1" | openssl sha1 | awk '{print $2}' - } - get_sentinel_master_info() { - if is_boolean_yes "$REDIS_SENTINEL_TLS_ENABLED"; then - sentinel_info_command="{{- if and .Values.auth.enabled .Values.auth.sentinel }}REDISCLI_AUTH="\$REDIS_PASSWORD" {{ end }}redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT --tls --cert ${REDIS_SENTINEL_TLS_CERT_FILE} --key ${REDIS_SENTINEL_TLS_KEY_FILE} --cacert ${REDIS_SENTINEL_TLS_CA_FILE} sentinel get-master-addr-by-name {{ .Values.sentinel.masterSet }}" - else - sentinel_info_command="{{- if and .Values.auth.enabled .Values.auth.sentinel }}REDISCLI_AUTH="\$REDIS_PASSWORD" {{ end }}redis-cli -h $REDIS_SERVICE -p $SENTINEL_SERVICE_PORT sentinel get-master-addr-by-name {{ .Values.sentinel.masterSet }}" - fi - info "about to run the command: $sentinel_info_command" - eval $sentinel_info_command - } - - [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")" - - master_in_persisted_conf="$(get_full_hostname "$HOSTNAME")" - - {{- if .Values.sentinel.persistence.enabled }} - if [[ -f /opt/bitnami/redis-sentinel/etc/sentinel.conf ]]; then - check_lock_file() { - [[ -f /opt/bitnami/redis-sentinel/etc/.node_read ]] - } - retry_while "check_lock_file" - rm -f /opt/bitnami/redis-sentinel/etc/.node_read - master_in_persisted_conf="$(awk '/monitor/ {print $4}' /opt/bitnami/redis-sentinel/etc/sentinel.conf)" - info "Found previous master $master_in_persisted_conf in /opt/bitnami/redis-sentinel/etc/sentinel.conf" - debug "$(cat /opt/bitnami/redis-sentinel/etc/sentinel.conf | grep monitor)" - fi - {{- end }} - if ! get_sentinel_master_info && [[ "$master_in_persisted_conf" == "$(get_full_hostname "$HOSTNAME")" ]]; then - # No master found, lets create a master node - export REDIS_REPLICATION_MODE="master" - - REDIS_MASTER_HOST=$(get_full_hostname "$HOSTNAME") - REDIS_MASTER_PORT_NUMBER="$REDISPORT" - else - export REDIS_REPLICATION_MODE="slave" - - # Fetches current master's host and port - REDIS_SENTINEL_INFO=($(get_sentinel_master_info)) - info "printing REDIS_SENTINEL_INFO=(${REDIS_SENTINEL_INFO[0]},${REDIS_SENTINEL_INFO[1]})" - REDIS_MASTER_HOST=${REDIS_SENTINEL_INFO[0]} - REDIS_MASTER_PORT_NUMBER=${REDIS_SENTINEL_INFO[1]} - fi - - if [[ -n "$REDIS_EXTERNAL_MASTER_HOST" ]]; then - REDIS_MASTER_HOST="$REDIS_EXTERNAL_MASTER_HOST" - REDIS_MASTER_PORT_NUMBER="${REDIS_EXTERNAL_MASTER_PORT}" - fi - - cp /opt/bitnami/redis-sentinel/mounted-etc/sentinel.conf /opt/bitnami/redis-sentinel/etc/sentinel.conf - {{- if .Values.auth.enabled }} - printf "\nsentinel auth-pass %s %s" "{{ .Values.sentinel.masterSet }}" "$REDIS_PASSWORD" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf - {{- if and .Values.auth.enabled .Values.auth.sentinel }} - printf "\nrequirepass %s" "$REDIS_PASSWORD" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf - {{- end }} - {{- end }} - printf "\nsentinel myid %s" "$(host_id "$HOSTNAME")" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf - - sentinel_conf_set "sentinel monitor" "{{ .Values.sentinel.masterSet }} "$REDIS_MASTER_HOST" "$REDIS_MASTER_PORT_NUMBER" {{ .Values.sentinel.quorum }}" - - add_known_sentinel() { - hostname="$1" - ip="$2" - - if [[ -n "$hostname" && -n "$ip" && "$hostname" != "$HOSTNAME" ]]; then - sentinel_conf_add "sentinel known-sentinel {{ .Values.sentinel.masterSet }} $(get_full_hostname "$hostname") $(get_port "$hostname" "SENTINEL") $(host_id "$hostname")" - fi - } - add_known_replica() { - hostname="$1" - ip="$2" - - if [[ -n "$ip" && "$(get_full_hostname "$hostname")" != "$REDIS_MASTER_HOST" ]]; then - sentinel_conf_add "sentinel known-replica {{ .Values.sentinel.masterSet }} $(get_full_hostname "$hostname") $(get_port "$hostname" "REDIS")" - fi - } - - # Add available hosts on the network as known replicas & sentinels - for node in $(seq 0 $(({{ .Values.replica.replicaCount }}-1))); do - hostname="{{ template "common.names.fullname" . }}-node-$node" - ip="$(getent hosts "$hostname.$HEADLESS_SERVICE" | awk '{ print $1 }')" - add_known_sentinel "$hostname" "$ip" - add_known_replica "$hostname" "$ip" - done - - echo "" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf - echo "sentinel announce-hostnames yes" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf - echo "sentinel resolve-hostnames yes" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf - echo "sentinel announce-port $SERVPORT" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf - echo "sentinel announce-ip $(get_full_hostname "$HOSTNAME")" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf - - {{- if .Values.tls.enabled }} - ARGS=("--port" "0") - ARGS+=("--tls-port" "${REDIS_SENTINEL_TLS_PORT_NUMBER}") - ARGS+=("--tls-cert-file" "${REDIS_SENTINEL_TLS_CERT_FILE}") - ARGS+=("--tls-key-file" "${REDIS_SENTINEL_TLS_KEY_FILE}") - ARGS+=("--tls-ca-cert-file" "${REDIS_SENTINEL_TLS_CA_FILE}") - ARGS+=("--tls-replication" "yes") - ARGS+=("--tls-auth-clients" "${REDIS_SENTINEL_TLS_AUTH_CLIENTS}") - {{- if .Values.tls.dhParamsFilename }} - ARGS+=("--tls-dh-params-file" "${REDIS_SENTINEL_TLS_DH_PARAMS_FILE}") - {{- end }} - {{- end }} - {{- if .Values.sentinel.preExecCmds }} - {{ .Values.sentinel.preExecCmds | nindent 4 }} - {{- end }} - exec redis-server /opt/bitnami/redis-sentinel/etc/sentinel.conf --sentinel {{- if .Values.tls.enabled }} "${ARGS[@]}" {{- end }} - prestop-sentinel.sh: | - #!/bin/bash - - . /opt/bitnami/scripts/libvalidations.sh - . /opt/bitnami/scripts/libos.sh - - HEADLESS_SERVICE="{{ template "common.names.fullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}" - SENTINEL_SERVICE_ENV_NAME={{ printf "%s%s" (upper (include "common.names.fullname" .)| replace "-" "_") "_SERVICE_PORT_TCP_SENTINEL" }} - SENTINEL_SERVICE_PORT=${!SENTINEL_SERVICE_ENV_NAME} - - get_full_hostname() { - hostname="$1" - - {{- if .Values.useExternalDNS.enabled }} - echo "${hostname}.{{- include "redis.externalDNS.suffix" . }}" - {{- else if eq .Values.sentinel.service.type "NodePort" }} - echo "${hostname}.{{- .Release.Namespace }}" - {{- else }} - echo "${hostname}.${HEADLESS_SERVICE}" - {{- end }} - } - run_sentinel_command() { - if is_boolean_yes "$REDIS_SENTINEL_TLS_ENABLED"; then - redis-cli -h "$REDIS_SERVICE" -p "$SENTINEL_SERVICE_PORT" --tls --cert "$REDIS_SENTINEL_TLS_CERT_FILE" --key "$REDIS_SENTINEL_TLS_KEY_FILE" --cacert "$REDIS_SENTINEL_TLS_CA_FILE" sentinel "$@" - else - redis-cli -h "$REDIS_SERVICE" -p "$SENTINEL_SERVICE_PORT" sentinel "$@" - fi - } - failover_finished() { - REDIS_SENTINEL_INFO=($(run_sentinel_command get-master-addr-by-name "{{ .Values.sentinel.masterSet }}")) - REDIS_MASTER_HOST="${REDIS_SENTINEL_INFO[0]}" - [[ "$REDIS_MASTER_HOST" != "$(get_full_hostname $HOSTNAME)" ]] - } - - REDIS_SERVICE="{{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}" - - {{ if .Values.auth.sentinel -}} - # redis-cli automatically consumes credentials from the REDISCLI_AUTH variable - [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD" - [[ -f "$REDIS_PASSWORD_FILE" ]] && export REDISCLI_AUTH="$(< "${REDIS_PASSWORD_FILE}")" - {{- end }} - - if ! failover_finished; then - echo "I am the master pod and you are stopping me. Starting sentinel failover" - # if I am the master, issue a command to failover once and then wait for the failover to finish - run_sentinel_command failover "{{ .Values.sentinel.masterSet }}" - if retry_while "failover_finished" "{{ sub .Values.sentinel.terminationGracePeriodSeconds 10 }}" 1; then - echo "Master has been successfuly failed over to a different pod." - exit 0 - else - echo "Master failover failed" - exit 1 - fi - else - exit 0 - fi - prestop-redis.sh: | - #!/bin/bash - - . /opt/bitnami/scripts/libvalidations.sh - . /opt/bitnami/scripts/libos.sh - - run_redis_command() { - if is_boolean_yes "$REDIS_TLS_ENABLED"; then - redis-cli -h 127.0.0.1 -p "$REDIS_TLS_PORT" --tls --cert "$REDIS_TLS_CERT_FILE" --key "$REDIS_TLS_KEY_FILE" --cacert "$REDIS_TLS_CA_FILE" "$@" - else - redis-cli -h 127.0.0.1 -p ${REDIS_PORT} "$@" - fi - } - failover_finished() { - REDIS_ROLE=$(run_redis_command role | head -1) - [[ "$REDIS_ROLE" != "master" ]] - } - - # redis-cli automatically consumes credentials from the REDISCLI_AUTH variable - [[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD" - [[ -f "$REDIS_PASSWORD_FILE" ]] && export REDISCLI_AUTH="$(< "${REDIS_PASSWORD_FILE}")" - - if ! failover_finished; then - echo "Waiting for sentinel to run failover for up to {{ sub .Values.sentinel.terminationGracePeriodSeconds 10 }}s" - retry_while "failover_finished" "{{ sub .Values.sentinel.terminationGracePeriodSeconds 10 }}" 1 - else - exit 0 - fi - -{{- else }} - start-master.sh: | - #!/bin/bash - - [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")" - {{- if and .Values.master.containerSecurityContext.runAsUser (eq (.Values.master.containerSecurityContext.runAsUser | int) 0) }} - useradd redis - chown -R redis {{ .Values.master.persistence.path }} - {{- end }} - if [[ ! -f /opt/bitnami/redis/etc/master.conf ]];then - cp /opt/bitnami/redis/mounted-etc/master.conf /opt/bitnami/redis/etc/master.conf - fi - if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then - cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf - fi - {{- if .Values.tls.enabled }} - ARGS=("--port" "0") - ARGS+=("--tls-port" "${REDIS_TLS_PORT}") - ARGS+=("--tls-cert-file" "${REDIS_TLS_CERT_FILE}") - ARGS+=("--tls-key-file" "${REDIS_TLS_KEY_FILE}") - ARGS+=("--tls-ca-cert-file" "${REDIS_TLS_CA_FILE}") - ARGS+=("--tls-auth-clients" "${REDIS_TLS_AUTH_CLIENTS}") - {{- if .Values.tls.dhParamsFilename }} - ARGS+=("--tls-dh-params-file" "${REDIS_TLS_DH_PARAMS_FILE}") - {{- end }} - {{- else }} - ARGS=("--port" "${REDIS_PORT}") - {{- end }} - {{- if .Values.auth.enabled }} - ARGS+=("--requirepass" "${REDIS_PASSWORD}") - ARGS+=("--masterauth" "${REDIS_PASSWORD}") - {{- else }} - ARGS+=("--protected-mode" "no") - {{- end }} - ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf") - ARGS+=("--include" "/opt/bitnami/redis/etc/master.conf") - {{- if .Values.master.extraFlags }} - {{- range .Values.master.extraFlags }} - ARGS+=({{ . | quote }}) - {{- end }} - {{- end }} - {{- if .Values.master.preExecCmds }} - {{ .Values.master.preExecCmds | nindent 4 }} - {{- end }} - {{- if .Values.master.command }} - exec {{ .Values.master.command }} "${ARGS[@]}" - {{- else }} - exec redis-server "${ARGS[@]}" - {{- end }} - {{- if eq .Values.architecture "replication" }} - start-replica.sh: | - #!/bin/bash - - get_port() { - hostname="$1" - type="$2" - - port_var=$(echo "${hostname^^}_SERVICE_PORT_$type" | sed "s/-/_/g") - port=${!port_var} - - if [ -z "$port" ]; then - case $type in - "SENTINEL") - echo {{ .Values.sentinel.containerPorts.sentinel }} - ;; - "REDIS") - echo {{ .Values.master.containerPorts.redis }} - ;; - esac - else - echo $port - fi - } - - get_full_hostname() { - hostname="$1" - - {{- if .Values.useExternalDNS.enabled }} - echo "${hostname}.{{- include "redis.externalDNS.suffix" . }}" - {{- else if eq .Values.sentinel.service.type "NodePort" }} - echo "${hostname}.{{- .Release.Namespace }}" - {{- else }} - echo "${hostname}.${HEADLESS_SERVICE}" - {{- end }} - } - - REDISPORT=$(get_port "$HOSTNAME" "REDIS") - - [[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")" - [[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")" - {{- if and .Values.replica.containerSecurityContext.runAsUser (eq (.Values.replica.containerSecurityContext.runAsUser | int) 0) }} - useradd redis - chown -R redis {{ .Values.replica.persistence.path }} - {{- end }} - if [[ ! -f /opt/bitnami/redis/etc/replica.conf ]];then - cp /opt/bitnami/redis/mounted-etc/replica.conf /opt/bitnami/redis/etc/replica.conf - fi - if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then - cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf - fi - - echo "" >> /opt/bitnami/redis/etc/replica.conf - echo "replica-announce-port $REDISPORT" >> /opt/bitnami/redis/etc/replica.conf - echo "replica-announce-ip $(get_full_hostname "$HOSTNAME")" >> /opt/bitnami/redis/etc/replica.conf - - {{- if .Values.tls.enabled }} - ARGS=("--port" "0") - ARGS+=("--tls-port" "${REDIS_TLS_PORT}") - ARGS+=("--tls-cert-file" "${REDIS_TLS_CERT_FILE}") - ARGS+=("--tls-key-file" "${REDIS_TLS_KEY_FILE}") - ARGS+=("--tls-ca-cert-file" "${REDIS_TLS_CA_FILE}") - ARGS+=("--tls-auth-clients" "${REDIS_TLS_AUTH_CLIENTS}") - ARGS+=("--tls-replication" "yes") - {{- if .Values.tls.dhParamsFilename }} - ARGS+=("--tls-dh-params-file" "${REDIS_TLS_DH_PARAMS_FILE}") - {{- end }} - {{- else }} - ARGS=("--port" "${REDIS_PORT}") - {{- end }} - ARGS+=("--replicaof" "${REDIS_MASTER_HOST}" "${REDIS_MASTER_PORT_NUMBER}") - {{- if .Values.auth.enabled }} - ARGS+=("--requirepass" "${REDIS_PASSWORD}") - ARGS+=("--masterauth" "${REDIS_MASTER_PASSWORD}") - {{- else }} - ARGS+=("--protected-mode" "no") - {{- end }} - ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf") - ARGS+=("--include" "/opt/bitnami/redis/etc/replica.conf") - {{- if .Values.replica.extraFlags }} - {{- range .Values.replica.extraFlags }} - ARGS+=({{ . | quote }}) - {{- end }} - {{- end }} - {{- if .Values.replica.preExecCmds }} - {{ .Values.replica.preExecCmds | nindent 4 }} - {{- end }} - {{- if .Values.replica.command }} - exec {{ .Values.replica.command }} "${ARGS[@]}" - {{- else }} - exec redis-server "${ARGS[@]}" - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/secret.yaml b/charts/gitlab/gitlab/charts/redis/templates/secret.yaml deleted file mode 100644 index 2edc0d814..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if and .Values.auth.enabled (not .Values.auth.existingSecret) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.secretAnnotations .Values.commonAnnotations }} - annotations: - {{- if .Values.secretAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.secretAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} -type: Opaque -data: - redis-password: {{ include "redis.password" . | b64enc | quote }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/redis/templates/sentinel/hpa.yaml b/charts/gitlab/gitlab/charts/redis/templates/sentinel/hpa.yaml deleted file mode 100644 index 69b36aa05..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/sentinel/hpa.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{{- if and .Values.replica.autoscaling.enabled .Values.sentinel.enabled }} -apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ printf "%s-node" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: replica - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - scaleTargetRef: - apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} - kind: StatefulSet - name: {{ printf "%s-node" (include "common.names.fullname" .) }} - minReplicas: {{ .Values.replica.autoscaling.minReplicas }} - maxReplicas: {{ .Values.replica.autoscaling.maxReplicas }} - metrics: - {{- if .Values.replica.autoscaling.targetCPU }} - - type: Resource - resource: - name: cpu - {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} - targetAverageUtilization: {{ .Values.replica.autoscaling.targetCPU }} - {{- else }} - target: - type: Utilization - averageUtilization: {{ .Values.replica.autoscaling.targetCPU }} - {{- end }} - {{- end }} - {{- if .Values.replica.autoscaling.targetMemory }} - - type: Resource - resource: - name: memory - {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} - targetAverageUtilization: {{ .Values.replica.autoscaling.targetMemory }} - {{- else }} - target: - type: Utilization - averageUtilization: {{ .Values.replica.autoscaling.targetMemory }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/sentinel/node-services.yaml b/charts/gitlab/gitlab/charts/redis/templates/sentinel/node-services.yaml deleted file mode 100644 index d3e635e95..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/sentinel/node-services.yaml +++ /dev/null @@ -1,70 +0,0 @@ -{{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled (eq .Values.sentinel.service.type "NodePort") (or .Release.IsUpgrade .Values.sentinel.service.nodePorts.redis ) }} - -{{- range $i := until (int .Values.replica.replicaCount) }} - -{{ $portsmap := (lookup "v1" "ConfigMap" $.Release.Namespace (printf "%s-%s" ( include "common.names.fullname" $ ) "ports-configmap")).data }} - -{{ $sentinelport := 0}} -{{ $redisport := 0}} -{{- if $portsmap }} -{{ $sentinelport = index $portsmap (printf "%s-node-%s-%s" (include "common.names.fullname" $) (toString $i) "sentinel") }} -{{ $redisport = index $portsmap (printf "%s-node-%s-%s" (include "common.names.fullname" $) (toString $i) "redis") }} -{{- else }} -{{- end }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "common.names.fullname" $ }}-node-{{ $i }} - namespace: {{ $.Release.Namespace | quote }} - labels: {{- include "common.labels.standard" $ | nindent 4 }} - app.kubernetes.io/component: node - {{- if $.Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or $.Values.sentinel.service.annotations $.Values.commonAnnotations }} - annotations: - {{- if $.Values.sentinel.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" $.Values.sentinel.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if $.Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} -spec: - type: NodePort - ports: - - name: sentinel - {{- if $.Values.sentinel.service.nodePorts.sentinel }} - nodePort: {{ (add $.Values.sentinel.service.nodePorts.sentinel $i 1) }} - port: {{ (add $.Values.sentinel.service.nodePorts.sentinel $i 1) }} - {{- else }} - nodePort: {{ $sentinelport }} - port: {{ $sentinelport }} - {{- end }} - protocol: TCP - targetPort: {{ $.Values.sentinel.containerPorts.sentinel }} - - name: redis - {{- if $.Values.sentinel.service.nodePorts.redis }} - nodePort: {{ (add $.Values.sentinel.service.nodePorts.redis $i 1) }} - port: {{ (add $.Values.sentinel.service.nodePorts.redis $i 1) }} - {{- else }} - nodePort: {{ $redisport }} - port: {{ $redisport }} - {{- end }} - protocol: TCP - targetPort: {{ $.Values.replica.containerPorts.redis }} - - name: sentinel-internal - nodePort: null - port: {{ $.Values.sentinel.containerPorts.sentinel }} - protocol: TCP - targetPort: {{ $.Values.sentinel.containerPorts.sentinel }} - - name: redis-internal - nodePort: null - port: {{ $.Values.replica.containerPorts.redis }} - protocol: TCP - targetPort: {{ $.Values.replica.containerPorts.redis }} - selector: - statefulset.kubernetes.io/pod-name: {{ template "common.names.fullname" $ }}-node-{{ $i }} ---- -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/sentinel/ports-configmap.yaml b/charts/gitlab/gitlab/charts/redis/templates/sentinel/ports-configmap.yaml deleted file mode 100644 index f5e7b2a90..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/sentinel/ports-configmap.yaml +++ /dev/null @@ -1,100 +0,0 @@ -{{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled (eq .Values.sentinel.service.type "NodePort") (not .Values.sentinel.service.nodePorts.redis ) }} -{{- /* create a list to keep track of ports we choose to use */}} -{{ $chosenports := (list ) }} - -{{- /* Get list of all used nodeports */}} -{{ $usedports := (list ) }} -{{- range $index, $service := (lookup "v1" "Service" "" "").items }} - {{- range.spec.ports }} - {{- if .nodePort }} - {{- $usedports = (append $usedports .nodePort) }} - {{- end }} - {{- end }} -{{- end }} - -{{- /* -comments that start with # are rendered in the output when you debug, so you can less and search for them -Vars in the comment will be rendered out, so you can check their value this way. -https://helm.sh/docs/chart_best_practices/templates/#comments-yaml-comments-vs-template-comments - -remove the template comments and leave the yaml comments to help debug -*/}} - -{{- /* Sort the list */}} -{{ $usedports = $usedports | sortAlpha }} -#usedports {{ $usedports }} - -{{- /* How many nodeports per service do we want to create, except for the main service which is always two */}} -{{ $numberofPortsPerNodeService := 2 }} - -{{- /* for every nodeport we want, loop though the used ports to get an unused port */}} -{{- range $j := until (int (add (mul (int .Values.replica.replicaCount) $numberofPortsPerNodeService) 2)) }} - {{- /* #j={{ $j }} */}} - {{- $nodeport := (add $j 30000) }} - {{- $nodeportfound := false }} - {{- range $i := $usedports }} - {{- /* #i={{ $i }} - #nodeport={{ $nodeport }} - #usedports={{ $usedports }} */}} - {{- if and (has (toString $nodeport) $usedports) (eq $nodeportfound false) }} - {{- /* nodeport conflicts with in use */}} - {{- $nodeport = (add $nodeport 1) }} - {{- else if and ( has $nodeport $chosenports) (eq $nodeportfound false) }} - {{- /* nodeport already chosen, try another */}} - {{- $nodeport = (add $nodeport 1) }} - {{- else if (eq $nodeportfound false) }} - {{- /* nodeport free to use: not already claimed and not in use */}} - {{- /* select nodeport, and place into usedports */}} - {{- $chosenports = (append $chosenports $nodeport) }} - {{- $nodeportfound = true }} - {{- else }} - {{- /* nodeport has already been chosen and locked in, just work through the rest of the list to get to the next nodeport selection */}} - {{- end }} - {{- end }} - {{- if (eq $nodeportfound false) }} - {{- $chosenports = (append $chosenports $nodeport) }} - {{- end }} - -{{- end }} - -{{- /* print the usedports and chosenports for debugging */}} -#usedports {{ $usedports }} -#chosenports {{ $chosenports }}}} - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "common.names.fullname" . }}-ports-configmap - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -data: -{{ $portsmap := (lookup "v1" "ConfigMap" $.Release.Namespace (printf "%s-%s" ( include "common.names.fullname" . ) "ports-configmap")).data }} -{{- if $portsmap }} -{{- /* configmap already exists, do not install again */ -}} - {{- range $name, $value := $portsmap }} - "{{ $name }}": "{{ $value }}" - {{- end }} -{{- else }} -{{- /* configmap being set for first time */ -}} - {{- range $index, $port := $chosenports }} - {{- $nodenumber := (floor (div $index 2)) }} - {{- if (eq $index 0) }} - "{{ template "common.names.fullname" $ }}-sentinel": "{{ $port }}" - {{- else if (eq $index 1) }} - "{{ template "common.names.fullname" $ }}-redis": "{{ $port }}" - {{- else if (eq (mod $index 2) 0) }} - "{{ template "common.names.fullname" $ }}-node-{{ (sub $nodenumber 1) }}-sentinel": "{{ $port }}" - {{- else if (eq (mod $index 2) 1) }} - "{{ template "common.names.fullname" $ }}-node-{{ (sub $nodenumber 1) }}-redis": "{{ $port }}" - {{- end }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/sentinel/service.yaml b/charts/gitlab/gitlab/charts/redis/templates/sentinel/service.yaml deleted file mode 100644 index 362d681dc..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/sentinel/service.yaml +++ /dev/null @@ -1,103 +0,0 @@ -{{- if or .Release.IsUpgrade (ne .Values.sentinel.service.type "NodePort") .Values.sentinel.service.nodePorts.redis -}} -{{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled }} -{{ $portsmap := (lookup "v1" "ConfigMap" $.Release.Namespace (printf "%s-%s" ( include "common.names.fullname" . ) "ports-configmap")).data }} - -{{ $sentinelport := 0}} -{{ $redisport := 0}} -{{- if $portsmap }} -{{ $sentinelport = index $portsmap (printf "%s-%s" (include "common.names.fullname" $) "sentinel") }} -{{ $redisport = index $portsmap (printf "%s-%s" (include "common.names.fullname" $) "redis") }} -{{- else }} -{{- end }} - -apiVersion: v1 -kind: Service -metadata: - name: {{ template "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.sentinel.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.sentinel.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.sentinel.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} -spec: - type: {{ .Values.sentinel.service.type }} - {{- if or (eq .Values.sentinel.service.type "LoadBalancer") (eq .Values.sentinel.service.type "NodePort") }} - externalTrafficPolicy: {{ .Values.sentinel.service.externalTrafficPolicy | quote }} - {{- end }} - {{- if and (eq .Values.sentinel.service.type "LoadBalancer") (not (empty .Values.sentinel.service.loadBalancerIP)) }} - loadBalancerIP: {{ .Values.sentinel.service.loadBalancerIP }} - {{- end }} - {{- if and (eq .Values.sentinel.service.type "LoadBalancer") (not (empty .Values.sentinel.service.loadBalancerSourceRanges)) }} - loadBalancerSourceRanges: {{ .Values.sentinel.service.loadBalancerSourceRanges }} - {{- end }} - {{- if and .Values.sentinel.service.clusterIP (eq .Values.sentinel.service.type "ClusterIP") }} - clusterIP: {{ .Values.sentinel.service.clusterIP }} - {{- end }} - {{- if .Values.sentinel.service.sessionAffinity }} - sessionAffinity: {{ .Values.sentinel.service.sessionAffinity }} - {{- end }} - {{- if .Values.sentinel.service.sessionAffinityConfig }} - sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.sentinel.service.sessionAffinityConfig "context" $) | nindent 4 }} - {{- end }} - ports: - - name: tcp-redis - {{- if and (or (eq .Values.sentinel.service.type "NodePort") (eq .Values.sentinel.service.type "LoadBalancer")) .Values.sentinel.service.nodePorts.redis }} - port: {{ .Values.sentinel.service.nodePorts.redis }} - {{- else if eq .Values.sentinel.service.type "NodePort" }} - port: {{ $redisport }} - {{- else}} - port: {{ .Values.sentinel.service.ports.redis }} - {{- end }} - targetPort: {{ .Values.replica.containerPorts.redis }} - {{- if and (or (eq .Values.sentinel.service.type "NodePort") (eq .Values.sentinel.service.type "LoadBalancer")) .Values.sentinel.service.nodePorts.redis }} - nodePort: {{ .Values.sentinel.service.nodePorts.redis }} - {{- else if eq .Values.sentinel.service.type "ClusterIP" }} - nodePort: null - {{- else if eq .Values.sentinel.service.type "NodePort" }} - nodePort: {{ $redisport }} - {{- end }} - - name: tcp-sentinel - {{- if and (or (eq .Values.sentinel.service.type "NodePort") (eq .Values.sentinel.service.type "LoadBalancer")) .Values.sentinel.service.nodePorts.sentinel }} - port: {{ .Values.sentinel.service.nodePorts.sentinel }} - {{- else if eq .Values.sentinel.service.type "NodePort" }} - port: {{ $sentinelport }} - {{- else }} - port: {{ .Values.sentinel.service.ports.sentinel }} - {{- end }} - targetPort: {{ .Values.sentinel.containerPorts.sentinel }} - {{- if and (or (eq .Values.sentinel.service.type "NodePort") (eq .Values.sentinel.service.type "LoadBalancer")) .Values.sentinel.service.nodePorts.sentinel }} - nodePort: {{ .Values.sentinel.service.nodePorts.sentinel }} - {{- else if eq .Values.sentinel.service.type "ClusterIP" }} - nodePort: null - {{- else if eq .Values.sentinel.service.type "NodePort" }} - nodePort: {{ $sentinelport }} - {{- end }} - {{- if eq .Values.sentinel.service.type "NodePort" }} - - name: sentinel-internal - nodePort: null - port: {{ .Values.sentinel.containerPorts.sentinel }} - protocol: TCP - targetPort: {{ .Values.sentinel.containerPorts.sentinel }} - - name: redis-internal - nodePort: null - port: {{ .Values.replica.containerPorts.redis }} - protocol: TCP - targetPort: {{ .Values.replica.containerPorts.redis }} - {{- end }} - {{- if .Values.sentinel.service.extraPorts }} - {{- include "common.tplvalues.render" (dict "value" .Values.sentinel.service.extraPorts "context" $) | nindent 4 }} - {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: node -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/sentinel/statefulset.yaml b/charts/gitlab/gitlab/charts/redis/templates/sentinel/statefulset.yaml deleted file mode 100644 index 666e9ed75..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/sentinel/statefulset.yaml +++ /dev/null @@ -1,688 +0,0 @@ -{{- if or .Release.IsUpgrade (ne .Values.sentinel.service.type "NodePort") .Values.sentinel.service.nodePorts.redis -}} -{{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled }} -apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ printf "%s-node" (include "common.names.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.replica.replicaCount }} - selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: node - serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) }} - {{- if .Values.replica.updateStrategy }} - updateStrategy: {{- toYaml .Values.replica.updateStrategy | nindent 4 }} - {{- end }} - {{- if .Values.replica.podManagementPolicy }} - podManagementPolicy: {{ .Values.replica.podManagementPolicy | quote }} - {{- end }} - template: - metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} - app.kubernetes.io/component: node - {{- if .Values.replica.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.podLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if and .Values.metrics.enabled .Values.metrics.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podLabels "context" $ ) | nindent 8 }} - {{- end }} - annotations: - {{- if (include "redis.createConfigmap" .) }} - checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- end }} - checksum/health: {{ include (print $.Template.BasePath "/health-configmap.yaml") . | sha256sum }} - checksum/scripts: {{ include (print $.Template.BasePath "/scripts-configmap.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- if .Values.replica.podAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.podAnnotations "context" $ ) | nindent 8 }} - {{- end }} - {{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podAnnotations "context" $ ) | nindent 8 }} - {{- end }} - spec: - {{- include "redis.imagePullSecrets" . | nindent 6 }} - {{- if .Values.replica.hostAliases }} - hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.replica.hostAliases "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.replica.podSecurityContext.enabled }} - securityContext: {{- omit .Values.replica.podSecurityContext "enabled" | toYaml | nindent 8 }} - {{- end }} - serviceAccountName: {{ template "redis.serviceAccountName" . }} - {{- if .Values.replica.priorityClassName }} - priorityClassName: {{ .Values.replica.priorityClassName | quote }} - {{- end }} - {{- if .Values.replica.affinity }} - affinity: {{- include "common.tplvalues.render" (dict "value" .Values.replica.affinity "context" $) | nindent 8 }} - {{- else }} - affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAffinityPreset "component" "node" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAntiAffinityPreset "component" "node" "context" $) | nindent 10 }} - nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.replica.nodeAffinityPreset.type "key" .Values.replica.nodeAffinityPreset.key "values" .Values.replica.nodeAffinityPreset.values) | nindent 10 }} - {{- end }} - {{- if .Values.replica.nodeSelector }} - nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.replica.nodeSelector "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.replica.tolerations }} - tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.replica.tolerations "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.replica.topologySpreadConstraints }} - topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.replica.topologySpreadConstraints "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.replica.shareProcessNamespace }} - shareProcessNamespace: {{ .Values.replica.shareProcessNamespace }} - {{- end }} - {{- if .Values.replica.schedulerName }} - schedulerName: {{ .Values.replica.schedulerName | quote }} - {{- end }} - {{- if .Values.replica.dnsPolicy }} - dnsPolicy: {{ .Values.replica.dnsPolicy }} - {{- end }} - {{- if .Values.replica.dnsConfig }} - dnsConfig: {{- include "common.tplvalues.render" (dict "value" .Values.replica.dnsConfig "context" $) | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: {{ .Values.sentinel.terminationGracePeriodSeconds }} - containers: - - name: redis - image: {{ template "redis.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.replica.lifecycleHooks }} - lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.replica.lifecycleHooks "context" $) | nindent 12 }} - {{- else }} - lifecycle: - preStop: - exec: - command: - - /bin/bash - - -c - - /opt/bitnami/scripts/start-scripts/prestop-redis.sh - {{- end }} - {{- end }} - {{- if .Values.replica.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.replica.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} - {{- else if .Values.replica.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.replica.command "context" $) | nindent 12 }} - {{- else }} - command: - - /bin/bash - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} - {{- else if .Values.replica.args }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.replica.args "context" $) | nindent 12 }} - {{- else }} - args: - - -c - - /opt/bitnami/scripts/start-scripts/start-node.sh - {{- end }} - env: - - name: BITNAMI_DEBUG - value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }} - - name: REDIS_MASTER_PORT_NUMBER - value: {{ .Values.replica.containerPorts.redis | quote }} - - name: ALLOW_EMPTY_PASSWORD - value: {{ ternary "no" "yes" .Values.auth.enabled | quote }} - {{- if .Values.auth.enabled }} - {{- if .Values.auth.usePasswordFiles }} - - name: REDIS_PASSWORD_FILE - value: "/opt/bitnami/redis/secrets/redis-password" - - name: REDIS_MASTER_PASSWORD_FILE - value: "/opt/bitnami/redis/secrets/redis-password" - {{- else }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: {{ template "redis.secretPasswordKey" . }} - - name: REDIS_MASTER_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: {{ template "redis.secretPasswordKey" . }} - {{- end }} - {{- end }} - - name: REDIS_TLS_ENABLED - value: {{ ternary "yes" "no" .Values.tls.enabled | quote }} - {{- if .Values.tls.enabled }} - - name: REDIS_TLS_PORT - value: {{ .Values.replica.containerPorts.redis | quote }} - - name: REDIS_TLS_AUTH_CLIENTS - value: {{ ternary "yes" "no" .Values.tls.authClients | quote }} - - name: REDIS_TLS_CERT_FILE - value: {{ template "redis.tlsCert" . }} - - name: REDIS_TLS_KEY_FILE - value: {{ template "redis.tlsCertKey" . }} - - name: REDIS_TLS_CA_FILE - value: {{ template "redis.tlsCACert" . }} - {{- if .Values.tls.dhParamsFilename }} - - name: REDIS_TLS_DH_PARAMS_FILE - value: {{ template "redis.tlsDHParams" . }} - {{- end }} - {{- else }} - - name: REDIS_PORT - value: {{ .Values.replica.containerPorts.redis | quote }} - {{- end }} - - name: REDIS_DATA_DIR - value: {{ .Values.replica.persistence.path }} - {{- if .Values.replica.externalMaster.enabled }} - - name: REDIS_EXTERNAL_MASTER_HOST - value: {{ .Values.replica.externalMaster.host | quote }} - - name: REDIS_EXTERNAL_MASTER_PORT - value: {{ .Values.replica.externalMaster.port | quote }} - {{- end }} - {{- if .Values.replica.extraEnvVars }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.extraEnvVars "context" $ ) | nindent 12 }} - {{- end }} - {{- if or .Values.replica.extraEnvVarsCM .Values.replica.extraEnvVarsSecret }} - envFrom: - {{- if .Values.replica.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.replica.extraEnvVarsCM }} - {{- end }} - {{- if .Values.replica.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.replica.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: redis - containerPort: {{ .Values.replica.containerPorts.redis }} - {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.replica.startupProbe.enabled }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.replica.startupProbe "enabled") "context" $) | nindent 12 }} - tcpSocket: - port: redis - {{- else if .Values.replica.customStartupProbe }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.replica.customStartupProbe "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.replica.livenessProbe.enabled }} - livenessProbe: - initialDelaySeconds: {{ .Values.replica.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.replica.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.replica.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.replica.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.replica.livenessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_liveness_local.sh {{ .Values.replica.livenessProbe.timeoutSeconds }} - {{- else if .Values.replica.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.replica.customLivenessProbe "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.replica.readinessProbe.enabled }} - readinessProbe: - initialDelaySeconds: {{ .Values.replica.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.replica.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.replica.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.replica.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.replica.readinessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_readiness_local.sh {{ .Values.replica.readinessProbe.timeoutSeconds }} - {{- else if .Values.replica.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.replica.customReadinessProbe "context" $) | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.replica.resources }} - resources: {{- toYaml .Values.replica.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: start-scripts - mountPath: /opt/bitnami/scripts/start-scripts - - name: health - mountPath: /health - {{- if .Values.sentinel.persistence.enabled }} - - name: sentinel-data - mountPath: /opt/bitnami/redis-sentinel/etc - {{- end }} - {{- if .Values.auth.usePasswordFiles }} - - name: redis-password - mountPath: /opt/bitnami/redis/secrets/ - {{- end }} - - name: redis-data - mountPath: {{ .Values.replica.persistence.path }} - subPath: {{ .Values.replica.persistence.subPath }} - - name: config - mountPath: /opt/bitnami/redis/mounted-etc - - name: redis-tmp-conf - mountPath: /opt/bitnami/redis/etc - - name: tmp - mountPath: /tmp - {{- if .Values.tls.enabled }} - - name: redis-certificates - mountPath: /opt/bitnami/redis/certs - readOnly: true - {{- end }} - {{- if .Values.replica.extraVolumeMounts }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.extraVolumeMounts "context" $ ) | nindent 12 }} - {{- end }} - - name: sentinel - image: {{ template "redis.sentinel.image" . }} - imagePullPolicy: {{ .Values.sentinel.image.pullPolicy | quote }} - {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.sentinel.lifecycleHooks }} - lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.sentinel.lifecycleHooks "context" $) | nindent 12 }} - {{- else }} - lifecycle: - preStop: - exec: - command: - - /bin/bash - - -c - - /opt/bitnami/scripts/start-scripts/prestop-sentinel.sh - {{- end }} - {{- end }} - {{- if .Values.sentinel.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.sentinel.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} - {{- else if .Values.sentinel.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.sentinel.command "context" $) | nindent 12 }} - {{- else }} - command: - - /bin/bash - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} - {{- else if .Values.sentinel.args }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.sentinel.args "context" $) | nindent 12 }} - {{- else }} - args: - - -c - - /opt/bitnami/scripts/start-scripts/start-sentinel.sh - {{- end }} - env: - - name: BITNAMI_DEBUG - value: {{ ternary "true" "false" (or .Values.sentinel.image.debug .Values.diagnosticMode.enabled) | quote }} - {{- if .Values.auth.enabled }} - {{- if .Values.auth.usePasswordFiles }} - - name: REDIS_PASSWORD_FILE - value: "/opt/bitnami/redis/secrets/redis-password" - {{- else }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: {{ template "redis.secretPasswordKey" . }} - {{- end }} - {{- else }} - - name: ALLOW_EMPTY_PASSWORD - value: "yes" - {{- end }} - - name: REDIS_SENTINEL_TLS_ENABLED - value: {{ ternary "yes" "no" .Values.tls.enabled | quote }} - {{- if .Values.tls.enabled }} - - name: REDIS_SENTINEL_TLS_PORT_NUMBER - value: {{ .Values.sentinel.containerPorts.sentinel | quote }} - - name: REDIS_SENTINEL_TLS_AUTH_CLIENTS - value: {{ ternary "yes" "no" .Values.tls.authClients | quote }} - - name: REDIS_SENTINEL_TLS_CERT_FILE - value: {{ template "redis.tlsCert" . }} - - name: REDIS_SENTINEL_TLS_KEY_FILE - value: {{ template "redis.tlsCertKey" . }} - - name: REDIS_SENTINEL_TLS_CA_FILE - value: {{ template "redis.tlsCACert" . }} - {{- if .Values.tls.dhParamsFilename }} - - name: REDIS_SENTINEL_TLS_DH_PARAMS_FILE - value: {{ template "redis.tls.dhParamsFilename" . }} - {{- end }} - {{- else }} - - name: REDIS_SENTINEL_PORT - value: {{ .Values.sentinel.containerPorts.sentinel | quote }} - {{- end }} - {{- if .Values.sentinel.externalMaster.enabled }} - - name: REDIS_EXTERNAL_MASTER_HOST - value: {{ .Values.sentinel.externalMaster.host | quote }} - - name: REDIS_EXTERNAL_MASTER_PORT - value: {{ .Values.sentinel.externalMaster.port | quote }} - {{- end }} - {{- if .Values.sentinel.extraEnvVars }} - {{- include "common.tplvalues.render" ( dict "value" .Values.sentinel.extraEnvVars "context" $ ) | nindent 12 }} - {{- end }} - {{- if or .Values.sentinel.extraEnvVarsCM .Values.sentinel.extraEnvVarsSecret }} - envFrom: - {{- if .Values.sentinel.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.sentinel.extraEnvVarsCM }} - {{- end }} - {{- if .Values.sentinel.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.sentinel.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: redis-sentinel - containerPort: {{ .Values.sentinel.containerPorts.sentinel }} - {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.sentinel.startupProbe.enabled }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.sentinel.startupProbe "enabled") "context" $) | nindent 12 }} - tcpSocket: - port: redis-sentinel - {{- else if .Values.sentinel.customStartupProbe }} - startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.sentinel.customStartupProbe "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.sentinel.livenessProbe.enabled }} - livenessProbe: - initialDelaySeconds: {{ .Values.sentinel.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.sentinel.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.sentinel.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.sentinel.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.sentinel.livenessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_sentinel.sh {{ .Values.sentinel.livenessProbe.timeoutSeconds }} - {{- else if .Values.sentinel.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.sentinel.customLivenessProbe "context" $) | nindent 12 }} - {{- end }} - {{- end }} - {{- if not .Values.diagnosticMode.enabled }} - {{- if .Values.sentinel.readinessProbe.enabled }} - readinessProbe: - initialDelaySeconds: {{ .Values.sentinel.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.sentinel.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.sentinel.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.sentinel.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.sentinel.readinessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_sentinel.sh {{ .Values.sentinel.livenessProbe.timeoutSeconds }} - {{- else if .Values.sentinel.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.sentinel.customReadinessProbe "context" $) | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.sentinel.resources }} - resources: {{- toYaml .Values.sentinel.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: start-scripts - mountPath: /opt/bitnami/scripts/start-scripts - - name: health - mountPath: /health - - name: sentinel-data - mountPath: /opt/bitnami/redis-sentinel/etc - {{- if .Values.auth.usePasswordFiles }} - - name: redis-password - mountPath: /opt/bitnami/redis/secrets/ - {{- end }} - - name: redis-data - mountPath: {{ .Values.replica.persistence.path }} - subPath: {{ .Values.replica.persistence.subPath }} - - name: config - mountPath: /opt/bitnami/redis-sentinel/mounted-etc - {{- if .Values.tls.enabled }} - - name: redis-certificates - mountPath: /opt/bitnami/redis/certs - readOnly: true - {{- end }} - {{- if .Values.sentinel.extraVolumeMounts }} - {{- include "common.tplvalues.render" ( dict "value" .Values.sentinel.extraVolumeMounts "context" $ ) | nindent 12 }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "redis.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - {{- if .Values.metrics.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.metrics.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} - {{- else }} - command: - - /bin/bash - - -c - - | - if [[ -f '/secrets/redis-password' ]]; then - export REDIS_PASSWORD=$(cat /secrets/redis-password) - fi - redis_exporter{{- range $key, $value := .Values.metrics.extraArgs }} --{{ $key }}={{ $value }}{{- end }} - {{- end }} - {{- if .Values.diagnosticMode.enabled }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} - {{- end }} - env: - - name: REDIS_ALIAS - value: {{ template "common.names.fullname" . }} - {{- if .Values.auth.enabled }} - - name: REDIS_USER - value: default - {{- if (not .Values.auth.usePasswordFiles) }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: {{ template "redis.secretPasswordKey" . }} - {{- end }} - {{- end }} - {{- if .Values.tls.enabled }} - - name: REDIS_ADDR - value: rediss://{{ .Values.metrics.redisTargetHost }}:{{ .Values.replica.containerPorts.redis }} - {{- if .Values.tls.authClients }} - - name: REDIS_EXPORTER_TLS_CLIENT_KEY_FILE - value: {{ template "redis.tlsCertKey" . }} - - name: REDIS_EXPORTER_TLS_CLIENT_CERT_FILE - value: {{ template "redis.tlsCert" . }} - {{- end }} - - name: REDIS_EXPORTER_TLS_CA_CERT_FILE - value: {{ template "redis.tlsCACert" . }} - {{- end }} - {{- if .Values.metrics.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - ports: - - name: metrics - containerPort: 9121 - {{- if .Values.metrics.resources }} - resources: {{- toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - volumeMounts: - {{- if .Values.auth.usePasswordFiles }} - - name: redis-password - mountPath: /secrets/ - {{- end }} - {{- if .Values.tls.enabled }} - - name: redis-certificates - mountPath: /opt/bitnami/redis/certs - readOnly: true - {{- end }} - {{- if .Values.metrics.extraVolumeMounts }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumeMounts "context" $ ) | nindent 12 }} - {{- end }} - {{- end }} - {{- if .Values.replica.sidecars }} - {{- include "common.tplvalues.render" (dict "value" .Values.replica.sidecars "context" $) | nindent 8 }} - {{- end }} - {{- $needsVolumePermissions := and .Values.volumePermissions.enabled .Values.replica.persistence.enabled .Values.replica.podSecurityContext.enabled .Values.replica.containerSecurityContext.enabled }} - {{- if or .Values.replica.initContainers $needsVolumePermissions .Values.sysctl.enabled }} - initContainers: - {{- if .Values.replica.initContainers }} - {{- include "common.tplvalues.render" (dict "value" .Values.replica.initContainers "context" $) | nindent 8 }} - {{- end }} - {{- if $needsVolumePermissions }} - - name: volume-permissions - image: {{ include "redis.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: - - /bin/bash - - -ec - - | - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - chown -R `id -u`:`id -G | cut -d " " -f2` {{ .Values.replica.persistence.path }} - {{- else }} - chown -R {{ .Values.replica.containerSecurityContext.runAsUser }}:{{ .Values.replica.podSecurityContext.fsGroup }} {{ .Values.replica.persistence.path }} - {{- end }} - {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }} - securityContext: {{- omit .Values.volumePermissions.containerSecurityContext "runAsUser" | toYaml | nindent 12 }} - {{- else }} - securityContext: {{- .Values.volumePermissions.containerSecurityContext | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.volumePermissions.resources }} - resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: redis-data - mountPath: {{ .Values.replica.persistence.path }} - subPath: {{ .Values.replica.persistence.subPath }} - {{- end }} - {{- if .Values.sysctl.enabled }} - - name: init-sysctl - image: {{ include "redis.sysctl.image" . }} - imagePullPolicy: {{ default "" .Values.sysctl.image.pullPolicy | quote }} - securityContext: - privileged: true - runAsUser: 0 - {{- if .Values.sysctl.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.sysctl.command "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.sysctl.resources }} - resources: {{- toYaml .Values.sysctl.resources | nindent 12 }} - {{- end }} - {{- if .Values.sysctl.mountHostSys }} - volumeMounts: - - name: host-sys - mountPath: /host-sys - {{- end }} - {{- end }} - {{- end }} - volumes: - - name: start-scripts - configMap: - name: {{ printf "%s-scripts" (include "common.names.fullname" .) }} - defaultMode: 0755 - - name: health - configMap: - name: {{ printf "%s-health" (include "common.names.fullname" .) }} - defaultMode: 0755 - {{- if .Values.auth.usePasswordFiles }} - - name: redis-password - secret: - secretName: {{ template "redis.secretName" . }} - items: - - key: {{ template "redis.secretPasswordKey" . }} - path: redis-password - {{- end }} - - name: config - configMap: - name: {{ include "redis.configmapName" . }} - {{- if .Values.sysctl.mountHostSys }} - - name: host-sys - hostPath: - path: /sys - {{- end }} - {{- if not .Values.sentinel.persistence.enabled }} - - name: sentinel-data - {{- if .Values.sentinel.persistence.medium }} - emptyDir: { - medium: {{ .Values.sentinel.persistence.medium | quote }} - } - {{- else }} - emptyDir: {} - {{- end }} - {{- end }} - - name: redis-tmp-conf - {{- if .Values.replica.persistence.medium }} - emptyDir: { - medium: {{ .Values.replica.persistence.medium | quote }} - } - {{- else }} - emptyDir: {} - {{- end }} - - name: tmp - {{- if .Values.replica.persistence.medium }} - emptyDir: { - medium: {{ .Values.replica.persistence.medium | quote }} - } - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.replica.extraVolumes }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.extraVolumes "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.metrics.extraVolumes }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumes "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.sentinel.extraVolumes }} - {{- include "common.tplvalues.render" ( dict "value" .Values.sentinel.extraVolumes "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.tls.enabled }} - - name: redis-certificates - secret: - secretName: {{ include "redis.tlsSecretName" . }} - defaultMode: 256 - {{- end }} - {{- if not .Values.replica.persistence.enabled }} - - name: redis-data - {{- if .Values.replica.persistence.medium }} - emptyDir: { - medium: {{ .Values.replica.persistence.medium | quote }} - } - {{- else }} - emptyDir: {} - {{- end }} - {{- else }} - volumeClaimTemplates: - - metadata: - name: redis-data - labels: {{- include "common.labels.matchLabels" . | nindent 10 }} - app.kubernetes.io/component: node - {{- if .Values.replica.persistence.annotations }} - annotations: {{- toYaml .Values.replica.persistence.annotations | nindent 10 }} - {{- end }} - spec: - accessModes: - {{- range .Values.replica.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.replica.persistence.size | quote }} - {{- if .Values.replica.persistence.selector }} - selector: {{- include "common.tplvalues.render" ( dict "value" .Values.replica.persistence.selector "context" $) | nindent 10 }} - {{- end }} - {{- include "common.storage.class" (dict "persistence" .Values.replica.persistence "global" .Values.global) | nindent 8 }} - {{- if .Values.sentinel.persistence.enabled }} - - metadata: - name: sentinel-data - labels: {{- include "common.labels.matchLabels" . | nindent 10 }} - app.kubernetes.io/component: node - {{- if .Values.sentinel.persistence.annotations }} - annotations: {{- toYaml .Values.sentinel.persistence.annotations | nindent 10 }} - {{- end }} - spec: - accessModes: - {{- range .Values.sentinel.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.sentinel.persistence.size | quote }} - {{- if .Values.sentinel.persistence.selector }} - selector: {{- include "common.tplvalues.render" ( dict "value" .Values.sentinel.persistence.selector "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.sentinel.persistence.dataSource }} - dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.sentinel.persistence.dataSource "context" $) | nindent 10 }} - {{- end }} - {{- include "common.storage.class" (dict "persistence" .Values.sentinel.persistence "global" .Values.global) | nindent 8 }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/redis/templates/serviceaccount.yaml deleted file mode 100644 index 1ce68a769..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/serviceaccount.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} -metadata: - name: {{ template "redis.serviceAccountName" . }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.serviceAccount.annotations }} - annotations: - {{- if or .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/redis/templates/servicemonitor.yaml deleted file mode 100644 index 40754c217..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/servicemonitor.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "common.names.fullname" . }} - namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.metrics.serviceMonitor.additionalLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - endpoints: - - port: http-metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.honorLabels }} - honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.relabellings }} - relabelings: {{- toYaml .Values.metrics.serviceMonitor.relabellings | nindent 6 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 6 }} - {{- end }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} - selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: metrics -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/templates/tls-secret.yaml b/charts/gitlab/gitlab/charts/redis/templates/tls-secret.yaml deleted file mode 100644 index 4ab7acb58..000000000 --- a/charts/gitlab/gitlab/charts/redis/templates/tls-secret.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if (include "redis.createTlsSecret" .) }} -{{- $secretName := printf "%s-crt" (include "common.names.fullname" .) }} -{{- $existingCerts := (lookup "v1" "Secret" .Release.Namespace $secretName).data | default dict }} -{{- $ca := genCA "redis-ca" 365 }} -{{- $releaseNamespace := .Release.Namespace }} -{{- $clusterDomain := .Values.clusterDomain }} -{{- $fullname := include "common.names.fullname" . }} -{{- $serviceName := include "common.names.fullname" . }} -{{- $headlessServiceName := printf "%s-headless" (include "common.names.fullname" .) }} -{{- $altNames := list (printf "*.%s.%s.svc.%s" $serviceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $serviceName $releaseNamespace $clusterDomain) (printf "*.%s.%s.svc.%s" $headlessServiceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $headlessServiceName $releaseNamespace $clusterDomain) "127.0.0.1" "localhost" $fullname }} -{{- $crt := genSignedCert $fullname nil $altNames 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ $secretName }} - namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -type: kubernetes.io/tls -data: - ca.crt: {{ (get $existingCerts "ca.crt") | default ($ca.Cert | b64enc | quote ) }} - tls.crt: {{ (get $existingCerts "tls.crt") | default ($crt.Cert | b64enc | quote) }} - tls.key: {{ (get $existingCerts "tls.key") | default ($crt.Key | b64enc | quote) }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/redis/values.schema.json b/charts/gitlab/gitlab/charts/redis/values.schema.json deleted file mode 100644 index d6e226b82..000000000 --- a/charts/gitlab/gitlab/charts/redis/values.schema.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "architecture": { - "type": "string", - "title": "Redis architecture", - "form": true, - "description": "Allowed values: `standalone` or `replication`", - "enum": ["standalone", "replication"] - }, - "auth": { - "type": "object", - "title": "Authentication configuration", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Use password authentication" - }, - "password": { - "type": "string", - "title": "Redis password", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "auth/enabled" - } - } - } - }, - "master": { - "type": "object", - "title": "Master replicas settings", - "form": true, - "properties": { - "kind": { - "type": "string", - "title": "Workload Kind", - "form": true, - "description": "Allowed values: `Deployment` or `StatefulSet`", - "enum": ["Deployment", "StatefulSet"] - }, - "persistence": { - "type": "object", - "title": "Persistence for master replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "master/persistence/enabled" - } - } - } - } - } - }, - "replica": { - "type": "object", - "title": "Redis replicas settings", - "form": true, - "hidden": { - "value": "standalone", - "path": "architecture" - }, - "properties": { - "replicaCount": { - "type": "integer", - "form": true, - "title": "Number of Redis replicas" - }, - "persistence": { - "type": "object", - "title": "Persistence for Redis replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "replica/persistence/enabled" - } - } - } - } - } - }, - "volumePermissions": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable Init Containers", - "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" - } - } - }, - "metrics": { - "type": "object", - "form": true, - "title": "Prometheus metrics details", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus metrics exporter", - "description": "Create a side-car container to expose Prometheus metrics", - "form": true - }, - "serviceMonitor": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus Operator ServiceMonitor", - "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", - "form": true, - "hidden": { - "value": false, - "path": "metrics/enabled" - } - } - } - } - } - } - } -} diff --git a/charts/gitlab/gitlab/charts/redis/values.yaml b/charts/gitlab/gitlab/charts/redis/values.yaml deleted file mode 100644 index c25a3b219..000000000 --- a/charts/gitlab/gitlab/charts/redis/values.yaml +++ /dev/null @@ -1,1621 +0,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.storageClass Global StorageClass for Persistent Volume(s) -## @param global.redis.password Global Redis® password (overrides `auth.password`) -## -global: - imageRegistry: "" - ## E.g. - ## imagePullSecrets: - ## - myRegistryKeySecretName - ## - imagePullSecrets: [] - storageClass: "" - redis: - password: "" - -## @section Common parameters -## - -## @param kubeVersion Override Kubernetes version -## -kubeVersion: "" -## @param nameOverride String to partially override common.names.fullname -## -nameOverride: "" -## @param fullnameOverride String to fully override common.names.fullname -## -fullnameOverride: "" -## @param commonLabels Labels to add to all deployed objects -## -commonLabels: {} -## @param commonAnnotations Annotations to add to all deployed objects -## -commonAnnotations: {} -## @param secretAnnotations Annotations to add to secret -## -secretAnnotations: {} -## @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 Redis® Image parameters -## - -## Bitnami Redis® image -## ref: https://hub.docker.com/r/bitnami/redis/tags/ -## @param image.registry Redis® image registry -## @param image.repository Redis® image repository -## @param image.tag Redis® image tag (immutable tags are recommended) -## @param image.pullPolicy Redis® image pull policy -## @param image.pullSecrets Redis® image pull secrets -## @param image.debug Enable image debug mode -## -image: - registry: docker.io - repository: bitnami/redis - tag: 6.2.7-debian-11-r11 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-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: [] - ## Enable debug mode - ## - debug: false - -## @section Redis® common configuration parameters -## https://github.com/bitnami/bitnami-docker-redis#configuration -## - -## @param architecture Redis® architecture. Allowed values: `standalone` or `replication` -## -architecture: replication -## Redis® Authentication parameters -## ref: https://github.com/bitnami/bitnami-docker-redis#setting-the-server-password-on-first-run -## -auth: - ## @param auth.enabled Enable password authentication - ## - enabled: true - ## @param auth.sentinel Enable password authentication on sentinels too - ## - sentinel: true - ## @param auth.password Redis® password - ## Defaults to a random 10-character alphanumeric string if not set - ## - password: "" - ## @param auth.existingSecret The name of an existing secret with Redis® credentials - ## NOTE: When it's set, the previous `auth.password` parameter is ignored - ## - existingSecret: "" - ## @param auth.existingSecretPasswordKey Password key to be retrieved from existing secret - ## NOTE: ignored unless `auth.existingSecret` parameter is set - ## - existingSecretPasswordKey: "" - ## @param auth.usePasswordFiles Mount credentials as files instead of using an environment variable - ## - usePasswordFiles: false - -## @param commonConfiguration [string] Common configuration to be added into the ConfigMap -## ref: https://redis.io/topics/config -## -commonConfiguration: |- - # Enable AOF https://redis.io/topics/persistence#append-only-file - appendonly yes - # Disable RDB persistence, AOF persistence already enabled. - save "" -## @param existingConfigmap The name of an existing ConfigMap with your custom configuration for Redis® nodes -## -existingConfigmap: "" - -## @section Redis® master configuration parameters -## - -master: - ## @param master.count Number of Redis® master instances to deploy (experimental, requires additional configuration) - ## - count: 1 - ## @param master.configuration Configuration for Redis® master nodes - ## ref: https://redis.io/topics/config - ## - configuration: "" - ## @param master.disableCommands Array with Redis® commands to disable on master nodes - ## Commands will be completely disabled by renaming each to an empty string. - ## ref: https://redis.io/topics/security#disabling-of-specific-commands - ## - disableCommands: - - FLUSHDB - - FLUSHALL - ## @param master.command Override default container command (useful when using custom images) - ## - command: [] - ## @param master.args Override default container args (useful when using custom images) - ## - args: [] - ## @param master.preExecCmds Additional commands to run prior to starting Redis® master - ## - preExecCmds: [] - ## @param master.extraFlags Array with additional command line flags for Redis® master - ## e.g: - ## extraFlags: - ## - "--maxmemory-policy volatile-ttl" - ## - "--repl-backlog-size 1024mb" - ## - extraFlags: [] - ## @param master.extraEnvVars Array with extra environment variables to add to Redis® master nodes - ## e.g: - ## extraEnvVars: - ## - name: FOO - ## value: "bar" - ## - extraEnvVars: [] - ## @param master.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for Redis® master nodes - ## - extraEnvVarsCM: "" - ## @param master.extraEnvVarsSecret Name of existing Secret containing extra env vars for Redis® master nodes - ## - extraEnvVarsSecret: "" - ## @param master.containerPorts.redis Container port to open on Redis® master nodes - ## - containerPorts: - redis: 6379 - ## Configure extra options for Redis® containers' liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes - ## @param master.startupProbe.enabled Enable startupProbe on Redis® master nodes - ## @param master.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe - ## @param master.startupProbe.periodSeconds Period seconds for startupProbe - ## @param master.startupProbe.timeoutSeconds Timeout seconds for startupProbe - ## @param master.startupProbe.failureThreshold Failure threshold for startupProbe - ## @param master.startupProbe.successThreshold Success threshold for startupProbe - ## - startupProbe: - enabled: false - initialDelaySeconds: 20 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - ## @param master.livenessProbe.enabled Enable livenessProbe on Redis® master nodes - ## @param master.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe - ## @param master.livenessProbe.periodSeconds Period seconds for livenessProbe - ## @param master.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe - ## @param master.livenessProbe.failureThreshold Failure threshold for livenessProbe - ## @param master.livenessProbe.successThreshold Success threshold for livenessProbe - ## - livenessProbe: - enabled: true - initialDelaySeconds: 20 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - ## @param master.readinessProbe.enabled Enable readinessProbe on Redis® master nodes - ## @param master.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe - ## @param master.readinessProbe.periodSeconds Period seconds for readinessProbe - ## @param master.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe - ## @param master.readinessProbe.failureThreshold Failure threshold for readinessProbe - ## @param master.readinessProbe.successThreshold Success threshold for readinessProbe - ## - readinessProbe: - enabled: true - initialDelaySeconds: 20 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - ## @param master.customStartupProbe Custom startupProbe that overrides the default one - ## - customStartupProbe: {} - ## @param master.customLivenessProbe Custom livenessProbe that overrides the default one - ## - customLivenessProbe: {} - ## @param master.customReadinessProbe Custom readinessProbe that overrides the default one - ## - customReadinessProbe: {} - ## Redis® master resource requests and limits - ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## @param master.resources.limits The resources limits for the Redis® master containers - ## @param master.resources.requests The requested resources for the Redis® master containers - ## - resources: - limits: {} - requests: {} - ## Configure Pods Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod - ## @param master.podSecurityContext.enabled Enabled Redis® master pods' Security Context - ## @param master.podSecurityContext.fsGroup Set Redis® master pod's Security Context fsGroup - ## - podSecurityContext: - enabled: true - fsGroup: 1001 - ## Configure Container Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod - ## @param master.containerSecurityContext.enabled Enabled Redis® master containers' Security Context - ## @param master.containerSecurityContext.runAsUser Set Redis® master containers' Security Context runAsUser - ## - containerSecurityContext: - enabled: true - runAsUser: 1001 - ## @param master.kind Use either Deployment or StatefulSet (default) - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ - ## - kind: StatefulSet - ## @param master.schedulerName Alternate scheduler for Redis® master pods - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - schedulerName: "" - ## @param master.updateStrategy.type Redis® master statefulset strategy type - ## @skip master.updateStrategy.rollingUpdate - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - ## - updateStrategy: - ## StrategyType - ## Can be set to RollingUpdate or OnDelete - ## - type: RollingUpdate - rollingUpdate: {} - ## @param master.priorityClassName Redis® master pods' priorityClassName - ## - priorityClassName: "" - ## @param master.hostAliases Redis® master pods host aliases - ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ - ## - hostAliases: [] - ## @param master.podLabels Extra labels for Redis® master pods - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - ## - podLabels: {} - ## @param master.podAnnotations Annotations for Redis® master pods - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - ## - podAnnotations: {} - ## @param master.shareProcessNamespace Share a single process namespace between all of the containers in Redis® master pods - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ - ## - shareProcessNamespace: false - ## @param master.podAffinityPreset Pod affinity preset. Ignored if `master.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 master.podAntiAffinityPreset Pod anti-affinity preset. Ignored if `master.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 master.affinity preset - ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity - ## - nodeAffinityPreset: - ## @param master.nodeAffinityPreset.type Node affinity preset type. Ignored if `master.affinity` is set. Allowed values: `soft` or `hard` - ## - type: "" - ## @param master.nodeAffinityPreset.key Node label key to match. Ignored if `master.affinity` is set - ## - key: "" - ## @param master.nodeAffinityPreset.values Node label values to match. Ignored if `master.affinity` is set - ## E.g. - ## values: - ## - e2e-az1 - ## - e2e-az2 - ## - values: [] - ## @param master.affinity Affinity for Redis® master pods assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## NOTE: `master.podAffinityPreset`, `master.podAntiAffinityPreset`, and `master.nodeAffinityPreset` will be ignored when it's set - ## - affinity: {} - ## @param master.nodeSelector Node labels for Redis® master pods assignment - ## ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - ## @param master.tolerations Tolerations for Redis® master pods assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - ## @param master.topologySpreadConstraints Spread Constraints for Redis® master pod assignment - ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - ## E.g. - ## topologySpreadConstraints: - ## - maxSkew: 1 - ## topologyKey: node - ## whenUnsatisfiable: DoNotSchedule - ## - topologySpreadConstraints: [] - ## @param master.dnsPolicy DNS Policy for Redis® master pod - ## ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ - ## E.g. - ## dnsPolicy: ClusterFirst - dnsPolicy: "" - ## @param master.dnsConfig DNS Configuration for Redis® master pod - ## ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ - ## E.g. - ## dnsConfig: - ## options: - ## - name: ndots - ## value: "4" - ## - name: single-request-reopen - dnsConfig: {} - ## @param master.lifecycleHooks for the Redis® master container(s) to automate configuration before or after startup - ## - lifecycleHooks: {} - ## @param master.extraVolumes Optionally specify extra list of additional volumes for the Redis® master pod(s) - ## - extraVolumes: [] - ## @param master.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Redis® master container(s) - ## - extraVolumeMounts: [] - ## @param master.sidecars Add additional sidecar containers to the Redis® master pod(s) - ## e.g: - ## sidecars: - ## - name: your-image-name - ## image: your-image - ## imagePullPolicy: Always - ## ports: - ## - name: portname - ## containerPort: 1234 - ## - sidecars: [] - ## @param master.initContainers Add additional init containers to the Redis® master pod(s) - ## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - ## e.g: - ## initContainers: - ## - name: your-image-name - ## image: your-image - ## imagePullPolicy: Always - ## command: ['sh', '-c', 'echo "hello world"'] - ## - initContainers: [] - ## Persistence parameters - ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## @param master.persistence.enabled Enable persistence on Redis® master nodes using Persistent Volume Claims - ## - enabled: true - ## @param master.persistence.medium Provide a medium for `emptyDir` volumes. - ## - medium: "" - ## @param master.persistence.sizeLimit Set this to enable a size limit for `emptyDir` volumes. - ## - sizeLimit: "" - ## @param master.persistence.path The path the volume will be mounted at on Redis® master containers - ## NOTE: Useful when using different Redis® images - ## - path: /data - ## @param master.persistence.subPath The subdirectory of the volume to mount on Redis® master containers - ## NOTE: Useful in dev environments - ## - subPath: "" - ## @param master.persistence.storageClass Persistent Volume storage class - ## 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 - ## - storageClass: "" - ## @param master.persistence.accessModes Persistent Volume access modes - ## - accessModes: - - ReadWriteOnce - ## @param master.persistence.size Persistent Volume size - ## - size: 8Gi - ## @param master.persistence.annotations Additional custom annotations for the PVC - ## - annotations: {} - ## @param master.persistence.selector Additional labels to match for the PVC - ## e.g: - ## selector: - ## matchLabels: - ## app: my-app - ## - selector: {} - ## @param master.persistence.dataSource Custom PVC data source - ## - dataSource: {} - ## @param master.persistence.existingClaim Use a existing PVC which must be created manually before bound - ## NOTE: requires master.persistence.enabled: true - ## - existingClaim: "" - ## Redis® master service parameters - ## - service: - ## @param master.service.type Redis® master service type - ## - type: ClusterIP - ## @param master.service.ports.redis Redis® master service port - ## - ports: - redis: 6379 - ## @param master.service.nodePorts.redis Node port for Redis® master - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## NOTE: choose port between <30000-32767> - ## - nodePorts: - redis: "" - ## @param master.service.externalTrafficPolicy Redis® master service external traffic policy - ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip - ## - externalTrafficPolicy: Cluster - ## @param master.service.extraPorts Extra ports to expose (normally used with the `sidecar` value) - ## - extraPorts: [] - ## @param master.service.internalTrafficPolicy Redis® master service internal traffic policy (requires Kubernetes v1.22 or greater to be usable) - ## ref: https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/ - ## - internalTrafficPolicy: Cluster - ## @param master.service.clusterIP Redis® master service Cluster IP - ## - clusterIP: "" - ## @param master.service.loadBalancerIP Redis® master service Load Balancer IP - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - loadBalancerIP: "" - ## @param master.service.loadBalancerSourceRanges Redis® master service Load Balancer sources - ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service - ## e.g. - ## loadBalancerSourceRanges: - ## - 10.10.10.0/24 - ## - loadBalancerSourceRanges: [] - ## @param master.service.annotations Additional custom annotations for Redis® master service - ## - annotations: {} - ## @param master.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP" - ## If "ClientIP", consecutive client requests will be directed to the same Pod - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - ## - sessionAffinity: None - ## @param master.service.sessionAffinityConfig Additional settings for the sessionAffinity - ## sessionAffinityConfig: - ## clientIP: - ## timeoutSeconds: 300 - ## - sessionAffinityConfig: {} - ## @param master.terminationGracePeriodSeconds Integer setting the termination grace period for the redis-master pods - ## - terminationGracePeriodSeconds: 30 - -## @section Redis® replicas configuration parameters -## - -replica: - ## @param replica.replicaCount Number of Redis® replicas to deploy - ## - replicaCount: 3 - ## @param replica.configuration Configuration for Redis® replicas nodes - ## ref: https://redis.io/topics/config - ## - configuration: "" - ## @param replica.disableCommands Array with Redis® commands to disable on replicas nodes - ## Commands will be completely disabled by renaming each to an empty string. - ## ref: https://redis.io/topics/security#disabling-of-specific-commands - ## - disableCommands: - - FLUSHDB - - FLUSHALL - ## @param replica.command Override default container command (useful when using custom images) - ## - command: [] - ## @param replica.args Override default container args (useful when using custom images) - ## - args: [] - ## @param replica.preExecCmds Additional commands to run prior to starting Redis® replicas - ## - preExecCmds: [] - ## @param replica.extraFlags Array with additional command line flags for Redis® replicas - ## e.g: - ## extraFlags: - ## - "--maxmemory-policy volatile-ttl" - ## - "--repl-backlog-size 1024mb" - ## - extraFlags: [] - ## @param replica.extraEnvVars Array with extra environment variables to add to Redis® replicas nodes - ## e.g: - ## extraEnvVars: - ## - name: FOO - ## value: "bar" - ## - extraEnvVars: [] - ## @param replica.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for Redis® replicas nodes - ## - extraEnvVarsCM: "" - ## @param replica.extraEnvVarsSecret Name of existing Secret containing extra env vars for Redis® replicas nodes - ## - extraEnvVarsSecret: "" - ## @param replica.externalMaster.enabled Use external master for bootstrapping - ## @param replica.externalMaster.host External master host to bootstrap from - ## @param replica.externalMaster.port Port for Redis service external master host - ## - externalMaster: - enabled: false - host: "" - port: 6379 - ## @param replica.containerPorts.redis Container port to open on Redis® replicas nodes - ## - containerPorts: - redis: 6379 - ## Configure extra options for Redis® containers' liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes - ## @param replica.startupProbe.enabled Enable startupProbe on Redis® replicas nodes - ## @param replica.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe - ## @param replica.startupProbe.periodSeconds Period seconds for startupProbe - ## @param replica.startupProbe.timeoutSeconds Timeout seconds for startupProbe - ## @param replica.startupProbe.failureThreshold Failure threshold for startupProbe - ## @param replica.startupProbe.successThreshold Success threshold for startupProbe - ## - startupProbe: - enabled: true - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 22 - ## @param replica.livenessProbe.enabled Enable livenessProbe on Redis® replicas nodes - ## @param replica.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe - ## @param replica.livenessProbe.periodSeconds Period seconds for livenessProbe - ## @param replica.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe - ## @param replica.livenessProbe.failureThreshold Failure threshold for livenessProbe - ## @param replica.livenessProbe.successThreshold Success threshold for livenessProbe - ## - livenessProbe: - enabled: true - initialDelaySeconds: 20 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - ## @param replica.readinessProbe.enabled Enable readinessProbe on Redis® replicas nodes - ## @param replica.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe - ## @param replica.readinessProbe.periodSeconds Period seconds for readinessProbe - ## @param replica.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe - ## @param replica.readinessProbe.failureThreshold Failure threshold for readinessProbe - ## @param replica.readinessProbe.successThreshold Success threshold for readinessProbe - ## - readinessProbe: - enabled: true - initialDelaySeconds: 20 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - ## @param replica.customStartupProbe Custom startupProbe that overrides the default one - ## - customStartupProbe: {} - ## @param replica.customLivenessProbe Custom livenessProbe that overrides the default one - ## - customLivenessProbe: {} - ## @param replica.customReadinessProbe Custom readinessProbe that overrides the default one - ## - customReadinessProbe: {} - ## Redis® replicas resource requests and limits - ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## @param replica.resources.limits The resources limits for the Redis® replicas containers - ## @param replica.resources.requests The requested resources for the Redis® replicas containers - ## - resources: - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - limits: {} - # cpu: 250m - # memory: 256Mi - requests: {} - # cpu: 250m - # memory: 256Mi - ## Configure Pods Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod - ## @param replica.podSecurityContext.enabled Enabled Redis® replicas pods' Security Context - ## @param replica.podSecurityContext.fsGroup Set Redis® replicas pod's Security Context fsGroup - ## - podSecurityContext: - enabled: true - fsGroup: 1001 - ## Configure Container Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod - ## @param replica.containerSecurityContext.enabled Enabled Redis® replicas containers' Security Context - ## @param replica.containerSecurityContext.runAsUser Set Redis® replicas containers' Security Context runAsUser - ## - containerSecurityContext: - enabled: true - runAsUser: 1001 - ## @param replica.schedulerName Alternate scheduler for Redis® replicas pods - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - schedulerName: "" - ## @param replica.updateStrategy.type Redis® replicas statefulset strategy type - ## @skip replica.updateStrategy.rollingUpdate - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - ## - updateStrategy: - ## StrategyType - ## Can be set to RollingUpdate or OnDelete - ## - type: RollingUpdate - rollingUpdate: {} - ## @param replica.priorityClassName Redis® replicas pods' priorityClassName - ## - priorityClassName: "" - ## @param replica.podManagementPolicy podManagementPolicy to manage scaling operation of %%MAIN_CONTAINER_NAME%% pods - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies - ## - podManagementPolicy: "" - ## @param replica.hostAliases Redis® replicas pods host aliases - ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ - ## - hostAliases: [] - ## @param replica.podLabels Extra labels for Redis® replicas pods - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - ## - podLabels: {} - ## @param replica.podAnnotations Annotations for Redis® replicas pods - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - ## - podAnnotations: {} - ## @param replica.shareProcessNamespace Share a single process namespace between all of the containers in Redis® replicas pods - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ - ## - shareProcessNamespace: false - ## @param replica.podAffinityPreset Pod affinity preset. Ignored if `replica.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 replica.podAntiAffinityPreset Pod anti-affinity preset. Ignored if `replica.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 replica.nodeAffinityPreset.type Node affinity preset type. Ignored if `replica.affinity` is set. Allowed values: `soft` or `hard` - ## - type: "" - ## @param replica.nodeAffinityPreset.key Node label key to match. Ignored if `replica.affinity` is set - ## - key: "" - ## @param replica.nodeAffinityPreset.values Node label values to match. Ignored if `replica.affinity` is set - ## E.g. - ## values: - ## - e2e-az1 - ## - e2e-az2 - ## - values: [] - ## @param replica.affinity Affinity for Redis® replicas pods assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## NOTE: `replica.podAffinityPreset`, `replica.podAntiAffinityPreset`, and `replica.nodeAffinityPreset` will be ignored when it's set - ## - affinity: {} - ## @param replica.nodeSelector Node labels for Redis® replicas pods assignment - ## ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - ## @param replica.tolerations Tolerations for Redis® replicas pods assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - ## @param replica.topologySpreadConstraints Spread Constraints for Redis® replicas pod assignment - ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - ## E.g. - ## topologySpreadConstraints: - ## - maxSkew: 1 - ## topologyKey: node - ## whenUnsatisfiable: DoNotSchedule - ## - topologySpreadConstraints: [] - ## @param replica.dnsPolicy DNS Policy for Redis® replica pods - ## ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ - ## E.g. - ## dnsPolicy: ClusterFirst - dnsPolicy: "" - ## @param replica.dnsConfig DNS Configuration for Redis® replica pods - ## ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ - ## E.g. - ## dnsConfig: - ## options: - ## - name: ndots - ## value: "4" - ## - name: single-request-reopen - dnsConfig: {} - ## @param replica.lifecycleHooks for the Redis® replica container(s) to automate configuration before or after startup - ## - lifecycleHooks: {} - ## @param replica.extraVolumes Optionally specify extra list of additional volumes for the Redis® replicas pod(s) - ## - extraVolumes: [] - ## @param replica.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Redis® replicas container(s) - ## - extraVolumeMounts: [] - ## @param replica.sidecars Add additional sidecar containers to the Redis® replicas pod(s) - ## e.g: - ## sidecars: - ## - name: your-image-name - ## image: your-image - ## imagePullPolicy: Always - ## ports: - ## - name: portname - ## containerPort: 1234 - ## - sidecars: [] - ## @param replica.initContainers Add additional init containers to the Redis® replicas pod(s) - ## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - ## e.g: - ## initContainers: - ## - name: your-image-name - ## image: your-image - ## imagePullPolicy: Always - ## command: ['sh', '-c', 'echo "hello world"'] - ## - initContainers: [] - ## Persistence Parameters - ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## @param replica.persistence.enabled Enable persistence on Redis® replicas nodes using Persistent Volume Claims - ## - enabled: true - ## @param replica.persistence.medium Provide a medium for `emptyDir` volumes. - ## - medium: "" - ## @param replica.persistence.sizeLimit Set this to enable a size limit for `emptyDir` volumes. - ## - sizeLimit: "" - ## @param replica.persistence.path The path the volume will be mounted at on Redis® replicas containers - ## NOTE: Useful when using different Redis® images - ## - path: /data - ## @param replica.persistence.subPath The subdirectory of the volume to mount on Redis® replicas containers - ## NOTE: Useful in dev environments - ## - subPath: "" - ## @param replica.persistence.storageClass Persistent Volume storage class - ## 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 - ## - storageClass: "" - ## @param replica.persistence.accessModes Persistent Volume access modes - ## - accessModes: - - ReadWriteOnce - ## @param replica.persistence.size Persistent Volume size - ## - size: 8Gi - ## @param replica.persistence.annotations Additional custom annotations for the PVC - ## - annotations: {} - ## @param replica.persistence.selector Additional labels to match for the PVC - ## e.g: - ## selector: - ## matchLabels: - ## app: my-app - ## - selector: {} - ## @param replica.persistence.dataSource Custom PVC data source - ## - dataSource: {} - ## @param replica.persistence.existingClaim Use a existing PVC which must be created manually before bound - ## NOTE: requires replica.persistence.enabled: true - ## - existingClaim: "" - ## Redis® replicas service parameters - ## - service: - ## @param replica.service.type Redis® replicas service type - ## - type: ClusterIP - ## @param replica.service.ports.redis Redis® replicas service port - ## - ports: - redis: 6379 - ## @param replica.service.nodePorts.redis Node port for Redis® replicas - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## NOTE: choose port between <30000-32767> - ## - nodePorts: - redis: "" - ## @param replica.service.externalTrafficPolicy Redis® replicas service external traffic policy - ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip - ## - externalTrafficPolicy: Cluster - ## @param replica.service.internalTrafficPolicy Redis® replicas service internal traffic policy (requires Kubernetes v1.22 or greater to be usable) - ## ref: https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/ - ## - internalTrafficPolicy: Cluster - ## @param replica.service.extraPorts Extra ports to expose (normally used with the `sidecar` value) - ## - extraPorts: [] - ## @param replica.service.clusterIP Redis® replicas service Cluster IP - ## - clusterIP: "" - ## @param replica.service.loadBalancerIP Redis® replicas service Load Balancer IP - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - loadBalancerIP: "" - ## @param replica.service.loadBalancerSourceRanges Redis® replicas service Load Balancer sources - ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service - ## e.g. - ## loadBalancerSourceRanges: - ## - 10.10.10.0/24 - ## - loadBalancerSourceRanges: [] - ## @param replica.service.annotations Additional custom annotations for Redis® replicas service - ## - annotations: {} - ## @param replica.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP" - ## If "ClientIP", consecutive client requests will be directed to the same Pod - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - ## - sessionAffinity: None - ## @param replica.service.sessionAffinityConfig Additional settings for the sessionAffinity - ## sessionAffinityConfig: - ## clientIP: - ## timeoutSeconds: 300 - ## - sessionAffinityConfig: {} - ## @param replica.terminationGracePeriodSeconds Integer setting the termination grace period for the redis-replicas pods - ## - terminationGracePeriodSeconds: 30 - ## Autoscaling configuration - ## - autoscaling: - ## @param replica.autoscaling.enabled Enable replica autoscaling settings - ## - enabled: false - ## @param replica.autoscaling.minReplicas Minimum replicas for the pod autoscaling - ## - minReplicas: 1 - ## @param replica.autoscaling.maxReplicas Maximum replicas for the pod autoscaling - ## - maxReplicas: 11 - ## @param replica.autoscaling.targetCPU Percentage of CPU to consider when autoscaling - ## - targetCPU: "" - ## @param replica.autoscaling.targetMemory Percentage of Memory to consider when autoscaling - ## - targetMemory: "" - -## @section Redis® Sentinel configuration parameters -## - -sentinel: - ## @param sentinel.enabled Use Redis® Sentinel on Redis® pods. - ## IMPORTANT: this will disable the master and replicas services and - ## create a single Redis® service exposing both the Redis and Sentinel ports - ## - enabled: false - ## Bitnami Redis® Sentinel image version - ## ref: https://hub.docker.com/r/bitnami/redis-sentinel/tags/ - ## @param sentinel.image.registry Redis® Sentinel image registry - ## @param sentinel.image.repository Redis® Sentinel image repository - ## @param sentinel.image.tag Redis® Sentinel image tag (immutable tags are recommended) - ## @param sentinel.image.pullPolicy Redis® Sentinel image pull policy - ## @param sentinel.image.pullSecrets Redis® Sentinel image pull secrets - ## @param sentinel.image.debug Enable image debug mode - ## - image: - registry: docker.io - repository: bitnami/redis-sentinel - tag: 6.2.7-debian-11-r12 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-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: [] - ## Enable debug mode - ## - debug: false - ## @param sentinel.masterSet Master set name - ## - masterSet: mymaster - ## @param sentinel.quorum Sentinel Quorum - ## - quorum: 2 - ## @param sentinel.getMasterTimeout Amount of time to allow before get_sentinel_master_info() times out. - ## NOTE: This is directly related to the startupProbes which are configured to run every 10 seconds for a total of 22 failures. If adjusting this value, also adjust the startupProbes. - getMasterTimeout: 220 - ## @param sentinel.automateClusterRecovery Automate cluster recovery in cases where the last replica is not considered a good replica and Sentinel won't automatically failover to it. - ## This also prevents any new replica from starting until the last remaining replica is elected as master to guarantee that it is the one to be elected by Sentinel, and not a newly started replica with no data. - ## NOTE: This feature requires a "downAfterMilliseconds" value less or equal to 2000. - ## - automateClusterRecovery: false - ## Sentinel timing restrictions - ## @param sentinel.downAfterMilliseconds Timeout for detecting a Redis® node is down - ## @param sentinel.failoverTimeout Timeout for performing a election failover - ## - downAfterMilliseconds: 60000 - failoverTimeout: 18000 - ## @param sentinel.parallelSyncs Number of replicas that can be reconfigured in parallel to use the new master after a failover - ## - parallelSyncs: 1 - ## @param sentinel.configuration Configuration for Redis® Sentinel nodes - ## ref: https://redis.io/topics/sentinel - ## - configuration: "" - ## @param sentinel.command Override default container command (useful when using custom images) - ## - command: [] - ## @param sentinel.args Override default container args (useful when using custom images) - ## - args: [] - ## @param sentinel.preExecCmds Additional commands to run prior to starting Redis® Sentinel - ## - preExecCmds: [] - ## @param sentinel.extraEnvVars Array with extra environment variables to add to Redis® Sentinel nodes - ## e.g: - ## extraEnvVars: - ## - name: FOO - ## value: "bar" - ## - extraEnvVars: [] - ## @param sentinel.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for Redis® Sentinel nodes - ## - extraEnvVarsCM: "" - ## @param sentinel.extraEnvVarsSecret Name of existing Secret containing extra env vars for Redis® Sentinel nodes - ## - extraEnvVarsSecret: "" - ## @param sentinel.externalMaster.enabled Use external master for bootstrapping - ## @param sentinel.externalMaster.host External master host to bootstrap from - ## @param sentinel.externalMaster.port Port for Redis service external master host - ## - externalMaster: - enabled: false - host: "" - port: 6379 - ## @param sentinel.containerPorts.sentinel Container port to open on Redis® Sentinel nodes - ## - containerPorts: - sentinel: 26379 - ## Configure extra options for Redis® containers' liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes - ## @param sentinel.startupProbe.enabled Enable startupProbe on Redis® Sentinel nodes - ## @param sentinel.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe - ## @param sentinel.startupProbe.periodSeconds Period seconds for startupProbe - ## @param sentinel.startupProbe.timeoutSeconds Timeout seconds for startupProbe - ## @param sentinel.startupProbe.failureThreshold Failure threshold for startupProbe - ## @param sentinel.startupProbe.successThreshold Success threshold for startupProbe - ## - startupProbe: - enabled: true - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 22 - ## @param sentinel.livenessProbe.enabled Enable livenessProbe on Redis® Sentinel nodes - ## @param sentinel.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe - ## @param sentinel.livenessProbe.periodSeconds Period seconds for livenessProbe - ## @param sentinel.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe - ## @param sentinel.livenessProbe.failureThreshold Failure threshold for livenessProbe - ## @param sentinel.livenessProbe.successThreshold Success threshold for livenessProbe - ## - livenessProbe: - enabled: true - initialDelaySeconds: 20 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - ## @param sentinel.readinessProbe.enabled Enable readinessProbe on Redis® Sentinel nodes - ## @param sentinel.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe - ## @param sentinel.readinessProbe.periodSeconds Period seconds for readinessProbe - ## @param sentinel.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe - ## @param sentinel.readinessProbe.failureThreshold Failure threshold for readinessProbe - ## @param sentinel.readinessProbe.successThreshold Success threshold for readinessProbe - ## - readinessProbe: - enabled: true - initialDelaySeconds: 20 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - ## @param sentinel.customStartupProbe Custom startupProbe that overrides the default one - ## - customStartupProbe: {} - ## @param sentinel.customLivenessProbe Custom livenessProbe that overrides the default one - ## - customLivenessProbe: {} - ## @param sentinel.customReadinessProbe Custom readinessProbe that overrides the default one - ## - customReadinessProbe: {} - ## Persistence parameters - ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## @param sentinel.persistence.enabled Enable persistence on Redis® sentinel nodes using Persistent Volume Claims (Experimental) - ## - enabled: false - ## @param sentinel.persistence.storageClass Persistent Volume storage class - ## 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 - ## - storageClass: "" - ## @param sentinel.persistence.accessModes Persistent Volume access modes - ## - accessModes: - - ReadWriteOnce - ## @param sentinel.persistence.size Persistent Volume size - ## - size: 100Mi - ## @param sentinel.persistence.annotations Additional custom annotations for the PVC - ## - annotations: {} - ## @param sentinel.persistence.selector Additional labels to match for the PVC - ## e.g: - ## selector: - ## matchLabels: - ## app: my-app - ## - selector: {} - ## @param sentinel.persistence.dataSource Custom PVC data source - ## - dataSource: {} - ## @param sentinel.persistence.medium Provide a medium for `emptyDir` volumes. - ## - medium: "" - ## Redis® Sentinel resource requests and limits - ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## @param sentinel.resources.limits The resources limits for the Redis® Sentinel containers - ## @param sentinel.resources.requests The requested resources for the Redis® Sentinel containers - ## - resources: - limits: {} - requests: {} - ## Configure Container Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod - ## @param sentinel.containerSecurityContext.enabled Enabled Redis® Sentinel containers' Security Context - ## @param sentinel.containerSecurityContext.runAsUser Set Redis® Sentinel containers' Security Context runAsUser - ## - containerSecurityContext: - enabled: true - runAsUser: 1001 - ## @param sentinel.lifecycleHooks for the Redis® sentinel container(s) to automate configuration before or after startup - ## - lifecycleHooks: {} - ## @param sentinel.extraVolumes Optionally specify extra list of additional volumes for the Redis® Sentinel - ## - extraVolumes: [] - ## @param sentinel.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Redis® Sentinel container(s) - ## - extraVolumeMounts: [] - ## Redis® Sentinel service parameters - ## - service: - ## @param sentinel.service.type Redis® Sentinel service type - ## - type: ClusterIP - ## @param sentinel.service.ports.redis Redis® service port for Redis® - ## @param sentinel.service.ports.sentinel Redis® service port for Redis® Sentinel - ## - ports: - redis: 6379 - sentinel: 26379 - ## @param sentinel.service.nodePorts.redis Node port for Redis® - ## @param sentinel.service.nodePorts.sentinel Node port for Sentinel - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## NOTE: choose port between <30000-32767> - ## NOTE: By leaving these values blank, they will be generated by ports-configmap - ## If setting manually, please leave at least replica.replicaCount + 1 in between sentinel.service.nodePorts.redis and sentinel.service.nodePorts.sentinel to take into account the ports that will be created while incrementing that base port - ## - nodePorts: - redis: "" - sentinel: "" - ## @param sentinel.service.externalTrafficPolicy Redis® Sentinel service external traffic policy - ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip - ## - externalTrafficPolicy: Cluster - ## @param sentinel.service.extraPorts Extra ports to expose (normally used with the `sidecar` value) - ## - extraPorts: [] - ## @param sentinel.service.clusterIP Redis® Sentinel service Cluster IP - ## - clusterIP: "" - ## @param sentinel.service.loadBalancerIP Redis® Sentinel service Load Balancer IP - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - loadBalancerIP: "" - ## @param sentinel.service.loadBalancerSourceRanges Redis® Sentinel service Load Balancer sources - ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service - ## e.g. - ## loadBalancerSourceRanges: - ## - 10.10.10.0/24 - ## - loadBalancerSourceRanges: [] - ## @param sentinel.service.annotations Additional custom annotations for Redis® Sentinel service - ## - annotations: {} - ## @param sentinel.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP" - ## If "ClientIP", consecutive client requests will be directed to the same Pod - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - ## - sessionAffinity: None - ## @param sentinel.service.sessionAffinityConfig Additional settings for the sessionAffinity - ## sessionAffinityConfig: - ## clientIP: - ## timeoutSeconds: 300 - ## - sessionAffinityConfig: {} - ## @param sentinel.terminationGracePeriodSeconds Integer setting the termination grace period for the redis-node pods - ## - terminationGracePeriodSeconds: 30 - -## @section Other Parameters -## - -## Network Policy configuration -## ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/ -## -networkPolicy: - ## @param networkPolicy.enabled Enable creation of NetworkPolicy resources - ## - enabled: false - ## @param networkPolicy.allowExternal Don't require client label for connections - ## When set to false, only pods with the correct client label will have network access to the ports - ## Redis® is listening on. When true, Redis® will accept connections from any source - ## (with the correct destination port). - ## - allowExternal: true - ## @param networkPolicy.extraIngress 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 Add extra egress 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 Labels to match to allow traffic from other namespaces - ## @param networkPolicy.ingressNSPodMatchLabels Pod labels to match to allow traffic from other namespaces - ## - ingressNSMatchLabels: {} - ingressNSPodMatchLabels: {} -## PodSecurityPolicy configuration -## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ -## -podSecurityPolicy: - ## @param podSecurityPolicy.create Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later - ## - create: false - ## @param podSecurityPolicy.enabled Enable PodSecurityPolicy's RBAC rules - ## - enabled: false -## RBAC configuration -## -rbac: - ## @param rbac.create Specifies whether RBAC resources should be created - ## - create: false - ## @param rbac.rules Custom RBAC rules to set - ## e.g: - ## rules: - ## - apiGroups: - ## - "" - ## resources: - ## - pods - ## verbs: - ## - get - ## - list - ## - rules: [] -## ServiceAccount configuration -## -serviceAccount: - ## @param serviceAccount.create Specifies whether a ServiceAccount should be created - ## - create: true - ## @param serviceAccount.name The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the common.names.fullname template - ## - name: "" - ## @param serviceAccount.automountServiceAccountToken Whether to auto mount the service account token - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server - ## - automountServiceAccountToken: true - ## @param serviceAccount.annotations Additional custom annotations for the ServiceAccount - ## - annotations: {} -## Redis® Pod Disruption Budget configuration -## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ -## -pdb: - ## @param pdb.create Specifies whether a PodDisruptionBudget should be created - ## - create: false - ## @param pdb.minAvailable Min number of pods that must still be available after the eviction - ## - minAvailable: 1 - ## @param pdb.maxUnavailable Max number of pods that can be unavailable after the eviction - ## - maxUnavailable: "" -## TLS configuration -## -tls: - ## @param tls.enabled Enable TLS traffic - ## - enabled: false - ## @param tls.authClients Require clients to authenticate - ## - authClients: true - ## @param tls.autoGenerated Enable autogenerated certificates - ## - autoGenerated: false - ## @param tls.existingSecret The name of the existing secret that contains the TLS certificates - ## - existingSecret: "" - ## @param tls.certificatesSecret DEPRECATED. Use existingSecret instead. - ## - certificatesSecret: "" - ## @param tls.certFilename Certificate filename - ## - certFilename: "" - ## @param tls.certKeyFilename Certificate Key filename - ## - certKeyFilename: "" - ## @param tls.certCAFilename CA Certificate filename - ## - certCAFilename: "" - ## @param tls.dhParamsFilename File containing DH params (in order to support DH based ciphers) - ## - dhParamsFilename: "" - -## @section Metrics Parameters -## - -metrics: - ## @param metrics.enabled Start a sidecar prometheus exporter to expose Redis® metrics - ## - enabled: false - ## Bitnami Redis® Exporter image - ## ref: https://hub.docker.com/r/bitnami/redis-exporter/tags/ - ## @param metrics.image.registry Redis® Exporter image registry - ## @param metrics.image.repository Redis® Exporter image repository - ## @param metrics.image.tag Redis® Redis® Exporter image tag (immutable tags are recommended) - ## @param metrics.image.pullPolicy Redis® Exporter image pull policy - ## @param metrics.image.pullSecrets Redis® Exporter image pull secrets - ## - image: - registry: docker.io - repository: bitnami/redis-exporter - tag: 1.43.0-debian-11-r4 - 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 metrics.command Override default metrics container init command (useful when using custom images) - ## - command: [] - ## @param metrics.redisTargetHost A way to specify an alternative Redis® hostname - ## Useful for certificate CN/SAN matching - ## - redisTargetHost: "localhost" - ## @param metrics.extraArgs Extra arguments for Redis® exporter, for example: - ## e.g.: - ## extraArgs: - ## check-keys: myKey,myOtherKey - ## - extraArgs: {} - ## @param metrics.extraEnvVars Array with extra environment variables to add to Redis® exporter - ## e.g: - ## extraEnvVars: - ## - name: FOO - ## value: "bar" - ## - extraEnvVars: [] - ## Configure Container Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod - ## @param metrics.containerSecurityContext.enabled Enabled Redis® exporter containers' Security Context - ## @param metrics.containerSecurityContext.runAsUser Set Redis® exporter containers' Security Context runAsUser - ## - containerSecurityContext: - enabled: true - runAsUser: 1001 - ## @param metrics.extraVolumes Optionally specify extra list of additional volumes for the Redis® metrics sidecar - ## - extraVolumes: [] - ## @param metrics.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Redis® metrics sidecar - ## - extraVolumeMounts: [] - ## Redis® exporter resource requests and limits - ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## @param metrics.resources.limits The resources limits for the Redis® exporter container - ## @param metrics.resources.requests The requested resources for the Redis® exporter container - ## - resources: - limits: {} - requests: {} - ## @param metrics.podLabels Extra labels for Redis® exporter pods - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - ## - podLabels: {} - ## @param metrics.podAnnotations [object] Annotations for Redis® exporter pods - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - ## - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9121" - ## Redis® exporter service parameters - ## - service: - ## @param metrics.service.type Redis® exporter service type - ## - type: ClusterIP - ## @param metrics.service.port Redis® exporter service port - ## - port: 9121 - ## @param metrics.service.externalTrafficPolicy Redis® exporter service external traffic policy - ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip - ## - externalTrafficPolicy: Cluster - ## @param metrics.service.extraPorts Extra ports to expose (normally used with the `sidecar` value) - ## - extraPorts: [] - ## @param metrics.service.loadBalancerIP Redis® exporter service Load Balancer IP - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - loadBalancerIP: "" - ## @param metrics.service.loadBalancerSourceRanges Redis® exporter service Load Balancer sources - ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service - ## e.g. - ## loadBalancerSourceRanges: - ## - 10.10.10.0/24 - ## - loadBalancerSourceRanges: [] - ## @param metrics.service.annotations Additional custom annotations for Redis® exporter service - ## - annotations: {} - ## Prometheus Service Monitor - ## ref: https://github.com/coreos/prometheus-operator - ## https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint - ## - serviceMonitor: - ## @param metrics.serviceMonitor.enabled Create ServiceMonitor resource(s) for scraping metrics using PrometheusOperator - ## - enabled: false - ## @param metrics.serviceMonitor.namespace The namespace in which the ServiceMonitor will be created - ## - namespace: "" - ## @param metrics.serviceMonitor.interval The interval at which metrics should be scraped - ## - interval: 30s - ## @param metrics.serviceMonitor.scrapeTimeout The timeout after which the scrape is ended - ## - scrapeTimeout: "" - ## @param metrics.serviceMonitor.relabellings Metrics RelabelConfigs to apply to samples before scraping. - ## - relabellings: [] - ## @param metrics.serviceMonitor.metricRelabelings Metrics RelabelConfigs to apply to samples before ingestion. - ## - metricRelabelings: [] - ## @param metrics.serviceMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint - ## - honorLabels: false - ## @param metrics.serviceMonitor.additionalLabels Additional labels that can be used so ServiceMonitor resource(s) can be discovered by Prometheus - ## - additionalLabels: {} - ## Custom PrometheusRule to be defined - ## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions - ## - prometheusRule: - ## @param metrics.prometheusRule.enabled Create a custom prometheusRule Resource for scraping metrics using PrometheusOperator - ## - enabled: false - ## @param metrics.prometheusRule.namespace The namespace in which the prometheusRule will be created - ## - namespace: "" - ## @param metrics.prometheusRule.additionalLabels Additional labels for the prometheusRule - ## - additionalLabels: {} - ## @param metrics.prometheusRule.rules Custom Prometheus rules - ## e.g: - ## rules: - ## - alert: RedisDown - ## expr: redis_up{service="{{ template "common.names.fullname" . }}-metrics"} == 0 - ## for: 2m - ## labels: - ## severity: error - ## annotations: - ## summary: Redis® instance {{ "{{ $labels.instance }}" }} down - ## description: Redis® instance {{ "{{ $labels.instance }}" }} is down - ## - alert: RedisMemoryHigh - ## expr: > - ## redis_memory_used_bytes{service="{{ template "common.names.fullname" . }}-metrics"} * 100 - ## / - ## redis_memory_max_bytes{service="{{ template "common.names.fullname" . }}-metrics"} - ## > 90 - ## for: 2m - ## labels: - ## severity: error - ## annotations: - ## summary: Redis® instance {{ "{{ $labels.instance }}" }} is using too much memory - ## description: | - ## Redis® instance {{ "{{ $labels.instance }}" }} is using {{ "{{ $value }}" }}% of its available memory. - ## - alert: RedisKeyEviction - ## expr: | - ## increase(redis_evicted_keys_total{service="{{ template "common.names.fullname" . }}-metrics"}[5m]) > 0 - ## for: 1s - ## labels: - ## severity: error - ## annotations: - ## summary: Redis® instance {{ "{{ $labels.instance }}" }} has evicted keys - ## description: | - ## Redis® instance {{ "{{ $labels.instance }}" }} has evicted {{ "{{ $value }}" }} keys in the last 5 minutes. - ## - rules: [] - -## @section Init Container Parameters -## - -## 'volumePermissions' init container parameters -## Changes the owner and group of the persistent volume mount point to runAsUser:fsGroup values -## based on the *podSecurityContext/*containerSecurityContext parameters -## -volumePermissions: - ## @param volumePermissions.enabled Enable init container that changes the owner/group of the PV mount point to `runAsUser:fsGroup` - ## - enabled: false - ## Bitnami Shell image - ## ref: https://hub.docker.com/r/bitnami/bitnami-shell/tags/ - ## @param volumePermissions.image.registry Bitnami Shell image registry - ## @param volumePermissions.image.repository Bitnami Shell image repository - ## @param volumePermissions.image.tag Bitnami Shell image tag (immutable tags are recommended) - ## @param volumePermissions.image.pullPolicy Bitnami Shell image pull policy - ## @param volumePermissions.image.pullSecrets Bitnami Shell image pull secrets - ## - image: - registry: docker.io - repository: bitnami/bitnami-shell - tag: 11-debian-11-r11 - 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: [] - ## Init container's resource requests and limits - ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## @param volumePermissions.resources.limits The resources limits for the init container - ## @param volumePermissions.resources.requests The requested resources for the init container - ## - resources: - limits: {} - requests: {} - ## Init container Container Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container - ## @param volumePermissions.containerSecurityContext.runAsUser Set init container's Security Context runAsUser - ## NOTE: when runAsUser is set to special value "auto", init container will try to chown the - ## data folder to auto-determined user&group, using commands: `id -u`:`id -G | cut -d" " -f2` - ## "auto" is especially useful for OpenShift which has scc with dynamic user ids (and 0 is not allowed) - ## - containerSecurityContext: - runAsUser: 0 - -## init-sysctl container parameters -## used to perform sysctl operation to modify Kernel settings (needed sometimes to avoid warnings) -## -sysctl: - ## @param sysctl.enabled Enable init container to modify Kernel settings - ## - enabled: false - ## Bitnami Shell image - ## ref: https://hub.docker.com/r/bitnami/bitnami-shell/tags/ - ## @param sysctl.image.registry Bitnami Shell image registry - ## @param sysctl.image.repository Bitnami Shell image repository - ## @param sysctl.image.tag Bitnami Shell image tag (immutable tags are recommended) - ## @param sysctl.image.pullPolicy Bitnami Shell image pull policy - ## @param sysctl.image.pullSecrets Bitnami Shell image pull secrets - ## - image: - registry: docker.io - repository: bitnami/bitnami-shell - tag: 11-debian-11-r11 - 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 sysctl.command Override default init-sysctl container command (useful when using custom images) - ## - command: [] - ## @param sysctl.mountHostSys Mount the host `/sys` folder to `/host-sys` - ## - mountHostSys: false - ## Init container's resource requests and limits - ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## @param sysctl.resources.limits The resources limits for the init container - ## @param sysctl.resources.requests The requested resources for the init container - ## - resources: - limits: {} - requests: {} - -## @section useExternalDNS Parameters -## -## @param useExternalDNS.enabled Enable various syntax that would enable external-dns to work. Note this requires a working installation of `external-dns` to be usable. -## @param useExternalDNS.additionalAnnotations Extra annotations to be utilized when `external-dns` is enabled. -## @param useExternalDNS.annotationKey The annotation key utilized when `external-dns` is enabled. -## @param useExternalDNS.suffix The DNS suffix utilized when `external-dns` is enabled. Note that we prepend the suffix with the full name of the release. -## -useExternalDNS: - enabled: false - suffix: "" - annotationKey: external-dns.alpha.kubernetes.io/ - additionalAnnotations: {} diff --git a/charts/gitlab/gitlab/charts/registry/CHANGELOG.md b/charts/gitlab/gitlab/charts/registry/CHANGELOG.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/charts/gitlab/gitlab/charts/registry/Chart.yaml b/charts/gitlab/gitlab/charts/registry/Chart.yaml deleted file mode 100644 index 24eeaf561..000000000 --- a/charts/gitlab/gitlab/charts/registry/Chart.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -appVersion: v3.73.1-gitlab -description: Stateless, highly scalable application that stores and lets you distribute - container images -home: https://docs.gitlab.com/ee/user/packages/container_registry -icon: https://hub.docker.com/public/images/logos/mini-logo.svg -keywords: -- registry -- container -- docker -- gitlab -maintainers: -- email: support@gitlab.com - name: GitLab Inc. -name: registry -sources: -- https://gitlab.com/gitlab-org/container-registry -- https://gitlab.com/gitlab-org/charts/gitlab/charts/registry -version: 0.7.0 diff --git a/charts/gitlab/gitlab/charts/registry/index.md b/charts/gitlab/gitlab/charts/registry/index.md deleted file mode 100644 index 1e6668f89..000000000 --- a/charts/gitlab/gitlab/charts/registry/index.md +++ /dev/null @@ -1,13 +0,0 @@ -Forked from https://github.com/helm/charts/tree/master/stable/docker-registry - -With a few tweaks to make it play nicely with GitLab, including Minio S3 -storage and GitLab authentication endpoint. - -## Configuration - -In addition to the original configuration that are inherited from the upstream, -this chart also introduces some additional configuration. See [additional options](../../doc/charts/registry/index.md#installation-command-line-options) - -## Development - -For more details, see [development notes](../../doc/development/index.md#verifying-registry) diff --git a/charts/gitlab/gitlab/charts/registry/templates/_database.tpl b/charts/gitlab/gitlab/charts/registry/templates/_database.tpl deleted file mode 100644 index b4c39aa32..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/_database.tpl +++ /dev/null @@ -1,108 +0,0 @@ -{{/* -Return database configuration, if enabled. -*/}} -{{- define "registry.database.config" -}} -{{- if .Values.database.enabled }} -database: - enabled: true - host: {{ default (include "gitlab.psql.host" .) .Values.database.host | quote }} - port: {{ default (include "gitlab.psql.port" .) .Values.database.port }} - user: {{ .Values.database.user }} - password: "DB_PASSWORD_FILE" - dbname: {{ .Values.database.name }} - sslmode: {{ .Values.database.sslmode }} - {{- if .Values.database.ssl }} - sslcert: /etc/docker/registry/ssl/client-certificate.pem - sslkey: /etc/docker/registry/ssl/client-key.pem - sslrootcert: /etc/docker/registry/ssl/server-ca.pem - {{- end }} - {{- if .Values.database.connecttimeout }} - connecttimeout: {{ .Values.database.connecttimeout }} - {{- end }} - {{- if .Values.database.draintimeout }} - draintimeout: {{ .Values.database.draintimeout }} - {{- end }} - {{- if .Values.database.preparedstatements }} - preparedstatements: true - {{- end }} - {{- if .Values.database.pool }} - pool: - {{- if .Values.database.pool.maxidle }} - maxidle: {{ .Values.database.pool.maxidle }} - {{- end }} - {{- if .Values.database.pool.maxopen }} - maxopen: {{ .Values.database.pool.maxopen }} - {{- end }} - {{- if .Values.database.pool.maxlifetime }} - maxlifetime: {{ .Values.database.pool.maxlifetime }} - {{- end }} - {{- if .Values.database.pool.maxidletime }} - maxidletime: {{ .Values.database.pool.maxidletime }} - {{- end }} - {{- end }} - {{- if .Values.database.discovery.enabled }} - discovery: - enabled: true - nameserver: {{ .Values.database.discovery.nameserver | quote }} - port: {{ default 53 .Values.database.discovery.port }} - primaryrecord: {{ .Values.database.discovery.primaryrecord | quote }} - tcp: {{ default false .Values.database.discovery.tcp }} -{{- end }} -{{- end }} -{{- end -}} - -{{/* -Return Registry's database secret entry as a projected volume -*/}} -{{- define "gitlab.registry.database.password.projectedVolume" -}} -- secret: - name: {{ default (printf "%s-registry-database-password" .Release.Name) .Values.database.password.secret }} - items: - - key: {{ default "password" .Values.database.password.key }} - path: database_password -{{- end -}} - -{{/* -Return PostgreSQL SSL client certificate secret key -*/}} -{{- define "gitlab.registry.psql.ssl.clientCertificate" -}} -{{ default .Values.global.psql.ssl.serverCA .Values.database.ssl.clientCertificate | required "Missing required key name of SQL client certificate. Make sure to set `registry.database.ssl.clientCertificate`" }} -{{- end -}} - -{{/* -Return PostgreSQL SSL client key secret key -*/}} -{{- define "gitlab.registry.psql.ssl.clientKey" -}} -{{ default .Values.global.psql.ssl.clientKey .Values.database.ssl.clientKey | required "Missing required key name of SQL client key file. Make sure to set `registry.database.ssl.clientKey`" }} -{{- end -}} - -{{/* -Return PostgreSQL SSL server CA secret key -*/}} -{{- define "gitlab.registry.psql.ssl.serverCA" -}} -{{ default .Values.global.psql.ssl.serverCA .Values.database.ssl.serverCA | required "Missing required key name of SQL server certificate. Make sure to set `registry.database.ssl.serverCA`" }} -{{- end -}} - -{{/* -Return PostgreSQL SSL secret name -*/}} -{{- define "gitlab.registry.psql.ssl.secret" -}} -{{ default .Values.global.psql.ssl.secret .Values.database.ssl.secret | required "Missing required secret containing SQL SSL certificates and keys. Make sure to set `registry.database.ssl.secret`" }} -{{- end -}} - -{{/* -Returns the K8s Secret definition for a PostgreSQL mutual TLS connection. -*/}} -{{- define "gitlab.registry.psql.ssl" -}} -{{- if or .Values.database.ssl .Values.global.psql.ssl }} -- secret: - name: {{ include "gitlab.registry.psql.ssl.secret" . }} - items: - - key: {{ include "gitlab.registry.psql.ssl.clientCertificate" . }} - path: ssl/client-certificate.pem - - key: {{ include "gitlab.registry.psql.ssl.clientKey" . }} - path: ssl/client-key.pem - - key: {{ include "gitlab.registry.psql.ssl.serverCA" . }} - path: ssl/server-ca.pem -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/_gc.tpl b/charts/gitlab/gitlab/charts/registry/templates/_gc.tpl deleted file mode 100644 index 76593eb59..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/_gc.tpl +++ /dev/null @@ -1,40 +0,0 @@ -{{/* -Return online garbage collection configuration. -*/}} -{{- define "registry.gc.config" -}} -gc: - disabled: {{ .Values.gc.disabled }} - {{- if .Values.gc.maxbackoff }} - maxbackoff: {{ .Values.gc.maxbackoff }} - {{- end }} - {{- if .Values.gc.noidlebackoff }} - noidlebackoff: {{ .Values.gc.noidlebackoff }} - {{- end }} - {{- if .Values.gc.transactiontimeout }} - transactiontimeout: {{ .Values.gc.transactiontimeout }} - {{- end }} - {{- if .Values.gc.reviewafter }} - reviewafter: {{ .Values.gc.reviewafter }} - {{- end }} - {{- if .Values.gc.manifests }} - manifests: - {{- if .Values.gc.manifests.disabled }} - disabled: {{ .Values.gc.manifests.disabled }} - {{- end }} - {{- if .Values.gc.manifests.interval }} - interval: {{ .Values.gc.manifests.interval }} - {{- end }} - {{- end }} - {{- if .Values.gc.blobs }} - blobs: - {{- if .Values.gc.blobs.disabled }} - disabled: {{ .Values.gc.blobs.disabled }} - {{- end }} - {{- if .Values.gc.blobs.interval }} - interval: {{ .Values.gc.blobs.interval }} - {{- end }} - {{- if .Values.gc.blobs.storagetimeout }} - storagetimeout: {{ .Values.gc.blobs.storagetimeout }} - {{- end }} - {{- end }} -{{- end -}} \ No newline at end of file diff --git a/charts/gitlab/gitlab/charts/registry/templates/_helpers.tpl b/charts/gitlab/gitlab/charts/registry/templates/_helpers.tpl deleted file mode 100644 index 58cf86114..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/_helpers.tpl +++ /dev/null @@ -1,168 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Return the registry authEndpoint -Defaults to the globally set gitlabHostname if an authEndpoint hasn't been provided -to the chart -*/}} -{{- define "registry.authEndpoint" -}} -{{- if .Values.authEndpoint -}} -{{- .Values.authEndpoint -}} -{{- else -}} -{{- template "gitlab.gitlab.url" . -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the hostname. -If the hostname is set in `global.hosts.registry.name`, that will be returned, -otherwise the hostname will be assembed using `registry` as the prefix, and the `gitlab.assembleHost` function. -*/}} -{{- define "registry.hostname" -}} -{{- coalesce .Values.global.hosts.registry.name (include "gitlab.assembleHost" (dict "name" "registry" "context" . )) -}} -{{- end -}} - -{{/* -Returns the secret name for the Secret containing the TLS certificate and key. -Uses `ingress.tls.secretName` first and falls back to `global.ingress.tls.secretName` -if there is a shared tls secret for all ingresses. -*/}} -{{- define "registry.tlsSecret" -}} -{{- $defaultName := (dict "secretName" "") -}} -{{- if .Values.global.ingress.configureCertmanager -}} -{{- $_ := set $defaultName "secretName" (printf "%s-registry-tls" .Release.Name) -}} -{{- else -}} -{{- $_ := set $defaultName "secretName" (include "gitlab.wildcard-self-signed-cert-name" .) -}} -{{- end -}} -{{- pluck "secretName" .Values.ingress.tls .Values.global.ingress.tls $defaultName | first -}} -{{- end -}} - -{{/* -Returns the minio URL. -If `registry.redirect` is set to `true` it will return the external domain name of minio, -e.g. `https://minio.example.com`, otherwise it will fallback to the internal minio service -URL, e.g. `http://minio-svc:9000`. - -For external domain name, if `global.hosts.https` or `global.hosts.minio.https` is true, -it uses https, otherwise http. Calls into the `gitlab.minio.hostname` function for the -hostname part of the url. -*/}} -{{- define "registry.minio.url" -}} -{{- if .Values.minio.redirect -}} - {{- if or .Values.global.hosts.https .Values.global.hosts.minio.https -}} - {{- printf "https://%s" (include "gitlab.minio.hostname" .) -}} - {{- else -}} - {{- printf "http://%s" (include "gitlab.minio.hostname" .) -}} - {{- end -}} -{{- else -}} - {{- include "gitlab.minio.endpoint" . -}} -{{- end -}} -{{- end -}} - -{{/* -Populate registry notifications -*/}} -{{- define "registry.notifications.config" -}} -{{- $geoNotifier := include "global.geo.registry.syncNotifier" . | fromYaml -}} -{{- $notifications := merge $.Values.global.registry.notifications $geoNotifier -}} -{{- if $notifications }} -notifications: - {{- if $notifications.events }} - events: - {{- toYaml $.Values.global.registry.notifications.events | nindent 4 }} - {{- end -}} - {{- $endpoints := concat (list) $notifications.endpoints $geoNotifier.endpoints | uniq -}} - {{- if $endpoints }} - endpoints: - {{- range $endpoint := $endpoints -}} - {{- if $endpoint.name -}} - {{- $headers := pluck "headers" $endpoint | first -}} - {{- $endpoint = omit $endpoint "headers" }} - {{- toYaml (list $endpoint) | nindent 4 }} - {{- if $headers }} - headers: - {{- range $header, $value := $headers -}} - {{- if kindIs "map" $value -}} - {{- if hasKey $value "secret" }} - {{ $header }}: SECRET_{{ $value.secret }}_{{ default "value" $value.key }} - {{- end -}} - {{- else }} - {{ $header }}: {{ $value }} - {{- end -}} - {{- end -}} - {{- end -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Individual secret items to be used as volumes -Usage: -{{ include "registry.notifications.secrets.item " ( \ - dict - "value" $value - "fileName" $fileName - ) }} -*/}} -{{- define "registry.notifications.secrets.item" -}} -- secret: - name: {{ .value.secret }} - items: - - key: {{ default "value" .value.key }} - path: notifications/SECRET_{{ .fileName }} -{{- end }} - -{{/* -Sensitive registry notification headers mounted as secrets -*/}} -{{- define "registry.notifications.secrets" -}} -{{- $geoNotifier := include "global.geo.registry.syncNotifier" . | fromYaml -}} -{{- $notifications := merge $.Values.global.registry.notifications $geoNotifier -}} -{{- if $notifications }} - {{- $uniqSecrets := list -}} - {{- $endpoints := concat (list) $notifications.endpoints $geoNotifier.endpoints | uniq -}} - {{- range $endpoint := $endpoints -}} - {{- if and $endpoint.name $endpoint.headers -}} - {{- range $header, $value := $endpoint.headers -}} - {{- if kindIs "map" $value -}} - {{- if hasKey $value "secret" }} - {{- $fileName := printf "%s_%s" $value.secret (default "value" $value.key) -}} - {{- if not (has $fileName $uniqSecrets) }} - {{- $uniqSecrets = append $uniqSecrets $fileName }} -{{ include "registry.notifications.secrets.item" (dict "value" $value "fileName" $fileName) }} - {{- end -}} - {{- end -}} - {{- end -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- 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). -*/}} -{{- define "registry.fullname" -}} -{{- include "fullname" $ -}} -{{- end -}} -{{/* -Return the sub-chart serviceAccount name -If that is not present it will use the global chart serviceAccount name -Failing that a serviceAccount will be generated automatically -*/}} -{{- define "registry.serviceAccount.name" -}} -{{- coalesce .Values.serviceAccount.name .Values.global.serviceAccount.name ( include "registry.fullname" . ) -}} -{{- end -}} - -{{/* -Create a default fully qualified job name. -Due to the job only being allowed to run once, we add the chart revision so Helm -upgrades don't cause errors trying to create the already ran job. -*/}} -{{- define "registry.migrations.jobname" -}} -{{- $name := include "registry.fullname" . | trunc 55 | trimSuffix "-" -}} -{{- printf "%s-migrations-%d" $name .Release.Revision | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/_migration.tpl b/charts/gitlab/gitlab/charts/registry/templates/_migration.tpl deleted file mode 100644 index 666a050b2..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/_migration.tpl +++ /dev/null @@ -1,36 +0,0 @@ -{{/* -Return migration configuration. -*/}} -{{- define "registry.migration.config" -}} -migration: - enabled: {{ .Values.migration.enabled | eq true }} -{{- if .Values.migration.disablemirrorfs }} - disablemirrorfs: true -{{- end }} -{{- if .Values.migration.rootdirectory }} - rootdirectory: {{ .Values.migration.rootdirectory }} -{{- end }} -{{- if .Values.migration.importtimeout }} - importtimeout: {{ .Values.migration.importtimeout }} -{{- end }} -{{- if .Values.migration.preimporttimeout }} - preimporttimeout: {{ .Values.migration.preimporttimeout }} -{{- end }} -{{- if .Values.migration.tagconcurrency }} - tagconcurrency: {{ .Values.migration.tagconcurrency }} -{{- end }} -{{- if .Values.migration.maxconcurrentimports }} - maxconcurrentimports: {{ .Values.migration.maxconcurrentimports }} -{{- end }} -{{- if and .Values.migration.enabled .Values.migration.importnotification.enabled }} - importnotification: - enabled: true - {{- if .Values.migration.importnotification.url }} - url: {{ .Values.migration.importnotification.url | quote }} - {{- else }} - url: "{{ template "gitlab.gitlab.url" . }}/api/v4/internal/registry/repositories/{path}/migration/status" - {{- end }} - timeout: {{ .Values.migration.importnotification.timeout }} - secret: "NOTIFICATION_SECRET" -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/_profiling.tpl b/charts/gitlab/gitlab/charts/registry/templates/_profiling.tpl deleted file mode 100644 index 608da5876..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/_profiling.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* -Return the registry's profiling credentials secret key -*/}} -{{- define "gitlab.registry.profiling.stackdriver.credentials.key" -}} -{{- default "credentials" .Values.profiling.stackdriver.credentials.key | quote -}} -{{- end -}} - -{{/* -Construct a default registry profiling service name, if not supplied -*/}} -{{- define "gitlab.registry.profiling.stackdriver.service" -}} -{{- default (include "registry.fullname" .) .Values.profiling.stackdriver.service | quote -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/_redis.tpl b/charts/gitlab/gitlab/charts/registry/templates/_redis.tpl deleted file mode 100644 index a1748758d..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/_redis.tpl +++ /dev/null @@ -1,77 +0,0 @@ -{{/* -Helper for Sentinels as a string - -Expectation: input contents has .sentinels, which is a List of Dict - in the format of [{host: , port:}, ...] -*/}} -{{- define "registry.redis.host.sentinels" -}} -{{- $sentinels := list -}} -{{- range .sentinels -}} -{{- $sentinels = append $sentinels (printf "%s:%d" .host (default 26379 .port | int)) -}} -{{- end -}} -{{ join "," $sentinels }} -{{- end -}} - - -{{- define "gitlab.registry.redisCacheSecret.mount" -}} -{{- if .Values.redis.cache.password.enabled }} -- secret: - name: {{ default (include "redis.secretName" . ) ( .Values.redis.cache.password.secret | quote) }} - items: - - key: {{ default (include "redis.secretPasswordKey" . ) ( .Values.redis.cache.password.key | quote) }} - path: registry/redis-password -{{- end }} -{{- end -}} - -{{/* -Return migration configuration. -*/}} -{{- define "registry.redis.config" -}} -{{- include "gitlab.redis.selectedMergedConfig" . -}} -redis: - cache: - enabled: {{ .Values.redis.cache.enabled | eq true }} - {{- if .Values.redis.cache.sentinels }} - addr: {{ include "registry.redis.host.sentinels" .Values.redis.cache | quote }} - mainname: {{ .Values.redis.cache.host }} - {{- else if .redisMergedConfig.sentinels }} - addr: {{ include "registry.redis.host.sentinels" .redisMergedConfig | quote }} - mainname: {{ template "gitlab.redis.host" . }} - {{- else if .Values.redis.cache.host }} - addr: {{ printf "%s:%d" .Values.redis.cache.host (int .Values.redis.cache.port | default 6379) | quote }} - {{- else }} - addr: {{ printf "%s:%s" ( include "gitlab.redis.host" . ) ( include "gitlab.redis.port" . ) | quote }} - {{- end }} - {{- if .Values.redis.cache.password.enabled }} - password: "REDIS_CACHE_PASSWORD" - {{- end }} - {{- if hasKey .Values.redis.cache "db" }} - db: {{ .Values.redis.cache.db }} - {{- end }} - {{- if .Values.redis.cache.dialtimeout }} - dialtimeout: {{ .Values.redis.cache.dialtimeout }} - {{- end }} - {{- if .Values.redis.cache.readtimeout }} - readtimeout: {{ .Values.redis.cache.readtimeout }} - {{- end }} - {{- if .Values.redis.cache.writetimeout }} - writetimeout: {{ .Values.redis.cache.writetimeout }} - {{- end }} - {{- if .Values.redis.cache.tls }} - tls: - enabled: {{ .Values.redis.cache.tls.enabled | eq true }} - insecure: {{ .Values.redis.cache.tls.insecure | eq true }} - {{- end }} - {{- if .Values.redis.cache.pool }} - pool: - {{- if .Values.redis.cache.pool.size }} - size: {{ .Values.redis.cache.pool.size }} - {{- end }} - {{- if .Values.redis.cache.pool.maxlifetime }} - maxlifetime: {{ .Values.redis.cache.pool.maxlifetime }} - {{- end }} - {{- if .Values.redis.cache.pool.idletimeout }} - idletimeout: {{ .Values.redis.cache.pool.idletimeout }} - {{- end -}} - {{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/_storage_default.yaml b/charts/gitlab/gitlab/charts/registry/templates/_storage_default.yaml deleted file mode 100644 index 3157f332f..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/_storage_default.yaml +++ /dev/null @@ -1,6 +0,0 @@ -filesystem: - rootdirectory: '/tmp/registry' -cache: - blobdescriptor: 'inmemory' -delete: - enabled: true diff --git a/charts/gitlab/gitlab/charts/registry/templates/configmap.yaml b/charts/gitlab/gitlab/charts/registry/templates/configmap.yaml deleted file mode 100644 index aee2344f7..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/configmap.yaml +++ /dev/null @@ -1,164 +0,0 @@ -{{- if .Values.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "registry.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - configure: |- - {{- .Values.init.script | nindent 4 }} - config.yml: | - version: 0.1 - log: - {{ toYaml .Values.log | nindent 6 | trim }} - http: - addr: :{{ .Values.service.internalPort }} - # `host` is not configurable - # `prefix` is not configurable - {{- if .Values.tls.enabled }} - tls: - certificate: /etc/docker/registry/tls/tls.crt - key: /etc/docker/registry/tls/tls.key - {{- if and .Values.tls.clientCAs (kindIs "slice" .Values.tls.clientCAs) }} - clientCAs: {{- toYaml .Values.tls.clientCAs | nindent 10 }} - {{- end }} - minimumTLS: {{ default "tls1.2" .Values.tls.minimumTLS | quote }} - {{- end }} - {{- if .Values.debug }} - debug: - addr: :{{ .Values.debug.addr.port | int }} - prometheus: - enabled: {{ (or .Values.metrics.enabled .Values.debug.prometheus.enabled) }} - path: {{ default .Values.metrics.path .Values.debug.prometheus.path }} - {{- if .Values.debug.tls.enabled }} - tls: - enabled: true - {{- if .Values.debug.tls.secretName }} - certificate: /etc/docker/registry/tls/tls-debug.crt - key: /etc/docker/registry/tls/tls-debug.key - {{- if and .Values.debug.tls.clientCAs (kindIs "slice" .Values.debug.tls.clientCAs) }} - clientCAs: {{- toYaml .Values.debug.tls.clientCAs | nindent 12 }} - {{- end }} - minimumTLS: {{ .Values.debug.tls.minimumTLS | quote }} - {{- end }} - {{- end }} - {{- end }} - draintimeout: {{ .Values.draintimeout }} - headers: - X-Content-Type-Options: [nosniff] - secret: "HTTP_SECRET" - relativeurls: {{ .Values.relativeurls }} - health: - {{- if kindIs "map" .Values.health }} - {{ toYaml .Values.health | nindent 6 | trim }} - {{- end }} - auth: - token: - realm: {{ template "registry.authEndpoint" . }}/jwt/auth - service: {{ .Values.tokenService }} - issuer: {{ coalesce .Values.tokenIssuer (dig "registry" "tokenIssuer" "gitlab-issuer" .Values.global ) }} - # This is provided from the initContainer execution, at a known path. - rootcertbundle: /etc/docker/registry/certificate.crt - autoredirect: {{ .Values.authAutoRedirect }} - validation: - disabled: {{ eq true .Values.validation.disabled }} - {{- with .Values.validation.manifests }} - manifests: - referencelimit: {{ .referencelimit }} - payloadsizelimit: {{ .payloadsizelimit }} - urls: - allow: - {{- range .urls.allow }} - - {{ . }} - {{- end }} - deny: - {{- range .urls.deny }} - - {{ . }} - {{- end }} - {{- end }} - {{- include "registry.notifications.config" $ | nindent 4 }} - reporting: - {{- if .Values.reporting.sentry.enabled }} - sentry: - enabled: true - dsn: {{ .Values.reporting.sentry.dsn }} - {{- if .Values.reporting.sentry.environment }} - environment: {{ .Values.reporting.sentry.environment }} - {{- end }} - {{- end }} - profiling: - {{- if .Values.profiling.stackdriver.enabled }} - stackdriver: - enabled: true - service: {{ template "gitlab.registry.profiling.stackdriver.service" . }} - serviceversion: {{ .Values.image.tag }} - {{- if .Values.profiling.stackdriver.projectid }} - projectid: {{ .Values.profiling.stackdriver.projectid }} - {{- end }} - {{- if .Values.profiling.stackdriver.credentials.secret }} - keyfile: /etc/docker/registry/profiling-key.json - {{- end }} - {{- end }} - storage: - maintenance: - readonly: - enabled: {{ .Values.maintenance.readonly.enabled }} - uploadpurging: - enabled: {{ .Values.maintenance.uploadpurging.enabled }} - age: {{ .Values.maintenance.uploadpurging.age }} - interval: {{ .Values.maintenance.uploadpurging.interval }} - dryrun: {{ .Values.maintenance.uploadpurging.dryrun }} - {{- if .Values.storage }} - {{- with .Values.storage.redirect }} - redirect: - disable: {{ default false .disable }} - exceptions: - {{- range .exceptions }} - - {{ . }} - {{- end }} - {{- end }} - {{- else if .Values.global.minio.enabled }} - s3: - accesskey: "ACCESS_KEY" - secretkey: "SECRET_KEY" - region: us-east-1 - regionendpoint: {{ template "registry.minio.url" . }} - bucket: {{ coalesce .Values.minio.bucket .Values.global.registry.bucket }} - secure: true - v4auth: true - rootdirectory: / - cache: - blobdescriptor: 'inmemory' - delete: - enabled: true - {{- if not .Values.minio.redirect }} - redirect: - disable: true - {{- end }} - {{- else }} - {{- include (print $.Template.BasePath "/_storage_default.yaml") . | nindent 6}} - {{- end }} - middleware: - {{- if .Values.middleware.storage }} - storage: - {{ range $index, $v := .Values.middleware.storage }} - - name: {{ $v.name }} - options: {{ omit $v.options "privatekeySecret" "privatekey" | toYaml | nindent 10 }} - privatekey: {{ printf "/etc/docker/registry/middleware.storage/%d/%s" $index $v.options.privatekeySecret.key }} - {{ end }} - {{- end }} - {{- include "registry.database.config" $ | nindent 4 }} - {{- include "registry.gc.config" $ | nindent 4 }} - {{- include "registry.migration.config" $ | nindent 4 }} - {{- include "registry.redis.config" $ | nindent 4}} - - # minimal configuration, in order to do database migrations - migrations-config.yml: | - version: 0.1 - log: - {{ toYaml .Values.log | nindent 6 | trim }} - {{- include "registry.database.config" $ | nindent 4 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/deployment.yaml b/charts/gitlab/gitlab/charts/registry/templates/deployment.yaml deleted file mode 100644 index 86a0f7b59..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/deployment.yaml +++ /dev/null @@ -1,246 +0,0 @@ -{{- if .Values.enabled -}} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.image -}} -{{- $initImageCfg := dict "global" $.Values.global.busybox.image "local" $.Values.init.image -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "registry.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.deploymentAnnotations" . | nindent 4 }} -spec: - # Don't provide replicas when HPA are present - # replicas: {{ .Values.hpa.minReplicas }} - selector: - matchLabels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - {{- if .Values.deployment.strategy }} - strategy: {{ .Values.deployment.strategy | toYaml | nindent 4 }} - {{- end }} - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" - {{- if and (or .Values.metrics.enabled .Values.debug.prometheus.enabled) (not .Values.metrics.serviceMonitor.enabled) }} - {{- if .Values.debug.tls.enabled }} - gitlab.com/prometheus_scheme: "https" - prometheus.io/scheme: "https" - {{- end }} - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: {{ .Values.debug.addr.port | quote }} - gitlab.com/prometheus_path: {{ default .Values.metrics.path .Values.debug.prometheus.path | quote }} - prometheus.io/scrape: "true" - prometheus.io/port: {{ .Values.debug.addr.port | quote }} - prometheus.io/path: {{ default .Values.metrics.path .Values.debug.prometheus.path | quote }} - {{- end }} - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - {{- include "gitlab.podSecurityContext" .Values.securityContext | nindent 6 }} - {{- if eq (default .Values.global.antiAffinity .Values.antiAffinity) "hard" }} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - {{- else if eq (default .Values.global.antiAffinity .Values.antiAffinity) "soft" }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ default .Values.global.affinity.podAntiAffinity.topologyKey .Values.affinity.podAntiAffinity.topologyKey | quote }} - labelSelector: - matchLabels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - {{- end }} - {{- if or $.Values.serviceAccount.enabled $.Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "registry.serviceAccount.name" $ }} - {{- end }} - automountServiceAccountToken: false - {{- include "gitlab.priorityClassName" . | nindent 6 }} - initContainers: - {{- include "gitlab.certificates.initContainer" . | nindent 8 }} - - name: configure - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" $.Values.global) | quote }} - {{- include "gitlab.image.pullPolicy" $initImageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" $ | indent 10 }} - command: ["sh", "/config/configure"] - volumeMounts: - - name: registry-secrets - mountPath: /config - - name: registry-server-config - mountPath: /registry - resources: - {{- toYaml .Values.init.resources | nindent 12 }} - env: - {{- include "gitlab.extraEnv" . | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }} - {{- if .Values.database.enabled }} - - name: dependencies - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.init.containerSecurityContext" $ | indent 10 }} - command: ["/scripts/wait-for-deps"] - volumeMounts: - - name: registry-server-config - mountPath: /etc/docker/registry/ - readOnly: true - resources: - {{- toYaml .Values.init.resources | nindent 12 }} - env: - {{- include "gitlab.extraEnv" . | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }} - {{- end }} - {{- include "gitlab.image.pullSecrets" $imageCfg | indent 6 }} - containers: - - name: registry - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}{{ include "gitlab.image.tagSuffix" . }}" - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - {{- include "gitlab.containerSecurityContext" $ | indent 10 }} - env: - {{- include "gitlab.extraEnv" . | nindent 10 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }} - volumeMounts: - - name: registry-server-config - mountPath: /etc/docker/registry/ - readOnly: true - {{- include "gitlab.certificates.volumeMount" . | nindent 10 }} - ports: - - containerPort: {{ .Values.service.internalPort }} - name: {{ .Values.tls.enabled | ternary "https" "http" }} - {{- with .Values.debug }} - - containerPort: {{ .addr.port }} - name: debug - {{- end }} - {{- if .Values.deployment.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: {{ .Values.deployment.livenessProbe.path }} - port: {{ if .Values.deployment.livenessProbe.port }}{{ .Values.deployment.livenessProbe.port }}{{ else }}debug{{ end }} - scheme: {{ .Values.debug.tls.enabled | ternary "HTTPS" "HTTP" }} - initialDelaySeconds: {{ .Values.deployment.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.deployment.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.deployment.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.deployment.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.deployment.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: {{ .Values.deployment.readinessProbe.path }} - port: {{ if .Values.deployment.readinessProbe.port }}{{ .Values.deployment.readinessProbe.port }}{{ else }}debug{{ end }} - scheme: {{ .Values.debug.tls.enabled | ternary "HTTPS" "HTTP" }} - initialDelaySeconds: {{ .Values.deployment.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.deployment.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.deployment.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.deployment.readinessProbe.failureThreshold }} - {{- end }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - lifecycle: - preStop: - exec: - command: ["/bin/bash", "-c", "sleep 5"] - terminationGracePeriodSeconds: {{ .Values.deployment.terminationGracePeriodSeconds }} - volumes: - - name: registry-server-config - emptyDir: - medium: "Memory" - - name: registry-secrets - projected: - sources: - - configMap: - name: {{ template "registry.fullname" . }} - - secret: - name: {{ template "gitlab.registry.certificate.secret" . }} - items: - - key: registry-auth.crt - path: certificate.crt - - secret: - name: {{ template "gitlab.registry.httpSecret.secret" . }} - items: - - key: {{ template "gitlab.registry.httpSecret.key" . }} - path: httpSecret - {{- if .Values.global.minio.enabled }} - - secret: - name: {{ template "gitlab.minio.credentials.secret" . }} - {{- end }} - {{- if .Values.storage.secret }} - - secret: - name: {{ .Values.storage.secret }} - items: - - key: {{ default "config" .Values.storage.key }} - path: storage/config - {{- if .Values.storage.extraKey }} - - key: {{ .Values.storage.extraKey }} - path: storage/{{ .Values.storage.extraKey }} - {{- end }} - {{- end }} - {{- if .Values.middleware.storage }} - {{- range $index, $v := .Values.middleware.storage }} - - secret: - name: {{ $v.options.privatekeySecret.secret }} - items: - - key: {{ $v.options.privatekeySecret.key }} - path: {{ printf "middleware.storage/%d/%s" $index $v.options.privatekeySecret.key }} - {{- end }} - {{- end }} - {{- if .Values.profiling.stackdriver.credentials.secret }} - - secret: - name: {{ .Values.profiling.stackdriver.credentials.secret }} - items: - - key: {{ template "gitlab.registry.profiling.stackdriver.credentials.key" . }} - path: profiling-key.json - {{- end }} - {{- include "registry.notifications.secrets" $ | nindent 10 }} - {{- if .Values.database.enabled -}} - {{- include "gitlab.registry.database.password.projectedVolume" . | nindent 10 }} - {{- include "gitlab.registry.psql.ssl" . | nindent 10 }} - {{- end -}} - {{- if .Values.migration.enabled -}} - {{- include "gitlab.registry.notificationSecret.mount" $ | nindent 10 -}} - {{- end -}} - {{- if .Values.tls.enabled -}} - # TLS secret for HTTPS service - - secret: - name: {{ include "gitlab.registry.tls.secret" $ }} - items: - - key: tls.crt - path: tls/tls.crt - - key: tls.key - path: tls/tls.key - {{- end -}} - {{- if and .Values.debug.tls.enabled .Values.debug.tls.secretName }} - # TLS secret for metrics/debug HTTPS service - - secret: - name: {{ .Values.debug.tls.secretName }} - items: - - key: tls.crt - path: tls/tls-debug.crt - - key: tls.key - path: tls/tls-debug.key - {{- end -}} - {{- include "gitlab.registry.redisCacheSecret.mount" $ | nindent 10 -}} - {{- include "gitlab.certificates.volumes" . | nindent 6 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/hpa.yaml b/charts/gitlab/gitlab/charts/registry/templates/hpa.yaml deleted file mode 100644 index c53f7703e..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/hpa.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.enabled -}} -{{- $hpaCfg := (dict "global" $.Values.global.hpa "local" .Values.hpa "context" $) -}} ---- -apiVersion: {{ template "gitlab.hpa.apiVersion" $hpaCfg }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "registry.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "registry.fullname" . }} - minReplicas: {{ .Values.hpa.minReplicas }} - maxReplicas: {{ .Values.hpa.maxReplicas }} - {{- include "gitlab.hpa.metrics" $hpaCfg | nindent 2 }} - {{- include "gitlab.hpa.behavior" $hpaCfg | nindent 2 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/ingress.yaml b/charts/gitlab/gitlab/charts/registry/templates/ingress.yaml deleted file mode 100644 index c761df6a4..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/ingress.yaml +++ /dev/null @@ -1,66 +0,0 @@ -{{- if .Values.enabled -}} -{{- if eq (include "gitlab.ingress.enabled" $) "true" -}} -{{- $hostname := include "registry.hostname" . -}} -{{- $tlsSecret := include "registry.tlsSecret" . -}} -{{- $ingressCfg := dict "global" .Values.global.ingress "local" .Values.ingress "context" . -}} - -apiVersion: {{ template "gitlab.ingress.apiVersion" $ingressCfg }} -kind: Ingress -metadata: - name: {{ template "registry.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{ include "ingress.class.annotation" $ingressCfg }} - kubernetes.io/ingress.provider: "{{ template "gitlab.ingress.provider" $ingressCfg }}" - {{- if eq "nginx" .Values.global.ingress.provider }} - nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.ingress.proxyBodySize | quote }} - nginx.ingress.kubernetes.io/proxy-read-timeout: {{ .Values.ingress.proxyReadTimeout | quote }} - nginx.ingress.kubernetes.io/proxy-request-buffering: {{ .Values.ingress.proxyBuffering | quote }} - nginx.ingress.kubernetes.io/proxy-buffering: {{ .Values.ingress.proxyBuffering | quote }} - {{- if .Values.tls.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: https - {{- if .Values.tls.verify }} - nginx.ingress.kubernetes.io/proxy-ssl-verify: "on" - nginx.ingress.kubernetes.io/proxy-ssl-name: {{ template "registry.fullname" . }}.{{ $.Release.Namespace }}.svc - {{- if .Values.tls.caSecretName }} - nginx.ingress.kubernetes.io/proxy-ssl-secret: {{ $.Release.Namespace}}/{{ .Values.tls.caSecretName }} - {{- end }} - {{- end }} - {{- end }} - {{- end }} - {{- include "gitlab.certmanager_annotations" . | nindent 4 }} - {{- range $key, $value := merge .Values.ingress.annotations .Values.global.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - {{ include "ingress.class.field" $ingressCfg }} - rules: - - host: {{ $hostname }} - http: - paths: - - path: {{ coalesce $.Values.ingress.path $.Values.global.ingress.path }} - {{ if or ($.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (eq $.Values.global.ingress.apiVersion "networking.k8s.io/v1") -}} - pathType: {{ default "Prefix" $.Values.global.ingress.pathType }} - backend: - service: - name: {{ template "registry.fullname" . }} - port: - number: {{ .Values.service.externalPort }} - {{- else -}} - backend: - serviceName: {{ template "registry.fullname" . }} - servicePort: {{ .Values.service.externalPort }} - {{- end -}} - {{- if (and $tlsSecret (eq (include "gitlab.ingress.tls.enabled" $) "true" )) }} - tls: - - hosts: - - {{ $hostname }} - secretName: {{ $tlsSecret }} - {{- else }} - tls: [] - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/migrations-job.yaml b/charts/gitlab/gitlab/charts/registry/templates/migrations-job.yaml deleted file mode 100644 index 2db4f40e9..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/migrations-job.yaml +++ /dev/null @@ -1,92 +0,0 @@ -{{- if and .Values.enabled .Values.database.enabled .Values.database.migrations.enabled }} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "registry.migrations.jobname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - activeDeadlineSeconds: {{ .Values.database.migrations.activeDeadlineSeconds }} - backoffLimit: {{ .Values.database.migrations.backoffLimit }} - template: - metadata: - {{- if .Values.annotations }} - annotations: - {{- range $key, $value := .Values.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - spec: - {{- if .Values.tolerations }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - {{- end }} - securityContext: - runAsUser: {{ .Values.securityContext.runAsUser }} - fsGroup: {{ .Values.securityContext.fsGroup }} - {{- if or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ include "gitlab.serviceAccount.name" . }} - {{- end }} - {{- include "gitlab.priorityClassName" . | nindent 6 }} - initContainers: - {{- include "gitlab.extraInitContainers" . | nindent 6 }} - {{- include "gitlab.certificates.initContainer" . | nindent 6 }} - - name: configure - image: {{ include "gitlab.busybox.image" (dict "local" .Values.init "global" $.Values.global) | quote }} - imagePullPolicy: {{ .Values.init.image.pullPolicy }} - command: ['sh', '/config/configure'] - volumeMounts: - - name: registry-secrets - mountPath: /config - - name: registry-server-config - mountPath: /registry - resources: - {{- toYaml .Values.init.resources | nindent 10 }} - env: - {{- include "gitlab.extraEnv" . | nindent 8 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 8 }} - restartPolicy: OnFailure - {{- include "gitlab.image.pullSecrets" (dict "global" .Values.global.image "local" .Values.image) | indent 6 }} - containers: - {{- include "gitlab.extraContainers" . | nindent 6 }} - - name: migrations - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}{{ include "gitlab.image.tagSuffix" . }}" - imagePullPolicy: {{ default "" .Values.image.pullPolicy | quote }} - args: - - /scripts/wait-for-deps - - /scripts/db-migrate - volumeMounts: - - name: registry-server-config - mountPath: /etc/docker/registry/ - readOnly: true - {{- include "gitlab.certificates.volumeMount" . | nindent 10 }} - resources: - {{- toYaml .Values.resources | nindent 10 }} - env: - - name: BYPASS_SCHEMA_VERSION - value: 'true' - {{- include "gitlab.extraEnv" . | nindent 8 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 8 }} - volumes: - - name: registry-server-config - emptyDir: - medium: "Memory" - - name: registry-secrets - projected: - sources: - - configMap: - name: {{ template "registry.fullname" . }} - items: - - key: configure - path: configure - - key: migrations-config.yml - path: config.yml - {{- include "gitlab.registry.database.password.projectedVolume" . | nindent 10 }} - {{- include "gitlab.certificates.volumes" . | nindent 6 }} -{{- end }} diff --git a/charts/gitlab/gitlab/charts/registry/templates/networkpolicy.yaml b/charts/gitlab/gitlab/charts/registry/templates/networkpolicy.yaml deleted file mode 100644 index ea23a9783..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/networkpolicy.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- if .Values.enabled -}} -{{- if .Values.networkpolicy.enabled -}} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ template "registry.fullname" . }}-v1 - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - {{- toYaml .Values.networkpolicy.annotations | nindent 4 }} -spec: - podSelector: - matchLabels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - policyTypes: - {{- if .Values.networkpolicy.egress.enabled }} - - Egress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - - Ingress - {{- end }} - {{- if .Values.networkpolicy.ingress.enabled }} - ingress: - {{- toYaml .Values.networkpolicy.ingress.rules | nindent 4 }} - {{- end -}} - {{- if .Values.networkpolicy.egress.enabled }} - egress: - {{- toYaml .Values.networkpolicy.egress.rules | nindent 4 }} - {{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/pdb.yaml b/charts/gitlab/gitlab/charts/registry/templates/pdb.yaml deleted file mode 100644 index 917d94220..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/pdb.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.enabled -}} -{{- $pdbCfg := (dict "global" $.Values.global.pdb "local" .Values.pdb "context" $) -}} -apiVersion: {{ template "gitlab.pdb.apiVersion" $pdbCfg }} -kind: PodDisruptionBudget -metadata: - name: {{ template "registry.fullname" . }}-v1 - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - maxUnavailable: {{ .Values.maxUnavailable }} - selector: - matchLabels: - app: {{ template "name" . }} - release: {{ .Release.Name }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/service.yaml b/charts/gitlab/gitlab/charts/registry/templates/service.yaml deleted file mode 100644 index c58f7b6f4..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/service.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "registry.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- include "gitlab.serviceLabels" . | nindent 4 }} - annotations: - {{- include "gitlab.serviceAnnotations" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} -{{- if (and (eq .Values.service.type "ClusterIP") (not (empty .Values.service.clusterIP))) }} - clusterIP: {{ .Values.service.clusterIP }} -{{- end }} -{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }} - loadBalancerIP: {{ .Values.service.loadBalancerIP }} -{{- end }} - ports: - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.tls.enabled | ternary "https" "http" }} - protocol: TCP - name: {{ .Values.tls.enabled | ternary "https" "http" }}-{{ .Values.service.name }} - {{- if (or .Values.metrics.enabled .Values.debug.prometheus.enabled) }} - - port: {{ .Values.debug.addr.port }} - targetPort: debug - protocol: TCP - name: {{ .Values.debug.tls.enabled | ternary "https" "http" }}-metrics - {{- end }} - selector: - app: {{ template "name" . }} - release: {{ .Release.Name }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/serviceaccount.yaml b/charts/gitlab/gitlab/charts/registry/templates/serviceaccount.yaml deleted file mode 100644 index a229ff35e..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $enabled := or .Values.serviceAccount.enabled .Values.global.serviceAccount.enabled -}} -{{- $create := or .Values.serviceAccount.create .Values.global.serviceAccount.create -}} -{{- if and $enabled $create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "registry.serviceAccount.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with default .Values.serviceAccount.annotations .Values.global.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/templates/servicemonitor.yaml b/charts/gitlab/gitlab/charts/registry/templates/servicemonitor.yaml deleted file mode 100644 index fb033d5b6..000000000 --- a/charts/gitlab/gitlab/charts/registry/templates/servicemonitor.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if and .Values.enabled (or .Values.metrics.enabled .Values.debug.prometheus.enabled) .Values.metrics.serviceMonitor.enabled -}} -{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "registry.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - {{- with .Values.metrics.serviceMonitor.additionalLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - endpoints: - - port: http-metrics - path: {{ default .Values.metrics.path .Values.debug.prometheus.path }} - {{- with .Values.metrics.serviceMonitor.endpointConfig }} - {{- toYaml . | nindent 6 }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/charts/registry/values.yaml b/charts/gitlab/gitlab/charts/registry/values.yaml deleted file mode 100644 index bb69997fc..000000000 --- a/charts/gitlab/gitlab/charts/registry/values.yaml +++ /dev/null @@ -1,417 +0,0 @@ -image: - repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-container-registry - tag: 'v3.73.1-gitlab' - # pullPolicy: IfNotPresent - # pullSecrets: [] - -deployment: - terminationGracePeriodSeconds: 30 - readinessProbe: - enabled: true - path: '/debug/health' - # defaults to the debug port - port: - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - livenessProbe: - enabled: true - path: '/debug/health' - # defaults to the debug port - port: - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # strategy is utilized to configure the desired upgrade approach and - # configuration for the deployment. See the Kubernetes documentation - # related to this subject. - # https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy - strategy: {} - -podLabels: {} -common: - labels: {} - -serviceLabels: {} -service: - name: registry - type: ClusterIP - externalPort: 5000 - internalPort: 5000 - clusterIP: - loadBalancerIP: - -## Support for tolerations for pod scheduling -tolerations: [] - -# Priority class assigned to pods -priorityClassName: "" - -## Enable/Disable Chart -enabled: true - -## Registry Maintenance Settings -## See https://docs.docker.com/registry/configuration/#maintenance -maintenance: - readonly: - ## Enable read-only mode for Registry - enabled: false - uploadpurging: - enabled: true - age: 168h - interval: 24h - dryrun: false - -annotations: {} - -networkpolicy: - enabled: false - egress: - enabled: false - rules: [] - ingress: - enabled: false - rules: [] - annotations: {} - -ingress: - apiVersion: - enabled: - proxyReadTimeout: 900 - proxyBodySize: "0" - proxyBuffering: "off" - tls: {} - # secretName: - # enabled: true - annotations: {} - configureCertmanager: - path: # / - -global: - ingress: - enabled: - annotations: {} - tls: {} - # secretName: - # enabled: true - hosts: - domain: example.com - hostSuffix: - https: true - tls: {} - # secretName: - gitlab: {} - #name: gitlab.example.com - #https: false - registry: {} - #name: registry.example.com - #https: false - minio: {} - #name: minio.example.com - #https: false - minio: - enabled: - credentials: {} - registry: - certificate: {} - httpSecret: {} - psql: - ssl: {} - -## Control the InitContainer behaviors. -init: - image: {} - # repository: - # tag: - # pullPolicy: IfNotPresent - resources: - requests: - cpu: 50m - containerSecurityContext: {} - script: |- - if [ -e /config/accesskey ] ; then - sed -e 's@ACCESS_KEY@'"$(cat /config/accesskey)"'@' -e 's@SECRET_KEY@'"$(cat /config/secretkey)"'@' /config/config.yml > /registry/config.yml - else - cp -v -r -L /config/config.yml /registry/config.yml - fi - # Place the `http.secret` value from the kubernetes secret - sed -i -e 's@HTTP_SECRET@'"$(cat /config/httpSecret)"'@' /registry/config.yml - # Populate sensitive registry notification secrets in the config file - if [ -d /config/notifications ]; then - for i in /config/notifications/*; do - filename=$(basename $i); - sed -i -e 's@'"${filename}"'@'"$(cat $i)"'@' /registry/config.yml; - done - fi - # Insert any provided `storage` block from kubernetes secret - if [ -d /config/storage ]; then - # Copy contents of storage secret(s) - mkdir -p /registry/storage - cp -v -r -L /config/storage/* /registry/storage/ - # Ensure there is a new line in the end - echo '' >> /registry/storage/config - # Default `delete.enabled: true` if not present. - ## Note: busybox grep doesn't support multiline, so we chain `egrep`. - if ! $(egrep -A1 '^delete:\s*$' /registry/storage/config | egrep -q '\s{2,4}enabled:') ; then - echo 'delete:' >> /registry/storage/config - echo ' enabled: true' >> /registry/storage/config - fi - # Indent /registry/storage/config 2 spaces before inserting into config.yml - sed -i 's/^/ /' /registry/storage/config - # Insert into /registry/config.yml after `storage:` - sed -i '/^storage:/ r /registry/storage/config' /registry/config.yml - # Remove the now extraneous `config` file - rm /registry/storage/config - fi - # Copy any middleware.storage if present - if [ -d /config/middleware.storage ]; then - cp -v -r -L /config/middleware.storage /registry/middleware.storage - fi - # Set to known path, to used ConfigMap - cat /config/certificate.crt > /registry/certificate.crt - # Copy the optional profiling keyfile to the expected location - if [ -f /config/profiling-key.json ]; then - cp /config/profiling-key.json /registry/profiling-key.json - fi - # Insert Database password, if enabled - if [ -f /config/database_password ] ; then - sed -i -e 's@DB_PASSWORD_FILE@'"$(cat /config/database_password)"'@' /registry/config.yml - fi - # Insert Redis password, if enabled - if [ -f /config/registry/redis-password ] ; then - sed -i -e 's@REDIS_CACHE_PASSWORD@'"$(cat /config/registry/redis-password)"'@' /registry/config.yml - fi - # Insert import notification secret, if migration is enabled - if [ -f /config/registry/notificationSecret ] ; then - sed -i -e 's@NOTIFICATION_SECRET@'"$(cat /config/registry/notificationSecret | tr -d '[]"')"'@' /registry/config.yml - fi - # Copy the database TLS connection files to the expected location and set permissions - if [ -d /config/ssl ]; then - cp -r /config/ssl/ /registry/ssl - chmod 700 /registry/ssl - chmod 600 /registry/ssl/*.pem - fi - # Copy TLS certificates if present - if [ -d /config/tls ]; then - cp -r /config/tls/ /registry/tls - chmod 700 /registry/tls - chmod 600 /registry/tls/* - fi - -# define some sane resource requests and limitations -resources: - # limits: - # cpu: 200m - # memory: 1024Mi - requests: - cpu: 50m - memory: 32Mi - -## Node labels for pod assignment -## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -nodeSelector: {} - -affinity: - podAntiAffinity: - topologyKey: - -# Protocol/Host only. '/jwt/auth' will be appended. -authEndpoint: -# Do not change this -tokenService: 'container_registry' -# This must match your GitLab Rails configuration -# tokenIssuer: 'gitlab-issuer' - -# Must to be `false` to support Windows clients -# See https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/3964 -authAutoRedirect: false - -maxUnavailable: 1 - -# if minReplicas is >1, shared storage MUST be used. -hpa: - minReplicas: 2 - maxReplicas: 10 - cpu: - targetType: Utilization # Utilization or AverageValue - # targetAverageValue: 1 - targetAverageUtilization: 75 - # memory: - # targetType: Utilization # Utilization or AverageValue - # targetAverageValue: 1G - # targetAverageUtilization: 75 - # Note that the HPA is limited to autoscaling/v2beta1, autoscaling/v2beta2 and autoscaling/v2 - customMetrics: [] # Overrides HPA metrics definition - behavior: - scaleDown: - stabilizationWindowSeconds: 300 - -storage: {} -# secret: -# redirect: -# disable: -# exceptions: [] -middleware: - # See https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/configuration.md#middleware - storage: [] - ## EXAMPLE ONLY - # - name: cloudfront - # options: - # baseurl: cdn.registry.example.com - # # `privatekey` is auto-populated with the content from the privatekey Secret. - # privatekeySecret: - # secret: cdn-private-key - # key: private.pem - # keypairid: YOURKEYPAIRIDFORPRIVATEKEY - -minio: - redirect: false - -# Enable the registry to accept windows based docker images -# See https://github.com/docker/distribution/issues/2795 -validation: - disabled: true - manifests: - referencelimit: 0 - payloadsizelimit: 0 - urls: - allow: [] - deny: [] - -# Configure the logging mechanism for the Container Registry as desired -# See https://docs.docker.com/registry/configuration/#log -log: - level: info - fields: - service: registry - -debug: - addr: - port: 5001 - tls: - enabled: false - secretName: # Kubernetes secret, type kubernetes.io/tls - clientCAs: [] - minimumTLS: "tls1.2" - # DEPRECATED in favor of `metrics` - prometheus: - enabled: false - path: - -# The debug.addr.port is used for metrics -metrics: - enabled: false - path: /metrics - serviceMonitor: - enabled: false - additionalLabels: {} - endpointConfig: {} - -# Amount of time to wait for HTTP connections to drain after -# receiving a SIGTERM signal -draintimeout: '0' - -# Enable the registry to return relative URLs in Location headers -relativeurls: false - -# https://docs.docker.com/registry/configuration/#health -health: - storagedriver: - enabled: false - interval: 10s - threshold: 3 - -## Allow to overwrite under which User and Group the Pod will be running. -securityContext: - runAsUser: 1000 - fsGroup: 1000 - # fsGroupChangePolicy: OnRootMismatch - -## Allow to overwrite the specific security context under which the container is running. -containerSecurityContext: - runAsUser: 1000 - -# Disable reporting by default -# https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/configuration.md#reporting -reporting: - sentry: - enabled: false - # dsn: - # environment: - -# Disable continuous profiling by default -# https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/configuration.md#profiling -# keyfile is provided via secrets, and serviceversion will be image.tag -profiling: - stackdriver: - enabled: false - credentials: {} - -serviceAccount: - create: false - -# Disable metadata database by default -# NOTE: This is an experimental feature and must not be used in production. -# https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/configuration.md#database -database: - enabled: false - user: registry - password: {} - # secret: RELEASE_NAME-registry-database-password - # key: password - name: registry - sslmode: disable - ssl: {} - migrations: - enabled: true - activeDeadlineSeconds: 3600 - backoffLimit: 6 - discovery: - enabled: false -# Redis cache to be used in conjunction with the metadata database. -# NOTE: This is an experimental feature and must not be used in production. -# https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/configuration.md#cache-1 -redis: - cache: - enabled: false - password: - enabled: false - -# Configuration settings to support the migration of large registries to the metadata database. -# NOTE: This is an experimental feature and must not be used in production. -# https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/configuration.md#migration -migration: - enabled: false - disablemirrorfs: false - # rootdirectory: - # tagconcurrency: 1 - # maxconcurrentimports: 1 - # importtimeout: 5m - # preimporttimeout: 1h - importnotification: - enabled: false - timeout: 5s - # url: 'https://gitlab.example.com/api/v4/internal/registry/repositories/{path}/migration/status' - -# Disable online garbage collection by default. -# NOTE: This is an experimental feature and must not be used in production. -# https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/configuration.md#gc -gc: - disabled: true - - -## Configure TLS on the instance itself -## WARNING: All clients must trust the certificate used for service. -tls: - enabled: false - secretName: # Kubernetes secret, type kubernetes.io/tls - clientCAs: [] - minimumTLS: "tls1.2" - # NGINX Ingress related - verify: true - caSecretName: # Kubernetes secret, type Opaque, with `ca.crt` key diff --git a/charts/gitlab/gitlab/requirements.lock b/charts/gitlab/gitlab/requirements.lock deleted file mode 100644 index 8b3d66c7f..000000000 --- a/charts/gitlab/gitlab/requirements.lock +++ /dev/null @@ -1,36 +0,0 @@ -dependencies: -- name: gitlab - repository: "" - version: '*.*.*' -- name: certmanager-issuer - repository: "" - version: '*.*.*' -- name: minio - repository: "" - version: '*.*.*' -- name: registry - repository: "" - version: '*.*.*' -- name: cert-manager - repository: https://charts.jetstack.io/ - version: v1.11.1 -- name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 -- name: postgresql - repository: https://charts.bitnami.com/bitnami - version: 12.5.2 -- name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.52.0 -- name: redis - repository: https://charts.bitnami.com/bitnami - version: 16.13.2 -- name: nginx-ingress - repository: "" - version: '*.*.*' -- name: gitlab-zoekt - repository: https://charts.gitlab.io/ - version: 0.3.0 -digest: sha256:0557fbe3817e1b65c83e3ee9aa86034c0d4eb63359623f33625ed6937acd69d3 -generated: "2023-05-23T15:15:37.437252563Z" diff --git a/charts/gitlab/gitlab/requirements.yaml b/charts/gitlab/gitlab/requirements.yaml deleted file mode 100644 index f27a889da..000000000 --- a/charts/gitlab/gitlab/requirements.yaml +++ /dev/null @@ -1,37 +0,0 @@ -dependencies: -- name: gitlab - version: '*.*.*' -- name: certmanager-issuer - version: '*.*.*' -- name: minio - version: '*.*.*' -- name: registry - version: '*.*.*' -- name: cert-manager - version: 1.11.1 - repository: https://charts.jetstack.io/ - condition: certmanager.install - alias: certmanager -- name: prometheus - version: 15.18.0 - repository: https://prometheus-community.github.io/helm-charts - condition: prometheus.install -- name: postgresql - version: 12.5.2 - repository: https://charts.bitnami.com/bitnami - condition: postgresql.install -- name: gitlab-runner - version: 0.52.0 - repository: https://charts.gitlab.io/ - condition: gitlab-runner.install -- name: redis - version: 16.13.2 - repository: https://charts.bitnami.com/bitnami - condition: redis.install -- name: nginx-ingress - condition: nginx-ingress.enabled - version: '*.*.*' -- name: gitlab-zoekt - version: 0.3.0 - repository: https://charts.gitlab.io/ - condition: gitlab-zoekt.install diff --git a/charts/gitlab/gitlab/support/crd.yaml b/charts/gitlab/gitlab/support/crd.yaml deleted file mode 100644 index 48d6bf9fc..000000000 --- a/charts/gitlab/gitlab/support/crd.yaml +++ /dev/null @@ -1,99 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: gitlabs.gitlab.com -spec: - group: gitlab.com - names: - kind: GitLab - singular: gitlab - plural: gitlabs - shortNames: - - gl - versions: - - name: v1beta1 - served: true - storage: true - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - type: object - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - type: object - properties: - helmRelease: - type: string - revision: - type: string - templates: - type: object - properties: - migrationsTemplate: - type: object - properties: - configMapKey: - type: string - configMapName: - type: string - required: - - configMapName - - configMapKey - sharedSecretsTemplate: - type: object - properties: - roleBindingKey: - type: string - roleKey: - type: string - serviceAccountKey: - type: string - required: - - serviceAccountKey - - roleKey - - roleBindingKey - required: - - migrationsTemplate - - sharedSecretsTemplate - version: - type: string - required: - - version - - templates - - helmRelease - status: - type: object - properties: - conditions: - type: array - items: - type: object - properties: - lastTransitionTime: - type: string - format: date-time - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - type - - status - - lastTransitionTime - deployedRevision: - type: string - observedGeneration: - type: integer - format: int64 diff --git a/charts/gitlab/gitlab/templates/NOTES.txt b/charts/gitlab/gitlab/templates/NOTES.txt deleted file mode 100644 index 71d8e12ea..000000000 --- a/charts/gitlab/gitlab/templates/NOTES.txt +++ /dev/null @@ -1,206 +0,0 @@ -{{- $NOTICE := "\n=== NOTICE" -}} -{{- $WARNING := "\n=== WARNING" -}} - -{{/* PostgreSQL minimum version change */}} -{{ $NOTICE }} -The minimum required version of PostgreSQL is now 12. See https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/doc/installation/upgrade.md for more details. - -{{- /* If the Container Registry metadata database is enabled, note it is not production ready */}} -{{- if eq .Values.registry.database.enabled true }} -{{ $WARNING }} -The Container Registry metadata database has been enabled. Please note that it is an experimental feature and must not be used in production. -{{- end }} - -{{- /* If the Container Registry filesystem metadata is disabled, note it is not production ready */}} -{{- if eq true .Values.registry.migration.disablemirrorfs }} -{{ $WARNING }} -The Container Registry filesystem metadata has been disabled. Please note that it is an experimental feature and must not be used in production. -{{- end }} - -{{- /* If the Container Registry migration mode is enabled, note it is not production ready */}} -{{- if eq .Values.registry.migration.enabled true }} -{{ $WARNING }} -The Container Registry migration mode has been enabled. Please note that it is an experimental feature and must not be used in production. - -{{- end }} - -{{- /* If the Container Registry online garbage collection is enabled, note it is not production ready */}} -{{- if eq false .Values.registry.gc.disabled }} -{{ $WARNING }} -The Container Registry online garbage collection has been enabled. Please note that it is an experimental feature and must not be used in production. -{{- end }} - -{{- /* If Praefect enabled, note it is not production ready */}} -{{- if eq .Values.global.praefect.enabled true }} -{{ $WARNING }} -The Praefect chart has been enabled. Please note that it is still under development and not ready for production use. Usage may require significant manual intervention during upgrades. -{{- end }} - -{{- /* If shared-secrets is disable, manual secret creation will be needed */}} -{{- if not (index .Values "shared-secrets").enabled }} -{{ $NOTICE }} -The automatic generation of secrets has been disabled. -The user should ensure all necessary secrets are created according to documentation, or the deployment will fail to operate correctly. -{{- end }} -{{- /* If using self-signed auto-generated certificates, and a service needing them is enabled */}} -{{- if or .Values.gitlab.webservice.enabled .Values.registry.enabled .Values.global.minio.enabled }} -{{- if not (or .Values.global.ingress.configureCertmanager (include "gitlab.ingress.tls.configured" .)) }} -{{ $WARNING }} -Automatic TLS certificate generation with cert-manager is disabled. -One or more of the components does not have a TLS certificate Secret configured. -As a result, Self-signed certificates were generated for these components. - -You may retrieve the CA root for these certificates from the `{{ template "gitlab.wildcard-self-signed-cert-name" $ }}-ca` secret, via the following command. It can then be imported to a web browser or system store. - - kubectl get secret {{ template "gitlab.wildcard-self-signed-cert-name" $ }}-ca -ojsonpath='{.data.cfssl_ca}' | base64 --decode > {{ template "gitlab.gitlab.hostname" $ }}.ca.pem - -If you do not wish to use self-signed certificates, please set the following properties: -- global.ingress.tls.secretName -OR all of: -- global.ingress.tls.enabled (set to `true`) -{{- if $.Values.gitlab.webservice.enabled }} -- gitlab.webservice.ingress.tls.secretName -{{- if $.Values.global.appConfig.smartcard.enabled }} -- gitlab.webservice.ingress.tls.smartcardSecretName -{{- end }} -{{- end }} -{{- if $.Values.registry.enabled }} -- registry.ingress.tls.secretName -{{- end }} -{{- if $.Values.global.minio.enabled }} -- minio.ingress.tls.secretName -{{- end }} -{{- if $.Values.global.pages.enabled }} -- gitlab.gitlab-pages.ingress.tls.secretName -{{- end }} -{{- if $.Values.global.kas.enabled }} -- gitlab.kas.ingress.tls.secretName -{{- end }} - -{{- if (index .Values "gitlab-runner").install }} -{{ $WARNING }} -Automatic TLS certificate generation with cert-manager is disabled and no TLS certificates were provided. Self-signed certificates were generated that do not work with gitlab-runner. Please either disable gitlab-runner by setting `gitlab-runner.install=false` or provide valid certificates. -{{- end -}} -{{- end -}} -{{- end -}} -{{- /* Runner notice if .install && ! .runners.privileged */}} -{{- if and (index .Values "gitlab-runner").install (not (index .Values "gitlab-runner").runners.privileged) }} -{{ $NOTICE }} -You've installed GitLab Runner without the ability to use 'docker in docker'. -The GitLab Runner chart (gitlab/gitlab-runner) is deployed without the `privileged` flag by default for security purposes. This can be changed by setting `gitlab-runner.runners.privileged` to `true`. Before doing so, please read the GitLab Runner chart's documentation on why we -chose not to enable this by default. See https://docs.gitlab.com/runner/install/kubernetes.html#running-docker-in-docker-containers-with-gitlab-runners -{{- end }} - -{{- /* toolbox replicas */}} -{{- if eq (index $.Values.gitlab "toolbox" "replicas" | int) 0 }} -{{ $NOTICE }} -The GitLab toolbox is scaled to 0. -The `toolbox` Pod is very useful for administration and debugging of this application suite. You may configure `gitlab.toolbox.replicas=1` if you wish to leave a Pod running at all times, or you can scale the deployment up when needed: - - `kubectl scale --replicas=1 deployment/{{ .Release.Name }}-toolbox` -{{- end }} - -{{- /* WARN: global.registry.notificationSecret */}} -{{- if and (not (index .Values "shared-secrets" "enabled")) (not .Values.global.registry.notificationSecret) }} -{{ $WARNING }} -The attribute `shared-secrets.enabled` is `false`, no `global.registry.notificationSecret` provided. -The shared-secrets chart has been disabled, and `global.registry.notificationSecret` has not been provided. -Starting in 4.11.x of this chart, this secret must be present, but shared-secrets will not be run to generated it. -Please see https://docs.gitlab.com/charts/charts/globals#configure-registry-settings -{{- end }} -{{- /* print install survey link */}} -{{- $appVersion := coalesce .Values.global.gitlabVersion .Chart.AppVersion -}} -{{- if and .Release.IsInstall (regexMatch "^\\d+\\.\\d+\\.\\d+(-rc\\d+)?(-pre)?$" $appVersion) }} -Help us improve the installation experience, let us know how we did with a 1 minute survey: -{{- printf "https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=helm&release=%s" (regexReplaceAll "^(\\d+)\\.(\\d+)\\..+" $appVersion "${1}-${2}") }} -{{- end }} - -{{- /* WARN: Usage of PAGES_UPDATE_LEGACY_STORAGE with bundled Pages discouraged.*/}} -{{- if .Values.global.pages.enabled }} -{{- $envValues := dict }} -{{- $_ := set $envValues "gitlab.webservice" (default false .Values.gitlab.webservice.extraEnv.PAGES_UPDATE_LEGACY_STORAGE) }} -{{- $_ := set $envValues "gitlab.sidekiq" (default false .Values.gitlab.sidekiq.extraEnv.PAGES_UPDATE_LEGACY_STORAGE) }} -{{- $_ := set $envValues "global" (default false .Values.global.extraEnv.PAGES_UPDATE_LEGACY_STORAGE) }} -{{- $toolboxExtraEnv := index .Values.gitlab "toolbox" "extraEnv" }} -{{- $_ := set $envValues "gitlab.toolbox" (default false $toolboxExtraEnv.PAGES_UPDATE_LEGACY_STORAGE) }} -{{- range $component, $value := $envValues }} -{{- if eq $value true }} -{{ $WARNING }} -GitLab Pages configured to use disk storage via `{{ $component }}.extraEnv.PAGES_UPDATE_LEGACY_STORAGE`. -Using `PAGES_UPDATE_LEGACY_STORAGE` environment variable with bundled Pages service is not recommended. This setting is specifically used when using an external GitLab Pages deployment. -{{- end }} -{{- end }} -{{- end }} - -{{- /* In-chart NGINX Ingress Controller notices */}} -{{- if eq true (index $.Values "nginx-ingress").enabled }} -{{ $NOTICE }} -The in-chart NGINX Ingress Controller has the following requirements: - - Kubernetes version must be 1.19 or newer. - - Ingress objects must be in group/version `networking.k8s.io/v1`. -{{- end }} - -{{- /* Deprecation notice for `gitlab.deprecate.kas.privateApi.tls.enabled` setting */}} -{{- if hasKey $.Values.gitlab.kas.privateApi.tls "enabled" }} -{{ $NOTICE }} -kas: - The configuration of `gitlab.kas.privateApi.tls.enabled` has moved. Please use `global.kas.tls.enabled` instead. - Other components of the GitLab chart other than KAS also need to be configured to talk to KAS via TLS. - With a global value the chart can take care of these configurations without the need for other specific values. -{{- end }} - -{{- /* Deprecation notice for `gitlab.deprecate.kas.privateApi.tls.secretName` setting */}} -{{- if hasKey $.Values.gitlab.kas.privateApi.tls "secretName" }} -{{ $NOTICE }} -kas: - The configuration of `gitlab.kas.privateApi.tls.secretName` has moved. Please use `global.kas.tls.secretName` instead. - Other components of the GitLab chart other than KAS also need to be configured to talk to KAS via TLS. - With a global value the chart can take care of these configurations without the need for other specific values. -{{- end }} - -{{- /* Deprecation notice for `gitlab.deprecate.sidekiq.queueSelector` setting */}} -{{- if and (hasKey .Values.gitlab.sidekiq "queueSelector") (eq true .Values.gitlab.sidekiq.queueSelector) -}} -{{ $NOTICE }} -sidekiq: - The configuration of 'gitlab.sidekiq.queueSelector' should be removed. Please follow the steps at https://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#start-multiple-processes, to run Sidekiq with multiple processes while listening to all queues. -{{- end }} - -{{- /* Deprecation notice for `gitlab.deprecate.sidekiq.pods.queueSelector` setting */}} -{{- range $index, $pod := .Values.gitlab.sidekiq.pods -}} -{{- if and (hasKey $pod "queueSelector") -}} -{{ $NOTICE }} -sidekiq.pods[{{ $index }}] ({{ $pod.name }}): - The configuration of 'gitlab.sidekiq.pods[{{ $index }}].queueSelector' should be removed. Please follow the steps at https://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#start-multiple-processes, to run Sidekiq with multiple processes while listening to all queues. -{{- end -}} -{{- end }} - -{{- /* Deprecation notice for `gitlab.deprecate.sidekiq.negateQueues` setting */}} -{{- if hasKey .Values.gitlab.sidekiq "negateQueues" -}} -{{ $NOTICE }} -sidekiq: - The configuration of 'gitlab.sidekiq.negateQueues' should be removed. Please follow the steps at https://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#start-multiple-processes, to run Sidekiq with multiple processes while listening to all queues. -{{- end }} - -{{- /* Deprecation notice for `gitlab.deprecate.sidekiq.pods.negateQueues` setting */}} -{{- range $index, $pod := .Values.gitlab.sidekiq.pods -}} -{{- if hasKey $pod "negateQueues" -}} -{{ $NOTICE }} -sidekiq.pods[{{ $index }}] ({{ $pod.name }}): - The configuration of 'gitlab.sidekiq.pods[{{ $index }}].negateQueues' should be removed. Please follow the steps at https://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#start-multiple-processes, to run Sidekiq with multiple processes while listening to all queues. -{{- end -}} -{{- end }} - -{{- /* Deprecation notice for global.redis.password */}} -{{- if kindIs "map" .Values.global.redis.password }} -{{ $NOTICE }} -redis: - The configuration key `global.redis.password` has been renamed. Please use - `globa.redis.auth` instead. This is the source of the `coalesce.go` warning - message from Helm as well. For more details, please see: - https://docs.gitlab.com/charts/installation/upgrade.html#use-of-globalredispassword -{{- end -}} - -{{- /* run deprecations */}} -{{ include "gitlab.deprecations" . }} -{{- /* run checkConfig */}} -{{ include "gitlab.checkConfig" . }} diff --git a/charts/gitlab/gitlab/templates/_application.tpl b/charts/gitlab/gitlab/templates/_application.tpl deleted file mode 100644 index 9e3af720e..000000000 --- a/charts/gitlab/gitlab/templates/_application.tpl +++ /dev/null @@ -1,76 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{- define "gitlab.application.labels" -}} -app.kubernetes.io/name: {{ .Release.Name }} -{{- end -}} - -{{- define "gitlab.standardLabels" -}} -app: {{ template "name" . }} -chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} -release: {{ .Release.Name }} -heritage: {{ .Release.Service }} -{{- if .Values.global.application.create }} -{{ include "gitlab.application.labels" . }} -{{- end -}} -{{- end -}} - - -{{- define "gitlab.selectorLabels" -}} -app: {{ template "name" . }} -release: {{ .Release.Name }} -{{ if .Values.global.application.create -}} -{{ include "gitlab.application.labels" . }} -{{- end -}} -{{- end -}} - -{{- define "gitlab.commonLabels" -}} -{{- $commonLabels := merge (pluck "labels" (default (dict) .Values.common) | first) .Values.global.common.labels}} -{{- if $commonLabels }} -{{- range $key, $value := $commonLabels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* Deprecated, do not use these labels.*/}} -{{- define "gitlab.immutableLabels" -}} -app: {{ template "name" . }} -chart: {{ .Chart.Name }} -release: {{ .Release.Name }} -heritage: {{ .Release.Service }} -{{ if .Values.global.application.create -}} -{{ include "gitlab.application.labels" . }} -{{- end -}} -{{- end -}} - - -{{- define "gitlab.nodeSelector" -}} -{{- $nodeSelector := default .Values.global.nodeSelector .Values.nodeSelector -}} -{{- if $nodeSelector }} -nodeSelector: - {{- toYaml $nodeSelector | nindent 2 }} -{{- end }} -{{- end -}} - -{{/* -Return priorityClassName for Pod definitions -*/}} -{{- define "gitlab.priorityClassName" -}} -{{- $pcName := default .Values.global.priorityClassName .Values.priorityClassName -}} -{{- if $pcName }} -priorityClassName: {{ $pcName }} -{{- end -}} -{{- end -}} - -{{/* -Allow configuring a standard suffix on all images in chart -*/}} -{{- define "gitlab.image.tagSuffix" -}} -{{- if hasKey . "Values" -}} -{{ .Values.global.image.tagSuffix }} -{{- else if hasKey . "global" -}} -{{ .global.image.tagSuffix }} -{{- else }} -"" -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_boolean.tpl b/charts/gitlab/gitlab/templates/_boolean.tpl deleted file mode 100644 index 7fdd9d83a..000000000 --- a/charts/gitlab/gitlab/templates/_boolean.tpl +++ /dev/null @@ -1,24 +0,0 @@ -{{/* -- If `local` is present (true or false; not nil), use that. -- Otherwise, if `global` is present, use that. -- Otherwise, use `default`. - -Example: include "gitlab.boolean.local" (dict "global" $.Values.cluster "local" .cluster "default" true) - -For all cases, return `"true"` for true values, and `""` for false -values. This means that we can keep the literal string 'true' when true, -but have false values act as falsey (because `default` cares about empty -values). - -The `default` function won't handle this case correctly as in Sprig, -false is empty. -*/}} -{{- define "gitlab.boolean.local" -}} -{{- if kindIs "bool" .local -}} -{{- default "" .local -}} -{{- else if kindIs "bool" .global -}} -{{- default "" .global -}} -{{- else -}} -{{- default "" .default -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_certificates.tpl b/charts/gitlab/gitlab/templates/_certificates.tpl deleted file mode 100644 index 1a32d68c6..000000000 --- a/charts/gitlab/gitlab/templates/_certificates.tpl +++ /dev/null @@ -1,109 +0,0 @@ -{{/* Templates for certificates injection */}} - -{{- define "gitlab.certificates.initContainer" -}} -{{- $customCAsEnabled := .Values.global.certificates.customCAs }} -{{- $internalGitalyTLSEnabled := $.Values.global.gitaly.tls.enabled }} -{{- $internalPraefectTLSEnabled := $.Values.global.praefect.tls.enabled }} -{{- $certmanagerDisabled := not (or $.Values.global.ingress.configureCertmanager $.Values.global.ingress.tls) }} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.global.certificates.image -}} -- name: certificates - image: {{ include "gitlab.certificates.image" . }} - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 2 }} - {{- include "gitlab.init.containerSecurityContext" . | indent 2 }} - env: - {{- include "gitlab.extraEnv" . | nindent 2 }} - {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 2 }} - volumeMounts: - - name: etc-ssl-certs - mountPath: /etc/ssl/certs - readOnly: false - - name: etc-pki-ca-trust-extracted-pem - mountPath: /etc/pki/ca-trust/extracted/pem - readOnly: false -{{- if or $customCAsEnabled (or $certmanagerDisabled $internalGitalyTLSEnabled $internalPraefectTLSEnabled) }} - - name: custom-ca-certificates - mountPath: /usr/local/share/ca-certificates - readOnly: true -{{- end }} - resources: - {{- toYaml .Values.init.resources | nindent 4 }} -{{- end -}} - -{{- define "gitlab.certificates.volumes" -}} -{{- $customCAsEnabled := .Values.global.certificates.customCAs }} -{{- $internalGitalyTLSEnabled := $.Values.global.gitaly.tls.enabled }} -{{- $internalPraefectTLSEnabled := $.Values.global.praefect.tls.enabled }} -{{- $certmanagerDisabled := not (or $.Values.global.ingress.configureCertmanager $.Values.global.ingress.tls) }} -- name: etc-ssl-certs - emptyDir: - medium: "Memory" -- name: etc-pki-ca-trust-extracted-pem - emptyDir: - medium: "Memory" -{{- if or $customCAsEnabled (or $certmanagerDisabled $internalGitalyTLSEnabled $internalPraefectTLSEnabled) }} -- name: custom-ca-certificates - projected: - defaultMode: 0440 - sources: - {{- range $index, $customCA := .Values.global.certificates.customCAs }} - {{- if $customCA.secret }} - - secret: - name: {{ $customCA.secret }} - {{- if $customCA.keys }} - items: - {{- range $customCA.keys }} - - key: {{ . }} - path: {{ . }} - {{- end }} - {{- end }} - {{- else if $customCA.configMap }} - - configMap: - name: {{ $customCA.configMap }} - {{- if $customCA.keys }} - items: - {{- range $customCA.keys }} - - key: {{ . }} - path: {{ . }} - {{- end }} - {{- end }} - {{- end }} - {{- end }} - {{- if not (or $.Values.global.ingress.configureCertmanager $.Values.global.ingress.tls) }} - - secret: - name: {{ template "gitlab.wildcard-self-signed-cert-name" $ }}-ca - {{- end }} - {{- if $internalGitalyTLSEnabled }} - {{- if $.Values.global.praefect.enabled }} - {{- range $vs := $.Values.global.praefect.virtualStorages }} - - secret: - name: {{ $vs.tlsSecretName }} - items: - - key: "tls.crt" - path: "gitaly-{{ $vs.name }}-tls.crt" - {{- end }} - {{- else }} - - secret: - name: {{ template "gitlab.gitaly.tls.secret" $ }} - items: - - key: "tls.crt" - path: "gitaly-internal-tls.crt" - {{- end }} - {{- end }} - {{- if $internalPraefectTLSEnabled }} - - secret: - name: {{ template "gitlab.praefect.tls.secret" $ }} - items: - - key: "tls.crt" - path: "praefect-internal-tls.crt" - {{- end }} -{{- end -}} -{{- end -}} - -{{- define "gitlab.certificates.volumeMount" -}} -- name: etc-ssl-certs - mountPath: /etc/ssl/certs/ - readOnly: true -- name: etc-pki-ca-trust-extracted-pem - mountPath: /etc/pki/ca-trust/extracted/pem - readOnly: true -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig.tpl b/charts/gitlab/gitlab/templates/_checkConfig.tpl deleted file mode 100644 index bdc2817b8..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig.tpl +++ /dev/null @@ -1,237 +0,0 @@ -{{/* -Template for checking configuration - -The messages templated here will be combined into a single `fail` call. This creates a means for the user to receive all messages at one time, instead of a frustrating iterative approach. - -- Pick a location for the new check. - + Checks of a group reside in a sub file, `_checkConfig_xxx.tpl`. - + If there isn't a group for that check yet, put it at the end of this file - + If there are more than 1 check of a same group, extract those checks into a new - file following the above format. Don't forget to extract the tests too. -- `define` a new template, prefixed `gitlab.checkConfig.` -- Check for known problems in configuration, and directly output messages (see message format below) -- Add a line to `gitlab.checkConfig` to include the new template. -- Add tests for the newly created check. - + Tests for checks of a group are put in `spec/integration/check_config/xxx_spec.rb` - + Tests for other miscellaneous checks are put in `spec/integration/check_config_spec.rb` - -Message format: - -**NOTE**: The `if` statement preceding the block should _not_ trim the following newline (`}}` not `-}}`), to ensure formatting during output. - -``` -chart: - MESSAGE -``` -*/}} -{{/* -Compile all warnings into a single message, and call fail. - -Due to gotpl scoping, we can't make use of `range`, so we have to add action lines. -*/}} -{{- define "gitlab.checkConfig" -}} -{{- $messages := list -}} -{{/* add templates here */}} - -{{/* _checkConfig_mailroom.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.incomingEmail.microsoftGraph" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.serviceDesk" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.serviceDesk.microsoftGraph" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.incomingEmail.deliveryMethod" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.serviceDeskEmail.deliveryMethod" .) -}} - -{{/* _checkConfig_geo.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.geo.database" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.geo.secondary.database" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.geo.registry.replication.primaryApiUrl" .) -}} - -{{/* _checkConfig_gitaly.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.gitaly.storageNames" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.gitaly.tls" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.gitaly.extern.repos" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.gitaly.gpgSigning" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.praefect.storageNames" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.praefect.defaultReplicationFactor" .) -}} - -{{/* _checkConfig_nginx.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.nginx.controller.extraArgs" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.nginx.clusterrole.scope" .) -}} - -{{/* _checkConfig_object_storage.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.objectStorage.consolidatedConfig" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.objectStorage.typeSpecificConfig" .) -}} - -{{/* _checkConfig_postgresql.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.postgresql.deprecatedVersion" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.postgresql.noPasswordFile" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.database.externalLoadBalancing" .) -}} - -{{/* _checkConfig_registry.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.registry.sentry.dsn" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.registry.notifications" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.registry.database" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.registry.gc" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.registry.migration" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.registry.redis.cache" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.registry.tls" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.registry.debug.tls" .) -}} - -{{/* _checkConfig_sidekiq.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.sidekiq.queues.mixed" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.sidekiq.queues" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.sidekiq.timeout" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.sidekiq.routingRules" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.sidekiq.server_ports" .) -}} - -{{/* _checkConfig_toolbox.tpl*/}} -{{- $messages = append $messages (include "gitlab.toolbox.replicas" .) -}} -{{- $messages = append $messages (include "gitlab.toolbox.backups.objectStorage.config.secret" .) -}} - -{{/* _checkConfig_webservice.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.appConfig.maxRequestDurationSeconds" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.webservice.gracePeriod" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.webservice.loadBalancer" .) -}} - -{{/* _checkConfig_workhorse.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.workhorse.exporter.tls.enabled" .) -}} - -{{/* _checkConfig_gitlab_shell.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.gitlabShell.proxyPolicy" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.gitlabShell.metrics" .) -}} - -{{/* _checkConfig_omniauth.tpl*/}} -{{- $messages = append $messages (include "gitlab.checkConfig.omniauth.providerFormat" .) -}} - -{{/* other checks */}} -{{- $messages = append $messages (include "gitlab.checkConfig.multipleRedis" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.redisYmlOverride" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.hostWhenNoInstall" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.sentry" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.gitlab_docs" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.smtp.openssl_verify_mode" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.smtp.tls_kind" .) -}} -{{- $messages = append $messages (include "gitlab.checkConfig.globalServiceAccount" .) -}} -{{- $messages = append $messages (include "gitlab.duoAuth.checkConfig" .) -}} - -{{- /* prepare output */}} -{{- $messages = without $messages "" -}} -{{- $message := join "\n" $messages -}} - -{{- /* print output */}} -{{- if $message -}} -{{- printf "\nCONFIGURATION CHECKS:\n%s" $message | fail -}} -{{- end -}} -{{- end -}} - -{{/* -Ensure that `redis.install: false` if configuring multiple Redis instances -*/}} -{{- define "gitlab.checkConfig.multipleRedis" -}} -{{/* "cache" "sharedState" "queues" "actioncable" */}} -{{- $x := dict "count" 0 -}} -{{- range $redis := list "cache" "sharedState" "queues" "actioncable" -}} -{{- if hasKey $.Values.global.redis $redis -}} -{{- $_ := set $x "count" ( add1 $x.count ) -}} -{{- end -}} -{{- end -}} -{{- if and .Values.redis.install ( lt 0 $x.count ) }} -redis: - If configuring multiple Redis servers, you can not use the in-chart Redis server. Please see https://docs.gitlab.com/charts/charts/globals#configure-redis-settings -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.multipleRedis */}} - -{{/* -Ensure that `redis.install: false` if using redis.yml override -*/}} -{{- define "gitlab.checkConfig.redisYmlOverride" -}} -{{- if and .Values.redis.install ( hasKey .Values.global.redis "redisYmlOverride" ) }} -redis: - When you override redis.yml you can not use the in-chart Redis server. Please see https://docs.gitlab.com/charts/charts/globals#configure-redis-settings -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.redisYmlOverride */}} - -{{/* -Ensure that `global.redis.host: ` is present if `redis.install: false` -*/}} -{{- define "gitlab.checkConfig.hostWhenNoInstall" -}} -{{- if and (not .Values.redis.install) (empty .Values.global.redis.host) (empty .Values.global.redis.redisYmlOverride) }} -redis: - You've disabled the installation of Redis. When using an external Redis, you must populate `global.redis.host` or `gitlab.redis.redisYmlOverride`. Please see https://docs.gitlab.com/charts/advanced/external-redis/ -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.hostWhenNoInstall */}} - -{{/* -Ensure that sentry has a DSN configured if enabled -*/}} -{{- define "gitlab.checkConfig.sentry" -}} -{{- if $.Values.global.appConfig.sentry.enabled }} -{{- if (not (or $.Values.global.appConfig.sentry.dsn $.Values.global.appConfig.sentry.clientside_dsn)) }} -sentry: - When enabling sentry, you must configure at least one DSN. - See https://docs.gitlab.com/charts/charts/globals.html#sentry-settings -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.sentry */}} - -{{/* -Ensure that gitlab_docs has a host configured if enabled -host mush be starts with https:// or http://, and not empty. -*/}} -{{- define "gitlab.checkConfig.gitlab_docs" -}} -{{- if $.Values.global.appConfig.gitlab_docs.enabled }} -{{- with $.Values.global.appConfig.gitlab_docs -}} -{{- if or (not .host) (and (not (hasPrefix "http://" .host)) (not (hasPrefix "https://" .host))) }} -gitlab_docs: - When enabling gitlab_docs, you must configure host, and it must start with `http://` or `https://`. -{{- end }} -{{- end }} -{{- end }} -{{- end -}} -{{/* END gitlab.checkConfig.gitlab_docs */}} - -{{/* -Ensure that a correct value is provided for -`global.smtp.openssl_verify_mode`. -*/}} -{{- define "gitlab.checkConfig.smtp.openssl_verify_mode" -}} -{{- $opensslVerifyModes := list "none" "peer" "client_once" "fail_if_no_peer_cert" -}} -{{- if .Values.global.smtp.openssl_verify_mode -}} -{{- if not (has .Values.global.smtp.openssl_verify_mode $opensslVerifyModes) }} -smtp: - "{{ .Values.global.smtp.openssl_verify_mode }}" is not a valid value for `global.smtp.openssl_verify_mode`. - Valid values are: {{ join ", " $opensslVerifyModes }}. -{{- end }} -{{- end }} -{{- end -}} -{{/* END gitlab.checkConfig.smtp.openssl_verify_mode */}} - -{{/* -Ensure that either `global.smtp.tls` or `global.smtp.enable_starttls_auto` is set to true, but not both. -*/}} -{{- define "gitlab.checkConfig.smtp.tls_kind" -}} -{{- if and .Values.global.smtp.tls .Values.global.smtp.enable_starttls_auto -}} -smtp: - global.smtp.tls and global.smtp.enable_starttls_auto are mutually exclusive. - Set one of them to false. SMTP providers usually use port 465 for TLS and port 587 for STARTTLS. -{{- end }} -{{- end }} -{{/* END gitlab.checkConfig.smtp.tls_kind */}} - -{{/* -Ensure that global service account settings are correct. -*/}} -{{- define "gitlab.checkConfig.globalServiceAccount" -}} -{{- if and .Values.global.serviceAccount.enabled .Values.global.serviceAccount.create -}} -{{- if .Values.global.serviceAccount.name }} -serviceAccount: - `global.serviceAccount.name` is set to {{ .Values.global.serviceAccount.name | quote }}. - Please set `global.serviceAccount.create=false` and manually create a ServiceAccount - object in the cluster with a matching name. -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.globalServiceAccount */}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_duoAuth.tpl b/charts/gitlab/gitlab/templates/_checkConfig_duoAuth.tpl deleted file mode 100644 index 3bf865c9b..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_duoAuth.tpl +++ /dev/null @@ -1,22 +0,0 @@ - -{{- define "gitlab.duoAuth.checkConfig" -}} -{{ with $.Values.global.appConfig }} -{{- if .duoAuth.enabled }} -{{- if (not .duoAuth.hostname) }} -duoAuth: Enabling Duo Auth requires hostname to be present - Duo Auth requires value of hostname acquired from Duo admin panel, which is provided here as string. - Please see https://docs.gitlab.com/charts/charts/globals.html#duoauth -{{- end -}} -{{- if (not .duoAuth.integrationKey) }} -duoAuth: Enabling Duo Auth requires integrationKey to be present - Duo Auth requires an integrationKey acquired from Duo admin panel, which is provided here as a string. - Please see https://docs.gitlab.com/charts/charts/globals.html#duoauth -{{- end -}} -{{- if (not .duoAuth.secretKey) }} -duoAuth: Enabling Duo Auth requires secretKey.secret to be present - Duo Auth requires a secretKey acquired from Duo admin panel, which is provided here via Kubernete Secret. - Please see https://docs.gitlab.com/charts/charts/globals.html#duoauth -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/charts/gitlab/gitlab/templates/_checkConfig_geo.tpl b/charts/gitlab/gitlab/templates/_checkConfig_geo.tpl deleted file mode 100644 index 43211d4f4..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_geo.tpl +++ /dev/null @@ -1,49 +0,0 @@ -{{/* -Ensure a database is configured when using Geo -listen over TLS */}} -{{- define "gitlab.checkConfig.geo.database" -}} -{{- with $.Values.global -}} -{{- if eq true .geo.enabled -}} -{{- if not .psql.host }} -geo: no database provided - It appears Geo was configured but no database was provided. Geo behaviors require external databases. Ensure `global.psql.host` is set. -{{ end -}} -{{- if not .psql.password.secret }} -geo: no database password provided - It appears Geo was configured, but no database password was provided. Geo behaviors require external databases. Ensure `global.psql.password.secret` is set. -{{ end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.geo.database */}} - -{{/* -Ensure a database is configured when using Geo secondary -listen over TLS */}} -{{- define "gitlab.checkConfig.geo.secondary.database" -}} -{{- with $.Values.global.geo -}} -{{- if include "gitlab.geo.secondary" $ }} -{{- if not .psql.host }} -geo: no secondary database provided - It appears Geo was configured with `role: secondary`, but no database was provided. Geo behaviors require external databases. Ensure `global.geo.psql.host` is set. -{{ end -}} -{{- if not .psql.password.secret }} -geo: no secondary database password provided - It appears Geo was configured with `role: secondary`, but no database password was provided. Geo behaviors require external databases. Ensure `global.geo.psql.password.secret` is set. -{{ end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.geo.secondary.database */}} - -{{/* -Ensure that when Registry replication is enabled for Geo, a primary API URL is specified. -*/}} -{{- define "gitlab.checkConfig.geo.registry.replication.primaryApiUrl" -}} -{{- if and (eq true .Values.global.geo.enabled) (and (eq .Values.global.geo.role "secondary") (eq true .Values.global.geo.registry.replication.enabled)) -}} -{{- if not .Values.global.geo.registry.replication.primaryApiUrl }} -geo: - Registry replication is enabled for GitLab Geo, but no primary API URL is specified. Please specify a value for `global.geo.registry.replication.primaryApiUrl`. -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_gitaly.tpl b/charts/gitlab/gitlab/templates/_checkConfig_gitaly.tpl deleted file mode 100644 index 93e50f052..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_gitaly.tpl +++ /dev/null @@ -1,112 +0,0 @@ -{{/* -Protect against problems in storage names within repositories configuration. -- Ensure that one (and only one) storage is named 'default'. -- Ensure no duplicates - -Collects the list of storage names by rendering the 'gitlab.appConfig.repositories' -template, and grabbing any lines that start with exactly 4 spaces. -*/}} -{{- define "gitlab.checkConfig.gitaly.storageNames" -}} -{{- $errorMsg := list -}} -{{- $config := include "gitlab.appConfig.repositories" $ -}} -{{- $storages := list }} -{{- range (splitList "\n" $config) -}} -{{- if (regexMatch "^ [^ ]" . ) -}} -{{- $storages = append $storages (trim . | trimSuffix ":") -}} -{{- end }} -{{- end }} -{{- if gt (len $storages) (len (uniq $storages)) -}} -{{- $errorMsg = append $errorMsg (printf "Each storage name must be unique. Current storage names: %s" $storages | sortAlpha | join ", ") -}} -{{- end -}} -{{- if not (has "default" $storages) -}} -{{- $errorMsg = append $errorMsg ("There must be one (and only one) storage named 'default'.") -}} -{{- end }} -{{- if not (empty $errorMsg) }} -gitaly: -{{- range $msg := $errorMsg }} - {{ $msg }} -{{- end }} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.gitaly.storageNames -}} - -{{/* -Ensure that if a user is migrating to Praefect, none of the Praefect virtual storage -names are 'default', as it should already be used by the non-Praefect storage configuration. -*/}} -{{- define "gitlab.checkConfig.praefect.storageNames" -}} -{{- if and $.Values.global.gitaly.enabled $.Values.global.praefect.enabled (not $.Values.global.praefect.replaceInternalGitaly) -}} -{{- range $i, $vs := $.Values.global.praefect.virtualStorages -}} -{{- if eq $vs.name "default" -}} -praefect: - Praefect is enabled, but `global.praefect.replaceInternalGitaly=false`. In this scenario, - none of the Praefect virtual storage names can be 'default'. Please modify - `global.praefect.virtualStorages[{{ $i }}].name`. -{{- end }} -{{- end }} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.praefect.storageNames" -}} - -{{/* -Ensure that defaultReplicationFactor is greater then 0, and less than gitalyReplicas's number -*/}} -{{- define "gitlab.checkConfig.praefect.defaultReplicationFactor" -}} -{{- if and $.Values.global.gitaly.enabled $.Values.global.praefect.enabled -}} -{{- range $i, $vs := $.Values.global.praefect.virtualStorages -}} -{{- $gitalyReplicas := int (default 1 $vs.gitalyReplicas) -}} -{{- $defaultReplicationFactor := int (default 1 $vs.defaultReplicationFactor) -}} -{{- if or ( gt $defaultReplicationFactor $gitalyReplicas ) ( lt $defaultReplicationFactor 1 ) -}} -praefect: - Praefect is enabled but 'defaultReplicationFactor' is not correct. - 'defaultReplicationFactor' is greater than 1, less than 'gitalyReplicas'. - Please modify `global.praefect.virtualStorages[{{ $i }}].defaultReplicationFactor`. -{{- end }} -{{- end }} -{{- end }} -{{- end }} -{{/* END gitlab.checkConfig.praefect.defaultReplicationFactor */}} - -{{/* -Ensure a certificate is provided when Gitaly is enabled and is instructed to -listen over TLS */}} -{{- define "gitlab.checkConfig.gitaly.tls" -}} -{{- $errorMsg := list -}} -{{- if and $.Values.global.gitaly.enabled $.Values.global.gitaly.tls.enabled -}} -{{- if $.Values.global.praefect.enabled -}} -{{- range $i, $vs := $.Values.global.praefect.virtualStorages -}} -{{- if not $vs.tlsSecretName }} -{{- $errorMsg = append $errorMsg (printf "global.praefect.virtualStorages[%d].tlsSecretName not specified ('%s')" $i $vs.name) -}} -{{- end }} -{{- end }} -{{- end }} -{{- end }} -{{- if not (empty $errorMsg) }} -gitaly: -{{- range $msg := $errorMsg }} - {{ $msg }} -{{- end }} - This configuration is not supported. -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.gitaly.tls */}} - -{{/* Check configuration of Gitaly external repos*/}} -{{- define "gitlab.checkConfig.gitaly.extern.repos" -}} -{{- if (and (not .Values.global.gitaly.enabled) (not .Values.global.gitaly.external) ) }} -gitaly: - external Gitaly repos needs to be specified if global.gitaly.enabled is not set -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.gitaly.extern.repos */}} - -{{/* Check that both GPG secret and key are set*/}} -{{- define "gitlab.checkConfig.gitaly.gpgSigning" -}} -{{- if and $.Values.global.gitaly.enabled $.Values.gitlab.gitaly.gpgSigning.enabled -}} -{{- if not (and $.Values.gitlab.gitaly.gpgSigning.secret $.Values.gitlab.gitaly.gpgSigning.key) -}} -gitaly: - secret and key must be set if gitlab.gitaly.gpgSigning.enabled is set -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.gitaly.gpgSigning */}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_gitlab_shell.tpl b/charts/gitlab/gitlab/templates/_checkConfig_gitlab_shell.tpl deleted file mode 100644 index 68ee942f6..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_gitlab_shell.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{- define "gitlab.checkConfig.gitlabShell.proxyPolicy" -}} -{{- $config := (index .Values "gitlab" "gitlab-shell").config -}} -{{/* -We enable ProxyProtocol between nginx-ingress and gitlab-shell whenever -gitlab-sshd is enabled to ensure the right remote IPs are seen by SSH. -By default, gitlab-sshd will optionally use the ProxyProtocol if -available. Setting the proxy policy to "reject" would prevent -gitlab-shell from working, so we check that this can't be done. -*/}} -{{- if and $config.proxyProtocol (eq $config.proxyPolicy "reject") }} -gitlab-shell: - gitlab.gitlab-shell.config.proxyProtocol is enabled, but gitlab.gitlab-shell.config.proxyPolicy is set to "reject". - gitlab-shell will not accept connections since these settings conflict with each other. - Either disable proxyProtocol or set proxyPolicy to "use", "require", or "ignore". -{{- end -}} -{{- end -}} -{{/* END "gitlab.checkConfig.gitlabShell.proxyPolicy" */}} - -{{- define "gitlab.checkConfig.gitlabShell.metrics" -}} -{{- $shell := (index .Values "gitlab" "gitlab-shell") -}} -{{/* -Metrics are only supported for "gitlab-shell" when "gitlab-sshd" -is used as the SSH daemon, as the OpenSSH daemon does not provide -viable collectable metrics. -*/}} -{{- if and $shell.metrics.enabled (not (eq $shell.sshDaemon "gitlab-sshd")) }} -gitlab-shell: - gitlab.gitlab-shell.metrics.enabled is true, but gitlab.gitlab-shell.sshDaemon is set to "{{- $shell.sshDaemon -}}". - Metrics are not supported for the "{{- $shell.sshDaemon -}}". - Either disable metrics or set sshDaemon to "gitlab-sshd". -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_mailroom.tpl b/charts/gitlab/gitlab/templates/_checkConfig_mailroom.tpl deleted file mode 100644 index 3f4b71b16..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_mailroom.tpl +++ /dev/null @@ -1,84 +0,0 @@ -{{/* -Ensure that tenantId and clientId are set if Microsoft Graph settings are used in incomingEmail -*/}} -{{- define "gitlab.checkConfig.incomingEmail.microsoftGraph" -}} -{{- with $.Values.global.appConfig.incomingEmail }} -{{- if (and .enabled (eq .inboxMethod "microsoft_graph")) }} -{{- if not .tenantId }} -incomingEmail: - When configuring incoming email with Microsoft Graph, be sure to specify the tenant ID. - See https://docs.gitlab.com/ee/administration/incoming_email.html#microsoft-graph -{{- end -}} -{{- if not .clientId }} -incomingEmail: - When configuring incoming email with Microsoft Graph, be sure to specify the client ID. - See https://docs.gitlab.com/ee/administration/incoming_email.html#microsoft-graph -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.incomingEmail.microsoftGraph */}} - -{{/* -Ensure that incomingEmail is enabled too if serviceDesk is enabled -*/}} -{{- define "gitlab.checkConfig.serviceDesk" -}} -{{- if $.Values.global.appConfig.serviceDeskEmail.enabled }} -{{- if not $.Values.global.appConfig.incomingEmail.enabled }} -serviceDesk: - When configuring Service Desk email, you must also configure incoming email. - See https://docs.gitlab.com/charts/charts/globals#incoming-email-settings -{{- end -}} -{{- if (not (and (contains "+%{key}@" $.Values.global.appConfig.incomingEmail.address) (contains "+%{key}@" $.Values.global.appConfig.serviceDeskEmail.address))) }} -serviceDesk: - When configuring Service Desk email, both incoming email and Service Desk email address must contain the "+%{key}" tag. - See https://docs.gitlab.com/ee/user/project/service_desk.html#using-custom-email-address -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.serviceDesk */}} - -{{/* -Ensure that tenantId and clientId are set if Microsoft Graph settings are used in serviceDesk -*/}} -{{- define "gitlab.checkConfig.serviceDesk.microsoftGraph" -}} -{{- with $.Values.global.appConfig.serviceDesk }} -{{- if (and .enabled (eq .inboxMethod "microsoft_graph")) }} -{{- if not .tenantId }} -incomingEmail: - When configuring Service Desk with Microsoft Graph, be sure to specify the tenant ID. - See https://docs.gitlab.com/ee/user/project/service_desk.html#microsoft-graph -{{- end -}} -{{- if not .clientId }} -incomingEmail: - When configuring Service Desk with Microsoft Graph, be sure to specify the client ID. - See https://docs.gitlab.com/ee/user/project/service_desk.html#microsoft-graph -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.serviceDesk.microsoftGraph */}} - -{{/* -Ensure that incomingEmail's deliveryMethod is either sidekiq or webhook -*/}} -{{- define "gitlab.checkConfig.incomingEmail.deliveryMethod" -}} -{{- if not (or (eq $.Values.global.appConfig.incomingEmail.deliveryMethod "sidekiq") (eq $.Values.global.appConfig.incomingEmail.deliveryMethod "webhook")) }} -incomingEmail: - Delivery method should be either "sidekiq" or "webhook" - See https://docs.gitlab.com/charts/installation/command-line-options.html#incoming-email-configuration -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.incomingEmail.deliveryMethod */}} - -{{/* -Ensure that serviceDeskEmail's deliveryMethod is either sidekiq or webhook -*/}} -{{- define "gitlab.checkConfig.serviceDeskEmail.deliveryMethod" -}} -{{- if not (or (eq $.Values.global.appConfig.serviceDeskEmail.deliveryMethod "sidekiq") (eq $.Values.global.appConfig.serviceDeskEmail.deliveryMethod "webhook")) }} -serviceDeskEmail: - Delivery method should be either "sidekiq" or "webhook" - See https://docs.gitlab.com/charts/installation/command-line-options.html#service-desk-email-configuration -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.serviceDeskEmail.deliveryMethod */}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_nginx.tpl b/charts/gitlab/gitlab/templates/_checkConfig_nginx.tpl deleted file mode 100644 index 89e1f6680..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_nginx.tpl +++ /dev/null @@ -1,20 +0,0 @@ -{{- define "gitlab.checkConfig.nginx.controller.extraArgs" -}} -{{- if (index $.Values "nginx-ingress").enabled -}} -{{- if hasKey (index $.Values "nginx-ingress").controller.extraArgs "force-namespace-isolation" -}} -nginx-ingress: - `nginx-ingress.controller.extraArgs.force-namespace-isolation` was previously set by default in the GitLab chart's values.yaml file, - but has since been deprecated upon the upgrade to NGINX 0.41.2 (upstream chart version 3.11.1). - Please remove the `force-namespace-isolation` key. -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END "gitlab.checkConfig.nginx.controller" */}} - -{{- define "gitlab.checkConfig.nginx.clusterrole.scope" -}} -{{- if (index $.Values "nginx-ingress").rbac.scope -}} -nginx-ingress: - 'rbac.scope' should be false. Namespaced IngressClasses do not exist. - See https://github.com/kubernetes/ingress-nginx/issues/7519 -{{- end -}} -{{- end -}} -{{/* END "gitlab.checkConfig.nginx.clusterrole" */}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_object_storage.tpl b/charts/gitlab/gitlab/templates/_checkConfig_object_storage.tpl deleted file mode 100644 index 6d9bafcfb..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_object_storage.tpl +++ /dev/null @@ -1,38 +0,0 @@ -{{/* -Ensure consolidate and type-specific object store configuration are not mixed. -*/}} -{{- define "gitlab.checkConfig.objectStorage.consolidatedConfig" -}} -{{- if $.Values.global.appConfig.object_store.enabled -}} -{{- $problematicTypes := list -}} -{{- range $objectTypes := list "artifacts" "lfs" "uploads" "packages" "externalDiffs" "terraformState" "dependencyProxy" -}} -{{- if hasKey $.Values.global.appConfig . -}} -{{- $objectProps := index $.Values.global.appConfig . -}} -{{- if (and (index $objectProps "enabled") (or (not (empty (index $objectProps "connection"))) (empty (index $objectProps "bucket")))) -}} -{{- $problematicTypes = append $problematicTypes . -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- if not (empty $problematicTypes) -}} -When consolidated object storage is enabled, for each item `bucket` must be specified and the `connection` must be empty. Check the following object storage configuration(s): {{ join "," $problematicTypes }} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.objectStorage.consolidatedConfig */}} - -{{- define "gitlab.checkConfig.objectStorage.typeSpecificConfig" -}} -{{- if and (not $.Values.global.minio.enabled) (not $.Values.global.appConfig.object_store.enabled) -}} -{{- $problematicTypes := list -}} -{{- range $objectTypes := list "artifacts" "lfs" "uploads" "packages" "externalDiffs" "terraformState" "dependencyProxy" -}} -{{- if hasKey $.Values.global.appConfig . -}} -{{- $objectProps := index $.Values.global.appConfig . -}} -{{- if and (index $objectProps "enabled") (empty (index $objectProps "connection")) -}} -{{- $problematicTypes = append $problematicTypes . -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- if not (empty $problematicTypes) -}} -When type-specific object storage is enabled the `connection` property can not be empty. Check the following object storage configuration(s): {{ join "," $problematicTypes }} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.objectStorage.typeSpecificConfig */}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_omniauth.tpl b/charts/gitlab/gitlab/templates/_checkConfig_omniauth.tpl deleted file mode 100644 index 4d597746a..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_omniauth.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* -Ensure the provided global.appConfig.omniauth.providerFormat value in expected format */}} -{{- define "gitlab.checkConfig.omniauth.providerFormat" -}} -{{- range $index, $provider := .Values.global.appConfig.omniauth.providers }} -{{- $badKeys := omit $provider "secret" "key" }} -{{- if $badKeys }} -omniauth.providers: each provider should only contain 'secret', and optionally 'key' - A current value of global.appConfig.omniauth.providers[{{ $index }}] must be updated. - Please see https://docs.gitlab.com/charts/charts/globals.html#providers -{{- end }} -{{- end }} -{{- end }} -{{/* END gitlab.checkConfig.omniauth.providerFormat */}} \ No newline at end of file diff --git a/charts/gitlab/gitlab/templates/_checkConfig_postgresql.tpl b/charts/gitlab/gitlab/templates/_checkConfig_postgresql.tpl deleted file mode 100644 index c85ad7002..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_postgresql.tpl +++ /dev/null @@ -1,75 +0,0 @@ -{{/* -Ensure that `postgresql.image.tag` meets current requirements -*/}} -{{- define "gitlab.checkConfig.postgresql.deprecatedVersion" -}} -{{- $pgVersion := semver (.Values.postgresql.image.tag | toString) -}} -{{- if lt $pgVersion.Major 13 -}} - PostgreSQL 12 and earlier are not supported in GitLab 16. The minimum required version is PostgreSQL 13. -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.postgresql.deprecatedVersion */}} - - -{{/* -Ensure that if `psql.password.useSecret` is set to false, a path to the password file is provided -*/}} -{{- define "gitlab.checkConfig.postgresql.noPasswordFile" -}} -{{- $errorMsg := list -}} -{{- $subcharts := pick .Values.gitlab "geo-logcursor" "gitlab-exporter" "migrations" "sidekiq" "toolbox" "webservice" -}} -{{- range $name, $sub := $subcharts -}} -{{- $useSecret := include "gitlab.boolean.local" (dict "local" (pluck "useSecret" (index $sub "psql" "password") | first) "global" $.Values.global.psql.password.useSecret "default" true) -}} -{{- if and (not $useSecret) (not (pluck "file" (index $sub "psql" "password") ($.Values.global.psql.password) | first)) -}} -{{- $errorMsg = append $errorMsg (printf "%s: If `psql.password.useSecret` is set to false, you must specify a value for `psql.password.file`." $name) -}} -{{- end -}} -{{- if and (not $useSecret) ($.Values.postgresql.install) -}} -{{- $errorMsg = append $errorMsg (printf "%s: PostgreSQL can not be deployed with this chart when using `psql.password.useSecret` is false." $name) -}} -{{- end -}} -{{- end -}} -{{- if not (empty $errorMsg) }} -postgresql: -{{- range $msg := $errorMsg }} - {{ $msg }} -{{- end }} - This configuration is not supported. -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.postgresql.noPasswordFile */}} - -{{/* -Ensure that `postgresql.install: false` when `global.psql.load_balancing` defined -*/}} -{{- define "gitlab.checkConfig.database.externalLoadBalancing" -}} -{{- if hasKey .Values.global.psql "load_balancing" -}} -{{- with .Values.global.psql.load_balancing -}} -{{- if and $.Values.postgresql.install (kindIs "map" .) }} -postgresql: - It appears PostgreSQL is set to install, but database load balancing is also enabled. This configuration is not supported. - See https://docs.gitlab.com/charts/charts/globals#configure-postgresql-settings -{{- end -}} -{{- if not (kindIs "map" .) }} -postgresql: - It appears database load balancing is desired, but the current configuration is not supported. - See https://docs.gitlab.com/charts/charts/globals#configure-postgresql-settings -{{- end -}} -{{- if and (not (hasKey . "discover") ) (not (hasKey . "hosts") ) }} -postgresql: - It appears database load balancing is desired, but the current configuration is not supported. - You must specify `load_balancing.hosts` or `load_balancing.discover`. - See https://docs.gitlab.com/charts/charts/globals#configure-postgresql-settings -{{- end -}} -{{- if and (hasKey . "hosts") (not (kindIs "slice" .hosts) ) }} -postgresql: - Database load balancing using `hosts` is configured, but does not appear to be a list. - See https://docs.gitlab.com/charts/charts/globals#configure-postgresql-settings - Current format: {{ kindOf .hosts }} -{{- end -}} -{{- if and (hasKey . "discover") (not (kindIs "map" .discover)) }} -postgresql: - Database load balancing using `discover` is configured, but does not appear to be a map. - See https://docs.gitlab.com/charts/charts/globals#configure-postgresql-settings - Current format: {{ kindOf .discover }} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.database.externalLoadBalancing */}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_registry.tpl b/charts/gitlab/gitlab/templates/_checkConfig_registry.tpl deleted file mode 100644 index 9c2a11007..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_registry.tpl +++ /dev/null @@ -1,165 +0,0 @@ -{{/* -Ensure that registry's sentry has a DSN configured if enabled -*/}} -{{- define "gitlab.checkConfig.registry.sentry.dsn" -}} -{{- if $.Values.registry.reporting.sentry.enabled }} -{{- if not $.Values.registry.reporting.sentry.dsn }} -registry: - When enabling sentry, you must configure at least one DSN. - See https://docs.gitlab.com/charts/charts/registry#reporting -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.registry.sentry.dsn */}} - -{{/* -Ensure Registry notifications settings are in global scope -*/}} -{{- define "gitlab.checkConfig.registry.notifications" }} -{{- if hasKey $.Values.registry "notifications" }} -Registry: Notifications should be defined in the global scope. Use `global.registry.notifications` setting instead of `registry.notifications`. -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.registry.notifications */}} - -{{/* -Ensure Registry database is configured properly and dependencies are met -*/}} -{{- define "gitlab.checkConfig.registry.database" -}} -{{- if $.Values.registry.database.enabled }} -{{- $validSSLModes := list "require" "disable" "allow" "prefer" "require" "verify-ca" "verify-full" -}} -{{- if not (has $.Values.registry.database.sslmode $validSSLModes) }} -registry: - Invalid SSL mode "{{ .Values.registry.database.sslmode }}". - Valid values are: {{ join ", " $validSSLModes }}. - See https://docs.gitlab.com/charts/charts/registry#database -{{- end -}} -{{- $pgVersion := semver (.Values.postgresql.image.tag | toString) -}} -{{- if lt $pgVersion.Major 13 -}} -registry: - Invalid PostgreSQL version "{{ .Values.postgresql.image.tag }}". - PostgreSQL 13 is the minimum required version for the registry database. - See https://docs.gitlab.com/charts/charts/registry#database -{{- end -}} -{{- if and ($.Values.registry.database.discovery.enabled) }} -{{- if or (not (kindIs "string" $.Values.registry.database.discovery.nameserver)) (empty $.Values.registry.database.discovery.nameserver) }} -registry: - Enabling database discovery requires a nameserver to be provided. - See https://docs.gitlab.com/charts/charts/registry#database. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.registry.database */}} - -{{/* -Ensure Registry migration is configured properly and dependencies are met -*/}} -{{- define "gitlab.checkConfig.registry.migration" -}} -{{- if and $.Values.registry.migration.enabled (not $.Values.registry.database.enabled) }} -registry: - Enabling migration mode requires the metadata database to be enabled. - See https://docs.gitlab.com/charts/charts/registry#migration -{{- end -}} -{{- if and $.Values.registry.migration.disablemirrorfs (not $.Values.registry.database.enabled) }} -registry: - Disabling filesystem metadata requires the metadata database to be enabled. - See https://docs.gitlab.com/charts/charts/registry#migration -{{- end -}} -{{- if and $.Values.registry.migration.importnotification.enabled (not $.Values.registry.migration.enabled) }} -registry: - Enabling importnotification requires the migration mode to be enabled. - See https://docs.gitlab.com/charts/charts/registry#migration -{{- end -}} -{{- if and $.Values.registry.migration.enabled $.Values.registry.migration.importnotification.enabled }} -{{- if and (kindIs "string" $.Values.registry.migration.importnotification.url) (empty $.Values.registry.migration.importnotification.url) }} -registry: - Enabling importnotification requires the URL to not be empty. - See https://docs.gitlab.com/charts/charts/registry#migration -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.registry.migration */}} - -{{/* -Ensure Registry online garbage collection is configured properly and dependencies are met -*/}} -{{- define "gitlab.checkConfig.registry.gc" -}} -{{- if not (or $.Values.registry.gc.disabled $.Values.registry.database.enabled) }} -registry: - Enabling online garbage collection requires the metadata database to be enabled. - See https://docs.gitlab.com/charts/charts/registry#gc -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.registry.gc */}} - -{{/* -Ensure Registry Redis cache is configured properly and dependencies are met -*/}} -{{- define "gitlab.checkConfig.registry.redis.cache" -}} -{{- if and $.Values.registry.redis.cache.enabled (not $.Values.registry.database.enabled) }} -registry: - Enabling the Redis cache requires the metadata database to be enabled. - See https://docs.gitlab.com/charts/charts/registry#redis-cache -{{- end -}} -{{- if and $.Values.registry.database.enabled $.Values.registry.redis.cache.enabled }} -{{- if and (kindIs "string" $.Values.registry.redis.cache.host) (empty $.Values.registry.redis.cache.host) }} -registry: - Enabling the Redis cache requires the host to not be empty. - See https://docs.gitlab.com/charts/charts/registry#redis-cache -{{- end -}} -{{- end -}} -{{- if and $.Values.registry.database.enabled $.Values.registry.redis.cache.enabled $.Values.registry.redis.cache.sentinels}} -{{- if not $.Values.registry.redis.cache.host }} -registry: - Enabling the Redis cache with sentinels requires the registry.redis.cache.host to be set. - See https://docs.gitlab.com/charts/charts/registry#redis-cache -{{- end -}} -{{- end -}} -{{- if and $.Values.registry.redis.cache.enabled $.Values.registry.redis.cache.password.enabled }} -{{- if and (kindIs "string" $.Values.registry.redis.cache.password.secret) (empty $.Values.registry.redis.cache.password.secret) }} -registry: - Enabling the Redis cache password requires 'registry.redis.cache.password.secret' to be set. - See https://docs.gitlab.com/charts/charts/registry#redis-cache -{{- end -}} -{{- if and (kindIs "string" $.Values.registry.redis.cache.password.key) (empty $.Values.registry.redis.cache.password.key) }} -registry: - Enabling the Redis cache password requires 'registry.redis.cache.password.key' to be set. - See https://docs.gitlab.com/charts/charts/registry#redis-cache -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.registry.redis.cache */}} - -{{/* -Ensure Registry TLS has a secret when enabled -*/}} -{{- define "gitlab.checkConfig.registry.tls" -}} -{{- if $.Values.registry.tls.enabled }} -{{- if not (eq (default "http" $.Values.global.hosts.registry.protocol) "https") }} -registry: - Enabling the service level TLS requires 'global.hosts.registry.protocol' - be set to 'https'. - See https://docs.gitlab.com/charts/charts/registry/#configuring-tls -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.registry.tls */}} - -{{/* -Ensure a debug TLS secretName is provided if enabling debug TLS for the Registry -*/}} -{{- define "gitlab.checkConfig.registry.debug.tls" -}} -{{- if $.Values.registry.debug.tls.enabled }} -{{- if not $.Values.registry.debug.tls.secretName}} -{{- if not (and $.Values.registry.tls.enabled $.Values.registry.tls.secretName)}} -registry: - When Registry debug TLS is enabled a `registry.debug.tls.secretName` - secret is required when not enabling TLS for the non-debug Registry endpoint. - You must provide a secret containing a TLS certificate and key pair. - See https://docs.gitlab.com/charts/charts/registry/index.html#configuring-tls-for-the-debug-port -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* gitlab.checkConfig.registry.tls */}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_sidekiq.tpl b/charts/gitlab/gitlab/templates/_checkConfig_sidekiq.tpl deleted file mode 100644 index a46a87e8f..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_sidekiq.tpl +++ /dev/null @@ -1,89 +0,0 @@ -{{/* Check configuration of Sidekiq - don't supply queues and negateQueues */}} -{{- define "gitlab.checkConfig.sidekiq.queues.mixed" -}} -{{- if .Values.gitlab.sidekiq.pods -}} -{{- range $pod := .Values.gitlab.sidekiq.pods -}} -{{- if and (hasKey $pod "queues") (hasKey $pod "negateQueues") }} -sidekiq: mixed queues - It appears you've supplied both `queues` and `negateQueues` for the pod definition of `{{ $pod.name }}`. `negateQueues` is not usable if `queues` is provided. Please use only one. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.sidekiq.queues.mixed */}} - -{{/* Check configuration of Sidekiq - queues must be a string */}} -{{- define "gitlab.checkConfig.sidekiq.queues" -}} -{{- if .Values.gitlab.sidekiq.pods -}} -{{- range $pod := .Values.gitlab.sidekiq.pods -}} -{{- if and (hasKey $pod "queues") (ne (kindOf $pod.queues) "string") }} -sidekiq: - The `queues` in pod definition `{{ $pod.name }}` is not a string. -{{- else if and (hasKey $pod "negateQueues") (ne (kindOf $pod.negateQueues) "string") }} -sidekiq: - The `negateQueues` in pod definition `{{ $pod.name }}` is not a string. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.sidekiq.queues */}} - -{{/* -Ensure that Sidekiq timeout is less than terminationGracePeriodSeconds -*/}} -{{- define "gitlab.checkConfig.sidekiq.timeout" -}} -{{- range $i, $pod := $.Values.gitlab.sidekiq.pods -}} -{{- $activeTimeout := int (default $.Values.gitlab.sidekiq.timeout $pod.timeout) }} -{{- $activeTerminationGracePeriodSeconds := int (default $.Values.gitlab.sidekiq.deployment.terminationGracePeriodSeconds $pod.terminationGracePeriodSeconds) }} -{{- if gt $activeTimeout $activeTerminationGracePeriodSeconds }} -sidekiq: - You must set `terminationGracePeriodSeconds` ({{ $activeTerminationGracePeriodSeconds }}) longer than `timeout` ({{ $activeTimeout }}) for pod `{{ $pod.name }}`. -{{- end }} -{{- end }} -{{- end -}} -{{/* END gitlab.checkConfig.sidekiq.timeout */}} - -{{/* -Ensure that Sidekiq routingRules configuration is in a valid format -*/}} -{{- define "gitlab.checkConfig.sidekiq.routingRules" -}} -{{- $validRoutingRules := true -}} -{{- with $.Values.global.appConfig.sidekiq.routingRules }} -{{- if not (kindIs "slice" .) }} -{{- $validRoutingRules = false }} -{{- else -}} -{{- range $rule := . }} -{{- if (not (kindIs "slice" $rule)) }} -{{- $validRoutingRules = false }} -{{- else if (ne (len $rule) 2) }} -{{- $validRoutingRules = false }} -{{/* The first item (routing query) must be a string */}} -{{- else if not (kindIs "string" (index $rule 0)) }} -{{- $validRoutingRules = false }} -{{/* The second item (queue name) must be either a string or null */}} -{{- else if not (or (kindIs "invalid" (index $rule 1)) (kindIs "string" (index $rule 1))) -}} -{{- $validRoutingRules = false }} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- if eq false $validRoutingRules }} -sidekiq: - The Sidekiq's routing rules list must be an ordered array of tuples of query and corresponding queue. - See https://docs.gitlab.com/charts/charts/globals.html#sidekiq-routing-rules-settings -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.sidekiq.routingRules */}} - -{{/* -Ensure that metrics and health check servers bind different ports -*/}} -{{- define "gitlab.checkConfig.sidekiq.server_ports" -}} -{{- $metricsEnabled := .Values.gitlab.sidekiq.metrics.enabled -}} -{{- $portsMatch := eq (.Values.gitlab.sidekiq.metrics.port | int) (.Values.gitlab.sidekiq.health_checks.port | int) -}} -{{- if and $metricsEnabled $portsMatch }} -sidekiq: - metrics.port and health_checks.port must not be equal. - See https://docs.gitlab.com/charts/charts/gitlab/sidekiq/index.html#configuration -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.sidekiq.server_ports */}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_toolbox.tpl b/charts/gitlab/gitlab/templates/_checkConfig_toolbox.tpl deleted file mode 100644 index e8969bb57..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_toolbox.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{{/* -Ensure that a valid object storage config secret is provided. -*/}} -{{- define "gitlab.toolbox.backups.objectStorage.config.secret" -}} -{{- if .Values.gitlab.toolbox.enabled -}} -{{- if or .Values.gitlab.toolbox.backups.objectStorage.config (not (or .Values.global.minio.enabled .Values.global.appConfig.object_store.enabled)) (eq .Values.gitlab.toolbox.backups.objectStorage.backend "gcs") }} -{{- if not .Values.gitlab.toolbox.backups.objectStorage.config.secret -}} -toolbox: - A valid object storage config secret is needed for backups. - Please configure it via `gitlab.toolbox.backups.objectStorage.config.secret`. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.toolbox.backups.objectStorage.config.secret */}} - -{{/* -Ensure that gitlab/toolbox is not configured with `replicas` > 1 if -persistence is enabled. -*/}} -{{- define "gitlab.toolbox.replicas" -}} -{{- $replicas := index $.Values.gitlab "toolbox" "replicas" | int -}} -{{- if and (gt $replicas 1) (index $.Values.gitlab "toolbox" "persistence" "enabled") -}} -toolbox: replicas is greater than 1, with persistence enabled. - It appear that `gitlab/toolbox` has been configured with more than 1 replica, but also with a PersistentVolumeClaim. This is not supported. Please either reduce the replicas to 1, or disable persistence. -{{- end -}} -{{- end -}} -{{/* END gitlab.toolbox.replicas */}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_webservice.tpl b/charts/gitlab/gitlab/templates/_checkConfig_webservice.tpl deleted file mode 100644 index 3cf280547..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_webservice.tpl +++ /dev/null @@ -1,50 +0,0 @@ -{{/* -Ensure the provided global.appConfig.maxRequestDurationSeconds value is smaller than -webservice's worker timeout */}} -{{- define "gitlab.checkConfig.appConfig.maxRequestDurationSeconds" -}} -{{- $maxDuration := $.Values.global.appConfig.maxRequestDurationSeconds }} -{{- if $maxDuration }} -{{- $workerTimeout := $.Values.global.webservice.workerTimeout }} -{{- if not (lt $maxDuration $workerTimeout) }} -gitlab: maxRequestDurationSeconds should be smaller than Webservice's worker timeout - The current value of global.appConfig.maxRequestDurationSeconds ({{ $maxDuration }}) is greater than or equal to global.webservice.workerTimeout ({{ $workerTimeout }}) while it should be a lesser value. -{{- end }} -{{- end }} -{{- end }} -{{/* END gitlab.checkConfig.appConfig.maxRequestDurationSeconds */}} - -{{/* -Ensure terminationGracePeriodSeconds is longer than blackoutSeconds -*/}} -{{- define "gitlab.checkConfig.webservice.gracePeriod" -}} -{{- $terminationGracePeriodSeconds := default 30 .Values.gitlab.webservice.deployment.terminationGracePeriodSeconds | int -}} -{{- $blackoutSeconds := .Values.gitlab.webservice.shutdown.blackoutSeconds | int -}} -{{- if lt $terminationGracePeriodSeconds $blackoutSeconds }} -You must set terminationGracePeriodSeconds ({{ $terminationGracePeriodSeconds }}) longer than blackoutSeconds ({{ $blackoutSeconds }}) -{{ end -}} -{{- end -}} -{{/* END gitlab.checkConfig.webservice.gracePeriod */}} - -{{/* -Ensure that when type is set to LoadBalancer that loadBalancerSourceRanges are set -*/}} -{{- define "gitlab.checkConfig.webservice.loadBalancer" -}} -{{- if .Values.gitlab.webservice.enabled -}} -{{- $serviceType := .Values.gitlab.webservice.service.type -}} -{{- $numDeployments := len .Values.gitlab.webservice.deployments -}} -{{- if (and (eq $serviceType "LoadBalancer") (gt $numDeployments 1)) }} -webservice: - It is not currently recommended to set a service type of `LoadBalancer` with multiple deployments defined. - Instead, use a global `service.type` of `ClusterIP` and override `service.type` in each deployment. -{{- end -}} -{{- range $name, $deployment := .Values.gitlab.webservice.deployments -}} -{{- $serviceType := $deployment.service.type -}} -{{- $loadBalancerSourceRanges := $deployment.service.loadBalancerSourceRanges -}} -{{- if (and (eq $serviceType "LoadBalancer") (empty ($loadBalancerSourceRanges))) }} -webservice: - It is not currently recommended to set a service type of `{{ $serviceType }}` on a public exposed network without restrictions, please add `service.loadBalancerSourceRanges` to limit access to the service of the `{{ $name }}` deployment. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.checkConfig.webservice.loadBalancer */}} diff --git a/charts/gitlab/gitlab/templates/_checkConfig_workhorse.tpl b/charts/gitlab/gitlab/templates/_checkConfig_workhorse.tpl deleted file mode 100644 index 5df50b5ba..000000000 --- a/charts/gitlab/gitlab/templates/_checkConfig_workhorse.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* -Ensure workhorse monitoring exporter's TLS config is valid -*/}} -{{- define "gitlab.checkConfig.workhorse.exporter.tls.enabled" -}} -{{- $workhorseTlsEnabled := $.Values.global.workhorse.tls.enabled -}} -{{- $monitoringTlsOverride := pluck "enabled" $.Values.gitlab.webservice.workhorse.monitoring.exporter.tls (dict "enabled" false) | first -}} -{{- if and (eq $monitoringTlsOverride true) (not $workhorseTlsEnabled) }} -webservice.workhorse: - The monitoring exporter TLS depends on the main workhorse listener using TLS. - Use `global.workhorse.tls.enabled` to enable TLS for the main listener or `gitlab.webservice.workhorse.monitoring.exporter.tls.enabled` - to disable TLS for the monitoring exporter. -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_deprecations.tpl b/charts/gitlab/gitlab/templates/_deprecations.tpl deleted file mode 100644 index 75e1ad174..000000000 --- a/charts/gitlab/gitlab/templates/_deprecations.tpl +++ /dev/null @@ -1,489 +0,0 @@ -{{/* -Template for handling deprecation messages - -The messages templated here will be combined into a single `fail` call. This creates a means for the user to receive all messages at one time, in place a frustrating iterative approach. - -- `define` a new template, prefixed `gitlab.deprecate.` -- Check for deprecated values / patterns, and directly output messages (see message format below) -- Add a line to `gitlab.deprecations` to include the new template. - -Message format: - -**NOTE**: The `if` statement preceding the block should _not_ trim the following newline (`}}` not `-}}`), to ensure formatting during output. - -``` -chart: - MESSAGE -``` -*/}} -{{/* -Compile all deprecations into a single message, and call fail. - -Due to gotpl scoping, we can't make use of `range`, so we have to add action lines. -*/}} -{{- define "gitlab.deprecations" -}} -{{- $deprecated := list -}} -{{/* add templates here */}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.rails.appConfig" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.minio" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.registryStorage" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.registryHttpSecret" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.registry.replicas" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.registry.updateStrategy" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.webservice.omniauth" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.webservice.ldap" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.webservice.webServer.unicorn" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.global.appConfig.ldap.password" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.sidekiq.cronJobs" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.sidekiq.updateStrategy" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.sidekiq.pods.updateStrategy" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.sidekiq.cluster" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.sidekiq.pods.cluster" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.local.kubectl" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.gitlab.gitaly.enabled" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.initContainerImage" .) -}} -{{- $deprecated = append $deprecated (include "external.deprecate.initContainerImage" .) -}} -{{- $deprecated = append $deprecated (include "external.deprecate.initContainerPullPolicy" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.redis-ha.enabled" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.redis.enabled" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.gitlab.webservice.service.configuration" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.gitlab.gitaly.serviceName" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.global.psql.pool" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.global.appConfig.extra.piwik" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.global.geo.registry.syncEnabled" .) -}} -{{- $deprecated = append $deprecated (include "certmanager.createCustomResource" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.global.imagePullPolicy" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.task-runner" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.gitaly-gitconfig-volume" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.hpa.legacyCpuTarget" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.hpa.behaviorMispell" .) -}} -{{- $deprecated = append $deprecated (include "gitlab.deprecate.global.grafana" .) -}} - -{{- /* we're ready to deprecate top-level registry entries for workhorse and sidekiq, but not enforcing yet */ -}} -{{- /* $deprecated = append $deprecated (include "gitlab.deprecate.registry.topLevel" .) */ -}} - -{{- /* prepare output */}} -{{- $deprecated = without $deprecated "" -}} -{{- $message := join "\n" $deprecated -}} - -{{- /* print output */}} -{{- if $message -}} -{{- printf "\nDEPRECATIONS:\n%s" $message | fail -}} -{{- end -}} -{{- end -}} - -{{/* Migration of rails shared lfs/artifacts/uploads blocks to globals */}} -{{- define "gitlab.deprecate.rails.appConfig" -}} -{{- range $chart := list "webservice" "sidekiq" "toolbox" -}} -{{- if index $.Values.gitlab $chart -}} -{{- range $i, $block := list "lfs" "artifacts" "uploads" -}} -{{- if hasKey (index $.Values.gitlab $chart) $block }} -{{- with $config := index $.Values.gitlab $chart $block -}} -{{- range $item := list "enabled" "bucket" "proxy_download" -}} -{{- if hasKey $config $item }} -gitlab.{{ $chart }}: - `{{ $block }}.{{ $item }}` has been moved to global. Please remove `{{ $block }}.{{ $item }}` from your properties, and set `global.appConfig.{{ $block }}.{{ $item }}` -{{- end -}} -{{- end -}} -{{- if .connection -}} -{{- if without (keys .connection) "secret" "key" | len | ne 0 }} -gitlab.{{ $chart }}: - The `{{ $block }}.connection` declarations have been moved into a secret. Please create a secret with these contents, and set `global.appConfig.{{ $block }}.connection.secret` -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* Deprecation behaviors for global configuration of Minio */}} -{{- define "gitlab.deprecate.minio" -}} -{{- if ( hasKey .Values.minio "enabled" ) }} -minio: - Chart-local `enabled` property has been moved to global. Please remove `minio.enabled` from your properties, and set `global.minio.enabled` instead. -{{- end -}} -{{- if .Values.registry.minio -}} -{{- if ( hasKey .Values.registry.minio "enabled" ) }} -registry: - Chart-local configuration of Minio features has been moved to global. Please remove `registry.minio.enabled` from your properties, and set `global.minio.enabled` instead. -{{- end -}} -{{- end -}} -{{- if .Values.gitlab.webservice.minio -}} -{{- if ( hasKey .Values.gitlab.webservice.minio "enabled" ) }} -gitlab.webservice: - Chart-local configuration of Minio features has been moved to global. Please remove `gitlab.webservice.minio.enabled` from your properties, and set `global.minio.enabled` instead. -{{- end -}} -{{- end -}} -{{- if .Values.gitlab.sidekiq.minio -}} -{{- if ( hasKey .Values.gitlab.sidekiq.minio "enabled" ) }} -gitlab.sidekiq: - Chart-local configuration of Minio features has been moved to global. Please remove `gitlab.sidekiq.minio.enabled` from your properties, and set `global.minio.enabled` instead. -{{- end -}} -{{- end -}} -{{- if index .Values.gitlab "toolbox" "minio" -}} -{{- if ( hasKey ( index .Values.gitlab "toolbox" "minio" ) "enabled" ) }} -gitlab.toolbox: - Chart-local configuration of Minio features has been moved to global. Please remove `gitlab.toolbox.minio.enabled` from your properties, and set `global.minio.enabled` instead. -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END deprecate.minio */}} - -{{/* Migration of Registry `storage` dict to a secret */}} -{{- define "gitlab.deprecate.registryStorage" -}} -{{- if .Values.registry.storage -}} -{{- $keys := without (keys .Values.registry.storage) "secret" "key" "extraKey" "redirect" -}} -{{- if len $keys | ne 0 }} -registry: - The `storage` property has been moved into a secret. Please create a secret with these contents, and set `storage.secret`. -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* Migration of Registry `httpSecret` property to secret */}} -{{- define "gitlab.deprecate.registryHttpSecret" -}} -{{- if .Values.registry.httpSecret -}} -registry: - The `httpSecret` property has been moved into a secret. Please create a secret with these contents, and set `global.registry.httpSecret.secret` and `global.registry.httpSecret.key`. -{{- end -}} -{{- end -}} - -{{/* Migration of Registry `minReplicas` and `maxReplicas` to `hpa.*` */}} -{{- define "gitlab.deprecate.registry.replicas" -}} -{{- if or (hasKey .Values.registry "minReplicas") (hasKey .Values.registry "maxReplicas") -}} -registry: - The `minReplicas` property has been moved under the hpa object. Please create a configuration with the new path: `registry.hpa.minReplicas`. - The `maxReplicas` property has been moved under the hpa object. Please create a configuration with the new path: `registry.hpa.maxReplicas`. -{{- end -}} -{{- end -}} -{{/* END deprecate.registry.replicas */}} - -{{/* Deprecation behaviors for configuration of Omniauth */}} -{{- define "gitlab.deprecate.webservice.omniauth" -}} -{{- if hasKey .Values.gitlab.webservice "omniauth" -}} -webservice: - Chart-local configuration of Omniauth has been moved to global. Please remove `webservice.omniauth.*` settings from your properties, and set `global.appConfig.omniauth.*` instead. -{{- end -}} -{{- end -}} -{{/* END deprecate.webservice.omniauth */}} - -{{/* Deprecation behaviors for configuration of LDAP */}} -{{- define "gitlab.deprecate.webservice.ldap" -}} -{{- if hasKey .Values.gitlab.webservice "ldap" -}} -webservice: - Chart-local configuration of LDAP has been moved to global. Please remove `webservice.ldap.*` settings from your properties, and set `global.appConfig.ldap.*` instead. -{{- end -}} -{{- end -}} -{{/* END deprecate.webservice.ldap */}} - -{{- define "gitlab.deprecate.global.appConfig.ldap.password" -}} -{{- if .Values.global.appConfig.ldap.servers -}} -{{- $hasPlaintextPassword := dict -}} -{{- range $name, $config := .Values.global.appConfig.ldap.servers -}} -{{- if and (hasKey $config "password") (kindIs "string" $config.password) -}} -{{- $_ := set $hasPlaintextPassword "true" "true" -}} -{{- end -}} -{{- end -}} -{{- if hasKey $hasPlaintextPassword "true" -}} -global.appConfig.ldap: - Plain-text configuration of LDAP passwords has been deprecated in favor of secret configuration. Please create a secret containing the password, and set `password.secret` and `password.key`. -{{- end -}} -{{- end -}} -{{- end -}}{{/* "gitlab.deprecate.global.appConfig.ldap.password" */}} - -{{/* Deprecation behaviors for configuration of cron jobs */}} -{{- define "gitlab.deprecate.sidekiq.cronJobs" -}} -{{- if hasKey .Values.gitlab.sidekiq "cron_jobs" -}} -sidekiq: - Chart-local configuration of cron jobs has been moved to global. Please remove `sidekiq.cron_jobs.*` settings from your properties, and set `global.appConfig.cron_jobs.*` instead. -{{- end -}} -{{- end -}} -{{/* END deprecate.sidekiq.cronJobs */}} - -{{/* Deprecation behaviors for configuration of local kubectl images */}} -{{- define "gitlab.deprecate.local.kubectl" -}} -{{- range $chart := list "certmanager-issuer" "shared-secrets" -}} -{{- if hasKey (index $.Values $chart) "image" -}} -{{ $chart }}: - Chart-local configuration of kubectl image has been moved to global. Please remove `{{ $chart }}.image.*` settings from your properties, and set `global.kubectl.image.*` instead. -{{- if and (eq $chart "shared-secrets") (hasKey (index $.Values $chart "image") "pullSecrets") }} - If you need to set `pullSecrets` of the self-sign image, please use `shared-secrets.selfsign.image.pullSecrets` instead. -{{ end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.local.kubectl */}} - -{{/* Deprecation behaviors for configuration of Gitaly */}} -{{- define "gitlab.deprecate.gitlab.gitaly.enabled" -}} -{{- if hasKey .Values.gitlab.gitaly "enabled" -}} -gitlab: - Chart-local configuration of Gitaly features has been moved to global. Please remove `gitlab.gitaly.enabled` from your properties, and set `global.gitaly.enabled` instead. -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.gitaly.enabled */}} - -{{/* Deprecation behavious for configuration of initContainer images of gitlab sub-charts */}} -{{- define "gitlab.deprecate.initContainerImage" -}} -{{- range $chart:= list "geo-logcursor" "gitaly" "gitlab-exporter" "gitlab-shell" "mailroom" "migrations" "sidekiq" "toolbox" "webservice" }} -{{- if hasKey (index $.Values.gitlab $chart) "init" -}} -{{- with $config := index $.Values.gitlab $chart "init" -}} -{{- if or (and (hasKey $config "image") (kindIs "string" $config.image)) (hasKey $config "tag") }} -gitlab.{{ $chart }}: - Configuring image for initContainers using gitlab.{{ $chart }}.init.image and gitlab.{{ $chart }}.init.tag has been deprecated. Please use gitlab.{{ $chart }}.init.image.repository and gitlab.{{ $chart }}.init.image.tag for that. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.initContainerImage */}} - -{{/* Deprecation behavious for configuration of initContainer images of external charts */}} -{{- define "external.deprecate.initContainerImage" -}} -{{- range $chart:= list "minio" "registry" "redis" "redis-ha" }} -{{- if hasKey (index $.Values $chart) "init" -}} -{{- with $config := index $.Values $chart "init" -}} -{{- if or (and (hasKey $config "image") (kindIs "string" $config.image)) (hasKey $config "tag") }} -{{ $chart }}: - Configuring image for initContainers using {{ $chart }}.init.image and {{ $chart }}.init.tag has been deprecated. Please use {{ $chart }}.init.image.repository and {{ $chart }}.init.image.tag for that. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END external.deprecate.initContainerImage */}} - -{{/* Deprecation behavious for configuration of initContainer image pull policy of external charts */}} -{{- define "external.deprecate.initContainerPullPolicy" -}} -{{- range $chart:= list "minio" "registry" }} -{{- if hasKey (index $.Values $chart) "init" -}} -{{- with $config := index $.Values $chart "init" -}} -{{- if hasKey $config "pullPolicy" }} -{{ $chart }}: - Configuring pullPolicy for initContainer images using {{ $chart }}.init.pullPolicy has been deprecated. Please use {{ $chart }}.init.image.pullPolicy for that. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END external.deprecate.initContainerPullPolicy*/}} - -{{/* Deprecation behaviors for redis-ha.enabled */}} -{{- define "gitlab.deprecate.redis-ha.enabled" -}} -{{- if hasKey (index .Values "redis-ha") "enabled" -}} -redis-ha: - The `redis-ha.enabled` has been deprecated. Redis HA is now implemented by the Redis chart. -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.redis-ha.enabled */}} - -{{/* Deprecation behaviors for redis.enabled */}} -{{- define "gitlab.deprecate.redis.enabled" -}} -{{- if hasKey .Values.redis "enabled" -}} -redis: - The `redis.enabled` has been deprecated. Please use `redis.install` to install the Redis service. -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.redis.enabled */}} - -{{- define "gitlab.deprecate.gitlab.webservice.service.configuration" -}} -{{- range $chart := list "gitaly" "gitlab-shell" -}} -{{- if index $.Values.gitlab $chart -}} -{{- if hasKey (index $.Values.gitlab $chart) "webservice" }} -gitlab.{{ $chart }}: - webservice: - The configuration of 'gitlab.{{ $chart }}.webservice' has been moved to 'gitlab.{{ $chart }}.workhorse' to better reflect the underlying architecture. Please relocate this property. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.gitlab.webservice.service.configuration */}} - -{{- define "gitlab.deprecate.gitlab.gitaly.serviceName" -}} -{{- if hasKey $.Values.gitlab.gitaly "serviceName" -}} -gitlab.gitaly.serviceName: - The configuration of 'gitlab.gitaly.serviceName' has been moved to 'global.gitaly.serviceName' to fix an issue with consistent templating. Please relocate this property. -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.gitlab.gitaly.serviceName */}} - -{{- define "gitlab.deprecate.global.psql.pool" -}} -{{- if hasKey $.Values.global "psql" -}} -{{- if hasKey $.Values.global.psql "pool" }} -global.psql.pool: - Manually configuring the database connection pool has been removed. The application now manages the connection pool size. -{{- end -}} -{{- end -}} - -{{- range $chart := list "webservice" "sidekiq" "toolbox" -}} -{{- if index $.Values.gitlab $chart -}} -{{- if hasKey (index $.Values.gitlab $chart) "psql" -}} -{{- with $localConfig := index $.Values.gitlab $chart "psql" -}} -{{- if hasKey $localConfig "pool" }} -gitlab.{{ $chart }}.psql.pool: - Manually configuring the database connection pool has been removed. The application now manages the connection pool size. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.global.psql.pool */}} - -{{- define "gitlab.deprecate.global.appConfig.extra.piwik" -}} -{{- if .Values.global.appConfig.extra.piwikSiteId }} -global.appConfig.extra.piwikSiteId: - Piwik config keys have been renamed to reflect the rebranding to Matomo. Please rename `piwikSiteId` to `matomoSiteId`. -{{- end -}} -{{- if .Values.global.appConfig.extra.piwikUrl }} -global.appConfig.extra.piwikUrl: - Piwik config keys have been renamed to reflect the rebranding to Matomo. Please rename `piwikUrl` to `matomoUrl` -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.global.appConfig.extra.piwik */}} - -{{/* Migration from `updateStrategy` to `deployment.strategy` for Deployment Kubernetes type */}} -{{- define "gitlab.deprecate.registry.updateStrategy" -}} -{{- if .Values.registry.updateStrategy }} -registry: - The configuration of `registry.updateStrategy` has moved. Please use -`registry.deployment.strategy` instead. -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.registry.updateStrategy */}} - -{{- define "gitlab.deprecate.sidekiq.updateStrategy" -}} -{{- if hasKey .Values.gitlab.sidekiq "updateStrategy" -}} -sidekiq: - The configuration of 'gitlab.sidekiq.updateStrategy' has moved. Please use 'gitlab.sidekiq.deployment.strategy' instead. -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.sidekiq.updateStrategy */}} - -{{- define "gitlab.deprecate.sidekiq.pods.updateStrategy" -}} -{{- range $index, $pod := .Values.gitlab.sidekiq.pods -}} -{{- if hasKey $pod "updateStrategy" }} -sidekiq.pods[{{ $index }}] ({{ $pod.name }}): - The configuration of 'gitlab.sidekiq.pods[{{ $index }}].updateStrategy' has moved. Please use 'gitlab.sidekiq.pods[{{ $index }}].deployment.strategy' instead. -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.sidekiq.pods.updateStrategy */}} - -{{- define "gitlab.deprecate.global.geo.registry.syncEnabled" -}} -{{- if and (eq true .Values.global.geo.enabled) (hasKey .Values.global.geo.registry "syncEnabled") -}} -geo: - The configuration of `global.geo.registry.syncEnabled` has moved. Please use `global.geo.registry.replication.enabled` instead. -{{- end -}} -{{- end -}} - -{{- define "gitlab.deprecate.webservice.webServer.unicorn" -}} -{{/* WARN: Unicorn is deprecated and is removed in 14.0 */}} -{{- if eq .Values.gitlab.webservice.webServer "unicorn" -}} -webservice: - Starting with GitLab 14.0, Unicorn is no longer supported and users must switch to Puma by either setting `gitlab.webservice.webServer` value to `puma` or removing the setting reverting it to default (`puma`). Check https://docs.gitlab.com/ee/administration/operations/puma.html for details. -{{- end }} -{{- end }} - -{{- define "gitlab.deprecate.sidekiq.cluster" -}} -{{- if hasKey .Values.gitlab.sidekiq "cluster" -}} -sidekiq: - The configuration of 'gitlab.sidekiq.cluster' should be removed. Sidekiq is now always in cluster mode. -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.sidekiq.cluster */}} - -{{- define "gitlab.deprecate.sidekiq.pods.cluster" -}} -{{- range $index, $pod := .Values.gitlab.sidekiq.pods -}} -{{- if hasKey $pod "cluster" }} -sidekiq.pods[{{ $index }}] ({{ $pod.name }}): - The configuration of 'gitlab.sidekiq.pods[{{ $index }}].cluster' should be removed. Sidekiq is now always in cluster mode. -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.sidekiq.pods.cluster */}} - -{{- define "certmanager.createCustomResource" -}} -{{- if hasKey .Values.certmanager "createCustomResource" -}} -certmanager: - The configuration of 'certmanager.createCustomResource' has been renamed. Please use `certmanager.installCRDs` instead. -{{- end -}} -{{- end -}} -{{/* END certmanager.createCustomResource */}} - -{{/* Deprecation behaviors for configuration of global imagePullPolicy */}} -{{- define "gitlab.deprecate.global.imagePullPolicy" -}} -{{- if .Values.global.imagePullPolicy }} -global.imagePullPolicy: - The configuration of `global.imagePullPolicy` has moved. Please use `global.image.pullPolicy` instead. -{{- end -}} - -{{- end -}} - -{{/* Deprecation behaviors for task-runner rename to toolbox */}} -{{- define "gitlab.deprecate.task-runner" -}} -{{- if index .Values.gitlab "task-runner" }} -gitlab.task-runner: - The configuration of `gitlab.task-runner` has been renamed. Please use `gitlab.toolbox` instead. - If you have enabled persistence for `task-runner` and/or its CronJob for backups, you may need to manually bind the new `toolbox` PVC to the previous `task-runner` PV. -{{- end -}} -{{- end -}} - -{{- define "gitlab.deprecate.gitaly-gitconfig-volume" -}} -{{- if hasKey .Values.gitlab.gitaly "extraVolumes" -}} -{{- if regexMatch "- *name:[^\n]*git-?config" .Values.gitlab.gitaly.extraVolumes -}} -gitaly: - Git commands spawned by Gitaly have stopped reading `gitconfig` files. Please stop mounting `gitconfig` volumes and use the `git.config` value to inject Git configuration. -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.deprecate.hpa.legacyCpuTarget" -}} -{{- range $chart := list "gitlab-pages" "gitlab-shell" "kas" "sidekiq" "spamcheck" "webservice" -}} -{{- if and (hasKey $.Values.gitlab $chart) (hasKey (index $.Values.gitlab $chart) "hpa") -}} -{{- if hasKey (index $.Values.gitlab $chart).hpa "targetAverageValue" }} -gitlab.{{ $chart }}: - The configuration of `gitlab.{{ $chart }}.hpa.targetAverageValue` has moved. Please use `gitlab.{{ $chart }}.hpa.cpu.targetAverageValue` instead. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "gitlab.deprecate.hpa.behaviorMispell" -}} -{{- if and (hasKey $.Values.registry "hpa") (hasKey $.Values.registry.hpa "behaviour") }} -registry: - The configuration of `registry.hpa.behaviour` has moved. Please use `registry.hpa.behavior` instead. -{{- end -}} -{{- range $chart := list "gitlab-pages" "gitlab-shell" "kas" "mailroom" "sidekiq" "spamcheck" "webservice" -}} -{{- if and (hasKey $.Values.gitlab $chart) (hasKey (index $.Values.gitlab $chart) "hpa") -}} -{{- if hasKey (index $.Values.gitlab $chart).hpa "behaviour" }} -gitlab.{{ $chart }}: - The configuration of `gitlab.{{ $chart }}.hpa.behaviour` has moved. Please use `gitlab.{{ $chart }}.hpa.behavior` instead. -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* Deprecation behaviors for Grafana*/}} -{{- define "gitlab.deprecate.global.grafana" -}} -{{- if kindIs "map" (index .Values.global "grafana") }} -{{- if and ( hasKey .Values.global.grafana "enabled" ) (eq true .Values.global.grafana.enabled)}} -grafana: - The bundled Grafana chart has been removed, and thus `global.grafana.enabled` does not have any effect. It is recommended that you switch to the newer chart version from Grafana Labs available at https://artifacthub.io/packages/helm/grafana/grafana or a Grafana Operator from a trusted provider. You can find instructions to integrate Grafana with GitLab at https://docs.gitlab.com/ee/administration/monitoring/performance/grafana_configuration.html. -{{- end -}} -{{- end -}} -{{- end -}} -{{/* END gitlab.deprecate.global.grafana */}} - -{{- define "gitlab.deprecate.registry.topLevel" -}} -{{- if hasKey $.Values.gitlab.webservice "registry" }} -registry: - The configuration of `gitlab.webservice.registry` has moved. Please use `global.registry` instead -{{- end -}} -{{- if hasKey $.Values.gitlab.sidekiq "registry" }} -registry: - The configuration of `gitlab.sidekiq.registry` has moved. Please use `global.registry` instead -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_geo.tpl b/charts/gitlab/gitlab/templates/_geo.tpl deleted file mode 100644 index e022e576b..000000000 --- a/charts/gitlab/gitlab/templates/_geo.tpl +++ /dev/null @@ -1,57 +0,0 @@ -{{/* ######## Templates related to Geo functionality */}} - -{{/* -Return the Geo DB hostname -*/}} -{{- define "gitlab.geo.psql.host" -}} -{{- if .Values.global.geo.psql.host -}} -{{- .Values.global.geo.psql.host | quote -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name "geo-postgresql" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the Geo database name -*/}} -{{- define "gitlab.geo.psql.database" -}} -{{- coalesce .Values.global.geo.psql.database "gitlabhq_geo_production" | quote -}} -{{- end -}} - -{{/* -Return the Geo database username -If the postgresql username is provided, it will use that, otherwise it will fallback -to "gitlab_replicator" default -*/}} -{{- define "gitlab.geo.psql.username" -}} -{{- coalesce .Values.global.geo.psql.username "gitlab_geo" -}} -{{- end -}} - -{{/* -Return the Geo database port -If the postgresql port is provided, it will use that, otherwise it will fallback -to 5432 default -*/}} -{{- define "gitlab.geo.psql.port" -}} -{{- coalesce .Values.global.geo.psql.port 5432 -}} -{{- end -}} - -{{/* -Return the Geo database secret name -Defaults to a release-based name and falls back to .Values.global.geo.psql.secretName - when using an external postegresql -*/}} -{{- define "gitlab.geo.psql.password.secret" -}} -{{- default (printf "%s-%s" .Release.Name "geo-postgresql-password") .Values.global.geo.psql.password.secret | quote -}} -{{- end -}} - -{{/* NOTE: SKIPPED `postgresql.secretName` */}} - -{{/* -Return the name of the key in a secret that contains the postgres password -Uses `postgresql-password` to match upstream postgresql chart when not using an - external postegresql -*/}} -{{- define "gitlab.geo.psql.password.key" -}} -{{- default "postgresql-password" .Values.global.geo.psql.password.key | quote -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_gitaly.tpl b/charts/gitlab/gitlab/templates/_gitaly.tpl deleted file mode 100644 index 9e294a5d4..000000000 --- a/charts/gitlab/gitlab/templates/_gitaly.tpl +++ /dev/null @@ -1,82 +0,0 @@ -{{/* ######### Gitaly related templates */}} - -{{/* -Return the gitaly secret name -Preference is local, global, default (`gitaly-secret`) -*/}} -{{- define "gitlab.gitaly.authToken.secret" -}} -{{- coalesce .Values.global.gitaly.authToken.secret (printf "%s-gitaly-secret" .Release.Name) | quote -}} -{{- end -}} - -{{/* -Return the gitaly secret key -Preference is local, global, default (`token`) -*/}} -{{- define "gitlab.gitaly.authToken.key" -}} -{{- coalesce .Values.global.gitaly.authToken.key "token" | quote -}} -{{- end -}} - -{{/* -Return the gitaly TLS secret name -*/}} -{{- define "gitlab.gitaly.tls.secret" -}} -{{- default (printf "%s-gitaly-tls" .Release.Name) .Values.global.gitaly.tls.secretName | quote -}} -{{- end -}} - -{{/* -Return the gitaly internal port - -NOTE: When called from another subchart, e.g. Praefect, it ignores the empty chart-local value. -*/}} -{{- define "gitlab.gitaly.internalPort" -}} -{{- $internalPort := 0 -}} -{{- if hasKey .Values "gitaly" -}} -{{- $internalPort = .Values.gitaly.service.internalPort -}} -{{- end -}} -{{- coalesce $internalPort .Values.global.gitaly.service.internalPort -}} -{{- end -}} - -{{/* -Return the gitaly TLS internal port - -NOTE: When called from another subchart, e.g. Praefect, it ignores the empty chart-local value. -*/}} -{{- define "gitlab.gitaly.tls.internalPort" -}} -{{- $internalPort := 0 -}} -{{- if hasKey .Values "gitaly" -}} -{{- $internalPort = .Values.gitaly.service.tls.internalPort -}} -{{- end -}} -{{- coalesce $internalPort .Values.global.gitaly.service.tls.internalPort -}} -{{- end -}} - -{{/* -Return the gitaly service name - -Order of operations: -- chart-local gitaly service name override -- global gitaly service name override -- derived from chart name - -NOTE: When called from another subchart, e.g. Praefect, it ignores chart-local values if empty. -*/}} -{{- define "gitlab.gitaly.serviceName" -}} -{{- $serviceName := "" -}} -{{- if hasKey .Values "gitaly" -}} -{{- $serviceName = .Values.gitaly.serviceName -}} -{{- end -}} -{{- coalesce $serviceName .Values.global.gitaly.serviceName (include "gitlab.other.fullname" (dict "context" . "chartName" "gitaly" )) -}} -{{- end -}} - -{{/* -Return a qualified gitaly service name, for direct access to the gitaly headless service endpoint of a pod. - -Call: - -``` -{{- include "gitlab.gitaly.qualifiedServiceName" (dict "context" . "index" $i) -}} -``` -*/}} -{{- define "gitlab.gitaly.qualifiedServiceName" -}} -{{- $name := include "gitlab.gitaly.serviceName" .context -}} -{{ include "gitlab.other.fullname" (dict "context" .context "chartName" "gitaly" ) }}-{{ .index }}.{{ $name }} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_gitlab_exporter.tpl b/charts/gitlab/gitlab/templates/_gitlab_exporter.tpl deleted file mode 100644 index 073ff5a19..000000000 --- a/charts/gitlab/gitlab/templates/_gitlab_exporter.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{/* -Return the GitLab Exporter TLS secret name -*/}} -{{- define "gitlab.gitlab-exporter.tls.secret" -}} -{{- default (printf "%s-gitlab-exporter-tls" .Release.Name) .Values.tls.secretName | quote -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_helpers.tpl b/charts/gitlab/gitlab/templates/_helpers.tpl deleted file mode 100644 index 17cc5e986..000000000 --- a/charts/gitlab/gitlab/templates/_helpers.tpl +++ /dev/null @@ -1,689 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "name" -}} -{{- default .Chart.Name .Values.nameOverride | 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). -*/}} -{{- define "fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Run "fullname" as if it was in another chart. This is an imperfect emulation, but close. - -This is especially useful when you reference "fullname" services/pods which may or may not be easy to reconstruct. - -Call: - -``` -{{- include "gitlab.other.fullname" ( dict "context" . "chartName" "name-of-other-chart" ) -}} -``` -*/}} -{{- define "gitlab.other.fullname" -}} -{{- $Chart := dict "Name" .chartName -}} -{{- $Release := .context.Release -}} -{{- $localNameOverride := (pluck "nameOverride" (pluck .chartName .context.Values | first) | first) -}} -{{- $globalNameOverride := (pluck "nameOverride" (pluck .chartName .context.Values.global | first) | first) -}} -{{- $nameOverride := coalesce $localNameOverride $globalNameOverride -}} -{{- $Values := dict "nameOverride" $nameOverride "global" .context.Values.global -}} -{{- include "fullname" (dict "Chart" $Chart "Release" $Release "Values" $Values) -}} -{{- end -}} - -{{/* ######### Hostname templates */}} - -{{/* -Returns the hostname. -If the hostname is set in `global.hosts.gitlab.name`, that will be returned, -otherwise the hostname will be assembled using `gitlab` as the prefix, and the `gitlab.assembleHost` function. -*/}} -{{- define "gitlab.gitlab.hostname" -}} -{{- coalesce .Values.global.hosts.gitlab.name (include "gitlab.assembleHost" (dict "name" "gitlab" "context" . )) -}} -{{- end -}} - -{{/* -Returns the GitLab Url, ex: `http://gitlab.example.com` -If `global.hosts.https` or `global.hosts.gitlab.https` is true, it uses https, otherwise http. -Calls into the `gitlab.gitlabHost` function for the hostname part of the url. -*/}} -{{- define "gitlab.gitlab.url" -}} -{{- if or .Values.global.hosts.https .Values.global.hosts.gitlab.https -}} -{{- printf "https://%s" (include "gitlab.gitlab.hostname" .) -}} -{{- else -}} -{{- printf "http://%s" (include "gitlab.gitlab.hostname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the minio hostname. -If the hostname is set in `global.hosts.minio.name`, that will be returned, -otherwise the hostname will be assembled using `minio` as the prefix, and the `gitlab.assembleHost` function. -*/}} -{{- define "gitlab.minio.hostname" -}} -{{- coalesce .Values.global.hosts.minio.name (include "gitlab.assembleHost" (dict "name" "minio" "context" . )) -}} -{{- end -}} - -{{/* -Returns the minio url. -*/}} - -{{- define "gitlab.minio.url" -}} -{{- if or .Values.global.hosts.https .Values.global.hosts.minio.https -}} -{{- printf "https://%s" (include "gitlab.minio.hostname" .) -}} -{{- else -}} -{{- printf "http://%s" (include "gitlab.minio.hostname" .) -}} -{{- end -}} -{{- end -}} - -{{/* ######### Utility templates */}} - -{{/* - A helper function for assembling a hostname using the base domain specified in `global.hosts.domain` - Takes a `Map/Dictonary` as an argument. Where key `name` is the domain to build, and `context` should be a - reference to the chart's $ object. - eg: `template "assembleHost" (dict "name" "minio" "context" .)` - - The hostname will be the combined name with the domain. eg: If domain is `example.com`, it will produce `minio.example.com` - Additionally if `global.hosts.hostSuffix` is set, it will append a hyphen, then the suffix to the name: - eg: If hostSuffix is `beta` it will produce `minio-beta.example.com` -*/}} -{{- define "gitlab.assembleHost" -}} -{{- $name := .name -}} -{{- $context := .context -}} -{{- $result := dict -}} -{{- if $context.Values.global.hosts.domain -}} -{{- $_ := set $result "domainHost" (printf ".%s" $context.Values.global.hosts.domain) -}} -{{- if $context.Values.global.hosts.hostSuffix -}} -{{- $_ := set $result "domainHost" (printf "-%s%s" $context.Values.global.hosts.hostSuffix $result.domainHost) -}} -{{- end -}} -{{- $_ := set $result "domainHost" (printf "%s%s" $name $result.domainHost) -}} -{{- end -}} -{{- $result.domainHost -}} -{{- end -}} - -{{/* - A helper template for collecting and inserting the imagePullSecrets. - - It expects a dictionary with two entries: - - `global` which contains global image settings, e.g. .Values.global.image - - `local` which contains local image settings, e.g. .Values.image -*/}} -{{- define "gitlab.image.pullSecrets" -}} -{{- $pullSecrets := default (list) .global.pullSecrets -}} -{{- if .local.pullSecrets -}} -{{- $pullSecrets = concat $pullSecrets .local.pullSecrets -}} -{{- end -}} -{{- if $pullSecrets }} -imagePullSecrets: -{{- range $index, $entry := $pullSecrets }} -- name: {{ $entry.name }} -{{- end }} -{{- end }} -{{- end -}} - -{{/* - A helper template for inserting imagePullPolicy. - - It expects a dictionary with two entries: - - `global` which contains global image settings, e.g. .Values.global.image - - `local` which contains local image settings, e.g. .Values.image -*/}} -{{- define "gitlab.image.pullPolicy" -}} -{{- $pullPolicy := coalesce .local.pullPolicy .global.pullPolicy -}} -{{- if $pullPolicy }} -imagePullPolicy: {{ $pullPolicy | quote }} -{{- end -}} -{{- end -}} - -{{/* ######### cert-manager templates */}} - -{{- define "gitlab.certmanager_annotations" -}} -{{- if (pluck "configureCertmanager" .Values.ingress .Values.global.ingress (dict "configureCertmanager" false) | first) -}} -cert-manager.io/issuer: "{{ .Release.Name }}-issuer" -acme.cert-manager.io/http01-edit-in-place: "true" -{{- end -}} -{{- end -}} - -{{/* ######### postgresql templates */}} - -{{/* -Return the db hostname -If an external postgresl host is provided, it will use that, otherwise it will fallback -to the service name. Failing a specified service name it will fall back to the default service name. - -This overrides the upstream postegresql chart so that we can deterministically -use the name of the service the upstream chart creates -*/}} -{{- define "gitlab.psql.host" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{- coalesce (pluck "host" $local .Values.global.psql | first) (printf "%s.%s.svc" (include "postgresql.primary.fullname" .) $.Release.Namespace) -}} -{{- end -}} - -{{/* -Return the configmap for initializing the PostgreSQL database. This is used to enable the -necessary postgres extensions for Gitlab to work -This overrides the upstream postegresql chart so that we can deterministically -use the name of the initdb scripts ConfigMap the upstream chart creates -*/}} -{{- define "gitlab.psql.initdbscripts" -}} -{{- printf "%s-%s-%s" .Release.Name "postgresql" "init-db" -}} -{{- end -}} - -{{/* -Overrides the full name of PostegreSQL in the upstream chart. -*/}} -{{- define "postgresql.primary.fullname" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{- coalesce (pluck "serviceName" $local .Values.global.psql | first) (printf "%s-%s" $.Release.Name "postgresql") -}} -{{- end -}} - -{{/* -Overrides the username of PostegreSQL in the upstream chart. - -Alias of gitlab.psql.username -*/}} -{{- define "postgresql.username" -}} -{{- template "gitlab.psql.username" . -}} -{{- end -}} - -{{/* -Overrides the database name of PostegreSQL in the upstream chart. - -Alias of gitlab.psql.database -*/}} -{{- define "postgresql.database" -}} -{{- template "gitlab.psql.database" . -}} -{{- end -}} - - -{{/* -Return the db database name -*/}} -{{- define "gitlab.psql.database" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{- coalesce (pluck "database" $local .Values.global.psql | first) "gitlabhq_production" -}} -{{- end -}} - -{{/* -Return the db username -If the postgresql username is provided, it will use that, otherwise it will fallback -to "gitlab" default -*/}} -{{- define "gitlab.psql.username" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{- coalesce (pluck "username" $local .Values.global.psql | first) "gitlab" -}} -{{- end -}} - -{{/* -Return the db port -If the postgresql port is provided in subchart values or global values, it will use that, otherwise it will fallback -to 5432 default -*/}} -{{- define "gitlab.psql.port" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{- default 5432 (pluck "port" $local $.Values.global.psql | first ) | int -}} -{{- end -}} - -{{/* -Return the secret name -Defaults to a release-based name and falls back to .Values.global.psql.secretName - when using an external PostgreSQL -*/}} -{{- define "gitlab.psql.password.secret" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{- $localPass := pluck "password" $local | first -}} -{{- default (printf "%s-%s" .Release.Name "postgresql-password") (pluck "secret" $localPass $.Values.global.psql.password | first ) | quote -}} -{{- end -}} - -{{/* -Return the name of the key in a secret that contains the postgres password -Uses `postgresql-password` to match upstream postgresql chart when not using an - external postegresql -*/}} -{{- define "gitlab.psql.password.key" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{- $localPass := pluck "password" $local | first -}} -{{- default "postgresql-password" (pluck "key" $localPass $.Values.global.psql.password | first ) | quote -}} -{{- end -}} - -{{/* -Return the application name that should be presented to PostgreSQL. -A blank string tells the client NOT to send an application name. -A nil value will use the process name by default. -See https://github.com/Masterminds/sprig/issues/53 for how we distinguish these. -Defaults to nil. -*/}} -{{- define "gitlab.psql.applicationName" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{- $appname := pluck "applicationName" $local .Values.global.psql | first -}} -{{- if not ( kindIs "invalid" $appname ) -}} -{{- $appname | quote -}} -{{- end -}} -{{- end -}} - -{{/* -Return if prepared statements should be used by PostgreSQL. -Defaults to false -*/}} -{{- define "gitlab.psql.preparedStatements" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{- eq true (default false (pluck "preparedStatements" $local .Values.global.psql | first)) -}} -{{- end -}} - -{{/* -Return if database tasks should be used by GitLab Rails for a given configuration. -Defaults to true -*/}} -{{- define "gitlab.psql.databaseTasks" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{- $databaseTasks := pluck "databaseTasks" $local .Values.global.psql | first -}} -{{- if not ( kindIs "invalid" $databaseTasks ) -}} -{{- eq true $databaseTasks -}} -{{- else -}} -{{- true -}} -{{- end -}} -{{- end -}} - -{{/* -Return connect_timeout value -Defaults to nil -*/}} -{{- define "gitlab.psql.connectTimeout" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{ pluck "connectTimeout" $local .Values.global.psql | first -}} -{{- end -}} - -{{/* -Return keepalives value -Defaults to nil -*/}} -{{- define "gitlab.psql.keepalives" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{ pluck "keepalives" $local .Values.global.psql | first -}} -{{- end -}} - -{{/* -Return keepalives_idle value -Defaults to nil -*/}} -{{- define "gitlab.psql.keepalivesIdle" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{ pluck "keepalivesIdle" $local .Values.global.psql | first -}} -{{- end -}} - -{{/* -Return keepalives_interval value -Defaults to nil -*/}} -{{- define "gitlab.psql.keepalivesInterval" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{ pluck "keepalivesInterval" $local .Values.global.psql | first -}} -{{- end -}} - -{{/* -Return keepalives_count value -Defaults to nil -*/}} -{{- define "gitlab.psql.keepalivesCount" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{ pluck "keepalivesCount" $local .Values.global.psql | first -}} -{{- end -}} - -{{/* -Return tcp_user_timeout value -Defaults to nil -*/}} -{{- define "gitlab.psql.tcpUserTimeout" -}} -{{- $local := pluck "psql" $.Values | first -}} -{{ pluck "tcpUserTimeout" $local .Values.global.psql | first -}} -{{- end -}} - -{{/* ######### ingress templates */}} - -{{/* -Return the appropriate apiVersion for Ingress. - -It expects a dictionary with three entries: - - `global` which contains global ingress settings, e.g. .Values.global.ingress - - `local` which contains local ingress settings, e.g. .Values.ingress - - `context` which is the parent context (either `.` or `$`) - -Example usage: -{{- $ingressCfg := dict "global" .Values.global.ingress "local" .Values.ingress "context" . -}} -kubernetes.io/ingress.provider: "{{ template "gitlab.ingress.provider" $ingressCfg }}" -*/}} -{{- define "gitlab.ingress.apiVersion" -}} -{{- if .local.apiVersion -}} -{{- .local.apiVersion -}} -{{- else if .global.apiVersion -}} -{{- .global.apiVersion -}} -{{- else if .context.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}} -{{- print "networking.k8s.io/v1" -}} -{{- else if .context.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}} -{{- print "networking.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "extensions/v1beta1" -}} -{{- end -}} -{{- end -}} - -{{/* -Returns the ingress provider - -It expects a dictionary with two entries: - - `global` which contains global ingress settings, e.g. .Values.global.ingress - - `local` which contains local ingress settings, e.g. .Values.ingress -*/}} -{{- define "gitlab.ingress.provider" -}} -{{- default .global.provider .local.provider -}} -{{- end -}} - -{{/* -Overrides the ingress-nginx template to make sure gitlab-shell name matches -*/}} -{{- define "ingress-nginx.tcp-configmap" -}} -{{ .Release.Name}}-nginx-ingress-tcp -{{- end -}} - -{{/* ######### annotations */}} - -{{/* -Handles merging a set of service annotations -*/}} -{{- define "gitlab.serviceAnnotations" -}} -{{- $allAnnotations := merge (default (dict) (default (dict) .Values.service).annotations) .Values.global.service.annotations -}} -{{- if $allAnnotations }} -{{- toYaml $allAnnotations -}} -{{- end -}} -{{- end -}} - -{{/* -Handles merging a set of deployment annotations -*/}} -{{- define "gitlab.deploymentAnnotations" -}} -{{- $allAnnotations := merge (default (dict) (default (dict) .Values.deployment).annotations) .Values.global.deployment.annotations -}} -{{- if $allAnnotations -}} -{{- toYaml $allAnnotations -}} -{{- end -}} -{{- end -}} - -{{/* ######### labels */}} - -{{/* -Handles merging a set of non-selector labels -*/}} -{{- define "gitlab.podLabels" -}} -{{- $allLabels := merge (default (dict) .Values.podLabels) .Values.global.pod.labels -}} -{{- if $allLabels -}} -{{- range $key, $value := $allLabels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Handles merging a set of labels for services -*/}} -{{- define "gitlab.serviceLabels" -}} -{{- $allLabels := merge (default (dict) .Values.serviceLabels) .Values.global.service.labels -}} -{{- if $allLabels -}} -{{- range $key, $value := $allLabels }} -{{ $key }}: {{ $value | quote }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* selfsigned cert for when other options aren't provided */}} -{{- define "gitlab.wildcard-self-signed-cert-name" -}} -{{- default (printf "%s-wildcard-tls" .Release.Name) .Values.global.ingress.tls.secretName -}} -{{- end -}} - -{{/* -Detect if `x.ingress.tls.secretName` are set -Return value if either `global.ingress.tls.secretName` or all components have `x.ingress.tls.secretName` set. -Return empty if not. - -We're explicitly checking for an actual value being present, not the existence of map. -*/}} -{{- define "gitlab.ingress.tls.configured" -}} -{{/* Pull the value, if it exists */}} -{{- $global := pluck "secretName" (default (dict) $.Values.global.ingress.tls) | first -}} -{{- $webservice := pluck "secretName" $.Values.gitlab.webservice.ingress.tls | first -}} -{{- $registry := pluck "secretName" $.Values.registry.ingress.tls | first -}} -{{- $minio := pluck "secretName" $.Values.minio.ingress.tls | first -}} -{{- $pages := pluck "secretName" ((index $.Values.gitlab "gitlab-pages").ingress).tls | first -}} -{{- $kas := pluck "secretName" $.Values.gitlab.kas.ingress.tls | first -}} -{{- $smartcard := pluck "smartcardSecretName" $.Values.gitlab.webservice.ingress.tls | first -}} -{{/* Set each item to configured value, or !enabled - This works because `false` is the same as empty, so we'll use the value when `enabled: true` - - default "" (not true) => '' - - default "" (not false) => 'true' - - default "valid" (not true) => 'valid' - - default "valid" (not false) => 'true' - Now, disabled sub-charts won't block this template from working properly. -*/}} -{{- $webservice := default $webservice (not $.Values.gitlab.webservice.enabled) -}} -{{- $registry := default $registry (not $.Values.registry.enabled) -}} -{{- $minio := default $minio (not $.Values.global.minio.enabled) -}} -{{- $pages := default $pages (not $.Values.global.pages.enabled) -}} -{{- $kas := default $kas (not $.Values.global.kas.enabled) -}} -{{- $smartcard := default $smartcard (not $.Values.global.appConfig.smartcard.enabled) -}} -{{/* Check that all enabled items have been configured */}} -{{- if or $global (and $webservice $registry $minio $pages $kas $smartcard) -}} -true -{{- end -}} -{{- end -}} - -{{/* -Detect if `.Values.ingress.tls.enabled` is set -Returns `ingress.tls.enabled` if it is a boolean, -Returns `global.ingress.tls.enabled` if it is a boolean, and `ingress.tls.enabled` is not. -Return true in any other case. -*/}} -{{- define "gitlab.ingress.tls.enabled" -}} -{{- $globalSet := and (hasKey .Values.global.ingress "tls") (and (hasKey .Values.global.ingress.tls "enabled") (kindIs "bool" .Values.global.ingress.tls.enabled)) -}} -{{- $localSet := and (hasKey .Values.ingress "tls") (and (hasKey .Values.ingress.tls "enabled") (kindIs "bool" .Values.ingress.tls.enabled)) -}} -{{- if $localSet }} -{{- .Values.ingress.tls.enabled }} -{{- else if $globalSet }} -{{- .Values.global.ingress.tls.enabled }} -{{- else }} -{{- true }} -{{- end -}} -{{- end -}} - -{{/* -Detect if `.Values.ingress.enabled` is set -Returns `ingress.enabled` if it is a boolean, -Returns `global.ingress.enabled` if it is a boolean, and `ingress.enabled` is not. -Return true in any other case. -*/}} -{{- define "gitlab.ingress.enabled" -}} -{{- $globalSet := and (hasKey .Values.global.ingress "enabled") (kindIs "bool" .Values.global.ingress.enabled) -}} -{{- $localSet := and (hasKey .Values.ingress "enabled") (kindIs "bool" .Values.ingress.enabled) -}} -{{- if $localSet }} -{{- .Values.ingress.enabled }} -{{- else if $globalSet }} -{{- .Values.global.ingress.enabled }} -{{- else }} -{{- true }} -{{- end -}} -{{- end -}} - -{{/* -Constructs helper image value. -Format: - {{ include "gitlab.helper.image" (dict "context" . "image" "") }} -*/}} -{{- define "gitlab.helper.image" -}} -{{- $gitlabVersion := "" -}} -{{- if .context.Values.global.gitlabVersion -}} -{{- $gitlabVersion = include "gitlab.parseAppVersion" (dict "appVersion" .context.Values.global.gitlabVersion "prepend" "true") -}} -{{- end -}} -{{- $tag := coalesce .image.tag $gitlabVersion "master" -}} -{{- $tagSuffix := include "gitlab.image.tagSuffix" .context -}} -{{- printf "%s:%s%s" .image.repository $tag $tagSuffix -}} -{{- end -}} - -{{/* -Constructs kubectl image value. -*/}} -{{- define "gitlab.kubectl.image" -}} -{{- include "gitlab.helper.image" (dict "context" . "image" .Values.global.kubectl.image) -}} -{{- end -}} - -{{/* -Constructs certificates image value. -*/}} -{{- define "gitlab.certificates.image" -}} -{{- include "gitlab.helper.image" (dict "context" . "image" .Values.global.certificates.image) -}} -{{- end -}} - -{{/* -Constructs selfsign image value. -*/}} -{{- define "gitlab.selfsign.image" -}} -{{- $image := index .Values "shared-secrets" "selfsign" "image" -}} -{{- include "gitlab.helper.image" (dict "context" . "image" $image) -}} -{{- end -}} - -{{/* -Constructs busybox image name. -*/}} -{{- define "gitlab.busybox.image" -}} -{{/* - # Earlier, init.image and init.tag were used to configure initContainer - # image details. We deprecated them in favor of init.image.repository and - # init.image.tag. However, deprecation checking happens after template - # rendering is done. So, we have to handle the case of `init.image` being a - # string to avoid the process being broken at rendering stage itself. It - # doesn't matter what we print there because once rendering is done - # deprecation check will kick-in and abort the process. That value will not - # be used. - # TODO: consider tagSuffix here, since we took it out of example -*/}} -{{- if kindIs "map" .local.image }} -{{- $image := default .global.busybox.image.repository .local.image.repository }} -{{- $tag := coalesce .local.image.tag .global.busybox.image.tag "latest" }} -{{- printf "%s:%s" $image $tag -}} -{{- else }} -{{- printf "DEPRECATED:DEPRECATED" -}} -{{- end -}} -{{- end -}} - -{{/* -Override upstream redis chart naming -*/}} -{{- define "redis.secretName" -}} -{{ template "gitlab.redis.password.secret" . }} -{{- end -}} - -{{/* -Override upstream redis secret key name -*/}} -{{- define "redis.secretPasswordKey" -}} -{{ template "gitlab.redis.password.key" . }} -{{- end -}} - -{{/* -Return the fullname template for shared-secrets job. -*/}} -{{- define "shared-secrets.fullname" -}} -{{- printf "%s-shared-secrets" .Release.Name -}} -{{- end -}} - -{{/* -Return the name template for shared-secrets job. -*/}} -{{- define "shared-secrets.name" -}} -{{- $sharedSecretValues := index .Values "shared-secrets" -}} -{{- default "shared-secrets" $sharedSecretValues.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified job name for shared-secrets. -Due to the job only being allowed to run once, we add the chart revision so helm -upgrades don't cause errors trying to create the already ran job. -Due to the helm delete not cleaning up these jobs, we add a randome value to -reduce collision -*/}} -{{- define "shared-secrets.jobname" -}} -{{- $name := include "shared-secrets.fullname" . | trunc 55 | trimSuffix "-" -}} -{{- $rand := randAlphaNum 3 | lower }} -{{- printf "%s-%d-%s" $name .Release.Revision $rand | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account to use for shared-secrets job -*/}} -{{- define "shared-secrets.serviceAccountName" -}} -{{- $sharedSecretValues := index .Values "shared-secrets" -}} -{{- if $sharedSecretValues.serviceAccount.create -}} - {{ default (include "shared-secrets.fullname" .) $sharedSecretValues.serviceAccount.name }} -{{- else -}} - {{ coalesce $sharedSecretValues.serviceAccount.name .Values.global.serviceAccount.name "default" }} -{{- end -}} -{{- end -}} - -{{/* -Return a emptyDir definition for Volume declarations - -Scope is the configuration of that emptyDir. -Only accepts sizeLimit and/or medium -*/}} -{{- define "gitlab.volume.emptyDir" -}} -{{- $values := pick . "sizeLimit" "medium" -}} -{{- if not $values -}} -emptyDir: {} -{{- else -}} -emptyDir: {{ toYaml $values | nindent 2 }} -{{- end -}} -{{- end -}} - -{{/* -Return init container specific securityContext template -*/}} -{{- define "gitlab.init.containerSecurityContext" }} -{{- if .Values.init.containerSecurityContext }} -securityContext: - {{- toYaml .Values.init.containerSecurityContext | nindent 2 }} -{{- end }} -{{- end }} - -{{/* -Return container specific securityContext template -*/}} -{{- define "gitlab.containerSecurityContext" }} -{{- if .Values.containerSecurityContext }} -securityContext: - {{- toYaml .Values.containerSecurityContext | nindent 2 }} -{{- end }} -{{- end }} -Return a PodSecurityContext definition. - -Usage: - {{ include "gitlab.podSecurityContext" .Values.securityContext }} -*/}} -{{- define "gitlab.podSecurityContext" -}} -{{- $psc := . }} -{{- if $psc }} -securityContext: -{{- if not (empty $psc.runAsUser) }} - runAsUser: {{ $psc.runAsUser }} -{{- end }} -{{- if not (empty $psc.runAsGroup) }} - runAsGroup: {{ $psc.runAsGroup }} -{{- end }} -{{- if not (empty $psc.fsGroup) }} - fsGroup: {{ $psc.fsGroup }} -{{- end }} -{{- if not (empty $psc.fsGroupChangePolicy) }} - fsGroupChangePolicy: {{ $psc.fsGroupChangePolicy }} -{{- end }} -{{- end }} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_hpa.tpl b/charts/gitlab/gitlab/templates/_hpa.tpl deleted file mode 100644 index f9ca3d88c..000000000 --- a/charts/gitlab/gitlab/templates/_hpa.tpl +++ /dev/null @@ -1,130 +0,0 @@ -{{/* Common templates for HorizontalPodAutoscaler */}} - -{{/* -Returns the appropriate apiVersion for HoritonzalPodAutoscaler. - -It expects a dictionary with three entries: - - `global` which contains global HPA settings, e.g. .Values.global.hpa - - `local` which contains local HPA settings, e.g. .Values.sidekiq.hpa - - `context` which is the parent context (either `.` or `$`) -*/}} -{{- define "gitlab.hpa.apiVersion" -}} -{{- if .local.apiVersion -}} -{{- .local.apiVersion -}} -{{- else if .global.apiVersion -}} -{{- .global.apiVersion -}} -{{- else if .context.Capabilities.APIVersions.Has "autoscaling/v2/HorizontalPodAutoscaler" -}} -{{- print "autoscaling/v2" -}} -{{- else if .context.Capabilities.APIVersions.Has "autoscaling/v2beta2/HorizontalPodAutoscaler" -}} -{{- print "autoscaling/v2beta2" -}} -{{- else -}} -{{- print "autoscaling/v2beta1" -}} -{{- end -}} -{{- end -}} - -{{/* -Checks if the autoscaling/v2 metrics spec is supported - -It expects a dictionary with three entries: - - `global` which contains global HPA settings, e.g. .Values.global.hpa - - `local` which contains local HPA settings, e.g. .Values.sidekiq.hpa - - `context` which is the parent context (either `.` or `$`) -*/}} -{{- define "gitlab.hpa.supportsV2MetricsSpec" -}} -{{- $apiVersion := include "gitlab.hpa.apiVersion" . -}} -{{- if or (eq $apiVersion "autoscaling/v2") (eq $apiVersion "autoscaling/v2beta2") -}} -true -{{- end -}} -{{- end -}} - -{{/* -Checks if the autoscaling/v2 behavior spec is supported - -It expects a dictionary with three entries: - - `global` which contains global HPA settings, e.g. .Values.global.hpa - - `local` which contains local HPA settings, e.g. .Values.sidekiq.hpa - - `context` which is the parent context (either `.` or `$`) -*/}} -{{- define "gitlab.hpa.supportsV2BehaviorSpec" -}} -{{- $apiVersion := include "gitlab.hpa.apiVersion" . -}} -{{- if or (eq $apiVersion "autoscaling/v2") (and (eq $apiVersion "autoscaling/v2beta2") (semverCompare ">=1.18.0-0" .context.Capabilities.KubeVersion.Version)) -}} -true -{{- end -}} -{{- end -}} - -{{/* -Returns the HorizontalPodAutoscaler metrics spec properly formatted for the -highest supported API version of HorizontalPodAutoscaler - -It expects a dictionary with three entries: - - `global` which contains global HPA settings, e.g. .Values.global.hpa - - `local` which contains local HPA settings, e.g. .Values.sidekiq.hpa - - `context` which is the parent context (either `.` or `$`) -*/}} -{{- define "gitlab.hpa.metrics" -}} -{{- $params := . -}} -metrics: -{{- if not .local.customMetrics }} - {{- with .local.cpu }} - {{- $targetType := default "Utilization" .targetType }} - - type: Resource - resource: - name: cpu - {{- if (include "gitlab.hpa.supportsV2MetricsSpec" $params) }} - target: - type: {{ $targetType }} - {{- if eq $targetType "Utilization" }} - averageUtilization: {{ default .targetAverageUtilization $params.local.targetAverageUtilization }} - {{- else }} - averageValue: {{ default .targetAverageValue $params.local.targetAverageValue }} - {{- end }} - {{- else }} - {{- if eq $targetType "Utilization" }} - targetAverageUtilization: {{ default .targetAverageUtilization $params.local.targetAverageUtilization }} - {{- else }} - targetAverageValue: {{ default .targetAverageValue $params.local.targetAverageValue }} - {{- end }} - {{- end }} - {{- end }} - {{- with .local.memory }} - {{- $targetType := default "Utilization" .targetType }} - - type: Resource - resource: - name: memory - {{- if (include "gitlab.hpa.supportsV2MetricsSpec" $params) }} - target: - type: {{ $targetType }} - {{- if eq $targetType "Utilization" }} - averageUtilization: {{ .targetAverageUtilization }} - {{- else }} - averageValue: {{ .targetAverageValue }} - {{- end }} - {{- else }} - {{- if eq $targetType "Utilization" }} - targetAverageUtilization: {{ .targetAverageUtilization }} - {{- else }} - targetAverageValue: {{ .targetAverageValue }} - {{- end }} - {{- end }} - {{- end }} -{{- else }} - {{- toYaml .local.customMetrics | nindent 4 }} -{{- end }} -{{- end -}} - -{{/* -Returns the HorizontalPodAutoscaler behavior spec if supported - -It expects a dictionary with three entries: - - `global` which contains global HPA settings, e.g. .Values.global.hpa - - `local` which contains local HPA settings, e.g. .Values.sidekiq.hpa - - `context` which is the parent context (either `.` or `$`) -*/}} -{{- define "gitlab.hpa.behavior" -}} -{{- if (include "gitlab.hpa.supportsV2BehaviorSpec" .) }} -{{- with .local.behavior -}} -behavior: - {{- toYaml . | nindent 2 }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_ingress.tpl b/charts/gitlab/gitlab/templates/_ingress.tpl deleted file mode 100644 index 636bcdc00..000000000 --- a/charts/gitlab/gitlab/templates/_ingress.tpl +++ /dev/null @@ -1,59 +0,0 @@ -{{/* -Adds `ingress.class` annotation based on the API version of Ingress. - -It expects a dictionary with two entries: - - `global` which contains global ingress settings, e.g. .Values.global.ingress - - `context` which is the parent context (either `.` or `$`) -*/}} -{{- define "ingress.class.annotation" -}} -{{- if not (eq (default "" .global.class) "none" ) -}} -{{- $apiVersion := include "gitlab.ingress.apiVersion" . -}} -{{- $className := include "ingress.class.name" . -}} -{{- if not (eq $apiVersion "networking.k8s.io/v1") -}} -kubernetes.io/ingress.class: {{ $className | quote }} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Calculates the IngressClass name. - -It expects either: - - a dictionary with two entries: - - `global` which contains global ingress settings, e.g. .Values.global.ingress - - `context` which is the parent context (either `.` or `$`) - - the parent context ($ from caller) - - This detected by access to both `.Capabilities` and `.Release` - -If the value is not set or is set to nil, then it provides a default. -Otherwise, it will use the given value (even an empty string ""). -*/}} -{{- define "ingress.class.name" -}} -{{- $here := dict }} -{{- if and (hasKey $ "Release") (hasKey $ "Capabilities") -}} -{{- $here = dict "global" $.Values.global.ingress "context" $ -}} -{{- else -}} -{{- $here = . -}} -{{- end -}} -{{- if kindIs "invalid" $here.global.class -}} -{{- printf "%s-nginx" $here.context.Release.Name -}} -{{- else -}} -{{- $here.global.class -}} -{{- end -}} -{{- end -}} - -{{/* -Sets `ingressClassName` based on the API version of Ingress. - -It expects a dictionary with two entries: - - `global` which contains global ingress settings, e.g. .Values.global.ingress - - `context` which is the parent context (either `.` or `$`) -*/}} -{{- define "ingress.class.field" -}} -{{- if not (eq (default "" .global.class) "none" ) -}} -{{- $apiVersion := include "gitlab.ingress.apiVersion" . -}} -{{- if eq $apiVersion "networking.k8s.io/v1" -}} -ingressClassName: {{ include "ingress.class.name" . | quote }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_kas.tpl b/charts/gitlab/gitlab/templates/_kas.tpl deleted file mode 100644 index 35798ce4b..000000000 --- a/charts/gitlab/gitlab/templates/_kas.tpl +++ /dev/null @@ -1,37 +0,0 @@ -{{/* ######### gitlab-kas related templates */}} - -{{/* -Return the gitlab-kas secret -*/}} - -{{- define "gitlab.kas.secret" -}} -{{- default (printf "%s-gitlab-kas-secret" .Release.Name) .Values.global.appConfig.gitlab_kas.secret | quote -}} -{{- end -}} - -{{- define "gitlab.kas.key" -}} -{{- default "kas_shared_secret" .Values.global.appConfig.gitlab_kas.key | quote -}} -{{- end -}} - -{{/* -Return the gitlab-kas private API secret -*/}} - -{{- define "gitlab.kas.privateApi.secret" -}} -{{- $secret := "" -}} -{{- if eq .Chart.Name "kas" -}} -{{- $secret = .Values.privateApi.secret -}} -{{- else -}} -{{- $secret = .Values.gitlab.kas.privateApi.secret -}} -{{- end -}} -{{- default (printf "%s-kas-private-api" .Release.Name) $secret | quote -}} -{{- end -}} - -{{- define "gitlab.kas.privateApi.key" -}} -{{- $key := "" -}} -{{- if eq .Chart.Name "kas" -}} -{{- $key = .Values.privateApi.key -}} -{{- else -}} -{{- $key = .Values.gitlab.kas.privateApi.key -}} -{{- end -}} -{{- default "kas_private_api_secret" $key | quote -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_migrations.tpl b/charts/gitlab/gitlab/templates/_migrations.tpl deleted file mode 100644 index 94459e76b..000000000 --- a/charts/gitlab/gitlab/templates/_migrations.tpl +++ /dev/null @@ -1,22 +0,0 @@ -{{/* ######### GitLab related templates */}} - -{{/* -Return the initial root password secret name -*/}} -{{- define "gitlab.migrations.initialRootPassword.secret" -}} -{{- default (printf "%s-gitlab-initial-root-password" .Release.Name) .Values.global.initialRootPassword.secret | quote -}} -{{- end -}} - -{{/* -Return the initial root password secret key -*/}} -{{- define "gitlab.migrations.initialRootPassword.key" -}} -{{- coalesce .Values.global.initialRootPassword.key "password" | quote -}} -{{- end -}} - -{{/* -Return the initial Enterprise license secret key -*/}} -{{- define "gitlab.migrations.license.key" -}} -{{- coalesce .Values.global.gitlab.license.key "license" | quote -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_minio.tpl b/charts/gitlab/gitlab/templates/_minio.tpl deleted file mode 100644 index 7d9dfd103..000000000 --- a/charts/gitlab/gitlab/templates/_minio.tpl +++ /dev/null @@ -1,8 +0,0 @@ -{{/* ######### Minio related templates */}} - -{{/* -Return the minio credentials secret -*/}} -{{- define "gitlab.minio.credentials.secret" -}} -{{- default (printf "%s-minio-secret" .Release.Name) .Values.global.minio.credentials.secret | quote -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_oauth.tpl b/charts/gitlab/gitlab/templates/_oauth.tpl deleted file mode 100644 index ded21dd2d..000000000 --- a/charts/gitlab/gitlab/templates/_oauth.tpl +++ /dev/null @@ -1,27 +0,0 @@ -{{- define "oauth.gitlab-pages.secret" -}} -{{ default (printf "%s-oauth-gitlab-pages-secret" .Release.Name) (index $.Values.global.oauth "gitlab-pages" "secret") }} -{{- end -}} - -{{- define "oauth.gitlab-pages.appIdKey" -}} -{{ default "appid" (index $.Values.global.oauth "gitlab-pages" "appIdKey") }} -{{- end -}} - -{{- define "oauth.gitlab-pages.appSecretKey" -}} -{{ default "appsecret" (index $.Values.global.oauth "gitlab-pages" "appSecretKey") }} -{{- end -}} - -{{- define "oauth.gitlab-pages.authScope" -}} -{{ default "api" (index $.Values.global.oauth "gitlab-pages" "authScope") }} -{{- end -}} - -{{- define "oauth.gitlab-pages.authRedirectUri" -}} -{{- if (index $.Values.global.oauth "gitlab-pages" "redirectUri") -}} -{{ (index $.Values.global.oauth "gitlab-pages" "redirectUri") }} -{{- else -}} -{{- if eq "true" (include "gitlab.pages.https" $) -}} -https://projects.{{ template "gitlab.pages.hostname" . }}/auth -{{- else -}} -http://projects.{{ template "gitlab.pages.hostname" . }}/auth -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_pages.tpl b/charts/gitlab/gitlab/templates/_pages.tpl deleted file mode 100644 index 7e16eac2c..000000000 --- a/charts/gitlab/gitlab/templates/_pages.tpl +++ /dev/null @@ -1,21 +0,0 @@ -{{/* ######### gitlab-pages related templates */}} - -{{/* -Return the gitlab-pages secret -*/}} - -{{- define "gitlab.pages.apiSecret.secret" -}} -{{- default (printf "%s-gitlab-pages-secret" .Release.Name) $.Values.global.pages.apiSecret.secret | quote -}} -{{- end -}} - -{{- define "gitlab.pages.apiSecret.key" -}} -{{- default "shared_secret" $.Values.global.pages.apiSecret.key | quote -}} -{{- end -}} - -{{- define "gitlab.pages.authSecret.secret" -}} -{{ default (printf "%s-gitlab-pages-auth-secret" .Release.Name) $.Values.global.pages.authSecret.secret }} -{{- end -}} - -{{- define "gitlab.pages.authSecret.key" -}} -{{ default "password" $.Values.global.pages.authSecret.key }} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_pdb.tpl b/charts/gitlab/gitlab/templates/_pdb.tpl deleted file mode 100644 index 22ffcc169..000000000 --- a/charts/gitlab/gitlab/templates/_pdb.tpl +++ /dev/null @@ -1,22 +0,0 @@ -{{/* Common templates for PodDisruptionBudget */}} - -{{/* -Returns the appropriate apiVersion for PodDisruptionBudget. - -It expects a dictionary with three entries: - - `global` which contains global PDB settings, e.g. .Values.global.pdb - - `local` which contains local PDB settings, e.g. .Values.sidekiq.pdb - - `context` which is the parent context (either `.` or `$`) -*/}} -{{- define "gitlab.pdb.apiVersion" -}} -{{- $local := default dict .local -}} -{{- if (get $local "apiVersion") -}} -{{- .local.apiVersion -}} -{{- else if .global.apiVersion -}} -{{- .global.apiVersion -}} -{{- else if .context.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" -}} -{{- print "policy/v1" -}} -{{- else -}} -{{- print "policy/v1beta1" -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_praefect.tpl b/charts/gitlab/gitlab/templates/_praefect.tpl deleted file mode 100644 index 99acdc635..000000000 --- a/charts/gitlab/gitlab/templates/_praefect.tpl +++ /dev/null @@ -1,118 +0,0 @@ -{{/* -Return Praefect's dbSecert secret name -*/}} -{{- define "gitlab.praefect.dbSecret.secret" -}} -{{- default (printf "%s-praefect-dbsecret" .Release.Name) .Values.global.praefect.dbSecret.secret | quote -}} -{{- end -}} - -{{/* -Return Praefect's dbSecert secret key -*/}} -{{- define "gitlab.praefect.dbSecret.key" -}} -{{- default "secret" .Values.global.praefect.dbSecret.key | quote -}} -{{- end -}} - -{{/* -Return Praefect's database hostname -*/}} -{{- define "gitlab.praefect.psql.host" -}} -{{- coalesce .Values.global.praefect.psql.host (include "gitlab.psql.host" .) }} -{{- end -}} - -{{/* -Return Praefect's database port -*/}} -{{- define "gitlab.praefect.psql.port" -}} -{{- coalesce .Values.global.praefect.psql.port (include "gitlab.psql.port" .) }} -{{- end -}} - -{{/* -Return Praefect's database username -*/}} -{{- define "gitlab.praefect.psql.user" -}} -{{- default "praefect" .Values.global.praefect.psql.user }} -{{- end -}} - -{{/* -Return Praefect's database name -*/}} -{{- define "gitlab.praefect.psql.dbName" -}} -{{- default "praefect" .Values.global.praefect.psql.dbName }} -{{- end -}} - -{{/* -Return the praefect secret name -Preference is local, global, default (`praefect-secret`) -*/}} -{{- define "gitlab.praefect.authToken.secret" -}} -{{- coalesce .Values.global.praefect.authToken.secret (printf "%s-praefect-secret" .Release.Name) | quote -}} -{{- end -}} - -{{/* -Return the praefect secret key -Preference is local, global, default (`token`) -*/}} -{{- define "gitlab.praefect.authToken.key" -}} -{{- coalesce .Values.global.praefect.authToken.key "token" | quote -}} -{{- end -}} - -{{/* -Return the praefect internal port -*/}} -{{- define "gitlab.praefect.internalPort" -}} -{{- $internalPort := 0 -}} -{{- if hasKey .Values "praefect" -}} -{{- if hasKey .Values.praefect "service" -}} -{{- $internalPort = .Values.praefect.service.internalPort -}} -{{- end -}} -{{- end -}} -{{- coalesce $internalPort .Values.global.praefect.service.internalPort -}} -{{- end -}} - -{{/* -Return the praefect TLS internal port -*/}} -{{- define "gitlab.praefect.tls.internalPort" -}} -{{- $internalPort := 0 -}} -{{- if hasKey .Values "praefect" -}} -{{- if hasKey .Values.praefect "service" -}} -{{- if hasKey .Values.praefect.service "tls" -}} -{{- $internalPort = .Values.praefect.service.tls.internalPort -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{- coalesce $internalPort .Values.global.praefect.service.tls.internalPort -}} -{{- end -}} - -{{/* -Return the praefect external port -*/}} -{{- define "gitlab.praefect.externalPort" -}} -{{- $externalPort := 0 -}} -{{- if hasKey .Values "praefect" -}} -{{- if hasKey .Values.praefect "service" -}} -{{- $externalPort = .Values.praefect.service.externalPort -}} -{{- end -}} -{{- end -}} -{{- coalesce $externalPort .Values.global.praefect.service.externalPort -}} -{{- end -}} - -{{/* -Return the praefect TLS external port -*/}} -{{- define "gitlab.praefect.tls.externalPort" -}} -{{- $externalPort := 0 -}} -{{- if hasKey .Values "praefect" -}} -{{- if hasKey .Values.praefect "service" -}} -{{- $externalPort = .Values.praefect.service.tls.externalPort -}} -{{- end -}} -{{- end -}} -{{- coalesce $externalPort .Values.global.praefect.service.tls.externalPort -}} -{{- end -}} - -{{/* -Return the praefect TLS secret name -*/}} -{{- define "gitlab.praefect.tls.secret" -}} -{{- default (printf "%s-praefect-tls" .Release.Name) .Values.global.praefect.tls.secretName | quote -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_rails.tpl b/charts/gitlab/gitlab/templates/_rails.tpl deleted file mode 100644 index 56cd31d1a..000000000 --- a/charts/gitlab/gitlab/templates/_rails.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* ######### Generic rails templates */}} - -{{/* -Return the rails secrets.yml secret -*/}} -{{- define "gitlab.rails-secrets.secret" -}} -{{- default (printf "%s-rails-secret" .Release.Name) .Values.global.railsSecrets.secret | quote -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_redis.tpl b/charts/gitlab/gitlab/templates/_redis.tpl deleted file mode 100644 index fa42808c4..000000000 --- a/charts/gitlab/gitlab/templates/_redis.tpl +++ /dev/null @@ -1,54 +0,0 @@ -{{/* ######### Redis related templates */}} - -{{/* -Build a dict of redis configuration - -- inherit from global.redis, all but sentinels and cluster -- use values within children, if they exist, even if "empty" -*/}} -{{- define "gitlab.redis.configMerge" -}} -{{- $_ := set $ "redisConfigName" (default "" $.redisConfigName) -}} -{{- $_ := unset $ "redisMergedConfig" -}} -{{- $_ := set $ "redisMergedConfig" (dict "redisConfigName" $.redisConfigName) -}} -{{- range $want := list "host" "port" "scheme" "user" -}} -{{- $_ := set $.redisMergedConfig $want (pluck $want (index $.Values.global.redis $.redisConfigName) $.Values.global.redis | first) -}} -{{- end -}} -{{- if kindIs "map" (get (index $.Values.global.redis $.redisConfigName) "password") -}} -{{- $_ := set $.redisMergedConfig "password" (get (index $.Values.global.redis $.redisConfigName) "password") -}} -{{- else if (kindIs "map" (get $.Values.global.redis "password")) -}} -{{- $_ := set $.redisMergedConfig "password" (get $.Values.global.redis "password") -}} -{{- else -}} -{{- $_ := set $.redisMergedConfig "password" $.Values.global.redis.auth -}} -{{- end -}} -{{- range $key := keys $.Values.global.redis.auth -}} -{{- if not (hasKey $.redisMergedConfig.password $key) -}} -{{- $_ := set $.redisMergedConfig.password $key (index $.Values.global.redis.auth $key) -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the redis password secret name -*/}} -{{- define "gitlab.redis.password.secret" -}} -{{- include "gitlab.redis.configMerge" . -}} -{{- default (printf "%s-redis-secret" .Release.Name) .redisMergedConfig.password.secret | quote -}} -{{- end -}} - -{{/* -Return the redis password secret key -*/}} -{{- define "gitlab.redis.password.key" -}} -{{- include "gitlab.redis.configMerge" . -}} -{{- default "secret" .redisMergedConfig.password.key | quote -}} -{{- end -}} - -{{/* -Return a merged setting between global.redis.password.enabled, -global.redis.[subkey/"redisConfigName"].password.enabled, or -global.redis.auth.enabled -*/}} -{{- define "gitlab.redis.password.enabled" -}} -{{- include "gitlab.redis.configMerge" . -}} -{{- .redisMergedConfig.password.enabled -}} -{{- end -}} \ No newline at end of file diff --git a/charts/gitlab/gitlab/templates/_registry.tpl b/charts/gitlab/gitlab/templates/_registry.tpl deleted file mode 100644 index 6f5665543..000000000 --- a/charts/gitlab/gitlab/templates/_registry.tpl +++ /dev/null @@ -1,74 +0,0 @@ -{{/* ######### Registry related templates */}} - -{{/* -Return the registry certificate secret name -*/}} -{{- define "gitlab.registry.certificate.secret" -}} -{{- default (printf "%s-registry-secret" .Release.Name) .Values.global.registry.certificate.secret | quote -}} -{{- end -}} - -{{/* -Return the registry TLS secret name -*/}} -{{- define "gitlab.registry.tls.secret" -}} -{{- coalesce .Values.tls.secretName .Values.global.registry.tls.secretName (printf "%s-registry-tls" .Release.Name) | quote -}} -{{- end -}} - -{{/* -Return the registry's httpSecert secret name -*/}} -{{- define "gitlab.registry.httpSecret.secret" -}} -{{- default (printf "%s-registry-httpsecret" .Release.Name) .Values.global.registry.httpSecret.secret | quote -}} -{{- end -}} - -{{/* -Return the registry's httpSecert secret key -*/}} -{{- define "gitlab.registry.httpSecret.key" -}} -{{- default "secret" .Values.global.registry.httpSecret.key | quote -}} -{{- end -}} - -{{/* -Return the registry's notification secret name -*/}} -{{- define "gitlab.registry.notificationSecret.secret" -}} -{{- default (printf "%s-registry-notification" .Release.Name) .Values.global.registry.notificationSecret.secret | quote -}} -{{- end -}} - -{{/* -Return the registry's notification secret key -*/}} -{{- define "gitlab.registry.notificationSecret.key" -}} -{{- default "secret" .Values.global.registry.notificationSecret.key | quote -}} -{{- end -}} - -{{/* -Return the registry's notification mount -*/}} -{{- define "gitlab.registry.notificationSecret.mount" -}} -- secret: - name: {{ template "gitlab.registry.notificationSecret.secret" $ }} - items: - - key: {{ template "gitlab.registry.notificationSecret.key" $ }} - path: registry/notificationSecret -{{- end -}} - -{{/* -When Geo + Container Registry syncing enabled, adds the following notifier -*/}} -{{- define "global.geo.registry.syncNotifier" -}} -{{- if and .Values.global.geo.enabled .Values.global.geo.registry.replication.enabled -}} -endpoints: - - name: geo_event - url: https://{{ include "gitlab.gitlab.hostname" . }}/api/v4/container_registry_event/events - timeout: 2s - threshold: 5 - backoff: 1s - headers: - Authorization: - secret: {{ template "gitlab.registry.notificationSecret.secret" $ }} - key: {{ template "gitlab.registry.notificationSecret.key" $ }} -{{- else -}} -endpoints: [] -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_runcheck.tpl b/charts/gitlab/gitlab/templates/_runcheck.tpl deleted file mode 100644 index b627d588c..000000000 --- a/charts/gitlab/gitlab/templates/_runcheck.tpl +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh - -set -e - -notify() { - echo "$1" - echo -n "$1 " >> /dev/termination-log -} - -greater_version() -{ - test "$(printf '%s\n' "$@" | sort -V | tail -n 1)" = "$1"; -} - -# For the PostgreSQL upgrade, you either need both secrets, or no secrets. -# If there are no secrets, we will create them for you. -# If the secrets aren't in either of these states, we assume you are upgrading from an older version -# This is running ahead of version checks to ensure this always runs. This is to account for -# installations outside of the official helm repo. -secrets_dir="/etc/secrets/postgresql" -if [ -d "${secrets_dir}" ]; then - if [ ! "$(ls -A ${secrets_dir}/..data/)" = "" ]; then - if [ ! -f "${secrets_dir}/postgresql-postgres-password" ] || [ ! -f "${secrets_dir}/{{ include "gitlab.psql.password.key" . | trimAll "\"" }}" ]; then - notify "You seem to be upgrading from a previous version of GitLab using the bundled PostgreSQL chart" - notify "There are some manual steps which need to be performed in order to upgrade the database" - notify "Please see the upgrade documentation for instructions on how to proceed:" - notify "https://docs.gitlab.com/charts/installation/upgrade.html" - exit 1 - fi - fi -fi -MIN_VERSION=15.11 -CHART_MIN_VERSION=6.11 - -# Only run check for semver releases -if ! awk 'BEGIN{exit(!(ARGV[1] ~ /^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/))}' "$GITLAB_VERSION"; then - exit 0 -fi - -NEW_MAJOR_VERSION=$(echo $GITLAB_VERSION | awk -F "." '{print $1}') -NEW_MINOR_VERSION=$(echo $GITLAB_VERSION | awk -F "." '{print $1"."$2}') - -NEW_CHART_MAJOR_VERSION=$(echo $CHART_VERSION | awk -F "." '{print $1}') -NEW_CHART_MINOR_VERSION=$(echo $CHART_VERSION | awk -F "." '{print $1"."$2}') - -if [ ! -f /chart-info/gitlabVersion ]; then - notify "It seems you are attempting an unsupported upgrade path." - notify "Please follow the upgrade documentation at https://docs.gitlab.com/ee/update/#upgrade-paths" - exit 1 -fi - -OLD_VERSION_STRING=$(cat /chart-info/gitlabVersion) -OLD_CHART_VERSION_STRING=$(cat /chart-info/gitlabChartVersion) - -# Skip check if old version wasn't semver -if ! awk 'BEGIN{exit(!(ARGV[1] ~ /^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/))}' "$OLD_VERSION_STRING"; then - exit 0 -fi - -OLD_MAJOR_VERSION=$(echo $OLD_VERSION_STRING | awk -F "." '{print $1}') -OLD_MINOR_VERSION=$(echo $OLD_VERSION_STRING | awk -F "." '{print $1"."$2}') -OLD_CHART_MAJOR_VERSION=$(echo $OLD_CHART_VERSION_STRING | awk -F "." '{print $1}') -OLD_CHART_MINOR_VERSION=$(echo $OLD_CHART_VERSION_STRING | awk -F "." '{print $1"."$2}') - -# Checking Version -# (i) if it is a major version jump -# (ii) if existing version is less than required minimum version -if [ ${OLD_MAJOR_VERSION} -lt ${NEW_MAJOR_VERSION} ] || [ ${OLD_CHART_MAJOR_VERSION} -lt ${NEW_CHART_MAJOR_VERSION} ]; then - if ( ! greater_version $OLD_MINOR_VERSION $MIN_VERSION ) || ( ! greater_version $OLD_CHART_MINOR_VERSION $CHART_MIN_VERSION ); then - notify "It seems you are upgrading the GitLab Helm Chart from ${OLD_CHART_VERSION_STRING} (GitLab ${OLD_VERSION_STRING}) to ${CHART_VERSION} (GitLab ${GITLAB_VERSION})." - notify "It is required to upgrade to the latest ${CHART_MIN_VERSION}.x version first before proceeding." - notify "Please follow the upgrade documentation at https://docs.gitlab.com/charts/releases/7_0.html" - notify "and upgrade to GitLab Helm Chart version ${CHART_MIN_VERSION}.x before upgrading to ${CHART_VERSION}." - exit 1 - fi -fi diff --git a/charts/gitlab/gitlab/templates/_runner.tpl b/charts/gitlab/gitlab/templates/_runner.tpl deleted file mode 100644 index e24aa119e..000000000 --- a/charts/gitlab/gitlab/templates/_runner.tpl +++ /dev/null @@ -1,42 +0,0 @@ -{{/* -Return the gitlab-runner registration token secret name -*/}} -{{- define "gitlab.gitlab-runner.registrationToken.secret" -}} -{{- default (printf "%s-gitlab-runner-secret" .Release.Name) .Values.global.runner.registrationToken.secret | quote -}} -{{- end -}} - -{{/* -Override the runner charts secret name containing the tokens so everything matches -*/}} -{{- define "gitlab-runner.secret" -}} -{{ include "gitlab.gitlab-runner.registrationToken.secret" . }} -{{- end -}} - -{{/* -Override the runner charts cache secret name to match minio -*/}} -{{- define "gitlab-runner.cache.secret" -}} -{{- if .Values.runners.cache.secretName -}} -{{ .Values.runners.cache.secretName | quote }} -{{- else if .Values.global.minio.enabled -}} -{{ include "gitlab.minio.credentials.secret" . }} -{{- end -}} -{{- end -}} - -{{/* -Provide our own defaults for our cache config -*/}} -{{- define "gitlab-runner.cache-tpl.s3ServerAddress" -}} -{{ default ( include "gitlab.minio.hostname" . ) .Values.runners.cache.s3ServerAddress | quote }} -{{- end -}} - -{{/* -Override gitlab external URL -*/}} -{{- define "gitlab-runner.gitlabUrl" -}} -{{- if .Values.gitlabUrl -}} -{{- .Values.gitlabUrl -}} -{{- else -}} -{{- template "gitlab.gitlab.url" . -}} -{{- end -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_shell.tpl b/charts/gitlab/gitlab/templates/_shell.tpl deleted file mode 100644 index bd80778d6..000000000 --- a/charts/gitlab/gitlab/templates/_shell.tpl +++ /dev/null @@ -1,35 +0,0 @@ -{{/* -Return the gitlab-shell authToken secret name -*/}} -{{- define "gitlab.gitlab-shell.authToken.secret" -}} -{{- default (printf "%s-gitlab-shell-secret" .Release.Name) .Values.global.shell.authToken.secret | quote -}} -{{- end -}} - -{{/* -Return the gitlab-shell authToken secret key -*/}} -{{- define "gitlab.gitlab-shell.authToken.key" -}} -{{- coalesce .Values.global.shell.authToken.key "secret" | quote -}} -{{- end -}} - -{{/* -Return the gitlab-shell host keys secret name -*/}} -{{- define "gitlab.gitlab-shell.hostKeys.secret" -}} -{{- default (printf "%s-gitlab-shell-host-keys" .Release.Name) .Values.global.shell.hostKeys.secret | quote -}} -{{- end -}} - -{{/* -Return the port to expose via Ingress/URLs - -NOTE: All templates return _strings_, use as: - {{ include "gitlab.shell.port" $ | int }} -*/}} -{{- define "gitlab.shell.port" -}} -{{- if .Values.global.shell.port -}} -{{- if eq 0 ( int .Values.global.shell.port ) -}} -{{- printf "global.shell.port: '%s' is not an integer." .Values.global.shell.port | fail -}} -{{- end -}} -{{- end -}} -{{ default 22 .Values.global.shell.port }} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/_suggested_reviewers.tpl b/charts/gitlab/gitlab/templates/_suggested_reviewers.tpl deleted file mode 100644 index da75e6285..000000000 --- a/charts/gitlab/gitlab/templates/_suggested_reviewers.tpl +++ /dev/null @@ -1,14 +0,0 @@ -{{/* ######### gitlab-suggested-reviewers related templates */}} - -{{/* -Return the gitlab-suggested-reviewers secret -*/}} - -{{- define "gitlab.suggested-reviewers.secret" -}} -{{- default (printf "%s-gitlab-suggested-reviewers" .Release.Name) .Values.global.appConfig.suggested_reviewers.secret | quote -}} -{{- end -}} - -{{- define "gitlab.suggested-reviewers.key" -}} -{{- default "suggested_reviewers_secret" .Values.global.appConfig.suggested_reviewers.key | quote -}} -{{- end -}} - diff --git a/charts/gitlab/gitlab/templates/_workhorse.tpl b/charts/gitlab/gitlab/templates/_workhorse.tpl deleted file mode 100644 index 6596a8d4d..000000000 --- a/charts/gitlab/gitlab/templates/_workhorse.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* ######### gitlab-workhorse related templates */}} - -{{/* -Return the gitlab-workhorse secret -*/}} - -{{- define "gitlab.workhorse.secret" -}} -{{- default (printf "%s-gitlab-workhorse-secret" .Release.Name) .Values.global.workhorse.secret | quote -}} -{{- end -}} - -{{- define "gitlab.workhorse.key" -}} -{{- default "shared_secret" .Values.global.workhorse.key | quote -}} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/application.yaml b/charts/gitlab/gitlab/templates/application.yaml deleted file mode 100644 index b0d18de21..000000000 --- a/charts/gitlab/gitlab/templates/application.yaml +++ /dev/null @@ -1,115 +0,0 @@ -{{- if .Values.global.application.create -}} -apiVersion: app.k8s.io/v1beta1 -kind: Application -metadata: - name: {{ .Release.Name }} - namespace: {{ .Release.Namespace }} - annotations: - kubernetes-engine.cloud.google.com/icon: >- - data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIIAAACCCAYAAACKAxD9AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpMwidZAAAl4klEQVR4Ae1de5AcxXmfnpnde+n0PgFC6Hm6OyTAGPHGmMOYh95yuY4/AjYGCZn4EceO49hJJVxsJxWq4lT5hXm7DCSuQnGSMk5ixw8uDpUQB1VsY0GkEwKDXuhA0r3vdmem8/v1TK927/Y1s7On1em6qndnZ3r68fXX3+/rr7/uNYyZMEOBGQrMUGCGAjMUyKGAyPkV8w/ZZVhGX6dfRmePJ7oNL+YipnV2stswjZ5Ok43c1dIjb99luGdcg1UjJtQ6370JSWZ+BhTIR6t89+IiWFUkAivM0X9kU9uVzph5p2WJk7ZlPrjoX/Yc1c/iasB0zEfT6PCGC5e5jrxPGqK+rt779jnf3/tr/SzudsfOCM8ADijCDm9ov9xNmf8zx7aMhBDG246zx6rvv3Lxs4dHpGHgjoGvmTCRApo2/V1r5w+e9P53vm0v9aQ0TjjOWH2jvLTl+3v3VoMZFP5MrEwlv7uCl920+Mw8MMHJtDvSl3LG5tvWWi89+3Y+7unstCopYzq/q2kzOOh+hEzwdsoZPQ4aLkgk6sfGxSdV2/d0xT6AY2UExc2QBie2LZ8rpbhx0IFuKIx6VN5OeXjqGh9gQ/qg+KgGzXxMokBnT49SCKUnto261K1lEh/1gw5ue+KW3vWtdWLXLpe0nvRyBTdiZQSjq0vlNzJW995ZlnluWkoXAMB71giq7knReWzD2nMJHXE3pAIa1MyrSuSj59/cdOFqzK+uHlGMIEg/c9yVMinE6iaRuEpVuEvRNba6x8sIxi5VMc8zt9rUAsDDQU0F2uHMtq3ZjnRu4j0tAoPnM1+kSTBVNNPyVuhWCQyWNG77I18YTqNpGl5abiGxevS0nD9iCLExAke4wEg/1rV2FqTAzb5Ygx0hKwgk8lyxjbdm4CGLMMHlv/f0qIEDWN2KgUMOyBb/5hjkKO6up33mxp4eJ06pGhsjaFhwBt3rGoR5wbgn2ahT+QvDpKgD9t14eHPbwhl4yGUEwkI3xskJTBmlJ68bRjejo7MHkjnieYZtiDVvDV14hXo7Rng41VG59Yr8y/PElqSpGDnXCgZdIS09F7rDAsM1b/Ab4usUkQubRi9qWBh1jZvn2HYDhoyD5mVLBIJtuskyDeiNm9j0OOEhFkagiFKa7Cdb6yDRbhnDyEel8+QtPAvN8dJiKxuyK9ApeH22B8wWFCzAZrCVE6z8QZpq9iWNDXweJzzk6az8VSh6N5gtHN1vXw3jUesYWoO25MsbswfwumG8/3jXyjkz8OBTNZgteH1b2hdDP3gvaYTxkod+wodXabz70Po171ZvxwQPeQor2uV5H/b09flY4BlbqNkiEBayxZp+z0x70kWa80aHku9VNwMm0gnOxm8NC+lx86Zmy5zNGRZGUr6+IU0dWmulK5VUyCzqVUi4fIWFypKwoEQUNFnoB+up2aK2+ZhA5Yv0Hk3OmD0oeAhV2DRNrGEBgmCbkIISs0iQAoPJAKNsZiIR0+yhYkbQs4XDIx1XQaO9cBSaLRpSLF9LTS2hS3CqWQ0rWREq1twj0gqjxjv6gVWLULnOYXADhlER+vnwAE64/MjmNWtVg2KAhyIFlkmzABZg+thMjRaNmqjtTszI5NSSU0xnwHmP35Czd/YAw5rqA3c0+b5ZpjnfwcwKI6lYv9AcA+OcbXkpuVHRLwbjUrECJ3bgpN+okKBo4gNIq42pErCQlYHLKSYtkFn3zspLbViD1WWrGkYG+7lUkMIhPHin4KHUG6WeV8QIGhaO3NZ2BbDt4jJgQdUHUsMkPABEbn2za0nD2QoP3aADZ05ccsY8631qbaEoLOju9OEBvHDVodva23mXy//6aZTvyhhBzxaktbnZUvUoBQuqjmB5C/Nhr16YK8Rg47Xq5lk4e7ghgIXhQbez0bQWYapQChZ0H1MZd2ZbVkJIcz1vrjywrqK+jPxyDiy4gAWwJwIrWFZAareeU03XUtqvnoKW9fI0SdTZ0qKIBv16KxRtKtnqdznNAzBwIQ/LuP4i1LrduxVEl/NuvjSRGcEINNWDm9rehd5/N2EBoez8CA9qEUXK2+TOdYk4rWT5Glpr97rRfkLiO+tbZwPrbwpLP4w5Ba/A16uPbm5fAXpKGqaitjPyi7u1KEqbGwELlARlwYKuKFjfHPM8aQuz/dibQ1eq+2cRPGhYGPUS19eb1vmEStAgTH+o2cMsy2pwxs3bSL/dz66LrCeEKVj1lf64PBBFkE6baAZDIDOECUzvNmLKmXJ87dfQU9EwuZzhaaEkboHDCVuhRGqY5hAeiMj4Vj4KgIfchb4QmUVihEBDlVhO7oD71BWB70GUvASnnGiPUnjispKFaP9pSYoW+9bYjyyvRy/eDMnIekSgn4YHcd2bm9rOBzt5UeEhQuGnNFQvbW6AbdxGI0LBQhb1TWKjMMQl9HpW92OwkmXlX5OXMCIpEX7oaON1Scyc6IaGioaVqGybwBTchSGvWTjmzaqxgZeTug7xEYkRfhCIIEx2ttBNhiIqRJnZSfmew6mn6wm1xp7RPbJTTbPrzqA90vO2YgpNFii0SFey5RhEID/6AM6uKnFEx+DQjKA9ad5a37oK/X+1DwvKwbJkpQskECkMCOn6jADdI03RWSDtGX+bbSMEvoiZEuh3a3RY8EmB/KxR38p4A9cr6C4YBR5CMwK8TtU7jmevByzUoSJRYUF3qpoGga8v41RU3ZzG8KBhYfGh0athO2jDugtIWBHjw56gPL/mpsfsyPAQgRF6lGZDUUQ9j5qe6rzoHxoehImpKLOZzvDQGdDJc7ytDTSoFfbdCFKW/lLwoHISat+IERiqSr95KkWoTqTIUXsat3UsTw+JVzCK68ELlXK0akKDZVrj0nthyY9fueZU9abXFQjFiaIy/Bx8/sKXMG1cM8nJN1qTJVwABezTx+0Gt33xs/ve1mWVm104iRDAgjsqb4Odm0xQKSzoeip4wJz6iiPrW9fwZqWLKDrjmvoODGaHXui4CiY4MkEcg4hN1PAwXzrWTbyhIYjX5YRwjIAzDpgpYcFvQ8WwoOsYwAPW2F1LwUOliyg641r63n3ggKI3bIhw6VMzyMizhYntIjyQiJjJKXjQ6xgT0xX6XTY0aFg4tHXVBd5wkrDQBK6Ii6NVExotyxqR3vNLf/zK9WFFW6EG1tB91U+sz8FbOn6VlOYlkAhUsyKbhbPbRu8/C+sPrvD6mpOJ9rn//NKJMDQsWyJoB0tvPHlLs22SCeKChaA9vpUMDHYl9/6BahUtomQTqRausTtJ0frwxo51sMZeUsTTO1J1ATImvZuaTKtl0E3fyEzCwEPZjKA9aWDE3EZkK1uUlN8s8ACNS2bScDxlctZT1fKzqN2UeibkwqUv8N2IDRZOtVpISAXMQ3zjUhh4KKs/tYjhTuaxlLcXhdHlGrfj5geaSy1rVHo/xezh/ShAOXaeaugZfUVayzdu7nixwbDWwZAUGyxkqAJ4SAAe0kIeGbfTHav/df+A7rtMmgIXZUkELWK4k3m27fvdI7+ymKhAuQVu6w0c8loeG4MCIi+iFCjgtNzWi3RHN3RcDJXusnJd+kJXVm0rxGDCvpEGLG+r98tc2i+LETQsuC4MFrFNFPI2M4AHqwGuCmqNfTrAQ1fgZew5xkYcDcABFLN+lUNLtW9EYOtczt0SP0oyAkULHSwxv28BE9xYeDtWiZLKfEwqqTV2bPbgK7siLqKUWdzUJAtOQcE66xZuTgFCVEGaZpqithXiUJJbD29e3FiuY3BJRtCw4HrJG5vhdw/doNB2rExNKrkAmVRDoFlfDzeuJcH+yJL1rKTMar6rpt3o+cMbV1+I7e5XKk9l4HgVy1TbCrFvZKl051ynyilj7aZkhTQsYDL3ARgtlOGgio1g1lhjV7OHpjHDuoU3wIwl68l0NRkCa6xMW4AFbFqsLiwoEmAwedw3go31/tI0HExLhaIE1rDwpu93f1P5fvelii3+nHJTCVDqJAgZZiz+Wm0+1Ydj4RQUbkqpMixoGqhthbD+rpfwgioHHooygt7AYg16N8yCoYIHXaCHir+jq1LBN8gFeICPgidueANbxQkP3ZFcuSqoRAyvaljo29DRhsl29uFYMeReNAu9rXDF0b46fxGvBDwU7VR9kAW8ybbxgAtfahetQFwP1eFbsGA2m+Pm+5mp9vqNq4CpyKcngIW0K9ZjK7sNBk+j3GoqitnNUvtGHEdvKywOD/Q3zBtQaXU4Fg+0GD5p3BzAQix28bwFTrjpU0uttBPnnlzU0mfKrq4pK39CdSL9xCKTaoYLa6xj4riAjONApOxCvYSCsV0AZUoDh2+t/RzgIaX61EfdSXkV5E4Sndjy25s6NsF+/eywA1iIaYFkUi3y3IAoxZ4HrLEL2e+Y48tW/eRAf55kNX/rYGfrElckyBEJtgnyoCDN42wMOl15MyZBRBR6/eKf7Hmep7HRlS1fOQUlgk7cONvY0oyquy6m9xKm7KkLKFW6sGTOGZfJTx1a3/5TjKhmyzDzNmTqqlVeSSCXJYUYSCbFtnohElM9kFhLjCNnriUSA4bDbYXP+4dv9fDRpJCXO8G5yAMTxicvaXKHRl+2XjOXulgfxoKpORXzx+xamijRHTLFyd9ihWMq2TC7EhGvuXdp3grXMBuwjUmdLxYxoyivsWcd6VpzLMtb6v7GvK/3XehTupGovp2YZX6JsIsHV+xynfHRa+1FYAKsbxovgwlOQ0comKv3vHEcG4TT2IizZfEi6aDEY/A9seH5fhd7Rz/je/muJ90DE9jw4ZJJT4AJiirl+epS8T02XsI/YQnG7zxxUfqhNuwb2fcLHGTHukySqkUrKCyxxcCQNHAyorEMr48jssVTGUBQyzbMulk8o8mAuFXsSJYsGkEH9Vx/l0rP5zqt/s5+J/tevuuce6gj65psNuCJaZgYhVMb2EcpxJXorXmYqSQtw6oz/NNVWjrz9uAkRlCi43ac/t29NikseauRRk+Qo5cg44VBAXmzwrMqBE3D+mZ9VYVC4s6SVQWN6medhjprJjgXdTgPEcikjkC3fEbAXru8R/dOYoRAdBjOktTVZsJc7eKIdWTnn+qyCleNKvMpkwwKClCDZIPEEIO0A1/WeiDFCAusM+vLNkxJYDlc12xGXJEp0fTGsTFOGOtSj6y+VN19RsFDJgEvJjOCFh0mYKEej3EWA9JBzcBnHeJqRIapZHYSNoHiMcIUI0wVYf2WhvtE3eBAatShMwBp0LjDvV5RavYRAZF9BHqpPkPfoQ6ONQvKtl0YHnIYAS+IQHRwfrAeLmPIjUIu+CRLzEGkZJhCGxmJyVGl4GEqCYtmhg6sH+raMNWwwF5i/7Qizgqu/Z7DD8gDmOyF6W8rzAcPOYyQgYWHWq+0E2KNO66ofioNM6boOQfxfEQqJJnCcF2loOGhrrH24YFMa0NyKljA9ZTAAvuAfXEBYgviJLcXoeABausV44+0rkUKbBzJRYNTncyHGhaS5majQT2alCWTKVhYhu+5iPlTMFWsQREY4i5Zy/CADvFhAQxL0azGUaxkmJwZmYDSmYo8GYFSYfLg9OEBDqGmJfyje3VfIzlDhhEU80KjDO5uhDGCl3myxF2NRRRD/MchhSD4rmI4Y+ABFNMzHNa5qoG9w45vQFyJyN8FywQ8oJ9gElCHl+Fod76ZCRlG0KIi9dDKyzH3vcSFpolw6nnmFVzoCnAGQWaYAkbQ8IC/vKvZ2QMVWcJCHWcLamRlE60K17rTqRzyL9TYD+ybvEGYkn1qGleNfWNlG5JJ+YxSLVXqTEfvPuGf0ycS9iazUd0uLvRZIFPMR1yGOAXKo4IHSKBkUw3OHkhZjDFCF2cLhUcmnsURSH/SfCUiFfjivYUEvueX1WQmE42W7xgc9Dkfqh4n817+0d3M1p9i+EKDRRUPTMG05yPySOkqK49K1KLMWp49KCMS6lhVWCDdSevFiDQcsQ94r1TAn0FQakiaBhh2njqb0ZcIgQYpH+64GBle5qYoYwrAAp9kBy2eVuBmE2Jpzsx+O9S10sBRHmcP5ql5cqg8qpWYsECDF+tWVVhgh5PGlAKUxKS/7gNcFg+AB/atkNeMfqtjOeiZ2VboM0IgIhzb2wjRwXvldycrRr6h0kis4ttlVwxpQ4YMPIDgsOeXNxJClhE6OWigYYGGr2q2X9Ga0EPdjN/haIAFMKxINlmNyTrvFrwNM7R/NqPPCIGIwDLvJiVmYHtQicr9YGqKp9mIKxGrCBFqtKHWCh5IhBoKqk5kimoNBNKZQ5QGPUrfciEBSScGTxj+Bpid/tmMJjVHJSIe6WjDaL7SCwML2bnrStLYtASxSiuVGXiAwqjgoVpEz25biWvCAutCWKA0UHUs8U7ox6QvaboMkTaD8mU2EmcHYRqYPWDQv2f46+2LUVe1rdA0AliAP80GwAL/fTRyEUqOcJSysvMQqzST4IhLYJqWIDxUMCqyyRP5mhIAdeA6iA14rIo0IBNQypIBOMjCwQFeyAkC/5DgWg3mbExzb1ZPbuiEPnDEFw2e5W1VBYSFhZwy8AOdpGanxDDqDVXoqJqDB7SZsEBJEDsjkAlIQxqNCAn8TRpXErhPifnYwQaYvh5MJxDkg20r3SbjZYgL/m8ji1H3+SxSYA5UZI4j7gmu8RVnINFTY4ZxbD9W1SqrbUXV0ky5qNU1EtWSCGSEixGpg8UzsKRlwjHYlSdG33I7mv/w1WNKWfTqjPXWrFjOTPSJyo4hwNDYtAKxCsojO4DwkDyd8IB2Uj+ggYuzhapIA8IrJQGni/EwATLC4Vs4nwHwMK9hnr9vRDGCpIgg7tDgEFdgTqy4NnrEzAx6JNbPBkew7qcroGwFC6BkrIxA+pFmmn7xMYFPKeXljkvbP3zLlH/dRhXkMoMH32LF2k8V0yezZFiBOGmNXD2J/KHgAPnXYTQC0tALkbOK/iLK5GyhHnVg+bFBFJmAEpWru8sRq8Ho3LroH3Z8pexeDhekBncuNIJGGBpQYsyBDWIjQKxqGJs4ApPB7IEiukLNBhmECGgbZywKFuLWDTTNqHBXj8mpMmLoi/qTy+iLZo8exo13TJ5WVI1xxWwp1uhHR6yLPjnFy7lBwQMIRXjgFG7KAzqsKrBARliNWE3/UE4KKP8948Tcu18fMMVHD4/Ajen7BlccpZr5x09PMgMZgAtTSxDj0heYL7iaonnK4QHl8p8qCE2sQyywwPZQOVyGSEU7xkGD3CaGtO+TKnehWE/pBNYx9wvuSWc/HBwhaFU3oWkxBzaSo3YpIhsZg7FJ8QFqmsBafCLwGEbO1Q+kHNqSABNw5hKLksjGkCYcLOcjkla8F39g36at2Vadd9Ldbb6e/BKL8E3Mnz/Qb70trnEH3OfADEm/AlUQtqwCWY8QQUeKGBrLTuBptnUw6EypnhAnLLDDSQtCwQpEBtIq/uBAcgksOiWck84PzNcTnaJ7T0p2q2MMUSbXG25XVTHcb7fdb9YLPELdUpJCnPbB+AIbSGPTCUQam9CJFQXkx7nO2LAw3n4V2y8qza/MypABaURKgqFjkQiky0WI1KViGCB5mpGy6swkvZTclPHZxPZ9X2Ea3fcZ4aPclrpwhBV0yfSjrZ1m0nzKnG0tcYdcIhXHMWM8QTPDIWS3H5GAxHsVBEqDYzjz2hkDy8dX08k1AsUoKwkLi1ZQq6swsAc43NoQ6WQSt16A5RjubLBm2ZY74Oz3RsQdyd/d9wtKAZRmYMirRmRIpiQCG/lcp524d3/PwPHUxW6/8z2IERsrEkzHKsYT2HhyPbdkMVaoPCp4gJShBj8V8MAyYpktkA5cUaROwFXb+CVB2sIfa1o47dw96X7H+uXoJYoJHl6XIANoJkDJ+dURMgM3QTBB6vG2j8No8jWYI013zEvjFgU7m1BZoATQ7EWIGEZkzhEkg9YTxoaE0Qd4UP87FyEflF5WICO0ABbqsBAUGRZIQVKTpuM1iKQFx2bllEUmioqO1Wgm3CFvDOXcZ+/Y9x31oBt92+33LX/rULDYbNGRegh/+1svn7bn2BcBKlhdkrlyNNa5DCG33wS5FqwRnpcIPjxYhoNRFst0Lk95LIPL3y2AhchlsI0c/WR8LiZxZTE+aeCCmUxIcgHl/7+dUedD9fcd6FXQ/zK2PAVQgBJzQlGyo5+E8VynpbZIdRq2e1fbV+Gz8DFun8KZCeTnRE5uUX6QGUiQY4j/h0jVlPdCBi0VThwxjaG3QAnWLEI+RYsFtSgTZ5/nGXPO8X0hIjMD5S0lwQLE+PSCNP4/Hv8eh3qOygese/Z9nu3JlvD8nS9kdIR8D9FuHLqLbdQUJz2GY9+97+Nuv/tBzCZOACpIajahMnKTFZlLC+JSRGJmUfbE8yJBexEXSRL9EVpKRZT6AUOkavIl6kTLEeNjAp7H4kPBuDxijLi3ZpiAM0K9cQlFFgpFGUG/REwhVJAh7Ht7/8E6bq11hryfAIO0vkDBFj2QOAScCxC5BEZZE5LKHJkU29xzqE4qYX4xBw0LyojE/EPWUaUnE+i9o7HAAf4xk1BQb9rugPdP1uGxtWL7/n+jFICUFNosUIoUYZtiSGqcwR6I9ONtfwzz01+IBDbbpiuECg4ysiUJ9VLwTS0khLzJwMNhwMOxmOEBlCIsNAMW5kaBBVKako9GI9oLOISiMBNeU4FLRtzunhQJ7EpzUbdPJ7f3fp3PsvvIT1z6MzQjqIK4VUrbHB5Zda2os56GY8sKdxQH0ftLGWVJmknVY6ez83mQHpXHkOqoZoTRARiXXot/9kCJsHCVp9Y2aGIOrR+wfVQOK12SV7YBQ0Jfs7xBd487CtvAfft+RakNvaNsKYCaZEKkDsvYHCAdEjtf/c9jrw1d5A5636V4qsjmQLakuOQ6/ErEkBCh4AHEVvDANYAY4YF52YCdJA/IwnUoJmC72JZWxMoth75toN603H7vUfOu3neRCfY8g6OOumEbCCzEKClUiCQRskvIFkPO4233Yh7xIBRJGzYHnvSZjFwAWXQ/4hHEEDMJLRWOHzKN4b6Y4AGNULBwrjTmnuupBaeyGYEEINxR/1mOGF0voDxJg7ZJd9gdQZ47oK99F/fKmhUwXbEQSSJkZ0h9gSKJ81R7+75HobBc6o14v7aagV5+s9n0cIFNZlyOSIdNYisJGiIozT7kOwWzR13UbCHsKSgsn5KArv1LESmhotWJNJSkqTPkvmANmBeRCZRCCNqXMyvA+0VDtGoVyFJLB9DNch9v+5o1GzYHnLMQyeZARqCOMIJI5TEMEdEqaCvKw5krJWWPXhSTL1DK2HVYW1iJWVq5Q4eUZfdxkk29AFAVqg1IHoQUbANYEcZOlBHvAevuwDaQpbTrhJV8x8oIrIhezeK18/jqDxq2+LbVbDa7wxSuSlcuv0wyA7XrtxFfQSzTSMTX6HD1zkHTGDkOeGAevBklIB/WfNYiacxbHBIWyAg8qIYSIbxUI+u7cAtIeAPuMZy7/2Gxc/+PcC+HxvwdRyiXv8sui8oKRpBQNoftvd+z+r01UCR/xgYhEx5JTZKUF8gyTE3bAkUrsbYcNkKnUwpoww/eih7IQGHzYh3J9isQozGBA0ammTgBh6FnzT5jLZkgrG0ApZcdWOWqhWzTpvvE6j8x68wvc4TDMkkykTHChb1I/g5iGZKBjOCglGOvWgom+DtKICxYScACpo10gCkpWVgOGZZLypwlhJNETO1g9pXAVFxC3f50ckfvV3EvFoWQ+RQKEclTKLvJ99Vix+2Y1qAt6W+1X2c2yCfh57ASmi8FJ8svLZVIHqYigWlfoBm6jE5h57/zJuDhRER4wPuEhaYWacw/vwxYYGsowbhTmZBASCpft1H0gBQwnQFnj50y7hQ7e38poQwiF0N0q5x4WZXAqlc9oB9PLV51L250lzU9Aqi4w8AEE39qQdKRZMUDmYGp+hHJDCXYR41kMMvQSWEcfx3GpTKkCHKdFGg4WoCVxkZ4Spc0IrGOpCiVw3Db1h34DdhYFTCwuvuwdU/vJ5CNQ+Xb+OhuB9fMuaphShhBtyAbKpzHWu8xEuY3sV5RX7afg2YG2hZ6EUvYFzLwgP2RJTtRVzLrWzETGGjRKhxoTCYs1h2kJKSH0Y5IB1Syd2nqMkeHC3iYEfTLtNhpb9/7DO4ZaqEvj98An1UjlBhX8Rbpr2Qa5jO0OezY/4QzLC51R7wXqRShJBKF4rFwIGGZgvi7GLGE8siO5J7ESGczoiy93T1TOxSZN7BehKsLELmKWh4T0G/AYNuxgPfz1AnnEjKBfKbLIhzkcx5BzlULbMJpCdrmwMLdJ9r+xmwUnyYrlLQ5kF3IvmQITikJFZqNcJkdNDwMQkc48duQ8ADK0BaxYDlgYU4RWCAFKQnoot+RXXrRa99vAPoDDsz+knV3758xdTZNir5dhYdTKhGy6+9bJDuVboC1888YQ+4WzCaO070K6UhadvnkQMJTAeObrYhMzd95AqGBzKAP3wqz9sC0PByLu62ZR95ZB+tChqRr/ipE/s5fazxQgU99v4ExedgZNm7KMAEkgV7VDdJO6ddpYwS2Uvk50OZAH8kd+58deyu1Fu5VP1ZQQaIW2simO4BLuqsR2RkqPb4nBAUP7NAwR/ciLw0LdjHdgN3KyDqUthz6ewrgw0G/gcHXU2sT9+79GaUA6ogVw11sxWkLBcg39fXJFouAii+YdeIvOeqL2hzYCeyoNxBfQ2Rn8F5WICNw/j/4jjBOYipZ1uwBVOG0cT5goWluAVgg5agXkAmorxTRC5A0BRtK0hmFLcI1PgkJ+A28cVqhgOVnh5phBFZK2RwCPwf5UOs1XoP5t7A5rIDNobSfA41NNEXnmUlQrKfRaTxdpZygmYcbWPIegEGqUVEtZTTSfgOzLMvpd1+WY8bvcMmYynJXEUfScuoYd5qaYgQ2DgNYGA+vs30dIrA5zIbNYQw7dDylO1ArOBUoAQhw1Cq4OMVRyv6eIBlwx3gbCuMYnFaKTgVBEUqDhvnSWHgB/vlkYj6kGEc/7QT0NGJZ1FEmUzJt4a/2DHpvDSrbwMeRxM2WfHirZsJp1RHyUQHEklqRFN2HR+y7e+9Mn3C2QyakAofZXEWSHcCOoCSgmGaY0HnsTLWMTKfTAoql/+KpT72MPYkR+D47n2URliYzAUtPqz0FaTno9svb7Xt671NMQCfgwM0PaWoqkIw1GyTm09r1auzB9na7ST6NXbyX591bQfKzY44i7kOcABGEh3IO39JMk/dwLFKLbMhpYj57ARfU4DsLq6nh9Ds/Bxx8qOFTB96gcci4v4dOpqxlTYaaZgRNsWxxik26X8Hp8Z+hzJ7kMEsyc7QeQDyEOIEZcMfog7l5fLAAPIAatB00QEFcsBRDPbvbSCnqBcuCOFk5TNORlDMYb0x+EQrh/UhZUwoh61MonBGMwMrn+Dk81rpZJM0nzFnmQvg5sEsIcf6/1LJF7EAam04iUqPAb450zh4G4L7WDz8FMw+TEOc9dPa8ZZ4xCzpCxizNPCkJFiDShJwbuKfAw/5CG46kB72UuIvTQibJrnPuK7X3q+Z0hEIkyvFzgM3BHOQmXfdHsDngb7DBBBTLmgkoFVYhZs3t+YgMwQ0wWN5R17yVEyAEyCA5p6DwRc7w8x946dBZV/loDjjfM7FxWNkGQu4pyKnDafqh6HOayo5cbC5UtP+RsOVfCXhIZmwOlAjsbB74+TIiGSMr9MHVPYUNszkMAUpQttTDnLyQsJAdmB+Xlblh1Zc//p4C5TfguiItPmVt3/dNvpK9sMbfZ0o4IxmBxM2xOTzaerWXFE+ZzVYroMK3M3J/BZnhIOIBRIx0mo0JD/3Y/DIAL+cceCAjABbmggmaFwSwQHlJvYAzhPMQyQRIRskDSQS/AfclnDdwZ93H9v5aKbZ4KLrLnZeovGrm44xlBFIQAzXL5rC83l2afBj+kR82cMI8bA7sNlvBRS+u3kIEM7DB46PYPr8faJIHGNVsAZBCIaCYYDG+CTO+kHBgG4DfAH6OyG+ad+/7PfJPtoTia2diOKMZQRM8Wxw7j7V9yEjIh6C8NcLdK41Os6HoCeXMQo9oSAlKBsJDeoQHCvm5EBbq4HzSAkVRcQuVQ7rSExKohnJ7GfwGIHFOwGi13d657x/55lT7DbDMaoQ8Y6IaxVQ3T+3n8Bw36e7Y9xT9/mGWfkE5zLrowiTUPYp3tFbDAw1GOceFof95T0kJggtnG3zHQiqIB/6FAQ6d+Kk1lFpDJiDzYSYiptpvADWqSpgWEiGbMtliOv3E6gfsRvNz7Ei4VqcBDwkDaxICoj9z+FYwFDi9VIdj8RQU6gUXIi6EhdAUvm1g1PtTa0fvl1lWdhn8PR3CtGMEdgq9fPSybvqx9tvwdyRPwubQQpc4+Rp2WhzE0jdG/DHoCc44SAAm4FG6LdjAotYqlkMjWAbbQL1lu4POm1ZK3CHu3fcflAD82+So+wtrmWGmBTRMJDCZgJ3GkZvYsfeHZr8HPwfvh9AbEmIZOnMu8J5QgKki4YFwwWssERtyoeGYSzG5IBMMOH9vvSYvUkxAR1LwzHRkAtJvWkqEbMZ4ER2o/9PSfWz15+AS9wAPnJUveqnRfpHkiiT1gpalrkzONdLmFdhk6nhSjHufsHbsf5B5ZSuj2XlPp+tpzwiqI7uhJt6PVU2eIfmN1mvEXPNpy8Xeiv9ynaOv4ThyMMI5KzxpXQu/Aen8xh407xC0DdAW8ecYLd1npm1gOjFqbG2BGqBc4hRjfPacJufptiflgx3yna0dsr+rQ8qHOqTz1OoHpQEIQKAUiK3wmYxqjwJqSTiolny67a7h328bG/6Dtn75d9iwq+9D2dTXM9/TmAI0B2uT8PgXW9eOfWklLQbKbN1NGJkJZxcFcqQDnUdmwtlLgWzpcPZSYablMxSYocAMBWYoMEOBGQrMUCA/Bf4fxb0WudyD/+kAAAAASUVORK5CYII= - marketplace.cloud.google.com/deploy-info: '{partner_id: "gitlab-public", product_id: "gitlab", partner_name: "GitLab"}' - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -spec: - descriptor: - type: GitLab - version: {{ .Chart.AppVersion }} - description: |- - GitLab is a single application for the complete DevOps lifecycle from project planning and source code management to CI/CD and monitoring. - - # Support - Contact [support for GitLab](https://about.gitlab.com/support/). - maintainers: - - name: GitLab - url: https://about.gitlab.com - links: - {{- toYaml .Values.global.application.links | nindent 6 }} - notes: |- - {{ if not .Values.global.hosts.externalIP -}} - # Setting up DNS - - Retrieve the IP address GitLab is available at, note it may take a few minutes for the IP address to populate: - - ``` - kubectl get \ - --namespace {{ .Release.Namespace }} \ - ing {{ .Release.Name }}-webservice \ - -o jsonpath='{.status.loadBalancer.ingress[0].ip}' - ``` - - Then configure a DNS record for `*.{{ .Values.global.hosts.domain }}`, resolving to the IP address you retrieved above. - - {{ end -}} - # Signing in - - Browse to https://gitlab.{{ .Values.global.hosts.domain }} - - {{ if not .Values.gitlab.migrations.initialRootPassword.secret -}} - - GitLab is provisioned with a randomly generated administrator password. To retrieve it: - - ``` - kubectl get secret {{ .Release.Name }}-gitlab-initial-root-password -ojsonpath='{.data.password}' | base64 --decode ; echo - ``` - - {{ end -}} - - {{- if not ( or .Values.global.ingress.configureCertmanager .Values.global.ingress.tls.secretName ) -}} - # Configuring a valid TLS certificate - - GitLab was configured to utilize self-signed certificates. To utilize your own certificate: - - ``` - kubectl create secret tls {{ .Release.Name }}-wildcard-tls --cert= --key= --dry-run -o json | kubectl apply -f - - ``` - - {{ end -}} - - # Using GitLab - - More information on using GitLab is available in our [documentation](https://docs.gitlab.com/ee/README.html). - icons: - - src: data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjEwcHgiIGhlaWdodD0iMTk0cHgiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDIxMCAxOTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMTA1LjA2IDE5My42NiAzOC42NC0xMTguOTJoLTc3LjI4bDM4LjY0IDExOC45MnoiIGZpbGw9IiNFMjQzMjkiLz48cGF0aCBkPSJtMTA1LjA2IDE5My42NS0zOC42NC0xMTguOTJoLTU0LjE1M2w5Mi43OTMgMTE4LjkyeiIgZmlsbD0iI0ZDNkQyNiIvPjxwYXRoIGQ9Im0xMi4yNjggNzQuNzM0LTExLjc0MiAzNi4xMzljLTEuMDcxIDMuMjk2IDAuMTAyIDYuOTA3IDIuOTA2IDguOTQ0bDEwMS42MyA3My44MzgtOTIuNzkzLTExOC45MnoiIGZpbGw9IiNGQ0EzMjYiLz48cGF0aCBkPSJtMTIuMjY4IDc0LjczNGg1NC4xNTNsLTIzLjI3My03MS42MjVjLTEuMTk3LTMuNjg2LTYuNDExLTMuNjg1LTcuNjA4IDBsLTIzLjI3MiA3MS42MjV6IiBmaWxsPSIjRTI0MzI5Ii8+PHBhdGggZD0ibTEwNS4wNiAxOTMuNjUgMzguNjQtMTE4LjkyaDU0LjE1M2wtOTIuNzkzIDExOC45MnoiIGZpbGw9IiNGQzZEMjYiLz48cGF0aCBkPSJtMTk3Ljg1IDc0LjczNCAxMS43NDIgMzYuMTM5YzEuMDcxIDMuMjk2LTAuMTAyIDYuOTA3LTIuOTA2IDguOTQ0bC0xMDEuNjMgNzMuODM4IDkyLjc5My0xMTguOTJ6IiBmaWxsPSIjRkNBMzI2Ii8+PHBhdGggZD0ibTE5Ny44NSA3NC43MzRoLTU0LjE1M2wyMy4yNzMtNzEuNjI1YzEuMTk3LTMuNjg2IDYuNDExLTMuNjg1IDcuNjA4IDBsMjMuMjcyIDcxLjYyNXoiIGZpbGw9IiNFMjQzMjkiLz48L2c+PC9zdmc+Cg== - type: image/svg+xml - selector: - matchLabels: - app.kubernetes.io/name: {{ .Release.Name }} - componentKinds: - - group: core - kind: ConfigMap - - group: core - kind: Service - - group: core - kind: ServiceAccount - - group: rbac.authorization.k8s.io - kind: Role - - group: rbac.authorization.k8s.io - kind: RoleBinding -{{- if eq .Values.global.application.allowClusterRoles true }} - - group: rbac.authorization.k8s.io - kind: ClusterRole - - group: rbac.authorization.k8s.io - kind: ClusterRoleBinding -{{- end }} - - group: batch - kind: Job - - group: core - kind: Secret - - group: extensions - kind: Ingress - - group: core - kind: PersistentVolumeClaim - - group: apps - kind: Deployment -{{- if eq (index .Values "nginx-ingress" "controller" "kind") "DaemonSet" }} - - group: apps - kind: DaemonSet -{{- end }} - - group: autoscaling - kind: HorizontalPodAutoscaler - - group: apps - kind: StatefulSet - - group: policy - kind: PodDisruptionBudget -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/chart-info.yaml b/charts/gitlab/gitlab/templates/chart-info.yaml deleted file mode 100644 index 835e1a500..000000000 --- a/charts/gitlab/gitlab/templates/chart-info.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }}-chart-info - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - gitlabVersion: "{{ coalesce .Values.global.gitlabVersion .Chart.AppVersion }}" - gitlabChartVersion: "{{ .Chart.Version }}" diff --git a/charts/gitlab/gitlab/templates/initdb-configmap.yaml b/charts/gitlab/gitlab/templates/initdb-configmap.yaml deleted file mode 100644 index fa65d5d49..000000000 --- a/charts/gitlab/gitlab/templates/initdb-configmap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.postgresql.install -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "gitlab.psql.initdbscripts" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} -data: - init_revision.sh: | - {{- $initRevision := index .Values.postgresql.primary.podAnnotations "postgresql.gitlab/init-revision" }} - if [[ ! -f "$POSTGRESQL_VOLUME_DIR/.gitlab_{{ $initRevision }}_scripts_initialized" ]] ; then - rm -f "$POSTGRESQL_VOLUME_DIR/.user_scripts_initialized" - touch "$POSTGRESQL_VOLUME_DIR/.gitlab_{{ $initRevision }}_scripts_initialized" - fi - enable_extensions.sh: | - [[ -n "${POSTGRES_POSTGRES_PASSWORD_FILE:-}" ]] && POSTGRES_POSTGRES_PASSWORD=$(cat ${POSTGRES_POSTGRES_PASSWORD_FILE}) - PGPASSWORD=${POSTGRES_POSTGRES_PASSWORD} psql -d {{ template "gitlab.psql.database" .}} -U postgres -c 'CREATE EXTENSION IF NOT EXISTS pg_trgm; CREATE EXTENSION IF NOT EXISTS btree_gist;' -# Leave this here - This line denotes end of block to the parser. -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/shared-secrets/_generate_secrets.sh.tpl b/charts/gitlab/gitlab/templates/shared-secrets/_generate_secrets.sh.tpl deleted file mode 100644 index bee74458e..000000000 --- a/charts/gitlab/gitlab/templates/shared-secrets/_generate_secrets.sh.tpl +++ /dev/null @@ -1,217 +0,0 @@ -# vim: set filetype=sh: - -namespace={{ .Release.Namespace }} -release={{ .Release.Name }} -env={{ index .Values "shared-secrets" "env" }} - -pushd $(mktemp -d) - -# Args pattern, length -function gen_random(){ - head -c 4096 /dev/urandom | LC_CTYPE=C tr -cd $1 | head -c $2 -} - -# Args: yaml file, search path -function fetch_rails_value(){ - local value=$(yq ".${2}" $1) - - # Don't return null values - if [ "${value}" != "null" ]; then echo "${value}"; fi -} - -# Args: secretname -function label_secret(){ - local secret_name=$1 -{{ if not .Values.global.application.create -}} - # Remove application labels if they exist - kubectl --namespace=$namespace label \ - secret $secret_name $(echo '{{ include "gitlab.application.labels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }}' | sed -E 's/=[^ ]*/-/g') -{{ end }} - kubectl --namespace=$namespace label \ - --overwrite \ - secret $secret_name {{ include "gitlab.standardLabels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }} {{ include "gitlab.commonLabels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }} -} - -# Args: secretname, args -function generate_secret_if_needed(){ - local secret_args=( "${@:2}") - local secret_name=$1 - - if ! $(kubectl --namespace=$namespace get secret $secret_name > /dev/null 2>&1); then - kubectl --namespace=$namespace create secret generic $secret_name ${secret_args[@]} - else - echo "secret \"$secret_name\" already exists." - - for arg in "${secret_args[@]}"; do - local from=$(echo -n ${arg} | cut -d '=' -f1) - - if [ -z "${from##*literal*}" ]; then - local key=$(echo -n ${arg} | cut -d '=' -f2) - local desiredValue=$(echo -n ${arg} | cut -d '=' -f3-) - local flags="--namespace=$namespace --allow-missing-template-keys=false" - - if ! $(kubectl $flags get secret $secret_name -ojsonpath="{.data.${key}}" > /dev/null 2>&1); then - echo "key \"${key}\" does not exist. patching it in." - - if [ "${desiredValue}" != "" ]; then - desiredValue=$(echo -n "${desiredValue}" | base64 -w 0) - fi - - kubectl --namespace=$namespace patch secret ${secret_name} -p "{\"data\":{\"$key\":\"${desiredValue}\"}}" - fi - fi - done - fi - - label_secret $secret_name -} - -# Initial root password -generate_secret_if_needed {{ template "gitlab.migrations.initialRootPassword.secret" . }} --from-literal={{ template "gitlab.migrations.initialRootPassword.key" . }}=$(gen_random 'a-zA-Z0-9' 64) - -{{/* -The include in this if returns a value that makes use of -"gitlab.redis.configMerge" to return global.redis.password.enabled -with a fallback to global.redis.auth.enabled - it is evaluated for truthiness, based -on emptiness of the returned string. - -This should be read as: - -"if there's not a defined global.redis.host and we've enabled redis password -auth, then generate secrets if needed" -*/}} -{{ if and (not .Values.global.redis.host) (include "gitlab.redis.password.enabled" $) -}} -# Redis password -generate_secret_if_needed {{ template "gitlab.redis.password.secret" . }} --from-literal={{ template "gitlab.redis.password.key" . }}=$(gen_random 'a-zA-Z0-9' 64) -{{ end }} - -{{ if not .Values.global.psql.host -}} -# Postgres password -generate_secret_if_needed {{ template "gitlab.psql.password.secret" . }} --from-literal={{ include "gitlab.psql.password.key" . }}=$(gen_random 'a-zA-Z0-9' 64) --from-literal=postgresql-postgres-password=$(gen_random 'a-zA-Z0-9' 64) -{{ end }} - -# Gitlab shell -generate_secret_if_needed {{ template "gitlab.gitlab-shell.authToken.secret" . }} --from-literal={{ template "gitlab.gitlab-shell.authToken.key" . }}=$(gen_random 'a-zA-Z0-9' 64) - -# Gitaly secret -generate_secret_if_needed {{ template "gitlab.gitaly.authToken.secret" . }} --from-literal={{ template "gitlab.gitaly.authToken.key" . }}=$(gen_random 'a-zA-Z0-9' 64) - -{{ if .Values.global.minio.enabled -}} -# Minio secret -generate_secret_if_needed {{ template "gitlab.minio.credentials.secret" . }} --from-literal=accesskey=$(gen_random 'a-zA-Z0-9' 64) --from-literal=secretkey=$(gen_random 'a-zA-Z0-9' 64) -{{ end }} - -# Gitlab runner secret -generate_secret_if_needed {{ template "gitlab.gitlab-runner.registrationToken.secret" . }} --from-literal=runner-registration-token=$(gen_random 'a-zA-Z0-9' 64) --from-literal=runner-token="" - -# GitLab Pages API secret -{{ if or (eq $.Values.global.pages.enabled true) (not (empty $.Values.global.pages.host)) }} -generate_secret_if_needed {{ template "gitlab.pages.apiSecret.secret" . }} --from-literal={{ template "gitlab.pages.apiSecret.key" . }}=$(gen_random 'a-zA-Z0-9' 32 | base64) -{{ end }} - -# GitLab Pages auth secret for hashing cookie store when using access control -{{ if and (eq $.Values.global.pages.enabled true) (eq $.Values.global.pages.accessControl true) }} -generate_secret_if_needed {{ template "gitlab.pages.authSecret.secret" . }} --from-literal={{ template "gitlab.pages.authSecret.key" . }}=$(gen_random 'a-zA-Z0-9' 64 | base64 -w 0) -{{ end }} - -# GitLab Pages OAuth secret -{{ if and (eq $.Values.global.pages.enabled true) (eq $.Values.global.pages.accessControl true) }} -generate_secret_if_needed {{ template "oauth.gitlab-pages.secret" . }} --from-literal={{ template "oauth.gitlab-pages.appIdKey" . }}=$(gen_random 'a-zA-Z0-9' 64) --from-literal={{ template "oauth.gitlab-pages.appSecretKey" . }}=$(gen_random 'a-zA-Z0-9' 64) -{{ end }} - -{{ if .Values.global.kas.enabled -}} -# Gitlab-kas secret -generate_secret_if_needed {{ template "gitlab.kas.secret" . }} --from-literal={{ template "gitlab.kas.key" . }}=$(gen_random 'a-zA-Z0-9' 32 | base64) - -# Gitlab-kas private API secret -generate_secret_if_needed {{ template "gitlab.kas.privateApi.secret" . }} --from-literal={{ template "gitlab.kas.privateApi.key" . }}=$(gen_random 'a-zA-Z0-9' 32 | base64) -{{ end }} - -# Gitlab-suggested-reviewers secret -generate_secret_if_needed {{ template "gitlab.suggested-reviewers.secret" . }} --from-literal={{ template "gitlab.suggested-reviewers.key" . }}=$(gen_random 'a-zA-Z0-9' 32 | base64) - -{{ if .Values.global.appConfig.incomingEmail.enabled -}} -# Gitlab-mailroom incomingEmail webhook secret -generate_secret_if_needed {{ template "gitlab.appConfig.incomingEmail.authToken.secret" . }} --from-literal={{ template "gitlab.appConfig.incomingEmail.authToken.key" . }}=$(gen_random 'a-zA-Z0-9' 32 | base64) -{{ end }} - -{{ if .Values.global.appConfig.serviceDeskEmail.enabled -}} -# Gitlab-mailroom serviceDeskEmail webhook secret -generate_secret_if_needed {{ template "gitlab.appConfig.serviceDeskEmail.authToken.secret" . }} --from-literal={{ template "gitlab.appConfig.serviceDeskEmail.authToken.key" . }}=$(gen_random 'a-zA-Z0-9' 32 | base64) -{{ end }} - -# Registry certificates -mkdir -p certs -openssl req -new -newkey rsa:4096 -subj "/CN={{ coalesce .Values.registry.tokenIssuer (dig "registry" "tokenIssuer" "gitlab-issuer" .Values.global ) }}" -nodes -x509 -keyout certs/registry-example-com.key -out certs/registry-example-com.crt -days 3650 -generate_secret_if_needed {{ template "gitlab.registry.certificate.secret" . }} --from-file=registry-auth.key=certs/registry-example-com.key --from-file=registry-auth.crt=certs/registry-example-com.crt - -# config/secrets.yaml -if [ -n "$env" ]; then - rails_secret={{ template "gitlab.rails-secrets.secret" . }} - - # Fetch the values from the existing secret if it exists - if $(kubectl --namespace=$namespace get secret $rails_secret > /dev/null 2>&1); then - kubectl --namespace=$namespace get secret $rails_secret -o jsonpath="{.data.secrets\.yml}" | base64 --decode > secrets.yml - secret_key_base=$(fetch_rails_value secrets.yml "${env}.secret_key_base") - otp_key_base=$(fetch_rails_value secrets.yml "${env}.otp_key_base") - db_key_base=$(fetch_rails_value secrets.yml "${env}.db_key_base") - openid_connect_signing_key=$(fetch_rails_value secrets.yml "${env}.openid_connect_signing_key") - ci_jwt_signing_key=$(fetch_rails_value secrets.yml "${env}.ci_jwt_signing_key") - encrypted_settings_key_base=$(fetch_rails_value secrets.yml "${env}.encrypted_settings_key_base") - fi; - - # Generate defaults for any unset secrets - secret_key_base="${secret_key_base:-$(gen_random 'a-f0-9' 128)}" # equavilent to secureRandom.hex(64) - otp_key_base="${otp_key_base:-$(gen_random 'a-f0-9' 128)}" # equavilent to secureRandom.hex(64) - db_key_base="${db_key_base:-$(gen_random 'a-f0-9' 128)}" # equavilent to secureRandom.hex(64) - openid_connect_signing_key="${openid_connect_signing_key:-$(openssl genrsa 2048)}" - ci_jwt_signing_key="${ci_jwt_signing_key:-$(openssl genrsa 2048)}" - encrypted_settings_key_base="${encrypted_settings_key_base:-$(gen_random 'a-f0-9' 128)}" # equavilent to secureRandom.hex(64) - - # Update the existing secret - cat << EOF > rails-secrets.yml -apiVersion: v1 -kind: Secret -metadata: - name: $rails_secret -type: Opaque -stringData: - secrets.yml: |- - $env: - secret_key_base: $secret_key_base - otp_key_base: $otp_key_base - db_key_base: $db_key_base - encrypted_settings_key_base: $encrypted_settings_key_base - openid_connect_signing_key: | -$(echo "${openid_connect_signing_key}" | awk '{print " " $0}') - ci_jwt_signing_key: | -$(echo "${ci_jwt_signing_key}" | awk '{print " " $0}') -EOF - kubectl --validate=false --namespace=$namespace apply -f rails-secrets.yml - label_secret $rails_secret -fi - -# Shell ssh host keys -ssh-keygen -A -mkdir -p host_keys -cp /etc/ssh/ssh_host_* host_keys/ -generate_secret_if_needed {{ template "gitlab.gitlab-shell.hostKeys.secret" . }} --from-file host_keys - -# Gitlab-workhorse secret -generate_secret_if_needed {{ template "gitlab.workhorse.secret" . }} --from-literal={{ template "gitlab.workhorse.key" . }}=$(gen_random 'a-zA-Z0-9' 32 | base64) - -# Registry http.secret secret -generate_secret_if_needed {{ template "gitlab.registry.httpSecret.secret" . }} --from-literal={{ template "gitlab.registry.httpSecret.key" . }}=$(gen_random 'a-z0-9' 128 | base64 -w 0) - -# Container Registry notification_secret -generate_secret_if_needed {{ template "gitlab.registry.notificationSecret.secret" . }} --from-literal={{ template "gitlab.registry.notificationSecret.key" . }}=[\"$(gen_random 'a-zA-Z0-9' 32)\"] - -{{ if .Values.global.praefect.enabled -}} -{{ if not .Values.global.praefect.psql.host -}} -# Praefect DB password -generate_secret_if_needed {{ template "gitlab.praefect.dbSecret.secret" . }} --from-literal={{ template "gitlab.praefect.dbSecret.key" . }}=$(gen_random 'a-zA-Z0-9', 32) -{{ end }} - -# Praefect auth token -generate_secret_if_needed {{ template "gitlab.praefect.authToken.secret" . }} --from-literal={{ template "gitlab.praefect.authToken.key" . }}=$(gen_random 'a-zA-Z0-9' 64) -{{ end }} diff --git a/charts/gitlab/gitlab/templates/shared-secrets/configmap.yaml b/charts/gitlab/gitlab/templates/shared-secrets/configmap.yaml deleted file mode 100644 index 0f576e3aa..000000000 --- a/charts/gitlab/gitlab/templates/shared-secrets/configmap.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- $sharedSecretEnabled := index .Values "shared-secrets" "enabled" -}} -{{- if $sharedSecretEnabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "shared-secrets.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-weight": "-3" - "helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation -data: - generate-secrets: | - {{- include (print $.Template.BasePath "/shared-secrets/_generate_secrets.sh.tpl") . | nindent 4 }} -{{- end -}} diff --git a/charts/gitlab/gitlab/templates/shared-secrets/job.yaml b/charts/gitlab/gitlab/templates/shared-secrets/job.yaml deleted file mode 100644 index 4cf5d898a..000000000 --- a/charts/gitlab/gitlab/templates/shared-secrets/job.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- $sharedSecretValues := index .Values "shared-secrets" -}} -{{- if $sharedSecretValues.enabled }} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.global.kubectl.image -}} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "shared-secrets.jobname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation -spec: - template: - metadata: - labels: - {{- include "gitlab.standardLabels" . | nindent 8 }} - {{- include "gitlab.commonLabels" . | nindent 8 }} - {{- include "gitlab.podLabels" . | nindent 8 }} - annotations: - {{- range $key, $value := $sharedSecretValues.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- if $sharedSecretValues.tolerations }} - tolerations: - {{- toYaml $sharedSecretValues.tolerations | nindent 8 }} - {{- end }} - {{- if or $.Values.global.priorityClassName $sharedSecretValues.priorityClassName }} - priorityClassName: {{ default $.Values.global.priorityClassName $sharedSecretValues.priorityClassName }} - {{- end }} - securityContext: - runAsUser: {{ $sharedSecretValues.securityContext.runAsUser }} - fsGroup: {{ $sharedSecretValues.securityContext.fsGroup }} - {{- if or $sharedSecretValues.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ template "shared-secrets.serviceAccountName" . }} - {{- end }} - restartPolicy: Never - {{- include "gitlab.image.pullSecrets" $imageCfg | nindent 6 }} - containers: - - name: {{ .Chart.Name }} - image: {{ include "gitlab.kubectl.image" . }} - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - command: ['/bin/bash', '/scripts/generate-secrets'] - volumeMounts: - - name: scripts - mountPath: /scripts - - name: ssh - mountPath: /etc/ssh - resources: - {{- toYaml $sharedSecretValues.resources | nindent 12 }} - volumes: - - name: scripts - configMap: - name: {{ template "shared-secrets.fullname" . }} - - name: ssh - emptyDir: {} -{{- end }} diff --git a/charts/gitlab/gitlab/templates/shared-secrets/rbac-config.yaml b/charts/gitlab/gitlab/templates/shared-secrets/rbac-config.yaml deleted file mode 100644 index 0aef0709e..000000000 --- a/charts/gitlab/gitlab/templates/shared-secrets/rbac-config.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- $sharedSecretValues := index .Values "shared-secrets" }} -{{- if and $sharedSecretValues.enabled $sharedSecretValues.rbac.create -}} -{{- if $sharedSecretValues.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "shared-secrets.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-weight": "-5" - "helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation -{{- end }} ---- -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "shared-secrets.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "shared-secrets.name" . }} - chart: shared-secrets-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-weight": "-5" - "helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation -rules: -- apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "create", "patch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ template "shared-secrets.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "shared-secrets.name" . }} - chart: shared-secrets-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-weight": "-5" - "helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "shared-secrets.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "shared-secrets.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -{{- end}} diff --git a/charts/gitlab/gitlab/templates/shared-secrets/self-signed-cert-job.yml b/charts/gitlab/gitlab/templates/shared-secrets/self-signed-cert-job.yml deleted file mode 100644 index c92f467c3..000000000 --- a/charts/gitlab/gitlab/templates/shared-secrets/self-signed-cert-job.yml +++ /dev/null @@ -1,117 +0,0 @@ -{{- $sharedSecretValues := index .Values "shared-secrets" -}} -{{- if $sharedSecretValues.enabled }} -{{- if not .Values.global.ingress.configureCertmanager -}} -{{- if not (include "gitlab.ingress.tls.configured" .) }} -{{- $imageCfgSelfsign := dict "global" .Values.global.image "local" $sharedSecretValues.selfsign.image -}} -{{- $imageCfgKubectl := dict "global" .Values.global.image "local" .Values.global.kubectl.image -}} -{{- $jointPullSecrets := concat (default (list) $sharedSecretValues.selfsign.image.pullSecrets) (default (list) .Values.global.kubectl.image.pullSecrets) -}} -{{- $imageCfg := dict "global" .Values.global.image "local" (dict "pullSecrets" $jointPullSecrets) -}} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "shared-secrets.jobname" . }}-selfsign - namespace: {{ .Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation -spec: - template: - metadata: - labels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - annotations: - {{- range $key, $value := $sharedSecretValues.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- if $sharedSecretValues.tolerations }} - tolerations: - {{- toYaml $sharedSecretValues.tolerations | nindent 8 }} - {{- end }} - securityContext: - runAsUser: {{ $sharedSecretValues.securityContext.runAsUser }} - fsGroup: {{ $sharedSecretValues.securityContext.fsGroup }} - {{- if or $sharedSecretValues.serviceAccount.enabled .Values.global.serviceAccount.enabled }} - serviceAccountName: {{ template "shared-secrets.serviceAccountName" . }} - {{- end }} - restartPolicy: Never - {{- include "gitlab.image.pullSecrets" $imageCfg | nindent 6 }} - initContainers: - - name: cfssl-self-sign - image: {{ include "gitlab.selfsign.image" . }} - {{- include "gitlab.image.pullPolicy" $imageCfgSelfsign | indent 8 }} - env: - - name: CA_SUBJECT - value: {{ $sharedSecretValues.selfsign.caSubject | quote }} # defaults to GitLab in container - - name: CA_ORG - value: {{ .Release.Namespace | quote }} # defaults to GitLab in container - - name: CA_ORG_UNIT - value: {{ .Release.Name | quote }} # defaults to Cloud Native in container - - name: CERT_SUBJECT - value: {{ .Values.global.hosts.domain | quote }} # defaults to GitLab in container - - name: CERT_DOMAIN - value: {{ .Values.global.hosts.domain | quote }} # defaults to example.com in container - - name: EXPIRY - value: {{ $sharedSecretValues.selfsign.expiry | quote }} # defaults to 8076h in container - - name: ALGORITHM - value: {{ $sharedSecretValues.selfsign.keyAlgorithm | quote }} # defaults to ecdsa in container - - name: KEY_SIZE - value: {{ $sharedSecretValues.selfsign.keySize | quote }} # defaults to 256 inside container - volumeMounts: - - name: certs-path - mountPath: /output - resources: - {{- toYaml $sharedSecretValues.resources | nindent 10 }} - containers: - - name: kubectl - image: {{ include "gitlab.kubectl.image" . }} - {{- include "gitlab.image.pullPolicy" $imageCfgKubectl | indent 8 }} - command: - - /bin/bash - - -exc - - | - certname={{ template "gitlab.wildcard-self-signed-cert-name" . }} - # create wildcard certificate secret - kubectl create secret tls $certname \ - --cert=/output/wildcard.pem --key=/output/wildcard-key.pem || true -{{- if not .Values.global.application.create }} - kubectl --namespace=$namespace label \ - secret $certname $(echo '{{ include "gitlab.application.labels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }}' | sed -E 's/=[^ ]*/-/g') -{{- end }} - kubectl --namespace=$namespace label --overwrite \ - secret $certname {{ include "gitlab.standardLabels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }} {{ include "gitlab.commonLabels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }} - # create CA certificate secret - kubectl create secret generic ${certname}-ca \ - --from-file=cfssl_ca=/output/ca.pem || true -{{- if not .Values.global.application.create }} - kubectl --namespace=$namespace label \ - secret ${certname}-ca $(echo '{{ include "gitlab.application.labels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }}' | sed -E 's/=[^ ]*/-/g') -{{- end }} - kubectl --namespace=$namespace label --overwrite \ - secret ${certname}-ca {{ include "gitlab.standardLabels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }} {{ include "gitlab.commonLabels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }} - # create certificate chain for GitLab Runner - cat /output/ca.pem /output/wildcard.pem > /tmp/{{ template "gitlab.gitlab.hostname" $ }}.crt - kubectl create secret generic ${certname}-chain \ - --from-file=/tmp/{{ template "gitlab.gitlab.hostname" $ }}.crt || true -{{- if not .Values.global.application.create }} - kubectl --namespace=$namespace label \ - secret ${certname}-chain $(echo '{{ include "gitlab.application.labels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }}' | sed -E 's/=[^ ]*/-/g') -{{- end }} - kubectl --namespace=$namespace label --overwrite \ - secret ${certname}-chain {{ include "gitlab.standardLabels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }} {{ include "gitlab.commonLabels" . | replace ": " "=" | replace "\r\n" " " | replace "\n" " " }} - volumeMounts: - - name: certs-path - mountPath: /output - resources: - {{- toYaml $sharedSecretValues.resources | nindent 10 }} - volumes: - - name: certs-path - emptyDir: {} -{{- end -}} -{{- end -}} -{{- end }} diff --git a/charts/gitlab/gitlab/templates/upgrade_check_hook.yaml b/charts/gitlab/gitlab/templates/upgrade_check_hook.yaml deleted file mode 100644 index 31258b201..000000000 --- a/charts/gitlab/gitlab/templates/upgrade_check_hook.yaml +++ /dev/null @@ -1,101 +0,0 @@ -{{- if .Values.upgradeCheck.enabled }} -{{- $imageCfg := dict "global" .Values.global.image "local" .Values.upgradeCheck.image -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fullname" . }}-upgrade-check - namespace: {{ $.Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-upgrade - "helm.sh/hook-weight": "-11" - "helm.sh/hook-delete-policy": before-hook-creation - {{- range $key, $value := .Values.upgradeCheck.configMapAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -data: - runcheck: | - {{- include (print $.Template.BasePath "/_runcheck.tpl") . | nindent 4 }} ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "fullname" . }}-upgrade-check - namespace: {{ .Release.Namespace }} - labels: - {{- include "gitlab.standardLabels" . | nindent 4 }} - {{- include "gitlab.commonLabels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-upgrade - "helm.sh/hook-weight": "-10" - "helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation -spec: - backoffLimit: 2 - template: - metadata: - labels: - app: {{ template "name" . }} - release: {{ .Release.Name }} - {{- if .Values.upgradeCheck.annotations }} - {{- range $key, $value := .Values.upgradeCheck.annotations }} - annotations: - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - - spec: - {{- if .Values.upgradeCheck.nodeSelector }} - nodeSelector: {{ toYaml .Values.upgradeCheck.nodeSelector | nindent 8 }} - {{- else }} - {{- include "gitlab.nodeSelector" . | nindent 6 }} - {{- end }} - {{- if or $.Values.global.priorityClassName .Values.upgradeCheck.priorityClassName }} - priorityClassName: {{ default $.Values.global.priorityClassName .Values.upgradeCheck.priorityClassName }} - {{- end }} - {{- if .Values.upgradeCheck.tolerations }} - tolerations: - {{- toYaml .Values.upgradeCheck.tolerations | nindent 8 }} - {{- end }} - securityContext: - runAsUser: {{ .Values.upgradeCheck.securityContext.runAsUser }} - fsGroup: {{ .Values.upgradeCheck.securityContext.fsGroup }} - restartPolicy: Never - {{- include "gitlab.image.pullSecrets" $imageCfg | nindent 6}} - containers: - - name: run-check - image: {{ include "gitlab.busybox.image" (dict "local" .Values.upgradeCheck "global" $.Values.global) | quote }} - command: ['/bin/sh', '/scripts/runcheck'] - {{- include "gitlab.image.pullPolicy" $imageCfg | indent 10 }} - env: - - name: GITLAB_VERSION - value: '{{ coalesce .Values.global.gitlabVersion .Chart.AppVersion }}' - - name: CHART_VERSION - value: '{{ .Chart.Version }}' - volumeMounts: - - name: chart-info - mountPath: /chart-info - - name: scripts - mountPath: /scripts -{{- if .Values.postgresql.install }} - - name: postgresql-secret - mountPath: /etc/secrets/postgresql -{{- end }} - resources: - {{- toYaml .Values.upgradeCheck.resources | nindent 12 }} - volumes: - - name: chart-info - configMap: - name: {{ template "fullname" . }}-chart-info - optional: true - - name: scripts - configMap: - name: {{ template "fullname" . }}-upgrade-check -{{- if .Values.postgresql.install }} - - name: postgresql-secret - secret: - secretName: {{ template "gitlab.psql.password.secret" . }} - optional: true -{{- end }} -{{- end }} diff --git a/charts/gitlab/gitlab/values.yaml b/charts/gitlab/gitlab/values.yaml deleted file mode 100644 index bcde350e5..000000000 --- a/charts/gitlab/gitlab/values.yaml +++ /dev/null @@ -1,1215 +0,0 @@ -## NOTICE -# -# Due to the scope and complexity of this chart, all possible values are -# not documented in this file. Extensive documentation is available. -# -# Please read the docs: https://docs.gitlab.com/charts/ -# -# Because properties are regularly added, updated, or relocated, it is -# _strongly suggest_ to not "copy and paste" this YAML. Please provide -# Helm only those properties you need, and allow the defaults to be -# provided by the version of this chart at the time of deployment. - -## Advanced Configuration -## https://docs.gitlab.com/charts/advanced -# -# Documentation for advanced configuration, such as -# - External PostgreSQL -# - External Gitaly -# - External Redis -# - External NGINX -# - External Object Storage providers -# - PersistentVolume configuration - -## The global properties are used to configure multiple charts at once. -## https://docs.gitlab.com/charts/charts/globals -global: - common: - labels: {} - - image: {} - # pullPolicy: IfNotPresent - # pullSecrets: [] - # tagSuffix: "" - - ## Supplemental Pod labels. Will not be used for selectors. - pod: - labels: {} - - ## https://docs.gitlab.com/charts/installation/deployment#deploy-the-community-edition - edition: ee - - ## https://docs.gitlab.com/charts/charts/globals#gitlab-version - gitlabVersion: "16.0.1" - - ## https://docs.gitlab.com/charts/charts/globals#application-resource - application: - create: false - links: [] - allowClusterRoles: true - ## https://docs.gitlab.com/charts/charts/globals#configure-host-settings - hosts: - domain: example.com - hostSuffix: - https: true - externalIP: - ssh: ~ - gitlab: {} - minio: {} - registry: {} - tls: {} - smartcard: {} - kas: {} - pages: {} - - ## https://docs.gitlab.com/charts/charts/globals#configure-ingress-settings - ingress: - apiVersion: "" - configureCertmanager: true - provider: nginx - # class: - annotations: {} - enabled: true - tls: {} - # enabled: true - # secretName: - path: / - pathType: Prefix - - # Override the API version to use for HorizontalPodAutoscaler - hpa: - apiVersion: "" - - # Override the API version to use for PodDisruptionBudget - pdb: - apiVersion: "" - - # Override the API version to use for CronJob - batch: - cronJob: - apiVersion: "" - - gitlab: - ## Enterprise license for this GitLab installation - ## Secret created according to https://docs.gitlab.com/charts/installation/secrets#initial-enterprise-license - ## If allowing shared-secrets generation, this is OPTIONAL. - license: {} - # secret: RELEASE-gitlab-license - # key: license - - ## Initial root password for this GitLab installation - ## Secret created according to https://docs.gitlab.com/charts/installation/secrets#initial-root-password - ## If allowing shared-secrets generation, this is OPTIONAL. - initialRootPassword: {} - # secret: RELEASE-gitlab-initial-root-password - # key: password - - ## https://docs.gitlab.com/charts/charts/globals#configure-postgresql-settings - psql: - connectTimeout: - keepalives: - keepalivesIdle: - keepalivesInterval: - keepalivesCount: - tcpUserTimeout: - password: {} - # useSecret: - # secret: - # key: - # file: - # host: postgresql.hostedsomewhere.else - # port: 123 - # username: gitlab - # database: gitlabhq_production - # applicationName: - # preparedStatements: false - # databaseTasks: true - - ## https://docs.gitlab.com/charts/charts/globals#configure-redis-settings - redis: - auth: - enabled: true - # secret: - # key: - # host: redis.hostedsomewhere.else - # port: 6379 - # user: webservice - # sentinels: - # - host: - # port: - - ## https://docs.gitlab.com/charts/charts/globals#configure-gitaly-settings - gitaly: - enabled: true - authToken: {} - # secret: - # key: - # serviceName: - internal: - names: [default] - external: [] - service: - name: gitaly - type: ClusterIP - externalPort: 8075 - internalPort: 8075 - tls: - externalPort: 8076 - internalPort: 8076 - tls: - enabled: false - # secretName: - - praefect: - enabled: false - ntpHost: pool.ntp.org - replaceInternalGitaly: true - authToken: {} - autoMigrate: true - dbSecret: {} - virtualStorages: - - name: default - gitalyReplicas: 3 - maxUnavailable: 1 - psql: - sslMode: disable - # serviceName: - service: - name: praefect - type: ClusterIP - externalPort: 8075 - internalPort: 8075 - tls: - externalPort: 8076 - internalPort: 8076 - tls: - enabled: false - # secretName: - - ## https://docs.gitlab.com/charts/charts/globals#configure-minio-settings - minio: - enabled: true - credentials: {} - # secret: - - ## https://docs.gitlab.com/charts/charts/globals#configure-appconfig-settings - ## Rails based portions of this chart share many settings - appConfig: - ## https://docs.gitlab.com/charts/charts/globals#general-application-settings - # cdnHost: - enableUsagePing: true - enableSeatLink: true - enableImpersonation: - applicationSettingsCacheSeconds: 60 - usernameChangingEnabled: true - issueClosingPattern: - defaultTheme: - defaultProjectsFeatures: - issues: true - mergeRequests: true - wiki: true - snippets: true - builds: true - webhookTimeout: - maxRequestDurationSeconds: - - ## https://docs.gitlab.com/charts/charts/globals#cron-jobs-related-settings - cron_jobs: {} - ## Flag stuck CI builds as failed - # stuck_ci_jobs_worker: - # cron: "0 * * * *" - ## Schedule pipelines in the near future - # pipeline_schedule_worker: - # cron: "19 * * * *" - ## Remove expired build artifacts - # expire_build_artifacts_worker: - # cron: "*/7 * * * *" - ## Periodically run 'git fsck' on all repositories. - # repository_check_worker: - # cron: "20 * * * *" - ## Send admin emails once a week - # admin_email_worker: - # cron: "0 0 * * 0" - ## Remove outdated repository archives - # repository_archive_cache_worker: - # cron: "0 * * * *" - ## Verify custom GitLab Pages domains - # pages_domain_verification_cron_worker: - # cron: "*/15 * * * *" - # schedule_migrate_external_diffs_worker: - # cron: "15 * * * *" - ## Prune stale group runners on opted-in namespaces - # ci_runners_stale_group_runners_prune_worker_cron: - # cron: "30 * * * *" - ## Periodically update ci_runner_versions table with up-to-date versions and status - # ci_runner_versions_reconciliation_worker: - # cron: "@daily" - ## Periodically clean up stale ci_runner_machines records - # ci_runners_stale_machines_cleanup_worker: - # cron: "36 4 * * *" - ### GitLab Geo - # Geo Primary only! - # geo_prune_event_log_worker: - # cron: "*/5 * * * *" - ## GitLab Geo repository sync worker - # geo_repository_sync_worker: - # cron: "*/5 * * * *" - ## GitLab Geo file download dispatch worker - # geo_file_download_dispatch_worker: - # cron: "*/10 * * * *" - ## GitLab Geo repository verification primary batch worker - # geo_repository_verification_primary_batch_worker: - # cron: "*/5 * * * *" - ## GitLab Geo repository verification secondary scheduler worker - # geo_repository_verification_secondary_scheduler_worker: - # cron: "*/5 * * * *" - ## GitLab Geo migrated local files clean up worker - # geo_migrated_local_files_clean_up_worker: - # cron: "15 */6 * * *" - ### LDAP - # ldap_sync_worker: - # cron: "30 1 * * *" - # ldap_group_sync_worker: - # cron: "0 * * * *" - ### Snapshot active user statistics - # historical_data_worker: - # cron: "0 12 * * *" - # loose_foreign_keys_cleanup_worker_cron: - # cron: "*/5 * * * *" - - ## https://docs.gitlab.com/charts/charts/globals#content-security-policy - contentSecurityPolicy: - enabled: false - report_only: true - # directives: {} - - ## https://docs.gitlab.com/charts/charts/globals#gravatarlibravatar-settings - gravatar: - plainUrl: - sslUrl: - - ## https://docs.gitlab.com/charts/charts/globals#hooking-analytics-services-to-the-gitlab-instance - extra: - googleAnalyticsId: - matomoUrl: - matomoSiteId: - matomoDisableCookies: - oneTrustId: - googleTagManagerNonceId: - bizible: - - ## https://docs.gitlab.com/charts/charts/globals#lfs-artifacts-uploads-packages-external-mr-diffs-and-dependency-proxy - object_store: - enabled: false - proxy_download: true - storage_options: {} - # server_side_encryption: - # server_side_encryption_kms_key_id - connection: {} - # secret: - # key: - lfs: - enabled: true - proxy_download: true - bucket: git-lfs - connection: {} - # secret: - # key: - artifacts: - enabled: true - proxy_download: true - bucket: gitlab-artifacts - connection: {} - # secret: - # key: - uploads: - enabled: true - proxy_download: true - bucket: gitlab-uploads - connection: {} - # secret: - # key: - packages: - enabled: true - proxy_download: true - bucket: gitlab-packages - connection: {} - externalDiffs: - enabled: false - when: - proxy_download: true - bucket: gitlab-mr-diffs - connection: {} - terraformState: - enabled: false - bucket: gitlab-terraform-state - connection: {} - ciSecureFiles: - enabled: false - bucket: gitlab-ci-secure-files - connection: {} - dependencyProxy: - enabled: false - proxy_download: true - bucket: gitlab-dependency-proxy - connection: {} - - backups: - bucket: gitlab-backups - tmpBucket: tmp - - ## https://docs.gitlab.com/charts/charts/globals#outgoing-email - ## Microsoft Graph Mailer settings - microsoft_graph_mailer: - enabled: false - user_id: "" - tenant: "" - client_id: "" - client_secret: - secret: "" - key: secret - azure_ad_endpoint: "https://login.microsoftonline.com" - graph_endpoint: "https://graph.microsoft.com" - - ## https://docs.gitlab.com/charts/installation/command-line-options.html#incoming-email-configuration - ## https://docs.gitlab.com/charts/charts/gitlab/mailroom/index.html#incoming-email - incomingEmail: - enabled: false - address: "" - host: "imap.gmail.com" - port: 993 - ssl: true - startTls: false - user: "" - password: - secret: "" - key: password - deleteAfterDelivery: true - expungeDeleted: false - logger: - logPath: "/dev/stdout" - mailbox: inbox - idleTimeout: 60 - inboxMethod: "imap" - clientSecret: - key: secret - pollInterval: 60 - deliveryMethod: webhook - authToken: {} - # secret: - # key: - - ## https://docs.gitlab.com/charts/charts/gitlab/mailroom/index.html#service-desk-email - serviceDeskEmail: - enabled: false - address: "" - host: "imap.gmail.com" - port: 993 - ssl: true - startTls: false - user: "" - password: - secret: "" - key: password - deleteAfterDelivery: true - expungeDeleted: false - logger: - logPath: "/dev/stdout" - mailbox: inbox - idleTimeout: 60 - inboxMethod: "imap" - clientSecret: - key: secret - pollInterval: 60 - deliveryMethod: webhook - authToken: {} - # secret: - # key: - - ## https://docs.gitlab.com/charts/charts/globals#ldap - ldap: - # prevent the use of LDAP for sign-in via web. - preventSignin: false - servers: {} - ## See documentation for complete example of a configured LDAP server - - duoAuth: - enabled: false - # hostname: - # integrationKey: - # secretKey: - # secret: - # key: - - ## https://docs.gitlab.com/charts/charts/globals#kas-settings - gitlab_kas: {} - # secret: - # key: - # enabled: - # externalUrl: - # internalUrl: - - ## https://docs.gitlab.com/charts/charts/globals#suggested-reviewers-settings - suggested_reviewers: {} - # secret: - # key: - - ## https://docs.gitlab.com/charts/charts/globals#omniauth - omniauth: - enabled: false - autoSignInWithProvider: - syncProfileFromProvider: [] - syncProfileAttributes: [email] - allowSingleSignOn: [saml] - blockAutoCreatedUsers: true - autoLinkLdapUser: false - autoLinkSamlUser: false - autoLinkUser: [] - externalProviders: [] - allowBypassTwoFactor: [] - providers: [] - # - secret: gitlab-google-oauth2 - # key: provider - - ## https://docs.gitlab.com/charts/charts/globals#kerberos - kerberos: - enabled: false - keytab: - # secret: - key: keytab - servicePrincipalName: "" - krb5Config: "" - dedicatedPort: - enabled: false - port: 8443 - https: true - simpleLdapLinkingAllowedRealms: [] - - ## https://docs.gitlab.com/charts/charts/globals#configure-appconfig-settings - sentry: - enabled: false - dsn: - clientside_dsn: - environment: - - gitlab_docs: - enabled: false - host: "" - - smartcard: - enabled: false - CASecret: - clientCertificateRequiredHost: - sanExtensions: false - requiredForGitAccess: false - - sidekiq: - routingRules: [] - - # Config that only applies to the defaults on initial install - initialDefaults: {} - # signupEnabled: - ## End of global.appConfig - - oauth: - gitlab-pages: {} - # secret: - # appIdKey: - # appSecretKey: - # redirectUri: - # authScope: - - ## https://docs.gitlab.com/charts/advanced/geo/ - geo: - enabled: false - # Valid values: primary, secondary - role: primary - ## Geo Secondary only - # nodeName allows multiple instances behind a load balancer. - nodeName: # defaults to `gitlab.gitlab.host` - # PostgreSQL connection details only needed for `secondary` - psql: - password: {} - # secret: - # key: - # host: postgresql.hostedsomewhere.else - # port: 123 - # username: gitlab_replicator - # database: gitlabhq_geo_production - # ssl: - # secret: - # clientKey: - # clientCertificate: - # serverCA: - registry: - replication: - enabled: false - primaryApiUrl: - ## Consumes global.registry.notificationSecret - - ## https://docs.gitlab.com/charts/charts/gitlab/kas/ - kas: - enabled: true - service: - apiExternalPort: 8153 # port for connections from the GitLab backend - tls: - enabled: false - verify: true - # secretName: - # caSecretName: - - ## https://docs.gitlab.com/charts/charts/gitlab/spamcheck/ - spamcheck: - enabled: false - - ## https://docs.gitlab.com/charts/charts/globals#configure-gitlab-shell - shell: - authToken: {} - # secret: - # key: - hostKeys: {} - # secret: - ## https://docs.gitlab.com/charts/charts/globals#tcp-proxy-protocol - tcp: - proxyProtocol: false - - ## Rails application secrets - ## Secret created according to https://docs.gitlab.com/charts/installation/secrets#gitlab-rails-secret - ## If allowing shared-secrets generation, this is OPTIONAL. - railsSecrets: {} - # secret: - - ## Rails generic setting, applicable to all Rails-based containers - rails: - bootsnap: # Enable / disable Shopify/Bootsnap cache - enabled: true - - ## https://docs.gitlab.com/charts/charts/globals#configure-registry-settings - registry: - bucket: registry - - certificate: {} - # secret: - httpSecret: {} - # secret: - # key: - notificationSecret: {} - # secret: - # key: - tls: - enabled: false - # secretName: - redis: - cache: - password: {} - # https://docs.docker.com/registry/notifications/#configuration - notifications: {} - # endpoints: - # - name: FooListener - # url: https://foolistener.com/event - # timeout: 500ms - # threshold: 10 - # backoff: 1s - # headers: - # FooBar: ['1', '2'] - # Authorization: - # secret: gitlab-registry-authorization-header - # SpecificPassword: - # secret: gitlab-registry-specific-password - # key: password - # events: {} - - # Settings utilized by other services referencing registry: - enabled: true - host: - # port: 443 - api: - protocol: http - serviceName: registry - port: 5000 - tokenIssuer: gitlab-issuer - - pages: - enabled: false - accessControl: false - path: - host: - port: - https: # default true - externalHttp: [] - externalHttps: [] - artifactsServer: true - localStore: - enabled: false - # path: /srv/gitlab/shared/pages - objectStore: - enabled: true - bucket: gitlab-pages - # proxy_download: true - connection: {} - # secret: - # key: - apiSecret: {} - # secret: - # key: - authSecret: {} - # secret: - # key: - - ## GitLab Runner - ## Secret created according to https://docs.gitlab.com/charts/installation/secrets#gitlab-runner-secret - ## If allowing shared-secrets generation, this is OPTIONAL. - runner: - registrationToken: {} - # secret: - - ## https://docs.gitlab.com/charts/charts/globals#outgoing-email - ## Outgoing email server settings - smtp: - enabled: false - address: smtp.mailgun.org - port: 2525 - user_name: "" - ## https://docs.gitlab.com/charts/installation/secrets#smtp-password - password: - secret: "" - key: password - # domain: - authentication: "plain" - starttls_auto: false - openssl_verify_mode: "peer" - open_timeout: 30 - read_timeout: 60 - pool: false - - ## https://docs.gitlab.com/charts/charts/globals#outgoing-email - ## Email persona used in email sent by GitLab - email: - from: "" - display_name: GitLab - reply_to: "" - subject_suffix: "" - smime: - enabled: false - secretName: "" - keyName: "tls.key" - certName: "tls.crt" - - ## Timezone for containers. - time_zone: UTC - - ## Global Service Annotations and Labels - service: - labels: {} - annotations: {} - - ## Global Deployment Annotations - deployment: - annotations: {} - - antiAffinity: soft - affinity: - podAntiAffinity: - topologyKey: "kubernetes.io/hostname" - - # Priority class assigned to pods, may be overridden for individual components - # https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ - priorityClassName: "" - - ## https://docs.gitlab.com/charts/charts/globals#configure-workhorse-settings - ## Global settings related to Workhorse - workhorse: - serviceName: webservice-default - # scheme: - # host: - # port: - ## https://docs.gitlab.com/charts/installation/secrets#gitlab-workhorse-secret - # secret: - # key: - tls: - enabled: false - - ## https://docs.gitlab.com/charts/charts/globals#configure-webservice - webservice: - workerTimeout: 60 - - ## https://docs.gitlab.com/charts/charts/globals#custom-certificate-authorities - # configuration of certificates container & custom CA injection - certificates: - image: - repository: registry.gitlab.com/gitlab-org/build/cng/certificates - # Default tag is `master`, overridable by `global.gitlabVersion`. - # tag: master - # pullPolicy: IfNotPresent - # pullSecrets: [] - customCAs: [] - # - secret: custom-CA - # - secret: more-custom-CAs - # keys: - # - custom-ca-1.crt - # - configMap: custom-CA-cm - # - configMap: more-custom-CAs-cm - # keys: - # - custom-ca-2.crt - # - custom-ca-3.crt - - ## kubectl image used by hooks to carry out specific jobs - kubectl: - image: - repository: registry.gitlab.com/gitlab-org/build/cng/kubectl - # Default tag is `master`, overridable by `global.gitlabVersion`. - # tag: master - # pullPolicy: IfNotPresent - # pullSecrets: [] - securityContext: - # in most base images, this is `nobody:nogroup` - runAsUser: 65534 - fsGroup: 65534 - busybox: - image: - repository: registry.gitlab.com/gitlab-org/cloud-native/mirror/images/busybox - # tag: latest - # pullPolicy: IfNotPresent - # pullSecrets: [] - - ## https://docs.gitlab.com/charts/charts/globals#service-accounts - serviceAccount: - enabled: false - create: true - annotations: {} - ## Name to be used for serviceAccount, otherwise defaults to chart fullname - # name: - - ## https://docs.gitlab.com/charts/charts/globals/#tracing - tracing: - connection: - string: "" - urlTemplate: "" - - ## https://docs.gitlab.com/charts/charts/globals - extraEnv: {} - # SOME_KEY: some_value - # SOME_OTHER_KEY: some_other_value - - ## https://docs.gitlab.com/charts/charts/globals - extraEnvFrom: {} - # MY_NODE_NAME: - # fieldRef: - # fieldPath: spec.nodeName - # MY_CPU_REQUEST: - # resourceFieldRef: - # containerName: test-container - # resource: requests.cpu - # SECRET_THING: - # secretKeyRef: - # name: special-secret - # key: special_token - # # optional: boolean - # CONFIG_STRING: - # configMapKeyRef: - # name: useful-config - # key: some-string - # # optional: boolean -## End of global - -upgradeCheck: - enabled: true - image: {} - # repository: - # tag: - # pullPolicy: IfNotPresent - # pullSecrets: [] - securityContext: - # in alpine/debian/busybox based images, this is `nobody:nogroup` - runAsUser: 65534 - fsGroup: 65534 - tolerations: [] - annotations: {} - configMapAnnotations: {} - resources: - requests: - cpu: 50m - priorityClassName: "" - -## Settings to for the Let's Encrypt ACME Issuer -# certmanager-issuer: -# # The email address to register certificates requested from Let's Encrypt. -# # Required if using Let's Encrypt. -# email: email@example.com - -## Installation & configuration of jetstack/cert-manager -## See requirements.yaml for current version -certmanager: - installCRDs: true - nameOverride: certmanager - # Install cert-manager chart. Set to false if you already have cert-manager - # installed or if you are not using cert-manager. - install: true - # Other cert-manager configurations from upstream - # See https://github.com/jetstack/cert-manager/blob/master/deploy/charts/cert-manager/README#configuration - rbac: - create: true - -## https://docs.gitlab.com/charts/charts/nginx/ -## https://docs.gitlab.com/charts/architecture/decisions#nginx-ingress -## Installation & configuration of charts/ingress-nginx: -nginx-ingress: - enabled: true - tcpExternalConfig: "true" - controller: - addHeaders: - Referrer-Policy: strict-origin-when-cross-origin - config: - annotation-value-word-blocklist: "load_module,lua_package,_by_lua,location,root,proxy_pass,serviceaccount,{,},',\"" - hsts: "true" - hsts-include-subdomains: "false" - hsts-max-age: "63072000" - server-name-hash-bucket-size: "256" - use-http2: "true" - ssl-ciphers: "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4" - ssl-protocols: "TLSv1.3 TLSv1.2" - server-tokens: "false" - # Configure smaller defaults for upstream-keepalive-*, see https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration - upstream-keepalive-connections: 100 # Limit of 100 held-open connections - upstream-keepalive-time: 30s # 30 second limit for connection reuse - upstream-keepalive-timeout: 5 # 5 second timeout to hold open idle connections - upstream-keepalive-requests: 1000 # 1000 requests per connection, before recycling - - service: - externalTrafficPolicy: "Local" - ingressClassByName: false - ingressClassResource: - name: '{{ include "ingress.class.name" $ | quote }}' - resources: - requests: - cpu: 100m - memory: 100Mi - publishService: - enabled: true - replicaCount: 2 - minAvailable: 1 - scope: - enabled: true - metrics: - enabled: true - service: - annotations: - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: "10254" - prometheus.io/scrape: "true" - prometheus.io/port: "10254" - admissionWebhooks: - enabled: false - defaultBackend: - resources: - requests: - cpu: 5m - memory: 5Mi - rbac: - create: true - # Needed for k8s 1.20 and 1.21 - # https://github.com/kubernetes/ingress-nginx/issues/7510 - # https://github.com/kubernetes/ingress-nginx/issues/7519 - scope: false - serviceAccount: - create: true - -## Installation & configuration of stable/prometheus -## See requirements.yaml for current version -prometheus: - install: true - rbac: - create: true - alertmanager: - enabled: false - alertmanagerFiles: - alertmanager.yml: {} - kubeStateMetrics: - enabled: false - nodeExporter: - enabled: false - pushgateway: - enabled: false - server: - retention: 15d - strategy: - type: Recreate - image: - tag: v2.38.0 - serverFiles: - prometheus.yml: - scrape_configs: - - job_name: prometheus - static_configs: - - targets: - - localhost:9090 - - job_name: kubernetes-apiservers - kubernetes_sd_configs: - - role: endpoints - scheme: https - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - relabel_configs: - - source_labels: - [ - __meta_kubernetes_namespace, - __meta_kubernetes_service_name, - __meta_kubernetes_endpoint_port_name, - ] - action: keep - regex: default;kubernetes;https - - job_name: kubernetes-pods - kubernetes_sd_configs: - - role: pod - relabel_configs: - - source_labels: - [__meta_kubernetes_pod_annotation_gitlab_com_prometheus_scrape] - action: keep - regex: true - - source_labels: - [__meta_kubernetes_pod_annotation_gitlab_com_prometheus_scheme] - action: replace - regex: (https?) - target_label: __scheme__ - - source_labels: - [__meta_kubernetes_pod_annotation_gitlab_com_prometheus_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: - [ - __address__, - __meta_kubernetes_pod_annotation_gitlab_com_prometheus_port, - ] - action: replace - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:$2 - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: kubernetes_namespace - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: kubernetes_pod_name - - job_name: kubernetes-service-endpoints - kubernetes_sd_configs: - - role: endpoints - relabel_configs: - - action: keep - regex: true - source_labels: - - __meta_kubernetes_service_annotation_gitlab_com_prometheus_scrape - - action: replace - regex: (https?) - source_labels: - - __meta_kubernetes_service_annotation_gitlab_com_prometheus_scheme - target_label: __scheme__ - - action: replace - regex: (.+) - source_labels: - - __meta_kubernetes_service_annotation_gitlab_com_prometheus_path - target_label: __metrics_path__ - - action: replace - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:$2 - source_labels: - - __address__ - - __meta_kubernetes_service_annotation_gitlab_com_prometheus_port - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: kubernetes_namespace - - action: replace - source_labels: - - __meta_kubernetes_service_name - target_label: kubernetes_name - - action: replace - source_labels: - - __meta_kubernetes_pod_node_name - target_label: kubernetes_node - - job_name: kubernetes-services - metrics_path: /probe - params: - module: [http_2xx] - kubernetes_sd_configs: - - role: service - relabel_configs: - - source_labels: - [ - __meta_kubernetes_service_annotation_gitlab_com_prometheus_probe, - ] - action: keep - regex: true - - source_labels: [__address__] - target_label: __param_target - - target_label: __address__ - replacement: blackbox - - source_labels: [__param_target] - target_label: instance - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - target_label: kubernetes_namespace - - source_labels: [__meta_kubernetes_service_name] - target_label: kubernetes_name - -## Configuration of Redis -## https://docs.gitlab.com/charts/architecture/decisions#redis -## https://docs.gitlab.com/charts/installation/deployment.html#redis -redis: - install: true - auth: - existingSecret: gitlab-redis-secret - existingSecretKey: redis-password - usePasswordFiles: true - architecture: standalone - cluster: - enabled: false - metrics: - enabled: true - -## Installation & configuration of stable/prostgresql -## See requirements.yaml for current version -postgresql: - install: true - auth: - ## These need to be set, for the sake of bitnami/postgresql upgrade patterns. - ## They are overridden by use of `existingSecret` - password: bogus-satisfy-upgrade - postgresPassword: bogus-satisfy-upgrade - ## - usePasswordFiles: false - existingSecret: '{{ include "gitlab.psql.password.secret" . }}' - secretKeys: - adminPasswordKey: postgresql-postgres-password - userPasswordKey: '{{ include "gitlab.psql.password.key" $ }}' - image: - tag: 14.8.0 - primary: - initdb: - scriptsConfigMap: '{{ include "gitlab.psql.initdbscripts" $}}' - extraVolumeMounts: - - name: custom-init-scripts - mountPath: /docker-entrypoint-preinitdb.d/init_revision.sh - subPath: init_revision.sh - podAnnotations: - postgresql.gitlab/init-revision: "1" - metrics: - enabled: true - service: - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9187" - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: "9187" - - ## Optionally define additional custom metrics - ## ref: https://github.com/wrouesnel/postgres_exporter#adding-new-metrics-via-a-config-file - -## Installation & configuration charts/registry -## https://docs.gitlab.com/charts/architecture/decisions#registry -## https://docs.gitlab.com/charts/charts/registry/ -# registry: -# enabled: false - -## Automatic shared secret generation -## https://docs.gitlab.com/charts/installation/secrets -## https://docs.gitlab.com/charts/charts/shared-secrets.html -shared-secrets: - enabled: true - rbac: - create: true - selfsign: - image: - # pullPolicy: IfNotPresent - # pullSecrets: [] - repository: registry.gitlab.com/gitlab-org/build/cng/cfssl-self-sign - # Default tag is `master`, overridable by `global.gitlabVersion`. - # tag: master - keyAlgorithm: "rsa" - keySize: "4096" - expiry: "3650d" - caSubject: "GitLab Helm Chart" - env: production - serviceAccount: - enabled: true - create: true - name: # Specify a pre-existing ServiceAccount name - resources: - requests: - cpu: 50m - securityContext: - # in debian/alpine based images, this is `nobody:nogroup` - runAsUser: 65534 - fsGroup: 65534 - tolerations: [] - podLabels: {} - annotations: {} - -## Installation & configuration of gitlab/gitlab-runner -## See requirements.yaml for current version -gitlab-runner: - install: true - rbac: - create: true - runners: - locked: false - config: | - [[runners]] - [runners.kubernetes] - image = "ubuntu:22.04" - {{- if .Values.global.minio.enabled }} - [runners.cache] - Type = "s3" - Path = "gitlab-runner" - Shared = true - [runners.cache.s3] - ServerAddress = {{ include "gitlab-runner.cache-tpl.s3ServerAddress" . }} - BucketName = "runner-cache" - BucketLocation = "us-east-1" - Insecure = false - {{ end }} - podAnnotations: - gitlab.com/prometheus_scrape: "true" - gitlab.com/prometheus_port: 9252 - -## Settings for individual sub-charts under GitLab -## Note: Many of these settings are configurable via globals -gitlab: - ## https://docs.gitlab.com/charts/charts/gitlab/toolbox - toolbox: - replicas: 1 - antiAffinityLabels: - matchLabels: - app: gitaly - ## https://docs.gitlab.com/charts/charts/gitlab/migrations - # migrations: - # enabled: false - ## https://docs.gitlab.com/charts/charts/gitlab/webservice - # webservice: - # enabled: false - ## https://docs.gitlab.com/charts/charts/gitlab/sidekiq - # sidekiq: - # enabled: false - ## https://docs.gitlab.com/charts/charts/gitlab/gitaly - # gitaly: - ## https://docs.gitlab.com/charts/charts/gitlab/gitlab-shell - # gitlab-shell: - # enabled: false - ## https://docs.gitlab.com/charts/charts/gitlab/gitlab-pages - # gitlab-pages: - ## https://docs.gitlab.com/charts/charts/gitlab/kas - # kas: - ## https://docs.gitlab.com/charts/charts/gitlab/praefect - # praefect: - -## Installation & configuration of gitlab/gitlab-zoekt -gitlab-zoekt: - install: false \ No newline at end of file diff --git a/index.yaml b/index.yaml index ac7dda758..c5dc3df57 100644 --- a/index.yaml +++ b/index.yaml @@ -14379,1824 +14379,7 @@ entries: type: application urls: - assets/inaccel/fpga-operator-2.5.201.tgz - version: 2.5.201 - gitlab: - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: v16.0.1 - created: "2023-05-24T17:10:10.619623121Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.11.1 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 - - condition: postgresql.install - name: postgresql - repository: https://charts.bitnami.com/bitnami - version: 12.5.2 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.52.0 - - condition: redis.install - name: redis - repository: https://charts.bitnami.com/bitnami - version: 16.13.2 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - - condition: gitlab-zoekt.install - name: gitlab-zoekt - repository: https://charts.gitlab.io/ - version: 0.3.0 - description: The One DevOps Platform - digest: d6723b0251d8d007fd17edab47d7b469db1de8d95dc2f38e9f0f2b02ad445e82 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-7.0.1.tgz - version: 7.0.1 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: v15.11.5 - created: "2023-05-22T13:22:04.757900236Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.51.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - - condition: gitlab-zoekt.install - name: gitlab-zoekt - repository: https://charts.gitlab.io/ - version: 0.3.0 - description: The One DevOps Platform - digest: ee4b9f97dd74d111c4a36c88f1d93016c94a923fddb8cfc28b652122bf731481 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.11.5.tgz - version: 6.11.5 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: v15.11.4 - created: "2023-05-18T13:48:10.935769348Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.51.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - - condition: gitlab-zoekt.install - name: gitlab-zoekt - repository: https://charts.gitlab.io/ - version: 0.3.0 - description: The One DevOps Platform - digest: 56e3ce0693532b6d5c3bc7355778dfbb58ca9e51cc8c64cbc05f8eefa32dbcf8 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.11.4.tgz - version: 6.11.4 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.11.3 - created: "2023-05-12T13:17:32.293372085Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.51.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - - condition: gitlab-zoekt.install - name: gitlab-zoekt - repository: https://charts.gitlab.io/ - version: 0.3.0 - description: The One DevOps Platform - digest: e2f265bfc2c40c36f375a2aafe12d0193439ab536b4ac81f321d94389e43447d - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.11.3.tgz - version: 6.11.3 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.11.2 - created: "2023-05-08T19:55:58.397697315Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.51.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - - condition: gitlab-zoekt.install - name: gitlab-zoekt - repository: https://charts.gitlab.io/ - version: 0.3.0 - description: The One DevOps Platform - digest: f07f3cf01cf06ffebd81d4ff30787c9a93374d7d757fd36055a819835064da1a - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.11.2.tgz - version: 6.11.2 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.11.1 - created: "2023-05-03T16:27:30.885067935Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.51.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - - condition: gitlab-zoekt.install - name: gitlab-zoekt - repository: https://charts.gitlab.io/ - version: 0.3.0 - description: The One DevOps Platform - digest: 5d07638c714f9f41573547c1b55d46027e8e9e0f81125f242b012dee29583261 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.11.1.tgz - version: 6.11.1 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.11.0 - created: "2023-04-24T15:36:20.104951008Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.51.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - - condition: gitlab-zoekt.install - name: gitlab-zoekt - repository: https://charts.gitlab.io/ - version: 0.3.0 - description: The One DevOps Platform - digest: ff7315586b28106f57f77c2b941d1ff9a7f8d2c57fc2eb8868780b07b2c51503 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.11.0.tgz - version: 6.11.0 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.10.3 - created: "2023-04-18T16:31:46.054399824Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.51.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: f847db96693e1b54e73905ba6d6a7b7edb13a39cca5faf3ac558a390f571e995 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.10.3.tgz - version: 6.10.3 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.10.2 - created: "2023-04-10T13:11:59.232963924Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.51.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 6378258c5cf2bb644bf523e204e8ca5f1e258adff42104936c23ccccb18e39d0 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.10.2.tgz - version: 6.10.2 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.10.1 - created: "2023-04-04T14:08:26.265093842Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.51.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 9f2961d698980c635ee1e7b71040718750c51f71f4e7a272505cfb9014a33a26 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.10.1.tgz - version: 6.10.1 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.10.0 - created: "2023-03-23T13:50:42.058936011Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.18.0 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.51.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: d580039edf4858bbffb38fd11ca8c1f571441b85c3ace0febccc39f9fb29c689 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.10.0.tgz - version: 6.10.0 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.9.3 - created: "2023-03-10T23:04:34.089327538Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.50.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: a1a60b83ee4ea012f4ee8773e8868463cef807ffb38099b3f8f7274e2e6ce8f1 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.9.3.tgz - version: 6.9.3 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.9.2 - created: "2023-03-02T15:57:12.749969163Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.50.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 7c7401b154d4b97988f0075eb79f979e49be02447eb88d91e1e2fc7599331ffa - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.9.2.tgz - version: 6.9.2 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.9.1 - created: "2023-02-28T16:00:47.604630655Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.50.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: ceae551c1fb60bf13da3a2812281f3c97a0a7b34091e449c75b228e28a86b314 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.9.1.tgz - version: 6.9.1 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.8.3 - created: "2023-02-16T16:25:50.641825322Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.49.2 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 244e22e73629e842b9679470f0057f5d88f7e8a59f58637e4c6e2d2b37bd07cf - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.8.3.tgz - version: 6.8.3 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.8.1 - created: "2023-01-31T17:19:04.802677835Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.48.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: f1a2c78a9b3f772c4c83b87c03b7f47f26196a6bbdf05863d70df4d09bef7922 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.8.1.tgz - version: 6.8.1 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.8.0 - created: "2023-01-24T15:09:00.114900636Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.48.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 95f3341c10f3262faed38e9d4d1142862cd60bf582effcbccb61c2ffa65d35b2 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.8.0.tgz - version: 6.8.0 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.7.5 - created: "2023-01-19T17:29:12.970156715Z" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.48.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 934286554cadfbc19d9526aef08859d6efe7c142c2aa73c1eb48016c7951a371 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.7.5.tgz - version: 6.7.5 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.7.3 - created: "2023-01-12T14:30:56.243043525-07:00" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.48.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 7fdec3beff2ea95b4bead62c8416009ced1fb86bb1306f3d6ba9ac6495c48aaf - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.7.3.tgz - version: 6.7.3 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.7.0 - created: "2022-12-27T06:55:40.506159282-07:00" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.48.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 1e7f493ef3f11ea726a81520dc7e4555e27fdfb3571dee0e65eb14a3d99f1607 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.7.0.tgz - version: 6.7.0 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.6.2 - created: "2022-12-08T12:25:37.692291081-07:00" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.47.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: cd95c4f9288896b22d0dea947f86fa9a51e065e071b66b47b1c55f7d962cc5f0 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.6.2.tgz - version: 6.6.2 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.6.1 - created: "2022-12-02T01:33:17.976977-05:00" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.47.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 95ab7f7f18aa58b4d3664a9b0068314e41a2efbc55a8b283f533e9c62e80b2f2 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.6.1.tgz - version: 6.6.1 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.6.0 - created: "2022-11-22T14:50:50.481646-05:00" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.46.1 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 8bfe664d47fc336ce23192b1a7674b968c64250610bf4538c49ff662d83a4e11 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.6.0.tgz - version: 6.6.0 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.5.4 - created: "2022-11-14T18:22:50.100762-05:00" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.45.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 4656545fa70430f8912f6694b5a252eafe01cb9f46eefbf320e997a8337281cb - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.5.5.tgz - version: 6.5.5 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.5.3 - created: "2022-11-10T16:43:42.8353-05:00" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.45.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 4613c2a3b6c080502b3a73b3f8a15686c12c47d6304de64ae09a99ae1aaf008e - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.5.4.tgz - version: 6.5.4 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.5.3 - created: "2022-11-08T15:48:58.393503-05:00" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.45.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 5712eb41849f813c45efe49b38dbc20c1c37da3936542642e14a4fb288b269dc - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.5.3.tgz - version: 6.5.3 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.5.2 - created: "2022-11-02T15:38:11.614033-04:00" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.45.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: d0e7729f56e40b9df244333590318964ea6722f3ccf68b782553abfcf2457b20 - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.5.2.tgz - version: 6.5.2 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: GitLab - catalog.cattle.io/release-name: gitlab - apiVersion: v1 - appVersion: 15.5.1 - created: "2022-10-26T11:52:41.472331-04:00" - dependencies: - - name: gitlab - repository: "" - version: '*.*.*' - - name: certmanager-issuer - repository: "" - version: '*.*.*' - - name: minio - repository: "" - version: '*.*.*' - - name: registry - repository: "" - version: '*.*.*' - - alias: certmanager - condition: certmanager.install - name: cert-manager - repository: https://charts.jetstack.io/ - version: 1.5.4 - - condition: prometheus.install - name: prometheus - repository: https://prometheus-community.github.io/helm-charts - version: 15.0.4 - - condition: postgresql.install - name: postgresql - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 8.9.4 - - condition: gitlab-runner.install - name: gitlab-runner - repository: https://charts.gitlab.io/ - version: 0.45.0 - - condition: global.grafana.enabled - name: grafana - repository: https://grafana.github.io/helm-charts - version: 6.11.0 - - condition: redis.install - name: redis - repository: https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami - version: 11.3.4 - - condition: nginx-ingress.enabled - name: nginx-ingress - repository: "" - version: '*.*.*' - description: The One DevOps Platform - digest: 298a47ed09aea141e417fc924a6ba4307d9916aeca535d17e234377635779c3e - home: https://about.gitlab.com/ - icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png - keywords: - - gitlab - maintainers: - - email: support@gitlab.com - name: GitLab Inc. - name: gitlab - sources: - - https://gitlab.com/gitlab-org/charts/gitlab - urls: - - assets/gitlab/gitlab-6.5.1.tgz - version: 6.5.1 + version: 2.5.201 gluu: - annotations: artifacthub.io/changes: | diff --git a/packages/gitlab/gitlab/upstream.yaml b/packages/gitlab/gitlab/upstream.yaml deleted file mode 100644 index 1d1021993..000000000 --- a/packages/gitlab/gitlab/upstream.yaml +++ /dev/null @@ -1,4 +0,0 @@ -HelmRepo: https://charts.gitlab.io -HelmChart: gitlab -Vendor: GitLab -DisplayName: GitLab