From d976aba51d91c18fd03e2457f0e473151282bf18 Mon Sep 17 00:00:00 2001 From: George Taylor Date: Fri, 9 Aug 2024 14:58:28 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20NIT=201402=20alfresco?= =?UTF-8?q?=20use=20stock=20helm=20chart=20(#81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update values for opensearch * add makefile +chart changes * Update values.yaml * Update values.yaml * update makefile * Update values.yaml * Update values.yaml * Update values.yaml * vars * Update values.yaml * Update values.yaml * images * config map * Revert "config map" This reverts commit e714ada49d662efc0f1975ab82d74d1c380d5592. * Reapply "config map" This reverts commit c47acb8b104e93bacb2fe666b342cb1e5b9aa28d. * config map * images * Squashed commit of the following: commit 6cda4f5909b44b8079126ed1c9ba53260a6e53fd Merge: a682b79 ca20a8c Author: George Taylor Date: Tue Jul 16 15:03:01 2024 +0100 Merge pull request #75 from ministryofjustice/fix-ingress-share-real Revert share ingress to dedicated hostname + enable redirect to /share commit ca20a8ce61135215f6a9446366c1685e4a44ee39 Author: George Taylor Date: Tue Jul 16 13:15:37 2024 +0100 redirect to /share commit a682b79d5b3357fc69bbb51ec98451ff7e7f7391 Merge: 066cecc 1780e23 Author: George Taylor Date: Tue Jul 16 11:23:05 2024 +0100 Merge pull request #74 from ministryofjustice/remove-share-sub-domain Remove share subdomain commit 1780e23e1d16e1f930fb70bb673952aeb6f74ad4 Author: George Taylor Date: Tue Jul 16 11:21:18 2024 +0100 remove share subdomain commit 066cecce0b371960c18c44a1df65a20ae3f4f3f9 Merge: 4d23e4b b21f656 Author: George Taylor Date: Thu Jul 11 15:36:49 2024 +0100 Merge pull request #73 from ministryofjustice/workflow-changes Update cloud-platform-deploy-release.yml commit b21f656110c1056f3bc502a429952e67e4a0ccd4 Author: George Taylor Date: Thu Jul 11 15:35:57 2024 +0100 Update cloud-platform-deploy-release.yml commit 4d23e4b37106f7124e5bab722e0e685bc1574127 Merge: 6aeb967 ca1cfb2 Author: George Taylor Date: Thu Jul 11 15:09:57 2024 +0100 Merge pull request #72 from ministryofjustice/add-airflow-ips chore: Add templated directory to .gitignore and update IP whitelist in values files commit ca1cfb2c87cbf0cb5e1903bef89a637f91dd537c Author: George Taylor Date: Thu Jul 11 15:08:14 2024 +0100 chore: Add templated directory to .gitignore and update IP whitelist in values files commit 6aeb96763b76dba46d040a826b35cf5253788e6a Merge: f6a7c0e 540fe64 Author: Prem Basumatary <142879429+pbasumatary@users.noreply.github.com> Date: Fri Jul 5 09:10:27 2024 +0100 Merge pull request #71 from ministryofjustice/NIT-1305-custom-scaling-times NIT-1305 fix error in script commit 540fe64dded67378e5e22b9ecd24f6cf50805e26 Author: Prem Basumatary Date: Fri Jul 5 09:03:12 2024 +0100 NIT-1305 fix error in script * Update ingress-share.yaml * vals * kustomize base * ingress * setup makefiel * ingress poc patches * correct poc ingress * Update values.yaml * update for helm values mergign * updates * kustomization base * rearrange patching for ingress to repeat less * fix ingress patching with allow list * :fire: remove alf charts * rename values files --- .gitignore | 2 + alfresco-content-services/7.0.N_values.yaml | 57 - alfresco-content-services/7.1.N_values.yaml | 75 - alfresco-content-services/7.2.N_values.yaml | 73 - alfresco-content-services/7.3.N_values.yaml | 76 - alfresco-content-services/Chart.lock | 27 - alfresco-content-services/Chart.yaml | 49 - alfresco-content-services/README.md | 361 --- alfresco-content-services/README.md.gotmpl | 42 - .../charts/activemq/.helmignore | 23 - .../charts/activemq/Chart.lock | 6 - .../charts/activemq/Chart.yaml | 16 - .../charts/activemq/README.md | 62 - .../charts/activemq/README.md.gotmpl | 16 - .../charts/alfresco-common/.helmignore | 25 - .../charts/alfresco-common/Chart.lock | 6 - .../charts/alfresco-common/Chart.yaml | 11 - .../activemq/charts/alfresco-common/README.md | 15 - .../charts/alfresco-common/README.md.gotmpl | 18 - .../alfresco-common/charts/common/.helmignore | 22 - .../alfresco-common/charts/common/Chart.yaml | 23 - .../alfresco-common/charts/common/README.md | 350 --- .../charts/common/templates/_affinities.tpl | 102 - .../charts/common/templates/_capabilities.tpl | 154 -- .../charts/common/templates/_errors.tpl | 23 - .../charts/common/templates/_images.tpl | 75 - .../charts/common/templates/_ingress.tpl | 68 - .../charts/common/templates/_labels.tpl | 18 - .../charts/common/templates/_names.tpl | 70 - .../charts/common/templates/_secrets.tpl | 140 -- .../charts/common/templates/_storage.tpl | 23 - .../charts/common/templates/_tplvalues.tpl | 13 - .../charts/common/templates/_utils.tpl | 62 - .../charts/common/templates/_warnings.tpl | 14 - .../templates/validations/_cassandra.tpl | 72 - .../common/templates/validations/_mariadb.tpl | 103 - .../common/templates/validations/_mongodb.tpl | 108 - .../common/templates/validations/_mysql.tpl | 103 - .../templates/validations/_postgresql.tpl | 129 - .../common/templates/validations/_redis.tpl | 76 - .../templates/validations/_validations.tpl | 46 - .../alfresco-common/charts/common/values.yaml | 5 - .../templates/_helpers-activemq.tpl | 25 - .../templates/_helpers-image-pull-secrets.tpl | 6 - .../templates/_helpers-persistence.tpl | 41 - .../templates/_helpers-search.tpl | 46 - .../templates/_helpers-security.tpl | 32 - .../alfresco-common/templates/_helpers.tpl | 9 - .../charts/activemq/templates/_helpers.tpl | 62 - .../templates/deployment-activemq.yaml | 89 - .../activemq/templates/pvc-activemq.yaml | 3 - .../activemq/templates/secret-activemq.yaml | 12 - .../templates/svc-activemq-broker.yaml | 23 - .../templates/svc-activemq-web-console.yaml | 15 - .../tests/deployment-activemq_test.yaml | 37 - .../activemq/tests/pvc-activemq_test.yaml | 64 - .../activemq/tests/svc-activemq_test.yaml | 20 - .../charts/activemq/values.yaml | 69 - .../charts/alfresco-common/.helmignore | 25 - .../charts/alfresco-common/Chart.lock | 6 - .../charts/alfresco-common/Chart.yaml | 11 - .../charts/alfresco-common/README.md | 15 - .../charts/alfresco-common/README.md.gotmpl | 18 - .../alfresco-common/charts/common/.helmignore | 22 - .../alfresco-common/charts/common/Chart.yaml | 23 - .../alfresco-common/charts/common/README.md | 350 --- .../charts/common/templates/_affinities.tpl | 102 - .../charts/common/templates/_capabilities.tpl | 154 -- .../charts/common/templates/_errors.tpl | 23 - .../charts/common/templates/_images.tpl | 75 - .../charts/common/templates/_ingress.tpl | 68 - .../charts/common/templates/_labels.tpl | 18 - .../charts/common/templates/_names.tpl | 70 - .../charts/common/templates/_secrets.tpl | 140 -- .../charts/common/templates/_storage.tpl | 23 - .../charts/common/templates/_tplvalues.tpl | 13 - .../charts/common/templates/_utils.tpl | 62 - .../charts/common/templates/_warnings.tpl | 14 - .../templates/validations/_cassandra.tpl | 72 - .../common/templates/validations/_mariadb.tpl | 103 - .../common/templates/validations/_mongodb.tpl | 108 - .../common/templates/validations/_mysql.tpl | 103 - .../templates/validations/_postgresql.tpl | 129 - .../common/templates/validations/_redis.tpl | 76 - .../templates/validations/_validations.tpl | 46 - .../alfresco-common/charts/common/values.yaml | 5 - .../templates/_helpers-activemq.tpl | 17 - .../templates/_helpers-image-pull-secrets.tpl | 6 - .../templates/_helpers-persistence.tpl | 41 - .../templates/_helpers-search.tpl | 17 - .../templates/_helpers-security.tpl | 32 - .../alfresco-common/templates/_helpers.tpl | 9 - .../charts/alfresco-common/values.yaml | 0 .../alfresco-search-enterprise/.helmignore | 29 - .../alfresco-search-enterprise/Chart.lock | 12 - .../alfresco-search-enterprise/Chart.yaml | 18 - .../alfresco-search-enterprise/README.md | 93 - .../charts/activemq/.helmignore | 23 - .../charts/activemq/Chart.lock | 6 - .../charts/activemq/Chart.yaml | 16 - .../charts/activemq/README.md | 62 - .../charts/activemq/README.md.gotmpl | 16 - .../charts/alfresco-common/.helmignore | 25 - .../charts/alfresco-common/Chart.lock | 6 - .../charts/alfresco-common/Chart.yaml | 11 - .../activemq/charts/alfresco-common/README.md | 15 - .../charts/alfresco-common/README.md.gotmpl | 18 - .../alfresco-common/charts/common/.helmignore | 22 - .../alfresco-common/charts/common/Chart.yaml | 23 - .../alfresco-common/charts/common/README.md | 350 --- .../charts/common/templates/_affinities.tpl | 102 - .../charts/common/templates/_capabilities.tpl | 154 -- .../charts/common/templates/_errors.tpl | 23 - .../charts/common/templates/_images.tpl | 75 - .../charts/common/templates/_ingress.tpl | 68 - .../charts/common/templates/_labels.tpl | 18 - .../charts/common/templates/_names.tpl | 70 - .../charts/common/templates/_secrets.tpl | 140 -- .../charts/common/templates/_storage.tpl | 23 - .../charts/common/templates/_tplvalues.tpl | 13 - .../charts/common/templates/_utils.tpl | 62 - .../charts/common/templates/_warnings.tpl | 14 - .../templates/validations/_cassandra.tpl | 72 - .../common/templates/validations/_mariadb.tpl | 103 - .../common/templates/validations/_mongodb.tpl | 108 - .../common/templates/validations/_mysql.tpl | 103 - .../templates/validations/_postgresql.tpl | 129 - .../common/templates/validations/_redis.tpl | 76 - .../templates/validations/_validations.tpl | 46 - .../alfresco-common/charts/common/values.yaml | 5 - .../templates/_helpers-activemq.tpl | 25 - .../templates/_helpers-image-pull-secrets.tpl | 6 - .../templates/_helpers-persistence.tpl | 41 - .../templates/_helpers-search.tpl | 46 - .../templates/_helpers-security.tpl | 32 - .../alfresco-common/templates/_helpers.tpl | 9 - .../charts/alfresco-common/values.yaml | 0 .../charts/activemq/templates/_helpers.tpl | 62 - .../templates/deployment-activemq.yaml | 89 - .../activemq/templates/pvc-activemq.yaml | 3 - .../activemq/templates/secret-activemq.yaml | 12 - .../templates/svc-activemq-broker.yaml | 23 - .../templates/svc-activemq-web-console.yaml | 15 - .../tests/deployment-activemq_test.yaml | 37 - .../activemq/tests/pvc-activemq_test.yaml | 64 - .../activemq/tests/svc-activemq_test.yaml | 20 - .../charts/activemq/values.yaml | 69 - .../charts/alfresco-common/.helmignore | 25 - .../charts/alfresco-common/Chart.lock | 6 - .../charts/alfresco-common/Chart.yaml | 11 - .../charts/alfresco-common/README.md | 15 - .../charts/alfresco-common/README.md.gotmpl | 18 - .../alfresco-common/charts/common/.helmignore | 22 - .../alfresco-common/charts/common/Chart.yaml | 23 - .../alfresco-common/charts/common/README.md | 350 --- .../charts/common/templates/_affinities.tpl | 102 - .../charts/common/templates/_capabilities.tpl | 154 -- .../charts/common/templates/_errors.tpl | 23 - .../charts/common/templates/_images.tpl | 75 - .../charts/common/templates/_ingress.tpl | 68 - .../charts/common/templates/_labels.tpl | 18 - .../charts/common/templates/_names.tpl | 70 - .../charts/common/templates/_secrets.tpl | 140 -- .../charts/common/templates/_storage.tpl | 23 - .../charts/common/templates/_tplvalues.tpl | 13 - .../charts/common/templates/_utils.tpl | 62 - .../charts/common/templates/_warnings.tpl | 14 - .../templates/validations/_cassandra.tpl | 72 - .../common/templates/validations/_mariadb.tpl | 103 - .../common/templates/validations/_mongodb.tpl | 108 - .../common/templates/validations/_mysql.tpl | 103 - .../templates/validations/_postgresql.tpl | 129 - .../common/templates/validations/_redis.tpl | 76 - .../templates/validations/_validations.tpl | 46 - .../alfresco-common/charts/common/values.yaml | 5 - .../templates/_helpers-activemq.tpl | 17 - .../templates/_helpers-image-pull-secrets.tpl | 6 - .../templates/_helpers-persistence.tpl | 41 - .../templates/_helpers-search.tpl | 17 - .../templates/_helpers-security.tpl | 32 - .../alfresco-common/templates/_helpers.tpl | 9 - .../charts/alfresco-common/values.yaml | 0 .../charts/elasticsearch/.helmignore | 2 - .../charts/elasticsearch/Chart.yaml | 12 - .../charts/elasticsearch/Makefile | 1 - .../charts/elasticsearch/README.md | 459 ---- .../elasticsearch/examples/config/Makefile | 21 - .../elasticsearch/examples/config/README.md | 27 - .../examples/config/test/goss.yaml | 29 - .../elasticsearch/examples/config/values.yaml | 27 - .../examples/config/watcher_encryption_key | 1 - .../elasticsearch/examples/default/Makefile | 14 - .../elasticsearch/examples/default/README.md | 25 - .../examples/default/rolling_upgrade.sh | 19 - .../examples/default/test/goss.yaml | 38 - .../examples/docker-for-mac/Makefile | 13 - .../examples/docker-for-mac/README.md | 23 - .../examples/docker-for-mac/values.yaml | 23 - .../examples/kubernetes-kind/Makefile | 17 - .../examples/kubernetes-kind/README.md | 36 - .../kubernetes-kind/values-local-path.yaml | 23 - .../examples/kubernetes-kind/values.yaml | 23 - .../elasticsearch/examples/microk8s/Makefile | 13 - .../elasticsearch/examples/microk8s/README.md | 32 - .../examples/microk8s/values.yaml | 32 - .../elasticsearch/examples/migration/Makefile | 10 - .../examples/migration/README.md | 167 -- .../examples/migration/client.yaml | 23 - .../examples/migration/data.yaml | 17 - .../examples/migration/master.yaml | 26 - .../elasticsearch/examples/minikube/Makefile | 13 - .../elasticsearch/examples/minikube/README.md | 38 - .../examples/minikube/values.yaml | 23 - .../elasticsearch/examples/multi/Makefile | 19 - .../elasticsearch/examples/multi/README.md | 29 - .../elasticsearch/examples/multi/client.yaml | 14 - .../elasticsearch/examples/multi/data.yaml | 11 - .../elasticsearch/examples/multi/master.yaml | 11 - .../examples/multi/test/goss.yaml | 9 - .../examples/networkpolicy/Makefile | 14 - .../examples/networkpolicy/values.yaml | 37 - .../elasticsearch/examples/openshift/Makefile | 13 - .../examples/openshift/README.md | 24 - .../examples/openshift/test/goss.yaml | 16 - .../examples/openshift/values.yaml | 11 - .../elasticsearch/examples/security/Makefile | 38 - .../elasticsearch/examples/security/README.md | 29 - .../examples/security/test/goss.yaml | 44 - .../examples/security/values.yaml | 33 - .../elasticsearch/examples/upgrade/Makefile | 16 - .../elasticsearch/examples/upgrade/README.md | 17 - .../examples/upgrade/scripts/upgrade.sh | 76 - .../examples/upgrade/test/goss.yaml | 16 - .../examples/upgrade/values.yaml | 2 - .../charts/elasticsearch/templates/NOTES.txt | 6 - .../elasticsearch/templates/_helpers.tpl | 84 - .../elasticsearch/templates/configmap.yaml | 34 - .../elasticsearch/templates/ingress.yaml | 64 - .../templates/networkpolicy.yaml | 61 - .../templates/poddisruptionbudget.yaml | 15 - .../templates/podsecuritypolicy.yaml | 18 - .../charts/elasticsearch/templates/role.yaml | 25 - .../elasticsearch/templates/rolebinding.yaml | 20 - .../elasticsearch/templates/service.yaml | 78 - .../templates/serviceaccount.yaml | 16 - .../elasticsearch/templates/statefulset.yaml | 390 --- .../test/test-elasticsearch-health.yaml | 36 - .../charts/elasticsearch/values.yaml | 355 --- .../templates/_helpers-elasticsearch.tpl | 27 - .../templates/_helpers.tpl | 51 - .../templates/liveindexing-config.yaml | 19 - .../templates/liveindexing-deployment.yaml | 75 - .../templates/reindexing-config.yaml | 22 - .../templates/reindexing-job.yaml | 77 - .../templates/secret-database.yaml | 12 - .../templates/secret-elasticsearch.yaml | 12 - .../templates/secret-messagebroker.yaml | 19 - .../alfresco-search-enterprise/values.yaml | 131 - .../charts/alfresco-search-service/Chart.lock | 9 - .../charts/alfresco-search-service/Chart.yaml | 26 - .../charts/alfresco-search-service/README.md | 75 - .../alfresco-search-service/README.md.gotmpl | 18 - .../charts/alfresco-common/.helmignore | 25 - .../charts/alfresco-common/Chart.lock | 6 - .../charts/alfresco-common/Chart.yaml | 11 - .../charts/alfresco-common/README.md | 15 - .../charts/alfresco-common/README.md.gotmpl | 18 - .../alfresco-common/charts/common/.helmignore | 22 - .../alfresco-common/charts/common/Chart.yaml | 23 - .../alfresco-common/charts/common/README.md | 350 --- .../charts/common/templates/_affinities.tpl | 102 - .../charts/common/templates/_capabilities.tpl | 154 -- .../charts/common/templates/_errors.tpl | 23 - .../charts/common/templates/_images.tpl | 75 - .../charts/common/templates/_ingress.tpl | 68 - .../charts/common/templates/_labels.tpl | 18 - .../charts/common/templates/_names.tpl | 70 - .../charts/common/templates/_secrets.tpl | 140 -- .../charts/common/templates/_storage.tpl | 23 - .../charts/common/templates/_tplvalues.tpl | 13 - .../charts/common/templates/_utils.tpl | 62 - .../charts/common/templates/_warnings.tpl | 14 - .../templates/validations/_cassandra.tpl | 72 - .../common/templates/validations/_mariadb.tpl | 103 - .../common/templates/validations/_mongodb.tpl | 108 - .../common/templates/validations/_mysql.tpl | 103 - .../templates/validations/_postgresql.tpl | 129 - .../common/templates/validations/_redis.tpl | 76 - .../templates/validations/_validations.tpl | 46 - .../alfresco-common/charts/common/values.yaml | 5 - .../templates/_helpers-activemq.tpl | 17 - .../templates/_helpers-image-pull-secrets.tpl | 6 - .../templates/_helpers-persistence.tpl | 41 - .../templates/_helpers-search.tpl | 17 - .../templates/_helpers-security.tpl | 32 - .../alfresco-common/templates/_helpers.tpl | 9 - .../charts/alfresco-common/values.yaml | 0 .../alfresco-insight-zeppelin/Chart.lock | 6 - .../alfresco-insight-zeppelin/Chart.yaml | 18 - .../alfresco-insight-zeppelin/README.md | 52 - .../README.md.gotmpl | 18 - .../templates/_helpers.tpl | 28 - .../templates/config.yaml | 17 - .../templates/deployment.yaml | 58 - .../templates/ingress.yaml | 17 - .../templates/service.yaml | 20 - .../tests/config_test.yaml | 30 - .../tests/deployment_test.yaml | 23 - .../alfresco-insight-zeppelin/values.yaml | 52 - .../ci/default-values.yaml | 7 - .../templates/NOTES.txt | 30 - .../templates/_helpers.tpl | 69 - .../templates/config.yaml | 25 - .../templates/deployment.yaml | 94 - .../templates/ingress.yaml | 36 - .../templates/pvc.yaml | 49 - .../templates/secret-ingress.yaml | 12 - .../templates/secret-solr-jtoolopt.yaml | 12 - .../templates/service.yaml | 19 - .../tests/config_test.yaml | 58 - .../tests/deployment_test.yaml | 28 - .../tests/ingress_test.yaml | 33 - .../tests/resources_test.yaml | 26 - .../tests/secret-ingress_test.yaml | 34 - .../tests/secret-solr-jtoolopt_test.yaml | 22 - .../tests/values/ingress.yaml | 4 - .../tests/values/test_values.yaml | 5 - .../alfresco-search-service/values.yaml | 146 -- .../charts/alfresco-sync-service/Chart.lock | 15 - .../charts/alfresco-sync-service/Chart.yaml | 27 - .../charts/alfresco-sync-service/README.md | 78 - .../alfresco-sync-service/README.md.gotmpl | 18 - .../charts/activemq/.helmignore | 23 - .../charts/activemq/Chart.lock | 6 - .../charts/activemq/Chart.yaml | 16 - .../charts/activemq/README.md | 62 - .../charts/activemq/README.md.gotmpl | 16 - .../charts/alfresco-common/.helmignore | 25 - .../charts/alfresco-common/Chart.lock | 6 - .../charts/alfresco-common/Chart.yaml | 11 - .../activemq/charts/alfresco-common/README.md | 15 - .../charts/alfresco-common/README.md.gotmpl | 18 - .../alfresco-common/charts/common/.helmignore | 22 - .../alfresco-common/charts/common/Chart.yaml | 23 - .../alfresco-common/charts/common/README.md | 350 --- .../charts/common/templates/_affinities.tpl | 102 - .../charts/common/templates/_capabilities.tpl | 154 -- .../charts/common/templates/_errors.tpl | 23 - .../charts/common/templates/_images.tpl | 75 - .../charts/common/templates/_ingress.tpl | 68 - .../charts/common/templates/_labels.tpl | 18 - .../charts/common/templates/_names.tpl | 70 - .../charts/common/templates/_secrets.tpl | 140 -- .../charts/common/templates/_storage.tpl | 23 - .../charts/common/templates/_tplvalues.tpl | 13 - .../charts/common/templates/_utils.tpl | 62 - .../charts/common/templates/_warnings.tpl | 14 - .../templates/validations/_cassandra.tpl | 72 - .../common/templates/validations/_mariadb.tpl | 103 - .../common/templates/validations/_mongodb.tpl | 108 - .../common/templates/validations/_mysql.tpl | 103 - .../templates/validations/_postgresql.tpl | 129 - .../common/templates/validations/_redis.tpl | 76 - .../templates/validations/_validations.tpl | 46 - .../alfresco-common/charts/common/values.yaml | 5 - .../templates/_helpers-activemq.tpl | 25 - .../templates/_helpers-image-pull-secrets.tpl | 6 - .../templates/_helpers-persistence.tpl | 41 - .../templates/_helpers-search.tpl | 46 - .../templates/_helpers-security.tpl | 32 - .../alfresco-common/templates/_helpers.tpl | 9 - .../charts/alfresco-common/values.yaml | 0 .../charts/activemq/templates/_helpers.tpl | 62 - .../templates/deployment-activemq.yaml | 89 - .../activemq/templates/pvc-activemq.yaml | 3 - .../activemq/templates/secret-activemq.yaml | 12 - .../templates/svc-activemq-broker.yaml | 23 - .../templates/svc-activemq-web-console.yaml | 15 - .../tests/deployment-activemq_test.yaml | 37 - .../activemq/tests/pvc-activemq_test.yaml | 64 - .../activemq/tests/svc-activemq_test.yaml | 20 - .../charts/activemq/values.yaml | 69 - .../charts/alfresco-common/.helmignore | 25 - .../charts/alfresco-common/Chart.lock | 6 - .../charts/alfresco-common/Chart.yaml | 11 - .../charts/alfresco-common/README.md | 15 - .../charts/alfresco-common/README.md.gotmpl | 18 - .../alfresco-common/charts/common/.helmignore | 22 - .../alfresco-common/charts/common/Chart.yaml | 23 - .../alfresco-common/charts/common/README.md | 350 --- .../charts/common/templates/_affinities.tpl | 102 - .../charts/common/templates/_capabilities.tpl | 154 -- .../charts/common/templates/_errors.tpl | 23 - .../charts/common/templates/_images.tpl | 75 - .../charts/common/templates/_ingress.tpl | 68 - .../charts/common/templates/_labels.tpl | 18 - .../charts/common/templates/_names.tpl | 70 - .../charts/common/templates/_secrets.tpl | 140 -- .../charts/common/templates/_storage.tpl | 23 - .../charts/common/templates/_tplvalues.tpl | 13 - .../charts/common/templates/_utils.tpl | 62 - .../charts/common/templates/_warnings.tpl | 14 - .../templates/validations/_cassandra.tpl | 72 - .../common/templates/validations/_mariadb.tpl | 103 - .../common/templates/validations/_mongodb.tpl | 108 - .../common/templates/validations/_mysql.tpl | 103 - .../templates/validations/_postgresql.tpl | 129 - .../common/templates/validations/_redis.tpl | 76 - .../templates/validations/_validations.tpl | 46 - .../alfresco-common/charts/common/values.yaml | 5 - .../templates/_helpers-activemq.tpl | 17 - .../templates/_helpers-image-pull-secrets.tpl | 6 - .../templates/_helpers-persistence.tpl | 41 - .../templates/_helpers-search.tpl | 17 - .../templates/_helpers-security.tpl | 32 - .../alfresco-common/templates/_helpers.tpl | 9 - .../charts/alfresco-common/values.yaml | 0 .../charts/common/.helmignore | 22 - .../charts/common/Chart.yaml | 23 - .../charts/common/README.md | 235 -- .../charts/common/templates/_affinities.tpl | 106 - .../charts/common/templates/_capabilities.tpl | 180 -- .../charts/common/templates/_errors.tpl | 23 - .../charts/common/templates/_images.tpl | 80 - .../charts/common/templates/_ingress.tpl | 68 - .../charts/common/templates/_labels.tpl | 18 - .../charts/common/templates/_names.tpl | 66 - .../charts/common/templates/_secrets.tpl | 165 -- .../charts/common/templates/_storage.tpl | 23 - .../charts/common/templates/_tplvalues.tpl | 13 - .../charts/common/templates/_utils.tpl | 62 - .../charts/common/templates/_warnings.tpl | 14 - .../templates/validations/_cassandra.tpl | 72 - .../common/templates/validations/_mariadb.tpl | 103 - .../common/templates/validations/_mongodb.tpl | 108 - .../common/templates/validations/_mysql.tpl | 103 - .../templates/validations/_postgresql.tpl | 129 - .../common/templates/validations/_redis.tpl | 76 - .../templates/validations/_validations.tpl | 46 - .../charts/common/values.yaml | 5 - .../charts/postgresql/.helmignore | 21 - .../charts/postgresql/Chart.lock | 6 - .../charts/postgresql/Chart.yaml | 30 - .../charts/postgresql/README.md | 683 ------ .../postgresql/charts/common/.helmignore | 22 - .../postgresql/charts/common/Chart.yaml | 23 - .../charts/postgresql/charts/common/README.md | 235 -- .../charts/common/templates/_affinities.tpl | 106 - .../charts/common/templates/_capabilities.tpl | 180 -- .../charts/common/templates/_errors.tpl | 23 - .../charts/common/templates/_images.tpl | 80 - .../charts/common/templates/_ingress.tpl | 68 - .../charts/common/templates/_labels.tpl | 18 - .../charts/common/templates/_names.tpl | 66 - .../charts/common/templates/_secrets.tpl | 165 -- .../charts/common/templates/_storage.tpl | 23 - .../charts/common/templates/_tplvalues.tpl | 13 - .../charts/common/templates/_utils.tpl | 62 - .../charts/common/templates/_warnings.tpl | 14 - .../templates/validations/_cassandra.tpl | 72 - .../common/templates/validations/_mariadb.tpl | 103 - .../common/templates/validations/_mongodb.tpl | 108 - .../common/templates/validations/_mysql.tpl | 103 - .../templates/validations/_postgresql.tpl | 129 - .../common/templates/validations/_redis.tpl | 76 - .../templates/validations/_validations.tpl | 46 - .../postgresql/charts/common/values.yaml | 5 - .../charts/postgresql/templates/NOTES.txt | 91 - .../charts/postgresql/templates/_helpers.tpl | 399 --- .../postgresql/templates/extra-list.yaml | 4 - .../templates/networkpolicy-egress.yaml | 32 - .../templates/primary/configmap.yaml | 24 - .../templates/primary/extended-configmap.yaml | 18 - .../primary/initialization-configmap.yaml | 15 - .../templates/primary/metrics-configmap.yaml | 16 - .../templates/primary/metrics-svc.yaml | 33 - .../templates/primary/networkpolicy.yaml | 57 - .../templates/primary/servicemonitor.yaml | 48 - .../templates/primary/statefulset.yaml | 640 ----- .../templates/primary/svc-headless.yaml | 37 - .../postgresql/templates/primary/svc.yaml | 53 - .../postgresql/templates/prometheusrule.yaml | 22 - .../charts/postgresql/templates/psp.yaml | 41 - .../templates/read/extended-configmap.yaml | 18 - .../templates/read/metrics-configmap.yaml | 16 - .../templates/read/metrics-svc.yaml | 33 - .../templates/read/networkpolicy.yaml | 36 - .../templates/read/servicemonitor.yaml | 48 - .../templates/read/statefulset.yaml | 537 ---- .../templates/read/svc-headless.yaml | 39 - .../charts/postgresql/templates/read/svc.yaml | 55 - .../charts/postgresql/templates/role.yaml | 31 - .../postgresql/templates/rolebinding.yaml | 22 - .../charts/postgresql/templates/secrets.yaml | 103 - .../postgresql/templates/serviceaccount.yaml | 19 - .../postgresql/templates/tls-secrets.yaml | 28 - .../charts/postgresql/values.schema.json | 156 -- .../charts/postgresql/values.yaml | 1425 ----------- .../ci/default-values.yaml | 10 - .../ci/kustomize/authentication | 5 - .../alfresco-sync-service/ci/kustomize/config | 22 - .../ci/kustomize/httpd.conf | 24 - .../ci/kustomize/kustomization.yaml | 18 - .../ci/kustomize/values.yaml | 6 - .../alfresco-sync-service/templates/NOTES.txt | 45 - .../templates/_helpers-db.tpl | 51 - .../templates/_helpers-mq.tpl | 46 - .../templates/_helpers.tpl | 59 - .../templates/config-syncservice.yaml | 21 - .../templates/deployment-syncservice.yaml | 63 - .../templates/ingress.yaml | 40 - .../templates/secret-database.yaml | 10 - .../templates/secret-message-broker.yaml | 13 - .../templates/svc-syncservice.yaml | 15 - .../tests/database_test.yaml | 55 - .../tests/deployment-syncservice_test.yaml | 30 - .../alfresco-sync-service/tests/mq_test.yaml | 80 - .../tests/repo_test.yaml | 50 - .../charts/alfresco-sync-service/values.yaml | 140 -- .../charts/common/.helmignore | 23 - .../charts/common/Chart.yaml | 7 - .../charts/common/Makefile | 68 - .../charts/common/README.md | 151 -- .../charts/common/templates/NOTES.txt | 3 - .../charts/common/templates/_backend_env.yaml | 117 - .../charts/common/templates/_deployment.yaml | 170 -- .../common/templates/_deployment_head.yaml | 8 - .../common/templates/_frontend_env.yaml | 17 - .../charts/common/templates/_global.tpl | 174 -- .../charts/common/templates/_helpers.tpl | 46 - .../charts/common/templates/_hpa.tpl | 49 - .../charts/common/templates/_ingress.tpl | 132 - .../charts/common/templates/_ingress.yaml | 63 - .../charts/common/templates/_messaging.tpl | 38 - .../charts/common/templates/_probes.yaml | 21 - .../charts/common/templates/_service.yaml | 33 - .../charts/common/templates/_util.tpl | 15 - .../charts/common/templates/_values.tpl | 12 - .../charts/common/templates/deployment.yaml | 5 - .../charts/common/templates/hpa.yaml | 5 - .../charts/common/templates/ingress.yaml | 5 - .../charts/common/templates/service.yaml | 5 - .../common/tests/deployment-config_test.yaml | 154 -- .../common/tests/deployment-kafka_test.yaml | 73 - ...eployment-messaging-destinations_test.yaml | 58 - .../tests/deployment-rabbitmq_test.yaml | 155 -- .../charts/common/tests/deployment_test.yaml | 216 -- .../charts/common/tests/env_test.yaml | 33 - .../charts/common/tests/extraEnv_test.yaml | 37 - .../tests/extraInitContainers_test.yaml | 16 - .../common/tests/extraVolumeMounts_test.yaml | 16 - .../charts/common/tests/hpa_test.yaml | 142 -- .../charts/common/tests/ingress_test.yaml | 32 - .../common/tests/initContainers_test.yaml | 16 - .../charts/common/tests/javaOpts_test.yaml | 30 - .../common/tests/podAnnotations_test.yaml | 13 - .../charts/common/tests/podLabels_test.yaml | 13 - .../charts/common/tests/service_test.yaml | 27 - .../charts/common/tests/sidecars_test.yaml | 16 - .../tests/values/consumer-partitioned.yaml | 7 - .../charts/common/tests/values/kafka.yaml | 12 - .../tests/values/messaging-destinations.yaml | 19 - .../charts/common/tests/values/rabbitmq.yaml | 13 - .../common/tests/volumeMounts_test.yaml | 16 - .../charts/common/tests/volumes_test.yaml | 16 - .../charts/common/values.yaml | 333 --- .../charts/postgresql/.helmignore | 21 - .../charts/postgresql/Chart.lock | 6 - .../charts/postgresql/Chart.yaml | 30 - .../charts/postgresql/README.md | 683 ------ .../postgresql/charts/common/.helmignore | 22 - .../postgresql/charts/common/Chart.yaml | 23 - .../charts/postgresql/charts/common/README.md | 235 -- .../charts/common/templates/_affinities.tpl | 106 - .../charts/common/templates/_capabilities.tpl | 180 -- .../charts/common/templates/_errors.tpl | 23 - .../charts/common/templates/_images.tpl | 80 - .../charts/common/templates/_ingress.tpl | 68 - .../charts/common/templates/_labels.tpl | 18 - .../charts/common/templates/_names.tpl | 66 - .../charts/common/templates/_secrets.tpl | 165 -- .../charts/common/templates/_storage.tpl | 23 - .../charts/common/templates/_tplvalues.tpl | 13 - .../charts/common/templates/_utils.tpl | 62 - .../charts/common/templates/_warnings.tpl | 14 - .../templates/validations/_cassandra.tpl | 72 - .../common/templates/validations/_mariadb.tpl | 103 - .../common/templates/validations/_mongodb.tpl | 108 - .../common/templates/validations/_mysql.tpl | 103 - .../templates/validations/_postgresql.tpl | 129 - .../common/templates/validations/_redis.tpl | 76 - .../templates/validations/_validations.tpl | 46 - .../postgresql/charts/common/values.yaml | 5 - .../charts/postgresql/templates/NOTES.txt | 91 - .../charts/postgresql/templates/_helpers.tpl | 399 --- .../postgresql/templates/extra-list.yaml | 4 - .../templates/networkpolicy-egress.yaml | 32 - .../templates/primary/configmap.yaml | 24 - .../templates/primary/extended-configmap.yaml | 18 - .../primary/initialization-configmap.yaml | 15 - .../templates/primary/metrics-configmap.yaml | 16 - .../templates/primary/metrics-svc.yaml | 33 - .../templates/primary/networkpolicy.yaml | 57 - .../templates/primary/servicemonitor.yaml | 48 - .../templates/primary/statefulset.yaml | 640 ----- .../templates/primary/svc-headless.yaml | 37 - .../postgresql/templates/primary/svc.yaml | 53 - .../postgresql/templates/prometheusrule.yaml | 22 - .../charts/postgresql/templates/psp.yaml | 41 - .../templates/read/extended-configmap.yaml | 18 - .../templates/read/metrics-configmap.yaml | 16 - .../templates/read/metrics-svc.yaml | 33 - .../templates/read/networkpolicy.yaml | 36 - .../templates/read/servicemonitor.yaml | 48 - .../templates/read/statefulset.yaml | 537 ---- .../templates/read/svc-headless.yaml | 39 - .../charts/postgresql/templates/read/svc.yaml | 55 - .../charts/postgresql/templates/role.yaml | 31 - .../postgresql/templates/rolebinding.yaml | 22 - .../charts/postgresql/templates/secrets.yaml | 103 - .../postgresql/templates/serviceaccount.yaml | 19 - .../postgresql/templates/tls-secrets.yaml | 28 - .../charts/postgresql/values.schema.json | 156 -- .../charts/postgresql/values.yaml | 1425 ----------- .../community_values.yaml | 65 - alfresco-content-services/templates/NOTES.txt | 45 - .../templates/_helpers-ai-transformer.tpl | 11 - .../templates/_helpers-elasticsearch.tpl | 11 - .../templates/_helpers-filestore.tpl | 11 - .../templates/_helpers-imagemagick.tpl | 11 - .../templates/_helpers-ingress.tpl | 30 - .../templates/_helpers-libreoffice.tpl | 11 - .../templates/_helpers-ms-teams-service.tpl | 11 - .../templates/_helpers-ooi-service.tpl | 11 - .../templates/_helpers-pdfrenderer.tpl | 11 - .../templates/_helpers-repository.tpl | 30 - .../templates/_helpers-search.tpl | 32 - .../templates/_helpers-share.tpl | 11 - .../templates/_helpers-tika.tpl | 11 - .../templates/_helpers-transform-misc.tpl | 11 - .../templates/_helpers-transform-router.tpl | 11 - .../templates/_helpers-url.tpl | 35 - .../templates/_helpers.tpl | 17 - .../templates/config-ai-transformer.yaml | 26 - .../config-dev-log4j-properties.yaml | 19 - .../templates/config-email.yaml | 13 - .../templates/config-filestore.yaml | 18 - .../templates/config-imagemagick.yaml | 19 - .../templates/config-libreoffice.yaml | 19 - .../templates/config-ms-teams-service.yaml | 24 - .../templates/config-ooi-service.yaml | 16 - .../templates/config-pdfrenderer.yaml | 19 - .../templates/config-repository.yaml | 147 -- .../templates/config-share.yaml | 20 - .../templates/config-tika.yaml | 19 - .../templates/config-transform-misc.yaml | 21 - .../templates/config-transform-router.yaml | 30 - .../templates/config-transformer-routes.yaml | 388 --- .../templates/deployment-ai-transformer.yaml | 83 - .../templates/deployment-filestore.yaml | 85 - .../templates/deployment-imagemagick.yaml | 81 - .../templates/deployment-libreoffice.yaml | 82 - .../deployment-ms-teams-service.yaml | 78 - .../templates/deployment-ooi-service.yaml | 79 - .../templates/deployment-pdfrenderer.yaml | 81 - .../templates/deployment-repository.yaml | 247 -- .../templates/deployment-share.yaml | 80 - .../templates/deployment-tika.yaml | 81 - .../templates/deployment-transform-misc.yaml | 83 - .../deployment-transform-router.yaml | 93 - .../templates/ingress-ms-teams-service.yaml | 41 - .../templates/ingress-ooi-service.yaml | 41 - .../templates/ingress-repository.yaml | 40 - .../templates/ingress-share.yaml | 51 - alfresco-content-services/templates/pvc.yaml | 7 - .../templates/secret-database.yaml | 12 - .../templates/secret-mail-password.yaml | 11 - .../templates/secret-message-broker.yaml | 19 - .../templates/secret-metadata-keystore.yaml | 10 - .../secret-repository-properties.yaml | 11 - .../templates/secret-repository.yaml | 11 - .../templates/secret-s3.yaml | 22 - .../templates/svc-ai-transformer.yaml | 19 - .../templates/svc-email.yaml | 27 - .../templates/svc-filestore.yaml | 17 - .../templates/svc-imagemagick.yaml | 15 - .../templates/svc-libreoffice.yaml | 15 - .../templates/svc-ms-teams-service.yaml | 17 - .../templates/svc-ooi-service.yaml | 17 - .../templates/svc-pdfrenderer.yaml | 15 - .../templates/svc-repository.yaml | 29 - .../templates/svc-share.yaml | 17 - .../templates/svc-tika.yaml | 15 - .../templates/svc-transform-misc.yaml | 17 - .../templates/svc-transform-router.yaml | 17 - alfresco-content-services/values_dev.yaml | 53 - alfresco-content-services/values_poc.yaml | 50 - alfresco-content-services/values_stage.yaml | 94 - alfresco-content-services/values_test.yaml | 97 - kustomize/base/kustomization.yaml | 11 + kustomize/base/patch-ingress-repository.yaml | 9 + kustomize/base/patch-ingress-share.yaml | 9 + kustomize/base/patch-job-reindexing.yaml | 25 + .../base/reindex-prefixes-config-map.yaml | 0 .../base}/values.yaml | 4 +- kustomize/kustomizer.sh | 19 + kustomize/poc/allowlist.yaml | 46 + kustomize/poc/kustomization.yaml | 9 + kustomize/poc/output.yaml | 2159 +++++++++++++++++ kustomize/poc/patch-ingress-repository.yaml | 29 + kustomize/poc/patch-ingress-share.yaml | 30 + kustomize/poc/values.yaml | 10 + makefile | 24 +- .../alfresco-common/values.yaml => test.yml | 0 714 files changed, 2378 insertions(+), 42690 deletions(-) delete mode 100644 alfresco-content-services/7.0.N_values.yaml delete mode 100644 alfresco-content-services/7.1.N_values.yaml delete mode 100644 alfresco-content-services/7.2.N_values.yaml delete mode 100644 alfresco-content-services/7.3.N_values.yaml delete mode 100644 alfresco-content-services/Chart.lock delete mode 100644 alfresco-content-services/Chart.yaml delete mode 100644 alfresco-content-services/README.md delete mode 100644 alfresco-content-services/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/activemq/.helmignore delete mode 100644 alfresco-content-services/charts/activemq/Chart.lock delete mode 100644 alfresco-content-services/charts/activemq/Chart.yaml delete mode 100644 alfresco-content-services/charts/activemq/README.md delete mode 100644 alfresco-content-services/charts/activemq/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/.helmignore delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/Chart.lock delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/Chart.yaml delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/README.md delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/.helmignore delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/README.md delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_affinities.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_capabilities.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_errors.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_images.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_ingress.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_labels.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_names.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_secrets.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_storage.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_tplvalues.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_utils.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_warnings.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_redis.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_validations.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/values.yaml delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl delete mode 100644 alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/activemq/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/activemq/templates/deployment-activemq.yaml delete mode 100644 alfresco-content-services/charts/activemq/templates/pvc-activemq.yaml delete mode 100644 alfresco-content-services/charts/activemq/templates/secret-activemq.yaml delete mode 100644 alfresco-content-services/charts/activemq/templates/svc-activemq-broker.yaml delete mode 100644 alfresco-content-services/charts/activemq/templates/svc-activemq-web-console.yaml delete mode 100644 alfresco-content-services/charts/activemq/tests/deployment-activemq_test.yaml delete mode 100644 alfresco-content-services/charts/activemq/tests/pvc-activemq_test.yaml delete mode 100644 alfresco-content-services/charts/activemq/tests/svc-activemq_test.yaml delete mode 100644 alfresco-content-services/charts/activemq/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-common/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-common/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_affinities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_capabilities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_errors.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_images.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_ingress.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_labels.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_names.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_storage.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_tplvalues.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_utils.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/_warnings.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_redis.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_validations.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/charts/common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-common/templates/_helpers-activemq.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/templates/_helpers-persistence.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/templates/_helpers-search.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/templates/_helpers-security.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_affinities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_capabilities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_errors.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_images.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_ingress.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_labels.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_names.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_storage.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_tplvalues.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_utils.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_warnings.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_redis.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_validations.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/deployment-activemq.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/pvc-activemq.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/secret-activemq.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/svc-activemq-broker.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/svc-activemq-web-console.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/deployment-activemq_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/pvc-activemq_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/svc-activemq_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_affinities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_capabilities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_errors.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_images.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_ingress.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_labels.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_names.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_storage.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_tplvalues.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_utils.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_warnings.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_redis.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_validations.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-activemq.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-persistence.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-search.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-security.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/test/goss.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/watcher_encryption_key delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/rolling_upgrade.sh delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/test/goss.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/values-local-path.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/client.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/data.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/master.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/client.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/data.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/master.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/test/goss.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/networkpolicy/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/networkpolicy/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/test/goss.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/test/goss.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/Makefile delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/scripts/upgrade.sh delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/test/goss.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/NOTES.txt delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/configmap.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/ingress.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/networkpolicy.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/poddisruptionbudget.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/podsecuritypolicy.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/role.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/rolebinding.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/service.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/serviceaccount.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/statefulset.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/test/test-elasticsearch-health.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/templates/_helpers-elasticsearch.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/templates/liveindexing-config.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/templates/liveindexing-deployment.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/templates/reindexing-config.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/templates/reindexing-job.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-database.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-elasticsearch.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-messagebroker.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-enterprise/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-search-service/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-service/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_affinities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_capabilities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_errors.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_images.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_ingress.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_labels.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_names.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_storage.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_tplvalues.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_utils.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_warnings.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_redis.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_validations.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-activemq.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-persistence.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-search.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-security.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/README.md delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/config.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/deployment.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/ingress.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/service.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/config_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/deployment_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/ci/default-values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/templates/NOTES.txt delete mode 100644 alfresco-content-services/charts/alfresco-search-service/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-search-service/templates/config.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/templates/deployment.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/templates/ingress.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/templates/pvc.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/templates/secret-ingress.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/templates/secret-solr-jtoolopt.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/templates/service.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/tests/config_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/tests/deployment_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/tests/ingress_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/tests/resources_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/tests/secret-ingress_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/tests/secret-solr-jtoolopt_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/tests/values/ingress.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/tests/values/test_values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-search-service/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/README.md delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/README.md delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_affinities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_capabilities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_errors.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_images.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_ingress.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_labels.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_names.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_storage.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_tplvalues.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_utils.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_warnings.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_redis.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_validations.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/deployment-activemq.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/pvc-activemq.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/secret-activemq.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/svc-activemq-broker.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/svc-activemq-web-console.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/deployment-activemq_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/pvc-activemq_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/svc-activemq_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/activemq/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/README.md.gotmpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_affinities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_capabilities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_errors.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_images.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_ingress.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_labels.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_names.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_storage.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_tplvalues.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_utils.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_warnings.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_redis.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_validations.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-activemq.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-persistence.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-search.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-security.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_affinities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_capabilities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_errors.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_images.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_ingress.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_labels.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_names.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_storage.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_tplvalues.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_utils.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_warnings.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_cassandra.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_mariadb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_mongodb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_mysql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_postgresql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_redis.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_validations.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/Chart.lock delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/README.md delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/.helmignore delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/Chart.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/README.md delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_affinities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_capabilities.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_errors.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_images.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_ingress.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_labels.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_names.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_secrets.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_storage.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_tplvalues.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_utils.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_warnings.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_cassandra.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_mariadb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_mongodb.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_mysql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_postgresql.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_redis.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_validations.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/NOTES.txt delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/extra-list.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/networkpolicy-egress.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/configmap.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/extended-configmap.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/initialization-configmap.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/metrics-configmap.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/metrics-svc.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/networkpolicy.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/servicemonitor.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/statefulset.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/svc-headless.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/svc.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/prometheusrule.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/psp.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/extended-configmap.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/metrics-configmap.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/metrics-svc.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/networkpolicy.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/servicemonitor.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/statefulset.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/svc-headless.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/svc.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/role.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/rolebinding.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/secrets.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/serviceaccount.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/tls-secrets.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/values.schema.json delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/ci/default-values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/authentication delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/config delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/httpd.conf delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/kustomization.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/values.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/templates/NOTES.txt delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/templates/_helpers-db.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/templates/_helpers-mq.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/templates/config-syncservice.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/templates/deployment-syncservice.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/templates/ingress.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/templates/secret-database.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/templates/secret-message-broker.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/templates/svc-syncservice.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/tests/database_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/tests/deployment-syncservice_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/tests/mq_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/tests/repo_test.yaml delete mode 100644 alfresco-content-services/charts/alfresco-sync-service/values.yaml delete mode 100644 alfresco-content-services/charts/common/.helmignore delete mode 100644 alfresco-content-services/charts/common/Chart.yaml delete mode 100644 alfresco-content-services/charts/common/Makefile delete mode 100644 alfresco-content-services/charts/common/README.md delete mode 100644 alfresco-content-services/charts/common/templates/NOTES.txt delete mode 100644 alfresco-content-services/charts/common/templates/_backend_env.yaml delete mode 100644 alfresco-content-services/charts/common/templates/_deployment.yaml delete mode 100644 alfresco-content-services/charts/common/templates/_deployment_head.yaml delete mode 100644 alfresco-content-services/charts/common/templates/_frontend_env.yaml delete mode 100644 alfresco-content-services/charts/common/templates/_global.tpl delete mode 100644 alfresco-content-services/charts/common/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/common/templates/_hpa.tpl delete mode 100644 alfresco-content-services/charts/common/templates/_ingress.tpl delete mode 100644 alfresco-content-services/charts/common/templates/_ingress.yaml delete mode 100644 alfresco-content-services/charts/common/templates/_messaging.tpl delete mode 100644 alfresco-content-services/charts/common/templates/_probes.yaml delete mode 100644 alfresco-content-services/charts/common/templates/_service.yaml delete mode 100644 alfresco-content-services/charts/common/templates/_util.tpl delete mode 100644 alfresco-content-services/charts/common/templates/_values.tpl delete mode 100644 alfresco-content-services/charts/common/templates/deployment.yaml delete mode 100644 alfresco-content-services/charts/common/templates/hpa.yaml delete mode 100644 alfresco-content-services/charts/common/templates/ingress.yaml delete mode 100644 alfresco-content-services/charts/common/templates/service.yaml delete mode 100644 alfresco-content-services/charts/common/tests/deployment-config_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/deployment-kafka_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/deployment-messaging-destinations_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/deployment-rabbitmq_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/deployment_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/env_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/extraEnv_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/extraInitContainers_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/extraVolumeMounts_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/hpa_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/ingress_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/initContainers_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/javaOpts_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/podAnnotations_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/podLabels_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/service_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/sidecars_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/values/consumer-partitioned.yaml delete mode 100644 alfresco-content-services/charts/common/tests/values/kafka.yaml delete mode 100644 alfresco-content-services/charts/common/tests/values/messaging-destinations.yaml delete mode 100644 alfresco-content-services/charts/common/tests/values/rabbitmq.yaml delete mode 100644 alfresco-content-services/charts/common/tests/volumeMounts_test.yaml delete mode 100644 alfresco-content-services/charts/common/tests/volumes_test.yaml delete mode 100644 alfresco-content-services/charts/common/values.yaml delete mode 100644 alfresco-content-services/charts/postgresql/.helmignore delete mode 100644 alfresco-content-services/charts/postgresql/Chart.lock delete mode 100644 alfresco-content-services/charts/postgresql/Chart.yaml delete mode 100644 alfresco-content-services/charts/postgresql/README.md delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/.helmignore delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/Chart.yaml delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/README.md delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_affinities.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_capabilities.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_errors.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_images.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_ingress.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_labels.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_names.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_secrets.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_storage.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_tplvalues.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_utils.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/_warnings.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/validations/_cassandra.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/validations/_mariadb.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/validations/_mongodb.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/validations/_mysql.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/validations/_postgresql.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/validations/_redis.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/templates/validations/_validations.tpl delete mode 100644 alfresco-content-services/charts/postgresql/charts/common/values.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/NOTES.txt delete mode 100644 alfresco-content-services/charts/postgresql/templates/_helpers.tpl delete mode 100644 alfresco-content-services/charts/postgresql/templates/extra-list.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/networkpolicy-egress.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/primary/configmap.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/primary/extended-configmap.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/primary/initialization-configmap.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/primary/metrics-configmap.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/primary/metrics-svc.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/primary/networkpolicy.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/primary/servicemonitor.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/primary/statefulset.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/primary/svc-headless.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/primary/svc.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/prometheusrule.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/psp.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/read/extended-configmap.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/read/metrics-configmap.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/read/metrics-svc.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/read/networkpolicy.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/read/servicemonitor.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/read/statefulset.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/read/svc-headless.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/read/svc.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/role.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/rolebinding.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/secrets.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/serviceaccount.yaml delete mode 100644 alfresco-content-services/charts/postgresql/templates/tls-secrets.yaml delete mode 100644 alfresco-content-services/charts/postgresql/values.schema.json delete mode 100644 alfresco-content-services/charts/postgresql/values.yaml delete mode 100644 alfresco-content-services/community_values.yaml delete mode 100644 alfresco-content-services/templates/NOTES.txt delete mode 100644 alfresco-content-services/templates/_helpers-ai-transformer.tpl delete mode 100644 alfresco-content-services/templates/_helpers-elasticsearch.tpl delete mode 100644 alfresco-content-services/templates/_helpers-filestore.tpl delete mode 100644 alfresco-content-services/templates/_helpers-imagemagick.tpl delete mode 100644 alfresco-content-services/templates/_helpers-ingress.tpl delete mode 100644 alfresco-content-services/templates/_helpers-libreoffice.tpl delete mode 100644 alfresco-content-services/templates/_helpers-ms-teams-service.tpl delete mode 100644 alfresco-content-services/templates/_helpers-ooi-service.tpl delete mode 100644 alfresco-content-services/templates/_helpers-pdfrenderer.tpl delete mode 100644 alfresco-content-services/templates/_helpers-repository.tpl delete mode 100644 alfresco-content-services/templates/_helpers-search.tpl delete mode 100644 alfresco-content-services/templates/_helpers-share.tpl delete mode 100644 alfresco-content-services/templates/_helpers-tika.tpl delete mode 100644 alfresco-content-services/templates/_helpers-transform-misc.tpl delete mode 100644 alfresco-content-services/templates/_helpers-transform-router.tpl delete mode 100644 alfresco-content-services/templates/_helpers-url.tpl delete mode 100644 alfresco-content-services/templates/_helpers.tpl delete mode 100644 alfresco-content-services/templates/config-ai-transformer.yaml delete mode 100644 alfresco-content-services/templates/config-dev-log4j-properties.yaml delete mode 100644 alfresco-content-services/templates/config-email.yaml delete mode 100644 alfresco-content-services/templates/config-filestore.yaml delete mode 100644 alfresco-content-services/templates/config-imagemagick.yaml delete mode 100644 alfresco-content-services/templates/config-libreoffice.yaml delete mode 100644 alfresco-content-services/templates/config-ms-teams-service.yaml delete mode 100644 alfresco-content-services/templates/config-ooi-service.yaml delete mode 100644 alfresco-content-services/templates/config-pdfrenderer.yaml delete mode 100644 alfresco-content-services/templates/config-repository.yaml delete mode 100644 alfresco-content-services/templates/config-share.yaml delete mode 100644 alfresco-content-services/templates/config-tika.yaml delete mode 100644 alfresco-content-services/templates/config-transform-misc.yaml delete mode 100644 alfresco-content-services/templates/config-transform-router.yaml delete mode 100644 alfresco-content-services/templates/config-transformer-routes.yaml delete mode 100644 alfresco-content-services/templates/deployment-ai-transformer.yaml delete mode 100644 alfresco-content-services/templates/deployment-filestore.yaml delete mode 100644 alfresco-content-services/templates/deployment-imagemagick.yaml delete mode 100644 alfresco-content-services/templates/deployment-libreoffice.yaml delete mode 100644 alfresco-content-services/templates/deployment-ms-teams-service.yaml delete mode 100644 alfresco-content-services/templates/deployment-ooi-service.yaml delete mode 100644 alfresco-content-services/templates/deployment-pdfrenderer.yaml delete mode 100644 alfresco-content-services/templates/deployment-repository.yaml delete mode 100644 alfresco-content-services/templates/deployment-share.yaml delete mode 100644 alfresco-content-services/templates/deployment-tika.yaml delete mode 100644 alfresco-content-services/templates/deployment-transform-misc.yaml delete mode 100644 alfresco-content-services/templates/deployment-transform-router.yaml delete mode 100644 alfresco-content-services/templates/ingress-ms-teams-service.yaml delete mode 100644 alfresco-content-services/templates/ingress-ooi-service.yaml delete mode 100644 alfresco-content-services/templates/ingress-repository.yaml delete mode 100644 alfresco-content-services/templates/ingress-share.yaml delete mode 100644 alfresco-content-services/templates/pvc.yaml delete mode 100644 alfresco-content-services/templates/secret-database.yaml delete mode 100644 alfresco-content-services/templates/secret-mail-password.yaml delete mode 100644 alfresco-content-services/templates/secret-message-broker.yaml delete mode 100644 alfresco-content-services/templates/secret-metadata-keystore.yaml delete mode 100644 alfresco-content-services/templates/secret-repository-properties.yaml delete mode 100644 alfresco-content-services/templates/secret-repository.yaml delete mode 100644 alfresco-content-services/templates/secret-s3.yaml delete mode 100644 alfresco-content-services/templates/svc-ai-transformer.yaml delete mode 100644 alfresco-content-services/templates/svc-email.yaml delete mode 100644 alfresco-content-services/templates/svc-filestore.yaml delete mode 100644 alfresco-content-services/templates/svc-imagemagick.yaml delete mode 100644 alfresco-content-services/templates/svc-libreoffice.yaml delete mode 100644 alfresco-content-services/templates/svc-ms-teams-service.yaml delete mode 100644 alfresco-content-services/templates/svc-ooi-service.yaml delete mode 100644 alfresco-content-services/templates/svc-pdfrenderer.yaml delete mode 100644 alfresco-content-services/templates/svc-repository.yaml delete mode 100644 alfresco-content-services/templates/svc-share.yaml delete mode 100644 alfresco-content-services/templates/svc-tika.yaml delete mode 100644 alfresco-content-services/templates/svc-transform-misc.yaml delete mode 100644 alfresco-content-services/templates/svc-transform-router.yaml delete mode 100644 alfresco-content-services/values_dev.yaml delete mode 100644 alfresco-content-services/values_poc.yaml delete mode 100644 alfresco-content-services/values_stage.yaml delete mode 100644 alfresco-content-services/values_test.yaml create mode 100644 kustomize/base/kustomization.yaml create mode 100644 kustomize/base/patch-ingress-repository.yaml create mode 100644 kustomize/base/patch-ingress-share.yaml create mode 100644 kustomize/base/patch-job-reindexing.yaml rename alfresco-content-services/charts/alfresco-search-enterprise/templates/prefixes-file-config-map.yaml => kustomize/base/reindex-prefixes-config-map.yaml (100%) rename {alfresco-content-services => kustomize/base}/values.yaml (99%) create mode 100755 kustomize/kustomizer.sh create mode 100644 kustomize/poc/allowlist.yaml create mode 100644 kustomize/poc/kustomization.yaml create mode 100644 kustomize/poc/output.yaml create mode 100644 kustomize/poc/patch-ingress-repository.yaml create mode 100644 kustomize/poc/patch-ingress-share.yaml create mode 100644 kustomize/poc/values.yaml rename alfresco-content-services/charts/activemq/charts/alfresco-common/values.yaml => test.yml (100%) diff --git a/.gitignore b/.gitignore index 9d6ef15..6aa73f2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ .vscode/ .idea/ templated/ +kustomize/base/charts/ +kustomize/overlays/**/charts/ diff --git a/alfresco-content-services/7.0.N_values.yaml b/alfresco-content-services/7.0.N_values.yaml deleted file mode 100644 index faee3b6..0000000 --- a/alfresco-content-services/7.0.N_values.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# ACS 7.0.N values -repository: - image: - tag: 7.0.1.10 -transformrouter: - image: - tag: 1.4.1 -pdfrenderer: - image: - tag: 2.5.7 -imagemagick: - image: - tag: 2.5.7 -libreoffice: - image: - tag: 2.5.7 -tika: - image: - tag: 2.5.7 -transformmisc: - image: - tag: 2.5.7 -aiTransformer: - image: - tag: 1.3.0 -filestore: - image: - tag: 0.16.1 -share: - image: - tag: 7.0.1.3 -alfresco-search: - searchServicesImage: - tag: 2.0.2.2 -alfresco-digital-workspace: - image: - tag: 2.6.1 -postgresql: - image: - tag: 13.1.0 -alfresco-sync-service: - image: - tag: 3.7.2 - postgresql: - primary: - image: - tag: 13.1.0 -ooiService: - image: - tag: 1.1.0.1 -msTeams: - enabled: false -alfresco-control-center: - enabled: false -global: - tracking: - auth: none diff --git a/alfresco-content-services/7.1.N_values.yaml b/alfresco-content-services/7.1.N_values.yaml deleted file mode 100644 index af31edc..0000000 --- a/alfresco-content-services/7.1.N_values.yaml +++ /dev/null @@ -1,75 +0,0 @@ -# ACS 7.1.N values -repository: - image: - tag: 7.1.1.8 -transformrouter: - image: - tag: 1.5.3 -pdfrenderer: - image: - tag: 2.5.7 -imagemagick: - image: - tag: 2.5.7 -libreoffice: - image: - tag: 2.5.7 -tika: - image: - tag: 2.5.7 -transformmisc: - image: - tag: 2.5.7 -aiTransformer: - image: - tag: 1.4.5 -filestore: - image: - tag: 1.5.3 -share: - image: - tag: 7.1.1.8 -alfresco-search: - searchServicesImage: - tag: 2.0.2.2 -alfresco-search-enterprise: - liveIndexing: - mediation: - image: - tag: 3.1.1 - content: - image: - tag: 3.1.1 - metadata: - image: - tag: 3.1.1 - path: - image: - tag: 3.1.1 - reindexing: - image: - tag: 3.1.1 -postgresql: - image: - tag: 13.3.0 -alfresco-digital-workspace: - image: - tag: 2.6.1 -alfresco-sync-service: - image: - tag: 3.7.2 - postgresql: - primary: - image: - tag: 13.3.0 -msTeamsService: - image: - tag: 1.1.0 -ooiService: - image: - tag: 1.1.1 -alfresco-control-center: - enabled: false -global: - tracking: - auth: none diff --git a/alfresco-content-services/7.2.N_values.yaml b/alfresco-content-services/7.2.N_values.yaml deleted file mode 100644 index 12c78bb..0000000 --- a/alfresco-content-services/7.2.N_values.yaml +++ /dev/null @@ -1,73 +0,0 @@ -# ACS 7.2.N values -repository: - image: - tag: 7.2.1.11 -transformrouter: - image: - tag: 2.0.0 -pdfrenderer: - image: - tag: 2.5.7 -imagemagick: - image: - tag: 2.5.7 -libreoffice: - image: - tag: 2.5.7 -tika: - image: - tag: 2.5.7 -transformmisc: - image: - tag: 2.5.7 -aiTransformer: - image: - tag: 1.5.0 -filestore: - image: - tag: 2.0.2 -share: - image: - tag: 7.2.1.11 -alfresco-search: - searchServicesImage: - tag: 2.0.3.6 -alfresco-search-enterprise: - liveIndexing: - mediation: - image: - tag: 3.1.1 - content: - image: - tag: 3.1.1 - metadata: - image: - tag: 3.1.1 - path: - image: - tag: 3.1.1 - reindexing: - image: - tag: 3.1.1 -alfresco-digital-workspace: - image: - tag: 3.0.1 -alfresco-control-center: - image: - tag: 7.9.0 -postgresql: - image: - tag: 13.3.0 -alfresco-sync-service: - image: - tag: 3.8.0 - postgresql: - primary: - image: - tag: 13.3.0 -ooiService: - image: - tag: 1.1.3.1 -msTeamsService: - image: - tag: 1.1.0 diff --git a/alfresco-content-services/7.3.N_values.yaml b/alfresco-content-services/7.3.N_values.yaml deleted file mode 100644 index ca581b2..0000000 --- a/alfresco-content-services/7.3.N_values.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# ACS 7.3.N values -repository: - image: - tag: 7.3.1 -transformrouter: - image: - tag: 2.0.0 -pdfrenderer: - image: - tag: 3.0.0 -imagemagick: - image: - tag: 3.0.0 -libreoffice: - image: - tag: 3.0.0 -tika: - image: - tag: 3.0.0 -transformmisc: - image: - tag: 3.0.0 -aiTransformer: - image: - tag: 1.5.0 -filestore: - image: - tag: 2.0.2 -share: - image: - tag: 7.3.1 -activemq: - image: - tag: -alfresco-search: - searchServicesImage: - tag: 2.0.5.2 -alfresco-search-enterprise: - enabled: false - liveIndexing: - mediation: - image: - tag: 3.2.0 - content: - image: - tag: 3.2.0 - metadata: - image: - tag: 3.2.0 - path: - image: - tag: 3.2.0 - reindexing: - image: - tag: 3.2.0 -alfresco-digital-workspace: - image: - tag: 3.1.1 -alfresco-control-center: - image: - tag: 7.9.0 -postgresql: - image: - tag: 14.4.0 -postgresql-syncservice: - image: - tag: 14.4.0 -alfresco-sync-service: - image: - tag: 3.8.0 -ooiService: - image: - tag: 1.1.3.1 -msTeamsService: - image: - tag: 1.1.0 diff --git a/alfresco-content-services/Chart.lock b/alfresco-content-services/Chart.lock deleted file mode 100644 index faaecb7..0000000 --- a/alfresco-content-services/Chart.lock +++ /dev/null @@ -1,27 +0,0 @@ -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 2.0.0 -- name: postgresql - repository: oci://registry-1.docker.io/bitnamicharts - version: 12.5.6 -- name: common - repository: https://activiti.github.io/activiti-cloud-helm-charts - version: 7.7.0 -- name: common - repository: https://activiti.github.io/activiti-cloud-helm-charts - version: 7.7.0 -- name: activemq - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 3.1.0 -- name: alfresco-search-service - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 1.1.0 -- name: alfresco-sync-service - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 4.1.0 -- name: alfresco-search-enterprise - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 1.2.0 -digest: sha256:1ec10d4d7b976fafd8343257e11c01d5b6ddde9acc0c3be5cea7d277b9690557 -generated: "2023-06-13T09:31:13.012866+02:00" diff --git a/alfresco-content-services/Chart.yaml b/alfresco-content-services/Chart.yaml deleted file mode 100644 index 7fcd051..0000000 --- a/alfresco-content-services/Chart.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: v2 -appVersion: 7.3.0 -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 2.0.0 -- condition: postgresql.enabled - name: postgresql - repository: oci://registry-1.docker.io/bitnamicharts - version: 12.5.6 -- alias: alfresco-control-center - condition: alfresco-admin-app.enabled - name: common - repository: https://activiti.github.io/activiti-cloud-helm-charts - version: 7.7.0 -- alias: alfresco-digital-workspace - condition: alfresco-digital-workspace.enabled - name: common - repository: https://activiti.github.io/activiti-cloud-helm-charts - version: 7.7.0 -- condition: activemq.enabled - name: activemq - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 3.1.0 -- alias: alfresco-search - condition: alfresco-search.enabled - name: alfresco-search-service - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 1.1.0 -- condition: alfresco-sync-service.enabled - name: alfresco-sync-service - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 4.1.0 -- condition: alfresco-search-enterprise.enabled - name: alfresco-search-enterprise - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 1.2.0 -description: A Helm chart for deploying Alfresco Content Services -home: https://www.alfresco.com -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -keywords: -- content -- content services -- alfresco -- alfresco content services -name: alfresco-content-services -sources: -- https://github.com/Alfresco/acs-deployment -version: 6.0.2 diff --git a/alfresco-content-services/README.md b/alfresco-content-services/README.md deleted file mode 100644 index 53bc054..0000000 --- a/alfresco-content-services/README.md +++ /dev/null @@ -1,361 +0,0 @@ -# alfresco-content-services - -![Version: 6.0.2](https://img.shields.io/badge/Version-6.0.2-informational?style=flat-square) ![AppVersion: 7.4.0](https://img.shields.io/badge/AppVersion-7.4.0-informational?style=flat-square) - -A Helm chart for deploying Alfresco Content Services - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -**Homepage:** - -## Source Code - -* - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://activiti.github.io/activiti-cloud-helm-charts | alfresco-control-center(common) | 7.7.0 | -| https://activiti.github.io/activiti-cloud-helm-charts | alfresco-digital-workspace(common) | 7.7.0 | -| https://alfresco.github.io/alfresco-helm-charts/ | activemq | 3.1.0 | -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 2.0.0 | -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-search-enterprise | 1.2.0 | -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-search(alfresco-search-service) | 1.1.0 | -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-sync-service | 4.1.0 | -| oci://registry-1.docker.io/bitnamicharts | postgresql | 12.5.6 | - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| activemq.adminUser.password | string | `"admin"` | Default password for the embedded broker admin user | -| activemq.adminUser.user | string | `"admin"` | Default username for the embedded broker admin user | -| activemq.enabled | bool | `true` | | -| activemq.nameOverride | string | `"activemq"` | | -| activemq.nodeSelector | object | `{}` | Possibility to choose Node for pod, with a key-value pair label e.g {"kubernetes.io/hostname": multinode-demo-m02} | -| aiTransformer.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | -| aiTransformer.image.internalPort | int | `8090` | | -| aiTransformer.image.pullPolicy | string | `"IfNotPresent"` | | -| aiTransformer.image.repository | string | `"quay.io/alfresco/alfresco-ai-docker-engine"` | | -| aiTransformer.image.tag | string | `"1.5.0"` | | -| aiTransformer.livenessProbe.initialDelaySeconds | int | `10` | | -| aiTransformer.livenessProbe.livenessPercent | int | `400` | | -| aiTransformer.livenessProbe.livenessTransformPeriodSeconds | int | `600` | | -| aiTransformer.livenessProbe.maxTransformSeconds | int | `1800` | | -| aiTransformer.livenessProbe.maxTransforms | int | `10000` | | -| aiTransformer.livenessProbe.periodSeconds | int | `20` | | -| aiTransformer.livenessProbe.timeoutSeconds | int | `10` | | -| aiTransformer.nodeSelector | object | `{}` | | -| aiTransformer.podSecurityContext.runAsUser | int | `33015` | | -| aiTransformer.readinessProbe.initialDelaySeconds | int | `20` | | -| aiTransformer.readinessProbe.periodSeconds | int | `60` | | -| aiTransformer.readinessProbe.timeoutSeconds | int | `10` | | -| aiTransformer.replicaCount | int | `2` | | -| aiTransformer.resources.limits.cpu | string | `"2"` | | -| aiTransformer.resources.limits.memory | string | `"1000Mi"` | | -| aiTransformer.resources.requests.cpu | string | `"0.25"` | | -| aiTransformer.resources.requests.memory | string | `"1000Mi"` | | -| aiTransformer.service.externalPort | int | `80` | | -| aiTransformer.service.name | string | `"ai-transformer"` | | -| aiTransformer.service.type | string | `"ClusterIP"` | | -| alfresco-control-center.enabled | bool | `true` | | -| alfresco-control-center.env.API_URL | string | `"{protocol}//{hostname}{:port}"` | | -| alfresco-control-center.env.APP_CONFIG_AUTH_TYPE | string | `"BASIC"` | | -| alfresco-control-center.env.APP_CONFIG_PROVIDER | string | `"ECM"` | | -| alfresco-control-center.image.pullPolicy | string | `"IfNotPresent"` | | -| alfresco-control-center.image.repository | string | `"quay.io/alfresco/alfresco-control-center"` | | -| alfresco-control-center.image.tag | string | `"8.0.0"` | | -| alfresco-control-center.ingress.annotations."kubernetes.io/ingress.class" | string | `"nginx"` | | -| alfresco-control-center.ingress.path | string | `"/control-center"` | | -| alfresco-control-center.ingress.tls | list | `[]` | | -| alfresco-control-center.nameOverride | string | `"alfresco-cc"` | | -| alfresco-control-center.nodeSelector | object | `{}` | | -| alfresco-control-center.resources.limits.cpu | string | `"1"` | | -| alfresco-control-center.resources.limits.memory | string | `"1024Mi"` | | -| alfresco-control-center.resources.requests.cpu | string | `"0.25"` | | -| alfresco-control-center.resources.requests.memory | string | `"256Mi"` | | -| alfresco-control-center.securityContext.capabilities.drop[0] | string | `"NET_RAW"` | | -| alfresco-control-center.securityContext.capabilities.drop[1] | string | `"ALL"` | | -| alfresco-control-center.securityContext.runAsNonRoot | bool | `true` | | -| alfresco-control-center.securityContext.runAsUser | int | `101` | | -| alfresco-control-center.service.envType | string | `"frontend"` | | -| alfresco-digital-workspace.enabled | bool | `true` | | -| alfresco-digital-workspace.env.API_URL | string | `"{protocol}//{hostname}{:port}"` | | -| alfresco-digital-workspace.env.APP_CONFIG_AUTH_TYPE | string | `"BASIC"` | | -| alfresco-digital-workspace.env.APP_CONFIG_PROVIDER | string | `"ECM"` | | -| alfresco-digital-workspace.extraEnv | string | `"{{- if .Values.global.ai.enabled }}\n- name: APP_CONFIG_PLUGIN_AI_SERVICE\n value: '{{ .Values.global.ai.enabled }}'\n{{- end }}"` | | -| alfresco-digital-workspace.image.pullPolicy | string | `"IfNotPresent"` | | -| alfresco-digital-workspace.image.repository | string | `"quay.io/alfresco/alfresco-digital-workspace"` | | -| alfresco-digital-workspace.image.tag | string | `"4.0.0"` | | -| alfresco-digital-workspace.ingress.annotations."kubernetes.io/ingress.class" | string | `"nginx"` | | -| alfresco-digital-workspace.ingress.annotations."nginx.ingress.kubernetes.io/proxy-body-size" | string | `"5g"` | | -| alfresco-digital-workspace.ingress.path | string | `"/workspace"` | | -| alfresco-digital-workspace.ingress.tls | list | `[]` | | -| alfresco-digital-workspace.nameOverride | string | `"alfresco-dw"` | | -| alfresco-digital-workspace.nodeSelector | object | `{}` | | -| alfresco-digital-workspace.resources.limits.cpu | string | `"1"` | | -| alfresco-digital-workspace.resources.limits.memory | string | `"1024Mi"` | | -| alfresco-digital-workspace.resources.requests.cpu | string | `"0.25"` | | -| alfresco-digital-workspace.resources.requests.memory | string | `"256Mi"` | | -| alfresco-digital-workspace.securityContext.capabilities.drop[0] | string | `"NET_RAW"` | | -| alfresco-digital-workspace.securityContext.capabilities.drop[1] | string | `"ALL"` | | -| alfresco-digital-workspace.securityContext.runAsNonRoot | bool | `true` | | -| alfresco-digital-workspace.securityContext.runAsUser | int | `101` | | -| alfresco-digital-workspace.service.envType | string | `"frontend"` | | -| alfresco-search-enterprise.elasticsearch.enabled | bool | `true` | Enables the embedded elasticsearch cluster | -| alfresco-search-enterprise.enabled | bool | `false` | | -| alfresco-search-enterprise.messageBroker.existingSecretName | string | `"acs-alfresco-cs-brokersecret"` | | -| alfresco-search-enterprise.reindexing.enabled | bool | `true` | | -| alfresco-search-enterprise.reindexing.postgresql.database | string | `"alfresco"` | | -| alfresco-search-enterprise.reindexing.postgresql.existingSecretName | string | `"acs-alfresco-cs-dbsecret"` | | -| alfresco-search-enterprise.reindexing.postgresql.hostname | string | `"postgresql-acs"` | | -| alfresco-search-enterprise.reindexing.postgresql.url | string | `nil` | | -| alfresco-search.alfresco-insight-zeppelin.enabled | bool | `false` | | -| alfresco-search.enabled | bool | `true` | | -| alfresco-search.external.host | string | `nil` | Host dns/ip of the external solr6 instance. | -| alfresco-search.external.port | string | `nil` | Port of the external solr6 instance. | -| alfresco-search.ingress.basicAuth | string | `nil` | Default solr basic auth user/password: admin / admin You can create your own with htpasswd utilility & encode it with base64. Example: `echo -n "$(htpasswd -nbm admin admin)" | base64 | tr -d '\n'` basicAuth: YWRtaW46JGFwcjEkVVJqb29uS00kSEMuS1EwVkRScFpwSHB2a3JwTDd1Lg== | -| alfresco-search.ingress.enabled | bool | `false` | Alfresco Search services endpoint ('/solr') | -| alfresco-search.ingress.tls | list | `[]` | | -| alfresco-search.nodeSelector | object | `{}` | | -| alfresco-sync-service.enabled | bool | `true` | Toggle deployment of Alfresco Sync Service (Desktop-Sync) Check [Alfresco Sync Service Documentation](https://github.com/Alfresco/alfresco-helm-charts/tree/main/charts/alfresco-sync-service) | -| alfresco-sync-service.image.tag | string | `"3.9.0"` | | -| alfresco-sync-service.messageBroker.existingSecretName | string | `"acs-alfresco-cs-brokersecret"` | | -| alfresco-sync-service.postgresql.auth.database | string | `"syncservice-postgresql"` | | -| alfresco-sync-service.postgresql.auth.enablePostgresUser | bool | `false` | | -| alfresco-sync-service.postgresql.auth.password | string | `"admin"` | | -| alfresco-sync-service.postgresql.auth.username | string | `"alfresco"` | | -| alfresco-sync-service.postgresql.enabled | bool | `true` | | -| alfresco-sync-service.postgresql.image.tag | string | `"14.4.0"` | | -| alfresco-sync-service.postgresql.primary.resources.limits.cpu | string | `"4"` | | -| alfresco-sync-service.postgresql.primary.resources.limits.memory | string | `"1500Mi"` | | -| alfresco-sync-service.postgresql.primary.resources.requests.cpu | string | `"0.5"` | | -| alfresco-sync-service.postgresql.primary.resources.requests.memory | string | `"1500Mi"` | | -| alfresco-sync-service.repository.nameOverride | string | `"alfresco-cs-repository"` | | -| alfresco-sync-service.repository.port | int | `80` | | -| apiexplorer | object | `{"ingress":{"path":"/api-explorer"}}` | Declares the api-explorer service used by the content repository | -| database.driver | string | `nil` | Postgresql jdbc driver name ex: org.postgresql.Driver. It should be available in the container image. | -| database.existingSecretName | string | `nil` | An existing secret that contains DATABASE_USERNAME and DATABASE_PASSWORD keys. When using embedded postgres you need to also set `postgresql.existingSecret`. | -| database.external | bool | `false` | Enable using an external database for Alfresco Content Services. Must disable `postgresql.enabled` when true. | -| database.password | string | `nil` | External Postgresql database password | -| database.secretName | string | `"acs-alfresco-cs-dbsecret"` | Name of the secret managed by this chart | -| database.url | string | `nil` | External Postgresql jdbc url ex: `jdbc:postgresql://oldfashioned-mule-postgresql-acs:5432/alfresco` | -| database.user | string | `nil` | External Postgresql database user | -| email | object | `{"handler":{"folder":{"overwriteDuplicates":true}},"inbound":{"emailContributorsAuthority":"EMAIL_CONTRIBUTORS","enabled":false,"unknownUser":"anonymous"},"initContainers":{"pemToKeystore":{"image":{"pullPolicy":"IfNotPresent","repository":"registry.access.redhat.com/redhat-sso-7/sso71-openshift","tag":"1.1-16"}},"pemToTruststore":{"image":{"pullPolicy":"IfNotPresent","repository":"registry.access.redhat.com/redhat-sso-7/sso71-openshift","tag":"1.1-16"}},"setPerms":{"image":{"pullPolicy":"IfNotPresent","repository":"busybox","tag":"1.35.0"}}},"server":{"allowed":{"senders":".*"},"auth":{"enabled":true},"blocked":{"senders":null},"connections":{"max":3},"domain":null,"enableTLS":true,"enabled":false,"hideTLS":false,"port":1125,"requireTLS":false},"ssl":{"secretName":null}}` | For a full information of configuring the inbound email system, see https://docs.alfresco.com/content-services/latest/config/email/#manage-inbound-emails | -| filestore | object | `{"environment":{"JAVA_OPTS":"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80","scheduler.cleanup.interval":"86400000","scheduler.content.age.millis":"86400000"},"image":{"internalPort":8099,"pullPolicy":"IfNotPresent","repository":"quay.io/alfresco/alfresco-shared-file-store","tag":"2.1.0"},"initContainer":{"image":{"pullPolicy":"IfNotPresent","repository":"busybox","tag":"1.35.0"},"resources":{"limits":{"cpu":"0.50","memory":"10Mi"}}},"livenessProbe":{"initialDelaySeconds":10,"livenessPercent":150,"livenessSavePeriodSeconds":600,"periodSeconds":20,"timeoutSeconds":10},"nodeSelector":{},"persistence":{"accessModes":["ReadWriteOnce"],"data":{"mountPath":"/tmp/Alfresco","subPath":"alfresco-content-services/filestore-data"},"enabled":true,"existingClaim":null,"storageClass":null},"podSecurityContext":{"fsGroup":1000,"runAsGroup":1000,"runAsUser":33030},"readinessProbe":{"initialDelaySeconds":20,"periodSeconds":60,"timeoutSeconds":10},"replicaCount":1,"resources":{"limits":{"cpu":"2","memory":"1000Mi"},"requests":{"cpu":"0.25","memory":"200Mi"}},"service":{"externalPort":80,"name":"filestore","type":"ClusterIP"}}` | Declares the alfresco-shared-file-store used by the content repository and transform service | -| filestore.persistence.accessModes | list | `["ReadWriteOnce"]` | Specify a storageClass for dynamic provisioning | -| filestore.persistence.enabled | bool | `true` | Persist filestore data | -| filestore.persistence.existingClaim | string | `nil` | Use pre-provisioned pv through its claim (e.g. static provisionning) | -| filestore.persistence.storageClass | string | `nil` | Bind PVC based on storageClass (e.g. dynamic provisionning) | -| global.ai | object | `{"enabled":false}` | Choose if you want AI capabilities (globally - including ADW AI plugin) | -| global.alfrescoRegistryPullSecrets | string | `nil` | If a private image registry a secret can be defined and passed to kubernetes, see: https://github.com/Alfresco/acs-deployment/blob/a924ad6670911f64f1bba680682d266dd4ea27fb/docs/helm/eks-deployment.md#docker-registry-secret | -| global.elasticsearch | object | `{"host":"elasticsearch-master","password":null,"port":9200,"protocol":"http","user":null}` | Shared connections details for Elasticsearch/Opensearch, required when alfresco-search-enterprise.enabled is true | -| global.elasticsearch.host | string | `"elasticsearch-master"` | The host where service is available. The provided default is for when elasticsearch.enabled is true | -| global.elasticsearch.password | string | `nil` | The password required to access the service, if any | -| global.elasticsearch.port | int | `9200` | The port where service is available | -| global.elasticsearch.protocol | string | `"http"` | Valid values are http or https | -| global.elasticsearch.user | string | `nil` | The username required to access the service, if any | -| global.registryPullSecrets[0] | string | `"quay-registry-secret"` | | -| global.strategy.rollingUpdate.maxSurge | int | `1` | | -| global.strategy.rollingUpdate.maxUnavailable | int | `0` | | -| global.tracking.auth | string | `"secret"` | Select how solr and repo authenticate to each other none: work only prior to acs 7.2 (and was the default) secret: use a shared secret (to specify using `tracking.sharedsecret`) https: to use mTLS auth (require appropriate certificate configuration) | -| global.tracking.sharedsecret | string | `nil` | Shared secret to authenticate repo/solr traffic. Strong enough secret can be generated with `openssl rand 20 -base64` | -| imagemagick | object | `{"environment":{"JAVA_OPTS":"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"},"image":{"internalPort":8090,"pullPolicy":"IfNotPresent","repository":"alfresco/alfresco-imagemagick","tag":"3.1.0"},"livenessProbe":{"initialDelaySeconds":10,"livenessPercent":150,"livenessTransformPeriodSeconds":600,"maxTransformSeconds":900,"maxTransforms":10000,"periodSeconds":20,"timeoutSeconds":10},"nodeSelector":{},"podSecurityContext":{"runAsNonRoot":true,"runAsUser":33002},"readinessProbe":{"initialDelaySeconds":20,"periodSeconds":60,"timeoutSeconds":10},"replicaCount":2,"resources":{"limits":{"cpu":"4","memory":"1000Mi"},"requests":{"cpu":"0.5","memory":"300Mi"}},"service":{"externalPort":80,"name":"imagemagick","type":"ClusterIP"}}` | Declares the alfresco-imagemagick service used by the content repository to transform image files | -| imap | object | `{"mail":{"from":{"default":null},"to":{"default":null}},"server":{"enabled":false,"host":"0.0.0.0","imap":{"enabled":true},"imaps":{"enabled":true,"port":1144},"port":1143}}` | For a full information of configuring the imap subsystem, see https://docs.alfresco.com/content-services/latest/config/email/#enable-imap-protocol-using-alfresco-globalproperties | -| libreoffice | object | `{"environment":{"JAVA_OPTS":"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"},"image":{"internalPort":8090,"pullPolicy":"IfNotPresent","repository":"alfresco/alfresco-libreoffice","tag":"3.1.0"},"livenessProbe":{"initialDelaySeconds":10,"livenessPercent":250,"livenessTransformPeriodSeconds":600,"maxTransformSeconds":1800,"maxTransforms":99999,"periodSeconds":20,"timeoutSeconds":10},"nodeSelector":{},"podSecurityContext":{"runAsNonRoot":true,"runAsUser":33003},"readinessProbe":{"initialDelaySeconds":20,"periodSeconds":60,"timeoutSeconds":10},"replicaCount":2,"resources":{"limits":{"cpu":"4","memory":"1000Mi"},"requests":{"cpu":"0.5","memory":"400Mi"}},"service":{"externalPort":80,"name":"libreoffice","type":"ClusterIP"}}` | Declares the alfresco-libreoffice service used by the content repository to transform office files | -| mail | object | `{"encoding":"UTF-8","existingSecretName":null,"from":{"default":null,"enabled":false},"host":null,"password":null,"port":25,"protocol":"smtps","smtp":{"auth":true,"debug":false,"starttls":{"enable":true},"timeout":30000},"smtps":{"auth":true,"starttls":{"enable":true}},"username":null}` | For a full information of configuring the outbound email system, see https://docs.alfresco.com/content-services/latest/config/email/#manage-outbound-emails | -| mail.existingSecretName | string | `nil` | An existing kubernetes secret that contains MAIL_PASSWORD as per `mail.password` value | -| mail.from.default | string | `nil` | Specifies the email address from which email notifications are sent | -| mail.host | string | `nil` | SMTP(S) host server to enable delivery of site invitations, activity notifications and workflow tasks by email | -| messageBroker | object | `{"existingSecretName":null,"password":null,"secretName":"acs-alfresco-cs-brokersecret","url":null,"user":null}` | external activemq connection setting when activemq.enabled=false | -| messageBroker.existingSecretName | string | `nil` | Alternatively, provide credentials via an existing secret that contains BROKER_URL, BROKER_USERNAME and BROKER_PASSWORD keys | -| messageBroker.secretName | string | `"acs-alfresco-cs-brokersecret"` | Name of the secret managed by this chart | -| metadataKeystore.defaultKeyPassword | string | `"oKIWzVdEdA"` | | -| metadataKeystore.defaultKeystorePassword | string | `"mp6yc0UD9e"` | | -| msTeams | object | `{"enabled":false}` | Enable/Disable Alfresco Content Connector for Microsoft Teams | -| msTeamsService.alfresco.baseUrl | string | `"change_me_alf_base_url"` | | -| msTeamsService.alfresco.digitalWorkspace.contextPath | string | `"/workspace/"` | | -| msTeamsService.image.internalPort | int | `3978` | | -| msTeamsService.image.pullPolicy | string | `"IfNotPresent"` | | -| msTeamsService.image.repository | string | `"quay.io/alfresco/alfresco-ms-teams-service"` | | -| msTeamsService.image.tag | string | `"2.0.0"` | | -| msTeamsService.ingress.path | string | `"/ms-teams-service"` | | -| msTeamsService.ingress.tls | list | `[]` | | -| msTeamsService.livenessProbe.initialDelaySeconds | int | `10` | | -| msTeamsService.livenessProbe.periodSeconds | int | `20` | | -| msTeamsService.livenessProbe.timeoutSeconds | int | `10` | | -| msTeamsService.microsoft.app.id | string | `"change_me_app_id"` | | -| msTeamsService.microsoft.app.oauth.connectionName | string | `"alfresco"` | | -| msTeamsService.microsoft.app.password | string | `"change_me_app_pwd"` | | -| msTeamsService.nodeSelector | object | `{}` | | -| msTeamsService.podSecurityContext.runAsNonRoot | bool | `true` | | -| msTeamsService.podSecurityContext.runAsUser | int | `33041` | | -| msTeamsService.readinessProbe.initialDelaySeconds | int | `20` | | -| msTeamsService.readinessProbe.periodSeconds | int | `60` | | -| msTeamsService.readinessProbe.timeoutSeconds | int | `10` | | -| msTeamsService.replicaCount | int | `2` | | -| msTeamsService.resources.limits.cpu | string | `"1"` | | -| msTeamsService.resources.limits.memory | string | `"1000Mi"` | | -| msTeamsService.resources.requests.cpu | string | `"0.5"` | | -| msTeamsService.resources.requests.memory | string | `"1000Mi"` | | -| msTeamsService.service.externalPort | int | `80` | | -| msTeamsService.service.name | string | `"ms-teams-service"` | | -| msTeamsService.service.type | string | `"ClusterIP"` | | -| msTeamsService.teams.chat.filenameEnabled | bool | `true` | | -| msTeamsService.teams.chat.imageEnabled | bool | `true` | | -| msTeamsService.teams.chat.metadataEnabled | bool | `true` | | -| ooi | object | `{"enabled":false}` | Enable/Disable Alfresco Collaboration Connector for Microsoft 365 | -| ooiService.environment.JAVA_OPTS | string | `" -Dalfresco.base-url=http://acs-alfresco-cs-repository:80"` | | -| ooiService.image.internalPort | int | `9095` | | -| ooiService.image.pullPolicy | string | `"IfNotPresent"` | | -| ooiService.image.repository | string | `"quay.io/alfresco/alfresco-ooi-service"` | | -| ooiService.image.tag | string | `"2.0.0"` | | -| ooiService.ingress.path | string | `"/ooi-service"` | | -| ooiService.ingress.tls | list | `[]` | | -| ooiService.livenessProbe.initialDelaySeconds | int | `10` | | -| ooiService.livenessProbe.periodSeconds | int | `20` | | -| ooiService.livenessProbe.timeoutSeconds | int | `10` | | -| ooiService.nodeSelector | object | `{}` | | -| ooiService.podSecurityContext.runAsNonRoot | bool | `true` | | -| ooiService.podSecurityContext.runAsUser | int | `33006` | | -| ooiService.readinessProbe.initialDelaySeconds | int | `20` | | -| ooiService.readinessProbe.periodSeconds | int | `60` | | -| ooiService.readinessProbe.timeoutSeconds | int | `10` | | -| ooiService.replicaCount | int | `2` | | -| ooiService.resources.limits.cpu | string | `"2"` | | -| ooiService.resources.limits.memory | string | `"1000Mi"` | | -| ooiService.resources.requests.cpu | string | `"0.25"` | | -| ooiService.resources.requests.memory | string | `"1000Mi"` | | -| ooiService.service.externalPort | int | `80` | | -| ooiService.service.name | string | `"ooi-service"` | | -| ooiService.service.type | string | `"ClusterIP"` | | -| pdfrenderer | object | `{"environment":{"JAVA_OPTS":"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"},"image":{"internalPort":8090,"pullPolicy":"IfNotPresent","repository":"alfresco/alfresco-pdf-renderer","tag":"3.1.0"},"livenessProbe":{"initialDelaySeconds":10,"livenessPercent":150,"livenessTransformPeriodSeconds":600,"maxTransformSeconds":1200,"maxTransforms":10000,"periodSeconds":20,"timeoutSeconds":10},"nodeSelector":{},"podSecurityContext":{"runAsNonRoot":true,"runAsUser":33001},"readinessProbe":{"initialDelaySeconds":20,"periodSeconds":60,"timeoutSeconds":10},"replicaCount":2,"resources":{"limits":{"cpu":"2","memory":"1000Mi"},"requests":{"cpu":"0.25","memory":"300Mi"}},"service":{"externalPort":80,"name":"pdfrenderer","type":"ClusterIP"}}` | Declares the alfresco-pdf-renderer service used by the content repository to transform pdf files | -| postgresql.auth.database | string | `"alfresco"` | | -| postgresql.auth.existingSecret | string | `nil` | | -| postgresql.auth.password | string | `"alfresco"` | | -| postgresql.auth.username | string | `"alfresco"` | | -| postgresql.commonAnnotations.application | string | `"alfresco-content-services"` | | -| postgresql.enabled | bool | `true` | Toggle embedded postgres for Alfresco Content Services repository Check [PostgreSQL Bitnami chart Documentation](https://github.com/bitnami/charts/tree/main/bitnami/postgresql) | -| postgresql.image.pullPolicy | string | `"IfNotPresent"` | | -| postgresql.image.tag | string | `"14.4.0"` | | -| postgresql.nameOverride | string | `"postgresql-acs"` | | -| postgresql.primary.extendedConfiguration | string | `"max_connections = 250\nshared_buffers = 512MB\neffective_cache_size = 2GB\nwal_level = minimal\nmax_wal_senders = 0\nmax_replication_slots = 0\nlog_min_messages = LOG\n"` | | -| postgresql.primary.persistence.existingClaim | string | `nil` | provide an existing persistent volume claim name to persist SQL data Make sure the root folder has the appropriate permissions/ownhership set. | -| postgresql.primary.persistence.storageClass | string | `nil` | set the storageClass to use for dynamic provisioning. setting it to null means "default storageClass". | -| postgresql.primary.persistence.subPath | string | `"alfresco-content-services/database-data"` | | -| postgresql.primary.resources.limits.cpu | string | `"8"` | | -| postgresql.primary.resources.limits.memory | string | `"8192Mi"` | | -| postgresql.primary.resources.requests.cpu | string | `"0.5"` | | -| postgresql.primary.resources.requests.memory | string | `"1500Mi"` | | -| repository.adminPassword | string | `"209c6174da490caeb422f3fa5a7ae634"` | Administrator password for ACS in NTLM hash format to set at bootstrap time | -| repository.command | list | `[]` | | -| repository.edition | string | `"Enterprise"` | | -| repository.environment.JAVA_OPTS | string | `"-Dtransform.service.enabled=true -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 -Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.algorithm=DESede"` | | -| repository.existingSecretName | string | `nil` | An existing secret that contains REPO_ADMIN_PASSWORD as an alternative for `repository.adminPassword` value | -| repository.extraInitContainers | list | `[]` | | -| repository.extraLogStatements | object | `{}` | Provide additional log statements by adding classes and/or packages in a key:value maner org.alfresco.repo.content.transform.TransformerDebug: debug | -| repository.extraSideContainers | list | `[]` | | -| repository.extraVolumeMounts | list | `[]` | | -| repository.extraVolumes | list | `[]` | | -| repository.image.hazelcastPort | int | `5701` | | -| repository.image.internalPort | int | `8080` | | -| repository.image.pullPolicy | string | `"IfNotPresent"` | | -| repository.image.repository | string | `"quay.io/alfresco/alfresco-content-repository"` | | -| repository.image.tag | string | `"7.4.0.1"` | | -| repository.ingress.annotations | object | `{}` | | -| repository.ingress.maxUploadSize | string | `"5g"` | | -| repository.ingress.path | string | `"/"` | | -| repository.ingress.tls | list | `[]` | | -| repository.initContainers.db.image.pullPolicy | string | `"IfNotPresent"` | | -| repository.initContainers.db.image.repository | string | `"busybox"` | | -| repository.initContainers.db.image.tag | string | `"1.35.0"` | | -| repository.initContainers.db.resources.limits.cpu | string | `"0.25"` | | -| repository.initContainers.db.resources.limits.memory | string | `"10Mi"` | | -| repository.licenseSecret | string | `nil` | The name of the secret holding the ACS repository license if any. it must be contained within a `data['*.lic']` property For details on how to manage license, see: https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/examples/alf_license.md | -| repository.livenessProbe.initialDelaySeconds | int | `130` | | -| repository.livenessProbe.periodSeconds | int | `20` | | -| repository.livenessProbe.timeoutSeconds | int | `10` | | -| repository.nodeSelector | object | `{}` | | -| repository.persistence.accessModes | list | `["ReadWriteMany"]` | Specify a storageClass for dynamic provisioning | -| repository.persistence.baseSize | string | `"20Gi"` | | -| repository.persistence.data.mountPath | string | `"/usr/local/tomcat/alf_data"` | | -| repository.persistence.data.subPath | string | `"alfresco-content-services/repository-data"` | | -| repository.persistence.enabled | bool | `true` | Persist repository data | -| repository.persistence.existingClaim | string | `nil` | Use pre-provisioned pv through its claim (e.g. static provisioning) | -| repository.persistence.storageClass | string | `nil` | Bind PVC based on storageClass (e.g. dynamic provisioning) | -| repository.podSecurityContext.fsGroup | int | `1000` | | -| repository.podSecurityContext.runAsGroup | int | `1000` | | -| repository.podSecurityContext.runAsNonRoot | bool | `true` | | -| repository.podSecurityContext.runAsUser | int | `33000` | | -| repository.readinessProbe.failureThreshold | int | `6` | | -| repository.readinessProbe.initialDelaySeconds | int | `60` | | -| repository.readinessProbe.periodSeconds | int | `20` | | -| repository.readinessProbe.timeoutSeconds | int | `10` | | -| repository.replicaCount | int | `2` | | -| repository.resources.limits.cpu | string | `"4"` | | -| repository.resources.limits.memory | string | `"3000Mi"` | | -| repository.resources.requests.cpu | string | `"1"` | | -| repository.resources.requests.memory | string | `"1500Mi"` | | -| repository.service.externalPort | int | `80` | | -| repository.service.name | string | `"alfresco"` | | -| repository.service.type | string | `"ClusterIP"` | | -| repository.startupProbe | object | `{"failureThreshold":10,"periodSeconds":30}` | The startup probe to cover the worse case startup time for slow clusters | -| repository.strategy.type | string | `"Recreate"` | | -| s3connector.config.bucketLocation | string | `nil` | | -| s3connector.config.bucketName | string | `nil` | | -| s3connector.enabled | bool | `false` | Enable the S3 Connector For a full list of properties on the S3 connector see: https://docs.alfresco.com/s3connector/references/s3-contentstore-ref-config-props.html | -| s3connector.existingSecretName | string | `nil` | An existing kubernetes secret that contains ACCESSKEY, SECRETKEY, ENCRYPTION, KMSKEYID keys | -| s3connector.secrets.accessKey | string | `nil` | | -| s3connector.secrets.awsKmsKeyId | string | `nil` | | -| s3connector.secrets.encryption | string | `nil` | | -| s3connector.secrets.secretKey | string | `nil` | | -| share | object | `{"command":[],"environment":{"CATALINA_OPTS":"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"},"extraInitContainers":[],"extraSideContainers":[],"extraVolumeMounts":[],"extraVolumes":[],"image":{"internalPort":8080,"pullPolicy":"IfNotPresent","repository":"quay.io/alfresco/alfresco-share","tag":"7.4.0.1"},"ingress":{"annotations":{},"path":"/share","tls":[]},"livenessProbe":{"initialDelaySeconds":200,"periodSeconds":20,"timeoutSeconds":10},"nodeSelector":{},"podSecurityContext":{"runAsNonRoot":true},"readinessProbe":{"initialDelaySeconds":60,"periodSeconds":20,"timeoutSeconds":15},"replicaCount":1,"resources":{"limits":{"cpu":"4","memory":"2000Mi"},"requests":{"cpu":"1","memory":"512Mi"}},"securityContext":{"capabilities":{"drop":["NET_RAW","ALL"]},"runAsNonRoot":false},"service":{"externalPort":80,"name":"share","type":"ClusterIP"}}` | Define the alfresco-share properties to use in the k8s cluster This is the default presentation layer(UI) of Alfresco Content Services | -| tika | object | `{"environment":{"JAVA_OPTS":"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"},"image":{"internalPort":8090,"pullPolicy":"IfNotPresent","repository":"alfresco/alfresco-tika","tag":"3.1.0"},"livenessProbe":{"initialDelaySeconds":60,"livenessPercent":400,"livenessTransformPeriodSeconds":600,"maxTransformSeconds":1800,"maxTransforms":10000,"periodSeconds":20,"timeoutSeconds":10},"nodeSelector":{},"podSecurityContext":{"runAsNonRoot":true,"runAsUser":33004},"readinessProbe":{"initialDelaySeconds":60,"periodSeconds":60,"timeoutSeconds":10},"replicaCount":2,"resources":{"limits":{"cpu":"2","memory":"1000Mi"},"requests":{"cpu":"0.25","memory":"600Mi"}},"service":{"externalPort":80,"name":"tika","type":"ClusterIP"}}` | Declares the alfresco-tika service used by the content repository to transform office files | -| transformmisc | object | `{"enabled":true,"environment":{"JAVA_OPTS":"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"},"image":{"internalPort":8090,"pullPolicy":"IfNotPresent","repository":"alfresco/alfresco-transform-misc","tag":"3.1.0"},"livenessProbe":{"initialDelaySeconds":10,"livenessPercent":400,"livenessTransformPeriodSeconds":600,"maxTransformSeconds":1800,"maxTransforms":10000,"periodSeconds":20,"timeoutSeconds":10},"nodeSelector":{},"podSecurityContext":{"runAsNonRoot":true,"runAsUser":33006},"readinessProbe":{"initialDelaySeconds":20,"periodSeconds":60,"timeoutSeconds":10},"replicaCount":2,"resources":{"limits":{"cpu":"2","memory":"1000Mi"},"requests":{"cpu":"0.25","memory":"300Mi"}},"service":{"externalPort":80,"name":"transformmisc","type":"ClusterIP"}}` | Declares the alfresco-tika service used by the content repository to transform office files | -| transformrouter.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | -| transformrouter.image.internalPort | int | `8095` | | -| transformrouter.image.pullPolicy | string | `"IfNotPresent"` | | -| transformrouter.image.repository | string | `"quay.io/alfresco/alfresco-transform-router"` | | -| transformrouter.image.tag | string | `"2.1.0"` | | -| transformrouter.livenessProbe.initialDelaySeconds | int | `140` | | -| transformrouter.livenessProbe.periodSeconds | int | `120` | | -| transformrouter.livenessProbe.timeoutSeconds | int | `60` | | -| transformrouter.nodeSelector | object | `{}` | | -| transformrouter.podSecurityContext.runAsNonRoot | bool | `true` | | -| transformrouter.podSecurityContext.runAsUser | int | `33016` | | -| transformrouter.readinessProbe.initialDelaySeconds | int | `140` | | -| transformrouter.readinessProbe.periodSeconds | int | `60` | | -| transformrouter.readinessProbe.timeoutSeconds | int | `10` | | -| transformrouter.replicaCount | int | `2` | | -| transformrouter.resources.limits.cpu | string | `"1"` | | -| transformrouter.resources.limits.memory | string | `"512Mi"` | | -| transformrouter.resources.requests.cpu | string | `"0.25"` | | -| transformrouter.resources.requests.memory | string | `"300Mi"` | | -| transformrouter.service.externalPort | int | `80` | | -| transformrouter.service.name | string | `"transform-router"` | | -| transformrouter.service.type | string | `"ClusterIP"` | | - -Alfresco Content Service will be deployed in a Kubernetes cluster. This cluster -needs a at least 32GB memory to split among below pods: - -* 2 x repository -* 1 x share -* 1 x search -* 2 x pdfrenderer -* 2 x imagemagick -* 2 libreoffice -* 2 tika -* 2 misc -* 1 x postgresql -* 1 activemq - -> Note: this is the default settings but requirements can be lowered by -dropping the `replicaCount` value to 1 for each service. - -Default CPU and memory requirements for each pods are set as low as e think is -reasonable. If you need to teak the resource allocation you can use the -`resources.limits.cpu` & `resources.limits.memory` for each component of the -platform. Remember that most of them are running in JAVA VM so you might want -to also raise the JVM memory settings (-Xmx) which is possible using pods' -environment variables. diff --git a/alfresco-content-services/README.md.gotmpl b/alfresco-content-services/README.md.gotmpl deleted file mode 100644 index 8269859..0000000 --- a/alfresco-content-services/README.md.gotmpl +++ /dev/null @@ -1,42 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} - -Alfresco Content Service will be deployed in a Kubernetes cluster. This cluster -needs a at least 32GB memory to split among below pods: - -* 2 x repository -* 1 x share -* 1 x search -* 2 x pdfrenderer -* 2 x imagemagick -* 2 libreoffice -* 2 tika -* 2 misc -* 1 x postgresql -* 1 activemq - -> Note: this is the default settings but requirements can be lowered by -dropping the `replicaCount` value to 1 for each service. - -Default CPU and memory requirements for each pods are set as low as e think is -reasonable. If you need to teak the resource allocation you can use the -`resources.limits.cpu` & `resources.limits.memory` for each component of the -platform. Remember that most of them are running in JAVA VM so you might want -to also raise the JVM memory settings (-Xmx) which is possible using pods' -environment variables. diff --git a/alfresco-content-services/charts/activemq/.helmignore b/alfresco-content-services/charts/activemq/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/alfresco-content-services/charts/activemq/.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 -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/alfresco-content-services/charts/activemq/Chart.lock b/alfresco-content-services/charts/activemq/Chart.lock deleted file mode 100644 index 9e001a0..0000000 --- a/alfresco-content-services/charts/activemq/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 1.0.0 -digest: sha256:094ae734b29e6e4735e4b6c3ad786305217cb375570a6a8518395c92f61c23bf -generated: "2023-02-14T14:53:39.031589+01:00" diff --git a/alfresco-content-services/charts/activemq/Chart.yaml b/alfresco-content-services/charts/activemq/Chart.yaml deleted file mode 100644 index dc267f8..0000000 --- a/alfresco-content-services/charts/activemq/Chart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v2 -appVersion: 5.17.4 -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 1.0.0 -description: A Helm chart providing a basic Apache ActiveMQ deployment required to - evaluate ACS (not meant to be used in production). -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -keywords: -- activemq -- message broker -name: activemq -sources: -- https://github.com/Alfresco/alfresco-helm-charts -version: 3.1.0 diff --git a/alfresco-content-services/charts/activemq/README.md b/alfresco-content-services/charts/activemq/README.md deleted file mode 100644 index df28d15..0000000 --- a/alfresco-content-services/charts/activemq/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# activemq - -![Version: 3.1.0](https://img.shields.io/badge/Version-3.1.0-informational?style=flat-square) ![AppVersion: 5.17.4](https://img.shields.io/badge/AppVersion-5.17.4-informational?style=flat-square) - -A Helm chart providing a basic Apache ActiveMQ deployment required to evaluate ACS (not meant to be used in production). - -## Source Code - -* - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 1.0.0 | - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| adminUser.existingSecretName | string | `nil` | An existing kubernetes secret that contains BROKER_USERNAME and BROKER_PASSWORD keys to override the default user credentials | -| adminUser.password | string | `"admin"` | Password for the default user with administrative privileges | -| adminUser.user | string | `"admin"` | Username for the default user with administrative privileges | -| enabled | bool | `true` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"alfresco/alfresco-activemq"` | | -| image.tag | string | `"5.17.4-jre17-rockylinux8"` | | -| livenessProbe.failureThreshold | int | `6` | | -| livenessProbe.initialDelaySeconds | int | `60` | | -| livenessProbe.periodSeconds | int | `10` | | -| livenessProbe.timeoutSeconds | int | `1` | | -| nodeSelector | object | `{}` | | -| persistence.accessModes | list | `["ReadWriteOnce"]` | defines type of access required by the persistent volume [Access_Modes] (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) | -| persistence.baseSize | string | `"20Gi"` | | -| persistence.data.mountPath | string | `"/opt/activemq/data"` | | -| persistence.data.subPath | string | `"alfresco-infrastructure/activemq-data"` | | -| persistence.enabled | bool | `true` | | -| persistence.existingClaim | string | `nil` | | -| persistence.storageClass | string | `nil` | | -| podSecurityContext.fsGroup | int | `1000` | | -| podSecurityContext.runAsGroup | int | `1000` | | -| podSecurityContext.runAsUser | int | `33031` | | -| readinessProbe.failureThreshold | int | `6` | | -| readinessProbe.initialDelaySeconds | int | `5` | | -| readinessProbe.periodSeconds | int | `10` | | -| readinessProbe.timeoutSeconds | int | `1` | | -| replicaCount | int | `1` | | -| resources.limits.cpu | string | `"2"` | | -| resources.limits.memory | string | `"2048Mi"` | | -| resources.requests.cpu | string | `"0.25"` | | -| resources.requests.memory | string | `"512Mi"` | | -| service.name | string | `"activemq"` | | -| services.broker.ports.external.amqp | int | `5672` | | -| services.broker.ports.external.openwire | int | `61616` | | -| services.broker.ports.external.stomp | int | `61613` | | -| services.broker.ports.internal.amqp | int | `5672` | | -| services.broker.ports.internal.openwire | int | `61616` | | -| services.broker.ports.internal.stomp | int | `61613` | | -| services.broker.type | string | `"ClusterIP"` | | -| services.webConsole.ports.external.webConsole | int | `8161` | | -| services.webConsole.ports.internal.webConsole | int | `8161` | | -| services.webConsole.type | string | `"NodePort"` | | diff --git a/alfresco-content-services/charts/activemq/README.md.gotmpl b/alfresco-content-services/charts/activemq/README.md.gotmpl deleted file mode 100644 index 9174c35..0000000 --- a/alfresco-content-services/charts/activemq/README.md.gotmpl +++ /dev/null @@ -1,16 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/.helmignore b/alfresco-content-services/charts/activemq/charts/alfresco-common/.helmignore deleted file mode 100644 index 721fe6a..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/.helmignore +++ /dev/null @@ -1,25 +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 -# Helm unit tests -tests -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/Chart.lock b/alfresco-content-services/charts/activemq/charts/alfresco-common/Chart.lock deleted file mode 100644 index cb293e5..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.17.1 -digest: sha256:f5dd11ccf8726befd217545b84a48b02c49d68f03a75e4e102b971ad2e4f0fec -generated: "2022-10-05T16:55:42.662007+02:00" diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/Chart.yaml b/alfresco-content-services/charts/activemq/charts/alfresco-common/Chart.yaml deleted file mode 100644 index d6ec576..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v2 -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.x.x -description: 'A helper subchart to avoid duplication in alfresco charts and set common - external dependencies ' -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -name: alfresco-common -type: library -version: 1.0.0 diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/README.md b/alfresco-content-services/charts/activemq/charts/alfresco-common/README.md deleted file mode 100644 index 2da4e8f..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# alfresco-common - -![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) - -A helper subchart to avoid duplication in alfresco charts and set common -external dependencies - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ | common | 1.x.x | - diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/README.md.gotmpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/README.md.gotmpl deleted file mode 100644 index b301f39..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/README.md.gotmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/.helmignore b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml deleted file mode 100644 index 39edbb3..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -annotations: - category: Infrastructure -apiVersion: v2 -appVersion: 1.17.1 -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.17.1 diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/README.md b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/README.md deleted file mode 100644 index a2ecd60..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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.dev/) for deployment and management of Helm Charts in clusters. - -## 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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_affinities.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_affinities.tpl deleted file mode 100644 index 2387be2..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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: - - {{ include "common.names.namespace" .context | 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: - - {{ include "common.names.namespace" .context | 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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_capabilities.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 9d9b760..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_errors.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_images.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_images.tpl deleted file mode 100644 index 42ffbc7..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_ingress.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_ingress.tpl deleted file mode 100644 index 8caf73a..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_labels.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_names.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_names.tpl deleted file mode 100644 index 1bdac8b..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_secrets.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_secrets.tpl deleted file mode 100644 index a53fb44..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_storage.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a84..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_tplvalues.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db1668..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_utils.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_utils.tpl deleted file mode 100644 index 8c22b2a..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_warnings.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa4..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec1..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a0..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_redis.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_validations.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/values.yaml b/alfresco-content-services/charts/activemq/charts/alfresco-common/charts/common/values.yaml deleted file mode 100644 index f2df68e..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl deleted file mode 100644 index 518e8cd..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{{/* -Create a default fully qualified name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "activemq.fullname" -}} -{{- printf "%s-activemq" .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "activemq.env" -}} -- name: ACTIVEMQ_URL - value: $(BROKER_URL) -- name: ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} - -{{- define "spring.activemq.env" -}} -- name: SPRING_ACTIVEMQ_BROKERURL - value: $(BROKER_URL) -- name: SPRING_ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: SPRING_ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl deleted file mode 100644 index 1260536..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{- define "alfresco-content-services.imagePullSecrets" }} -{{- if .Values.global.alfrescoRegistryPullSecrets }} -imagePullSecrets: - - name: {{ .Values.global.alfrescoRegistryPullSecrets }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl deleted file mode 100644 index d473d05..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{{- define "data_volume" -}} -- name: data -{{- $svc_name := .service.name }} -{{- with .persistence }} -{{- if .enabled }} -{{- $sc_name := .storageClass | default "default" }} - persistentVolumeClaim: - claimName: >- - {{ .existingClaim | default (printf "%s-%s-pvc" $svc_name $sc_name ) }} -{{- else }} - emptyDir: - sizeLimit: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end }} -{{- end -}} - -{{- define "component_pvc" -}} -{{ $svc_name := .service.name }} -{{- with .persistence }} -{{- $sc_name := .storageClass | default "default" -}} ---- -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ printf "%s-%s-pvc" $svc_name $sc_name }} -spec: - {{- if .storageClass }} - storageClassName: {{ .storageClass | quote }} - {{- end }} - {{- if .accessModes }} - accessModes: - {{- range .accessModes }} - - {{ . }} - {{- end }} - {{- end }} - volumeMode: {{ .volumeMode | default "Filesystem" }} - resources: - requests: - storage: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl deleted file mode 100644 index 8736769..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{{/* -Create a default fully qualified name. -*/}} -{{- define "alfresco-search.fullName" -}} -{{- printf "%s-alfresco-search" .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Alfresco Search2 Host -*/}} -{{- define "alfresco-search.host" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - {{ printf "%s-solr" (include "alfresco-search.fullName" .) -}} -{{- else -}} - {{ index $.Values "alfresco-search" "external" "host" | default "localhost" -}} -{{- end -}} -{{- end -}} - -{{/* -Get Alfresco Search Port -*/}} -{{- define "alfresco-search.port" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - {{ print (index .Values "alfresco-search" "service" "externalPort") -}} -{{- else -}} - {{ index $.Values "alfresco-search" "external" "port" | default "8983" -}} -{{- end -}} -{{- end -}} - -{{/* -Get Alfresco Solr context -*/}} -{{- define "alfresco-search.baseurl" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - /solr -{{- else -}} - {{ index $.Values "alfresco-search" "external" "context" | default "/solr" -}} -{{- end -}} -{{- end -}} - -{{/* -Required Solr secret -*/}} -{{- define "tracking-shared-secret" -}} - {{- required "You need to provide a shared secret for Solr/repo authentication , see https://github.com/Alfresco/acs-deployment/tree/master/docs/helm" .Values.global.tracking.sharedsecret -}} -{{- end }} diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl deleted file mode 100644 index 8829e4e..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{- define "default-pod-security-context" }} - runAsNonRoot: true - runAsUser: 33099 - fsGroupChangePolicy: OnRootMismatch -{{- end }} - -{{- define "default-security-context" }} - runAsNonRoot: true - allowPrivilegeEscalation: false - capabilities: - drop: - - NET_RAW - - ALL -{{- end }} - -{{- define "component-pod-security-context" }} - securityContext: -{{- if .podSecurityContext }} - {{- .podSecurityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-pod-security-context" . }} -{{- end }} -{{- end }} - -{{- define "component-security-context" }} - securityContext: -{{- if .securityContext }} - {{- .securityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-security-context" . }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers.tpl b/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers.tpl deleted file mode 100644 index 7ae7d58..0000000 --- a/alfresco-content-services/charts/activemq/charts/alfresco-common/templates/_helpers.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{- define "content-services.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-cs") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "alfresco.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/alfresco-content-services/charts/activemq/templates/_helpers.tpl b/alfresco-content-services/charts/activemq/templates/_helpers.tpl deleted file mode 100644 index 7afc06e..0000000 --- a/alfresco-content-services/charts/activemq/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "activemq.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 "activemq.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 chart name and version as used by the chart label. -*/}} -{{- define "activemq.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "activemq.labels" -}} -helm.sh/chart: {{ include "activemq.chart" . }} -{{ include "activemq.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "activemq.selectorLabels" -}} -app.kubernetes.io/name: {{ include "activemq.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "activemq.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "activemq.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/activemq/templates/deployment-activemq.yaml b/alfresco-content-services/charts/activemq/templates/deployment-activemq.yaml deleted file mode 100644 index e93f309..0000000 --- a/alfresco-content-services/charts/activemq/templates/deployment-activemq.yaml +++ /dev/null @@ -1,89 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "activemq.fullname" . }} - labels: - {{- include "activemq.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: Recreate - selector: - matchLabels: - {{- include "activemq.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "activemq.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values | indent 4 }} - containers: - - name: {{ .Values.service.name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- include "component-security-context" .Values | indent 6 }} - env: - - name: ACTIVEMQ_CONFIG_MINMEMORY - value: "{{ .Values.resources.requests.memory | replace "Mi" "" }}" - - name: ACTIVEMQ_CONFIG_MAXMEMORY - value: "{{ .Values.resources.limits.memory | replace "Mi" "" }}" - - name: ACTIVEMQ_BROKER_NAME - value: "{{ template "activemq.fullname" . }}" - {{- $credentialsSecretName := default (printf "%s-brokersecret" (include "activemq.fullname" .)) $.Values.adminUser.existingSecretName }} - - name: ACTIVEMQ_ADMIN_LOGIN - valueFrom: - secretKeyRef: - name: {{ $credentialsSecretName }} - key: BROKER_USERNAME - - name: ACTIVEMQ_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ $credentialsSecretName }} - key: BROKER_PASSWORD - ports: - - name: stomp - containerPort: {{ .Values.services.broker.ports.internal.stomp | default 61613 }} - - name: openwire - containerPort: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - - name: amqp - containerPort: {{ .Values.services.broker.ports.internal.amqp | default 5672 }} - - name: web-console - containerPort: {{ .Values.services.webConsole.ports.internal.webConsole | default 8161 }} - readinessProbe: - tcpSocket: - port: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - livenessProbe: - tcpSocket: - port: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - failureThreshold: {{ .Values.livenessProbe.failureThreshold }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - resources: {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.persistence.data.mountPath }} - subPath: {{ .Values.persistence.data.subPath }} - volumes: - {{- include "data_volume" .Values | nindent 8 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 1 diff --git a/alfresco-content-services/charts/activemq/templates/pvc-activemq.yaml b/alfresco-content-services/charts/activemq/templates/pvc-activemq.yaml deleted file mode 100644 index 6183cd0..0000000 --- a/alfresco-content-services/charts/activemq/templates/pvc-activemq.yaml +++ /dev/null @@ -1,3 +0,0 @@ -{{- if and (not .Values.persistence.existingClaim) .Values.persistence.enabled }} -{{ include "component_pvc" .Values }} -{{- end }} diff --git a/alfresco-content-services/charts/activemq/templates/secret-activemq.yaml b/alfresco-content-services/charts/activemq/templates/secret-activemq.yaml deleted file mode 100644 index 8787d80..0000000 --- a/alfresco-content-services/charts/activemq/templates/secret-activemq.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if not .Values.adminUser.existingSecretName }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "activemq.fullname" . }}-brokersecret - labels: - {{- include "activemq.labels" . | nindent 4 }} -type: Opaque -data: - BROKER_USERNAME: {{ .Values.adminUser.user | b64enc | quote }} - BROKER_PASSWORD: {{ .Values.adminUser.password | b64enc | quote }} -{{- end }} diff --git a/alfresco-content-services/charts/activemq/templates/svc-activemq-broker.yaml b/alfresco-content-services/charts/activemq/templates/svc-activemq-broker.yaml deleted file mode 100644 index a990428..0000000 --- a/alfresco-content-services/charts/activemq/templates/svc-activemq-broker.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "activemq.fullname" . }}-broker - labels: - {{- include "activemq.labels" . | nindent 4 }} -spec: - type: {{ .Values.services.broker.type }} - ports: - - port: {{ .Values.services.broker.ports.external.stomp | default 61613 }} - targetPort: {{ .Values.services.broker.ports.internal.stomp | default 61613 }} - name: stomp - protocol: TCP - - port: {{ .Values.services.broker.ports.external.openwire | default 61616 }} - targetPort: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - name: openwire - protocol: TCP - - port: {{ .Values.services.broker.ports.external.amqp | default 5672 }} - targetPort: {{ .Values.services.broker.ports.internal.amqp | default 5672 }} - name: amqp - protocol: TCP - selector: - {{- include "activemq.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/charts/activemq/templates/svc-activemq-web-console.yaml b/alfresco-content-services/charts/activemq/templates/svc-activemq-web-console.yaml deleted file mode 100644 index 1b38195..0000000 --- a/alfresco-content-services/charts/activemq/templates/svc-activemq-web-console.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "activemq.fullname" . }}-web-console - labels: - {{- include "activemq.labels" . | nindent 4 }} -spec: - type: {{ .Values.services.webConsole.type }} - ports: - - port: {{ .Values.services.webConsole.ports.external.webConsole | default 8161 }} - targetPort: {{ .Values.services.webConsole.ports.internal.webConsole | default 8161 }} - name: web-console - protocol: TCP - selector: - {{- include "activemq.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/charts/activemq/tests/deployment-activemq_test.yaml b/alfresco-content-services/charts/activemq/tests/deployment-activemq_test.yaml deleted file mode 100644 index 440ed69..0000000 --- a/alfresco-content-services/charts/activemq/tests/deployment-activemq_test.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -suite: test activemq deployment -templates: - - deployment-activemq.yaml -tests: - - it: should reference default secret containing broker default credentials - asserts: - - equal: - path: spec.template.spec.containers[0].env[3].name - value: ACTIVEMQ_ADMIN_LOGIN - template: deployment-activemq.yaml - - equal: - path: spec.template.spec.containers[0].env[3].valueFrom.secretKeyRef.name - value: RELEASE-NAME-activemq-brokersecret - template: deployment-activemq.yaml - - - it: should reference overridden secret when setting existingSecretName - set: - adminUser.existingSecretName: existing-secret - asserts: - - equal: - path: spec.template.spec.containers[0].env[3].valueFrom.secretKeyRef.name - value: existing-secret - template: deployment-activemq.yaml - - - it: should render cpu and memory limits - asserts: - - equal: - path: spec.template.spec.containers[0].resources - value: - requests: - cpu: "0.25" - memory: "512Mi" - limits: - cpu: "2" - memory: "2048Mi" - template: deployment-activemq.yaml diff --git a/alfresco-content-services/charts/activemq/tests/pvc-activemq_test.yaml b/alfresco-content-services/charts/activemq/tests/pvc-activemq_test.yaml deleted file mode 100644 index 9bed2b1..0000000 --- a/alfresco-content-services/charts/activemq/tests/pvc-activemq_test.yaml +++ /dev/null @@ -1,64 +0,0 @@ ---- -suite: test activemq persistence -templates: - - deployment-activemq.yaml - - pvc-activemq.yaml -tests: - - it: should render an ephemeral volume - set: - persistence: - enabled: false - asserts: - - contains: - path: spec.template.spec.volumes - content: - emptyDir: - sizeLimit: 20Gi - name: data - template: deployment-activemq.yaml - - - it: should render a deployment with set claim - set: - persistence: - enabled: true - existingClaim: mysfsvolume - asserts: - - equal: - path: >- - spec.template.spec.volumes[0].persistentVolumeClaim.claimName - value: mysfsvolume - template: deployment-activemq.yaml - - - it: should render a deployment with dynamic claim name - set: - persistence: - enabled: true - volumeMode: Block - accessModes: - - ReadWriteMany - - ReadOnlyMany - asserts: - - equal: - path: >- - spec.template.spec.volumes[0].persistentVolumeClaim.claimName - value: activemq-default-pvc - template: deployment-activemq.yaml - - isNull: - path: spec.storageClassName - template: pvc-activemq.yaml - - - it: should render a deployment with provided storage class - set: - persistence: - enabled: true - storageClass: cheap - asserts: - - equal: - path: >- - spec.template.spec.volumes[0].persistentVolumeClaim.claimName - value: activemq-cheap-pvc - template: deployment-activemq.yaml - - equal: - path: spec.storageClassName - value: cheap - template: pvc-activemq.yaml diff --git a/alfresco-content-services/charts/activemq/tests/svc-activemq_test.yaml b/alfresco-content-services/charts/activemq/tests/svc-activemq_test.yaml deleted file mode 100644 index 206d017..0000000 --- a/alfresco-content-services/charts/activemq/tests/svc-activemq_test.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -suite: test activemq services -templates: - - svc-activemq-broker.yaml - - svc-activemq-web-console.yaml -tests: - - it: should use the default service name - asserts: - - equal: - path: spec.selector - value: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/name: activemq - template: svc-activemq-broker.yaml - - equal: - path: spec.selector - value: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/name: activemq - template: svc-activemq-web-console.yaml diff --git a/alfresco-content-services/charts/activemq/values.yaml b/alfresco-content-services/charts/activemq/values.yaml deleted file mode 100644 index eb928ce..0000000 --- a/alfresco-content-services/charts/activemq/values.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Leave this to true to deploy the chart -enabled: true -replicaCount: 1 -nodeSelector: {} -image: - repository: alfresco/alfresco-activemq - tag: 5.17.4-jre17-rockylinux8 - pullPolicy: IfNotPresent -adminUser: - # -- An existing kubernetes secret that contains BROKER_USERNAME and BROKER_PASSWORD keys to override the default user credentials - existingSecretName: - # -- Username for the default user with administrative privileges - user: admin - # -- Password for the default user with administrative privileges - password: admin -podSecurityContext: - runAsUser: 33031 - runAsGroup: 1000 - fsGroup: 1000 -resources: - requests: - cpu: "0.25" - memory: "512Mi" - limits: - cpu: "2" - memory: "2048Mi" -service: - name: activemq -services: - broker: - ports: - internal: - stomp: 61613 - amqp: 5672 - openwire: 61616 - external: - stomp: 61613 - amqp: 5672 - openwire: 61616 - type: ClusterIP - webConsole: - ports: - internal: - webConsole: 8161 - external: - webConsole: 8161 - type: NodePort -readinessProbe: - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 6 -livenessProbe: - initialDelaySeconds: 60 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 6 -persistence: - enabled: true - baseSize: 20Gi - storageClass: - # -- defines type of access required by the persistent volume - # [Access_Modes] (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) - accessModes: - - ReadWriteOnce - existingClaim: - data: - mountPath: "/opt/activemq/data" - subPath: "alfresco-infrastructure/activemq-data" diff --git a/alfresco-content-services/charts/alfresco-common/.helmignore b/alfresco-content-services/charts/alfresco-common/.helmignore deleted file mode 100644 index 721fe6a..0000000 --- a/alfresco-content-services/charts/alfresco-common/.helmignore +++ /dev/null @@ -1,25 +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 -# Helm unit tests -tests -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/alfresco-content-services/charts/alfresco-common/Chart.lock b/alfresco-content-services/charts/alfresco-common/Chart.lock deleted file mode 100644 index cb293e5..0000000 --- a/alfresco-content-services/charts/alfresco-common/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.17.1 -digest: sha256:f5dd11ccf8726befd217545b84a48b02c49d68f03a75e4e102b971ad2e4f0fec -generated: "2022-10-05T16:55:42.662007+02:00" diff --git a/alfresco-content-services/charts/alfresco-common/Chart.yaml b/alfresco-content-services/charts/alfresco-common/Chart.yaml deleted file mode 100644 index 5662b18..0000000 --- a/alfresco-content-services/charts/alfresco-common/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v2 -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.x.x -description: 'A helper subchart to avoid duplication in alfresco charts and set common - external dependencies ' -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -name: alfresco-common -type: library -version: 2.0.0 diff --git a/alfresco-content-services/charts/alfresco-common/README.md b/alfresco-content-services/charts/alfresco-common/README.md deleted file mode 100644 index 1df5281..0000000 --- a/alfresco-content-services/charts/alfresco-common/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# alfresco-common - -![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) - -A helper subchart to avoid duplication in alfresco charts and set common -external dependencies - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ | common | 1.x.x | - diff --git a/alfresco-content-services/charts/alfresco-common/README.md.gotmpl b/alfresco-content-services/charts/alfresco-common/README.md.gotmpl deleted file mode 100644 index b301f39..0000000 --- a/alfresco-content-services/charts/alfresco-common/README.md.gotmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/alfresco-common/charts/common/.helmignore b/alfresco-content-services/charts/alfresco-common/charts/common/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/Chart.yaml b/alfresco-content-services/charts/alfresco-common/charts/common/Chart.yaml deleted file mode 100644 index 39edbb3..0000000 --- a/alfresco-content-services/charts/alfresco-common/charts/common/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -annotations: - category: Infrastructure -apiVersion: v2 -appVersion: 1.17.1 -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.17.1 diff --git a/alfresco-content-services/charts/alfresco-common/charts/common/README.md b/alfresco-content-services/charts/alfresco-common/charts/common/README.md deleted file mode 100644 index a2ecd60..0000000 --- a/alfresco-content-services/charts/alfresco-common/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.dev/) for deployment and management of Helm Charts in clusters. - -## 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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_affinities.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_affinities.tpl deleted file mode 100644 index 2387be2..0000000 --- a/alfresco-content-services/charts/alfresco-common/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: - - {{ include "common.names.namespace" .context | 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: - - {{ include "common.names.namespace" .context | 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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_capabilities.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 9d9b760..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_errors.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_images.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_images.tpl deleted file mode 100644 index 42ffbc7..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_ingress.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_ingress.tpl deleted file mode 100644 index 8caf73a..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_labels.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_names.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_names.tpl deleted file mode 100644 index 1bdac8b..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_secrets.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_secrets.tpl deleted file mode 100644 index a53fb44..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_storage.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a84..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_tplvalues.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db1668..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_utils.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_utils.tpl deleted file mode 100644 index 8c22b2a..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/_warnings.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa4..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec1..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a0..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_redis.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_validations.tpl b/alfresco-content-services/charts/alfresco-common/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/charts/common/values.yaml b/alfresco-content-services/charts/alfresco-common/charts/common/values.yaml deleted file mode 100644 index f2df68e..0000000 --- a/alfresco-content-services/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-common/templates/_helpers-activemq.tpl b/alfresco-content-services/charts/alfresco-common/templates/_helpers-activemq.tpl deleted file mode 100644 index 3ce7156..0000000 --- a/alfresco-content-services/charts/alfresco-common/templates/_helpers-activemq.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{- define "activemq.env" -}} -- name: ACTIVEMQ_URL - value: $(BROKER_URL) -- name: ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} - -{{- define "spring.activemq.env" -}} -- name: SPRING_ACTIVEMQ_BROKERURL - value: $(BROKER_URL) -- name: SPRING_ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: SPRING_ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl b/alfresco-content-services/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl deleted file mode 100644 index 1260536..0000000 --- a/alfresco-content-services/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{- define "alfresco-content-services.imagePullSecrets" }} -{{- if .Values.global.alfrescoRegistryPullSecrets }} -imagePullSecrets: - - name: {{ .Values.global.alfrescoRegistryPullSecrets }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-common/templates/_helpers-persistence.tpl b/alfresco-content-services/charts/alfresco-common/templates/_helpers-persistence.tpl deleted file mode 100644 index d473d05..0000000 --- a/alfresco-content-services/charts/alfresco-common/templates/_helpers-persistence.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{{- define "data_volume" -}} -- name: data -{{- $svc_name := .service.name }} -{{- with .persistence }} -{{- if .enabled }} -{{- $sc_name := .storageClass | default "default" }} - persistentVolumeClaim: - claimName: >- - {{ .existingClaim | default (printf "%s-%s-pvc" $svc_name $sc_name ) }} -{{- else }} - emptyDir: - sizeLimit: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end }} -{{- end -}} - -{{- define "component_pvc" -}} -{{ $svc_name := .service.name }} -{{- with .persistence }} -{{- $sc_name := .storageClass | default "default" -}} ---- -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ printf "%s-%s-pvc" $svc_name $sc_name }} -spec: - {{- if .storageClass }} - storageClassName: {{ .storageClass | quote }} - {{- end }} - {{- if .accessModes }} - accessModes: - {{- range .accessModes }} - - {{ . }} - {{- end }} - {{- end }} - volumeMode: {{ .volumeMode | default "Filesystem" }} - resources: - requests: - storage: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-common/templates/_helpers-search.tpl b/alfresco-content-services/charts/alfresco-common/templates/_helpers-search.tpl deleted file mode 100644 index 7f24d8b..0000000 --- a/alfresco-content-services/charts/alfresco-common/templates/_helpers-search.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{/* -Get Alfresco Solr context -*/}} -{{- define "alfresco-search.baseurl" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - /solr -{{- else -}} - {{ index $.Values "alfresco-search" "external" "context" | default "/solr" -}} -{{- end -}} -{{- end -}} - -{{/* -Required Solr secret -*/}} -{{- define "tracking-shared-secret" -}} - {{- required "You need to provide a shared secret for Solr/repo authentication , see https://github.com/Alfresco/acs-deployment/tree/master/docs/helm" .Values.global.tracking.sharedsecret -}} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-common/templates/_helpers-security.tpl b/alfresco-content-services/charts/alfresco-common/templates/_helpers-security.tpl deleted file mode 100644 index 8829e4e..0000000 --- a/alfresco-content-services/charts/alfresco-common/templates/_helpers-security.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{- define "default-pod-security-context" }} - runAsNonRoot: true - runAsUser: 33099 - fsGroupChangePolicy: OnRootMismatch -{{- end }} - -{{- define "default-security-context" }} - runAsNonRoot: true - allowPrivilegeEscalation: false - capabilities: - drop: - - NET_RAW - - ALL -{{- end }} - -{{- define "component-pod-security-context" }} - securityContext: -{{- if .podSecurityContext }} - {{- .podSecurityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-pod-security-context" . }} -{{- end }} -{{- end }} - -{{- define "component-security-context" }} - securityContext: -{{- if .securityContext }} - {{- .securityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-security-context" . }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-common/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-common/templates/_helpers.tpl deleted file mode 100644 index 7ae7d58..0000000 --- a/alfresco-content-services/charts/alfresco-common/templates/_helpers.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{- define "content-services.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-cs") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "alfresco.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-common/values.yaml b/alfresco-content-services/charts/alfresco-common/values.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/.helmignore b/alfresco-content-services/charts/alfresco-search-enterprise/.helmignore deleted file mode 100644 index 0392ad3..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/.helmignore +++ /dev/null @@ -1,29 +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 -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ -# Helm unittest -tests -# Chart testing values -ci -# helm-docs template -README.md.gotmpl diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/Chart.lock b/alfresco-content-services/charts/alfresco-search-enterprise/Chart.lock deleted file mode 100644 index a60eeec..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/Chart.lock +++ /dev/null @@ -1,12 +0,0 @@ -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 2.0.0 -- name: activemq - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 3.1.0 -- name: elasticsearch - repository: https://helm.elastic.co - version: 7.17.3 -digest: sha256:151bf89224b053a49e6e5dbe6eb1cb367c45e04ff737d9bfb871c6a9a740f856 -generated: "2023-05-31T14:13:48.309613835Z" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/Chart.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/Chart.yaml deleted file mode 100644 index 0069915..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v2 -appVersion: 3.3.0 -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 2.0.0 -- condition: activemq.enabled - name: activemq - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 3.1.0 -- condition: elasticsearch.enabled - name: elasticsearch - repository: https://helm.elastic.co - version: 7.17.3 -description: A Helm chart for deploying Alfresco Elasticsearch connector -name: alfresco-search-enterprise -type: application -version: 1.2.0 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/README.md deleted file mode 100644 index 573005f..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# alfresco-search-enterprise - -![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.3.0](https://img.shields.io/badge/AppVersion-3.3.0-informational?style=flat-square) - -A Helm chart for deploying Alfresco Elasticsearch connector - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://alfresco.github.io/alfresco-helm-charts/ | activemq | 3.1.0 | -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 2.0.0 | -| https://helm.elastic.co | elasticsearch | 7.17.3 | - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| activemq.enabled | bool | `false` | Enable embedded broker - useful when testing this chart in standalone | -| affinity | object | `{}` | | -| contentMediaTypeCache.enabled | bool | `true` | | -| contentMediaTypeCache.refreshTime | string | `"0 0 * * * *"` | | -| elasticsearch.clusterHealthCheckParams | string | `"wait_for_status=yellow&timeout=1s"` | | -| elasticsearch.enabled | bool | `false` | Enable embedded elasticsearch - useful when using this chart in standalone | -| elasticsearch.replicas | int | `1` | | -| fullnameOverride | string | `""` | | -| global.alfrescoRegistryPullSecrets | string | `"quay-registry-secret"` | | -| global.elasticsearch | object | `{"existingSecretName":null,"host":null,"password":null,"port":null,"protocol":null,"user":null}` | Shared connections details for Elasticsearch/Opensearch cluster | -| global.elasticsearch.existingSecretName | string | `nil` | Alternatively, provide connection details via an existing secret that contains ELASTICSEARCH_USERNAME and ELASTICSEARCH_PASSWORD keys | -| global.elasticsearch.host | string | `nil` | The host where service is available | -| global.elasticsearch.password | string | `nil` | The password required to access the service, if any | -| global.elasticsearch.port | string | `nil` | The port where service is available | -| global.elasticsearch.protocol | string | `nil` | Valid values are http or https | -| global.elasticsearch.user | string | `nil` | The username required to access the service, if any | -| imagePullSecrets | list | `[]` | | -| indexName | string | `"alfresco"` | Name of the existing search index, usually created by repo | -| liveIndexing.content.image.pullPolicy | string | `"IfNotPresent"` | | -| liveIndexing.content.image.repository | string | `"quay.io/alfresco/alfresco-elasticsearch-live-indexing-content"` | | -| liveIndexing.content.image.tag | string | `"3.3.0"` | | -| liveIndexing.content.replicaCount | int | `1` | | -| liveIndexing.mediation.image.pullPolicy | string | `"IfNotPresent"` | | -| liveIndexing.mediation.image.repository | string | `"quay.io/alfresco/alfresco-elasticsearch-live-indexing-mediation"` | | -| liveIndexing.mediation.image.tag | string | `"3.3.0"` | | -| liveIndexing.metadata.image.pullPolicy | string | `"IfNotPresent"` | | -| liveIndexing.metadata.image.repository | string | `"quay.io/alfresco/alfresco-elasticsearch-live-indexing-metadata"` | | -| liveIndexing.metadata.image.tag | string | `"3.3.0"` | | -| liveIndexing.metadata.replicaCount | int | `1` | | -| liveIndexing.path.image.pullPolicy | string | `"IfNotPresent"` | | -| liveIndexing.path.image.repository | string | `"quay.io/alfresco/alfresco-elasticsearch-live-indexing-path"` | | -| liveIndexing.path.image.tag | string | `"3.3.0"` | | -| liveIndexing.path.replicaCount | int | `1` | | -| messageBroker.existingSecretName | string | `nil` | Provide connection details alternatively via an existing secret that contains BROKER_URL, BROKER_USERNAME and BROKER_PASSWORD keys | -| messageBroker.password | string | `nil` | Broker password | -| messageBroker.url | string | `nil` | Broker URL formatted as per: https://activemq.apache.org/failover-transport-reference | -| messageBroker.user | string | `nil` | Broker username | -| nameOverride | string | `""` | | -| nodeSelector | object | `{}` | | -| pathIndexingComponent.enabled | bool | `true` | | -| podAnnotations | object | `{}` | | -| podSecurityContext | object | `{}` | | -| reindexing.enabled | bool | `true` | Create the one-shot job to trigger the reindexing of repo contents | -| reindexing.image.pullPolicy | string | `"IfNotPresent"` | | -| reindexing.image.repository | string | `"quay.io/alfresco/alfresco-elasticsearch-reindexing"` | | -| reindexing.image.tag | string | `"3.3.0"` | | -| reindexing.initcontainers.waitForRepository.resources.limits.cpu | string | `"0.25"` | | -| reindexing.initcontainers.waitForRepository.resources.limits.memory | string | `"10Mi"` | | -| reindexing.pathIndexingEnabled | bool | `true` | | -| reindexing.postgresql.database | string | `"alfresco"` | The database name to use | -| reindexing.postgresql.existingSecretName | string | `nil` | Alternatively, provide connection details via an existing secret that contains DATABASE_USERNAME and DATABASE_PASSWORD keys | -| reindexing.postgresql.hostname | string | `"postgresql-acs"` | The host where database service is available | -| reindexing.postgresql.password | string | `nil` | The password required to access the service | -| reindexing.postgresql.port | int | `5432` | The port where service is available | -| reindexing.postgresql.url | string | `nil` | | -| reindexing.postgresql.user | string | `nil` | The username required to access the service | -| reindexing.resources.limits.cpu | string | `"2"` | | -| reindexing.resources.limits.memory | string | `"512Mi"` | | -| reindexing.resources.requests.cpu | string | `"0.5"` | | -| reindexing.resources.requests.memory | string | `"128Mi"` | | -| resources.limits.cpu | string | `"2"` | | -| resources.limits.memory | string | `"2048Mi"` | | -| resources.requests.cpu | string | `"0.5"` | | -| resources.requests.memory | string | `"256Mi"` | | -| searchIndex | object | `{"existingSecretName":null,"host":null,"password":null,"port":null,"protocol":null,"user":null}` | Overrides .Values.global.elasticsearch | -| searchIndex.existingSecretName | string | `nil` | Alternatively, provide connection details via an an existing secret that contains ELASTICSEARCH_USERNAME and ELASTICSEARCH_PASSWORD keys | -| searchIndex.host | string | `nil` | The host where service is available | -| searchIndex.password | string | `nil` | The password required to access the service, if any | -| searchIndex.port | string | `nil` | The port where service is available | -| searchIndex.protocol | string | `nil` | Valid values are http or https | -| searchIndex.user | string | `nil` | The username required to access the service, if any | -| securityContext | object | `{}` | | -| tolerations | list | `[]` | | diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/.helmignore b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/.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 -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/Chart.lock b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/Chart.lock deleted file mode 100644 index 9e001a0..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 1.0.0 -digest: sha256:094ae734b29e6e4735e4b6c3ad786305217cb375570a6a8518395c92f61c23bf -generated: "2023-02-14T14:53:39.031589+01:00" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/Chart.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/Chart.yaml deleted file mode 100644 index dc267f8..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/Chart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v2 -appVersion: 5.17.4 -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 1.0.0 -description: A Helm chart providing a basic Apache ActiveMQ deployment required to - evaluate ACS (not meant to be used in production). -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -keywords: -- activemq -- message broker -name: activemq -sources: -- https://github.com/Alfresco/alfresco-helm-charts -version: 3.1.0 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/README.md deleted file mode 100644 index df28d15..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# activemq - -![Version: 3.1.0](https://img.shields.io/badge/Version-3.1.0-informational?style=flat-square) ![AppVersion: 5.17.4](https://img.shields.io/badge/AppVersion-5.17.4-informational?style=flat-square) - -A Helm chart providing a basic Apache ActiveMQ deployment required to evaluate ACS (not meant to be used in production). - -## Source Code - -* - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 1.0.0 | - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| adminUser.existingSecretName | string | `nil` | An existing kubernetes secret that contains BROKER_USERNAME and BROKER_PASSWORD keys to override the default user credentials | -| adminUser.password | string | `"admin"` | Password for the default user with administrative privileges | -| adminUser.user | string | `"admin"` | Username for the default user with administrative privileges | -| enabled | bool | `true` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"alfresco/alfresco-activemq"` | | -| image.tag | string | `"5.17.4-jre17-rockylinux8"` | | -| livenessProbe.failureThreshold | int | `6` | | -| livenessProbe.initialDelaySeconds | int | `60` | | -| livenessProbe.periodSeconds | int | `10` | | -| livenessProbe.timeoutSeconds | int | `1` | | -| nodeSelector | object | `{}` | | -| persistence.accessModes | list | `["ReadWriteOnce"]` | defines type of access required by the persistent volume [Access_Modes] (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) | -| persistence.baseSize | string | `"20Gi"` | | -| persistence.data.mountPath | string | `"/opt/activemq/data"` | | -| persistence.data.subPath | string | `"alfresco-infrastructure/activemq-data"` | | -| persistence.enabled | bool | `true` | | -| persistence.existingClaim | string | `nil` | | -| persistence.storageClass | string | `nil` | | -| podSecurityContext.fsGroup | int | `1000` | | -| podSecurityContext.runAsGroup | int | `1000` | | -| podSecurityContext.runAsUser | int | `33031` | | -| readinessProbe.failureThreshold | int | `6` | | -| readinessProbe.initialDelaySeconds | int | `5` | | -| readinessProbe.periodSeconds | int | `10` | | -| readinessProbe.timeoutSeconds | int | `1` | | -| replicaCount | int | `1` | | -| resources.limits.cpu | string | `"2"` | | -| resources.limits.memory | string | `"2048Mi"` | | -| resources.requests.cpu | string | `"0.25"` | | -| resources.requests.memory | string | `"512Mi"` | | -| service.name | string | `"activemq"` | | -| services.broker.ports.external.amqp | int | `5672` | | -| services.broker.ports.external.openwire | int | `61616` | | -| services.broker.ports.external.stomp | int | `61613` | | -| services.broker.ports.internal.amqp | int | `5672` | | -| services.broker.ports.internal.openwire | int | `61616` | | -| services.broker.ports.internal.stomp | int | `61613` | | -| services.broker.type | string | `"ClusterIP"` | | -| services.webConsole.ports.external.webConsole | int | `8161` | | -| services.webConsole.ports.internal.webConsole | int | `8161` | | -| services.webConsole.type | string | `"NodePort"` | | diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/README.md.gotmpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/README.md.gotmpl deleted file mode 100644 index 9174c35..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/README.md.gotmpl +++ /dev/null @@ -1,16 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/.helmignore b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/.helmignore deleted file mode 100644 index 721fe6a..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/.helmignore +++ /dev/null @@ -1,25 +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 -# Helm unit tests -tests -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/Chart.lock b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/Chart.lock deleted file mode 100644 index cb293e5..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.17.1 -digest: sha256:f5dd11ccf8726befd217545b84a48b02c49d68f03a75e4e102b971ad2e4f0fec -generated: "2022-10-05T16:55:42.662007+02:00" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/Chart.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/Chart.yaml deleted file mode 100644 index d6ec576..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v2 -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.x.x -description: 'A helper subchart to avoid duplication in alfresco charts and set common - external dependencies ' -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -name: alfresco-common -type: library -version: 1.0.0 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/README.md deleted file mode 100644 index 2da4e8f..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# alfresco-common - -![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) - -A helper subchart to avoid duplication in alfresco charts and set common -external dependencies - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ | common | 1.x.x | - diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/README.md.gotmpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/README.md.gotmpl deleted file mode 100644 index b301f39..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/README.md.gotmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/.helmignore b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml deleted file mode 100644 index 39edbb3..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -annotations: - category: Infrastructure -apiVersion: v2 -appVersion: 1.17.1 -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.17.1 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/README.md deleted file mode 100644 index a2ecd60..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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.dev/) for deployment and management of Helm Charts in clusters. - -## 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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_affinities.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_affinities.tpl deleted file mode 100644 index 2387be2..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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: - - {{ include "common.names.namespace" .context | 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: - - {{ include "common.names.namespace" .context | 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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_capabilities.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 9d9b760..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_errors.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_images.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_images.tpl deleted file mode 100644 index 42ffbc7..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_ingress.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_ingress.tpl deleted file mode 100644 index 8caf73a..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_labels.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_names.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_names.tpl deleted file mode 100644 index 1bdac8b..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_secrets.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_secrets.tpl deleted file mode 100644 index a53fb44..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_storage.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a84..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_tplvalues.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db1668..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_utils.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_utils.tpl deleted file mode 100644 index 8c22b2a..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_warnings.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa4..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec1..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a0..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_redis.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_validations.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/charts/common/values.yaml deleted file mode 100644 index f2df68e..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl deleted file mode 100644 index 518e8cd..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{{/* -Create a default fully qualified name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "activemq.fullname" -}} -{{- printf "%s-activemq" .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "activemq.env" -}} -- name: ACTIVEMQ_URL - value: $(BROKER_URL) -- name: ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} - -{{- define "spring.activemq.env" -}} -- name: SPRING_ACTIVEMQ_BROKERURL - value: $(BROKER_URL) -- name: SPRING_ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: SPRING_ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl deleted file mode 100644 index 1260536..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{- define "alfresco-content-services.imagePullSecrets" }} -{{- if .Values.global.alfrescoRegistryPullSecrets }} -imagePullSecrets: - - name: {{ .Values.global.alfrescoRegistryPullSecrets }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl deleted file mode 100644 index d473d05..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{{- define "data_volume" -}} -- name: data -{{- $svc_name := .service.name }} -{{- with .persistence }} -{{- if .enabled }} -{{- $sc_name := .storageClass | default "default" }} - persistentVolumeClaim: - claimName: >- - {{ .existingClaim | default (printf "%s-%s-pvc" $svc_name $sc_name ) }} -{{- else }} - emptyDir: - sizeLimit: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end }} -{{- end -}} - -{{- define "component_pvc" -}} -{{ $svc_name := .service.name }} -{{- with .persistence }} -{{- $sc_name := .storageClass | default "default" -}} ---- -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ printf "%s-%s-pvc" $svc_name $sc_name }} -spec: - {{- if .storageClass }} - storageClassName: {{ .storageClass | quote }} - {{- end }} - {{- if .accessModes }} - accessModes: - {{- range .accessModes }} - - {{ . }} - {{- end }} - {{- end }} - volumeMode: {{ .volumeMode | default "Filesystem" }} - resources: - requests: - storage: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl deleted file mode 100644 index 8736769..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{{/* -Create a default fully qualified name. -*/}} -{{- define "alfresco-search.fullName" -}} -{{- printf "%s-alfresco-search" .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Alfresco Search2 Host -*/}} -{{- define "alfresco-search.host" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - {{ printf "%s-solr" (include "alfresco-search.fullName" .) -}} -{{- else -}} - {{ index $.Values "alfresco-search" "external" "host" | default "localhost" -}} -{{- end -}} -{{- end -}} - -{{/* -Get Alfresco Search Port -*/}} -{{- define "alfresco-search.port" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - {{ print (index .Values "alfresco-search" "service" "externalPort") -}} -{{- else -}} - {{ index $.Values "alfresco-search" "external" "port" | default "8983" -}} -{{- end -}} -{{- end -}} - -{{/* -Get Alfresco Solr context -*/}} -{{- define "alfresco-search.baseurl" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - /solr -{{- else -}} - {{ index $.Values "alfresco-search" "external" "context" | default "/solr" -}} -{{- end -}} -{{- end -}} - -{{/* -Required Solr secret -*/}} -{{- define "tracking-shared-secret" -}} - {{- required "You need to provide a shared secret for Solr/repo authentication , see https://github.com/Alfresco/acs-deployment/tree/master/docs/helm" .Values.global.tracking.sharedsecret -}} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl deleted file mode 100644 index 8829e4e..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{- define "default-pod-security-context" }} - runAsNonRoot: true - runAsUser: 33099 - fsGroupChangePolicy: OnRootMismatch -{{- end }} - -{{- define "default-security-context" }} - runAsNonRoot: true - allowPrivilegeEscalation: false - capabilities: - drop: - - NET_RAW - - ALL -{{- end }} - -{{- define "component-pod-security-context" }} - securityContext: -{{- if .podSecurityContext }} - {{- .podSecurityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-pod-security-context" . }} -{{- end }} -{{- end }} - -{{- define "component-security-context" }} - securityContext: -{{- if .securityContext }} - {{- .securityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-security-context" . }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers.tpl deleted file mode 100644 index 7ae7d58..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/templates/_helpers.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{- define "content-services.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-cs") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "alfresco.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/charts/alfresco-common/values.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/_helpers.tpl deleted file mode 100644 index 7afc06e..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "activemq.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 "activemq.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 chart name and version as used by the chart label. -*/}} -{{- define "activemq.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "activemq.labels" -}} -helm.sh/chart: {{ include "activemq.chart" . }} -{{ include "activemq.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "activemq.selectorLabels" -}} -app.kubernetes.io/name: {{ include "activemq.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "activemq.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "activemq.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/deployment-activemq.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/deployment-activemq.yaml deleted file mode 100644 index e93f309..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/deployment-activemq.yaml +++ /dev/null @@ -1,89 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "activemq.fullname" . }} - labels: - {{- include "activemq.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: Recreate - selector: - matchLabels: - {{- include "activemq.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "activemq.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values | indent 4 }} - containers: - - name: {{ .Values.service.name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- include "component-security-context" .Values | indent 6 }} - env: - - name: ACTIVEMQ_CONFIG_MINMEMORY - value: "{{ .Values.resources.requests.memory | replace "Mi" "" }}" - - name: ACTIVEMQ_CONFIG_MAXMEMORY - value: "{{ .Values.resources.limits.memory | replace "Mi" "" }}" - - name: ACTIVEMQ_BROKER_NAME - value: "{{ template "activemq.fullname" . }}" - {{- $credentialsSecretName := default (printf "%s-brokersecret" (include "activemq.fullname" .)) $.Values.adminUser.existingSecretName }} - - name: ACTIVEMQ_ADMIN_LOGIN - valueFrom: - secretKeyRef: - name: {{ $credentialsSecretName }} - key: BROKER_USERNAME - - name: ACTIVEMQ_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ $credentialsSecretName }} - key: BROKER_PASSWORD - ports: - - name: stomp - containerPort: {{ .Values.services.broker.ports.internal.stomp | default 61613 }} - - name: openwire - containerPort: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - - name: amqp - containerPort: {{ .Values.services.broker.ports.internal.amqp | default 5672 }} - - name: web-console - containerPort: {{ .Values.services.webConsole.ports.internal.webConsole | default 8161 }} - readinessProbe: - tcpSocket: - port: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - livenessProbe: - tcpSocket: - port: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - failureThreshold: {{ .Values.livenessProbe.failureThreshold }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - resources: {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.persistence.data.mountPath }} - subPath: {{ .Values.persistence.data.subPath }} - volumes: - {{- include "data_volume" .Values | nindent 8 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 1 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/pvc-activemq.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/pvc-activemq.yaml deleted file mode 100644 index 6183cd0..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/pvc-activemq.yaml +++ /dev/null @@ -1,3 +0,0 @@ -{{- if and (not .Values.persistence.existingClaim) .Values.persistence.enabled }} -{{ include "component_pvc" .Values }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/secret-activemq.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/secret-activemq.yaml deleted file mode 100644 index 8787d80..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/secret-activemq.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if not .Values.adminUser.existingSecretName }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "activemq.fullname" . }}-brokersecret - labels: - {{- include "activemq.labels" . | nindent 4 }} -type: Opaque -data: - BROKER_USERNAME: {{ .Values.adminUser.user | b64enc | quote }} - BROKER_PASSWORD: {{ .Values.adminUser.password | b64enc | quote }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/svc-activemq-broker.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/svc-activemq-broker.yaml deleted file mode 100644 index a990428..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/svc-activemq-broker.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "activemq.fullname" . }}-broker - labels: - {{- include "activemq.labels" . | nindent 4 }} -spec: - type: {{ .Values.services.broker.type }} - ports: - - port: {{ .Values.services.broker.ports.external.stomp | default 61613 }} - targetPort: {{ .Values.services.broker.ports.internal.stomp | default 61613 }} - name: stomp - protocol: TCP - - port: {{ .Values.services.broker.ports.external.openwire | default 61616 }} - targetPort: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - name: openwire - protocol: TCP - - port: {{ .Values.services.broker.ports.external.amqp | default 5672 }} - targetPort: {{ .Values.services.broker.ports.internal.amqp | default 5672 }} - name: amqp - protocol: TCP - selector: - {{- include "activemq.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/svc-activemq-web-console.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/svc-activemq-web-console.yaml deleted file mode 100644 index 1b38195..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/templates/svc-activemq-web-console.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "activemq.fullname" . }}-web-console - labels: - {{- include "activemq.labels" . | nindent 4 }} -spec: - type: {{ .Values.services.webConsole.type }} - ports: - - port: {{ .Values.services.webConsole.ports.external.webConsole | default 8161 }} - targetPort: {{ .Values.services.webConsole.ports.internal.webConsole | default 8161 }} - name: web-console - protocol: TCP - selector: - {{- include "activemq.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/deployment-activemq_test.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/deployment-activemq_test.yaml deleted file mode 100644 index 440ed69..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/deployment-activemq_test.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -suite: test activemq deployment -templates: - - deployment-activemq.yaml -tests: - - it: should reference default secret containing broker default credentials - asserts: - - equal: - path: spec.template.spec.containers[0].env[3].name - value: ACTIVEMQ_ADMIN_LOGIN - template: deployment-activemq.yaml - - equal: - path: spec.template.spec.containers[0].env[3].valueFrom.secretKeyRef.name - value: RELEASE-NAME-activemq-brokersecret - template: deployment-activemq.yaml - - - it: should reference overridden secret when setting existingSecretName - set: - adminUser.existingSecretName: existing-secret - asserts: - - equal: - path: spec.template.spec.containers[0].env[3].valueFrom.secretKeyRef.name - value: existing-secret - template: deployment-activemq.yaml - - - it: should render cpu and memory limits - asserts: - - equal: - path: spec.template.spec.containers[0].resources - value: - requests: - cpu: "0.25" - memory: "512Mi" - limits: - cpu: "2" - memory: "2048Mi" - template: deployment-activemq.yaml diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/pvc-activemq_test.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/pvc-activemq_test.yaml deleted file mode 100644 index 9bed2b1..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/pvc-activemq_test.yaml +++ /dev/null @@ -1,64 +0,0 @@ ---- -suite: test activemq persistence -templates: - - deployment-activemq.yaml - - pvc-activemq.yaml -tests: - - it: should render an ephemeral volume - set: - persistence: - enabled: false - asserts: - - contains: - path: spec.template.spec.volumes - content: - emptyDir: - sizeLimit: 20Gi - name: data - template: deployment-activemq.yaml - - - it: should render a deployment with set claim - set: - persistence: - enabled: true - existingClaim: mysfsvolume - asserts: - - equal: - path: >- - spec.template.spec.volumes[0].persistentVolumeClaim.claimName - value: mysfsvolume - template: deployment-activemq.yaml - - - it: should render a deployment with dynamic claim name - set: - persistence: - enabled: true - volumeMode: Block - accessModes: - - ReadWriteMany - - ReadOnlyMany - asserts: - - equal: - path: >- - spec.template.spec.volumes[0].persistentVolumeClaim.claimName - value: activemq-default-pvc - template: deployment-activemq.yaml - - isNull: - path: spec.storageClassName - template: pvc-activemq.yaml - - - it: should render a deployment with provided storage class - set: - persistence: - enabled: true - storageClass: cheap - asserts: - - equal: - path: >- - spec.template.spec.volumes[0].persistentVolumeClaim.claimName - value: activemq-cheap-pvc - template: deployment-activemq.yaml - - equal: - path: spec.storageClassName - value: cheap - template: pvc-activemq.yaml diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/svc-activemq_test.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/svc-activemq_test.yaml deleted file mode 100644 index 206d017..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/tests/svc-activemq_test.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -suite: test activemq services -templates: - - svc-activemq-broker.yaml - - svc-activemq-web-console.yaml -tests: - - it: should use the default service name - asserts: - - equal: - path: spec.selector - value: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/name: activemq - template: svc-activemq-broker.yaml - - equal: - path: spec.selector - value: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/name: activemq - template: svc-activemq-web-console.yaml diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/values.yaml deleted file mode 100644 index eb928ce..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/activemq/values.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Leave this to true to deploy the chart -enabled: true -replicaCount: 1 -nodeSelector: {} -image: - repository: alfresco/alfresco-activemq - tag: 5.17.4-jre17-rockylinux8 - pullPolicy: IfNotPresent -adminUser: - # -- An existing kubernetes secret that contains BROKER_USERNAME and BROKER_PASSWORD keys to override the default user credentials - existingSecretName: - # -- Username for the default user with administrative privileges - user: admin - # -- Password for the default user with administrative privileges - password: admin -podSecurityContext: - runAsUser: 33031 - runAsGroup: 1000 - fsGroup: 1000 -resources: - requests: - cpu: "0.25" - memory: "512Mi" - limits: - cpu: "2" - memory: "2048Mi" -service: - name: activemq -services: - broker: - ports: - internal: - stomp: 61613 - amqp: 5672 - openwire: 61616 - external: - stomp: 61613 - amqp: 5672 - openwire: 61616 - type: ClusterIP - webConsole: - ports: - internal: - webConsole: 8161 - external: - webConsole: 8161 - type: NodePort -readinessProbe: - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 6 -livenessProbe: - initialDelaySeconds: 60 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 6 -persistence: - enabled: true - baseSize: 20Gi - storageClass: - # -- defines type of access required by the persistent volume - # [Access_Modes] (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) - accessModes: - - ReadWriteOnce - existingClaim: - data: - mountPath: "/opt/activemq/data" - subPath: "alfresco-infrastructure/activemq-data" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/.helmignore b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/.helmignore deleted file mode 100644 index 721fe6a..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/.helmignore +++ /dev/null @@ -1,25 +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 -# Helm unit tests -tests -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/Chart.lock b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/Chart.lock deleted file mode 100644 index cb293e5..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.17.1 -digest: sha256:f5dd11ccf8726befd217545b84a48b02c49d68f03a75e4e102b971ad2e4f0fec -generated: "2022-10-05T16:55:42.662007+02:00" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/Chart.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/Chart.yaml deleted file mode 100644 index 5662b18..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v2 -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.x.x -description: 'A helper subchart to avoid duplication in alfresco charts and set common - external dependencies ' -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -name: alfresco-common -type: library -version: 2.0.0 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/README.md deleted file mode 100644 index 1df5281..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# alfresco-common - -![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) - -A helper subchart to avoid duplication in alfresco charts and set common -external dependencies - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ | common | 1.x.x | - diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/README.md.gotmpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/README.md.gotmpl deleted file mode 100644 index b301f39..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/README.md.gotmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/.helmignore b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/Chart.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/Chart.yaml deleted file mode 100644 index 39edbb3..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -annotations: - category: Infrastructure -apiVersion: v2 -appVersion: 1.17.1 -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.17.1 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/README.md deleted file mode 100644 index a2ecd60..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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.dev/) for deployment and management of Helm Charts in clusters. - -## 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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_affinities.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_affinities.tpl deleted file mode 100644 index 2387be2..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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: - - {{ include "common.names.namespace" .context | 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: - - {{ include "common.names.namespace" .context | 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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_capabilities.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 9d9b760..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_errors.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_images.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_images.tpl deleted file mode 100644 index 42ffbc7..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_ingress.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_ingress.tpl deleted file mode 100644 index 8caf73a..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_labels.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_names.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_names.tpl deleted file mode 100644 index 1bdac8b..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_secrets.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_secrets.tpl deleted file mode 100644 index a53fb44..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_storage.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a84..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_tplvalues.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db1668..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_utils.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_utils.tpl deleted file mode 100644 index 8c22b2a..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_warnings.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa4..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec1..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a0..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_redis.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_validations.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/charts/common/values.yaml deleted file mode 100644 index f2df68e..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-activemq.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-activemq.tpl deleted file mode 100644 index 3ce7156..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-activemq.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{- define "activemq.env" -}} -- name: ACTIVEMQ_URL - value: $(BROKER_URL) -- name: ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} - -{{- define "spring.activemq.env" -}} -- name: SPRING_ACTIVEMQ_BROKERURL - value: $(BROKER_URL) -- name: SPRING_ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: SPRING_ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl deleted file mode 100644 index 1260536..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{- define "alfresco-content-services.imagePullSecrets" }} -{{- if .Values.global.alfrescoRegistryPullSecrets }} -imagePullSecrets: - - name: {{ .Values.global.alfrescoRegistryPullSecrets }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-persistence.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-persistence.tpl deleted file mode 100644 index d473d05..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-persistence.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{{- define "data_volume" -}} -- name: data -{{- $svc_name := .service.name }} -{{- with .persistence }} -{{- if .enabled }} -{{- $sc_name := .storageClass | default "default" }} - persistentVolumeClaim: - claimName: >- - {{ .existingClaim | default (printf "%s-%s-pvc" $svc_name $sc_name ) }} -{{- else }} - emptyDir: - sizeLimit: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end }} -{{- end -}} - -{{- define "component_pvc" -}} -{{ $svc_name := .service.name }} -{{- with .persistence }} -{{- $sc_name := .storageClass | default "default" -}} ---- -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ printf "%s-%s-pvc" $svc_name $sc_name }} -spec: - {{- if .storageClass }} - storageClassName: {{ .storageClass | quote }} - {{- end }} - {{- if .accessModes }} - accessModes: - {{- range .accessModes }} - - {{ . }} - {{- end }} - {{- end }} - volumeMode: {{ .volumeMode | default "Filesystem" }} - resources: - requests: - storage: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-search.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-search.tpl deleted file mode 100644 index 7f24d8b..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-search.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{/* -Get Alfresco Solr context -*/}} -{{- define "alfresco-search.baseurl" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - /solr -{{- else -}} - {{ index $.Values "alfresco-search" "external" "context" | default "/solr" -}} -{{- end -}} -{{- end -}} - -{{/* -Required Solr secret -*/}} -{{- define "tracking-shared-secret" -}} - {{- required "You need to provide a shared secret for Solr/repo authentication , see https://github.com/Alfresco/acs-deployment/tree/master/docs/helm" .Values.global.tracking.sharedsecret -}} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-security.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-security.tpl deleted file mode 100644 index 8829e4e..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers-security.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{- define "default-pod-security-context" }} - runAsNonRoot: true - runAsUser: 33099 - fsGroupChangePolicy: OnRootMismatch -{{- end }} - -{{- define "default-security-context" }} - runAsNonRoot: true - allowPrivilegeEscalation: false - capabilities: - drop: - - NET_RAW - - ALL -{{- end }} - -{{- define "component-pod-security-context" }} - securityContext: -{{- if .podSecurityContext }} - {{- .podSecurityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-pod-security-context" . }} -{{- end }} -{{- end }} - -{{- define "component-security-context" }} - securityContext: -{{- if .securityContext }} - {{- .securityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-security-context" . }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers.tpl deleted file mode 100644 index 7ae7d58..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/templates/_helpers.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{- define "content-services.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-cs") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "alfresco.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/alfresco-common/values.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/.helmignore b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/.helmignore deleted file mode 100644 index e12c0b4..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/.helmignore +++ /dev/null @@ -1,2 +0,0 @@ -tests/ -.pytest_cache/ diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/Chart.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/Chart.yaml deleted file mode 100644 index 0b417cb..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/Chart.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -appVersion: 7.17.3 -description: Official Elastic helm chart for Elasticsearch -home: https://github.com/elastic/helm-charts -icon: https://helm.elastic.co/icons/elasticsearch.png -maintainers: -- email: helm-charts@elastic.co - name: Elastic -name: elasticsearch -sources: -- https://github.com/elastic/elasticsearch -version: 7.17.3 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/Makefile deleted file mode 100644 index 22218a1..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../helpers/common.mk diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/README.md deleted file mode 100644 index 6e4fd02..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/README.md +++ /dev/null @@ -1,459 +0,0 @@ -# Elasticsearch Helm Chart - -[![Build Status](https://img.shields.io/jenkins/s/https/devops-ci.elastic.co/job/elastic+helm-charts+master.svg)](https://devops-ci.elastic.co/job/elastic+helm-charts+master/) [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/elastic)](https://artifacthub.io/packages/search?repo=elastic) - -This Helm chart is a lightweight way to configure and run our official -[Elasticsearch Docker image][]. - - - - - - - -- [Requirements](#requirements) -- [Installing](#installing) - - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version from a branch](#install-development-version-from-a-branch) -- [Upgrading](#upgrading) -- [Usage notes](#usage-notes) -- [Configuration](#configuration) - - [Deprecated](#deprecated) -- [FAQ](#faq) - - [How to deploy this chart on a specific K8S distribution?](#how-to-deploy-this-chart-on-a-specific-k8s-distribution) - - [How to deploy dedicated nodes types?](#how-to-deploy-dedicated-nodes-types) - - [Clustering and Node Discovery](#clustering-and-node-discovery) - - [How to deploy clusters with security (authentication and TLS) enabled?](#how-to-deploy-clusters-with-security-authentication-and-tls-enabled) - - [How to migrate from helm/charts stable chart?](#how-to-migrate-from-helmcharts-stable-chart) - - [How to install plugins?](#how-to-install-plugins) - - [How to use the keystore?](#how-to-use-the-keystore) - - [Basic example](#basic-example) - - [Multiple keys](#multiple-keys) - - [Custom paths and keys](#custom-paths-and-keys) - - [How to enable snapshotting?](#how-to-enable-snapshotting) - - [How to configure templates post-deployment?](#how-to-configure-templates-post-deployment) -- [Contributing](#contributing) - - - - - - -## Requirements - -* Kubernetes >= 1.14 -* [Helm][] >= 2.17.0 -* Minimum cluster requirements include the following to run this chart with -default settings. All of these settings are configurable. - * Three Kubernetes nodes to respect the default "hard" affinity settings - * 1GB of RAM for the JVM heap - -See [supported configurations][] for more details. - -## Installing - -This chart is tested with the latest 7.17.3 version. - -### Install released version using Helm repository - -* Add the Elastic Helm charts repo: -`helm repo add elastic https://helm.elastic.co` - -* Install it: - - with Helm 3: `helm install elasticsearch --version elastic/elasticsearch` - - with Helm 2 (deprecated): `helm install --name elasticsearch --version elastic/elasticsearch` - -### Install development version from a branch - -* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` - -* Checkout the branch : `git checkout 7.17` - -* Install it: - - with Helm 3: `helm install elasticsearch ./helm-charts/elasticsearch --set imageTag=7.17.3` - - with Helm 2 (deprecated): `helm install --name elasticsearch ./helm-charts/elasticsearch --set imageTag=7.17.3` - - -## Upgrading - -Please always check [CHANGELOG.md][] and [BREAKING_CHANGES.md][] before -upgrading to a new chart version. - - -## Usage notes - -* This repo includes a number of [examples][] configurations which can be used -as a reference. They are also used in the automated testing of this chart. -* Automated testing of this chart is currently only run against GKE (Google -Kubernetes Engine). -* The chart deploys a StatefulSet and by default will do an automated rolling -update of your cluster. It does this by waiting for the cluster health to become -green after each instance is updated. If you prefer to update manually you can -set `OnDelete` [updateStrategy][]. -* It is important to verify that the JVM heap size in `esJavaOpts` and to set -the CPU/Memory `resources` to something suitable for your cluster. -* To simplify chart and maintenance each set of node groups is deployed as a -separate Helm release. Take a look at the [multi][] example to get an idea for -how this works. Without doing this it isn't possible to resize persistent -volumes in a StatefulSet. By setting it up this way it makes it possible to add -more nodes with a new storage size then drain the old ones. It also solves the -problem of allowing the user to determine which node groups to update first when -doing upgrades or changes. -* We have designed this chart to be very un-opinionated about how to configure -Elasticsearch. It exposes ways to set environment variables and mount secrets -inside of the container. Doing this makes it much easier for this chart to -support multiple versions with minimal changes. - - -## Configuration - -| Parameter | Description | Default | -|------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------| -| `antiAffinityTopologyKey` | The [anti-affinity][] topology key. By default this will prevent multiple Elasticsearch nodes from running on the same Kubernetes node | `kubernetes.io/hostname` | -| `antiAffinity` | Setting this to hard enforces the [anti-affinity][] rules. If it is set to soft it will be done "best effort". Other values will be ignored | `hard` | -| `clusterHealthCheckParams` | The [Elasticsearch cluster health status params][] that will be used by readiness [probe][] command | `wait_for_status=green&timeout=1s` | -| `clusterName` | This will be used as the Elasticsearch [cluster.name][] and should be unique per cluster in the namespace | `elasticsearch` | -| `clusterDeprecationIndexing` | Enable or disable deprecation logs to be indexed (should be disabled when deploying master only node groups) | `false` | -| `enableServiceLinks` | Set to false to disabling service links, which can cause slow pod startup times when there are many services in the current namespace. | `true` | -| `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` | -| `esConfig` | Allows you to add any config files in `/usr/share/elasticsearch/config/` such as `elasticsearch.yml` and `log4j2.properties`. See [values.yaml][] for an example of the formatting | `{}` | -| `esJavaOpts` | [Java options][] for Elasticsearch. This is where you could configure the [jvm heap size][] | `""` | -| `esJvmOptions` | [Java options][] for Elasticsearch. Override the default JVM options by adding custom options files . See [values.yaml][] for an example of the formatting | `{}` | -| `esMajorVersion` | Deprecated. Instead, use the version of the chart corresponding to your ES minor version. Used to set major version specific configuration. If you are using a custom image and not running the default Elasticsearch version you will need to set this to the version you are running (e.g. `esMajorVersion: 6`) | `""` | -| `extraContainers` | Templatable string of additional `containers` to be passed to the `tpl` function | `""` | -| `extraEnvs` | Extra [environment variables][] which will be appended to the `env:` definition for the container | `[]` | -| `extraInitContainers` | Templatable string of additional `initContainers` to be passed to the `tpl` function | `""` | -| `extraVolumeMounts` | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | `""` | -| `extraVolumes` | Templatable string of additional `volumes` to be passed to the `tpl` function | `""` | -| `fullnameOverride` | Overrides the `clusterName` and `nodeGroup` when used in the naming of resources. This should only be used when using a single `nodeGroup`, otherwise you will have name conflicts | `""` | -| `healthNameOverride` | Overrides `test-elasticsearch-health` pod name | `""` | -| `hostAliases` | Configurable [hostAliases][] | `[]` | -| `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. If you change this you will also need to set [http.port][] in `extraEnvs` | `9200` | -| `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | -| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The Elasticsearch Docker image tag | `7.17.3` | -| `image` | The Elasticsearch Docker image | `docker.elastic.co/elasticsearch/elasticsearch` | -| `ingress` | Configurable [ingress][] to expose the Elasticsearch service. See [values.yaml][] for an example | see [values.yaml][] | -| `initResources` | Allows you to set the [resources][] for the `initContainer` in the StatefulSet | `{}` | -| `keystore` | Allows you map Kubernetes secrets into the keystore. See the [config example][] and [how to use the keystore][] | `[]` | -| `labels` | Configurable [labels][] applied to all Elasticsearch pods | `{}` | -| `lifecycle` | Allows you to add [lifecycle hooks][]. See [values.yaml][] for an example of the formatting | `{}` | -| `masterService` | The service name used to connect to the masters. You only need to set this if your master `nodeGroup` is set to something other than `master`. See [Clustering and Node Discovery][] for more information | `""` | -| `maxUnavailable` | The [maxUnavailable][] value for the pod disruption budget. By default this will prevent Kubernetes from having more than 1 unhealthy pod in the node group | `1` | -| `minimumMasterNodes` | The value for [discovery.zen.minimum_master_nodes][]. Should be set to `(master_eligible_nodes / 2) + 1`. Ignored in Elasticsearch versions >= 7 | `2` | -| `nameOverride` | Overrides the `clusterName` when used in the naming of resources | `""` | -| `networkHost` | Value for the [network.host Elasticsearch setting][] | `0.0.0.0` | -| `networkPolicy` | The [NetworkPolicy](https://kubernetes.io/docs/concepts/services-networking/network-policies/) to set. See [`values.yaml`](./values.yaml) for an example | `{http.enabled: false,transport.enabled: false}` | -| `nodeAffinity` | Value for the [node affinity settings][] | `{}` | -| `nodeGroup` | This is the name that will be used for each group of nodes in the cluster. The name will be `clusterName-nodeGroup-X` , `nameOverride-nodeGroup-X` if a `nameOverride` is specified, and `fullnameOverride-X` if a `fullnameOverride` is specified | `master` | -| `nodeSelector` | Configurable [nodeSelector][] so that you can target specific nodes for your Elasticsearch cluster | `{}` | -| `persistence` | Enables a persistent volume for Elasticsearch data. Can be disabled for nodes that only have [roles][] which don't require persistent data | see [values.yaml][] | -| `podAnnotations` | Configurable [annotations][] applied to all Elasticsearch pods | `{}` | -| `podManagementPolicy` | By default Kubernetes [deploys StatefulSets serially][]. This deploys them in parallel so that they can discover each other | `Parallel` | -| `podSecurityContext` | Allows you to set the [securityContext][] for the pod | see [values.yaml][] | -| `podSecurityPolicy` | Configuration for create a pod security policy with minimal permissions to run this Helm chart with `create: true`. Also can be used to reference an external pod security policy with `name: "externalPodSecurityPolicy"` | see [values.yaml][] | -| `priorityClassName` | The name of the [PriorityClass][]. No default is supplied as the PriorityClass must be created first | `""` | -| `protocol` | The protocol that will be used for the readiness [probe][]. Change this to `https` if you have `xpack.security.http.ssl.enabled` set | `http` | -| `rbac` | Configuration for creating a role, role binding and ServiceAccount as part of this Helm chart with `create: true`. Also can be used to reference an external ServiceAccount with `serviceAccountName: "externalServiceAccountName"`, or automount the service account token | see [values.yaml][] | -| `readinessProbe` | Configuration fields for the readiness [probe][] | see [values.yaml][] | -| `replicas` | Kubernetes replica count for the StatefulSet (i.e. how many pods) | `3` | -| `resources` | Allows you to set the [resources][] for the StatefulSet | see [values.yaml][] | -| `roles` | A hash map with the specific [roles][] for the `nodeGroup` | see [values.yaml][] | -| `schedulerName` | Name of the [alternate scheduler][] | `""` | -| `secretMounts` | Allows you easily mount a secret as a file inside the StatefulSet. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | -| `securityContext` | Allows you to set the [securityContext][] for the container | see [values.yaml][] | -| `service.annotations` | [LoadBalancer annotations][] that Kubernetes will use for the service. This will configure load balancer if `service.type` is `LoadBalancer` | `{}` | -| `service.enabled` | Enable non-headless service | `true` | -| `service.externalTrafficPolicy` | Some cloud providers allow you to specify the [LoadBalancer externalTrafficPolicy][]. Kubernetes will use this to preserve the client source IP. This will configure load balancer if `service.type` is `LoadBalancer` | `""` | -| `service.httpPortName` | The name of the http port within the service | `http` | -| `service.labelsHeadless` | Labels to be added to headless service | `{}` | -| `service.labels` | Labels to be added to non-headless service | `{}` | -| `service.loadBalancerIP` | Some cloud providers allow you to specify the [loadBalancer][] IP. If the `loadBalancerIP` field is not specified, the IP is dynamically assigned. If you specify a `loadBalancerIP` but your cloud provider does not support the feature, it is ignored. | `""` | -| `service.loadBalancerSourceRanges` | The IP ranges that are allowed to access | `[]` | -| `service.nodePort` | Custom [nodePort][] port that can be set if you are using `service.type: nodePort` | `""` | -| `service.transportPortName` | The name of the transport port within the service | `transport` | -| `service.publishNotReadyAddresses` | Consider that all endpoints are considered "ready" even if the Pods themselves are not | `false` | -| `service.type` | Elasticsearch [Service Types][] | `ClusterIP` | -| `sysctlInitContainer` | Allows you to disable the `sysctlInitContainer` if you are setting [sysctl vm.max_map_count][] with another method | `enabled: true` | -| `sysctlVmMaxMapCount` | Sets the [sysctl vm.max_map_count][] needed for Elasticsearch | `262144` | -| `terminationGracePeriod` | The [terminationGracePeriod][] in seconds used when trying to stop the pod | `120` | -| `tests.enabled` | Enable creating test related resources when running `helm template` or `helm test` | `true` | -| `tolerations` | Configurable [tolerations][] | `[]` | -| `transportPort` | The transport port that Kubernetes will use for the service. If you change this you will also need to set [transport port configuration][] in `extraEnvs` | `9300` | -| `updateStrategy` | The [updateStrategy][] for the StatefulSet. By default Kubernetes will wait for the cluster to be green after upgrading each pod. Setting this to `OnDelete` will allow you to manually delete each pod during upgrades | `RollingUpdate` | -| `volumeClaimTemplate` | Configuration for the [volumeClaimTemplate for StatefulSets][]. You will want to adjust the storage (default `30Gi` ) and the `storageClassName` if you are using a different storage class | see [values.yaml][] | - -### Deprecated - -| Parameter | Description | Default | -|-----------|---------------------------------------------------------------------------------------------------------------|---------| -| `fsGroup` | The Group ID (GID) for [securityContext][] so that the Elasticsearch user can read from the persistent volume | `""` | - - -## FAQ - -### How to deploy this chart on a specific K8S distribution? - -This chart is designed to run on production scale Kubernetes clusters with -multiple nodes, lots of memory and persistent storage. For that reason it can be -a bit tricky to run them against local Kubernetes environments such as -[Minikube][]. - -This chart is highly tested with [GKE][], but some K8S distribution also -requires specific configurations. - -We provide examples of configuration for the following K8S providers: - -- [Docker for Mac][] -- [KIND][] -- [Minikube][] -- [MicroK8S][] -- [OpenShift][] - -### How to deploy dedicated nodes types? - -All the Elasticsearch pods deployed share the same configuration. If you need to -deploy dedicated [nodes types][] (for example dedicated master and data nodes), -you can deploy multiple releases of this chart with different configurations -while they share the same `clusterName` value. - -For each Helm release, the nodes types can then be defined using `roles` value. - -An example of Elasticsearch cluster using 2 different Helm releases for master -and data nodes can be found in [examples/multi][]. - -#### Clustering and Node Discovery - -This chart facilitates Elasticsearch node discovery and services by creating two -`Service` definitions in Kubernetes, one with the name `$clusterName-$nodeGroup` -and another named `$clusterName-$nodeGroup-headless`. -Only `Ready` pods are a part of the `$clusterName-$nodeGroup` service, while all -pods ( `Ready` or not) are a part of `$clusterName-$nodeGroup-headless`. - -If your group of master nodes has the default `nodeGroup: master` then you can -just add new groups of nodes with a different `nodeGroup` and they will -automatically discover the correct master. If your master nodes have a different -`nodeGroup` name then you will need to set `masterService` to -`$clusterName-$masterNodeGroup`. - -The chart value for `masterService` is used to populate -`discovery.zen.ping.unicast.hosts` , which Elasticsearch nodes will use to -contact master nodes and form a cluster. -Therefore, to add a group of nodes to an existing cluster, setting -`masterService` to the desired `Service` name of the related cluster is -sufficient. - -### How to deploy clusters with security (authentication and TLS) enabled? - -This Helm chart can use existing [Kubernetes secrets][] to setup -credentials or certificates for examples. These secrets should be created -outside of this chart and accessed using [environment variables][] and volumes. - -An example of Elasticsearch cluster using security can be found in -[examples/security][]. - -### How to migrate from helm/charts stable chart? - -If you currently have a cluster deployed with the [helm/charts stable][] chart -you can follow the [migration guide][]. - -### How to install plugins? - -The recommended way to install plugins into our Docker images is to create a -[custom Docker image][]. - -The Dockerfile would look something like: - -``` -ARG elasticsearch_version -FROM docker.elastic.co/elasticsearch/elasticsearch:${elasticsearch_version} - -RUN bin/elasticsearch-plugin install --batch repository-gcs -``` - -And then updating the `image` in values to point to your custom image. - -There are a couple reasons we recommend this. - -1. Tying the availability of Elasticsearch to the download service to install -plugins is not a great idea or something that we recommend. Especially in -Kubernetes where it is normal and expected for a container to be moved to -another host at random times. -2. Mutating the state of a running Docker image (by installing plugins) goes -against best practices of containers and immutable infrastructure. - -### How to use the keystore? - -#### Basic example - -Create the secret, the key name needs to be the keystore key path. In this -example we will create a secret from a file and from a literal string. - -``` -kubectl create secret generic encryption-key --from-file=xpack.watcher.encryption_key=./watcher_encryption_key -kubectl create secret generic slack-hook --from-literal=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' -``` - -To add these secrets to the keystore: - -``` -keystore: - - secretName: encryption-key - - secretName: slack-hook -``` - -#### Multiple keys - -All keys in the secret will be added to the keystore. To create the previous -example in one secret you could also do: - -``` -kubectl create secret generic keystore-secrets --from-file=xpack.watcher.encryption_key=./watcher_encryption_key --from-literal=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' -``` - -``` -keystore: - - secretName: keystore-secrets -``` - -#### Custom paths and keys - -If you are using these secrets for other applications (besides the Elasticsearch -keystore) then it is also possible to specify the keystore path and which keys -you want to add. Everything specified under each `keystore` item will be passed -through to the `volumeMounts` section for mounting the [secret][]. In this -example we will only add the `slack_hook` key from a secret that also has other -keys. Our secret looks like this: - -``` -kubectl create secret generic slack-secrets --from-literal=slack_channel='#general' --from-literal=slack_hook='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' -``` - -We only want to add the `slack_hook` key to the keystore at path -`xpack.notification.slack.account.monitoring.secure_url`: - -``` -keystore: - - secretName: slack-secrets - items: - - key: slack_hook - path: xpack.notification.slack.account.monitoring.secure_url -``` - -You can also take a look at the [config example][] which is used as part of the -automated testing pipeline. - -### How to enable snapshotting? - -1. Install your [snapshot plugin][] into a custom Docker image following the -[how to install plugins guide][]. -2. Add any required secrets or credentials into an Elasticsearch keystore -following the [how to use the keystore][] guide. -3. Configure the [snapshot repository][] as you normally would. -4. To automate snapshots you can use [Snapshot Lifecycle Management][] or a tool -like [curator][]. - -### How to configure templates post-deployment? - -You can use `postStart` [lifecycle hooks][] to run code triggered after a -container is created. - -Here is an example of `postStart` hook to configure templates: - -```yaml -lifecycle: - postStart: - exec: - command: - - bash - - -c - - | - #!/bin/bash - # Add a template to adjust number of shards/replicas - TEMPLATE_NAME=my_template - INDEX_PATTERN="logstash-*" - SHARD_COUNT=8 - REPLICA_COUNT=1 - ES_URL=http://localhost:9200 - while [[ "$(curl -s -o /dev/null -w '%{http_code}\n' $ES_URL)" != "200" ]]; do sleep 1; done - curl -XPUT "$ES_URL/_template/$TEMPLATE_NAME" -H 'Content-Type: application/json' -d'{"index_patterns":['\""$INDEX_PATTERN"\"'],"settings":{"number_of_shards":'$SHARD_COUNT',"number_of_replicas":'$REPLICA_COUNT'}}' -``` - - -## Contributing - -Please check [CONTRIBUTING.md][] before any contribution or for any questions -about our development and testing process. - -[7.17]: https://github.com/elastic/helm-charts/releases -[#63]: https://github.com/elastic/helm-charts/issues/63 -[BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md -[CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md -[CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md -[alternate scheduler]: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/#specify-schedulers-for-pods -[annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -[anti-affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -[cluster.name]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/important-settings.html#cluster-name -[clustering and node discovery]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/README.md#clustering-and-node-discovery -[config example]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/config/values.yaml -[curator]: https://www.elastic.co/guide/en/elasticsearch/client/curator/7.9/snapshot.html -[custom docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docker.html#_c_customized_image -[deploys statefulsets serially]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies -[discovery.zen.minimum_master_nodes]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/discovery-settings.html#minimum_master_nodes -[docker for mac]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/docker-for-mac -[elasticsearch cluster health status params]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/cluster-health.html#request-params -[elasticsearch docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docker.html -[environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config -[environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/ -[examples/multi]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/multi -[examples/security]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/security -[gke]: https://cloud.google.com/kubernetes-engine -[helm]: https://helm.sh -[helm/charts stable]: https://github.com/helm/charts/tree/master/stable/elasticsearch/ -[how to install plugins guide]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/README.md#how-to-install-plugins -[how to use the keystore]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/README.md#how-to-use-the-keystore -[http.port]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/modules-http.html#_settings -[imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images -[imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret -[ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ -[java options]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/jvm-options.html -[jvm heap size]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/heap-size.html -[hostAliases]: https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ -[kind]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/kubernetes-kind -[kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ -[labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -[lifecycle hooks]: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ -[loadBalancer annotations]: https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws -[loadBalancer externalTrafficPolicy]: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip -[loadBalancer]: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer -[maxUnavailable]: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget -[migration guide]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/migration/README.md -[minikube]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/minikube -[microk8s]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/microk8s -[multi]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/multi/ -[network.host elasticsearch setting]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/network.host.html -[node affinity settings]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature -[node-certificates]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/configuring-tls.html#node-certificates -[nodePort]: https://kubernetes.io/docs/concepts/services-networking/service/#nodeport -[nodes types]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/modules-node.html -[nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -[openshift]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/openshift -[priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass -[probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ -[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[roles]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/modules-node.html -[secret]: https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets -[securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -[service types]: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types -[snapshot lifecycle management]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/snapshot-lifecycle-management.html -[snapshot plugin]: https://www.elastic.co/guide/en/elasticsearch/plugins/7.17/repository.html -[snapshot repository]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/modules-snapshots.html -[supported configurations]: https://github.com/elastic/helm-charts/tree/7.17/README.md#supported-configurations -[sysctl vm.max_map_count]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/vm-max-map-count.html#vm-max-map-count -[terminationGracePeriod]: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods -[tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -[transport port configuration]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/modules-transport.html#_transport_settings -[updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/values.yaml -[volumeClaimTemplate for statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/Makefile deleted file mode 100644 index 9ae9c37..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-es-config -TIMEOUT := 1200s - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../ - -secrets: - kubectl delete secret elastic-config-credentials elastic-config-secret elastic-config-slack elastic-config-custom-path || true - kubectl create secret generic elastic-config-credentials --from-literal=password=changeme --from-literal=username=elastic - kubectl create secret generic elastic-config-slack --from-literal=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' - kubectl create secret generic elastic-config-secret --from-file=xpack.watcher.encryption_key=./watcher_encryption_key - kubectl create secret generic elastic-config-custom-path --from-literal=slack_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' --from-literal=thing_i_don_tcare_about=test - -test: secrets install goss - -purge: - helm del $(RELEASE) diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/README.md deleted file mode 100644 index 410d754..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Config - -This example deploy a single node Elasticsearch 7.17.3 with authentication and -custom [values][]. - - -## Usage - -* Create the required secrets: `make secrets` - -* Deploy Elasticsearch chart with the default values: `make install` - -* You can now setup a port forward to query Elasticsearch API: - - ``` - kubectl port-forward svc/config-master 9200 - curl -u elastic:changeme http://localhost:9200/_cat/indices - ``` - - -## Testing - -You can also run [goss integration tests][] using `make test` - - -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/config/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/config/values.yaml diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/test/goss.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/test/goss.yaml deleted file mode 100644 index 752db8d..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/test/goss.yaml +++ /dev/null @@ -1,29 +0,0 @@ -http: - http://localhost:9200/_cluster/health: - status: 200 - timeout: 2000 - username: elastic - password: "{{ .Env.ELASTIC_PASSWORD }}" - body: - - "green" - - '"number_of_nodes":1' - - '"number_of_data_nodes":1' - - http://localhost:9200: - status: 200 - timeout: 2000 - username: elastic - password: "{{ .Env.ELASTIC_PASSWORD }}" - body: - - '"cluster_name" : "config"' - - "You Know, for Search" - -command: - "elasticsearch-keystore list": - exit-status: 0 - stdout: - - keystore.seed - - bootstrap.password - - xpack.notification.slack.account.monitoring.secure_url - - xpack.notification.slack.account.otheraccount.secure_url - - xpack.watcher.encryption_key diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/values.yaml deleted file mode 100644 index 13cff2c..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- - -clusterName: "config" -replicas: 1 - -extraEnvs: - - name: ELASTIC_PASSWORD - valueFrom: - secretKeyRef: - name: elastic-config-credentials - key: password - -# This is just a dummy file to make sure that -# the keystore can be mounted at the same time -# as a custom elasticsearch.yml -esConfig: - elasticsearch.yml: | - xpack.security.enabled: true - path.data: /usr/share/elasticsearch/data - -keystore: - - secretName: elastic-config-secret - - secretName: elastic-config-slack - - secretName: elastic-config-custom-path - items: - - key: slack_url - path: xpack.notification.slack.account.otheraccount.secure_url diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/watcher_encryption_key b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/watcher_encryption_key deleted file mode 100644 index b5f9078..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/config/watcher_encryption_key +++ /dev/null @@ -1 +0,0 @@ -supersecret diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/Makefile deleted file mode 100644 index 389bf99..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-es-default -TIMEOUT := 1200s - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install $(RELEASE) ../../ - -test: install goss - -purge: - helm del $(RELEASE) diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/README.md deleted file mode 100644 index c50ea2a..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Default - -This example deploy a 3 nodes Elasticsearch 7.17.3 cluster using -[default values][]. - - -## Usage - -* Deploy Elasticsearch chart with the default values: `make install` - -* You can now setup a port forward to query Elasticsearch API: - - ``` - kubectl port-forward svc/elasticsearch-master 9200 - curl localhost:9200/_cat/indices - ``` - - -## Testing - -You can also run [goss integration tests][] using `make test` - - -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/values.yaml diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/rolling_upgrade.sh b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/rolling_upgrade.sh deleted file mode 100644 index c5a2a88..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/rolling_upgrade.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -x - -kubectl proxy || true & - -make & -PROC_ID=$! - -while kill -0 "$PROC_ID" >/dev/null 2>&1; do - echo "PROCESS IS RUNNING" - if curl --fail 'http://localhost:8001/api/v1/proxy/namespaces/default/services/elasticsearch-master:9200/_search' ; then - echo "cluster is healthy" - else - echo "cluster not healthy!" - exit 1 - fi - sleep 1 -done -echo "PROCESS TERMINATED" -exit 0 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/test/goss.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/test/goss.yaml deleted file mode 100644 index db9b68b..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/default/test/goss.yaml +++ /dev/null @@ -1,38 +0,0 @@ -kernel-param: - vm.max_map_count: - value: "262144" - -http: - http://elasticsearch-master:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - "green" - - '"number_of_nodes":3' - - '"number_of_data_nodes":3' - - http://localhost:9200: - status: 200 - timeout: 2000 - body: - - '"number" : "7.17.3"' - - '"cluster_name" : "elasticsearch"' - - "You Know, for Search" - -file: - /usr/share/elasticsearch/data: - exists: true - mode: "2775" - owner: root - group: elasticsearch - filetype: directory - -mount: - /usr/share/elasticsearch/data: - exists: true - -user: - elasticsearch: - exists: true - uid: 1000 - gid: 1000 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/Makefile deleted file mode 100644 index 18fd053..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -default: test - -RELEASE := helm-es-docker-for-mac -TIMEOUT := 1200s - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../ - -test: install - helm test $(RELEASE) - -purge: - helm del $(RELEASE) diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/README.md deleted file mode 100644 index 1b5f306..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Docker for Mac - -This example deploy a 3 nodes Elasticsearch 7.17.3 cluster on [Docker for Mac][] -using [custom values][]. - -Note that this configuration should be used for test only and isn't recommended -for production. - - -## Usage - -* Deploy Elasticsearch chart with the default values: `make install` - -* You can now setup a port forward to query Elasticsearch API: - - ``` - kubectl port-forward svc/elasticsearch-master 9200 - curl localhost:9200/_cat/indices - ``` - - -[custom values]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/docker-for-mac/values.yaml -[docker for mac]: https://docs.docker.com/docker-for-mac/kubernetes/ diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/values.yaml deleted file mode 100644 index f7deba6..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/docker-for-mac/values.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Permit co-located instances for solitary minikube virtual machines. -antiAffinity: "soft" - -# Shrink default JVM heap. -esJavaOpts: "-Xmx128m -Xms128m" - -# Allocate smaller chunks of memory per pod. -resources: - requests: - cpu: "100m" - memory: "512M" - limits: - cpu: "1000m" - memory: "512M" - -# Request smaller persistent volumes. -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "hostpath" - resources: - requests: - storage: 100M diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/Makefile deleted file mode 100644 index 9e5602d..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -default: test - -RELEASE := helm-es-kind -TIMEOUT := 1200s - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../ - -install-local-path: - kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml - helm upgrade --wait --timeout=$(TIMEOUT) --install --values values-local-path.yaml $(RELEASE) ../../ - -test: install - helm test $(RELEASE) - -purge: - helm del $(RELEASE) diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/README.md deleted file mode 100644 index a026c6f..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# KIND - -This example deploy a 3 nodes Elasticsearch 7.17.3 cluster on [Kind][] -using [custom values][]. - -Note that this configuration should be used for test only and isn't recommended -for production. - -Note that Kind < 0.7.0 are affected by a [kind issue][] with mount points -created from PVCs not writable by non-root users. [kubernetes-sigs/kind#1157][] -fix it in Kind 0.7.0. - -The workaround for Kind < 0.7.0 is to install manually -[Rancher Local Path Provisioner][] and use `local-path` storage class for -Elasticsearch volumes (see [Makefile][] instructions). - - -## Usage - -* For Kind >= 0.7.0: Deploy Elasticsearch chart with the default values: `make install` -* For Kind < 0.7.0: Deploy Elasticsearch chart with `local-path` storage class: `make install-local-path` - -* You can now setup a port forward to query Elasticsearch API: - - ``` - kubectl port-forward svc/elasticsearch-master 9200 - curl localhost:9200/_cat/indices - ``` - - -[custom values]: https://github.com/elastic/helm-charts/blob/7.17/elasticsearch/examples/kubernetes-kind/values.yaml -[kind]: https://kind.sigs.k8s.io/ -[kind issue]: https://github.com/kubernetes-sigs/kind/issues/830 -[kubernetes-sigs/kind#1157]: https://github.com/kubernetes-sigs/kind/pull/1157 -[rancher local path provisioner]: https://github.com/rancher/local-path-provisioner -[Makefile]: https://github.com/elastic/helm-charts/blob/7.17/elasticsearch/examples/kubernetes-kind/Makefile#L5 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/values-local-path.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/values-local-path.yaml deleted file mode 100644 index 500ad4b..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/values-local-path.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Permit co-located instances for solitary minikube virtual machines. -antiAffinity: "soft" - -# Shrink default JVM heap. -esJavaOpts: "-Xmx128m -Xms128m" - -# Allocate smaller chunks of memory per pod. -resources: - requests: - cpu: "100m" - memory: "512M" - limits: - cpu: "1000m" - memory: "512M" - -# Request smaller persistent volumes. -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "local-path" - resources: - requests: - storage: 100M diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/values.yaml deleted file mode 100644 index 500ad4b..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/kubernetes-kind/values.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Permit co-located instances for solitary minikube virtual machines. -antiAffinity: "soft" - -# Shrink default JVM heap. -esJavaOpts: "-Xmx128m -Xms128m" - -# Allocate smaller chunks of memory per pod. -resources: - requests: - cpu: "100m" - memory: "512M" - limits: - cpu: "1000m" - memory: "512M" - -# Request smaller persistent volumes. -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "local-path" - resources: - requests: - storage: 100M diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/Makefile deleted file mode 100644 index 2d0012d..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -default: test - -RELEASE := helm-es-microk8s -TIMEOUT := 1200s - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../ - -test: install - helm test $(RELEASE) - -purge: - helm del $(RELEASE) diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/README.md deleted file mode 100644 index bd611bd..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# MicroK8S - -This example deploy a 3 nodes Elasticsearch 7.17.3 cluster on [MicroK8S][] -using [custom values][]. - -Note that this configuration should be used for test only and isn't recommended -for production. - - -## Requirements - -The following MicroK8S [addons][] need to be enabled: -- `dns` -- `helm` -- `storage` - - -## Usage - -* Deploy Elasticsearch chart with the default values: `make install` - -* You can now setup a port forward to query Elasticsearch API: - - ``` - kubectl port-forward svc/elasticsearch-master 9200 - curl localhost:9200/_cat/indices - ``` - - -[addons]: https://microk8s.io/docs/addons -[custom values]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/microk8s/values.yaml -[MicroK8S]: https://microk8s.io diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/values.yaml deleted file mode 100644 index 2627ecb..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/microk8s/values.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -# Disable privileged init Container creation. -sysctlInitContainer: - enabled: false - -# Restrict the use of the memory-mapping when sysctlInitContainer is disabled. -esConfig: - elasticsearch.yml: | - node.store.allow_mmap: false - -# Permit co-located instances for solitary minikube virtual machines. -antiAffinity: "soft" - -# Shrink default JVM heap. -esJavaOpts: "-Xmx128m -Xms128m" - -# Allocate smaller chunks of memory per pod. -resources: - requests: - cpu: "100m" - memory: "512M" - limits: - cpu: "1000m" - memory: "512M" - -# Request smaller persistent volumes. -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "microk8s-hostpath" - resources: - requests: - storage: 100M diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/Makefile deleted file mode 100644 index 020906f..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX := helm-es-migration - -data: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values data.yaml $(PREFIX)-data ../../ - -master: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values master.yaml $(PREFIX)-master ../../ - -client: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values client.yaml $(PREFIX)-client ../../ diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/README.md deleted file mode 100644 index fe6333d..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/README.md +++ /dev/null @@ -1,167 +0,0 @@ -# Migration Guide from helm/charts - -There are two viable options for migrating from the community Elasticsearch Helm -chart from the [helm/charts][] repo. - -1. Restoring from Snapshot to a fresh cluster -2. Live migration by joining a new cluster to the existing cluster. - -## Restoring from Snapshot - -This is the recommended and preferred option. The downside is that it will -involve a period of write downtime during the migration. If you have a way to -temporarily stop writes to your cluster then this is the way to go. This is also -a lot simpler as it just involves launching a fresh cluster and restoring a -snapshot following the [restoring to a different cluster guide][]. - -## Live migration - -If restoring from a snapshot is not possible due to the write downtime then a -live migration is also possible. It is very important to first test this in a -testing environment to make sure you are comfortable with the process and fully -understand what is happening. - -This process will involve joining a new set of master, data and client nodes to -an existing cluster that has been deployed using the [helm/charts][] community -chart. Nodes will then be replaced one by one in a controlled fashion to -decommission the old cluster. - -This example will be using the default values for the existing helm/charts -release and for the Elastic helm-charts release. If you have changed any of the -default values then you will need to first make sure that your values are -configured in a compatible way before starting the migration. - -The process will involve a re-sync and a rolling restart of all of your data -nodes. Therefore it is important to disable shard allocation and perform a synced -flush like you normally would during any other rolling upgrade. See the -[rolling upgrades guide][] for more information. - -* The default image for this chart is -`docker.elastic.co/elasticsearch/elasticsearch` which contains the default -distribution of Elasticsearch with a [basic license][]. Make sure to update the -`image` and `imageTag` values to the correct Docker image and Elasticsearch -version that you currently have deployed. - -* Convert your current helm/charts configuration into something that is -compatible with this chart. - -* Take a fresh snapshot of your cluster. If something goes wrong you want to be -able to restore your data no matter what. - -* Check that your clusters health is green. If not abort and make sure your -cluster is healthy before continuing: - - ``` - curl localhost:9200/_cluster/health - ``` - -* Deploy new data nodes which will join the existing cluster. Take a look at the -configuration in [data.yaml][]: - - ``` - make data - ``` - -* Check that the new nodes have joined the cluster (run this and any other curl -commands from within one of your pods): - - ``` - curl localhost:9200/_cat/nodes - ``` - -* Check that your cluster is still green. If so we can now start to scale down -the existing data nodes. Assuming you have the default amount of data nodes (2) -we now want to scale it down to 1: - - ``` - kubectl scale statefulsets my-release-elasticsearch-data --replicas=1 - ``` - -* Wait for your cluster to become green again: - - ``` - watch 'curl -s localhost:9200/_cluster/health' - ``` - -* Once the cluster is green we can scale down again: - - ``` - kubectl scale statefulsets my-release-elasticsearch-data --replicas=0 - ``` - -* Wait for the cluster to be green again. -* OK. We now have all data nodes running in the new cluster. Time to replace the -masters by firstly scaling down the masters from 3 to 2. Between each step make -sure to wait for the cluster to become green again, and check with -`curl localhost:9200/_cat/nodes` that you see the correct amount of master -nodes. During this process we will always make sure to keep at least 2 master -nodes as to not lose quorum: - - ``` - kubectl scale statefulsets my-release-elasticsearch-master --replicas=2 - ``` - -* Now deploy a single new master so that we have 3 masters again. See -[master.yaml][] for the configuration: - - ``` - make master - ``` - -* Scale down old masters to 1: - - ``` - kubectl scale statefulsets my-release-elasticsearch-master --replicas=1 - ``` - -* Edit the masters in [masters.yaml][] to 2 and redeploy: - - ``` - make master - ``` - -* Scale down the old masters to 0: - - ``` - kubectl scale statefulsets my-release-elasticsearch-master --replicas=0 - ``` - -* Edit the [masters.yaml][] to have 3 replicas and remove the -`discovery.zen.ping.unicast.hosts` entry from `extraEnvs` then redeploy the -masters. This will make sure all 3 masters are running in the new cluster and -are pointing at each other for discovery: - - ``` - make master - ``` - -* Remove the `discovery.zen.ping.unicast.hosts` entry from `extraEnvs` then -redeploy the data nodes to make sure they are pointing at the new masters: - - ``` - make data - ``` - -* Deploy the client nodes: - - ``` - make client - ``` - -* Update any processes that are talking to the existing client nodes and point -them to the new client nodes. Once this is done you can scale down the old -client nodes: - - ``` - kubectl scale deployment my-release-elasticsearch-client --replicas=0 - ``` - -* The migration should now be complete. After verifying that everything is -working correctly you can cleanup leftover resources from your old cluster. - -[basic license]: https://www.elastic.co/subscriptions -[data.yaml]: https://github.com/elastic/helm-charts/blob/7.17/elasticsearch/examples/migration/data.yaml -[helm/charts]: https://github.com/helm/charts/tree/7.17/stable/elasticsearch -[master.yaml]: https://github.com/elastic/helm-charts/blob/7.17/elasticsearch/examples/migration/master.yaml -[restoring to a different cluster guide]: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-snapshots.html#_restoring_to_a_different_cluster -[rolling upgrades guide]: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/rolling-upgrades.html diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/client.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/client.yaml deleted file mode 100644 index 30ee700..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/client.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- - -replicas: 2 - -clusterName: "elasticsearch" -nodeGroup: "client" - -esMajorVersion: 6 - -roles: - master: "false" - ingest: "false" - data: "false" - -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "standard" - resources: - requests: - storage: 1Gi # Currently needed till pvcs are made optional - -persistence: - enabled: false diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/data.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/data.yaml deleted file mode 100644 index eedcbb0..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/data.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- - -replicas: 2 - -esMajorVersion: 6 - -extraEnvs: - - name: discovery.zen.ping.unicast.hosts - value: "my-release-elasticsearch-discovery" - -clusterName: "elasticsearch" -nodeGroup: "data" - -roles: - master: "false" - ingest: "false" - data: "true" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/master.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/master.yaml deleted file mode 100644 index 3e3a2f1..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/migration/master.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- - -# Temporarily set to 3 so we can scale up/down the old a new cluster -# one at a time whilst always keeping 3 masters running -replicas: 1 - -esMajorVersion: 6 - -extraEnvs: - - name: discovery.zen.ping.unicast.hosts - value: "my-release-elasticsearch-discovery" - -clusterName: "elasticsearch" -nodeGroup: "master" - -roles: - master: "true" - ingest: "false" - data: "false" - -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "standard" - resources: - requests: - storage: 4Gi diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/Makefile deleted file mode 100644 index 1021d98..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -default: test - -RELEASE := helm-es-minikube -TIMEOUT := 1200s - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../ - -test: install - helm test $(RELEASE) - -purge: - helm del $(RELEASE) diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/README.md deleted file mode 100644 index c13052a..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Minikube - -This example deploy a 3 nodes Elasticsearch 7.17.3 cluster on [Minikube][] -using [custom values][]. - -If helm or kubectl timeouts occur, you may consider creating a minikube VM with -more CPU cores or memory allocated. - -Note that this configuration should be used for test only and isn't recommended -for production. - - -## Requirements - -In order to properly support the required persistent volume claims for the -Elasticsearch StatefulSet, the `default-storageclass` and `storage-provisioner` -minikube addons must be enabled. - -``` -minikube addons enable default-storageclass -minikube addons enable storage-provisioner -``` - - -## Usage - -* Deploy Elasticsearch chart with the default values: `make install` - -* You can now setup a port forward to query Elasticsearch API: - - ``` - kubectl port-forward svc/elasticsearch-master 9200 - curl localhost:9200/_cat/indices - ``` - - -[custom values]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/minikube/values.yaml -[minikube]: https://minikube.sigs.k8s.io/docs/ diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/values.yaml deleted file mode 100644 index ccceb3a..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/minikube/values.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Permit co-located instances for solitary minikube virtual machines. -antiAffinity: "soft" - -# Shrink default JVM heap. -esJavaOpts: "-Xmx128m -Xms128m" - -# Allocate smaller chunks of memory per pod. -resources: - requests: - cpu: "100m" - memory: "512M" - limits: - cpu: "1000m" - memory: "512M" - -# Request smaller persistent volumes. -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "standard" - resources: - requests: - storage: 100M diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/Makefile deleted file mode 100644 index 243e504..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -PREFIX := helm-es-multi -RELEASE := helm-es-multi-master -TIMEOUT := 1200s - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values master.yaml $(PREFIX)-master ../../ - helm upgrade --wait --timeout=$(TIMEOUT) --install --values data.yaml $(PREFIX)-data ../../ - helm upgrade --wait --timeout=$(TIMEOUT) --install --values client.yaml $(PREFIX)-client ../../ - -test: install goss - -purge: - helm del $(PREFIX)-master - helm del $(PREFIX)-data - helm del $(PREFIX)-client diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/README.md deleted file mode 100644 index db3380a..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Multi - -This example deploy an Elasticsearch 7.17.3 cluster composed of 3 different Helm -releases: - -- `helm-es-multi-master` for the 3 master nodes using [master values][] -- `helm-es-multi-data` for the 3 data nodes using [data values][] -- `helm-es-multi-client` for the 3 client nodes using [client values][] - -## Usage - -* Deploy the 3 Elasticsearch releases: `make install` - -* You can now setup a port forward to query Elasticsearch API: - - ``` - kubectl port-forward svc/multi-master 9200 - curl -u elastic:changeme http://localhost:9200/_cat/indices - ``` - -## Testing - -You can also run [goss integration tests][] using `make test` - - -[client values]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/multi/client.yaml -[data values]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/multi/data.yaml -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/multi/test/goss.yaml -[master values]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/multi/master.yaml diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/client.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/client.yaml deleted file mode 100644 index dbe5b05..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/client.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- - -clusterName: "multi" -nodeGroup: "client" - -roles: - master: "false" - ingest: "false" - data: "false" - ml: "false" - remote_cluster_client: "false" - -persistence: - enabled: false diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/data.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/data.yaml deleted file mode 100644 index 2e3a909..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/data.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- - -clusterName: "multi" -nodeGroup: "data" - -roles: - master: "false" - ingest: "true" - data: "true" - ml: "false" - remote_cluster_client: "false" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/master.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/master.yaml deleted file mode 100644 index 6b8c082..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/master.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- - -clusterName: "multi" -nodeGroup: "master" - -roles: - master: "true" - ingest: "false" - data: "false" - ml: "false" - remote_cluster_client: "false" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/test/goss.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/test/goss.yaml deleted file mode 100644 index 794416b..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/multi/test/goss.yaml +++ /dev/null @@ -1,9 +0,0 @@ -http: - http://localhost:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - 'green' - - '"cluster_name":"multi"' - - '"number_of_nodes":9' - - '"number_of_data_nodes":3' diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/networkpolicy/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/networkpolicy/Makefile deleted file mode 100644 index e7b20c5..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/networkpolicy/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-es-networkpolicy -TIMEOUT := 1200s - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../ - -test: install goss - -purge: - helm del $(RELEASE) diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/networkpolicy/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/networkpolicy/values.yaml deleted file mode 100644 index 1963d20..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/networkpolicy/values.yaml +++ /dev/null @@ -1,37 +0,0 @@ -networkPolicy: - http: - enabled: true - explicitNamespacesSelector: - # Accept from namespaces with all those different rules (from whitelisted Pods) - matchLabels: - role: frontend-http - matchExpressions: - - {key: role, operator: In, values: [frontend-http]} - additionalRules: - - podSelector: - matchLabels: - role: frontend-http - - podSelector: - matchExpressions: - - key: role - operator: In - values: - - frontend-http - transport: - enabled: true - allowExternal: true - explicitNamespacesSelector: - matchLabels: - role: frontend-transport - matchExpressions: - - {key: role, operator: In, values: [frontend-transport]} - additionalRules: - - podSelector: - matchLabels: - role: frontend-transport - - podSelector: - matchExpressions: - - key: role - operator: In - values: - - frontend-transport diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/Makefile deleted file mode 100644 index 078c33c..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := elasticsearch - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../ - -test: install goss - -purge: - helm del $(RELEASE) diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/README.md deleted file mode 100644 index f410ef9..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# OpenShift - -This example deploy a 3 nodes Elasticsearch 7.17.3 cluster on [OpenShift][] -using [custom values][]. - -## Usage - -* Deploy Elasticsearch chart with the default values: `make install` - -* You can now setup a port forward to query Elasticsearch API: - - ``` - kubectl port-forward svc/elasticsearch-master 9200 - curl localhost:9200/_cat/indices - ``` - -## Testing - -You can also run [goss integration tests][] using `make test` - - -[custom values]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/openshift/values.yaml -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/openshift/test/goss.yaml -[openshift]: https://www.openshift.com/ diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/test/goss.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/test/goss.yaml deleted file mode 100644 index f897164..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/test/goss.yaml +++ /dev/null @@ -1,16 +0,0 @@ -http: - http://localhost:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - "green" - - '"number_of_nodes":3' - - '"number_of_data_nodes":3' - - http://localhost:9200: - status: 200 - timeout: 2000 - body: - - '"number" : "7.17.3"' - - '"cluster_name" : "elasticsearch"' - - "You Know, for Search" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/values.yaml deleted file mode 100644 index 8a21126..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/openshift/values.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- - -securityContext: - runAsUser: null - -podSecurityContext: - fsGroup: null - runAsUser: null - -sysctlInitContainer: - enabled: false diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/Makefile deleted file mode 100644 index beddbef..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-es-security -ELASTICSEARCH_IMAGE := docker.elastic.co/elasticsearch/elasticsearch:$(STACK_VERSION) -TIMEOUT := 1200s - -install: - helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../ - -test: secrets install goss - -purge: - kubectl delete secrets elastic-credentials elastic-certificates elastic-certificate-pem elastic-certificate-crt|| true - helm del $(RELEASE) - -pull-elasticsearch-image: - docker pull $(ELASTICSEARCH_IMAGE) - -secrets: - docker rm -f elastic-helm-charts-certs || true - rm -f elastic-certificates.p12 elastic-certificate.pem elastic-certificate.crt elastic-stack-ca.p12 || true - password=$$([ ! -z "$$ELASTIC_PASSWORD" ] && echo $$ELASTIC_PASSWORD || echo $$(docker run --rm busybox:1.31.1 /bin/sh -c "< /dev/urandom tr -cd '[:alnum:]' | head -c20")) && \ - docker run --name elastic-helm-charts-certs -i -w /app \ - $(ELASTICSEARCH_IMAGE) \ - /bin/sh -c " \ - elasticsearch-certutil ca --out /app/elastic-stack-ca.p12 --pass '' && \ - elasticsearch-certutil cert --name security-master --dns security-master --ca /app/elastic-stack-ca.p12 --pass '' --ca-pass '' --out /app/elastic-certificates.p12" && \ - docker cp elastic-helm-charts-certs:/app/elastic-certificates.p12 ./ && \ - docker rm -f elastic-helm-charts-certs && \ - openssl pkcs12 -nodes -passin pass:'' -in elastic-certificates.p12 -out elastic-certificate.pem && \ - openssl x509 -outform der -in elastic-certificate.pem -out elastic-certificate.crt && \ - kubectl create secret generic elastic-certificates --from-file=elastic-certificates.p12 && \ - kubectl create secret generic elastic-certificate-pem --from-file=elastic-certificate.pem && \ - kubectl create secret generic elastic-certificate-crt --from-file=elastic-certificate.crt && \ - kubectl create secret generic elastic-credentials --from-literal=password=$$password --from-literal=username=elastic && \ - rm -f elastic-certificates.p12 elastic-certificate.pem elastic-certificate.crt elastic-stack-ca.p12 diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/README.md deleted file mode 100644 index e0b5eff..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Security - -This example deploy a 3 nodes Elasticsearch 7.17.3 with authentication and -autogenerated certificates for TLS (see [values][]). - -Note that this configuration should be used for test only. For a production -deployment you should generate SSL certificates following the [official docs][]. - -## Usage - -* Create the required secrets: `make secrets` - -* Deploy Elasticsearch chart with the default values: `make install` - -* You can now setup a port forward to query Elasticsearch API: - - ``` - kubectl port-forward svc/security-master 9200 - curl -u elastic:changeme https://localhost:9200/_cat/indices - ``` - -## Testing - -You can also run [goss integration tests][] using `make test` - - -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/security/test/goss.yaml -[official docs]: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/configuring-tls.html#node-certificates -[values]: https://github.com/elastic/helm-charts/tree/7.17/elasticsearch/examples/security/values.yaml diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/test/goss.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/test/goss.yaml deleted file mode 100644 index c52e05f..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/test/goss.yaml +++ /dev/null @@ -1,44 +0,0 @@ -http: - https://security-master:9200/_cluster/health: - status: 200 - timeout: 2000 - allow-insecure: true - username: elastic - password: "{{ .Env.ELASTIC_PASSWORD }}" - body: - - "green" - - '"number_of_nodes":3' - - '"number_of_data_nodes":3' - - https://localhost:9200/: - status: 200 - timeout: 2000 - allow-insecure: true - username: elastic - password: "{{ .Env.ELASTIC_PASSWORD }}" - body: - - '"cluster_name" : "security"' - - "You Know, for Search" - - https://localhost:9200/_xpack/license: - status: 200 - timeout: 2000 - allow-insecure: true - username: elastic - password: "{{ .Env.ELASTIC_PASSWORD }}" - body: - - "active" - - "basic" - -file: - /usr/share/elasticsearch/config/elasticsearch.yml: - exists: true - contains: - - "xpack.security.enabled: true" - - "xpack.security.transport.ssl.enabled: true" - - "xpack.security.transport.ssl.verification_mode: certificate" - - "xpack.security.transport.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12" - - "xpack.security.transport.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12" - - "xpack.security.http.ssl.enabled: true" - - "xpack.security.http.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12" - - "xpack.security.http.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/values.yaml deleted file mode 100644 index ac26231..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/security/values.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -clusterName: "security" -nodeGroup: "master" - -roles: - master: "true" - ingest: "true" - data: "true" - -protocol: https - -esConfig: - elasticsearch.yml: | - xpack.security.enabled: true - xpack.security.transport.ssl.enabled: true - xpack.security.transport.ssl.verification_mode: certificate - xpack.security.transport.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12 - xpack.security.transport.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12 - xpack.security.http.ssl.enabled: true - xpack.security.http.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12 - xpack.security.http.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12 - -extraEnvs: - - name: ELASTIC_PASSWORD - valueFrom: - secretKeyRef: - name: elastic-credentials - key: password - -secretMounts: - - name: elastic-certificates - secretName: elastic-certificates - path: /usr/share/elasticsearch/config/certs diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/Makefile b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/Makefile deleted file mode 100644 index 9251d3b..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -CHART := elasticsearch -RELEASE := helm-es-upgrade -FROM := 7.4.0 # versions before 7.4.O aren't compatible with Kubernetes >= 1.16.0 - -install: - ../../../helpers/upgrade.sh --chart $(CHART) --release $(RELEASE) --from $(FROM) - kubectl rollout status statefulset upgrade-master - -test: install goss - -purge: - helm del $(RELEASE) diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/README.md b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/README.md deleted file mode 100644 index 85977f5..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Upgrade - -This example will deploy a 3 node Elasticsearch cluster chart using an old chart -version, then upgrade it. - - -## Usage - -* Deploy and upgrade Elasticsearch chart with the default values: `make install` - - -## Testing - -You can also run [goss integration tests][] using `make test`. - - -[goss integration tests]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/upgrade/test/goss.yaml diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/scripts/upgrade.sh b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/scripts/upgrade.sh deleted file mode 100644 index 59853e0..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/scripts/upgrade.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -usage() { - cat <<-EOF - USAGE: - $0 [--release ] [--from ] - $0 --help - - OPTIONS: - --release - Name of the Helm release to install - --from - Elasticsearch version to use for first install - EOF - exit 1 -} - -RELEASE="helm-es-upgrade" -FROM="" - -while [[ $# -gt 0 ]] -do - key="$1" - - case $key in - --help) - usage - ;; - --release) - RELEASE="$2" - shift 2 - ;; - --from) - FROM="$2" - shift 2 - ;; - *) - log "Unrecognized argument: '$key'" - usage - ;; - esac -done - -if ! command -v jq > /dev/null -then - echo 'jq is required to use this script' - echo 'please check https://stedolan.github.io/jq/download/ to install it' - exit 1 -fi - -# Elasticsearch chart < 7.4.0 are not compatible with K8S >= 1.16) -if [[ -z $FROM ]] -then - KUBE_MINOR_VERSION=$(kubectl version -o json | jq --raw-output --exit-status '.serverVersion.minor' | sed 's/[^0-9]*//g') - - if [ "$KUBE_MINOR_VERSION" -lt 16 ] - then - FROM="7.0.0-alpha1" - else - FROM="7.4.0" - fi -fi - -helm repo add elastic https://helm.elastic.co - -# Initial install -printf "Installing Elasticsearch chart %s\n" "$FROM" -helm upgrade --wait --timeout=600s --install "$RELEASE" elastic/elasticsearch --version "$FROM" --set clusterName=upgrade -kubectl rollout status sts/upgrade-master --timeout=600s - -# Upgrade -printf "Upgrading Elasticsearch chart\n" -helm upgrade --wait --timeout=600s --set terminationGracePeriod=121 --install "$RELEASE" ../../ --set clusterName=upgrade -kubectl rollout status sts/upgrade-master --timeout=600s diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/test/goss.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/test/goss.yaml deleted file mode 100644 index 714022d..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/test/goss.yaml +++ /dev/null @@ -1,16 +0,0 @@ -http: - http://localhost:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - "green" - - '"number_of_nodes":3' - - '"number_of_data_nodes":3' - - http://localhost:9200: - status: 200 - timeout: 2000 - body: - - '"number" : "7.17.3"' - - '"cluster_name" : "upgrade"' - - "You Know, for Search" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/values.yaml deleted file mode 100644 index de0283a..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/examples/upgrade/values.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -clusterName: upgrade diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/NOTES.txt b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/NOTES.txt deleted file mode 100644 index 88b5dd5..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/NOTES.txt +++ /dev/null @@ -1,6 +0,0 @@ -1. Watch all cluster members come up. - $ kubectl get pods --namespace={{ .Release.Namespace }} -l app={{ template "elasticsearch.uname" . }} -w -{{- if .Values.tests.enabled -}} -2. Test cluster health using Helm test. - $ helm --namespace={{ .Release.Namespace }} test {{ .Release.Name }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/_helpers.tpl deleted file mode 100644 index b2ae034..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/_helpers.tpl +++ /dev/null @@ -1,84 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "elasticsearch.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 "elasticsearch.fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "elasticsearch.uname" -}} -{{- if empty .Values.fullnameOverride -}} -{{- if empty .Values.nameOverride -}} -{{ .Values.clusterName }}-{{ .Values.nodeGroup }} -{{- else -}} -{{ .Values.nameOverride }}-{{ .Values.nodeGroup }} -{{- end -}} -{{- else -}} -{{ .Values.fullnameOverride }} -{{- end -}} -{{- end -}} - -{{/* -Generate certificates -*/}} -{{- define "elasticsearch.gen-certs" -}} -{{- $altNames := list ( printf "%s.%s" (include "elasticsearch.name" .) .Release.Namespace ) ( printf "%s.%s.svc" (include "elasticsearch.name" .) .Release.Namespace ) -}} -{{- $ca := genCA "elasticsearch-ca" 365 -}} -{{- $cert := genSignedCert ( include "elasticsearch.name" . ) nil $altNames 365 $ca -}} -tls.crt: {{ $cert.Cert | toString | b64enc }} -tls.key: {{ $cert.Key | toString | b64enc }} -ca.crt: {{ $ca.Cert | toString | b64enc }} -{{- end -}} - -{{- define "elasticsearch.masterService" -}} -{{- if empty .Values.masterService -}} -{{- if empty .Values.fullnameOverride -}} -{{- if empty .Values.nameOverride -}} -{{ .Values.clusterName }}-master -{{- else -}} -{{ .Values.nameOverride }}-master -{{- end -}} -{{- else -}} -{{ .Values.fullnameOverride }} -{{- end -}} -{{- else -}} -{{ .Values.masterService }} -{{- end -}} -{{- end -}} - -{{- define "elasticsearch.endpoints" -}} -{{- $replicas := int (toString (.Values.replicas)) }} -{{- $uname := (include "elasticsearch.uname" .) }} - {{- range $i, $e := untilStep 0 $replicas 1 -}} -{{ $uname }}-{{ $i }}, - {{- end -}} -{{- end -}} - -{{- define "elasticsearch.esMajorVersion" -}} -{{- if .Values.esMajorVersion -}} -{{ .Values.esMajorVersion }} -{{- else -}} -{{- $version := int (index (.Values.imageTag | splitList ".") 0) -}} - {{- if and (contains "docker.elastic.co/elasticsearch/elasticsearch" .Values.image) (not (eq $version 0)) -}} -{{ $version }} - {{- else -}} -7 - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Use the fullname if the serviceAccount value is not set -*/}} -{{- define "elasticsearch.serviceAccount" -}} -{{- .Values.rbac.serviceAccountName | default (include "elasticsearch.uname" .) -}} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/configmap.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/configmap.yaml deleted file mode 100644 index fd1ad30..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/configmap.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- if .Values.esConfig }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "elasticsearch.uname" . }}-config - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "elasticsearch.uname" . }}" -data: -{{- range $path, $config := .Values.esConfig }} - {{ $path }}: | -{{ $config | indent 4 -}} -{{- end -}} -{{- end -}} -{{- if .Values.esJvmOptions }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "elasticsearch.uname" . }}-jvm-options - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "elasticsearch.uname" . }}" -data: -{{- range $path, $config := .Values.esJvmOptions }} - {{ $path }}: | -{{ $config | indent 4 -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/ingress.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/ingress.yaml deleted file mode 100644 index e60cebf..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/ingress.yaml +++ /dev/null @@ -1,64 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "elasticsearch.uname" . -}} -{{- $httpPort := .Values.httpPort -}} -{{- $pathtype := .Values.ingress.pathtype -}} -{{- $ingressPath := .Values.ingress.path -}} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - app: {{ .Chart.Name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.ingress.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -spec: - {{- if .Values.ingress.className }} - ingressClassName: {{ .Values.ingress.className | quote }} - {{- end }} -{{- if .Values.ingress.tls }} - tls: - {{- if .ingressPath }} - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- else }} -{{ toYaml .Values.ingress.tls | indent 4 }} - {{- end }} -{{- end}} - rules: - {{- range .Values.ingress.hosts }} - {{- if $ingressPath }} - - host: {{ . }} - http: - paths: - - path: {{ $ingressPath }} - pathType: {{ $pathtype }} - backend: - service: - name: {{ $fullName }} - port: - number: {{ $httpPort }} - {{- else }} - - host: {{ .host }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - pathType: {{ $pathtype }} - backend: - service: - name: {{ $fullName }} - port: - number: {{ .servicePort | default $httpPort }} - {{- end }} - {{- end }} - {{- end }} - {{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/networkpolicy.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/networkpolicy.yaml deleted file mode 100644 index 62bb1bd..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/networkpolicy.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if (or .Values.networkPolicy.http.enabled .Values.networkPolicy.transport.enabled) }} -kind: NetworkPolicy -apiVersion: networking.k8s.io/v1 -metadata: - name: {{ template "elasticsearch.uname" . }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "elasticsearch.uname" . }}" -spec: - podSelector: - matchLabels: - app: "{{ template "elasticsearch.uname" . }}" - ingress: # Allow inbound connections - -{{- if .Values.networkPolicy.http.enabled }} - # For HTTP access - - ports: - - port: {{ .Values.httpPort }} - from: - # From authorized Pods (having the correct label) - - podSelector: - matchLabels: - {{ template "elasticsearch.uname" . }}-http-client: "true" -{{- with .Values.networkPolicy.http.explicitNamespacesSelector }} - # From authorized namespaces - namespaceSelector: -{{ toYaml . | indent 12 }} -{{- end }} -{{- with .Values.networkPolicy.http.additionalRules }} - # Or from custom additional rules -{{ toYaml . | indent 8 }} -{{- end }} -{{- end }} - -{{- if .Values.networkPolicy.transport.enabled }} - # For transport access - - ports: - - port: {{ .Values.transportPort }} - from: - # From authorized Pods (having the correct label) - - podSelector: - matchLabels: - {{ template "elasticsearch.uname" . }}-transport-client: "true" -{{- with .Values.networkPolicy.transport.explicitNamespacesSelector }} - # From authorized namespaces - namespaceSelector: -{{ toYaml . | indent 12 }} -{{- end }} -{{- with .Values.networkPolicy.transport.additionalRules }} - # Or from custom additional rules -{{ toYaml . | indent 8 }} -{{- end }} - # Or from other ElasticSearch Pods - - podSelector: - matchLabels: - app: "{{ template "elasticsearch.uname" . }}" -{{- end }} - -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/poddisruptionbudget.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/poddisruptionbudget.yaml deleted file mode 100644 index 6d0bdf3..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/poddisruptionbudget.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.maxUnavailable }} -{{- if .Capabilities.APIVersions.Has "policy/v1" -}} -apiVersion: policy/v1 -{{- else}} -apiVersion: policy/v1beta1 -{{- end }} -kind: PodDisruptionBudget -metadata: - name: "{{ template "elasticsearch.uname" . }}-pdb" -spec: - maxUnavailable: {{ .Values.maxUnavailable }} - selector: - matchLabels: - app: "{{ template "elasticsearch.uname" . }}" -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/podsecuritypolicy.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/podsecuritypolicy.yaml deleted file mode 100644 index e22e75c..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/podsecuritypolicy.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.podSecurityPolicy.create -}} -{{- $fullName := include "elasticsearch.uname" . -}} -{{- if .Capabilities.APIVersions.Has "policy/v1" -}} -apiVersion: policy/v1 -{{- else}} -apiVersion: policy/v1beta1 -{{- end }} -kind: PodSecurityPolicy -metadata: - name: {{ default $fullName .Values.podSecurityPolicy.name | quote }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ $fullName | quote }} -spec: -{{ toYaml .Values.podSecurityPolicy.spec | indent 2 }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/role.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/role.yaml deleted file mode 100644 index d3a7ee3..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/role.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.rbac.create -}} -{{- $fullName := include "elasticsearch.uname" . -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ $fullName | quote }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ $fullName | quote }} -rules: - - apiGroups: - - extensions - resources: - - podsecuritypolicies - resourceNames: - {{- if eq .Values.podSecurityPolicy.name "" }} - - {{ $fullName | quote }} - {{- else }} - - {{ .Values.podSecurityPolicy.name | quote }} - {{- end }} - verbs: - - use -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/rolebinding.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/rolebinding.yaml deleted file mode 100644 index e0ecced..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/rolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.rbac.create -}} -{{- $fullName := include "elasticsearch.uname" . -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ $fullName | quote }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ $fullName | quote }} -subjects: - - kind: ServiceAccount - name: "{{ template "elasticsearch.serviceAccount" . }}" - namespace: {{ .Release.Namespace | quote }} -roleRef: - kind: Role - name: {{ $fullName | quote }} - apiGroup: rbac.authorization.k8s.io -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/service.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/service.yaml deleted file mode 100644 index 5fe52eb..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/service.yaml +++ /dev/null @@ -1,78 +0,0 @@ -{{- if .Values.service.enabled -}} ---- -kind: Service -apiVersion: v1 -metadata: -{{- if eq .Values.nodeGroup "master" }} - name: {{ template "elasticsearch.masterService" . }} -{{- else }} - name: {{ template "elasticsearch.uname" . }} -{{- end }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "elasticsearch.uname" . }}" -{{- if .Values.service.labels }} -{{ toYaml .Values.service.labels | indent 4}} -{{- end }} - annotations: -{{ toYaml .Values.service.annotations | indent 4 }} -spec: - type: {{ .Values.service.type }} - selector: - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "elasticsearch.uname" . }}" - publishNotReadyAddresses: {{ .Values.service.publishNotReadyAddresses }} - ports: - - name: {{ .Values.service.httpPortName | default "http" }} - protocol: TCP - port: {{ .Values.httpPort }} -{{- if .Values.service.nodePort }} - nodePort: {{ .Values.service.nodePort }} -{{- end }} - - name: {{ .Values.service.transportPortName | default "transport" }} - protocol: TCP - port: {{ .Values.transportPort }} -{{- if .Values.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.service.loadBalancerIP }} -{{- end }} -{{- with .Values.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: -{{ toYaml . | indent 4 }} -{{- end }} -{{- if .Values.service.externalTrafficPolicy }} - externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} -{{- end }} -{{- end }} ---- -kind: Service -apiVersion: v1 -metadata: -{{- if eq .Values.nodeGroup "master" }} - name: {{ template "elasticsearch.masterService" . }}-headless -{{- else }} - name: {{ template "elasticsearch.uname" . }}-headless -{{- end }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "elasticsearch.uname" . }}" -{{- if .Values.service.labelsHeadless }} -{{ toYaml .Values.service.labelsHeadless | indent 4 }} -{{- end }} - annotations: - service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" -spec: - clusterIP: None # This is needed for statefulset hostnames like elasticsearch-0 to resolve - # Create endpoints also if the related pod isn't ready - publishNotReadyAddresses: true - selector: - app: "{{ template "elasticsearch.uname" . }}" - ports: - - name: {{ .Values.service.httpPortName | default "http" }} - port: {{ .Values.httpPort }} - - name: {{ .Values.service.transportPortName | default "transport" }} - port: {{ .Values.transportPort }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/serviceaccount.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/serviceaccount.yaml deleted file mode 100644 index a7ef847..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.rbac.create -}} -{{- $fullName := include "elasticsearch.uname" . -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: "{{ template "elasticsearch.serviceAccount" . }}" - annotations: - {{- with .Values.rbac.serviceAccountAnnotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ $fullName | quote }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/statefulset.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/statefulset.yaml deleted file mode 100644 index 754581c..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/statefulset.yaml +++ /dev/null @@ -1,390 +0,0 @@ ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "elasticsearch.uname" . }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "elasticsearch.uname" . }}" - {{- range $key, $value := .Values.labels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - annotations: - esMajorVersion: "{{ include "elasticsearch.esMajorVersion" . }}" -spec: - serviceName: {{ template "elasticsearch.uname" . }}-headless - selector: - matchLabels: - app: "{{ template "elasticsearch.uname" . }}" - replicas: {{ .Values.replicas }} - podManagementPolicy: {{ .Values.podManagementPolicy }} - updateStrategy: - type: {{ .Values.updateStrategy }} - {{- if .Values.persistence.enabled }} - volumeClaimTemplates: - - metadata: - name: {{ template "elasticsearch.uname" . }} - {{- if .Values.persistence.labels.enabled }} - labels: - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "elasticsearch.uname" . }}" - {{- range $key, $value := .Values.labels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - {{- with .Values.persistence.annotations }} - annotations: -{{ toYaml . | indent 8 }} - {{- end }} - spec: -{{ toYaml .Values.volumeClaimTemplate | indent 6 }} - {{- end }} - template: - metadata: - name: "{{ template "elasticsearch.uname" . }}" - labels: - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "elasticsearch.uname" . }}" - {{- range $key, $value := .Values.labels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - annotations: - {{- range $key, $value := .Values.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{/* This forces a restart if the configmap has changed */}} - {{- if or .Values.esConfig .Values.esJvmOptions }} - configchecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }} - {{- end }} - spec: - {{- if .Values.schedulerName }} - schedulerName: "{{ .Values.schedulerName }}" - {{- end }} - securityContext: -{{ toYaml .Values.podSecurityContext | indent 8 }} - {{- if .Values.fsGroup }} - fsGroup: {{ .Values.fsGroup }} # Deprecated value, please use .Values.podSecurityContext.fsGroup - {{- end }} - {{- if or .Values.rbac.create .Values.rbac.serviceAccountName }} - serviceAccountName: "{{ template "elasticsearch.serviceAccount" . }}" - {{- end }} - automountServiceAccountToken: {{ .Values.rbac.automountToken }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 6 }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if or (eq .Values.antiAffinity "hard") (eq .Values.antiAffinity "soft") .Values.nodeAffinity }} - {{- if .Values.priorityClassName }} - priorityClassName: {{ .Values.priorityClassName }} - {{- end }} - affinity: - {{- end }} - {{- if eq .Values.antiAffinity "hard" }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - "{{ template "elasticsearch.uname" .}}" - topologyKey: {{ .Values.antiAffinityTopologyKey }} - {{- else if eq .Values.antiAffinity "soft" }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ .Values.antiAffinityTopologyKey }} - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - "{{ template "elasticsearch.uname" . }}" - {{- end }} - {{- with .Values.nodeAffinity }} - nodeAffinity: -{{ toYaml . | indent 10 }} - {{- end }} - terminationGracePeriodSeconds: {{ .Values.terminationGracePeriod }} - volumes: - {{- range .Values.secretMounts }} - - name: {{ .name }} - secret: - secretName: {{ .secretName }} - {{- if .defaultMode }} - defaultMode: {{ .defaultMode }} - {{- end }} - {{- end }} - {{- if .Values.esConfig }} - - name: esconfig - configMap: - name: {{ template "elasticsearch.uname" . }}-config - {{- end }} - {{- if .Values.esJvmOptions }} - - name: esjvmoptions - configMap: - name: {{ template "elasticsearch.uname" . }}-jvm-options - {{- end }} -{{- if .Values.keystore }} - - name: keystore - emptyDir: {} - {{- range .Values.keystore }} - - name: keystore-{{ .secretName }} - secret: {{ toYaml . | nindent 12 }} - {{- end }} -{{ end }} - {{- if .Values.extraVolumes }} - # Currently some extra blocks accept strings - # to continue with backwards compatibility this is being kept - # whilst also allowing for yaml to be specified too. - {{- if eq "string" (printf "%T" .Values.extraVolumes) }} -{{ tpl .Values.extraVolumes . | indent 8 }} - {{- else }} -{{ toYaml .Values.extraVolumes | indent 8 }} - {{- end }} - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - enableServiceLinks: {{ .Values.enableServiceLinks }} - {{- if .Values.hostAliases }} - hostAliases: {{ toYaml .Values.hostAliases | nindent 8 }} - {{- end }} - {{- if or (.Values.extraInitContainers) (.Values.sysctlInitContainer.enabled) (.Values.keystore) }} - initContainers: - {{- if .Values.sysctlInitContainer.enabled }} - - name: configure-sysctl - securityContext: - runAsUser: 0 - privileged: true - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - command: ["sysctl", "-w", "vm.max_map_count={{ .Values.sysctlVmMaxMapCount}}"] - resources: -{{ toYaml .Values.initResources | indent 10 }} - {{- end }} -{{ if .Values.keystore }} - - name: keystore - securityContext: -{{ toYaml .Values.securityContext | indent 10 }} - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - command: - - bash - - -c - - | - set -euo pipefail - - elasticsearch-keystore create - - for i in /tmp/keystoreSecrets/*/*; do - key=$(basename $i) - echo "Adding file $i to keystore key $key" - elasticsearch-keystore add-file "$key" "$i" - done - - # Add the bootstrap password since otherwise the Elasticsearch entrypoint tries to do this on startup - if [ ! -z ${ELASTIC_PASSWORD+x} ]; then - echo 'Adding env $ELASTIC_PASSWORD to keystore as key bootstrap.password' - echo "$ELASTIC_PASSWORD" | elasticsearch-keystore add -x bootstrap.password - fi - - cp -a /usr/share/elasticsearch/config/elasticsearch.keystore /tmp/keystore/ - env: {{ toYaml .Values.extraEnvs | nindent 10 }} - envFrom: {{ toYaml .Values.envFrom | nindent 10 }} - resources: {{ toYaml .Values.initResources | nindent 10 }} - volumeMounts: - - name: keystore - mountPath: /tmp/keystore - {{- range .Values.keystore }} - - name: keystore-{{ .secretName }} - mountPath: /tmp/keystoreSecrets/{{ .secretName }} - {{- end }} -{{ end }} - {{- if .Values.extraInitContainers }} - # Currently some extra blocks accept strings - # to continue with backwards compatibility this is being kept - # whilst also allowing for yaml to be specified too. - {{- if eq "string" (printf "%T" .Values.extraInitContainers) }} -{{ tpl .Values.extraInitContainers . | indent 6 }} - {{- else }} -{{ toYaml .Values.extraInitContainers | indent 6 }} - {{- end }} - {{- end }} - {{- end }} - containers: - - name: "{{ template "elasticsearch.name" . }}" - securityContext: -{{ toYaml .Values.securityContext | indent 10 }} - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - readinessProbe: - exec: - command: - - bash - - -c - - | - set -e - # If the node is starting up wait for the cluster to be ready (request params: "{{ .Values.clusterHealthCheckParams }}" ) - # Once it has started only check that the node itself is responding - START_FILE=/tmp/.es_start_file - - # Disable nss cache to avoid filling dentry cache when calling curl - # This is required with Elasticsearch Docker using nss < 3.52 - export NSS_SDB_USE_CACHE=no - - http () { - local path="${1}" - local args="${2}" - set -- -XGET -s - - if [ "$args" != "" ]; then - set -- "$@" $args - fi - - if [ -n "${ELASTIC_PASSWORD}" ]; then - set -- "$@" -u "elastic:${ELASTIC_PASSWORD}" - fi - - curl --output /dev/null -k "$@" "{{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}${path}" - } - - if [ -f "${START_FILE}" ]; then - echo 'Elasticsearch is already running, lets check the node is healthy' - HTTP_CODE=$(http "/" "-w %{http_code}") - RC=$? - if [[ ${RC} -ne 0 ]]; then - echo "curl --output /dev/null -k -XGET -s -w '%{http_code}' \${BASIC_AUTH} {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/ failed with RC ${RC}" - exit ${RC} - fi - # ready if HTTP code 200, 503 is tolerable if ES version is 6.x - if [[ ${HTTP_CODE} == "200" ]]; then - exit 0 - elif [[ ${HTTP_CODE} == "503" && "{{ include "elasticsearch.esMajorVersion" . }}" == "6" ]]; then - exit 0 - else - echo "curl --output /dev/null -k -XGET -s -w '%{http_code}' \${BASIC_AUTH} {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/ failed with HTTP code ${HTTP_CODE}" - exit 1 - fi - - else - echo 'Waiting for elasticsearch cluster to become ready (request params: "{{ .Values.clusterHealthCheckParams }}" )' - if http "/_cluster/health?{{ .Values.clusterHealthCheckParams }}" "--fail" ; then - touch ${START_FILE} - exit 0 - else - echo 'Cluster is not yet ready (request params: "{{ .Values.clusterHealthCheckParams }}" )' - exit 1 - fi - fi -{{ toYaml .Values.readinessProbe | indent 10 }} - ports: - - name: http - containerPort: {{ .Values.httpPort }} - - name: transport - containerPort: {{ .Values.transportPort }} - resources: -{{ toYaml .Values.resources | indent 10 }} - env: - - name: node.name - valueFrom: - fieldRef: - fieldPath: metadata.name - {{- if eq .Values.roles.master "true" }} - {{- if ge (int (include "elasticsearch.esMajorVersion" .)) 7 }} - - name: cluster.initial_master_nodes - value: "{{ template "elasticsearch.endpoints" . }}" - {{- else }} - - name: discovery.zen.minimum_master_nodes - value: "{{ .Values.minimumMasterNodes }}" - {{- end }} - {{- end }} - {{- if lt (int (include "elasticsearch.esMajorVersion" .)) 7 }} - - name: discovery.zen.ping.unicast.hosts - value: "{{ template "elasticsearch.masterService" . }}-headless" - {{- else }} - - name: discovery.seed_hosts - value: "{{ template "elasticsearch.masterService" . }}-headless" - {{- end }} - - name: cluster.name - value: "{{ .Values.clusterName }}" - - name: network.host - value: "{{ .Values.networkHost }}" - - name: cluster.deprecation_indexing.enabled - value: "{{ .Values.clusterDeprecationIndexing }}" - {{- if .Values.esJavaOpts }} - - name: ES_JAVA_OPTS - value: "{{ .Values.esJavaOpts }}" - {{- end }} - {{- range $role, $enabled := .Values.roles }} - - name: node.{{ $role }} - value: "{{ $enabled }}" - {{- end }} -{{- if .Values.extraEnvs }} -{{ toYaml .Values.extraEnvs | indent 10 }} -{{- end }} -{{- if .Values.envFrom }} - envFrom: -{{ toYaml .Values.envFrom | indent 10 }} -{{- end }} - volumeMounts: - {{- if .Values.persistence.enabled }} - - name: "{{ template "elasticsearch.uname" . }}" - mountPath: /usr/share/elasticsearch/data - {{- end }} -{{ if .Values.keystore }} - - name: keystore - mountPath: /usr/share/elasticsearch/config/elasticsearch.keystore - subPath: elasticsearch.keystore -{{ end }} - {{- range .Values.secretMounts }} - - name: {{ .name }} - mountPath: {{ .path }} - {{- if .subPath }} - subPath: {{ .subPath }} - {{- end }} - {{- end }} - {{- range $path, $config := .Values.esConfig }} - - name: esconfig - mountPath: /usr/share/elasticsearch/config/{{ $path }} - subPath: {{ $path }} - {{- end -}} - {{- range $path, $config := .Values.esJvmOptions }} - - name: esjvmoptions - mountPath: /usr/share/elasticsearch/config/jvm.options.d/{{ $path }} - subPath: {{ $path }} - {{- end -}} - {{- if .Values.extraVolumeMounts }} - # Currently some extra blocks accept strings - # to continue with backwards compatibility this is being kept - # whilst also allowing for yaml to be specified too. - {{- if eq "string" (printf "%T" .Values.extraVolumeMounts) }} -{{ tpl .Values.extraVolumeMounts . | indent 10 }} - {{- else }} -{{ toYaml .Values.extraVolumeMounts | indent 10 }} - {{- end }} - {{- end }} -{{- if .Values.lifecycle }} - lifecycle: -{{ toYaml .Values.lifecycle | indent 10 }} -{{- end }} - {{- if .Values.extraContainers }} - # Currently some extra blocks accept strings - # to continue with backwards compatibility this is being kept - # whilst also allowing for yaml to be specified too. - {{- if eq "string" (printf "%T" .Values.extraContainers) }} -{{ tpl .Values.extraContainers . | indent 6 }} - {{- else }} -{{ toYaml .Values.extraContainers | indent 6 }} - {{- end }} - {{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/test/test-elasticsearch-health.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/test/test-elasticsearch-health.yaml deleted file mode 100644 index 9ab7dab..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/templates/test/test-elasticsearch-health.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if .Values.tests.enabled -}} ---- -apiVersion: v1 -kind: Pod -metadata: -{{- if .Values.healthNameOverride }} - name: {{ .Values.healthNameOverride | quote }} -{{- else }} - name: "{{ .Release.Name }}-{{ randAlpha 5 | lower }}-test" -{{- end }} - annotations: - "helm.sh/hook": test - "helm.sh/hook-delete-policy": hook-succeeded -spec: - securityContext: -{{ toYaml .Values.podSecurityContext | indent 4 }} - containers: -{{- if .Values.healthNameOverride }} - - name: {{ .Values.healthNameOverride | quote }} -{{- else }} - - name: "{{ .Release.Name }}-{{ randAlpha 5 | lower }}-test" -{{- end }} - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - command: - - "sh" - - "-c" - - | - #!/usr/bin/env bash -e - curl -XGET --fail '{{ template "elasticsearch.uname" . }}:{{ .Values.httpPort }}/_cluster/health?{{ .Values.clusterHealthCheckParams }}' - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 4 }} - {{- end }} - restartPolicy: Never -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/values.yaml deleted file mode 100644 index 9eb4370..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/charts/elasticsearch/values.yaml +++ /dev/null @@ -1,355 +0,0 @@ ---- -clusterName: "elasticsearch" -nodeGroup: "master" - -# The service that non master groups will try to connect to when joining the cluster -# This should be set to clusterName + "-" + nodeGroup for your master group -masterService: "" - -# Elasticsearch roles that will be applied to this nodeGroup -# These will be set as environment variables. E.g. node.master=true -roles: - master: "true" - ingest: "true" - data: "true" - remote_cluster_client: "true" - ml: "true" - -replicas: 3 -minimumMasterNodes: 2 - -esMajorVersion: "" - -clusterDeprecationIndexing: "false" - -# Allows you to add any config files in /usr/share/elasticsearch/config/ -# such as elasticsearch.yml and log4j2.properties -esConfig: {} -# elasticsearch.yml: | -# key: -# nestedkey: value -# log4j2.properties: | -# key = value - -esJvmOptions: {} -# processors.options: | -# -XX:ActiveProcessorCount=3 - -# Extra environment variables to append to this nodeGroup -# This will be appended to the current 'env:' key. You can use any of the kubernetes env -# syntax here -extraEnvs: [] -# - name: MY_ENVIRONMENT_VAR -# value: the_value_goes_here - -# Allows you to load environment variables from kubernetes secret or config map -envFrom: [] -# - secretRef: -# name: env-secret -# - configMapRef: -# name: config-map - -# A list of secrets and their paths to mount inside the pod -# This is useful for mounting certificates for security and for mounting -# the X-Pack license -secretMounts: [] -# - name: elastic-certificates -# secretName: elastic-certificates -# path: /usr/share/elasticsearch/config/certs -# defaultMode: 0755 - -hostAliases: [] -#- ip: "127.0.0.1" -# hostnames: -# - "foo.local" -# - "bar.local" - -image: "docker.elastic.co/elasticsearch/elasticsearch" -imageTag: "7.17.3" -imagePullPolicy: "IfNotPresent" - -podAnnotations: - {} - # iam.amazonaws.com/role: es-cluster - -# additionals labels -labels: {} - -esJavaOpts: "" # example: "-Xmx1g -Xms1g" - -resources: - requests: - cpu: "1000m" - memory: "2Gi" - limits: - cpu: "1000m" - memory: "2Gi" - -initResources: - {} - # limits: - # cpu: "25m" - # # memory: "128Mi" - # requests: - # cpu: "25m" - # memory: "128Mi" - -networkHost: "0.0.0.0" - -volumeClaimTemplate: - accessModes: ["ReadWriteOnce"] - resources: - requests: - storage: 30Gi - -rbac: - create: false - serviceAccountAnnotations: {} - serviceAccountName: "" - automountToken: true - -podSecurityPolicy: - create: false - name: "" - spec: - privileged: true - fsGroup: - rule: RunAsAny - runAsUser: - rule: RunAsAny - seLinux: - rule: RunAsAny - supplementalGroups: - rule: RunAsAny - volumes: - - secret - - configMap - - persistentVolumeClaim - - emptyDir - -persistence: - enabled: true - labels: - # Add default labels for the volumeClaimTemplate of the StatefulSet - enabled: false - annotations: {} - -extraVolumes: - [] - # - name: extras - # emptyDir: {} - -extraVolumeMounts: - [] - # - name: extras - # mountPath: /usr/share/extras - # readOnly: true - -extraContainers: - [] - # - name: do-something - # image: busybox - # command: ['do', 'something'] - -extraInitContainers: - [] - # - name: do-something - # image: busybox - # command: ['do', 'something'] - -# This is the PriorityClass settings as defined in -# https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass -priorityClassName: "" - -# By default this will make sure two pods don't end up on the same node -# Changing this to a region would allow you to spread pods across regions -antiAffinityTopologyKey: "kubernetes.io/hostname" - -# Hard means that by default pods will only be scheduled if there are enough nodes for them -# and that they will never end up on the same node. Setting this to soft will do this "best effort" -antiAffinity: "hard" - -# This is the node affinity settings as defined in -# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature -nodeAffinity: {} - -# The default is to deploy all pods serially. By setting this to parallel all pods are started at -# the same time when bootstrapping the cluster -podManagementPolicy: "Parallel" - -# The environment variables injected by service links are not used, but can lead to slow Elasticsearch boot times when -# there are many services in the current namespace. -# If you experience slow pod startups you probably want to set this to `false`. -enableServiceLinks: true - -protocol: http -httpPort: 9200 -transportPort: 9300 - -service: - enabled: true - labels: {} - labelsHeadless: {} - type: ClusterIP - # Consider that all endpoints are considered "ready" even if the Pods themselves are not - # https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec - publishNotReadyAddresses: false - nodePort: "" - annotations: {} - httpPortName: http - transportPortName: transport - loadBalancerIP: "" - loadBalancerSourceRanges: [] - externalTrafficPolicy: "" - -updateStrategy: RollingUpdate - -# This is the max unavailable setting for the pod disruption budget -# The default value of 1 will make sure that kubernetes won't allow more than 1 -# of your pods to be unavailable during maintenance -maxUnavailable: 1 - -podSecurityContext: - fsGroup: 1000 - runAsUser: 1000 - -securityContext: - capabilities: - drop: - - ALL - # readOnlyRootFilesystem: true - runAsNonRoot: true - runAsUser: 1000 - -# How long to wait for elasticsearch to stop gracefully -terminationGracePeriod: 120 - -sysctlVmMaxMapCount: 262144 - -readinessProbe: - failureThreshold: 3 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 3 - timeoutSeconds: 5 - -# https://www.elastic.co/guide/en/elasticsearch/reference/7.17/cluster-health.html#request-params wait_for_status -clusterHealthCheckParams: "wait_for_status=green&timeout=1s" - -## Use an alternate scheduler. -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -schedulerName: "" - -imagePullSecrets: [] -nodeSelector: {} -tolerations: [] - -# Enabling this will publicly expose your Elasticsearch instance. -# Only enable this if you have security enabled on your cluster -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - className: "nginx" - pathtype: ImplementationSpecific - hosts: - - host: chart-example.local - paths: - - path: / - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -nameOverride: "" -fullnameOverride: "" -healthNameOverride: "" - -lifecycle: - {} - # preStop: - # exec: - # command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"] - # postStart: - # exec: - # command: - # - bash - # - -c - # - | - # #!/bin/bash - # # Add a template to adjust number of shards/replicas - # TEMPLATE_NAME=my_template - # INDEX_PATTERN="logstash-*" - # SHARD_COUNT=8 - # REPLICA_COUNT=1 - # ES_URL=http://localhost:9200 - # while [[ "$(curl -s -o /dev/null -w '%{http_code}\n' $ES_URL)" != "200" ]]; do sleep 1; done - # curl -XPUT "$ES_URL/_template/$TEMPLATE_NAME" -H 'Content-Type: application/json' -d'{"index_patterns":['\""$INDEX_PATTERN"\"'],"settings":{"number_of_shards":'$SHARD_COUNT',"number_of_replicas":'$REPLICA_COUNT'}}' - -sysctlInitContainer: - enabled: true - -keystore: [] - -networkPolicy: - ## Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now. - ## In order for a Pod to access Elasticsearch, it needs to have the following label: - ## {{ template "uname" . }}-client: "true" - ## Example for default configuration to access HTTP port: - ## elasticsearch-master-http-client: "true" - ## Example for default configuration to access transport port: - ## elasticsearch-master-transport-client: "true" - - http: - enabled: false - ## if explicitNamespacesSelector is not set or set to {}, only client Pods being in the networkPolicy's namespace - ## and matching all criteria can reach the DB. - ## But sometimes, we want the Pods to be accessible to clients from other namespaces, in this case, we can use this - ## parameter to select these namespaces - ## - # explicitNamespacesSelector: - # # Accept from namespaces with all those different rules (only from whitelisted Pods) - # matchLabels: - # role: frontend - # matchExpressions: - # - {key: role, operator: In, values: [frontend]} - ## Additional NetworkPolicy Ingress "from" rules to set. Note that all rules are OR-ed. - ## - # additionalRules: - # - podSelector: - # matchLabels: - # role: frontend - # - podSelector: - # matchExpressions: - # - key: role - # operator: In - # values: - # - frontend - - transport: - ## Note that all Elasticsearch Pods can talk to themselves using transport port even if enabled. - enabled: false - # explicitNamespacesSelector: - # matchLabels: - # role: frontend - # matchExpressions: - # - {key: role, operator: In, values: [frontend]} - # additionalRules: - # - podSelector: - # matchLabels: - # role: frontend - # - podSelector: - # matchExpressions: - # - key: role - # operator: In - # values: - # - frontend - -tests: - enabled: true - -# Deprecated -# please use the above podSecurityContext.fsGroup instead -fsGroup: "" diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/templates/_helpers-elasticsearch.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/templates/_helpers-elasticsearch.tpl deleted file mode 100644 index 8283820..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/templates/_helpers-elasticsearch.tpl +++ /dev/null @@ -1,27 +0,0 @@ -{{- define "alfresco-search-enterprise.searchIndexExistingSecretName" -}} -{{ $.Values.searchIndex.existingSecretName | default $.Values.global.elasticsearch.existingSecretName | default (printf "%s-elasticsearch-secret" (include "alfresco-search-enterprise.fullName" $)) }} -{{- end -}} - -{{- define "alfresco-search-enterprise.config.spring" -}} -{{- if .Values.elasticsearch.enabled }} - SPRING_ELASTICSEARCH_REST_URIS: "{{ .Values.elasticsearch.protocol }}://{{ .Values.elasticsearch.clusterName }}-{{ .Values.elasticsearch.nodeGroup }}:{{ .Values.elasticsearch.httpPort }}" -{{- else }} - {{- if and (not .Values.global.elasticsearch.host) (not .Values.searchIndex.host) }} - {{ fail "Please provide external elasticsearch connection details as values under .global.elasticsearch or .searchIndex or enable the embedded elasticsearch via .elasticsearch.enabled" }} - {{- end }} - SPRING_ELASTICSEARCH_REST_URIS: "{{ .Values.searchIndex.protocol | default .Values.global.elasticsearch.protocol }}://{{ .Values.searchIndex.host | default .Values.global.elasticsearch.host }}:{{ .Values.searchIndex.port | default .Values.global.elasticsearch.port }}" -{{- end -}} -{{- end -}} - -{{- define "alfresco-search-enterprise.config.spring.envCredentials" -}} -- name: SPRING_ELASTICSEARCH_REST_USERNAME - valueFrom: - secretKeyRef: - name: {{ template "alfresco-search-enterprise.searchIndexExistingSecretName" $ }} - key: ELASTICSEARCH_USERNAME -- name: SPRING_ELASTICSEARCH_REST_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "alfresco-search-enterprise.searchIndexExistingSecretName" $ }} - key: ELASTICSEARCH_PASSWORD -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-search-enterprise/templates/_helpers.tpl deleted file mode 100644 index 30b91bb..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/templates/_helpers.tpl +++ /dev/null @@ -1,51 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "alfresco-search-enterprise.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 "alfresco-search-enterprise.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 chart name and version as used by the chart label. -*/}} -{{- define "alfresco-search-enterprise.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "alfresco-search-enterprise.labels" -}} -helm.sh/chart: {{ include "alfresco-search-enterprise.chart" . }} -{{ include "alfresco-search-enterprise.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "alfresco-search-enterprise.selectorLabels" -}} -app.kubernetes.io/name: {{ include "alfresco-search-enterprise.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/templates/liveindexing-config.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/templates/liveindexing-config.yaml deleted file mode 100644 index 2f6ea63..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/templates/liveindexing-config.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "alfresco-search-enterprise.fullName" . }}-configmap - labels: - {{- include "alfresco-search-enterprise.labels" $ | nindent 4 }} -data: - ELASTICSEARCH_INDEXNAME: "{{ .Values.indexName }}" - {{- template "alfresco-search-enterprise.config.spring" . }} - ALFRESCO_SHAREDFILESTORE_BASEURL: http://{{ template "alfresco.shortname" . }}-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file/ - ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_BASEURL: http://{{ template "alfresco.shortname" . }}-router/transform/config - ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_REFRESHTIME: "{{ .Values.contentMediaTypeCache.refreshTime }}" - ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_ENABLED: "{{ .Values.contentMediaTypeCache.enabled }}" - ALFRESCO_PATHINDEXINGCOMPONENT_ENABLED: "{{ .Values.pathIndexingComponent.enabled }}" - {{- if .Values.liveIndexing.environment }} - {{- range $key, $val := .Values.liveIndexing.environment }} - {{ $key }}: {{ $val | quote }} - {{- end }} - {{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/templates/liveindexing-deployment.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/templates/liveindexing-deployment.yaml deleted file mode 100644 index 4dea417..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/templates/liveindexing-deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ -{{- range $serviceName, $service := .Values.liveIndexing }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "alfresco-search-enterprise.fullName" $ }}-{{ $serviceName }} - labels: - {{- include "alfresco-search-enterprise.labels" $ | nindent 4 }} -spec: - {{- if eq $serviceName "mediation"}} - replicas: 1 - {{- else }} - replicas: {{ $service.replicaCount | default 1 }} - {{- end }} - selector: - matchLabels: - {{- include "alfresco-search-enterprise.selectorLabels" $ | nindent 6 }} - template: - metadata: - annotations: - checksum/secret-broker: {{ include (print $.Template.BasePath "/secret-messagebroker.yaml") $ | sha256sum }} - checksum/secret-database: {{ include (print $.Template.BasePath "/secret-database.yaml") $ | sha256sum }} - checksum/secret-elasticsearch: {{ include (print $.Template.BasePath "/secret-elasticsearch.yaml") $ | sha256sum }} - {{- with $.Values.podAnnotations }} - {{- toYaml $ | nindent 8 }} - {{- end }} - labels: - {{- include "alfresco-search-enterprise.selectorLabels" $ | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values | indent 4 }} - {{- include "alfresco-content-services.imagePullSecrets" $ | indent 6 }} - containers: - - name: {{ $.Chart.Name }}-{{ $serviceName }} - image: "{{ index $.Values "liveIndexing" (printf "%s" $serviceName) "image" "repository" }}:\ - {{ index $.Values "liveIndexing" (printf "%s" $serviceName) "image" "tag" }}" - imagePullPolicy: {{ index $.Values "liveIndexing" (printf "%s" $serviceName) "image" "pullPolicy" }} - {{- include "component-security-context" .Values | indent 8 }} - envFrom: - - configMapRef: - name: {{ template "alfresco-search-enterprise.fullName" $ }}-configmap - - secretRef: - name: {{ default (printf "%s-messagebroker-secret" (include "alfresco-search-enterprise.fullName" $)) $.Values.messageBroker.existingSecretName }} - env: - {{- include "spring.activemq.env" . | nindent 12 }} - {{- include "alfresco-search-enterprise.config.spring.envCredentials" $ | nindent 12 }} - ports: - - name: http - containerPort: 8080 - protocol: TCP - livenessProbe: - initialDelaySeconds: 300 - timeoutSeconds: 60 - httpGet: - path: /actuator/health - port: http - readinessProbe: - initialDelaySeconds: 60 - timeoutSeconds: 60 - httpGet: - path: /actuator/health - port: http - resources: {{- toYaml $.Values.resources | nindent 12 }} - {{- with $.Values.nodeSelector }} - nodeSelector: - {{- toYaml $ | nindent 8 }} - {{- end }} - {{- with $.Values.affinity }} - affinity: - {{- toYaml $ | nindent 8 }} - {{- end }} - {{- with $.Values.tolerations }} - tolerations: - {{- toYaml $ | nindent 8 }} - {{- end }} ---- -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/templates/reindexing-config.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/templates/reindexing-config.yaml deleted file mode 100644 index 94e2ea8..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/templates/reindexing-config.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "alfresco-search-enterprise.fullName" . }}-reindexing-configmap - labels: - {{- include "alfresco-search-enterprise.labels" $ | nindent 4 }} -data: - ELASTICSEARCH_INDEXNAME: "{{ .Values.indexName }}" - {{ template "alfresco-search-enterprise.config.spring" . }} - ALFRESCO_SHAREDFILESTORE_BASEURL: http://{{ template "alfresco.shortname" . }}-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file/ - ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_BASEURL: http://{{ template "alfresco.shortname" . }}-router/transform/config - ALFRESCO_REINDEX_PATHINDEXINGENABLED: {{ .Values.reindexing.pathIndexingEnabled | quote }} - # {{- if .Values.reindexing.postgresql.url }} - # SPRING_DATASOURCE_URL: {{ .Values.reindexing.postgresql.url }} - # {{- else }} - # SPRING_DATASOURCE_URL: jdbc:postgresql://{{ .Release.Name }}-{{ .Values.reindexing.postgresql.hostname }}:{{ .Values.reindexing.postgresql.port | default 5432 }}/{{ .Values.reindexing.postgresql.database }} - # {{- end }} - {{- if .Values.reindexing.environment }} - {{- range $key, $val := .Values.reindexing.environment }} - {{ $key }}: {{ $val | quote }} - {{- end }} - {{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/templates/reindexing-job.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/templates/reindexing-job.yaml deleted file mode 100644 index c8fc4f6..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/templates/reindexing-job.yaml +++ /dev/null @@ -1,77 +0,0 @@ -{{- if .Values.reindexing.enabled }} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "alfresco-search-enterprise.fullName" . }}-reindexing - labels: - {{- include "alfresco-search-enterprise.labels" $ | nindent 4 }} -spec: - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "alfresco-search-enterprise.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values | indent 4 }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - restartPolicy: Never - containers: - - name: {{ .Chart.Name }}-reindexing - image: "{{ .Values.reindexing.image.repository }}:{{ .Values.reindexing.image.tag }}" - imagePullPolicy: {{ .Values.reindexing.image.pullPolicy }} - {{- include "component-security-context" .Values | indent 8 }} - resources: {{- toYaml .Values.reindexing.resources | nindent 12 }} - envFrom: - - configMapRef: - name: {{ template "alfresco-search-enterprise.fullName" . }}-reindexing-configmap - - secretRef: - name: {{ default (printf "%s-messagebroker-secret" (include "alfresco-search-enterprise.fullName" .)) .Values.messageBroker.existingSecretName }} - - secretRef: - name: {{ .Values.reindexing.postgresql.existingSecretName }} - env: - - name: SPRING_DATASOURCE_PASSWORD - valueFrom: - secretKeyRef: - name: {{ default (printf "%s-postgresql-secret" (include "alfresco-search-enterprise.fullName" $)) $.Values.reindexing.postgresql.existingSecretName }} - key: DATABASE_PASSWORD - - name: SPRING_DATASOURCE_USERNAME - valueFrom: - secretKeyRef: - name: {{ default (printf "%s-postgresql-secret" (include "alfresco-search-enterprise.fullName" $)) $.Values.reindexing.postgresql.existingSecretName }} - key: DATABASE_USERNAME - - name: SPRING_DATASOURCE_URL - valueFrom: - secretKeyRef: - name: {{ default (printf "%s-postgresql-secret" (include "alfresco-search-enterprise.fullName" $)) $.Values.reindexing.postgresql.existingSecretName }} - key: RDS_JDBC_URL - {{- include "spring.activemq.env" . | nindent 12 }} - {{- include "alfresco-search-enterprise.config.spring.envCredentials" $ | nindent 12 }} - - name: ALFRESCO_REINDEX_PREFIXES_FILE - value: file:///alf/reindex.prefixes-file.json - ports: - - name: http - containerPort: 8080 - protocol: TCP - volumeMounts: - - name: prefixes-file-volume - mountPath: /alf/reindex.prefixes-file.json - subPath: reindex.prefixes-file.json - volumes: - - name: prefixes-file-volume - configMap: - name: prefixes-file - initContainers: - - name: wait-for-repository - image: curlimages/curl:7.79.1 - {{- include "component-security-context" .Values | indent 8 }} - resources: {{- toYaml .Values.reindexing.initcontainers.waitForRepository.resources | nindent 12 }} - env: - - name: ALFRESCO_REPOSITORY_URL - value: http://{{ template "content-services.shortname" . }}-repository/alfresco/api/-default-/public/alfresco/versions/1/probes/-ready- - command: [ "/bin/sh","-c" ] - # Delay running the reindexing to give Alfresco Repository a chance to fully initialise - args: [ "while [ $(curl -sw '%{http_code}' $ALFRESCO_REPOSITORY_URL -o /dev/null) -ne 200 ]; do sleep 5; echo 'Waiting for the Alfresco Repository...'; done; echo 'Alfresco is ready, delay reindexing to give a chance to fully initialise.'; sleep 30; echo 'Reindexing started!'" ] -{{ end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-database.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-database.yaml deleted file mode 100644 index 0e0cb76..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-database.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if and .Values.reindexing.enabled (not .Values.reindexing.postgresql.existingSecretName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "alfresco-search-enterprise.fullName" . }}-postgresql-secret - labels: - {{- include "alfresco-search-enterprise.labels" $ | nindent 4 }} -type: Opaque -data: - DATABASE_USERNAME: {{ .Values.reindexing.postgresql.user | default "" | b64enc | quote }} - DATABASE_PASSWORD: {{ .Values.reindexing.postgresql.password | default "" | b64enc | quote }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-elasticsearch.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-elasticsearch.yaml deleted file mode 100644 index 04f9e23..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-elasticsearch.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if and (not .Values.global.elasticsearch.existingSecretName) (not .Values.searchIndex.existingSecretName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "alfresco-search-enterprise.fullName" . }}-elasticsearch-secret - labels: - {{- include "alfresco-search-enterprise.labels" $ | nindent 4 }} -type: Opaque -data: - ELASTICSEARCH_USERNAME: {{ .Values.searchIndex.user | default .Values.global.elasticsearch.user | default "" | b64enc | quote }} - ELASTICSEARCH_PASSWORD: {{ .Values.searchIndex.password | default .Values.global.elasticsearch.password | default "" | b64enc | quote }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-messagebroker.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-messagebroker.yaml deleted file mode 100644 index e9f1cd7..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/templates/secret-messagebroker.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if not .Values.messageBroker.existingSecretName }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "alfresco-search-enterprise.fullName" . }}-messagebroker-secret - labels: - {{- include "alfresco-search-enterprise.labels" $ | nindent 4 }} -type: Opaque -data: - {{- if .Values.activemq.enabled }} - BROKER_URL: {{ printf "failover:(nio://%s-activemq-broker:61616)?timeout=3000&jms.useCompression=true" (include "alfresco-search-enterprise.fullName" .) | b64enc | quote }} - BROKER_USERNAME: {{ .Values.activemq.adminUser.user | b64enc | quote }} - BROKER_PASSWORD: {{ .Values.activemq.adminUser.password | b64enc | quote }} - {{- else }} - BROKER_URL: {{ required "Disabling in-cluster ActiveMQ requires passing (at least) messageBroker.url" .Values.messageBroker.url | b64enc | quote }} - BROKER_USERNAME: {{ .Values.messageBroker.user | b64enc | quote }} - BROKER_PASSWORD: {{ .Values.messageBroker.password | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/values.yaml b/alfresco-content-services/charts/alfresco-search-enterprise/values.yaml deleted file mode 100644 index 4950932..0000000 --- a/alfresco-content-services/charts/alfresco-search-enterprise/values.yaml +++ /dev/null @@ -1,131 +0,0 @@ -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" -podAnnotations: {} -podSecurityContext: {} -securityContext: {} -nodeSelector: {} -tolerations: [] -affinity: {} -resources: - requests: - cpu: "0.5" - memory: "256Mi" - limits: - cpu: "2" - memory: "2048Mi" -# -- Name of the existing search index, usually created by repo -indexName: alfresco -pathIndexingComponent: - enabled: true -contentMediaTypeCache: - enabled: true - refreshTime: 0 0 * * * * -liveIndexing: - mediation: - image: - repository: >- - quay.io/alfresco/alfresco-elasticsearch-live-indexing-mediation - tag: 3.3.0 - pullPolicy: IfNotPresent - content: - image: - repository: quay.io/alfresco/alfresco-elasticsearch-live-indexing-content - tag: 3.3.0 - pullPolicy: IfNotPresent - replicaCount: 1 - metadata: - image: - repository: quay.io/alfresco/alfresco-elasticsearch-live-indexing-metadata - tag: 3.3.0 - pullPolicy: IfNotPresent - replicaCount: 1 - path: - image: - repository: quay.io/alfresco/alfresco-elasticsearch-live-indexing-path - tag: 3.3.0 - pullPolicy: IfNotPresent - replicaCount: 1 -reindexing: - # -- Create the one-shot job to trigger the reindexing of repo contents - enabled: true - image: - repository: quay.io/alfresco/alfresco-elasticsearch-reindexing - tag: 3.3.0 - pullPolicy: IfNotPresent - pathIndexingEnabled: true - postgresql: - url: - # -- The host where database service is available - hostname: postgresql-acs - # -- The port where service is available - port: 5432 - # -- The database name to use - database: alfresco - # -- The username required to access the service - user: - # -- The password required to access the service - password: - # -- Alternatively, provide connection details via an existing secret that contains DATABASE_USERNAME and DATABASE_PASSWORD keys - existingSecretName: - resources: - requests: - cpu: "0.5" - memory: "128Mi" - limits: - cpu: "2" - memory: "512Mi" - initcontainers: - waitForRepository: - resources: - limits: - cpu: "0.25" - memory: "10Mi" -elasticsearch: - # -- Enable embedded elasticsearch - useful when using this chart in standalone - enabled: false - replicas: 1 - clusterHealthCheckParams: "wait_for_status=yellow&timeout=1s" -activemq: - # -- Enable embedded broker - useful when testing this chart in standalone - enabled: false -messageBroker: - # -- Broker URL formatted as per: - # https://activemq.apache.org/failover-transport-reference - url: null - # -- Broker username - user: null - # -- Broker password - password: null - # -- Provide connection details alternatively via an existing secret that contains BROKER_URL, BROKER_USERNAME and BROKER_PASSWORD keys - existingSecretName: -# -- Overrides .Values.global.elasticsearch -searchIndex: - # -- The host where service is available - host: null - # -- The port where service is available - port: null - # -- Valid values are http or https - protocol: null - # -- The username required to access the service, if any - user: null - # -- The password required to access the service, if any - password: null - # -- Alternatively, provide connection details via an an existing secret that contains ELASTICSEARCH_USERNAME and ELASTICSEARCH_PASSWORD keys - existingSecretName: -global: - alfrescoRegistryPullSecrets: quay-registry-secret - # -- Shared connections details for Elasticsearch/Opensearch cluster - elasticsearch: - # -- The host where service is available - host: null - # -- The port where service is available - port: null - # -- Valid values are http or https - protocol: null - # -- The username required to access the service, if any - user: null - # -- The password required to access the service, if any - password: null - # -- Alternatively, provide connection details via an existing secret that contains ELASTICSEARCH_USERNAME and ELASTICSEARCH_PASSWORD keys - existingSecretName: diff --git a/alfresco-content-services/charts/alfresco-search-service/Chart.lock b/alfresco-content-services/charts/alfresco-search-service/Chart.lock deleted file mode 100644 index 7e53e26..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/Chart.lock +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: -- name: alfresco-insight-zeppelin - repository: "" - version: 2.0.0 -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 2.0.0 -digest: sha256:73ceeccdb51e1b757c9e7067759f748f716667efb9084b456fad43c3367a8cec -generated: "2023-03-09T11:30:13.663069+01:00" diff --git a/alfresco-content-services/charts/alfresco-search-service/Chart.yaml b/alfresco-content-services/charts/alfresco-search-service/Chart.yaml deleted file mode 100644 index fbd87bd..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/Chart.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: v2 -appVersion: 2.0.7 -dependencies: -- condition: alfresco-insight-zeppelin.enabled - name: alfresco-insight-zeppelin - repository: "" - version: 2.0.0 -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 2.0.0 -description: A Helm chart for deploying Alfresco Search Service -home: https://www.alfresco.com -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -keywords: -- search -- search services -- alfresco search services -- insight -- insight engine -- alfresco insight engine -- solr -- alfresco solr -name: alfresco-search-service -sources: -- https://github.com/Alfresco/alfresco-helm-charts -version: 1.1.0 diff --git a/alfresco-content-services/charts/alfresco-search-service/README.md b/alfresco-content-services/charts/alfresco-search-service/README.md deleted file mode 100644 index ad15498..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# alfresco-search-service - -![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![AppVersion: 2.0.7](https://img.shields.io/badge/AppVersion-2.0.7-informational?style=flat-square) - -A Helm chart for deploying Alfresco Search Service - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -**Homepage:** - -## Source Code - -* - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| | alfresco-insight-zeppelin | 2.0.0 | -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 2.0.0 | - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| PvNodeAffinity | string | `nil` | Define PVNodeAffinity for scheduling SOLR | -| affinity | string | `nil` | Define Affinity for scheduling SOLR | -| alfresco-insight-zeppelin.enabled | bool | `false` | | -| environment.SOLR_CREATE_ALFRESCO_DEFAULTS | string | `"alfresco,archive"` | | -| global.alfrescoRegistryPullSecrets | string | `"quay-registry-secret"` | | -| global.tracking.auth | string | `"secret"` | Select how solr and repo authenticate to each other none: work only prior to acs 7.2 (and was the default) secret: use a shared secret (to specify using `tracking.sharedsecret`) https: to use mTLS auth (require appropriate certificate configuration) | -| global.tracking.sharedsecret | string | `nil` | Shared secret to authenticate repo/solr traffic | -| ingress.basicAuth | string | `nil` | Default solr basic auth user/password: admin / admin You can create your own with htpasswd utilility & encode it with base640. Example: `echo -n "$(htpasswd -nbm admin admin)" | base64 | tr -d '\n'` basicAuth: YWRtaW46JGFwcjEkVVJqb29uS00kSEMuS1EwVkRScFpwSHB2a3JwTDd1Lg== | -| ingress.enabled | bool | `false` | Expose the solr admin console behind basic auth | -| ingress.existingSecretName | string | `nil` | An existing secret that contains an `auth` key with a value in the same format of `ingress.basicAuth` | -| ingress.path | string | `"/solr"` | | -| ingress.tls | list | `[]` | | -| ingress.whitelist_ips | string | `"0.0.0.0/0"` | Comma separated list of CIDR to restrict search endpoint access. | -| initContainer.image.pullPolicy | string | `"IfNotPresent"` | | -| initContainer.image.repository | string | `"busybox"` | | -| initContainer.image.tag | string | `"1.35.0"` | | -| initContainer.resources.limits.memory | string | `"10Mi"` | | -| initContainer.resources.requests.memory | string | `"5Mi"` | | -| insightEngineImage.internalPort | string | `nil` | container's port search service is listening on change if your custom image use a different port. | -| insightEngineImage.pullPolicy | string | `"IfNotPresent"` | | -| insightEngineImage.repository | string | `"quay.io/alfresco/insight-engine"` | | -| insightEngineImage.tag | string | `"2.0.7"` | | -| livenessProbe.initialDelaySeconds | int | `130` | | -| livenessProbe.periodSeconds | int | `20` | | -| livenessProbe.timeoutSeconds | int | `10` | | -| nodeSelector | object | `{}` | Define the alfresco-search properties to use in the k8s cluster This is the search provider used by alfresco-content-repository | -| persistence | object | `{"EbsPvConfiguration":{"fsType":"ext4"},"VolumeSizeRequest":"10Gi","enabled":true,"search":{"data":{"mountPath":"/opt/alfresco-search-services/data","subPath":"alfresco-content-services/solr-data"}}}` | Defines the persistence | -| persistence.VolumeSizeRequest | string | `"10Gi"` | Only define if you have a specific claim already created existingClaim: "search-master-claim" | -| persistence.enabled | bool | `true` | If set to false data will be lost with pods | -| podSecurityContext.fsGroup | int | `33007` | | -| podSecurityContext.runAsGroup | int | `33007` | | -| podSecurityContext.runAsNonRoot | bool | `true` | | -| podSecurityContext.runAsUser | int | `33007` | | -| readinessProbe.initialDelaySeconds | int | `60` | | -| readinessProbe.periodSeconds | int | `20` | | -| readinessProbe.timeoutSeconds | int | `10` | | -| repository.host | string | `nil` | ACS repository hostname | -| repository.port | string | `nil` | ACS repository port | -| resources.limits.cpu | string | `"4"` | | -| resources.limits.memory | string | `"2000Mi"` | | -| resources.requests.cpu | string | `"0.50"` | | -| resources.requests.memory | string | `"1200Mi"` | | -| searchServicesImage.internalPort | string | `nil` | container's port search service is listening on change if your custom image use a different port. | -| searchServicesImage.pullPolicy | string | `"IfNotPresent"` | | -| searchServicesImage.repository | string | `"quay.io/alfresco/search-services"` | | -| searchServicesImage.tag | string | `"2.0.7"` | | -| service.name | string | `"solr"` | | -| service.type | string | `"ClusterIP"` | | -| tolerations | string | `nil` | Define Tolerations for scheduling SOLR | -| type | string | `"search-services"` | set alfresco-insight-zeppelin.enabled=true As the Docker Image for Insight Engine is not publicly available the alfrescoRegistryPullSecrets has to be set More information can be found on https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/registry-authentication.md | diff --git a/alfresco-content-services/charts/alfresco-search-service/README.md.gotmpl b/alfresco-content-services/charts/alfresco-search-service/README.md.gotmpl deleted file mode 100644 index b301f39..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/README.md.gotmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/.helmignore b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/.helmignore deleted file mode 100644 index 721fe6a..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/.helmignore +++ /dev/null @@ -1,25 +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 -# Helm unit tests -tests -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/Chart.lock b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/Chart.lock deleted file mode 100644 index cb293e5..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.17.1 -digest: sha256:f5dd11ccf8726befd217545b84a48b02c49d68f03a75e4e102b971ad2e4f0fec -generated: "2022-10-05T16:55:42.662007+02:00" diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/Chart.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/Chart.yaml deleted file mode 100644 index 5662b18..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v2 -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.x.x -description: 'A helper subchart to avoid duplication in alfresco charts and set common - external dependencies ' -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -name: alfresco-common -type: library -version: 2.0.0 diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/README.md b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/README.md deleted file mode 100644 index 1df5281..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# alfresco-common - -![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) - -A helper subchart to avoid duplication in alfresco charts and set common -external dependencies - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ | common | 1.x.x | - diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/README.md.gotmpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/README.md.gotmpl deleted file mode 100644 index b301f39..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/README.md.gotmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/.helmignore b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/Chart.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/Chart.yaml deleted file mode 100644 index 39edbb3..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -annotations: - category: Infrastructure -apiVersion: v2 -appVersion: 1.17.1 -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.17.1 diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/README.md b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/README.md deleted file mode 100644 index a2ecd60..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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.dev/) for deployment and management of Helm Charts in clusters. - -## 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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_affinities.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_affinities.tpl deleted file mode 100644 index 2387be2..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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: - - {{ include "common.names.namespace" .context | 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: - - {{ include "common.names.namespace" .context | 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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_capabilities.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 9d9b760..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_errors.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_images.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_images.tpl deleted file mode 100644 index 42ffbc7..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_ingress.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_ingress.tpl deleted file mode 100644 index 8caf73a..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_labels.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_names.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_names.tpl deleted file mode 100644 index 1bdac8b..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_secrets.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_secrets.tpl deleted file mode 100644 index a53fb44..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_storage.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a84..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_tplvalues.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db1668..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_utils.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_utils.tpl deleted file mode 100644 index 8c22b2a..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_warnings.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa4..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec1..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a0..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_redis.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_validations.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/values.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/charts/common/values.yaml deleted file mode 100644 index f2df68e..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-activemq.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-activemq.tpl deleted file mode 100644 index 3ce7156..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-activemq.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{- define "activemq.env" -}} -- name: ACTIVEMQ_URL - value: $(BROKER_URL) -- name: ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} - -{{- define "spring.activemq.env" -}} -- name: SPRING_ACTIVEMQ_BROKERURL - value: $(BROKER_URL) -- name: SPRING_ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: SPRING_ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl deleted file mode 100644 index 1260536..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{- define "alfresco-content-services.imagePullSecrets" }} -{{- if .Values.global.alfrescoRegistryPullSecrets }} -imagePullSecrets: - - name: {{ .Values.global.alfrescoRegistryPullSecrets }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-persistence.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-persistence.tpl deleted file mode 100644 index d473d05..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-persistence.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{{- define "data_volume" -}} -- name: data -{{- $svc_name := .service.name }} -{{- with .persistence }} -{{- if .enabled }} -{{- $sc_name := .storageClass | default "default" }} - persistentVolumeClaim: - claimName: >- - {{ .existingClaim | default (printf "%s-%s-pvc" $svc_name $sc_name ) }} -{{- else }} - emptyDir: - sizeLimit: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end }} -{{- end -}} - -{{- define "component_pvc" -}} -{{ $svc_name := .service.name }} -{{- with .persistence }} -{{- $sc_name := .storageClass | default "default" -}} ---- -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ printf "%s-%s-pvc" $svc_name $sc_name }} -spec: - {{- if .storageClass }} - storageClassName: {{ .storageClass | quote }} - {{- end }} - {{- if .accessModes }} - accessModes: - {{- range .accessModes }} - - {{ . }} - {{- end }} - {{- end }} - volumeMode: {{ .volumeMode | default "Filesystem" }} - resources: - requests: - storage: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-search.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-search.tpl deleted file mode 100644 index 7f24d8b..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-search.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{/* -Get Alfresco Solr context -*/}} -{{- define "alfresco-search.baseurl" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - /solr -{{- else -}} - {{ index $.Values "alfresco-search" "external" "context" | default "/solr" -}} -{{- end -}} -{{- end -}} - -{{/* -Required Solr secret -*/}} -{{- define "tracking-shared-secret" -}} - {{- required "You need to provide a shared secret for Solr/repo authentication , see https://github.com/Alfresco/acs-deployment/tree/master/docs/helm" .Values.global.tracking.sharedsecret -}} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-security.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-security.tpl deleted file mode 100644 index 8829e4e..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers-security.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{- define "default-pod-security-context" }} - runAsNonRoot: true - runAsUser: 33099 - fsGroupChangePolicy: OnRootMismatch -{{- end }} - -{{- define "default-security-context" }} - runAsNonRoot: true - allowPrivilegeEscalation: false - capabilities: - drop: - - NET_RAW - - ALL -{{- end }} - -{{- define "component-pod-security-context" }} - securityContext: -{{- if .podSecurityContext }} - {{- .podSecurityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-pod-security-context" . }} -{{- end }} -{{- end }} - -{{- define "component-security-context" }} - securityContext: -{{- if .securityContext }} - {{- .securityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-security-context" . }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers.tpl deleted file mode 100644 index 7ae7d58..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/templates/_helpers.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{- define "content-services.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-cs") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "alfresco.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/values.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-common/values.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/Chart.lock b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/Chart.lock deleted file mode 100644 index c15cb89..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 2.0.0 -digest: sha256:04d458edc1a42ae7a4e4bc73d5872cc5cab9ef5960e5b6226af605a661bff71f -generated: "2023-03-09T11:31:57.561169+01:00" diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/Chart.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/Chart.yaml deleted file mode 100644 index 8596ebb..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v2 -appVersion: 2.0.6 -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 2.0.0 -description: A Helm chart for deploying Alfresco Insight Zeppelin -home: https://www.alfresco.com -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -keywords: -- zeppelin -- insight zeppelin -- alfresco zeppelin -- alfresco insight zeppelin -name: alfresco-insight-zeppelin -sources: -- https://github.com/Alfresco/alfresco-helm-charts -version: 2.0.0 diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/README.md b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/README.md deleted file mode 100644 index 324d3d5..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# alfresco-insight-zeppelin - -![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![AppVersion: 2.0.6](https://img.shields.io/badge/AppVersion-2.0.6-informational?style=flat-square) - -A Helm chart for deploying Alfresco Insight Zeppelin - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -**Homepage:** - -## Source Code - -* - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 2.0.0 | - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| environment.ZEPPELIN_INTP_MEM | string | `"-Xms512m -Xmx1g"` | | -| environment.ZEPPELIN_MEM | string | `"-Xms512m -Xmx1g"` | | -| global.alfrescoRegistryPullSecrets | string | `"quay-registry-secret"` | Global definition of Docker registry pull secret which can be overridden from parent ACS Helm chart(s) | -| global.strategy.rollingUpdate.maxSurge | int | `1` | | -| global.strategy.rollingUpdate.maxUnavailable | int | `0` | | -| image.internalPort | int | `9090` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"quay.io/alfresco/insight-zeppelin"` | | -| image.tag | string | `"2.0.6"` | | -| ingress.path | string | `"/zeppelin"` | | -| livenessProbe.initialDelaySeconds | int | `130` | | -| livenessProbe.periodSeconds | int | `20` | | -| livenessProbe.timeoutSeconds | int | `10` | | -| nodeSelector | object | `{}` | | -| podSecurityContext.runAsNonRoot | bool | `true` | | -| podSecurityContext.runAsUser | int | `33007` | | -| readinessProbe.initialDelaySeconds | int | `60` | | -| readinessProbe.periodSeconds | int | `20` | | -| readinessProbe.timeoutSeconds | int | `10` | | -| replicaCount | int | `1` | Define the alfresco-insight-zeppelin properties to use in the k8s cluster This is chart will be installed as part of Alfresco Insight Engine | -| repository | object | `{}` | The parent chart will set the values for "repository.host" and "repository.port" | -| resources.limits.cpu | string | `"1"` | | -| resources.limits.memory | string | `"1024Mi"` | | -| resources.requests.cpu | string | `"0.5"` | | -| resources.requests.memory | string | `"512Mi"` | | -| service.externalPort | int | `80` | | -| service.name | string | `"zeppelin"` | | -| service.type | string | `"ClusterIP"` | | diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/README.md.gotmpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/README.md.gotmpl deleted file mode 100644 index b301f39..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/README.md.gotmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/_helpers.tpl deleted file mode 100644 index afbaf81..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/_helpers.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{{/* -Get Alfresco Insight Zeppelin Full Name -*/}} -{{- define "alfresco-insight-zeppelin.fullName" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Get Alfresco Zeppelin Host -*/}} -{{- define "alfresco-insight-zeppelin.host" -}} -{{- printf "%s-%s" .Release.Name "alfresco-insight-zeppelin" -}} -{{- end -}} - -{{/* -Get Alfresco Repo Host -*/}} -{{- define "alfresco-repo-host" -}} -{{- .Values.repository.host | default (printf "%s-repository" (include "content-services.shortname" $)) }} -{{- end -}} - -{{/* -Get Alfresco Repo Port -*/}} -{{- define "alfresco-repo-port" -}} -{{- .Values.repository.port | default 80 }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/config.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/config.yaml deleted file mode 100644 index ef73c5d..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/config.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# Defines the config for the Alfresco Insight Zeppelin App -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "alfresco-insight-zeppelin.fullName" . }}-configmap - labels: - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - component: zeppelin -data: - REPO_HOST: "{{ template "alfresco-repo-host" . }}" - REPO_PORT: "{{ template "alfresco-repo-port" . }}" - {{- range $key, $value := .Values.environment }} - {{ $key }}: {{ $value }} - {{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/deployment.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/deployment.yaml deleted file mode 100644 index 952811c..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ ---- -# Defines the deployment for the Alfresco Insight Zeppelin App -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "alfresco-insight-zeppelin.fullName" . }} - labels: - app: {{ template "alfresco-insight-zeppelin.fullName" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: zeppelin -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "alfresco-insight-zeppelin.fullName" . }} - release: {{ .Release.Name }} - strategy: - type: RollingUpdate - rollingUpdate: {{- toYaml .Values.global.strategy.rollingUpdate | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }} - labels: - app: {{ template "alfresco-insight-zeppelin.fullName" . }} - release: {{ .Release.Name }} - spec: - {{- include "component-pod-security-context" .Values | indent 4 }} - {{- if .Values.nodeSelector }} - nodeSelector: {{- .Values.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - resources: {{- toYaml .Values.resources | nindent 12 }} - {{- include "component-security-context" .Values | indent 8 }} - envFrom: - - configMapRef: - name: {{ template "alfresco-insight-zeppelin.fullName" . }}-configmap - ports: - - containerPort: {{ .Values.image.internalPort }} - readinessProbe: - httpGet: - path: /zeppelin - port: {{ .Values.image.internalPort }} - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - livenessProbe: - httpGet: - path: /zeppelin - port: {{ .Values.image.internalPort }} - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/ingress.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/ingress.yaml deleted file mode 100644 index 48a7d6a..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/ingress.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- $serviceName := (include "alfresco-insight-zeppelin.fullName" .) -}} -{{- $servicePort := .Values.service.externalPort -}} -apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ template "alfresco-insight-zeppelin.fullName" . }} - annotations: - kubernetes.io/ingress.class: "nginx" -spec: - rules: - - http: - paths: - - path: {{ .Values.ingress.path }} - {{- if eq "true" (include "common.ingress.supportsPathType" .) }} - pathType: Prefix - {{- end }} - backend: {{- include "common.ingress.backend" (dict "serviceName" $serviceName "servicePort" $servicePort "context" $) | nindent 10 }} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/service.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/service.yaml deleted file mode 100644 index f69bc5b..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/templates/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# Defines the service for the Alfresco Insight Zeppelin App -apiVersion: v1 -kind: Service -metadata: - name: {{ template "alfresco-insight-zeppelin.fullName" . }} - labels: - app: {{ template "alfresco-insight-zeppelin.fullName" . }}-app - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.image.internalPort }} - name: {{ .Values.service.name }} - selector: - app: {{ template "alfresco-insight-zeppelin.fullName" . }} - release: {{ .Release.Name }} diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/config_test.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/config_test.yaml deleted file mode 100644 index cc6efd0..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/config_test.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -suite: test configmaps -templates: - - config.yaml -tests: - - it: should have default port and hosts - asserts: - - equal: - path: data.REPO_HOST - value: RELEASE-NAME-alfresco-cs-repository - template: config.yaml - - equal: - path: data.REPO_PORT - value: "80" - template: config.yaml - - - it: should have provided host and port - set: - repository: - host: somacshost - port: 888 - asserts: - - equal: - path: data.REPO_HOST - value: somacshost - template: config.yaml - - equal: - path: data.REPO_PORT - value: "888" - template: config.yaml diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/deployment_test.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/deployment_test.yaml deleted file mode 100644 index 61da5b9..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/tests/deployment_test.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -suite: test deployment -templates: - - deployment.yaml -tests: - - it: should have basic metadata in place - asserts: - - equal: - path: metadata.name - value: RELEASE-NAME-alfresco-insight-zeppelin - template: deployment.yaml - - - it: should render cpu and memory limits - asserts: - - equal: - path: spec.template.spec.containers[0].resources - value: - requests: - cpu: "0.5" - memory: "512Mi" - limits: - cpu: "1" - memory: "1024Mi" diff --git a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/values.yaml b/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/values.yaml deleted file mode 100644 index caceef5..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/charts/alfresco-insight-zeppelin/values.yaml +++ /dev/null @@ -1,52 +0,0 @@ -# Default values for alfresco-insight-zeppelin. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -# -- Define the alfresco-insight-zeppelin properties to use in the k8s cluster -# This is chart will be installed as part of Alfresco Insight Engine ---- -replicaCount: 1 -nodeSelector: {} -image: - repository: quay.io/alfresco/insight-zeppelin - tag: 2.0.6 - pullPolicy: IfNotPresent - internalPort: 9090 -podSecurityContext: - runAsUser: 33007 - runAsNonRoot: true -service: - name: zeppelin - type: ClusterIP - externalPort: 80 -ingress: - path: /zeppelin -# -- The parent chart will set the values for "repository.host" and -# "repository.port" -repository: {} -resources: - requests: - cpu: "0.5" - memory: "512Mi" - limits: - cpu: "1" - memory: "1024Mi" -readinessProbe: - initialDelaySeconds: 60 - periodSeconds: 20 - timeoutSeconds: 10 -livenessProbe: - initialDelaySeconds: 130 - periodSeconds: 20 - timeoutSeconds: 10 -environment: - ZEPPELIN_MEM: "-Xms512m -Xmx1g" - ZEPPELIN_INTP_MEM: "-Xms512m -Xmx1g" -global: - # -- Global definition of Docker registry pull secret which can be overridden - # from parent ACS Helm chart(s) - alfrescoRegistryPullSecrets: quay-registry-secret - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 diff --git a/alfresco-content-services/charts/alfresco-search-service/ci/default-values.yaml b/alfresco-content-services/charts/alfresco-search-service/ci/default-values.yaml deleted file mode 100644 index 33da59f..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/ci/default-values.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -alfresco-insight-zeppelin: - nameOverride: zeppelin - enabled: true -global: - tracking: - sharedsecret: dummy diff --git a/alfresco-content-services/charts/alfresco-search-service/templates/NOTES.txt b/alfresco-content-services/charts/alfresco-search-service/templates/NOTES.txt deleted file mode 100644 index eba650a..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/templates/NOTES.txt +++ /dev/null @@ -1,30 +0,0 @@ -{{- define "httpTransport" -}} -{{- if .Values.ingress.tls -}} - https -{{- else -}} - http -{{- end -}} -{{- end -}} - -{{- define "httpHost" -}} -{{- if .Values.ingress.tls -}} - {{- with (index .Values.ingress.tls 0) }} - {{- index .hosts 0 }} - {{- end }} -{{- else -}} - clusterhostname.domain.tld -{{- end -}} -{{- end -}} - -You can access Alfresco Search using: -{{- if .Values.ingress.enabled }} - * Solr: {{ template "httpTransport" . }}://{{ template "httpHost" . }}/{{ .Values.ingress.path | default "solr" }} - -{{- with (index .Values "alfresco-insight-zeppelin") }} -{{ if .enabled }} - * Zeppelin: {{ template "httpTransport" (dict "Values" .) }}://{{ template "httpHost" (dict "Values" .) }}/{{ .ingress.path | default "zeppelin" }} -{{ end }} -{{- end }} -{{- else }} - * Solr: http://{{ template "alfresco-search.fullName" . }}-solr:{{ template "alfresco-search.svcPort" . }}/solr -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-service/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-search-service/templates/_helpers.tpl deleted file mode 100644 index 85bee69..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/templates/_helpers.tpl +++ /dev/null @@ -1,69 +0,0 @@ -{{/* -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 "alfresco-search.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 }} - -{{/* -Alfresco Search Service Host -*/}} -{{- define "alfresco-search.host" -}} - {{ printf "%s-solr" (include "alfresco-search.fullName" .) }} -{{- end -}} - -{{/* -Get Alfresco Search container Port ("internal") -*/}} -{{- define "alfresco-search.containerPort" -}} -{{- if and (.Values.type) (eq (.Values.type | toString) "insight-engine") }} -{{- .Values.insightEngineImage.internalPort | default 8983 | int -}} -{{- else }} -{{- .Values.searchServicesImage.internalPort | default 8983 | int -}} -{{- end }} -{{- end -}} - -{{/* -Get Alfresco Search Service Port -*/}} -{{- define "alfresco-search.svcPort" -}} -{{- $defaultSvcPort := 80 }} -{{- if hasKey .Values "service" }} - {{- coalesce .Values.service.externalPort $defaultSvcPort | int }} -{{- else }} - {{- $defaultSvcPort | int }} -{{- end }} -{{- end -}} - -{{/* -Get Alfresco Search Pull Policy -*/}} -{{- define "alfresco-search.pullPolicy" -}} -{{- if and (.Values.type) (eq (.Values.type | toString) "insight-engine") }} -{{- print .Values.insightEngineImage.pullPolicy -}} -{{- else }} -{{- print .Values.searchServicesImage.pullPolicy -}} -{{- end }} -{{- end -}} - -{{/* -Get Alfresco Search Docker Image -*/}} -{{- define "alfresco-search.dockerImage" -}} -{{- if and (.Values.type) (eq (.Values.type | toString) "insight-engine") }} - {{- printf "%s:%s" .Values.insightEngineImage.repository .Values.insightEngineImage.tag }} -{{- else }} - {{- printf "%s:%s" .Values.searchServicesImage.repository .Values.searchServicesImage.tag }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-service/templates/config.yaml b/alfresco-content-services/charts/alfresco-search-service/templates/config.yaml deleted file mode 100644 index 9838c8b..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/templates/config.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Defines the properties required by the Alfresco Search (Solr) App -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "alfresco-search.fullName" . }}-solr-configmap - labels: - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - component: search -data: - SOLR_ALFRESCO_HOST: >- - {{ .Values.repository.host | default (printf "%s-repository" (include "content-services.shortname" $)) }} - SOLR_ALFRESCO_PORT: >- - {{ .Values.repository.port | default 80 }} - SOLR_SOLR_HOST: >- - {{ template "alfresco-search.fullName" . }}-solr - SOLR_SOLR_PORT: >- - {{ .Values.service.externalPort | default 80 }} - ALFRESCO_SECURE_COMMS: >- - {{ .Values.global.tracking.auth | default "secret" }} - {{- $environment := .Values.environment | default dict }} - {{- range $key, $val := $environment }} - {{ $key }}: {{ tpl $val $ | quote }} - {{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-service/templates/deployment.yaml b/alfresco-content-services/charts/alfresco-search-service/templates/deployment.yaml deleted file mode 100644 index 12ebef2..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/templates/deployment.yaml +++ /dev/null @@ -1,94 +0,0 @@ -# Defines the deployment for the Alfresco Search (Solr) App -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "alfresco-search.fullName" . }}-solr - labels: - app: {{ template "alfresco-search.fullName" . }}-solr - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: search -spec: - replicas: 1 - strategy: - type: Recreate - selector: - matchLabels: - app: {{ template "alfresco-search.fullName" . }}-solr - release: {{ .Release.Name }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }} - labels: - app: {{ template "alfresco-search.fullName" . }}-solr - release: {{ .Release.Name }} - spec: - {{- include "component-pod-security-context" .Values | indent 4 }} - {{- with .Values.affinity }} - affinity: -{{ tpl . $ | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.nodeSelector }} - nodeSelector: {{- .Values.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | nindent 6 }} - containers: - - name: {{ .Chart.Name }} - image: {{ template "alfresco-search.dockerImage" . }} - imagePullPolicy: {{ template "alfresco-search.pullPolicy" . }} - {{- include "component-security-context" .Values | indent 8 }} - envFrom: - - configMapRef: - name: {{ template "alfresco-search.fullName" . }}-solr-configmap - {{- if eq .Values.global.tracking.auth "secret" }} - - secretRef: - name: {{ template "alfresco-search.fullName" . }}-solr-jtoolopts - {{- end }} - ports: - - containerPort: {{ template "alfresco-search.containerPort" . }} - resources: {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.persistence.search.data.mountPath }} - subPath: {{ .Values.persistence.search.data.subPath }} - readinessProbe: - httpGet: - path: /solr/alfresco/admin/ping - port: {{ template "alfresco-search.containerPort" . }} - {{- if eq .Values.global.tracking.auth "secret" }} - httpHeaders: - - name: X-Alfresco-Search-Secret - value: "{{ .Values.global.tracking.sharedsecret }}" - {{- end }} - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - livenessProbe: - httpGet: - path: /solr/admin/info/system - port: {{ template "alfresco-search.containerPort" . }} - {{- if eq .Values.global.tracking.auth "secret" }} - httpHeaders: - - name: X-Alfresco-Search-Secret - value: "{{ .Values.global.tracking.sharedsecret }}" - {{- end }} - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - # sleep to drain any existing connections - lifecycle: - preStop: - exec: - command: ["/bin/bash", "-c", "sleep 10"] - volumes: - - name: data - persistentVolumeClaim: - claimName: |- - {{ .Values.persistence.existingClaim | default (printf "%s-solr-claim" (include "alfresco-search.fullName" .)) }} diff --git a/alfresco-content-services/charts/alfresco-search-service/templates/ingress.yaml b/alfresco-content-services/charts/alfresco-search-service/templates/ingress.yaml deleted file mode 100644 index 7d0a687..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/templates/ingress.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if .Values.ingress.enabled }} -{{- $serviceName := printf "%s-%s" (include "alfresco-search.fullName" .) "solr" -}} -{{- $servicePort := .Values.service.name | default (include "alfresco-search.svcPort" .) -}} -{{- $backendSvc := dict "serviceName" $serviceName "servicePort" $servicePort "context" $ -}} - -apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ template "alfresco-search.fullName" . }}-solr - annotations: - kubernetes.io/ingress.class: "nginx" - nginx.ingress.kubernetes.io/auth-type: basic - nginx.ingress.kubernetes.io/auth-secret: {{ $.Values.ingress.existingSecretName | default (printf "%s-ingress-secret" (include "alfresco-search.fullName" $)) }} - nginx.ingress.kubernetes.io/auth-realm: "Authentication Required - Alfresco Search Services" - nginx.ingress.kubernetes.io/whitelist-source-range: {{ .Values.ingress.whitelist_ips }} - -spec: - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - - http: - paths: - - path: {{ .Values.ingress.path }} - {{- if eq "true" (include "common.ingress.supportsPathType" .) }} - pathType: Prefix - {{- end }} - backend: {{- include "common.ingress.backend" $backendSvc | nindent 10 }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-service/templates/pvc.yaml b/alfresco-content-services/charts/alfresco-search-service/templates/pvc.yaml deleted file mode 100644 index 7968eb4..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/templates/pvc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if .Values.persistence.enabled -}} -{{- if .Values.persistence.EbsPvConfiguration.volumeID }} -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "alfresco-search.fullName" . }}-solr-pv - labels: - app: {{ template "alfresco-search.fullName" . }}-solr - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: search -spec: - capacity: - storage: {{ .Values.persistence.VolumeSizeRequest }} - storageClassName: {{ template "alfresco-search.fullName" . }}-solr-sc - accessModes: - - "ReadWriteOnce" - {{- with .Values.PvNodeAffinity }} - nodeAffinity: -{{ toYaml . | indent 4 }} - {{- end }} - {{- with .Values.persistence.EbsPvConfiguration }} - awsElasticBlockStore: -{{ toYaml . | indent 4 }} - {{- end }} ---- -{{- end }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "alfresco-search.fullName" . }}-solr-claim - labels: - app: {{ template "alfresco-search.fullName" . }}-solr - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: search -spec: - accessModes: - - ReadWriteOnce - volumeMode: Filesystem - resources: - requests: - storage: {{ .Values.persistence.VolumeSizeRequest }} - {{- if .Values.persistence.EbsPvConfiguration.volumeID }} - storageClassName: {{ template "alfresco-search.fullName" . }}-solr-sc - {{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-search-service/templates/secret-ingress.yaml b/alfresco-content-services/charts/alfresco-search-service/templates/secret-ingress.yaml deleted file mode 100644 index bda7480..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/templates/secret-ingress.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if and (not .Values.ingress.existingSecretName) .Values.ingress.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "alfresco-search.fullName" . }}-ingress-secret - labels: - app: {{ template "alfresco-search.fullName" . }}-solr - release: {{ .Release.Name }} -type: Opaque -data: - auth: {{ .Values.ingress.basicAuth | quote }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-service/templates/secret-solr-jtoolopt.yaml b/alfresco-content-services/charts/alfresco-search-service/templates/secret-solr-jtoolopt.yaml deleted file mode 100644 index f77a3de..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/templates/secret-solr-jtoolopt.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if eq .Values.global.tracking.auth "secret" }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "alfresco-search.fullName" . }}-solr-jtoolopts - labels: - app: {{ template "alfresco-search.fullName" . }}-solr - release: {{ .Release.Name }} -type: Opaque -data: - JAVA_TOOL_OPTIONS: {{ printf "-Dalfresco.secureComms.secret=%s " (include "tracking-shared-secret" .) | b64enc | quote }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-search-service/templates/service.yaml b/alfresco-content-services/charts/alfresco-search-service/templates/service.yaml deleted file mode 100644 index 1eaedfd..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Defines the service for the Alfresco Search (Solr) App -apiVersion: v1 -kind: Service -metadata: - name: {{ template "alfresco-search.fullName" . }}-solr - labels: - app: {{ template "alfresco-search.fullName" . }}-solr - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ template "alfresco-search.svcPort" . }} - targetPort: {{ template "alfresco-search.containerPort" . }} - name: {{ .Values.service.name }} - selector: - app: {{ template "alfresco-search.fullName" . }}-solr - release: {{ .Release.Name }} diff --git a/alfresco-content-services/charts/alfresco-search-service/tests/config_test.yaml b/alfresco-content-services/charts/alfresco-search-service/tests/config_test.yaml deleted file mode 100644 index 1cb4360..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/tests/config_test.yaml +++ /dev/null @@ -1,58 +0,0 @@ ---- -suite: test search configmap -templates: - - config.yaml -tests: - - it: should contains default env vars - values: &testvalues - - values/test_values.yaml - asserts: - - equal: - path: data.SOLR_ALFRESCO_HOST - value: RELEASE-NAME-alfresco-cs-repository - - equal: - path: data.SOLR_ALFRESCO_PORT - value: "80" - - equal: - path: data.SOLR_SOLR_HOST - value: RELEASE-NAME-alfresco-search-service-solr - - equal: - path: data.SOLR_SOLR_PORT - value: "80" - - equal: - path: data.ALFRESCO_SECURE_COMMS - value: secret - - equal: - path: data.SOLR_CREATE_ALFRESCO_DEFAULTS - value: alfresco,archive - - - it: should contains customized env vars - values: *testvalues - set: - repository: - host: somehost - port: 8888 - environment: - whatever: value - asserts: - - equal: - path: data.SOLR_ALFRESCO_HOST - value: somehost - - equal: - path: data.SOLR_ALFRESCO_PORT - value: "8888" - - equal: - path: data.SOLR_SOLR_HOST - value: RELEASE-NAME-alfresco-search-service-solr - - equal: - path: data.SOLR_SOLR_PORT - value: "80" - - equal: - path: data.ALFRESCO_SECURE_COMMS - value: secret - - equal: - path: data.SOLR_CREATE_ALFRESCO_DEFAULTS - value: alfresco,archive - - equal: - path: data.whatever - value: value diff --git a/alfresco-content-services/charts/alfresco-search-service/tests/deployment_test.yaml b/alfresco-content-services/charts/alfresco-search-service/tests/deployment_test.yaml deleted file mode 100644 index 5ece41e..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/tests/deployment_test.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -suite: test solr deployment -templates: - - deployment.yaml - - config.yaml -tests: - - it: should have basic metadata in place - values: &testvalues - - values/test_values.yaml - asserts: - - equal: - path: metadata.name - value: RELEASE-NAME-alfresco-search-service-solr - template: deployment.yaml - - - it: should render cpu and memory limits - values: *testvalues - asserts: - - equal: - path: spec.template.spec.containers[0].resources - value: - requests: - cpu: "0.50" - memory: "1200Mi" - limits: - cpu: "4" - memory: "2000Mi" - template: deployment.yaml diff --git a/alfresco-content-services/charts/alfresco-search-service/tests/ingress_test.yaml b/alfresco-content-services/charts/alfresco-search-service/tests/ingress_test.yaml deleted file mode 100644 index 95f5a99..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/tests/ingress_test.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -suite: test ingress -templates: - - ingress.yaml -tests: - - it: should have basic metadata in place - values: &testvalues - - values/test_values.yaml - - values/ingress.yaml - asserts: - - equal: - path: metadata.name - value: RELEASE-NAME-alfresco-search-service-solr - template: ingress.yaml - - - it: should reference the default secret with default values - values: *testvalues - asserts: - - equal: - path: metadata.annotations.nginx\.ingress\.kubernetes\.io/auth-secret - value: RELEASE-NAME-alfresco-search-service-ingress-secret - template: ingress.yaml - - - it: should reference the existing secret when ingress.existingSecretName is set - values: *testvalues - set: - ingress: - existingSecretName: my-custom-ingress-secret - asserts: - - equal: - path: metadata.annotations.nginx\.ingress\.kubernetes\.io/auth-secret - value: my-custom-ingress-secret - template: ingress.yaml diff --git a/alfresco-content-services/charts/alfresco-search-service/tests/resources_test.yaml b/alfresco-content-services/charts/alfresco-search-service/tests/resources_test.yaml deleted file mode 100644 index 4e530de..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/tests/resources_test.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -suite: test resource management -templates: - - deployment.yaml - - config.yaml -tests: - - it: should render cpu and memory limits - set: - resources: - requests: - cpu: "1" - memory: "1500Mi" - limits: - cpu: "4" - memory: "3000Mi" - asserts: - - equal: - path: spec.template.spec.containers[0].resources - value: - requests: - cpu: "1" - memory: "1500Mi" - limits: - cpu: "4" - memory: "3000Mi" - template: deployment.yaml diff --git a/alfresco-content-services/charts/alfresco-search-service/tests/secret-ingress_test.yaml b/alfresco-content-services/charts/alfresco-search-service/tests/secret-ingress_test.yaml deleted file mode 100644 index e4ddb06..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/tests/secret-ingress_test.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -suite: test solr ingress secret -templates: - - secret-ingress.yaml -tests: - - it: should have credentials in the ingress secret - values: &testvalues - - values/test_values.yaml - - values/ingress.yaml - asserts: - - equal: - path: data.auth - value: YWRtaW46JGFwcjEkVVJqb29uS00kSEMuS1EwVkRScFpwSHB2a3JwTDd1Lg== - template: secret-ingress.yaml - - - it: should not render ingress secret when ingress is disabled - values: *testvalues - set: - ingress: - enabled: false - asserts: - - hasDocuments: - count: 0 - template: secret-ingress.yaml - - - it: should not render ingress secret when and existing secret name is set - values: *testvalues - set: - ingress: - existingSecretName: my-custom-secret - asserts: - - hasDocuments: - count: 0 - template: secret-ingress.yaml diff --git a/alfresco-content-services/charts/alfresco-search-service/tests/secret-solr-jtoolopt_test.yaml b/alfresco-content-services/charts/alfresco-search-service/tests/secret-solr-jtoolopt_test.yaml deleted file mode 100644 index afa188f..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/tests/secret-solr-jtoolopt_test.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -suite: test solr java_tool_options secret -templates: - - secret-solr-jtoolopt.yaml -tests: - - it: should have credentials in the ingress secret - values: &testvalues - - values/test_values.yaml - asserts: - - equal: - path: data.JAVA_TOOL_OPTIONS - value: LURhbGZyZXNjby5zZWN1cmVDb21tcy5zZWNyZXQ9ZHVtbXkg - template: secret-solr-jtoolopt.yaml - - - it: should not render ingress secret when ingress is disabled - values: *testvalues - set: - global.tracking.auth: none - asserts: - - hasDocuments: - count: 0 - template: secret-solr-jtoolopt.yaml diff --git a/alfresco-content-services/charts/alfresco-search-service/tests/values/ingress.yaml b/alfresco-content-services/charts/alfresco-search-service/tests/values/ingress.yaml deleted file mode 100644 index b64f5f5..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/tests/values/ingress.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -ingress: - enabled: true - basicAuth: YWRtaW46JGFwcjEkVVJqb29uS00kSEMuS1EwVkRScFpwSHB2a3JwTDd1Lg== diff --git a/alfresco-content-services/charts/alfresco-search-service/tests/values/test_values.yaml b/alfresco-content-services/charts/alfresco-search-service/tests/values/test_values.yaml deleted file mode 100644 index 6968a5a..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/tests/values/test_values.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -global: - tracking: - sharedsecret: dummy - alfrescoRegistryPullSecrets: secretsecret diff --git a/alfresco-content-services/charts/alfresco-search-service/values.yaml b/alfresco-content-services/charts/alfresco-search-service/values.yaml deleted file mode 100644 index 5312d0e..0000000 --- a/alfresco-content-services/charts/alfresco-search-service/values.yaml +++ /dev/null @@ -1,146 +0,0 @@ ---- -# -- Define the alfresco-search properties to use in the k8s cluster -# This is the search provider used by alfresco-content-repository -nodeSelector: {} -# -- Define the type of Alfresco Search to use. The default is Alfresco Search -# Services. -# The type can be set to use Insight Engine with -# --set alfresco-search.type=insight-engine -# --set alfresco-search.global.alfrescoRegistryPullSecrets=quay-registry-secret -# --set alfresco-insight-zeppelin.enabled=true -# As the Docker Image for Insight Engine is not publicly available the -# alfrescoRegistryPullSecrets has to be set -# More information can be found on -# https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/registry-authentication.md -type: search-services -podSecurityContext: - runAsNonRoot: true - runAsUser: 33007 - runAsGroup: 33007 - fsGroup: 33007 -searchServicesImage: - repository: quay.io/alfresco/search-services - tag: 2.0.7 - pullPolicy: &searchDockerImagePullPolicy IfNotPresent - # -- container's port search service is listening on - # change if your custom image use a different port. - internalPort: -insightEngineImage: - repository: quay.io/alfresco/insight-engine - tag: 2.0.7 - pullPolicy: *searchDockerImagePullPolicy - # -- container's port search service is listening on - # change if your custom image use a different port. - internalPort: -service: - name: solr - type: ClusterIP - # -- Should you want to change the service port - # externalPort: 80 -ingress: - # -- Expose the solr admin console behind basic auth - enabled: false - path: /solr - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - - # -- Default solr basic auth user/password: admin / admin - # You can create your own with htpasswd utilility & encode it with base640. - # Example: `echo -n "$(htpasswd -nbm admin admin)" | base64 | tr -d '\n'` - # basicAuth: YWRtaW46JGFwcjEkVVJqb29uS00kSEMuS1EwVkRScFpwSHB2a3JwTDd1Lg== - basicAuth: - # -- An existing secret that contains an `auth` key with a value in the same - # format of `ingress.basicAuth` - existingSecretName: - # -- Comma separated list of CIDR to restrict search endpoint access. - whitelist_ips: 0.0.0.0/0 -# Below values must be set by parent chart -repository: - # -- ACS repository hostname - host: - # -- ACS repository port - port: -environment: - SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco,archive -resources: - requests: - cpu: "0.50" - memory: "1200Mi" - limits: - cpu: "4" - memory: "2000Mi" -# -- Defines the persistence -persistence: - # -- If set to false data will be lost with pods - enabled: true - # -- Only define if you have a specific claim already created - # existingClaim: "search-master-claim" - VolumeSizeRequest: 10Gi - search: - data: - mountPath: "/opt/alfresco-search-services/data" - subPath: "alfresco-content-services/solr-data" - EbsPvConfiguration: - fsType: ext4 -alfresco-insight-zeppelin: - enabled: false -readinessProbe: - initialDelaySeconds: 60 - periodSeconds: 20 - timeoutSeconds: 10 -livenessProbe: - initialDelaySeconds: 130 - periodSeconds: 20 - timeoutSeconds: 10 - -initContainer: - image: - repository: busybox - tag: 1.35.0 - pullPolicy: IfNotPresent - resources: - requests: - memory: "5Mi" - limits: - memory: "10Mi" - -global: - tracking: - # -- Select how solr and repo authenticate to each other - # none: work only prior to acs 7.2 (and was the default) - # secret: use a shared secret (to specify using `tracking.sharedsecret`) - # https: to use mTLS auth (require appropriate certificate configuration) - auth: secret - # -- Shared secret to authenticate repo/solr traffic - sharedsecret: null - alfrescoRegistryPullSecrets: quay-registry-secret - -# -- Define Affinity for scheduling SOLR -affinity: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: "SolrMasterOnly" -# operator: In -# values: -# - "true" - -# -- Define Tolerations for scheduling SOLR -tolerations: -# - key: "SolrMasterOnly" -# operator: "Equal" -# value: "true" -# effect: "NoSchedule" - -# -- Define PVNodeAffinity for scheduling SOLR -PvNodeAffinity: -# required: -# nodeSelectorTerms: -# - matchExpressions: -# - key: "SolrMasterOnly" -# operator: In -# values: -# - "true" diff --git a/alfresco-content-services/charts/alfresco-sync-service/Chart.lock b/alfresco-content-services/charts/alfresco-sync-service/Chart.lock deleted file mode 100644 index ffc7082..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/Chart.lock +++ /dev/null @@ -1,15 +0,0 @@ -dependencies: -- name: common - repository: oci://registry-1.docker.io/bitnamicharts - version: 2.4.0 -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 2.0.0 -- name: activemq - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 3.1.0 -- name: postgresql - repository: oci://registry-1.docker.io/bitnamicharts - version: 12.5.6 -digest: sha256:e39405a7071d52fabbfb5c13dadabdd196cdfec40637bc26fd2444700c67d7e5 -generated: "2023-06-01T10:44:55.970183+02:00" diff --git a/alfresco-content-services/charts/alfresco-sync-service/Chart.yaml b/alfresco-content-services/charts/alfresco-sync-service/Chart.yaml deleted file mode 100644 index db0a319..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: v2 -appVersion: 3.9.0 -dependencies: -- name: common - repository: oci://registry-1.docker.io/bitnamicharts - version: 2.x.x -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 2.0.0 -- condition: activemq.enabled - name: activemq - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 3.1.0 -- condition: postgresql.enabled - name: postgresql - repository: oci://registry-1.docker.io/bitnamicharts - version: 12.x.x -description: Alfresco Sync Service -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -keywords: -- syncservice -- alfresco -- application -name: alfresco-sync-service -sources: -- https://github.com/Alfresco/acs-deployment -version: 4.1.0 diff --git a/alfresco-content-services/charts/alfresco-sync-service/README.md b/alfresco-content-services/charts/alfresco-sync-service/README.md deleted file mode 100644 index 8896a14..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# alfresco-sync-service - -![Version: 4.1.0](https://img.shields.io/badge/Version-4.1.0-informational?style=flat-square) ![AppVersion: 3.9.0](https://img.shields.io/badge/AppVersion-3.9.0-informational?style=flat-square) - -Alfresco Sync Service - -## Source Code - -* - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://alfresco.github.io/alfresco-helm-charts/ | activemq | 3.1.0 | -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 2.0.0 | -| oci://registry-1.docker.io/bitnamicharts | common | 2.x.x | -| oci://registry-1.docker.io/bitnamicharts | postgresql | 12.x.x | - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| activemq.adminUser.password | string | `"admin"` | Password to use to set as the connection user for ActiveMQ | -| activemq.adminUser.user | string | `"admin"` | User to use to set as the connection user for ActiveMQ | -| activemq.enabled | bool | `false` | Toggle ActiveMQ chart dependency see [Alfresco ActiveMQ chart documentation](https://github.com/Alfresco/alfresco-helm-charts/tree/main/charts/activemq)) | -| activemq.nameOverride | string | `"activemq"` | | -| activemq.services.broker.ports.external.openwire | int | `61616` | | -| database.driver | string | `"org.postgresql.Driver"` | The JDBC Driver to connect to the DB. If different from the default make sure your container image ships it. | -| database.existingSecretName | string | `nil` | An existing kubernetes secret with DB info (prefered over using values) | -| database.password | string | `"admin"` | JDBC password to use to connect to the DB | -| database.url | string | `nil` | JDBC url to connect to the external DB | -| database.user | string | `"alfresco"` | JDBC username to use to connect to the DB | -| environment.EXTRA_JAVA_OPTS | string | `""` | | -| environment.JAVA_OPTS | string | `"-Dsync.metrics.reporter.graphite.enabled=false -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | -| global | object | `{"alfrescoRegistryPullSecrets":"quay-registry-secret","messageBroker":{"password":null,"url":null,"user":null},"strategy":{"rollingUpdate":{"maxSurge":1,"maxUnavailable":0}}}` | Global definition of Docker registry pull secret which can be overridden from parent ACS Helm chart(s) | -| global.messageBroker.password | string | `nil` | Credential to use to authenticate to the broker. | -| global.messageBroker.url | string | `nil` | A failover URI formatted string, see: https://activemq.apache.org/failover-transport-reference | -| global.messageBroker.user | string | `nil` | Username to authenticate as. | -| image.internalPort | int | `9090` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"quay.io/alfresco/service-sync"` | | -| image.tag | string | `"3.9.0"` | | -| ingress.extraAnnotations | string | `nil` | useful when running Sync service without SSL termination done by a load balancer, e.g. when ran on Minikube for testing purposes nginx.ingress.kubernetes.io/ssl-redirect: "false" | -| ingress.path | string | `"/syncservice"` | | -| ingress.tls | list | `[]` | | -| livenessProbe.initialDelaySeconds | int | `30` | | -| livenessProbe.periodSeconds | int | `30` | | -| livenessProbe.timeoutSeconds | int | `10` | | -| messageBroker.existingSecretName | string | `nil` | An existing k8s secret with broker details (prefered over using values) | -| messageBroker.nameOverride | string | `"activemq"` | A name that will be used as a base to get broker conenction details | -| messageBroker.password | string | `nil` | Credential to use to authenticate to the broker. | -| messageBroker.url | string | `nil` | A failover URI formatted string, see: https://activemq.apache.org/failover-transport-reference | -| messageBroker.user | string | `nil` | Username to authenticate as. | -| nodeSelector | object | `{}` | | -| podSecurityContext.fsGroup | int | `1000` | | -| podSecurityContext.runAsGroup | int | `1000` | | -| podSecurityContext.runAsNonRoot | bool | `true` | | -| podSecurityContext.runAsUser | int | `33020` | | -| postgresql | object | `{"auth":{"database":"alfrescosync","enablePostgresUser":false,"password":"admin","username":"alfresco"},"enabled":false,"nameOverride":"postgresql-syncservice","primary":{"extendedConfiguration":"shared_buffers = 256MB\nmax_connections = 100\nwal_level = minimal\nmax_wal_senders = 0\nmax_replication_slots = 0\neffective_cache_size = 1024GB\nlog_min_messages = LOG\n"},"resources":{"limits":{"cpu":"2","memory":"2Gi"}}}` | Defines properties required by sync service for connecting to the database If you set database.external to true you will have to setup the JDBC driver, user, password and JdbcUrl as `driver`, `user`, `password` & `url` subelements of `database`. Also make sure that the container has the db driver | -| postgresql.enabled | bool | `false` | Toggle PostgreSQL chart dependency see [PostgreSQL Bitnami charts documentation](https://github.com/bitnami/charts/tree/main/bitnami/postgresql)) | -| readinessProbe.failureThreshold | int | `12` | | -| readinessProbe.initialDelaySeconds | int | `20` | | -| readinessProbe.periodSeconds | int | `10` | | -| readinessProbe.timeoutSeconds | int | `10` | | -| replicaCount | int | `1` | | -| repository.host | string | `"alfresco-cs-repository"` | ACS repository host | -| repository.nameOverride | string | `nil` | A nameOverride use to compute an ACS repository service name | -| repository.port | int | `80` | ACS repository port | -| resources.limits.cpu | string | `"2"` | | -| resources.limits.memory | string | `"2000Mi"` | | -| resources.requests.cpu | string | `"0.5"` | | -| resources.requests.memory | string | `"800Mi"` | | -| service.externalPort | int | `80` | | -| service.name | string | `"syncservice"` | | -| service.type | string | `"NodePort"` | | - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. diff --git a/alfresco-content-services/charts/alfresco-sync-service/README.md.gotmpl b/alfresco-content-services/charts/alfresco-sync-service/README.md.gotmpl deleted file mode 100644 index 1fdf7d3..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/README.md.gotmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/.helmignore b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/.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 -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/Chart.lock b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/Chart.lock deleted file mode 100644 index 9e001a0..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 1.0.0 -digest: sha256:094ae734b29e6e4735e4b6c3ad786305217cb375570a6a8518395c92f61c23bf -generated: "2023-02-14T14:53:39.031589+01:00" diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/Chart.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/Chart.yaml deleted file mode 100644 index dc267f8..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/Chart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v2 -appVersion: 5.17.4 -dependencies: -- name: alfresco-common - repository: https://alfresco.github.io/alfresco-helm-charts/ - version: 1.0.0 -description: A Helm chart providing a basic Apache ActiveMQ deployment required to - evaluate ACS (not meant to be used in production). -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -keywords: -- activemq -- message broker -name: activemq -sources: -- https://github.com/Alfresco/alfresco-helm-charts -version: 3.1.0 diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/README.md b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/README.md deleted file mode 100644 index df28d15..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# activemq - -![Version: 3.1.0](https://img.shields.io/badge/Version-3.1.0-informational?style=flat-square) ![AppVersion: 5.17.4](https://img.shields.io/badge/AppVersion-5.17.4-informational?style=flat-square) - -A Helm chart providing a basic Apache ActiveMQ deployment required to evaluate ACS (not meant to be used in production). - -## Source Code - -* - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 1.0.0 | - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| adminUser.existingSecretName | string | `nil` | An existing kubernetes secret that contains BROKER_USERNAME and BROKER_PASSWORD keys to override the default user credentials | -| adminUser.password | string | `"admin"` | Password for the default user with administrative privileges | -| adminUser.user | string | `"admin"` | Username for the default user with administrative privileges | -| enabled | bool | `true` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"alfresco/alfresco-activemq"` | | -| image.tag | string | `"5.17.4-jre17-rockylinux8"` | | -| livenessProbe.failureThreshold | int | `6` | | -| livenessProbe.initialDelaySeconds | int | `60` | | -| livenessProbe.periodSeconds | int | `10` | | -| livenessProbe.timeoutSeconds | int | `1` | | -| nodeSelector | object | `{}` | | -| persistence.accessModes | list | `["ReadWriteOnce"]` | defines type of access required by the persistent volume [Access_Modes] (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) | -| persistence.baseSize | string | `"20Gi"` | | -| persistence.data.mountPath | string | `"/opt/activemq/data"` | | -| persistence.data.subPath | string | `"alfresco-infrastructure/activemq-data"` | | -| persistence.enabled | bool | `true` | | -| persistence.existingClaim | string | `nil` | | -| persistence.storageClass | string | `nil` | | -| podSecurityContext.fsGroup | int | `1000` | | -| podSecurityContext.runAsGroup | int | `1000` | | -| podSecurityContext.runAsUser | int | `33031` | | -| readinessProbe.failureThreshold | int | `6` | | -| readinessProbe.initialDelaySeconds | int | `5` | | -| readinessProbe.periodSeconds | int | `10` | | -| readinessProbe.timeoutSeconds | int | `1` | | -| replicaCount | int | `1` | | -| resources.limits.cpu | string | `"2"` | | -| resources.limits.memory | string | `"2048Mi"` | | -| resources.requests.cpu | string | `"0.25"` | | -| resources.requests.memory | string | `"512Mi"` | | -| service.name | string | `"activemq"` | | -| services.broker.ports.external.amqp | int | `5672` | | -| services.broker.ports.external.openwire | int | `61616` | | -| services.broker.ports.external.stomp | int | `61613` | | -| services.broker.ports.internal.amqp | int | `5672` | | -| services.broker.ports.internal.openwire | int | `61616` | | -| services.broker.ports.internal.stomp | int | `61613` | | -| services.broker.type | string | `"ClusterIP"` | | -| services.webConsole.ports.external.webConsole | int | `8161` | | -| services.webConsole.ports.internal.webConsole | int | `8161` | | -| services.webConsole.type | string | `"NodePort"` | | diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/README.md.gotmpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/README.md.gotmpl deleted file mode 100644 index 9174c35..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/README.md.gotmpl +++ /dev/null @@ -1,16 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/.helmignore b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/.helmignore deleted file mode 100644 index 721fe6a..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/.helmignore +++ /dev/null @@ -1,25 +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 -# Helm unit tests -tests -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/Chart.lock b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/Chart.lock deleted file mode 100644 index cb293e5..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.17.1 -digest: sha256:f5dd11ccf8726befd217545b84a48b02c49d68f03a75e4e102b971ad2e4f0fec -generated: "2022-10-05T16:55:42.662007+02:00" diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/Chart.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/Chart.yaml deleted file mode 100644 index d6ec576..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v2 -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.x.x -description: 'A helper subchart to avoid duplication in alfresco charts and set common - external dependencies ' -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -name: alfresco-common -type: library -version: 1.0.0 diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/README.md b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/README.md deleted file mode 100644 index 2da4e8f..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# alfresco-common - -![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) - -A helper subchart to avoid duplication in alfresco charts and set common -external dependencies - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ | common | 1.x.x | - diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/README.md.gotmpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/README.md.gotmpl deleted file mode 100644 index b301f39..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/README.md.gotmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/.helmignore b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml deleted file mode 100644 index 39edbb3..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -annotations: - category: Infrastructure -apiVersion: v2 -appVersion: 1.17.1 -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.17.1 diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/README.md b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/README.md deleted file mode 100644 index a2ecd60..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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.dev/) for deployment and management of Helm Charts in clusters. - -## 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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_affinities.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_affinities.tpl deleted file mode 100644 index 2387be2..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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: - - {{ include "common.names.namespace" .context | 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: - - {{ include "common.names.namespace" .context | 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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_capabilities.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 9d9b760..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_errors.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_images.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_images.tpl deleted file mode 100644 index 42ffbc7..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_ingress.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_ingress.tpl deleted file mode 100644 index 8caf73a..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_labels.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_names.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_names.tpl deleted file mode 100644 index 1bdac8b..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_secrets.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_secrets.tpl deleted file mode 100644 index a53fb44..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_storage.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a84..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_tplvalues.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db1668..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_utils.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_utils.tpl deleted file mode 100644 index 8c22b2a..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_warnings.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa4..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec1..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a0..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_redis.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_validations.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/values.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/charts/common/values.yaml deleted file mode 100644 index f2df68e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl deleted file mode 100644 index 518e8cd..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-activemq.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{{/* -Create a default fully qualified name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "activemq.fullname" -}} -{{- printf "%s-activemq" .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "activemq.env" -}} -- name: ACTIVEMQ_URL - value: $(BROKER_URL) -- name: ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} - -{{- define "spring.activemq.env" -}} -- name: SPRING_ACTIVEMQ_BROKERURL - value: $(BROKER_URL) -- name: SPRING_ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: SPRING_ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl deleted file mode 100644 index 1260536..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{- define "alfresco-content-services.imagePullSecrets" }} -{{- if .Values.global.alfrescoRegistryPullSecrets }} -imagePullSecrets: - - name: {{ .Values.global.alfrescoRegistryPullSecrets }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl deleted file mode 100644 index d473d05..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-persistence.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{{- define "data_volume" -}} -- name: data -{{- $svc_name := .service.name }} -{{- with .persistence }} -{{- if .enabled }} -{{- $sc_name := .storageClass | default "default" }} - persistentVolumeClaim: - claimName: >- - {{ .existingClaim | default (printf "%s-%s-pvc" $svc_name $sc_name ) }} -{{- else }} - emptyDir: - sizeLimit: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end }} -{{- end -}} - -{{- define "component_pvc" -}} -{{ $svc_name := .service.name }} -{{- with .persistence }} -{{- $sc_name := .storageClass | default "default" -}} ---- -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ printf "%s-%s-pvc" $svc_name $sc_name }} -spec: - {{- if .storageClass }} - storageClassName: {{ .storageClass | quote }} - {{- end }} - {{- if .accessModes }} - accessModes: - {{- range .accessModes }} - - {{ . }} - {{- end }} - {{- end }} - volumeMode: {{ .volumeMode | default "Filesystem" }} - resources: - requests: - storage: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl deleted file mode 100644 index 8736769..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-search.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{{/* -Create a default fully qualified name. -*/}} -{{- define "alfresco-search.fullName" -}} -{{- printf "%s-alfresco-search" .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Alfresco Search2 Host -*/}} -{{- define "alfresco-search.host" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - {{ printf "%s-solr" (include "alfresco-search.fullName" .) -}} -{{- else -}} - {{ index $.Values "alfresco-search" "external" "host" | default "localhost" -}} -{{- end -}} -{{- end -}} - -{{/* -Get Alfresco Search Port -*/}} -{{- define "alfresco-search.port" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - {{ print (index .Values "alfresco-search" "service" "externalPort") -}} -{{- else -}} - {{ index $.Values "alfresco-search" "external" "port" | default "8983" -}} -{{- end -}} -{{- end -}} - -{{/* -Get Alfresco Solr context -*/}} -{{- define "alfresco-search.baseurl" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - /solr -{{- else -}} - {{ index $.Values "alfresco-search" "external" "context" | default "/solr" -}} -{{- end -}} -{{- end -}} - -{{/* -Required Solr secret -*/}} -{{- define "tracking-shared-secret" -}} - {{- required "You need to provide a shared secret for Solr/repo authentication , see https://github.com/Alfresco/acs-deployment/tree/master/docs/helm" .Values.global.tracking.sharedsecret -}} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl deleted file mode 100644 index 8829e4e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers-security.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{- define "default-pod-security-context" }} - runAsNonRoot: true - runAsUser: 33099 - fsGroupChangePolicy: OnRootMismatch -{{- end }} - -{{- define "default-security-context" }} - runAsNonRoot: true - allowPrivilegeEscalation: false - capabilities: - drop: - - NET_RAW - - ALL -{{- end }} - -{{- define "component-pod-security-context" }} - securityContext: -{{- if .podSecurityContext }} - {{- .podSecurityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-pod-security-context" . }} -{{- end }} -{{- end }} - -{{- define "component-security-context" }} - securityContext: -{{- if .securityContext }} - {{- .securityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-security-context" . }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers.tpl deleted file mode 100644 index 7ae7d58..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/templates/_helpers.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{- define "content-services.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-cs") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "alfresco.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/values.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/charts/alfresco-common/values.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/_helpers.tpl deleted file mode 100644 index 7afc06e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "activemq.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 "activemq.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 chart name and version as used by the chart label. -*/}} -{{- define "activemq.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "activemq.labels" -}} -helm.sh/chart: {{ include "activemq.chart" . }} -{{ include "activemq.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "activemq.selectorLabels" -}} -app.kubernetes.io/name: {{ include "activemq.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "activemq.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "activemq.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/deployment-activemq.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/deployment-activemq.yaml deleted file mode 100644 index e93f309..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/deployment-activemq.yaml +++ /dev/null @@ -1,89 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "activemq.fullname" . }} - labels: - {{- include "activemq.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: Recreate - selector: - matchLabels: - {{- include "activemq.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "activemq.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values | indent 4 }} - containers: - - name: {{ .Values.service.name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- include "component-security-context" .Values | indent 6 }} - env: - - name: ACTIVEMQ_CONFIG_MINMEMORY - value: "{{ .Values.resources.requests.memory | replace "Mi" "" }}" - - name: ACTIVEMQ_CONFIG_MAXMEMORY - value: "{{ .Values.resources.limits.memory | replace "Mi" "" }}" - - name: ACTIVEMQ_BROKER_NAME - value: "{{ template "activemq.fullname" . }}" - {{- $credentialsSecretName := default (printf "%s-brokersecret" (include "activemq.fullname" .)) $.Values.adminUser.existingSecretName }} - - name: ACTIVEMQ_ADMIN_LOGIN - valueFrom: - secretKeyRef: - name: {{ $credentialsSecretName }} - key: BROKER_USERNAME - - name: ACTIVEMQ_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ $credentialsSecretName }} - key: BROKER_PASSWORD - ports: - - name: stomp - containerPort: {{ .Values.services.broker.ports.internal.stomp | default 61613 }} - - name: openwire - containerPort: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - - name: amqp - containerPort: {{ .Values.services.broker.ports.internal.amqp | default 5672 }} - - name: web-console - containerPort: {{ .Values.services.webConsole.ports.internal.webConsole | default 8161 }} - readinessProbe: - tcpSocket: - port: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - livenessProbe: - tcpSocket: - port: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - failureThreshold: {{ .Values.livenessProbe.failureThreshold }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - resources: {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.persistence.data.mountPath }} - subPath: {{ .Values.persistence.data.subPath }} - volumes: - {{- include "data_volume" .Values | nindent 8 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 1 diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/pvc-activemq.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/pvc-activemq.yaml deleted file mode 100644 index 6183cd0..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/pvc-activemq.yaml +++ /dev/null @@ -1,3 +0,0 @@ -{{- if and (not .Values.persistence.existingClaim) .Values.persistence.enabled }} -{{ include "component_pvc" .Values }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/secret-activemq.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/secret-activemq.yaml deleted file mode 100644 index 8787d80..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/secret-activemq.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if not .Values.adminUser.existingSecretName }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "activemq.fullname" . }}-brokersecret - labels: - {{- include "activemq.labels" . | nindent 4 }} -type: Opaque -data: - BROKER_USERNAME: {{ .Values.adminUser.user | b64enc | quote }} - BROKER_PASSWORD: {{ .Values.adminUser.password | b64enc | quote }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/svc-activemq-broker.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/svc-activemq-broker.yaml deleted file mode 100644 index a990428..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/svc-activemq-broker.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "activemq.fullname" . }}-broker - labels: - {{- include "activemq.labels" . | nindent 4 }} -spec: - type: {{ .Values.services.broker.type }} - ports: - - port: {{ .Values.services.broker.ports.external.stomp | default 61613 }} - targetPort: {{ .Values.services.broker.ports.internal.stomp | default 61613 }} - name: stomp - protocol: TCP - - port: {{ .Values.services.broker.ports.external.openwire | default 61616 }} - targetPort: {{ .Values.services.broker.ports.internal.openwire | default 61616 }} - name: openwire - protocol: TCP - - port: {{ .Values.services.broker.ports.external.amqp | default 5672 }} - targetPort: {{ .Values.services.broker.ports.internal.amqp | default 5672 }} - name: amqp - protocol: TCP - selector: - {{- include "activemq.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/svc-activemq-web-console.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/svc-activemq-web-console.yaml deleted file mode 100644 index 1b38195..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/templates/svc-activemq-web-console.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "activemq.fullname" . }}-web-console - labels: - {{- include "activemq.labels" . | nindent 4 }} -spec: - type: {{ .Values.services.webConsole.type }} - ports: - - port: {{ .Values.services.webConsole.ports.external.webConsole | default 8161 }} - targetPort: {{ .Values.services.webConsole.ports.internal.webConsole | default 8161 }} - name: web-console - protocol: TCP - selector: - {{- include "activemq.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/deployment-activemq_test.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/deployment-activemq_test.yaml deleted file mode 100644 index 440ed69..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/deployment-activemq_test.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -suite: test activemq deployment -templates: - - deployment-activemq.yaml -tests: - - it: should reference default secret containing broker default credentials - asserts: - - equal: - path: spec.template.spec.containers[0].env[3].name - value: ACTIVEMQ_ADMIN_LOGIN - template: deployment-activemq.yaml - - equal: - path: spec.template.spec.containers[0].env[3].valueFrom.secretKeyRef.name - value: RELEASE-NAME-activemq-brokersecret - template: deployment-activemq.yaml - - - it: should reference overridden secret when setting existingSecretName - set: - adminUser.existingSecretName: existing-secret - asserts: - - equal: - path: spec.template.spec.containers[0].env[3].valueFrom.secretKeyRef.name - value: existing-secret - template: deployment-activemq.yaml - - - it: should render cpu and memory limits - asserts: - - equal: - path: spec.template.spec.containers[0].resources - value: - requests: - cpu: "0.25" - memory: "512Mi" - limits: - cpu: "2" - memory: "2048Mi" - template: deployment-activemq.yaml diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/pvc-activemq_test.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/pvc-activemq_test.yaml deleted file mode 100644 index 9bed2b1..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/pvc-activemq_test.yaml +++ /dev/null @@ -1,64 +0,0 @@ ---- -suite: test activemq persistence -templates: - - deployment-activemq.yaml - - pvc-activemq.yaml -tests: - - it: should render an ephemeral volume - set: - persistence: - enabled: false - asserts: - - contains: - path: spec.template.spec.volumes - content: - emptyDir: - sizeLimit: 20Gi - name: data - template: deployment-activemq.yaml - - - it: should render a deployment with set claim - set: - persistence: - enabled: true - existingClaim: mysfsvolume - asserts: - - equal: - path: >- - spec.template.spec.volumes[0].persistentVolumeClaim.claimName - value: mysfsvolume - template: deployment-activemq.yaml - - - it: should render a deployment with dynamic claim name - set: - persistence: - enabled: true - volumeMode: Block - accessModes: - - ReadWriteMany - - ReadOnlyMany - asserts: - - equal: - path: >- - spec.template.spec.volumes[0].persistentVolumeClaim.claimName - value: activemq-default-pvc - template: deployment-activemq.yaml - - isNull: - path: spec.storageClassName - template: pvc-activemq.yaml - - - it: should render a deployment with provided storage class - set: - persistence: - enabled: true - storageClass: cheap - asserts: - - equal: - path: >- - spec.template.spec.volumes[0].persistentVolumeClaim.claimName - value: activemq-cheap-pvc - template: deployment-activemq.yaml - - equal: - path: spec.storageClassName - value: cheap - template: pvc-activemq.yaml diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/svc-activemq_test.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/svc-activemq_test.yaml deleted file mode 100644 index 206d017..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/tests/svc-activemq_test.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -suite: test activemq services -templates: - - svc-activemq-broker.yaml - - svc-activemq-web-console.yaml -tests: - - it: should use the default service name - asserts: - - equal: - path: spec.selector - value: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/name: activemq - template: svc-activemq-broker.yaml - - equal: - path: spec.selector - value: - app.kubernetes.io/instance: RELEASE-NAME - app.kubernetes.io/name: activemq - template: svc-activemq-web-console.yaml diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/values.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/values.yaml deleted file mode 100644 index eb928ce..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/activemq/values.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Leave this to true to deploy the chart -enabled: true -replicaCount: 1 -nodeSelector: {} -image: - repository: alfresco/alfresco-activemq - tag: 5.17.4-jre17-rockylinux8 - pullPolicy: IfNotPresent -adminUser: - # -- An existing kubernetes secret that contains BROKER_USERNAME and BROKER_PASSWORD keys to override the default user credentials - existingSecretName: - # -- Username for the default user with administrative privileges - user: admin - # -- Password for the default user with administrative privileges - password: admin -podSecurityContext: - runAsUser: 33031 - runAsGroup: 1000 - fsGroup: 1000 -resources: - requests: - cpu: "0.25" - memory: "512Mi" - limits: - cpu: "2" - memory: "2048Mi" -service: - name: activemq -services: - broker: - ports: - internal: - stomp: 61613 - amqp: 5672 - openwire: 61616 - external: - stomp: 61613 - amqp: 5672 - openwire: 61616 - type: ClusterIP - webConsole: - ports: - internal: - webConsole: 8161 - external: - webConsole: 8161 - type: NodePort -readinessProbe: - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 6 -livenessProbe: - initialDelaySeconds: 60 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 6 -persistence: - enabled: true - baseSize: 20Gi - storageClass: - # -- defines type of access required by the persistent volume - # [Access_Modes] (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) - accessModes: - - ReadWriteOnce - existingClaim: - data: - mountPath: "/opt/activemq/data" - subPath: "alfresco-infrastructure/activemq-data" diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/.helmignore b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/.helmignore deleted file mode 100644 index 721fe6a..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/.helmignore +++ /dev/null @@ -1,25 +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 -# Helm unit tests -tests -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/Chart.lock b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/Chart.lock deleted file mode 100644 index cb293e5..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.17.1 -digest: sha256:f5dd11ccf8726befd217545b84a48b02c49d68f03a75e4e102b971ad2e4f0fec -generated: "2022-10-05T16:55:42.662007+02:00" diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/Chart.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/Chart.yaml deleted file mode 100644 index 5662b18..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v2 -dependencies: -- name: common - repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ - version: 1.x.x -description: 'A helper subchart to avoid duplication in alfresco charts and set common - external dependencies ' -icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4 -name: alfresco-common -type: library -version: 2.0.0 diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/README.md b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/README.md deleted file mode 100644 index 1df5281..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# alfresco-common - -![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) - -A helper subchart to avoid duplication in alfresco charts and set common -external dependencies - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ | common | 1.x.x | - diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/README.md.gotmpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/README.md.gotmpl deleted file mode 100644 index b301f39..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/README.md.gotmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.deprecationWarning" . }} - -{{ template "chart.badgesSection" . }} - -{{ template "chart.description" . }} - -Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for information on the Helm charts and deployment instructions. - -{{ template "chart.homepageLine" . }} - -{{ template "chart.maintainersSection" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/.helmignore b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/Chart.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/Chart.yaml deleted file mode 100644 index 39edbb3..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -annotations: - category: Infrastructure -apiVersion: v2 -appVersion: 1.17.1 -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.17.1 diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/README.md b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/README.md deleted file mode 100644 index a2ecd60..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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.dev/) for deployment and management of Helm Charts in clusters. - -## 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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_affinities.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_affinities.tpl deleted file mode 100644 index 2387be2..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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: - - {{ include "common.names.namespace" .context | 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: - - {{ include "common.names.namespace" .context | 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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_capabilities.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 9d9b760..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_errors.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_images.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_images.tpl deleted file mode 100644 index 42ffbc7..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_ingress.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_ingress.tpl deleted file mode 100644 index 8caf73a..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_labels.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_names.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_names.tpl deleted file mode 100644 index 1bdac8b..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_secrets.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_secrets.tpl deleted file mode 100644 index a53fb44..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_storage.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a84..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_tplvalues.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db1668..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_utils.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_utils.tpl deleted file mode 100644 index 8c22b2a..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_warnings.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa4..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec1..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a0..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_redis.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_validations.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/values.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/charts/common/values.yaml deleted file mode 100644 index f2df68e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/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/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-activemq.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-activemq.tpl deleted file mode 100644 index 3ce7156..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-activemq.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{- define "activemq.env" -}} -- name: ACTIVEMQ_URL - value: $(BROKER_URL) -- name: ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} - -{{- define "spring.activemq.env" -}} -- name: SPRING_ACTIVEMQ_BROKERURL - value: $(BROKER_URL) -- name: SPRING_ACTIVEMQ_USER - value: $(BROKER_USERNAME) -- name: SPRING_ACTIVEMQ_PASSWORD - value: $(BROKER_PASSWORD) -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl deleted file mode 100644 index 1260536..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-image-pull-secrets.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{- define "alfresco-content-services.imagePullSecrets" }} -{{- if .Values.global.alfrescoRegistryPullSecrets }} -imagePullSecrets: - - name: {{ .Values.global.alfrescoRegistryPullSecrets }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-persistence.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-persistence.tpl deleted file mode 100644 index d473d05..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-persistence.tpl +++ /dev/null @@ -1,41 +0,0 @@ -{{- define "data_volume" -}} -- name: data -{{- $svc_name := .service.name }} -{{- with .persistence }} -{{- if .enabled }} -{{- $sc_name := .storageClass | default "default" }} - persistentVolumeClaim: - claimName: >- - {{ .existingClaim | default (printf "%s-%s-pvc" $svc_name $sc_name ) }} -{{- else }} - emptyDir: - sizeLimit: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end }} -{{- end -}} - -{{- define "component_pvc" -}} -{{ $svc_name := .service.name }} -{{- with .persistence }} -{{- $sc_name := .storageClass | default "default" -}} ---- -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ printf "%s-%s-pvc" $svc_name $sc_name }} -spec: - {{- if .storageClass }} - storageClassName: {{ .storageClass | quote }} - {{- end }} - {{- if .accessModes }} - accessModes: - {{- range .accessModes }} - - {{ . }} - {{- end }} - {{- end }} - volumeMode: {{ .volumeMode | default "Filesystem" }} - resources: - requests: - storage: {{ .baseSize | default "20Gi" | quote }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-search.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-search.tpl deleted file mode 100644 index 7f24d8b..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-search.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{/* -Get Alfresco Solr context -*/}} -{{- define "alfresco-search.baseurl" -}} -{{- if index $.Values "alfresco-search" "enabled" -}} - /solr -{{- else -}} - {{ index $.Values "alfresco-search" "external" "context" | default "/solr" -}} -{{- end -}} -{{- end -}} - -{{/* -Required Solr secret -*/}} -{{- define "tracking-shared-secret" -}} - {{- required "You need to provide a shared secret for Solr/repo authentication , see https://github.com/Alfresco/acs-deployment/tree/master/docs/helm" .Values.global.tracking.sharedsecret -}} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-security.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-security.tpl deleted file mode 100644 index 8829e4e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers-security.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{- define "default-pod-security-context" }} - runAsNonRoot: true - runAsUser: 33099 - fsGroupChangePolicy: OnRootMismatch -{{- end }} - -{{- define "default-security-context" }} - runAsNonRoot: true - allowPrivilegeEscalation: false - capabilities: - drop: - - NET_RAW - - ALL -{{- end }} - -{{- define "component-pod-security-context" }} - securityContext: -{{- if .podSecurityContext }} - {{- .podSecurityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-pod-security-context" . }} -{{- end }} -{{- end }} - -{{- define "component-security-context" }} - securityContext: -{{- if .securityContext }} - {{- .securityContext | toYaml | nindent 4 }} -{{- else }} -{{- include "default-security-context" . }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers.tpl deleted file mode 100644 index 7ae7d58..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/templates/_helpers.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{- define "content-services.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-cs") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "alfresco.shortname" -}} -{{- $name := (.Values.NameOverride | default "alfresco-") -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/values.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/alfresco-common/values.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/common/.helmignore b/alfresco-content-services/charts/alfresco-sync-service/charts/common/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/Chart.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/common/Chart.yaml deleted file mode 100644 index 4fc56bb..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/common/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -annotations: - category: Infrastructure - licenses: Apache-2.0 -apiVersion: v2 -appVersion: 2.4.0 -description: A Library Helm Chart for grouping common logic between bitnami charts. - This chart is not deployable by itself. -home: https://bitnami.com -icon: https://bitnami.com/downloads/logos/bitnami-mark.png -keywords: -- common -- helper -- template -- function -- bitnami -maintainers: -- name: VMware, Inc. - url: https://github.com/bitnami/charts -name: common -sources: -- https://github.com/bitnami/charts -type: library -version: 2.4.0 diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/common/README.md b/alfresco-content-services/charts/alfresco-sync-service/charts/common/README.md deleted file mode 100644 index 72fca33..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/common/README.md +++ /dev/null @@ -1,235 +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. - -Looking to use our applications in production? Try [VMware Application Catalog](https://bitnami.com/enterprise), the enterprise edition of Bitnami Application Catalog. - -## 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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_affinities.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_affinities.tpl deleted file mode 100644 index 81902a6..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_capabilities.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 697486a..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_capabilities.tpl +++ /dev/null @@ -1,180 +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 daemonset. -*/}} -{{- define "common.capabilities.daemonset.apiVersion" -}} -{{- if semverCompare "<1.14-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "extensions/v1beta1" -}} -{{- else -}} -{{- print "apps/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 -}} - -{{/* -Return the appropriate apiVersion for Vertical Pod Autoscaler. -*/}} -{{- define "common.capabilities.vpa.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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_errors.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_images.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_images.tpl deleted file mode 100644 index d60c22e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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 | uniq }} - - name: {{ . }} - {{- end }} - {{- end }} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names evaluating values as templates -{{ include "common.images.renderPullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $) }} -*/}} -{{- define "common.images.renderPullSecrets" -}} - {{- $pullSecrets := list }} - {{- $context := .context }} - - {{- 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 | uniq }} - - name: {{ . }} - {{- end }} - {{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_ingress.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_ingress.tpl deleted file mode 100644 index 831da9c..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_labels.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_names.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_names.tpl deleted file mode 100644 index 617a234..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_secrets.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_secrets.tpl deleted file mode 100644 index a1708b2..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_storage.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a84..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_tplvalues.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db1668..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_utils.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_utils.tpl deleted file mode 100644 index b1ead50..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_warnings.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa4..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_cassandra.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_mariadb.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_mongodb.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec1..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_mysql.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a0..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_postgresql.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_redis.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_validations.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/common/values.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/common/values.yaml deleted file mode 100644 index f2df68e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/.helmignore b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/.helmignore deleted file mode 100644 index f0c1319..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/Chart.lock b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/Chart.lock deleted file mode 100644 index ec67d36..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: oci://registry-1.docker.io/bitnamicharts - version: 2.4.0 -digest: sha256:8c1a5dc923412d11d4d841420494b499cb707305c8b9f87f45ea1a8bf3172cb3 -generated: "2023-05-21T19:47:56.903329844Z" diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/Chart.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/Chart.yaml deleted file mode 100644 index 6b84dca..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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.6 diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/README.md b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/README.md deleted file mode 100644 index fc74780..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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-r7` | -| `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-r120` | -| `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-r91` | -| `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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/.helmignore b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/Chart.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/Chart.yaml deleted file mode 100644 index 4fc56bb..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -annotations: - category: Infrastructure - licenses: Apache-2.0 -apiVersion: v2 -appVersion: 2.4.0 -description: A Library Helm Chart for grouping common logic between bitnami charts. - This chart is not deployable by itself. -home: https://bitnami.com -icon: https://bitnami.com/downloads/logos/bitnami-mark.png -keywords: -- common -- helper -- template -- function -- bitnami -maintainers: -- name: VMware, Inc. - url: https://github.com/bitnami/charts -name: common -sources: -- https://github.com/bitnami/charts -type: library -version: 2.4.0 diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/README.md b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/README.md deleted file mode 100644 index 72fca33..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/README.md +++ /dev/null @@ -1,235 +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. - -Looking to use our applications in production? Try [VMware Application Catalog](https://bitnami.com/enterprise), the enterprise edition of Bitnami Application Catalog. - -## 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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_affinities.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_affinities.tpl deleted file mode 100644 index 81902a6..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_capabilities.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 697486a..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_capabilities.tpl +++ /dev/null @@ -1,180 +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 daemonset. -*/}} -{{- define "common.capabilities.daemonset.apiVersion" -}} -{{- if semverCompare "<1.14-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "extensions/v1beta1" -}} -{{- else -}} -{{- print "apps/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 -}} - -{{/* -Return the appropriate apiVersion for Vertical Pod Autoscaler. -*/}} -{{- define "common.capabilities.vpa.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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_errors.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_images.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_images.tpl deleted file mode 100644 index d60c22e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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 | uniq }} - - name: {{ . }} - {{- end }} - {{- end }} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names evaluating values as templates -{{ include "common.images.renderPullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $) }} -*/}} -{{- define "common.images.renderPullSecrets" -}} - {{- $pullSecrets := list }} - {{- $context := .context }} - - {{- 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 | uniq }} - - name: {{ . }} - {{- end }} - {{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_ingress.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_ingress.tpl deleted file mode 100644 index 831da9c..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_labels.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_names.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_names.tpl deleted file mode 100644 index 617a234..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_secrets.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_secrets.tpl deleted file mode 100644 index a1708b2..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_storage.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a84..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_tplvalues.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db1668..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_utils.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_utils.tpl deleted file mode 100644 index b1ead50..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_warnings.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa4..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_cassandra.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_mariadb.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_mongodb.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec1..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_mysql.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a0..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_postgresql.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_redis.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_validations.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/values.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/charts/common/values.yaml deleted file mode 100644 index f2df68e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/NOTES.txt b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/NOTES.txt deleted file mode 100644 index 21b3d29..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/_helpers.tpl deleted file mode 100644 index 8189380..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/extra-list.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/extra-list.yaml deleted file mode 100644 index 9ac65f9..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/networkpolicy-egress.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/networkpolicy-egress.yaml deleted file mode 100644 index e862147..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/configmap.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/configmap.yaml deleted file mode 100644 index d654a22..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/extended-configmap.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/extended-configmap.yaml deleted file mode 100644 index d129bd3..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/initialization-configmap.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/initialization-configmap.yaml deleted file mode 100644 index d3d26cb..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/metrics-configmap.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/metrics-configmap.yaml deleted file mode 100644 index 8ad2f35..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/metrics-svc.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/metrics-svc.yaml deleted file mode 100644 index a38b52a..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/networkpolicy.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/networkpolicy.yaml deleted file mode 100644 index ce0052d..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/servicemonitor.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/servicemonitor.yaml deleted file mode 100644 index c4a19fe..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/statefulset.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/statefulset.yaml deleted file mode 100644 index d56d052..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.adminPasswordKey" .) }} - {{- 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" (include "postgresql.userPasswordKey" .) }} - {{- 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: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.replicationPasswordKey" .) }} - {{- 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: {{ .Values.primary.persistence.mountPath }}/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: {{ .Values.primary.persistence.mountPath }}/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" (include "postgresql.userPasswordKey" .) }} - {{- 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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/svc-headless.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/svc-headless.yaml deleted file mode 100644 index 684177a..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/svc.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/primary/svc.yaml deleted file mode 100644 index 6ddd55b..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/prometheusrule.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/prometheusrule.yaml deleted file mode 100644 index 24be710..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/psp.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/psp.yaml deleted file mode 100644 index 48d1175..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/extended-configmap.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/extended-configmap.yaml deleted file mode 100644 index e329d13..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/metrics-configmap.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/metrics-configmap.yaml deleted file mode 100644 index b00a6ec..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/metrics-svc.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/metrics-svc.yaml deleted file mode 100644 index 6f54ed2..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/networkpolicy.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/networkpolicy.yaml deleted file mode 100644 index c969cd7..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/servicemonitor.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/servicemonitor.yaml deleted file mode 100644 index d511d6b..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/statefulset.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/statefulset.yaml deleted file mode 100644 index 9d28017..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.adminPasswordKey" .) }} - {{- 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" (include "postgresql.userPasswordKey" .) }} - {{- 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: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.replicationPasswordKey" .) }} - {{- 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: {{ .Values.readReplicas.persistence.mountPath }}/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" (include "postgresql.userPasswordKey" .) }} - {{- 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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/svc-headless.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/svc-headless.yaml deleted file mode 100644 index ee8f756..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/svc.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/read/svc.yaml deleted file mode 100644 index c308c3f..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/role.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/role.yaml deleted file mode 100644 index 00f9222..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/rolebinding.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/rolebinding.yaml deleted file mode 100644 index 0311c0e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/secrets.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/secrets.yaml deleted file mode 100644 index e3d6e7a..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/serviceaccount.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/serviceaccount.yaml deleted file mode 100644 index 179f8f2..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/tls-secrets.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/templates/tls-secrets.yaml deleted file mode 100644 index 482e298..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/values.schema.json b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/values.schema.json deleted file mode 100644 index fc41483..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/values.yaml b/alfresco-content-services/charts/alfresco-sync-service/charts/postgresql/values.yaml deleted file mode 100644 index 7f8b20b..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/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-r7 - 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-r120 - 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-r91 - 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/alfresco-content-services/charts/alfresco-sync-service/ci/default-values.yaml b/alfresco-content-services/charts/alfresco-sync-service/ci/default-values.yaml deleted file mode 100644 index 0d6b1f9..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/ci/default-values.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -repository: - host: dummy-repo -activemq: - enabled: true -messageBroker: - nameOverride: mqsync -postgresql: - enabled: true - nameOverride: pgsync diff --git a/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/authentication b/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/authentication deleted file mode 100644 index 0e5d699..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/authentication +++ /dev/null @@ -1,5 +0,0 @@ -{ - "data": { - "creationAllowed": true - } -} diff --git a/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/config b/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/config deleted file mode 100644 index 3d4d33c..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/config +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "0", - "uri": "http://dummy-repo/syncservice", - "config": { - "filters": { - "nodeAspects": [ - ], - "nodeTypes": [ - ], - "smartFolderNodeAspects": [ - ], - "nodeTypesWhitelist": [ - ] - }, - "dsyncClientVersionMin": "1.0.1", - "repoInfo": { - "versionLabel": "7.4.0", - "edition": "Enterprise", - "clusterEnabled": false - } - } -} diff --git a/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/httpd.conf b/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/httpd.conf deleted file mode 100644 index a77d04e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/httpd.conf +++ /dev/null @@ -1,24 +0,0 @@ -ServerRoot "/opt/bitnami/apache" -Listen 8080 -LoadModule mpm_prefork_module modules/mod_mpm_prefork.so -LoadModule unixd_module modules/mod_unixd.so -LoadModule alias_module modules/mod_alias.so -LoadModule authz_core_module modules/mod_authz_core.so -LoadModule autoindex_module modules/mod_autoindex.so - - AllowOverride none - Require all denied - -DocumentRoot "/opt/bitnami/apache/htdocs" - - Options Indexes FollowSymLinks - AllowOverride None - Require all granted - -ErrorLog "logs/error_log" -LogLevel warn - - Alias /alfresco/s/api "/opt/bitnami/apache/htdocs" - Alias /alfresco/service/devicesync "/opt/bitnami/apache/htdocs" - -PidFile "/opt/bitnami/apache/var/run/httpd.pid" diff --git a/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/kustomization.yaml b/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/kustomization.yaml deleted file mode 100644 index 52b712c..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -namespace: alfresco -configMapGenerator: - - name: dummy-repo - files: - - authentication - - config - - name: httpd-conf - files: - - httpd.conf - -helmChartInflationGenerator: - - chartName: apache - chartRepoUrl: https://charts.bitnami.com/bitnami - chartVersion: 9.2.18 - releaseName: dummy-repo - releaseNamespace: alfresco - values: values.yaml diff --git a/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/values.yaml b/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/values.yaml deleted file mode 100644 index cbee069..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/ci/kustomize/values.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fullnameOverride: dummy-repo -htdocsConfigMap: dummy-repo -httpdConfConfigMap: httpd-conf -service: - type: ClusterIP diff --git a/alfresco-content-services/charts/alfresco-sync-service/templates/NOTES.txt b/alfresco-content-services/charts/alfresco-sync-service/templates/NOTES.txt deleted file mode 100644 index 3d48296..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/templates/NOTES.txt +++ /dev/null @@ -1,45 +0,0 @@ -Alfresco Sync Service - - - _;p@@BBBB@@pw_ - ,@B@@@@@@@@@@@@@@BW_ - 0B@@@@@@@@@@@@@@@@@@@N_ - _,pp@@@@@pw,_ "0E@@@@@@@@@@@@@@@@@m $@@@pw,_ - ,@B@@@@@@@@@@BBBBW, TN@@@@@@@@@@@@BBBBb $LLLLLL@h_ - ;0@@@@@@@@@@@@BBBBBBBBp 0@@@@@@@@BBBBBBBB ]LLLLLLLLL@, - @@@@@@@@@@@@@@@BBBBBBBBRN """""TRR0BBBBBBBb 'LLP```$LLLLh - 0@@@@@@@@@@@@@@@BBR^" "MRB0L !P }LLLLL@ - $@@@@@@@@@@@@@@@P" ^ }LLLLLLb - ]@@@ENB0BNE@@B" }LLLLLLL - P"` ___ ` ,,wm p@mww, $55LLLLP - _a@@BBBBBBR" ,a@BBBBB $@bBBBB@m :,``,^}" - _pB@0BBBBBBBB" {EB0BBBBB $@bBBBM" ;`````L p_ - @N@@@@0BBBBBB" y, TBE0BBB $@bR^ :```,` @@@b_ - ,0@@@@@@@E0BBBE |BB@p T0@0B $@B :`,^ ,@@@@@N_ - 6@@@@@@@@@@EBB ABBBBBp "0b 0P ,mm-,,,,,,,,,,,,,,+^` ,@@@@@@@@N - ]E@@@@@@@@@@@@@ ,BBBBBBBBW_ ` ^""`````````````` _,pB@@@@@@@@@@b - ]@@@@@@@@@@@@@@ ^MMMMMMMMMM- .,,,,,,,,,, '0@@@@@@@@@@@@@b - ]E@@@@@@@@@@BP` _wwwwwwwwwwwww _ `0@@@@@@@@L $@@@@@@@@@@@@@E - 'N@@@@@@@BP ,@BRBRRRRRRRRRRRRRNNP ,@ ]@_ `TB@bbbB '@@@@@@@@@@@@@E - lN@@@@NP _@BbE ]@E $@@@, TBbbL jbbB@@@@@@@@@E" - '0@@B aBbbbE ,@B@E $@B@@@p TE BbbbbB@@@@@@B - '0 @@bbbbE ,@BbB@E $@bbB@@Bp @bbbbbbb@@@P` - ]NBBbbbE #BbbbbB@E $@bbbbR" @@@@@@@BRM" - $@@@@@Eb '"R0BB@E 0BRM" ```` _,w - $@@@@@@b ,@E@@@@@@@@N@@E - ]@@@@@@b ,@@@@@@@@@@@@@@@P - N@@@@@b ,L !@w_ ,#B@@@@@@@@@@@@@@@B - `0@@@@b _@@L [NbbB@Ww,,_ ,,p@BBbbbB@@@@@@@@@@@@@B - T@@@@@@@@@@b 'BbbbbbbBB@@bbbb@p TBbbbbbbbb@@@@@@@@@@@@P - "0@@@@@@@b 0@bb@BB@@@@@@@@@@Np "0BbbbB@@@@@@@@@@B" - `"MNNNEb 0BB@@@@@@@@@@@@@@@@p_ `"RNNNNNNNP"` - 'N@@@@@@@@@@@@@@@@@@E@p - "0@@@@@@@@@@@@@@@@B" - `TNNE@@@@ENBP" - - -Sync endpoint available at {{ printf "%s/%s" (default "" .Values.ingress.hostName) .Values.ingress.path }} -Using required components: - - Content repostory: http://{{ .Values.repository.host }}:{{ .Values.repository.port }} - - ActiveMQ: {{ template "alfresco-sync-service.brokerUrl" . }} - - SQL datbase: {{ template "alfresco-sync-service.dbUrl" . }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/templates/_helpers-db.tpl b/alfresco-content-services/charts/alfresco-sync-service/templates/_helpers-db.tpl deleted file mode 100644 index 3f93d0c..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/templates/_helpers-db.tpl +++ /dev/null @@ -1,51 +0,0 @@ -{{/* -Get Database Username -*/}} -{{- define "alfresco-sync-service.dbUser" -}} -{{- $defaultUser := "alfresco" }} -{{- if .Values.postgresql.enabled }} -{{- coalesce .Values.postgresql.auth.username $defaultUser }} -{{- else }} -{{- coalesce .Values.database.user $defaultUser }} -{{- end }} -{{- end -}} - -{{/* -Get Database Password -*/}} -{{- define "alfresco-sync-service.dbPass" -}} -{{- $defaultPass := "admin" }} -{{- if .Values.postgresql.enabled }} -{{- coalesce .Values.postgresql.auth.password $defaultPass }} -{{- else }} -{{- coalesce .Values.database.password $defaultPass }} -{{- end }} -{{- end -}} - -{{/* -Get Database Driver -*/}} -{{- define "alfresco-sync-service.dbDriver" -}} -{{- $defaultDriver := "org.postgresql.Driver" }} -{{- if .Values.postgresql.enabled }} -{{- $defaultDriver }} -{{- else }} -{{- coalesce .Values.database.driver $defaultDriver }} -{{- end }} -{{- end -}} - -{{/* -Get Database URL -*/}} -{{- define "alfresco-sync-service.dbUrl" -}} -{{- if .Values.postgresql.enabled }} -{{- $pgsvcname := printf "%s-%s" .Release.Name .Values.postgresql.nameOverride }} -{{- $pgsvcport := "" }} -{{- if hasKey .Values.postgresql.primary "service" }} -{{- $pgsvcport := printf ":%s" (.Values.postgresql.primary.service.port | default 5432) }} -{{- end }} -{{- printf "jdbc:postgresql://%s%s/%s" $pgsvcname $pgsvcport .Values.postgresql.auth.database }} -{{- else }} -{{- required "To enable SyncService external database please provide .database.url" .Values.database.url }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-sync-service/templates/_helpers-mq.tpl b/alfresco-content-services/charts/alfresco-sync-service/templates/_helpers-mq.tpl deleted file mode 100644 index 75f803b..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/templates/_helpers-mq.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{{/* -Get ActiveMQ URL -*/}} -{{- define "alfresco-sync-service.brokerUrl" -}} -{{- $brokerOptions := "?timeout=3000&jms.useCompression=true" }} -{{- $brokerPort := .Values.activemq.services.broker.ports.external.openwire | int }} -{{- if .Values.activemq.enabled }} -{{- $brokerHostname := include "activemq.fullname" (dict "Values" .Values.activemq "Chart" .Chart "Release" .Release) }} -{{- printf "failover:(nio://%s-broker:%d)%s" $brokerHostname $brokerPort $brokerOptions }} -{{- else }} -{{- coalesce .Values.messageBroker.url .Values.global.messageBroker.url (printf "failover:(nio://%s-%s-broker:%d)%s" .Release.Name .Values.messageBroker.nameOverride $brokerPort $brokerOptions) -}} -{{- end }} -{{- end -}} - -{{/* -Get ActiveMQ Username -*/}} -{{- define "alfresco-sync-service.brokerUser" -}} -{{- if .Values.activemq.enabled }} -{{- .Values.activemq.adminUser.user -}} -{{- else }} -{{- coalesce .Values.messageBroker.user .Values.global.messageBroker.user "alfresco" -}} -{{- end }} -{{- end -}} - -{{/* -Get ActiveMQ Password -*/}} -{{- define "alfresco-sync-service.brokerPass" -}} -{{- if .Values.activemq.enabled }} -{{- .Values.activemq.adminUser.password -}} -{{- else }} -{{- coalesce .Values.messageBroker.password .Values.global.messageBroker.password "admin" -}} -{{- end }} -{{- end -}} - -{{/* -Get ActiveMQ secret -*/}} -{{- define "alfresco-sync-service.brokerSecret" -}} -{{- if .Values.activemq.enabled }} -{{- coalesce .Values.activemq.existingSecretName (printf "%s-messagebroker-secret" (include "alfresco-sync-service.fullname" . )) -}} -{{- else }} -{{- coalesce .Values.messageBroker.existingSecretName .Values.global.messageBroker.existingSecretName -}} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-sync-service/templates/_helpers.tpl b/alfresco-content-services/charts/alfresco-sync-service/templates/_helpers.tpl deleted file mode 100644 index 2375db1..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/templates/_helpers.tpl +++ /dev/null @@ -1,59 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "alfresco-sync-service.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 "alfresco-sync-service.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 chart name and version as used by the chart label. -*/}} -{{- define "alfresco-sync-service.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "alfresco-sync-service.labels" -}} -helm.sh/chart: {{ include "alfresco-sync-service.chart" . }} -{{ include "alfresco-sync-service.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "alfresco-sync-service.selectorLabels" -}} -app.kubernetes.io/name: {{ include "alfresco-sync-service.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{- define "alfresco-sync-service.repository" -}} -{{- if .Values.repository.nameOverride }} -{{- printf "%s-%s" .Release.Name .Values.repository.nameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- .Values.repository.host }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/alfresco-sync-service/templates/config-syncservice.yaml b/alfresco-content-services/charts/alfresco-sync-service/templates/config-syncservice.yaml deleted file mode 100644 index cbd6eed..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/templates/config-syncservice.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "alfresco-sync-service.fullname" . }}-configmap - labels: - {{- include "alfresco-sync-service.labels" . | nindent 4 }} -data: - JAVA_OPTS: >- - -Dsql.db.url={{ include "alfresco-sync-service.dbUrl" . }} - -Dsql.db.driver={{ include "alfresco-sync-service.dbDriver" . | quote }} - -Dsql.db.username=$DATABASE_USERNAME - -Dsql.db.password=$DATABASE_PASSWORD - -Drepo.hostname={{ template "alfresco-sync-service.repository" . }} - -Drepo.port={{ .Values.repository.port }} - -Ddw.server.applicationConnectors[0].type=http - -Dmessaging.broker.url=$BROKER_URL - -Dmessaging.username=$BROKER_USERNAME - -Dmessaging.password=$BROKER_PASSWORD - {{ .Values.environment.JAVA_OPTS }} - {{ .Values.environment.EXTRA_JAVA_OPTS }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/templates/deployment-syncservice.yaml b/alfresco-content-services/charts/alfresco-sync-service/templates/deployment-syncservice.yaml deleted file mode 100644 index bdbd07b..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/templates/deployment-syncservice.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "alfresco-sync-service.fullname" . }} - labels: - {{- include "alfresco-sync-service.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "alfresco-sync-service.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - labels: - {{- include "alfresco-sync-service.selectorLabels" . | nindent 8 }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-syncservice.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/secret-database.yaml") . | sha256sum }} - spec: - {{- include "component-pod-security-context" .Values | indent 4 }} - {{- if .Values.nodeSelector }} - nodeSelector: {{- .Values.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - terminationGracePeriodSeconds: 60 - containers: - - name: syncservice - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- include "component-security-context" .Values | indent 6 }} - envFrom: - - secretRef: - name: {{ template "alfresco-sync-service.fullname" . }}-dbsecret - - configMapRef: - name: {{ template "alfresco-sync-service.fullname" . }}-configmap - - secretRef: - name: {{ template "alfresco-sync-service.brokerSecret" . }} - ports: - - name: serviceport - containerPort: 9090 - resources: {{- toYaml .Values.resources | nindent 12 }} - readinessProbe: - httpGet: - path: /alfresco/healthcheck - port: serviceport - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - livenessProbe: - httpGet: - path: /alfresco/healthcheck - port: serviceport - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - lifecycle: - preStop: - exec: - command: ["/opt/alfresco-sync-service/sync_service_entrypoint.sh", "stop"] diff --git a/alfresco-content-services/charts/alfresco-sync-service/templates/ingress.yaml b/alfresco-content-services/charts/alfresco-sync-service/templates/ingress.yaml deleted file mode 100644 index ff78387..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/templates/ingress.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- $serviceName := (include "alfresco-sync-service.fullname" .) -}} -{{- $servicePort := .Values.service.externalPort -}} -apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ template "alfresco-sync-service.fullname" . }}-ingress - annotations: - kubernetes.io/ingress.class: "nginx" - nginx.ingress.kubernetes.io/rewrite-target: /alfresco/$2 - nginx.ingress.kubernetes.io/affinity: "cookie" - nginx.ingress.kubernetes.io/session-cookie-name: "sync_affinity_route" - nginx.ingress.kubernetes.io/session-cookie-hash: "sha1" -{{- if .Values.ingress.extraAnnotations }} -{{ toYaml .Values.ingress.extraAnnotations | indent 4 }} -{{- end }} - -spec: - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- if .Values.ingress.hostName }} - - host: {{ tpl .Values.ingress.hostName $ }} - http: - {{- else }} - - http: - {{- end }} - paths: - - path: {{ .Values.ingress.path }}(/|$)(.*) - {{- if eq "true" (include "common.ingress.supportsPathType" .) }} - pathType: Prefix - {{- end }} - backend: {{- include "common.ingress.backend" (dict "serviceName" $serviceName "servicePort" $servicePort "context" $) | nindent 10 }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/templates/secret-database.yaml b/alfresco-content-services/charts/alfresco-sync-service/templates/secret-database.yaml deleted file mode 100644 index 1e3017e..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/templates/secret-database.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "alfresco-sync-service.fullname" . }}-dbsecret - labels: - {{- include "alfresco-sync-service.labels" . | nindent 4 }} -type: Opaque -data: - DATABASE_USERNAME: {{ include "alfresco-sync-service.dbUser" . | b64enc | quote }} - DATABASE_PASSWORD: {{ include "alfresco-sync-service.dbPass" . | b64enc | quote }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/templates/secret-message-broker.yaml b/alfresco-content-services/charts/alfresco-sync-service/templates/secret-message-broker.yaml deleted file mode 100644 index 41f2b23..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/templates/secret-message-broker.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if not .Values.messageBroker.existingSecretName }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "alfresco-sync-service.fullname" . }}-messagebroker-secret - labels: - {{- include "alfresco-sync-service.labels" . | nindent 4 }} -type: Opaque -data: - BROKER_URL: {{ include "alfresco-sync-service.brokerUrl" . | b64enc | quote }} - BROKER_USERNAME: {{ include "alfresco-sync-service.brokerUser" . | b64enc | quote }} - BROKER_PASSWORD: {{ include "alfresco-sync-service.brokerPass" . | b64enc | quote }} -{{- end }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/templates/svc-syncservice.yaml b/alfresco-content-services/charts/alfresco-sync-service/templates/svc-syncservice.yaml deleted file mode 100644 index 98d4c27..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/templates/svc-syncservice.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ template "alfresco-sync-service.fullname" . }} - labels: - {{- include "alfresco-sync-service.labels" . | nindent 4 }} -spec: - selector: - {{- include "alfresco-sync-service.selectorLabels" . | nindent 4 }} - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.image.internalPort }} - name: {{ .Values.service.name }} diff --git a/alfresco-content-services/charts/alfresco-sync-service/tests/database_test.yaml b/alfresco-content-services/charts/alfresco-sync-service/tests/database_test.yaml deleted file mode 100644 index 13e7c79..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/tests/database_test.yaml +++ /dev/null @@ -1,55 +0,0 @@ ---- -suite: test database secret -templates: - - config-syncservice.yaml - - secret-database.yaml -tests: - - it: should render default JDBC values - set: - postgresql: - enabled: true - asserts: - - matchRegex: - path: data.JAVA_OPTS - pattern: >- - -Dsql\.db\.url=jdbc:postgresql:\/\/RELEASE-NAME-postgresql-syncservice\/alfrescosync\s+ - template: config-syncservice.yaml - - matchRegex: - path: data.JAVA_OPTS - pattern: >- - -Dsql\.db\.driver="org.postgresql.Driver"\s+ - template: config-syncservice.yaml - - equal: - path: data.DATABASE_USERNAME - value: YWxmcmVzY28= - template: secret-database.yaml - - equal: - path: data.DATABASE_PASSWORD - value: YWRtaW4= - template: secret-database.yaml - - it: should render provided JDBC varlues - set: - database: - url: jdbc:mysql://mysqldb:1234/somedb - user: scott - password: tiger - driver: com.mysql.cj.jdbc.Driver - asserts: - - matchRegex: - path: data.JAVA_OPTS - pattern: >- - -Dsql\.db\.url=jdbc:mysql://mysqldb:1234/somedb\s+ - template: config-syncservice.yaml - - matchRegex: - path: data.JAVA_OPTS - pattern: >- - -Dsql\.db\.driver="com.mysql.cj.jdbc.Driver"\s+ - template: config-syncservice.yaml - - equal: - path: data.DATABASE_USERNAME - value: c2NvdHQ= - template: secret-database.yaml - - equal: - path: data.DATABASE_PASSWORD - value: dGlnZXI= - template: secret-database.yaml diff --git a/alfresco-content-services/charts/alfresco-sync-service/tests/deployment-syncservice_test.yaml b/alfresco-content-services/charts/alfresco-sync-service/tests/deployment-syncservice_test.yaml deleted file mode 100644 index b7befda..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/tests/deployment-syncservice_test.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -suite: test deployment -templates: - - deployment-syncservice.yaml - - config-syncservice.yaml - - secret-database.yaml -tests: - - it: should have basic metadata in place - set: &values - postgresql: - enabled: true - asserts: - - equal: - path: metadata.name - value: RELEASE-NAME-alfresco-sync-service - template: deployment-syncservice.yaml - - - it: should render cpu and memory limits - set: *values - asserts: - - equal: - path: spec.template.spec.containers[0].resources - value: - requests: - cpu: "0.5" - memory: "800Mi" - limits: - cpu: "2" - memory: "2000Mi" - template: deployment-syncservice.yaml diff --git a/alfresco-content-services/charts/alfresco-sync-service/tests/mq_test.yaml b/alfresco-content-services/charts/alfresco-sync-service/tests/mq_test.yaml deleted file mode 100644 index 2c7474f..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/tests/mq_test.yaml +++ /dev/null @@ -1,80 +0,0 @@ ---- -suite: test MQ config -templates: - - secret-message-broker.yaml -tests: - - it: should render default ActiveMQ details - set: - activemq: - enabled: true - asserts: - - equal: - path: data.BROKER_URL - value: >- - ZmFpbG92ZXI6KG5pbzovL1JFTEVBU0UtTkFNRS1hY3RpdmVtcS1icm9rZXI6NjE2MTYpP3RpbWVvdXQ9MzAwMCZqbXMudXNlQ29tcHJlc3Npb249dHJ1ZQ== - template: secret-message-broker.yaml - - equal: - path: data.BROKER_USERNAME - value: YWRtaW4= - template: secret-message-broker.yaml - - equal: - path: data.BROKER_PASSWORD - value: YWRtaW4= - template: secret-message-broker.yaml - - it: should render broker URL based on sole nameOverride - set: - messageBroker: - url: - nameOverride: aKnownBrokerName - asserts: - - equal: - path: data.BROKER_URL - value: >- - ZmFpbG92ZXI6KG5pbzovL1JFTEVBU0UtTkFNRS1hS25vd25Ccm9rZXJOYW1lLWJyb2tlcjo2MTYxNik/dGltZW91dD0zMDAwJmptcy51c2VDb21wcmVzc2lvbj10cnVl - template: secret-message-broker.yaml - - it: should render custom MQ config from dedicated Values context - set: - global: - messageBroker: - url: failover:(ssl://globalmq-1:61617) - user: globaluser - password: globalpass - messageBroker: - url: >- - failover:(ssl://somemoresecuremq-1:61617,ssl://somemoresecuremq-2:61617) - user: scott - password: tiger - asserts: - - equal: - path: data.BROKER_URL - value: >- - ZmFpbG92ZXI6KHNzbDovL3NvbWVtb3Jlc2VjdXJlbXEtMTo2MTYxNyxzc2w6Ly9zb21lbW9yZXNlY3VyZW1xLTI6NjE2MTcp - template: secret-message-broker.yaml - - equal: - path: data.BROKER_USERNAME - value: c2NvdHQ= - template: secret-message-broker.yaml - - equal: - path: data.BROKER_PASSWORD - value: dGlnZXI= - template: secret-message-broker.yaml - - it: should render custom MQ config from global context - set: - global: - messageBroker: - url: failover:(ssl://globalmq-1:61617) - user: globaluser - password: globalpass - asserts: - - equal: - path: data.BROKER_URL - value: ZmFpbG92ZXI6KHNzbDovL2dsb2JhbG1xLTE6NjE2MTcp - template: secret-message-broker.yaml - - equal: - path: data.BROKER_USERNAME - value: Z2xvYmFsdXNlcg== - template: secret-message-broker.yaml - - equal: - path: data.BROKER_PASSWORD - value: Z2xvYmFscGFzcw== - template: secret-message-broker.yaml diff --git a/alfresco-content-services/charts/alfresco-sync-service/tests/repo_test.yaml b/alfresco-content-services/charts/alfresco-sync-service/tests/repo_test.yaml deleted file mode 100644 index 9cf7619..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/tests/repo_test.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -suite: test deployment -templates: - - config-syncservice.yaml -tests: - - it: should render default options - set: - postgresql: - enabled: true - asserts: - - matchRegex: - path: data.JAVA_OPTS - pattern: >- - -Drepo.hostname=alfresco-cs-repository\s+ - - matchRegex: - path: data.JAVA_OPTS - pattern: >- - -Drepo.port=80\s+ - - it: should render options based on repo nameOverride - set: - postgresql: - enabled: true - repository: - nameOverride: myKnownServiceName - port: 8080 - asserts: - - matchRegex: - path: data.JAVA_OPTS - pattern: >- - -Drepo.hostname=RELEASE-NAME-myKnownServiceName\s+ - - matchRegex: - path: data.JAVA_OPTS - pattern: >- - -Drepo.port=8080\s+ - - it: should render options as provided in values - set: - postgresql: - enabled: true - repository: - host: somerepohost - port: 8888 - asserts: - - matchRegex: - path: data.JAVA_OPTS - pattern: >- - -Drepo.hostname=somerepohost\s+ - - matchRegex: - path: data.JAVA_OPTS - pattern: >- - -Drepo.port=8888\s+ diff --git a/alfresco-content-services/charts/alfresco-sync-service/values.yaml b/alfresco-content-services/charts/alfresco-sync-service/values.yaml deleted file mode 100644 index 9d2f255..0000000 --- a/alfresco-content-services/charts/alfresco-sync-service/values.yaml +++ /dev/null @@ -1,140 +0,0 @@ ---- -replicaCount: 1 -nodeSelector: {} -# -- Global definition of Docker registry pull secret which can be overridden -# from parent ACS Helm chart(s) -global: - messageBroker: - # -- A failover URI formatted string, see: - # https://activemq.apache.org/failover-transport-reference - url: - # -- Username to authenticate as. - user: - # -- Credential to use to authenticate to the broker. - password: - alfrescoRegistryPullSecrets: quay-registry-secret - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 -podSecurityContext: - runAsUser: 33020 - runAsGroup: 1000 - runAsNonRoot: true - fsGroup: 1000 -image: - repository: quay.io/alfresco/service-sync - tag: 3.9.0 - pullPolicy: IfNotPresent - internalPort: 9090 -environment: - JAVA_OPTS: >- - -Dsync.metrics.reporter.graphite.enabled=false - -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 - EXTRA_JAVA_OPTS: "" -service: - name: syncservice - type: NodePort - externalPort: 80 -resources: - requests: - cpu: "0.5" - memory: "800Mi" - limits: - cpu: "2" - memory: "2000Mi" -livenessProbe: - initialDelaySeconds: 30 - periodSeconds: 30 - timeoutSeconds: 10 -readinessProbe: - initialDelaySeconds: 20 - periodSeconds: 10 - failureThreshold: 12 - timeoutSeconds: 10 -repository: - # -- ACS repository host - host: alfresco-cs-repository - # -- ACS repository port - port: 80 - # -- A nameOverride use to compute an ACS repository service name - nameOverride: -activemq: - # -- Toggle ActiveMQ chart dependency - # see [Alfresco ActiveMQ chart - # documentation](https://github.com/Alfresco/alfresco-helm-charts/tree/main/charts/activemq)) - enabled: false - nameOverride: activemq - adminUser: - # -- User to use to set as the connection user for ActiveMQ - user: admin - # -- Password to use to set as the connection user for ActiveMQ - password: admin - services: - broker: - ports: - external: - openwire: 61616 -messageBroker: - # -- A failover URI formatted string, see: - # https://activemq.apache.org/failover-transport-reference - url: - # -- A name that will be used as a base to get broker conenction details - nameOverride: activemq - # -- Username to authenticate as. - user: - # -- Credential to use to authenticate to the broker. - password: - # -- An existing k8s secret with broker details (prefered over using values) - existingSecretName: -# -- Defines properties required by sync service for connecting to the database -# If you set database.external to true you will have to setup the JDBC driver, -# user, password and JdbcUrl as `driver`, `user`, `password` & `url` subelements -# of `database`. Also make sure that the container has the db driver -postgresql: - # -- Toggle PostgreSQL chart dependency - # see [PostgreSQL Bitnami charts - # documentation](https://github.com/bitnami/charts/tree/main/bitnami/postgresql)) - enabled: false - nameOverride: postgresql-syncservice - auth: - enablePostgresUser: false - username: alfresco - password: admin - database: alfrescosync - primary: - extendedConfiguration: | - shared_buffers = 256MB - max_connections = 100 - wal_level = minimal - max_wal_senders = 0 - max_replication_slots = 0 - effective_cache_size = 1024GB - log_min_messages = LOG - resources: - limits: - cpu: "2" - memory: "2Gi" -database: - # -- The JDBC Driver to connect to the DB. - # If different from the default make sure your container image ships it. - driver: org.postgresql.Driver - # -- JDBC url to connect to the external DB - url: - # -- JDBC username to use to connect to the DB - user: alfresco - # -- JDBC password to use to connect to the DB - password: admin - # -- An existing kubernetes secret with DB info (prefered over using values) - existingSecretName: - -ingress: - # -- useful when running Sync service without SSL termination done by a load - # balancer, e.g. when ran on Minikube for testing purposes - # nginx.ingress.kubernetes.io/ssl-redirect: "false" - extraAnnotations: - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - tls: [] - path: /syncservice diff --git a/alfresco-content-services/charts/common/.helmignore b/alfresco-content-services/charts/common/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/alfresco-content-services/charts/common/.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 -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/alfresco-content-services/charts/common/Chart.yaml b/alfresco-content-services/charts/common/Chart.yaml deleted file mode 100644 index 5d7ab4f..0000000 --- a/alfresco-content-services/charts/common/Chart.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -description: A Helm chart for Activiti Cloud Common Templates -icon: https://raw.githubusercontent.com/Activiti/activiti.github.io/master/mstile-150x150.png -name: common -sources: -- https://github.com/Activiti/activiti-cloud-common-chart -version: 7.7.0 diff --git a/alfresco-content-services/charts/common/Makefile b/alfresco-content-services/charts/common/Makefile deleted file mode 100644 index a0a3ef5..0000000 --- a/alfresco-content-services/charts/common/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -CURRENT=$(pwd) -NAME := common -OS := $(shell uname) -VERSION := $(or $(VERSION), $(shell cat ../../VERSION)) -GITHUB_CHARTS_REPO := "https://${GITHUB_TOKEN}@github.com/Activiti/activiti-cloud-helm-charts.git" -GITHUB_CHARTS_BRANCH := $(or $(GITHUB_CHARTS_BRANCH),gh-pages) - -plugin: - helm plugin install https://github.com/quintush/helm-unittest || true - -build: clean - helm dep up - helm lint - -install: build - helm install . ${NAME} - -test: plugin - helm unittest . --helm3 - -upgrade: clean build - helm upgrade ${NAME} . - -delete: - helm delete ${NAME} --namespace ${PREVIEW_NAMESPACE} - -clean: - rm -rf requirements.lock - rm -rf charts - rm -rf ${NAME}*.tgz - -release: build - helm package . - -github: - $(eval GITHUB_CHARTS_DIR := $(shell basename $(GITHUB_CHARTS_REPO) .git)) - rm -rf $$GITHUB_CHARTS_DIR || echo "try to remove $$GITHUB_CHARTS_DIR" - git clone -b "$(GITHUB_CHARTS_BRANCH)" "$(GITHUB_CHARTS_REPO)" $(GITHUB_CHARTS_DIR) - mkdir $(GITHUB_CHARTS_DIR)/new-charts - cp "$(NAME)-$(VERSION).tgz" $(GITHUB_CHARTS_DIR)/new-charts - cd $(GITHUB_CHARTS_DIR) && \ - helm repo index new-charts --merge index.yaml && \ - cp new-charts/* . && \ - rm -fr new-charts && \ - git add . && \ - git status && \ - git commit -m "fix:(version) release $(NAME)-$(VERSION).tgz" && \ - git pull --rebase && \ - git push --force origin "$(GITHUB_CHARTS_BRANCH)" - rm -rf $(GITHUB_CHARTS_DIR) - -version: - yq -i e '.version = "$(VERSION)"' Chart.yaml - -tag: - git add -u - git commit -m "release $(VERSION)" --allow-empty # if first release then no version update is performed - git tag -fa $(TAG_PREFIX)$(VERSION) -m "Release version $(VERSION)" - git push -f -q https://${GITHUB_TOKEN}@github.com/Activiti/activiti-cloud-common-chart.git $(TAG_PREFIX)$(VERSION) - -updatebot/push-version: - cd ../../ && \ - updatebot push-version --kind helm $(NAME) $(VERSION) ACTIVITI_CLOUD_COMMON_HELM_CHART $(VERSION) && \ - cd .updatebot-repos/github/activiti/activiti-cloud-full-chart && \ - helm-docs && \ - git add charts/activiti-cloud-full-example/README.md && \ - git commit -m "update helm-docs for common chart v$(VERSION)" --allow-empty && \ - git push --set-upstream origin $(shell cd .updatebot-repos/github/activiti/activiti-cloud-full-chart && git rev-parse --abbrev-ref HEAD) diff --git a/alfresco-content-services/charts/common/README.md b/alfresco-content-services/charts/common/README.md deleted file mode 100644 index c6536e4..0000000 --- a/alfresco-content-services/charts/common/README.md +++ /dev/null @@ -1,151 +0,0 @@ -# common - -![Version: 7.7.0](https://img.shields.io/badge/Version-7.7.0-informational?style=flat-square) - -A Helm chart for Activiti Cloud Common Templates - -## Source Code - -* - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| affinity | object | `{}` | allows customising affinity | -| config.args | string | `"-c"` | | -| config.command | string | `"sh"` | | -| config.env.APPLICATION_PROPERTIES | string | `"{{ .Values.config.mountPath | trimSuffix \"/\" }}/application.properties"` | | -| config.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy for the config image | -| config.image.repository | string | `"docker.io/busybox"` | Image used to run config init container at startup | -| config.image.tag | float | `1.32` | Image tag for the config image | -| config.mountPath | string | `"/opt/config/"` | | -| config.resources | object | `{"limits":{"cpu":"10m","memory":"16Mi"},"requests":{"cpu":"10m","memory":"16Mi"}}` | Resource requests and limits for the config container | -| config.securityContext | object | `{"allowPrivilegeEscalation":false,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000}` | SecurityContext for the config container | -| config.volumeName | string | `"config"` | | -| db.ddlAuto | string | `"validate"` | | -| db.driver | string | `"org.postgresql.Driver"` | | -| db.generateDdl | bool | `false` | | -| db.password | string | `nil` | | -| db.platform | string | `"org.hibernate.dialect.PostgreSQLDialect"` | | -| db.uri | string | `nil` | | -| db.username | string | `"postgres"` | | -| enabled | bool | `false` | generate resources only if true, false by default so you can just use the partials | -| env | object | `{}` | add env entries to deployments as dict | -| extraEnv | string | `""` | add env entries to deployments as string | -| extraInitContainers | string | `""` | adds extraInitContainers to deployments | -| extraVolumeMounts | string | `""` | add additional volume mounts as yaml string | -| extraVolumes | string | `""` | add additional volumes as yaml string | -| global.extraEnv | string | `""` | adds global extraEnv to deployments | -| global.gateway.domain | string | `""` | configure default domain for gateway host, i.e. "{{ .Release.Name }}.127.0.0.1.nip.io" | -| global.gateway.host | string | `""` | configure default gateway host Helm template, i.e. "gateway.{{ .Values.global.gateway.domain }}" | -| global.gateway.http | bool | `true` | toggle creating http or https ingress rules, supports literal or boolean values | -| global.gateway.tlsacme | bool | `false` | used to enable automatic TLS for ingress if http is false | -| global.kafka.brokers | string | `""` | | -| global.kafka.extraEnv | string | `""` | | -| global.kafka.port | int | `9092` | | -| global.keycloak.enabled | bool | `true` | | -| global.keycloak.extraEnv | string | `""` | adds Keycloak extraEnv to deployments | -| global.keycloak.host | string | `""` | configure default keycloak host template, i.e "identity.{{ .Values.global.gateway.domain }}" | -| global.keycloak.path | string | `"/auth"` | configure default keycloak path | -| global.keycloak.realm | string | `"activiti"` | configure default Keycloak realm | -| global.keycloak.resource | string | `"activiti"` | configure default Keycloak resource | -| global.keycloak.url | string | `""` | overrides gateway host configuration | -| global.messaging.broker | string | `""` | configure message broker type for all deployments with messaging.enabled set to 'true' | -| global.messaging.destinationIllegalCharsRegex | string | `"[\\t\\s*#:]"` | Configure regex expression to use for replacement of illegal characters in the destination names. | -| global.messaging.destinationIllegalCharsReplacement | string | `"-"` | Configure replacement character for illegal characters in the destination names. | -| global.messaging.destinationPrefix | string | `""` | Set destination separator to use to build full destinations, i.e. _destination. | -| global.messaging.destinationSeparator | string | `"_"` | Set destination separator to use to build full destinations, i.e. prefix<_>destination. | -| global.messaging.destinationTransformers | string | `"toLowerCase,escapeIllegalChars"` | Comma separated list of transformer functions to apply conversion to all destination name for producers, consumers and connectors | -| global.messaging.destinationTransformersEnabled | bool | `false` | Enable destination name transformers to apply conversion to all destination name for producers, consumers and connectors | -| global.messaging.destinations | object | `{}` | Configure destination properties to apply customization to producers and consumer channel bindings with matching destination key. | -| global.messaging.partitionCount | int | `2` | Set partition count for partitioned mode. | -| global.messaging.partitioned | bool | `false` | Enable partitioned messaging configuration for engine events producer and consumers | -| global.rabbitmq.extraEnv | string | `""` | | -| global.rabbitmq.host | string | `""` | | -| global.rabbitmq.password | string | `"guest"` | | -| global.rabbitmq.username | string | `"guest"` | | -| global.registryPullSecrets | list | `[]` | configure pull secrets for all deployments | -| hpa.enabled | bool | `false` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"activiti/replaceme"` | | -| image.tag | string | `"latest"` | | -| ingress.annotations | object | `{}` | configure ingress annotations as key:value pairs | -| ingress.enabled | bool | `true` | set to false to disable ingress record generation | -| ingress.hostName | string | `nil` | if set, overrides .Values.global.gateway.host configuration | -| ingress.path | string | `"/"` | set ingress path | -| ingress.servicePort | string | `nil` | the Service port targeted by the Ingress, defaults to service.externalPort | -| ingress.subPaths | list | `[]` | set multiple ingress subpaths | -| ingress.tls | string | `nil` | set to true in order to enable TLS on the ingress record | -| ingress.tlsSecret | string | `nil` | if tls is set to true, you must declare what secret will store the key/certificate for TLS | -| initContainers | list | `[]` | add additional initContainers as list | -| javaOpts.extra | string | `""` | provide extra options for Java runtime, i.e. -Djavax.net.ssl.truststore=/mnt/secrets/cacerts | -| javaOpts.other | string | `"-XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90"` | | -| javaOpts.xms | string | `"256m"` | | -| javaOpts.xmx | string | `"1024m"` | | -| kafka.brokers | string | `"{{ tpl .Values.global.kafka.brokers $ }}"` | | -| kafka.extraEnv | string | `"{{ tpl .Values.global.kafka.extraEnv $ }}"` | | -| kafka.port | string | `"{{ .Values.global.kafka.port }}"` | | -| liquibase.args | list | `["-jar","liquibase.jar"]` | arguments for liquibase container | -| liquibase.enabled | bool | `false` | | -| liquibase.env | object | `{}` | add env entries to liquibase init container as dict | -| liquibase.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy for the liquibase image | -| liquibase.image.repository | string | `nil` | image used to run liquibase database migrations @default image.repository | -| liquibase.image.tag | string | `nil` | Image tag for the liquibase image @default image.tag | -| livenessProbe.failureThreshold | int | `4` | | -| livenessProbe.initialDelaySeconds | int | `60` | | -| livenessProbe.path | string | `nil` | set liveness probe path, each service should provide its own value or default @default empty, each service should provide its own value or template or default probePath | -| livenessProbe.periodSeconds | int | `15` | | -| livenessProbe.successThreshold | int | `1` | | -| livenessProbe.timeoutSeconds | int | `4` | | -| messaging.consumer.config.script | string | `"echo activiti.cloud.messaging.broker={{ .Values.global.messaging.broker }} >> $APPLICATION_PROPERTIES\necho activiti.cloud.messaging.partitioned={{ .Values.global.messaging.partitioned }} >> $APPLICATION_PROPERTIES\necho activiti.cloud.messaging.partition-count={{ .Values.global.messaging.partitionCount }} >> $APPLICATION_PROPERTIES\necho activiti.cloud.messaging.instance-index=${HOSTNAME##*-} >> $APPLICATION_PROPERTIES\n"` | | -| messaging.enabled | bool | `false` | | -| messaging.producer.config.script | string | `"echo activiti.cloud.messaging.broker={{ .Values.global.messaging.broker }} >> $APPLICATION_PROPERTIES\necho activiti.cloud.messaging.partitioned={{ .Values.global.messaging.partitioned }} >> $APPLICATION_PROPERTIES\necho activiti.cloud.messaging.partition-count={{ .Values.global.messaging.partitionCount }} >> $APPLICATION_PROPERTIES\n"` | | -| messaging.role | string | `""` | required configuration of the messaging role, i.e. producer, consumer, or connector | -| nodeSelector | object | `{}` | allows customising nodeSelector | -| pgchecker.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy for the pgchecker image | -| pgchecker.image.repository | string | `"docker.io/busybox"` | Image used to check Postgresql readiness at startup | -| pgchecker.image.tag | float | `1.32` | Image tag for the pgchecker image | -| pgchecker.resources | object | `{"limits":{"cpu":"10m","memory":"16Mi"},"requests":{"cpu":"10m","memory":"16Mi"}}` | Resource requests and limits for the pgchecker container | -| pgchecker.securityContext | object | `{"allowPrivilegeEscalation":false,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000}` | SecurityContext for the pgchecker container | -| podAnnotations | object | `{}` | configure deployment pod podAnnotations as dict | -| podLabels | object | `{}` | configure deployment pod podLabels as dict | -| podSecurityContext | object | `{}` | | -| postgresql.enabled | bool | `false` | | -| postgresql.name | string | `"postgresql"` | | -| postgresql.port | int | `5432` | | -| probePath | string | `nil` | set default probe path for both liveness and readiness @default empty, each service should provide its own value or template, i.e. '{{ tpl .Values.ingress.path . }}/actuator/health' | -| rabbitmq.enabled | bool | `false` | | -| rabbitmq.extraEnv | string | `"{{ tpl .Values.global.rabbitmq.extraEnv $ }}"` | | -| rabbitmq.host | string | `"{{ tpl .Values.global.rabbitmq.host $ | default (include \"common.rabbitmq.fullname\" $) }}"` | | -| rabbitmq.password | string | `"{{ .Values.global.rabbitmq.password }}"` | | -| rabbitmq.username | string | `"{{ .Values.global.rabbitmq.username }}"` | | -| readinessProbe.failureThreshold | int | `4` | | -| readinessProbe.initialDelaySeconds | int | `20` | | -| readinessProbe.path | string | `nil` | set readiness probe path, each service should provide its own value or default @default empty, each service should provide its own value or template or default probePath | -| readinessProbe.periodSeconds | int | `15` | | -| readinessProbe.successThreshold | int | `1` | | -| readinessProbe.timeoutSeconds | int | `3` | | -| registryPullSecrets | list | `[]` | configures additional pull secrets for this deployment | -| replicaCount | int | `1` | number of replicas | -| resources | object | `{}` | configure resources requests and limits for deployment | -| securityContext | object | `{}` | | -| service.annotations | object | `{}` | | -| service.envType | string | `"backend"` | which type of env, currently supported ones are either backend which is the default or frontend | -| service.externalPort | int | `80` | | -| service.internalPort | int | `8080` | | -| service.name | string | `nil` | | -| service.nodePort | string | `nil` | | -| service.portName | string | `"http"` | | -| service.portProtocol | string | `"TCP"` | | -| service.type | string | `"ClusterIP"` | | -| sidecars | list | `[]` | add additional sidecar containers as list | -| statefulset.podManagementPolicy | string | `"Parallel"` | | -| statefulset.updateStrategyType | string | `"RollingUpdate"` | | -| terminationGracePeriodSeconds | int | `20` | | -| tolerations | list | `[]` | allows customising tolerations | -| volumeMounts | list | `[]` | add additional volume mounts as list | -| volumes | list | `[]` | add additional volumes as list | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/alfresco-content-services/charts/common/templates/NOTES.txt b/alfresco-content-services/charts/common/templates/NOTES.txt deleted file mode 100644 index be7e9a0..0000000 --- a/alfresco-content-services/charts/common/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Get the application URL by running these commands: - -kubectl get ingress {{ template "common.fullname" . }} diff --git a/alfresco-content-services/charts/common/templates/_backend_env.yaml b/alfresco-content-services/charts/common/templates/_backend_env.yaml deleted file mode 100644 index 09fccab..0000000 --- a/alfresco-content-services/charts/common/templates/_backend_env.yaml +++ /dev/null @@ -1,117 +0,0 @@ -{{/* -Create SPRING_DATASOURCE_* env. -*/}} -{{- define "common.spring-datasource-env" -}} -- name: SPRING_DATASOURCE_URL - value: {{ with .Values.db.uri }}{{ tpl . $ }}{{ else }}{{ tpl "jdbc:postgresql://{{ include \"common.postgresql.fullname\" . }}:{{ .Values.postgresql.port }}/{{ .Values.db.username }}" . }}{{ end }} -- name: SPRING_DATASOURCE_DRIVER_CLASS_NAME - value: {{ .Values.db.driver }} -- name: SPRING_DATASOURCE_USERNAME - value: {{ .Values.db.username }} -- name: SPRING_DATASOURCE_PASSWORD - {{- if .Values.db.password }} - value: {{ .Values.db.password | quote }} - {{- else if .Values.postgresql.enabled }} - valueFrom: - secretKeyRef: - name: {{ include "common.postgresql.fullname" . }} - key: postgresql-password - {{- else }} - value: "" - {{- end }} -{{- end -}} - -{{/* -Create SPRING_JPA_* env. -*/}} -{{- define "common.spring-jpa-env" -}} -- name: SPRING_JPA_DATABASE_PLATFORM - value: {{ .Values.db.platform }} -- name: SPRING_JPA_GENERATE_DDL - value: {{ .Values.db.generateDdl | quote }} -- name: SPRING_JPA_HIBERNATE_DDL_AUTO - value: {{ .Values.db.ddlAuto }} -{{- end -}} - -{{/* -Create keycloak env. -*/}} -{{- define "common.keycloak-env" }} -- name: ACT_KEYCLOAK_URL - value: {{ include "common.keycloak-url" . }} - {{- with include "common.keycloak-realm" . }} -- name: ACT_KEYCLOAK_REALM - value: {{ . }} - {{- end }} - {{- with include "common.keycloak-resource" . }} -- name: ACT_KEYCLOAK_RESOURCE - value: {{ . }} - {{- end -}} -{{- end }} - -{{/* -Create backend service.envType env. -*/}} -{{- define "common.backend-env" -}} -- name: JAVA_OPTS - value: "-Xmx{{ .Values.javaOpts.xmx }} -Xms{{ .Values.javaOpts.xms }} {{ .Values.javaOpts.other }} {{ .Values.javaOpts.extra }}" -- name: SPRING_APPLICATION_NAME - value: {{ .Values.service.name | default (include "common.fullname" .) }} -{{- if and .Values.rabbitmq.enabled (not .Values.messaging.enabled) }} -{{ include "common.messaging.rabbitmq-env" $ }} -{{- end }} -{{- if .Values.messaging.enabled }} -{{- include "common.messaging.validateValues" $ }} -{{- $messagingEnvTemplate := tpl "common.messaging.{{ .Values.global.messaging.broker }}-env" . }} -{{ include $messagingEnvTemplate $ }} - {{- with .Values.global.messaging.destinationPrefix }} -- name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_PREFIX - value: {{ tpl . $ | quote }} - {{- end }} - {{- with .Values.global.messaging.destinationSeparator }} -- name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_SEPARATOR - value: {{ . | quote }} - {{- end }} -- name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_TRANSFORMERS_ENABLED - value: {{ .Values.global.messaging.destinationTransformersEnabled | default false | quote }} - {{- with .Values.global.messaging.destinationTransformers }} -- name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_TRANSFORMERS - value: {{ . | quote }} - {{- end }} - {{- with .Values.global.messaging.destinationIllegalCharsRegex }} -- name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_ILLEGAL_CHARS_REGEX - value: {{ . | quote }} - {{- end }} - {{- with .Values.global.messaging.destinationIllegalCharsReplacement }} -- name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_ILLEGAL_CHARS_REPLACEMENT - value: {{ . | quote }} - {{- end }} - {{- range $key, $val := .Values.global.messaging.destinations }} -- name: ACTIVITI_CLOUD_MESSAGING_DESTINATIONS_{{ $key | upper }}_NAME - value: {{ tpl $val.name $ | required "name is required" | quote }} - {{- if $val.scope }} -- name: ACTIVITI_CLOUD_MESSAGING_DESTINATIONS_{{ $key | upper }}_SCOPE - value: {{ tpl $val.scope $ | required "scope is required" | quote }} - {{- end }} - {{- if $val.prefix }} -- name: ACTIVITI_CLOUD_MESSAGING_DESTINATIONS_{{ $key | upper }}_PREFIX - value: {{ tpl $val.prefix $ | required "prefix is required" | quote }} - {{- end }} - {{- if $val.separator }} -- name: ACTIVITI_CLOUD_MESSAGING_DESTINATIONS_{{ $key | upper }}_SEPARATOR - value: {{ tpl $val.separator $ | required "separator is required" | quote }} - {{- end }} - {{- end }} -{{- end }} -{{- if include "common.keycloak-enabled" . }} -{{ include "common.keycloak-env" . }} -{{- end }} -{{- if or .Values.db.uri .Values.postgresql.enabled }} -{{ include "common.spring-datasource-env" . }} -{{ include "common.spring-jpa-env" . }} -{{- if .Values.liquibase.enabled }} -- name: SPRING_LIQUIBASE_ENABLED - value: "false" -{{ end }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/charts/common/templates/_deployment.yaml b/alfresco-content-services/charts/common/templates/_deployment.yaml deleted file mode 100644 index a528dc8..0000000 --- a/alfresco-content-services/charts/common/templates/_deployment.yaml +++ /dev/null @@ -1,170 +0,0 @@ -{{- define "common.deployment.tpl" -}} -{{ include "common.deployment.head" . }} -spec: - {{- if and .Values.messaging.enabled .Values.global.messaging.partitioned (eq .Values.messaging.role "consumer" ) }} - {{- if eq .Values.global.messaging.broker "kafka"}} - replicas: {{ .Values.replicaCount }} - {{- else }} - replicas: {{ .Values.global.messaging.partitionCount }} - {{- end }} - serviceName: {{ template "common.service.name" . }} - podManagementPolicy: {{ .Values.statefulset.podManagementPolicy }} - updateStrategy: - type: {{ .Values.statefulset.updateStrategyType }} - {{- else }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "common.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "common.selectorLabels" . | nindent 8 }} - {{- if .Values.podLabels }} - {{- include "common.values.tpl" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} - {{- with .Values.podAnnotations }} - annotations: - {{- include "common.values.tpl" (dict "value" . "context" $) | nindent 8 }} - {{- end }} - spec: - {{- with (include "common.registry-pull-secrets" .) }} - imagePullSecrets: - {{- . | nindent 8 }} - {{- end }} - {{- if or .Values.postgresql.enabled .Values.liquibase.enabled .Values.extraInitContainers .Values.messaging.enabled .Values.initContainers }} - initContainers: - {{- if and .Values.messaging.enabled .Values.global.messaging.partitioned (has .Values.messaging.role (list "consumer" "producer")) }} - - name: config-{{ .Values.messaging.role }} - image: "{{ .Values.config.image.repository }}:{{ .Values.config.image.tag }}" - imagePullPolicy: {{ .Values.config.image.pullPolicy }} - securityContext: - {{- toYaml .Values.config.securityContext | nindent 14 }} - command: - - {{ .Values.config.command }} - args: - {{- $role := get .Values.messaging .Values.messaging.role }} - - {{ .Values.config.args }} - - | {{ tpl $role.config.script . | nindent 14 }} - resources: - {{- toYaml .Values.config.resources | nindent 14 }} - volumeMounts: - - name: {{ .Values.config.volumeName }} - mountPath: {{ .Values.config.mountPath }} - env: - {{- range $key, $val := .Values.config.env }} - - name: {{ $key }} - value: {{ tpl (toString $val) $ | quote }} - {{- end }} - - {{- end }} - {{- if .Values.postgresql.enabled }} - - name: pgchecker - image: "{{ .Values.pgchecker.image.repository }}:{{ .Values.pgchecker.image.tag }}" - imagePullPolicy: {{ .Values.pgchecker.image.pullPolicy }} - securityContext: - {{- toYaml .Values.pgchecker.securityContext | nindent 14 }} - command: - - sh - - -c - - | - echo 'Waiting for PostgreSQL to become ready...' - - until printf "." && nc -z -w 2 {{ include "common.postgresql.fullname" . }} {{ .Values.postgresql.port }}; do - sleep 2; - done; - - echo 'PostgreSQL OK ✓' - resources: - {{- toYaml .Values.pgchecker.resources | nindent 14 }} - {{- end }} - {{- if .Values.liquibase.enabled }} - - name: liquibase - image: {{ .Values.liquibase.image.repository | default .Values.image.repository }}:{{ .Values.liquibase.image.tag | default .Values.image.tag }} - imagePullPolicy: {{ .Values.liquibase.image.pullPolicy }} - args: - {{- toYaml .Values.liquibase.args | nindent 14 }} - env: - {{- include "common.spring-datasource-env" . | nindent 14 }} - {{- range $key, $val := .Values.liquibase.env }} - - name: {{ $key }} - value: {{ tpl (toString $val) $ | quote }} - {{- end }} - {{- end }} - {{- with .Values.extraInitContainers }} - {{- include "common.values.tpl" (dict "value" . "context" $) | nindent 8 }} - {{- end -}} - {{- with .Values.initContainers }} - {{- include "common.values.tpl" (dict "value" . "context" $) | nindent 8 }} - {{- end -}} - {{- end }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - {{ $envTemplate := tpl "common.{{ .Values.service.envType }}-env" . }} - {{ include $envTemplate . | nindent 12 }} - {{ include "common.extra-env" . | nindent 12 }} - {{- range $key, $val := .Values.env }} - - name: {{ $key }} - value: {{ tpl (toString $val) $ | quote }} - {{- end }} - ports: - - containerPort: {{ .Values.service.internalPort }} - {{ include "common.probes.tpl" . | nindent 10 }} - {{- with .Values.resources }} - resources: - {{ toYaml . | nindent 12 }} - {{- end }} - volumeMounts: - {{- if and .Values.messaging.enabled .Values.global.messaging.partitioned (has .Values.messaging.role (list "consumer" "producer")) }} - - name: {{ .Values.config.volumeName }} - mountPath: {{ .Values.config.mountPath }} - {{- end }} - {{- with .Values.extraVolumeMounts }} - {{- include "common.values.tpl" (dict "value" . "context" $) | nindent 12 }} - {{- end }} - {{- with .Values.volumeMounts }} - {{- include "common.values.tpl" (dict "value" . "context" $) | nindent 12 }} - {{- end }} - {{- with .Values.sidecars }} - {{- include "common.values.tpl" (dict "value" . "context" $) | nindent 8 }} - {{- end }} - {{- with .Values.podSecurityContext }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- end }} - volumes: - {{- if and .Values.messaging.enabled .Values.global.messaging.partitioned (has .Values.messaging.role (list "consumer" "producer")) }} - - name: {{ .Values.config.volumeName }} - emptyDir: {} - {{- end }} - {{- with .Values.extraVolumes }} - {{- include "common.values.tpl" (dict "value" . "context" $) | nindent 8 }} - {{- end }} - {{- with .Values.volumes }} - {{- include "common.values.tpl" (dict "value" . "context" $) | nindent 8 }} - {{- end }} - {{- with .Values.terminationGracePeriodSeconds }} - terminationGracePeriodSeconds: {{ . }} - {{- 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 }} -{{- end -}} -{{- define "common.deployment" -}} -{{- template "common.util.merge" (append . "common.deployment.tpl") -}} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/_deployment_head.yaml b/alfresco-content-services/charts/common/templates/_deployment_head.yaml deleted file mode 100644 index 42c78e6..0000000 --- a/alfresco-content-services/charts/common/templates/_deployment_head.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- define "common.deployment.head" -}} -apiVersion: apps/v1 -kind: {{ if and .Values.messaging.enabled .Values.global.messaging.partitioned (eq .Values.messaging.role "consumer") }}StatefulSet{{ else }}Deployment{{ end }} -metadata: - name: {{ template "common.fullname" . }} - labels: - {{- include "common.labels" . | nindent 4 }} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/_frontend_env.yaml b/alfresco-content-services/charts/common/templates/_frontend_env.yaml deleted file mode 100644 index c6728a4..0000000 --- a/alfresco-content-services/charts/common/templates/_frontend_env.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- define "common.frontend-env" -}} -{{- $ingressPath := include "common.ingress-path" . -}} -- name: BASE_PATH - value: {{ $ingressPath }} -{{- if eq .Values.env.APP_CONFIG_AUTH_TYPE "OAUTH" }} -- name: APP_CONFIG_OAUTH2_HOST - value: {{ include "common.keycloak-url" . }}/realms/{{ include "common.keycloak-realm" . }} -- name: APP_CONFIG_OAUTH2_CLIENTID - value: {{ include "common.keycloak-resource" . }} -- name: APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI - value: {{ include "common.ingress-url" . }}/assets/silent-refresh.html -- name: APP_CONFIG_OAUTH2_REDIRECT_LOGIN - value: {{ $ingressPath }} -- name: APP_CONFIG_OAUTH2_REDIRECT_LOGOUT - value: {{ $ingressPath }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/_global.tpl b/alfresco-content-services/charts/common/templates/_global.tpl deleted file mode 100644 index fe1328a..0000000 --- a/alfresco-content-services/charts/common/templates/_global.tpl +++ /dev/null @@ -1,174 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Create a keycloak url template -*/}} -{{- define "common.keycloak-url" -}} - {{- $common := dict "Values" .Values.common -}} - {{- $noCommon := omit .Values "common" -}} - {{- $overrides := dict "Values" $noCommon -}} - {{- $noValues := omit . "Values" -}} - {{- with merge $noValues $overrides $common -}} - {{- $proto := include "common.gateway-proto" . -}} - {{- $host := include "common.keycloak-host" . -}} - {{- $path := include "common.keycloak-path" . -}} - {{- $url := printf "%s://%s%s" $proto $host $path -}} - {{- $keycloakUrl := default $url .Values.global.keycloak.url -}} - {{- tpl (printf "%s" $keycloakUrl ) . -}} - {{- end -}} -{{- end -}} - -{{/* -Create a gateway url template -*/}} -{{- define "common.gateway-url" -}} - {{- $common := dict "Values" .Values.common -}} - {{- $noCommon := omit .Values "common" -}} - {{- $overrides := dict "Values" $noCommon -}} - {{- $noValues := omit . "Values" -}} - {{- with merge $noValues $overrides $common -}} - {{- $proto := include "common.gateway-proto" . -}} - {{- $host := include "common.gateway-host" . -}} - {{- $gatewayUrl := printf "%s://%s" $proto $host -}} - {{- tpl $gatewayUrl . -}} - {{- end -}} -{{- end -}} - -{{- define "common.gateway-proto" -}} -{{- $http := toString .Values.global.gateway.http -}} -{{- if eq $http "false" }}https{{else}}http{{ end -}} -{{- end -}} - -{{- define "common.gateway-https-enabled" -}} -{{- $http := toString .Values.global.gateway.http -}} -{{- default "" (eq $http "false") -}} -{{- end -}} - -{{- define "common.gateway-host" -}} -{{- $value := default (include "common.gateway-domain" .) .Values.global.gateway.host -}} -{{- tpl (printf "%s" $value) . -}} -{{- end -}} - -{{- define "common.gateway-domain" -}} -{{- $value := default "" .Values.global.gateway.domain -}} -{{- tpl (printf "%s" $value) . -}} -{{- end -}} - -{{- define "common.keycloak-path" -}} -{{- $value := default "/auth" .Values.global.keycloak.path -}} -{{- tpl (printf "%s" $value) . -}} -{{- end -}} - -{{- define "common.keycloak-host" -}} -{{- $value := default (include "common.gateway-host" .) .Values.global.keycloak.host -}} -{{- tpl (printf "%s" $value) . -}} -{{- end -}} - -{{- define "common.keycloak-enabled" -}} -{{- default "" .Values.global.keycloak.enabled -}} -{{- end -}} - -{{/* -Create default pull secrets -*/}} -{{- define "common.registry-pull-secrets" -}} -{{- $common := dict "Values" .Values.common -}} -{{- $noCommon := omit .Values "common" -}} -{{- $overrides := dict "Values" $noCommon -}} -{{- $noValues := omit . "Values" -}} -{{- $values := merge $noValues $overrides $common -}} -{{- with $values -}} -{{- range $value := .Values.global.registryPullSecrets }} -- name: {{ tpl (printf "%s" $value) $values | quote }} -{{- end }} -{{- range $value := .Values.registryPullSecrets }} -- name: {{ tpl (printf "%s" $value) $values | quote }} -{{- end }} - -{{- end }} -{{- end -}} - -{{/* -Create a default keycloak realm -*/}} -{{- define "common.keycloak-realm" -}} - {{- $common := dict "Values" .Values.common -}} - {{- $noCommon := omit .Values "common" -}} - {{- $overrides := dict "Values" $noCommon -}} - {{- $noValues := omit . "Values" -}} - {{- with merge $noValues $overrides $common -}} - {{- $value := .Values.global.keycloak.realm -}} - {{- tpl (printf "%s" $value) . -}} - {{- end -}} -{{- end -}} - -{{/* -Create a default keycloak resource -*/}} -{{- define "common.keycloak-resource" -}} - {{- $common := dict "Values" .Values.common -}} - {{- $noCommon := omit .Values "common" -}} - {{- $overrides := dict "Values" $noCommon -}} - {{- $noValues := omit . "Values" -}} - {{- with merge $noValues $overrides $common -}} - {{- $value := .Values.global.keycloak.resource -}} - {{- tpl (printf "%s" $value) . -}} - {{- end -}} -{{- end -}} - -{{/* -Create a default extra env templated values -*/}} -{{- define "common.extra-env" -}} -{{- $common := dict "Values" .Values.common -}} -{{- $noCommon := omit .Values "common" -}} -{{- $overrides := dict "Values" $noCommon -}} -{{- $noValues := omit . "Values" -}} -{{- with merge $noValues $overrides $common -}} -{{- tpl .Values.global.keycloak.extraEnv . -}} -{{- tpl .Values.global.extraEnv . -}} -{{- tpl .Values.extraEnv . -}} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified app name for the postgresql requirement. -*/}} -{{- define "common.postgresql.fullname" -}} -{{- $postgresContext := dict "Values" .Values.postgresql "Release" .Release "Chart" (dict "Name" "postgresql") -}} -{{- if $postgresContext.Values.fullnameOverride -}} -{{- $postgresContext.Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default $postgresContext.Chart.Name $postgresContext.Values.nameOverride -}} -{{- if contains $name $postgresContext.Release.Name -}} -{{- $postgresContext.Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" $postgresContext.Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified app name for the kafka requirement. -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.kafka.fullname" -}} -{{- if contains "kafka" .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name "kafka" | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified app name for the rabbitmq requirement. -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.rabbitmq.fullname" -}} -{{- if contains "rabbitmq" .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name "rabbitmq" | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/_helpers.tpl b/alfresco-content-services/charts/common/templates/_helpers.tpl deleted file mode 100644 index 356ae3a..0000000 --- a/alfresco-content-services/charts/common/templates/_helpers.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "common.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "common.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 "common.fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "common.labels" -}} -helm.sh/chart: {{ include "common.chart" . }} -{{ include "common.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*NB* a name macro must be defined in the consumer chart -*/}} -{{- define "common.selectorLabels" -}} -app.kubernetes.io/name: {{ template "common.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} diff --git a/alfresco-content-services/charts/common/templates/_hpa.tpl b/alfresco-content-services/charts/common/templates/_hpa.tpl deleted file mode 100644 index b8b0efd..0000000 --- a/alfresco-content-services/charts/common/templates/_hpa.tpl +++ /dev/null @@ -1,49 +0,0 @@ -{{- define "common.hpa.tpl" -}} -apiVersion: autoscaling/v2beta2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "common.fullname" . }} - namespace: {{ .Release.Namespace }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: {{ if and .Values.messaging.enabled .Values.global.messaging.partitioned (eq .Values.messaging.role "consumer") }}StatefulSet{{ else }}Deployment{{ end }} - name: {{ template "common.fullname" . }} - minReplicas: {{ .Values.hpa.minReplicas }} - maxReplicas: {{ .Values.hpa.maxReplicas }} - metrics: - {{- if .Values.hpa.cpu }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ .Values.hpa.cpu }} - {{- end }} - {{- if .Values.hpa.memory }} - - type: Resource - resource: - name: memory - target: - type: AverageValue - averageValue: {{ .Values.hpa.memory | quote }} - {{- end }} - {{- if or (not (hasKey .Values.hpa "scalingPolicesEnabled")) .Values.hpa.scalingPolicesEnabled }} - behavior: - scaleDown: - policies: - - type: Pods - value: 1 - periodSeconds: 60 - - type: Percent - value: 15 - periodSeconds: 60 - selectPolicy: Max - {{- end }} -{{- end -}} - -{{- define "common.hpa" -}} - {{- if index (first .) "Values" "hpa" "enabled" -}} - {{- template "common.util.merge" (append . "common.hpa.tpl") -}} - {{- end -}} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/_ingress.tpl b/alfresco-content-services/charts/common/templates/_ingress.tpl deleted file mode 100644 index 3e37390..0000000 --- a/alfresco-content-services/charts/common/templates/_ingress.tpl +++ /dev/null @@ -1,132 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Create a default tls secret name. -*/}} -{{- define "common.ingress-tlssecretname" -}} - {{- $common := dict "Values" .Values.common -}} - {{- $noCommon := omit .Values "common" -}} - {{- $overrides := dict "Values" $noCommon -}} - {{- $noValues := omit . "Values" -}} - {{- with merge $noValues $overrides $common -}} - {{- $tlsacmename := include "common.tlsacme-secretname" . -}} - {{- $tlssecretname := default $tlsacmename .Values.ingress.tlsSecret -}} - {{- tpl (printf "%s" $tlssecretname) $ | trunc 48 | trimSuffix "-" -}} - {{- end -}} -{{- end -}} - -{{- define "common.tlsacme-secretname" -}} - {{- if include "common.tlsacme-enabled" . -}} - {{- printf "tls-%s-%s" .Release.Name .Chart.Name -}} - {{- else -}} - {{- printf "" -}} - {{- end -}} -{{- end -}} - -{{/* -Create a default ingress host. -*/}} -{{- define "common.ingress-host" -}} - {{- $common := dict "Values" .Values.common -}} - {{- $noCommon := omit .Values "common" -}} - {{- $overrides := dict "Values" $noCommon -}} - {{- $noValues := omit . "Values" -}} - {{- with merge $noValues $overrides $common -}} - {{- $ingressHost := default (include "common.gateway-host" .) .Values.ingress.hostName -}} - {{- tpl (printf "%s" $ingressHost) . -}} - {{- end -}} -{{- end -}} - -{{/* -Create a default ingress path. -*/}} -{{- define "common.ingress-path" -}} - {{- $common := dict "Values" .Values.common -}} - {{- $noCommon := omit .Values "common" -}} - {{- $overrides := dict "Values" $noCommon -}} - {{- $noValues := omit . "Values" -}} - {{- with merge $noValues $overrides $common -}} - {{- tpl (printf "%s" .Values.ingress.path) . -}} - {{- end -}} -{{- end -}} - -{{/* -Create an ingress url template -*/}} -{{- define "common.ingress-url" -}} - {{- $common := dict "Values" .Values.common -}} - {{- $noCommon := omit .Values "common" -}} - {{- $overrides := dict "Values" $noCommon -}} - {{- $noValues := omit . "Values" -}} - {{- with merge $noValues $overrides $common -}} - {{- $proto := include "common.gateway-proto" . -}} - {{- $host := include "common.ingress-host" . -}} - {{- $path := include "common.ingress-path" . -}} - {{- $pathNoSlash := ternary $path "" (ne $path "/") -}} - {{- $url := printf "%s://%s%s" $proto $host $pathNoSlash -}} - {{- $ingressUrl := default $url .Values.ingress.url -}} - {{- tpl (printf "%s" $ingressUrl ) . -}} - {{- end -}} -{{- end -}} - -{{/* -Create a default ingress tls. -*/}} -{{- define "common.ingress-tls" -}} - {{- $common := dict "Values" .Values.common -}} - {{- $noCommon := omit .Values "common" -}} - {{- $overrides := dict "Values" $noCommon -}} - {{- $noValues := omit . "Values" -}} - {{- with merge $noValues $overrides $common -}} - {{- $tlsacme := include "common.tlsacme-enabled" . -}} - {{- $tls := toString .Values.ingress.tls -}} - {{- default "" (or (eq $tlsacme "true") (eq $tls "true")) -}} - {{- end -}} -{{- end -}} - -{{/* -Create default ingress annotations -*/}} -{{- define "common.ingress-annotations" -}} -{{- $common := dict "Values" .Values.common -}} -{{- $noCommon := omit .Values "common" -}} -{{- $overrides := dict "Values" $noCommon -}} -{{- $noValues := omit . "Values" -}} -{{- $values := merge $noValues $overrides $common -}} -{{- with $values -}} -{{- range $key, $value := .Values.global.gateway.annotations }} -{{ $key }}: {{ tpl (printf "%s" $value) $values | quote }} -{{- end }} -{{- range $key, $value := .Values.ingress.annotations }} -{{- if (ne (toString $value) "null") }} -{{ $key }}: {{ tpl (printf "%s" $value) $values | quote }} -{{- end }} -{{- end }} - -{{- if include "common.tlsacme-enabled" . }} -{{ "kubernetes.io/tls-acme" }}: {{ include "common.tlsacme-enabled" . | quote }} -{{- end }} - -{{- end }} -{{- end -}} - -{{/* -Default tlsacme-enabled template -*/}} -{{- define "common.tlsacme-enabled" -}} - {{- $http := tpl (toString .Values.global.gateway.http) . -}} - {{- $tlsacme := tpl (toString .Values.global.gateway.tlsacme) . -}} - {{- default "" (and (eq $tlsacme "true") (eq $http "false")) -}} -{{- end -}} - -{{/* -Ingress API version -*/}} -{{- define "common.ingress-apiversion" -}} -{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}} -{{- print "networking.k8s.io/v1" -}} -{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}} -{{- print "networking.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "extensions/v1beta1" -}} -{{- end -}} -{{- end }} diff --git a/alfresco-content-services/charts/common/templates/_ingress.yaml b/alfresco-content-services/charts/common/templates/_ingress.yaml deleted file mode 100644 index 30cc91d..0000000 --- a/alfresco-content-services/charts/common/templates/_ingress.yaml +++ /dev/null @@ -1,63 +0,0 @@ -{{- define "common.ingress.tpl" -}} -apiVersion: {{ include "common.ingress-apiversion" . }} -kind: Ingress -metadata: - name: {{ template "common.fullname" . }} - labels: - {{- include "common.labels" . | nindent 4 }} - {{- with (include "common.ingress-annotations" .) }} - annotations: - {{- . | nindent 4 }} - {{- end }} -spec: - rules: - {{- with (include "common.ingress-host" .) }} - - host: {{ . }} - http: - {{- else }} - - http: - {{- end }} - paths: - {{- $serviceName := .Values.service.name -}} - {{- $externalPort := coalesce .Values.ingress.servicePort .Values.service.externalPort -}} - {{- $ingressPath := include "common.ingress-path" . -}} - {{- $serviceNameTemplate := include "common.fullname" . -}} - {{- $paths := list }} - {{- if .Values.ingress.subPaths -}} - {{- $ingressPathNoSlash := ternary $ingressPath "" (ne $ingressPath "/") -}} - {{- range .Values.ingress.subPaths }} - {{- $path := list $ingressPathNoSlash . | join "" }} - {{- $paths = append $paths $path }} - {{- end }} - {{- else -}} - {{- $paths = append $paths $ingressPath }} - {{- end -}} - {{- range $paths }} - - path: {{ . }} - {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} - pathType: Prefix - backend: - service: - name: {{ coalesce $serviceName $serviceNameTemplate }} - port: - {{ ternary "name" "number" (kindIs "string" $externalPort) }}: {{ $externalPort }} - {{- else }} - backend: - serviceName: {{ coalesce $serviceName $serviceNameTemplate }} - servicePort: {{ $externalPort }} - {{- end }} - {{- end }} - {{- if include "common.ingress-tls" . }} - tls: - - secretName: {{ template "common.ingress-tlssecretname" . }} - {{- with (include "common.ingress-host" .) }} - hosts: - - {{ . }} - {{- end }} - {{- end }} -{{- end }} -{{- define "common.ingress" -}} - {{- if index (first .) "Values" "ingress" "enabled" -}} - {{- template "common.util.merge" (append . "common.ingress.tpl") -}} - {{- end -}} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/_messaging.tpl b/alfresco-content-services/charts/common/templates/_messaging.tpl deleted file mode 100644 index 17b8e29..0000000 --- a/alfresco-content-services/charts/common/templates/_messaging.tpl +++ /dev/null @@ -1,38 +0,0 @@ -{{/* Validate values of Activiti Cloud - Messaging System */}} -{{- define "common.messaging.validateValues" -}} -{{- if not (hasKey .Values.global .Values.global.messaging.broker) -}} -{{- required "\nActiviti Cloud: Messaging System\nYou can only use supported messaging system.\nPlease enable only 'rabbitmq` or 'kafka' as messaging system.\n" nil -}} -{{- end -}} -{{- end -}} - -{{/* - Create SPRING_RABBITMQ_* env. -*/}} -{{- define "common.messaging.rabbitmq-env" -}} -- name: ACTIVITI_CLOUD_MESSAGING_BROKER - value: rabbitmq -- name: SPRING_RABBITMQ_HOST - value: {{ tpl .Values.rabbitmq.host $ | required "rabbitmq.host is required" }} -{{- if tpl .Values.rabbitmq.username $ }} -- name: SPRING_RABBITMQ_USERNAME - value: {{ tpl .Values.rabbitmq.username $ }} -{{- end }} -{{- if tpl .Values.rabbitmq.password $ }} -- name: SPRING_RABBITMQ_PASSWORD - value: {{ tpl .Values.rabbitmq.password $ }} -{{- end }} -{{ tpl .Values.rabbitmq.extraEnv $ }} -{{- end -}} - -{{/* - Create SPRING_CLOUD_STREAM_KAFKA_* env. -*/}} -{{- define "common.messaging.kafka-env" -}} -- name: ACTIVITI_CLOUD_MESSAGING_BROKER - value: kafka -- name: SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS - value: {{ tpl .Values.kafka.brokers $ | required "kafka.brokers is required" }} -- name: SPRING_CLOUD_STREAM_KAFKA_BINDER_DEFAULTBROKERPORT - value: {{ tpl .Values.kafka.port $ | default "9092" | quote }} -{{ tpl .Values.kafka.extraEnv $ }} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/_probes.yaml b/alfresco-content-services/charts/common/templates/_probes.yaml deleted file mode 100644 index 675c436..0000000 --- a/alfresco-content-services/charts/common/templates/_probes.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- define "common.probes.tpl" -}} -{{- $ingressPath := include "common.ingress-path" . -}} -livenessProbe: - httpGet: - path: {{ tpl (coalesce .Values.livenessProbe.path .Values.probePath $ingressPath) . }} - port: {{ .Values.service.internalPort }} - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - failureThreshold: {{ .Values.livenessProbe.failureThreshold }} -readinessProbe: - httpGet: - path: {{ tpl (coalesce .Values.readinessProbe.path .Values.probePath $ingressPath) . }} - port: {{ .Values.service.internalPort }} - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/_service.yaml b/alfresco-content-services/charts/common/templates/_service.yaml deleted file mode 100644 index e7d7274..0000000 --- a/alfresco-content-services/charts/common/templates/_service.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- define "common.service.tpl" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "common.service.name" . }} - labels: - {{- include "common.labels" . | nindent 4 }} - annotations: - {{- include "common.service.annotations" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - {{- with .Values.service.nodePort }} - nodePort: {{ . }} - {{- end }} - protocol: {{ .Values.service.portProtocol }} - name: {{ .Values.service.portName }} - selector: - {{- include "common.selectorLabels" . | nindent 4 }} -{{- end -}} -{{- define "common.service" -}} -{{- template "common.util.merge" (append . "common.service.tpl") -}} -{{- end -}} - -{{- define "common.service.name" -}} -{{ .Values.service.name | default (include "common.fullname" .) | quote }} -{{- end -}} - -{{- define "common.service.annotations" }} -{{ tpl (toYaml (.Values.service.annotations | default (dict ))) . }} -{{- end }} diff --git a/alfresco-content-services/charts/common/templates/_util.tpl b/alfresco-content-services/charts/common/templates/_util.tpl deleted file mode 100644 index a7d4cc7..0000000 --- a/alfresco-content-services/charts/common/templates/_util.tpl +++ /dev/null @@ -1,15 +0,0 @@ -{{- /* -common.util.merge will merge two YAML templates and output the result. - -This takes an array of three values: -- the top context -- the template name of the overrides (destination) -- the template name of the base (source) - -*/ -}} -{{- define "common.util.merge" -}} -{{- $top := first . -}} -{{- $overrides := fromYaml (include (index . 1) $top) | default (dict ) -}} -{{- $tpl := fromYaml (include (index . 2) $top) | default (dict ) -}} -{{- toYaml (merge $overrides $tpl) -}} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/_values.tpl b/alfresco-content-services/charts/common/templates/_values.tpl deleted file mode 100644 index 0cffe41..0000000 --- a/alfresco-content-services/charts/common/templates/_values.tpl +++ /dev/null @@ -1,12 +0,0 @@ -{{/* -Renders a value that contains template. -Usage: -{{ include "common.values.tpl" ( dict "value" .Values.path.to.the.Value "context" $) }} -*/}} -{{- define "common.values.tpl" -}} - {{- if typeIs "string" .value }} - {{- tpl .value .context }} - {{- else }} - {{- tpl (.value | toYaml) .context }} - {{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/deployment.yaml b/alfresco-content-services/charts/common/templates/deployment.yaml deleted file mode 100644 index 0014458..0000000 --- a/alfresco-content-services/charts/common/templates/deployment.yaml +++ /dev/null @@ -1,5 +0,0 @@ -{{- if .Values.enabled -}} -{{- template "common.deployment" (list . "activiti.cloud.deployment") -}} -{{- end -}} -{{- define "activiti.cloud.deployment" -}} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/hpa.yaml b/alfresco-content-services/charts/common/templates/hpa.yaml deleted file mode 100644 index db65c93..0000000 --- a/alfresco-content-services/charts/common/templates/hpa.yaml +++ /dev/null @@ -1,5 +0,0 @@ -{{- if .Values.enabled -}} -{{- template "common.hpa" (list . "activiti.cloud.hpa") -}} -{{- end -}} -{{- define "activiti.cloud.hpa" -}} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/ingress.yaml b/alfresco-content-services/charts/common/templates/ingress.yaml deleted file mode 100644 index 858db9e..0000000 --- a/alfresco-content-services/charts/common/templates/ingress.yaml +++ /dev/null @@ -1,5 +0,0 @@ -{{- if .Values.enabled -}} -{{- template "common.ingress" (list . "activiti.cloud.ingress") -}} -{{- end -}} -{{- define "activiti.cloud.ingress" -}} -{{- end -}} diff --git a/alfresco-content-services/charts/common/templates/service.yaml b/alfresco-content-services/charts/common/templates/service.yaml deleted file mode 100644 index ec697b1..0000000 --- a/alfresco-content-services/charts/common/templates/service.yaml +++ /dev/null @@ -1,5 +0,0 @@ -{{- if .Values.enabled -}} -{{- template "common.service" (list . "activiti.cloud.service") -}} -{{- end -}} -{{- define "activiti.cloud.service" -}} -{{- end -}} diff --git a/alfresco-content-services/charts/common/tests/deployment-config_test.yaml b/alfresco-content-services/charts/common/tests/deployment-config_test.yaml deleted file mode 100644 index 677519a..0000000 --- a/alfresco-content-services/charts/common/tests/deployment-config_test.yaml +++ /dev/null @@ -1,154 +0,0 @@ -suite: test deployment config init container -templates: - - deployment.yaml -tests: - - it: should render deployment with config for query consumer - set: - enabled: true - messaging.enabled: true - messaging.role: consumer - global.messaging.broker: rabbitmq - global.messaging.partitioned: true - global.messaging.partitionCount: 2 - asserts: - - isKind: - of: StatefulSet - - hasDocuments: - count: 1 - - equal: - path: spec.replicas - value: 2 - - equal: - path: spec.serviceName - value: RELEASE-NAME-common - - equal: - path: spec.podManagementPolicy - value: Parallel - - equal: - path: spec.updateStrategy.type - value: RollingUpdate - - contains: - path: spec.template.spec.initContainers - content: - args: - - -c - - | - echo activiti.cloud.messaging.broker=rabbitmq >> $APPLICATION_PROPERTIES - echo activiti.cloud.messaging.partitioned=true >> $APPLICATION_PROPERTIES - echo activiti.cloud.messaging.partition-count=2 >> $APPLICATION_PROPERTIES - echo activiti.cloud.messaging.instance-index=${HOSTNAME##*-} >> $APPLICATION_PROPERTIES - command: - - sh - env: - - name: APPLICATION_PROPERTIES - value: /opt/config/application.properties - image: docker.io/busybox:1.32 - imagePullPolicy: IfNotPresent - name: config-consumer - resources: - limits: - cpu: 10m - memory: 16Mi - requests: - cpu: 10m - memory: 16Mi - securityContext: - allowPrivilegeEscalation: false - runAsGroup: 1000 - runAsNonRoot: true - runAsUser: 1000 - volumeMounts: - - mountPath: /opt/config/ - name: config - - contains: - path: spec.template.spec.volumes - content: - name: config - emptyDir: {} - - contains: - path: spec.template.spec.containers[0].volumeMounts - content: - mountPath: /opt/config/ - name: config - - - it: should render deployment with config for producer - set: - enabled: true - messaging.enabled: true - messaging.role: producer - global.messaging.broker: rabbitmq - global.messaging.partitioned: true - global.messaging.partitionCount: 2 - asserts: - - isKind: - of: Deployment - - hasDocuments: - count: 1 - - equal: - path: spec.replicas - value: 1 - - contains: - path: spec.template.spec.initContainers - content: - args: - - -c - - | - echo activiti.cloud.messaging.broker=rabbitmq >> $APPLICATION_PROPERTIES - echo activiti.cloud.messaging.partitioned=true >> $APPLICATION_PROPERTIES - echo activiti.cloud.messaging.partition-count=2 >> $APPLICATION_PROPERTIES - command: - - sh - env: - - name: APPLICATION_PROPERTIES - value: /opt/config/application.properties - image: docker.io/busybox:1.32 - imagePullPolicy: IfNotPresent - name: config-producer - resources: - limits: - cpu: 10m - memory: 16Mi - requests: - cpu: 10m - memory: 16Mi - securityContext: - allowPrivilegeEscalation: false - runAsGroup: 1000 - runAsNonRoot: true - runAsUser: 1000 - volumeMounts: - - mountPath: /opt/config/ - name: config - - contains: - path: spec.template.spec.volumes - content: - name: config - emptyDir: {} - - contains: - path: spec.template.spec.containers[0].volumeMounts - content: - mountPath: /opt/config/ - name: config - - - it: should render deployment with empty messaging role for connector - set: - enabled: true - messaging.enabled: true - messaging.role: "" - global.messaging.broker: rabbitmq - global.messaging.partitioned: true - global.messaging.partitionCount: 2 - asserts: - - isKind: - of: Deployment - - hasDocuments: - count: 1 - - equal: - path: spec.replicas - value: 1 - - isNull: - path: spec.template.spec.initContainers - - isNull: - path: spec.template.spec.volumes - - isNull: - path: spec.template.spec.containers[0].volumeMounts diff --git a/alfresco-content-services/charts/common/tests/deployment-kafka_test.yaml b/alfresco-content-services/charts/common/tests/deployment-kafka_test.yaml deleted file mode 100644 index cf86a7a..0000000 --- a/alfresco-content-services/charts/common/tests/deployment-kafka_test.yaml +++ /dev/null @@ -1,73 +0,0 @@ -suite: test deployment with kafka -templates: - - deployment.yaml -tests: - - it: should render kafka env if given values - values: - - ./values/kafka.yaml - set: - enabled: true - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_BROKER - value: kafka - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS - value: RELEASE-NAME-kafka - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_CLOUD_STREAM_KAFKA_BINDER_DEFAULTBROKERPORT - value: "9092" - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACT_AUDIT_PRODUCER_TRANSACTION_ID_PREFIX - value: "" - - equal: - path: spec.replicas - value: 1 # replicaCount - - - it: should not render kafka env if given values with messaging.enabled=false - values: - - ./values/kafka.yaml - set: - enabled: true - messaging.enabled: false - asserts: - - notContains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_BROKER - value: kafka - - notContains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS - value: RELEASE-NAME-kafka - - notContains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_CLOUD_STREAM_KAFKA_BINDER_DEFAULTBROKERPORT - value: "9092" - - notContains: - path: spec.template.spec.containers[0].env - content: - name: ACT_AUDIT_PRODUCER_TRANSACTION_ID_PREFIX - value: "" - - - it: should use replicaCount to set replicas to dynamic Kafka consumer auto rebalancing - values: - - ./values/kafka.yaml - - ./values/consumer-partitioned.yaml - set: - enabled: true - replicaCount: 3 - asserts: - - equal: - path: spec.replicas - value: 3 # replicaCount diff --git a/alfresco-content-services/charts/common/tests/deployment-messaging-destinations_test.yaml b/alfresco-content-services/charts/common/tests/deployment-messaging-destinations_test.yaml deleted file mode 100644 index 033f2f5..0000000 --- a/alfresco-content-services/charts/common/tests/deployment-messaging-destinations_test.yaml +++ /dev/null @@ -1,58 +0,0 @@ -suite: test deployment with messaging -templates: - - deployment.yaml -tests: - - it: should render all messaging destinations configuration - values: - - ./values/messaging-destinations.yaml - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_PREFIX - value: quiz - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_SEPARATOR - value: . - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_DESTINATIONS_ENGINEEVENTS_NAME - value: engine-events - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_TRANSFORMERS_ENABLED - value: "false" - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_TRANSFORMERS - value: "toLowerCase,escapeIllegalChars" - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_ILLEGAL_CHARS_REGEX - value: "[\\t\\s*#:]" - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_DESTINATION_ILLEGAL_CHARS_REPLACEMENT - value: "-" - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_DESTINATIONS_ENGINEEVENTS_SCOPE - value: foo - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_DESTINATIONS_ENGINEEVENTS_PREFIX - value: bar - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_DESTINATIONS_ENGINEEVENTS_SEPARATOR - value: _ diff --git a/alfresco-content-services/charts/common/tests/deployment-rabbitmq_test.yaml b/alfresco-content-services/charts/common/tests/deployment-rabbitmq_test.yaml deleted file mode 100644 index 708fbee..0000000 --- a/alfresco-content-services/charts/common/tests/deployment-rabbitmq_test.yaml +++ /dev/null @@ -1,155 +0,0 @@ -suite: test deployment with rabbitmq -templates: - - deployment.yaml -tests: - - it: should render default rabbitmq env if given minimal values - set: - enabled: true - messaging.enabled: true - global.messaging.broker: rabbitmq - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_BROKER - value: rabbitmq - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_HOST - value: RELEASE-NAME-rabbitmq - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_USERNAME - value: guest - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_PASSWORD - value: guest - - - it: should not render default rabbitmq env if messaging.enabled=false - set: - enabled: true - messaging.enabled: false - global.messaging.broker: rabbitmq - asserts: - - notContains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_BROKER - value: rabbitmq - - notContains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_HOST - value: RELEASE-NAME-rabbitmq - - notContains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_USERNAME - value: guest - - notContains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_PASSWORD - value: guest - - - it: should render rabbitmq env if given custom values - values: - - values/rabbitmq.yaml - set: - enabled: true - release: - name: pr-123-rabbitmq - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_BROKER - value: rabbitmq - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_HOST - value: pr-123-rabbitmq - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_USERNAME - value: admin - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_PASSWORD - value: password - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_PORT - value: "5673" - - - it: should render default rabbitmq env if rabbitmq.enabled=true - set: - enabled: true - rabbitmq.enabled: true - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_BROKER - value: rabbitmq - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_HOST - value: RELEASE-NAME-rabbitmq - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_USERNAME - value: guest - - contains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_PASSWORD - value: guest - - - it: should not render rabbitmq env if rabbitmq.enabled=false - set: - enabled: true - rabbitmq.enabled: false - asserts: - - notContains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_MESSAGING_BROKER - value: rabbitmq - - notContains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_HOST - value: RELEASE-NAME-rabbitmq - - notContains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_USERNAME - value: guest - - notContains: - path: spec.template.spec.containers[0].env - content: - name: SPRING_RABBITMQ_PASSWORD - value: guest - - - it: should use global.messaging.partitionCount to set replicas for Rabbitmq fixed consumer partitions configuration - values: - - ./values/rabbitmq.yaml - - ./values/consumer-partitioned.yaml - set: - enabled: true - replicaCount: 3 # will be ignored - asserts: - - equal: - path: spec.replicas - value: 9 # global.messaging.partitionCount diff --git a/alfresco-content-services/charts/common/tests/deployment_test.yaml b/alfresco-content-services/charts/common/tests/deployment_test.yaml deleted file mode 100644 index 7cc04c2..0000000 --- a/alfresco-content-services/charts/common/tests/deployment_test.yaml +++ /dev/null @@ -1,216 +0,0 @@ -suite: test deployment -templates: - - deployment.yaml -tests: - - it: should render nothing if not enabled - set: - enabled: false - asserts: - - hasDocuments: - count: 0 - - - it: should render deployment if enabled - set: - enabled: true - asserts: - - isKind: - of: Deployment - - - it: should render deployment with extraInitContainers only - set: - enabled: true - liquibase.enabled: false - postgresql.enabled: false - extraInitContainers: | - - name: busybox - image: busybox - command: ["/bin/sh"] - args: | - - -c - - | - echo "test" - asserts: - - isKind: - of: Deployment - - hasDocuments: - count: 1 - - contains: - path: spec.template.spec.initContainers - content: - args: | - - -c - - | - echo "test" - command: - - /bin/sh - image: busybox - name: busybox - - notContains: - path: spec.template.spec.initContainers - content: - name: pgchecker - any: true - - notContains: - path: spec.template.spec.initContainers - content: - name: liquibase - any: true - - - it: should render deployment with pgchecker, liquibase and extraInitContainers - set: - enabled: true - postgresql.enabled: true - liquibase.enabled: true - extraInitContainers: | - - name: busybox - image: busybox - command: ["/bin/sh"] - args: | - - -c - - | - echo "test" - asserts: - - isKind: - of: Deployment - - hasDocuments: - count: 1 - - contains: - path: spec.template.spec.initContainers - content: - name: busybox - any: true - - contains: - path: spec.template.spec.initContainers - content: - name: pgchecker - any: true - - contains: - path: spec.template.spec.initContainers - content: - name: liquibase - any: true - - - it: should render deployment with postgresql initContainer - set: - enabled: true - postgresql.enabled: true - asserts: - - isKind: - of: Deployment - - hasDocuments: - count: 1 - - contains: - path: spec.template.spec.initContainers - content: - command: - - sh - - -c - - | - echo 'Waiting for PostgreSQL to become ready...' - - until printf "." && nc -z -w 2 RELEASE-NAME-postgresql 5432; do - sleep 2; - done; - - echo 'PostgreSQL OK ✓' - image: docker.io/busybox:1.32 - imagePullPolicy: IfNotPresent - name: pgchecker - resources: - limits: - cpu: 10m - memory: 16Mi - requests: - cpu: 10m - memory: 16Mi - securityContext: - allowPrivilegeEscalation: false - runAsGroup: 1000 - runAsNonRoot: true - runAsUser: 1000 - - - it: should render deployment with liquibase initContainer - set: - enabled: true - liquibase.enabled: true - asserts: - - isKind: - of: Deployment - - hasDocuments: - count: 1 - - contains: - path: spec.template.spec.initContainers - content: - args: - - -jar - - liquibase.jar - env: - - name: SPRING_DATASOURCE_URL - value: jdbc:postgresql://RELEASE-NAME-postgresql:5432/postgres - - name: SPRING_DATASOURCE_DRIVER_CLASS_NAME - value: org.postgresql.Driver - - name: SPRING_DATASOURCE_USERNAME - value: postgres - - name: SPRING_DATASOURCE_PASSWORD - value: "" - image: activiti/replaceme:latest - imagePullPolicy: IfNotPresent - name: liquibase - - it: should render global extraEnv - release: - name: activiti-app - set: - enabled: true - global.extraEnv: | - - name: ACTIVITI_CLOUD_APPLICATION_NAME - value: "{{ .Release.Name }}" - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: ACTIVITI_CLOUD_APPLICATION_NAME - value: activiti-app - - it: should render probePath - release: - name: activiti-app - set: - enabled: true - ingress.path: /rb - probePath: "{{ tpl .Values.ingress.path . }}/actuator/health" - asserts: - - equal: - path: spec.template.spec.containers[0].livenessProbe.httpGet.path - value: /rb/actuator/health - - equal: - path: spec.template.spec.containers[0].readinessProbe.httpGet.path - value: /rb/actuator/health - - it: should render livenessProbe.path - release: - name: activiti-app - set: - enabled: true - ingress.path: /rb - probePath: "{{ tpl .Values.ingress.path . }}/actuator/health" - livenessProbe.path: "{{ tpl .Values.ingress.path . }}/actuator/health/liveness" - asserts: - - equal: - path: spec.template.spec.containers[0].livenessProbe.httpGet.path - value: /rb/actuator/health/liveness - - equal: - path: spec.template.spec.containers[0].readinessProbe.httpGet.path - value: /rb/actuator/health - - it: should render readinessProbe.path - release: - name: activiti-app - set: - enabled: true - ingress.path: /rb - probePath: "{{ tpl .Values.ingress.path . }}/actuator/health" - readinessProbe.path: "{{ tpl .Values.ingress.path . }}/actuator/health/readiness" - asserts: - - equal: - path: spec.template.spec.containers[0].readinessProbe.httpGet.path - value: /rb/actuator/health/readiness - - equal: - path: spec.template.spec.containers[0].livenessProbe.httpGet.path - value: /rb/actuator/health diff --git a/alfresco-content-services/charts/common/tests/env_test.yaml b/alfresco-content-services/charts/common/tests/env_test.yaml deleted file mode 100644 index 6fcf996..0000000 --- a/alfresco-content-services/charts/common/tests/env_test.yaml +++ /dev/null @@ -1,33 +0,0 @@ -suite: test container env -templates: - - deployment.yaml -tests: - - it: should render env values - set: - enabled: true - env: - RELEASE_NAME: "{{ .Release.Name }}" - FOO_BAR: "{{ .Values.enabled }}" - BAR: false - FOO: 12345 - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: RELEASE_NAME - value: RELEASE-NAME - - contains: - path: spec.template.spec.containers[0].env - content: - name: BAR - value: "false" - - contains: - path: spec.template.spec.containers[0].env - content: - name: FOO - value: "12345" - - contains: - path: spec.template.spec.containers[0].env - content: - name: FOO_BAR - value: "true" diff --git a/alfresco-content-services/charts/common/tests/extraEnv_test.yaml b/alfresco-content-services/charts/common/tests/extraEnv_test.yaml deleted file mode 100644 index c9009a8..0000000 --- a/alfresco-content-services/charts/common/tests/extraEnv_test.yaml +++ /dev/null @@ -1,37 +0,0 @@ -suite: test container extraEnv -templates: - - deployment.yaml -tests: - - it: should render extraEnv values - set: - enabled: true - extraEnv: | - - name: RELEASE_NAME - value: "{{ .Release.Name }}" - - name: FOO_BAR - value: "{{ .Values.enabled }}" - - name: BAR - value: "false" - - name: FOO - value: "12345" - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: RELEASE_NAME - value: RELEASE-NAME - - contains: - path: spec.template.spec.containers[0].env - content: - name: BAR - value: "false" - - contains: - path: spec.template.spec.containers[0].env - content: - name: FOO - value: "12345" - - contains: - path: spec.template.spec.containers[0].env - content: - name: FOO_BAR - value: "true" diff --git a/alfresco-content-services/charts/common/tests/extraInitContainers_test.yaml b/alfresco-content-services/charts/common/tests/extraInitContainers_test.yaml deleted file mode 100644 index d24baaf..0000000 --- a/alfresco-content-services/charts/common/tests/extraInitContainers_test.yaml +++ /dev/null @@ -1,16 +0,0 @@ -suite: test extraInitContainers -templates: - - deployment.yaml -tests: - - it: should render extraInitContainers - set: - enabled: true - extraInitContainers: | - - name: foo - image: bar - asserts: - - contains: - path: spec.template.spec.initContainers - content: - image: bar - name: foo diff --git a/alfresco-content-services/charts/common/tests/extraVolumeMounts_test.yaml b/alfresco-content-services/charts/common/tests/extraVolumeMounts_test.yaml deleted file mode 100644 index c7f03cf..0000000 --- a/alfresco-content-services/charts/common/tests/extraVolumeMounts_test.yaml +++ /dev/null @@ -1,16 +0,0 @@ -suite: test extraVolumeMounts -templates: - - deployment.yaml -tests: - - it: should render volumeMounts - set: - enabled: true - extraVolumeMounts: | - - name: config - mountPath: /opt/config - asserts: - - contains: - path: spec.template.spec.containers[0].volumeMounts - content: - name: config - mountPath: /opt/config diff --git a/alfresco-content-services/charts/common/tests/hpa_test.yaml b/alfresco-content-services/charts/common/tests/hpa_test.yaml deleted file mode 100644 index a3fd179..0000000 --- a/alfresco-content-services/charts/common/tests/hpa_test.yaml +++ /dev/null @@ -1,142 +0,0 @@ -suite: test runtime bundle hpa -templates: - - hpa.yaml -tests: - - it: should render nothing when not enabled - set: - enabled: false - asserts: - - hasDocuments: - count: 0 - - it: should render nothing when hpa.enabled=false - set: - enabled: true - hpa: - enabled: false - asserts: - - hasDocuments: - count: 0 - - it: should render minReplicas and maxReplicas - set: - enabled: true - hpa: - enabled: true - minReplicas: 5 - maxReplicas: 10 - asserts: - - hasDocuments: - count: 1 - - isKind: - of: HorizontalPodAutoscaler - - equal: - path: spec.minReplicas - value: 5 - - equal: - path: spec.maxReplicas - value: 10 - - it: should render the releaseName in the metadata.name - release: - name: rb - set: - enabled: true - hpa: - enabled: true - asserts: - - equal: - path: metadata - value: - name: rb-common - namespace: NAMESPACE - - it: should render Kind StatefulSet when role is consumer - release: - name: rb - set: - enabled: true - global: - messaging: - partitioned: true - messaging: - enabled: true - role: consumer - hpa: - enabled: true - asserts: - - equal: - path: spec.scaleTargetRef - value: - apiVersion: apps/v1 - kind: StatefulSet - name: rb-common - - it: should render Kind Deployment when role is not consumer - release: - name: rb - set: - enabled: true - hpa: - enabled: true - asserts: - - equal: - path: spec.scaleTargetRef - value: - apiVersion: apps/v1 - kind: Deployment - name: rb-common - - it: should render the cpu resource - set: - enabled: true - hpa: - enabled: true - cpu: 60 - asserts: - - contains: - path: spec.metrics - content: - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 60 - - it: should render the memory resource - set: - enabled: true - hpa: - enabled: true - memory: 1500k - asserts: - - contains: - path: spec.metrics - content: - type: Resource - resource: - name: memory - target: - type: AverageValue - averageValue: 1500k - - it: should render the scaling policies - set: - enabled: true - hpa: - enabled: true - asserts: - - equal: - path: spec.behavior - value: - scaleDown: - policies: - - type: Pods - value: 1 - periodSeconds: 60 - - type: Percent - value: 15 - periodSeconds: 60 - selectPolicy: Max - - it: should not render the scaling policies when disabled - set: - enabled: true - hpa: - enabled: true - scalingPolicesEnabled: false - asserts: - - isNull: - path: spec.behavior diff --git a/alfresco-content-services/charts/common/tests/ingress_test.yaml b/alfresco-content-services/charts/common/tests/ingress_test.yaml deleted file mode 100644 index 0321c97..0000000 --- a/alfresco-content-services/charts/common/tests/ingress_test.yaml +++ /dev/null @@ -1,32 +0,0 @@ -suite: test ingress -templates: - - ingress.yaml -tests: - - it: should render nothing if not enabled - set: - enabled: true - ingress.enabled: false - asserts: - - hasDocuments: - count: 0 - - - it: should render Ingress if enabled - set: - enabled: true - ingress.enabled: true - release: - name: my-release - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Ingress - - contains: - path: spec.rules[0].http.paths - content: - path: / - backend: - serviceName: my-release-common - servicePort: 80 - - isNull: - path: spec.tls diff --git a/alfresco-content-services/charts/common/tests/initContainers_test.yaml b/alfresco-content-services/charts/common/tests/initContainers_test.yaml deleted file mode 100644 index 116c178..0000000 --- a/alfresco-content-services/charts/common/tests/initContainers_test.yaml +++ /dev/null @@ -1,16 +0,0 @@ -suite: test initContainers -templates: - - deployment.yaml -tests: - - it: should render initContainers - set: - enabled: true - initContainers: - - name: foo - image: bar - asserts: - - contains: - path: spec.template.spec.initContainers - content: - image: bar - name: foo diff --git a/alfresco-content-services/charts/common/tests/javaOpts_test.yaml b/alfresco-content-services/charts/common/tests/javaOpts_test.yaml deleted file mode 100644 index 951f393..0000000 --- a/alfresco-content-services/charts/common/tests/javaOpts_test.yaml +++ /dev/null @@ -1,30 +0,0 @@ -suite: test javaOpts -templates: - - deployment.yaml -tests: - - it: should render javaOpts defaults - set: - enabled: true - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: JAVA_OPTS - value: '-Xmx1024m -Xms256m -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true - -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 - -XX:AdaptiveSizePolicyWeight=90 ' - - it: should render javaOpts extra - set: - enabled: true - javaOpts.extra: >- - -Djavax.net.ssl.trustStore=/mnt/secrets/cacerts - -Djavax.net.ssl.trustStorePassword=changeit - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: JAVA_OPTS - value: '-Xmx1024m -Xms256m -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true - -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 - -XX:AdaptiveSizePolicyWeight=90 -Djavax.net.ssl.trustStore=/mnt/secrets/cacerts - -Djavax.net.ssl.trustStorePassword=changeit' diff --git a/alfresco-content-services/charts/common/tests/podAnnotations_test.yaml b/alfresco-content-services/charts/common/tests/podAnnotations_test.yaml deleted file mode 100644 index ba4b609..0000000 --- a/alfresco-content-services/charts/common/tests/podAnnotations_test.yaml +++ /dev/null @@ -1,13 +0,0 @@ -suite: test podAnnotations -templates: - - deployment.yaml -tests: - - it: should render podAnnotations - set: - enabled: true - podAnnotations: - foo: bar - asserts: - - equal: - path: spec.template.metadata.annotations.foo - value: bar diff --git a/alfresco-content-services/charts/common/tests/podLabels_test.yaml b/alfresco-content-services/charts/common/tests/podLabels_test.yaml deleted file mode 100644 index d232c9c..0000000 --- a/alfresco-content-services/charts/common/tests/podLabels_test.yaml +++ /dev/null @@ -1,13 +0,0 @@ -suite: test podLabels -templates: - - deployment.yaml -tests: - - it: should render podLabels - set: - enabled: true - podLabels: - foo: bar - asserts: - - equal: - path: spec.template.metadata.labels.foo - value: bar diff --git a/alfresco-content-services/charts/common/tests/service_test.yaml b/alfresco-content-services/charts/common/tests/service_test.yaml deleted file mode 100644 index 6d46e0a..0000000 --- a/alfresco-content-services/charts/common/tests/service_test.yaml +++ /dev/null @@ -1,27 +0,0 @@ -suite: test service -templates: - - service.yaml -tests: - - it: should render nothing if not enabled - set: - enabled: false - asserts: - - hasDocuments: - count: 0 - - - it: should render servce if enabled - set: - enabled: true - asserts: - - isKind: - of: Service - - equal: - path: metadata.name - value: RELEASE-NAME-common - - contains: - path: spec.ports - content: - port: 80 - targetPort: 8080 - protocol: TCP - name: http diff --git a/alfresco-content-services/charts/common/tests/sidecars_test.yaml b/alfresco-content-services/charts/common/tests/sidecars_test.yaml deleted file mode 100644 index 92ca94d..0000000 --- a/alfresco-content-services/charts/common/tests/sidecars_test.yaml +++ /dev/null @@ -1,16 +0,0 @@ -suite: test sidecars -templates: - - deployment.yaml -tests: - - it: should render sidecars - set: - enabled: true - sidecars: - - name: sidecar - image: gcr.io/google_containers/pause - asserts: - - contains: - path: spec.template.spec.containers - content: - image: gcr.io/google_containers/pause - name: sidecar diff --git a/alfresco-content-services/charts/common/tests/values/consumer-partitioned.yaml b/alfresco-content-services/charts/common/tests/values/consumer-partitioned.yaml deleted file mode 100644 index 389ac29..0000000 --- a/alfresco-content-services/charts/common/tests/values/consumer-partitioned.yaml +++ /dev/null @@ -1,7 +0,0 @@ -global: - messaging: - partitioned: true - partitionCount: 9 - -messaging: - role: "consumer" diff --git a/alfresco-content-services/charts/common/tests/values/kafka.yaml b/alfresco-content-services/charts/common/tests/values/kafka.yaml deleted file mode 100644 index 51eca04..0000000 --- a/alfresco-content-services/charts/common/tests/values/kafka.yaml +++ /dev/null @@ -1,12 +0,0 @@ -global: - messaging: - broker: kafka - kafka: - brokers: '{{ include "common.kafka.fullname" $ }}' - zkNodes: "{{ .Release.Name }}-zookeeper" - extraEnv: |- - - name: ACT_AUDIT_PRODUCER_TRANSACTION_ID_PREFIX - value: "" - -messaging: - enabled: true diff --git a/alfresco-content-services/charts/common/tests/values/messaging-destinations.yaml b/alfresco-content-services/charts/common/tests/values/messaging-destinations.yaml deleted file mode 100644 index a998471..0000000 --- a/alfresco-content-services/charts/common/tests/values/messaging-destinations.yaml +++ /dev/null @@ -1,19 +0,0 @@ -global: - messaging: - broker: rabbitmq - destinationPrefix: quiz - destinationSeparator: . - destinationTransformers: toLowerCase,escapeIllegalChars - destinationTransformersEnabled: false - destinationIllegalCharsRegex: "[\\t\\s*#:]" - destinationIllegalCharsReplacement: "-" - destinations: - engineEvents: - name: engine-events - scope: "foo" - prefix: "bar" - separator: "_" - -enabled: true -messaging: - enabled: true diff --git a/alfresco-content-services/charts/common/tests/values/rabbitmq.yaml b/alfresco-content-services/charts/common/tests/values/rabbitmq.yaml deleted file mode 100644 index ea7621a..0000000 --- a/alfresco-content-services/charts/common/tests/values/rabbitmq.yaml +++ /dev/null @@ -1,13 +0,0 @@ -global: - messaging: - broker: rabbitmq - rabbitmq: - host: '{{ include "common.rabbitmq.fullname" $ }}' - username: admin - password: password - extraEnv: | - - name: SPRING_RABBITMQ_PORT - value: "5673" - -messaging: - enabled: true diff --git a/alfresco-content-services/charts/common/tests/volumeMounts_test.yaml b/alfresco-content-services/charts/common/tests/volumeMounts_test.yaml deleted file mode 100644 index f080b4b..0000000 --- a/alfresco-content-services/charts/common/tests/volumeMounts_test.yaml +++ /dev/null @@ -1,16 +0,0 @@ -suite: test volumeMounts -templates: - - deployment.yaml -tests: - - it: should render volumeMounts - set: - enabled: true - volumeMounts: - - name: config - mountPath: /opt/config - asserts: - - contains: - path: spec.template.spec.containers[0].volumeMounts - content: - name: config - mountPath: /opt/config diff --git a/alfresco-content-services/charts/common/tests/volumes_test.yaml b/alfresco-content-services/charts/common/tests/volumes_test.yaml deleted file mode 100644 index bf6d430..0000000 --- a/alfresco-content-services/charts/common/tests/volumes_test.yaml +++ /dev/null @@ -1,16 +0,0 @@ -suite: test volumes -templates: - - deployment.yaml -tests: - - it: should render volumes - set: - enabled: true - volumes: - - name: config - emptyDir: {} - asserts: - - contains: - path: spec.template.spec.volumes - content: - emptyDir: {} - name: config diff --git a/alfresco-content-services/charts/common/values.yaml b/alfresco-content-services/charts/common/values.yaml deleted file mode 100644 index 7357267..0000000 --- a/alfresco-content-services/charts/common/values.yaml +++ /dev/null @@ -1,333 +0,0 @@ -# common values shared between all charts - -global: - gateway: - # global.gateway.domain -- configure default domain for gateway host, i.e. "{{ .Release.Name }}.127.0.0.1.nip.io" - domain: "" - # global.gateway.host -- configure default gateway host Helm template, i.e. "gateway.{{ .Values.global.gateway.domain }}" - host: "" - # global.gateway.http -- toggle creating http or https ingress rules, supports literal or boolean values - http: true - # global.gateway.tlsacme -- used to enable automatic TLS for ingress if http is false - tlsacme: false - - keycloak: - enabled: true - # global.keycloak.url -- overrides gateway host configuration - url: "" - # global.keycloak.path -- configure default keycloak path - path: "/auth" - # global.keycloak.host -- configure default keycloak host template, i.e "identity.{{ .Values.global.gateway.domain }}" - host: "" - # global.keycloak.realm -- configure default Keycloak realm - realm: "activiti" - # global.keycloak.resource -- configure default Keycloak resource - resource: "activiti" - # global.keycloak.extraEnv -- adds Keycloak extraEnv to deployments - extraEnv: "" - - # global.registryPullSecrets -- configure pull secrets for all deployments - registryPullSecrets: [] - - # global.extraEnv -- adds global extraEnv to deployments - extraEnv: "" - - messaging: - # global.messaging.broker -- configure message broker type for all deployments with messaging.enabled set to 'true' - broker: "" - # global.messaging.partitioned -- Enable partitioned messaging configuration for engine events producer and consumers - partitioned: false - # global.messaging.partitionCount -- Set partition count for partitioned mode. - partitionCount: 2 - # global.messaging.destinationPrefix -- Set destination separator to use to build full destinations, i.e. _destination. - destinationPrefix: "" - # global.messaging.destinationSeparator -- Set destination separator to use to build full destinations, i.e. prefix<_>destination. - destinationSeparator: "_" - # global.messaging.destinationTransformersEnabled -- Enable destination name transformers to apply conversion to all destination name for producers, consumers and connectors - destinationTransformersEnabled: false - # global.messaging.destinationTransformers -- Comma separated list of transformer functions to apply conversion to all destination name for producers, consumers and connectors - destinationTransformers: toLowerCase,escapeIllegalChars - # global.messaging.destinationIllegalCharsRegex -- Configure regex expression to use for replacement of illegal characters in the destination names. - destinationIllegalCharsRegex: "[\\t\\s*#:]" - # global.messaging.destinationIllegalCharsReplacement -- Configure replacement character for illegal characters in the destination names. - destinationIllegalCharsReplacement: "-" - # global.messaging.destinations -- Configure destination properties to apply customization to producers and consumer channel bindings with matching destination key. - destinations: {} - - rabbitmq: - host: "" - username: guest - password: guest - extraEnv: | - - kafka: - brokers: "" - port: 9092 - extraEnv: | - -# extraEnv -- add env entries to deployments as string -extraEnv: "" - -# env -- add env entries to deployments as dict -env: {} - -# enabled -- generate resources only if true, false by default so you can just use the partials -enabled: false - -# replicaCount -- number of replicas -replicaCount: 1 - -# extraInitContainers -- adds extraInitContainers to deployments -extraInitContainers: "" - -liquibase: - enabled: false - image: - # liquibase.image.repository -- image used to run liquibase database migrations - # @default image.repository - repository: - # liquibase.image.tag -- Image tag for the liquibase image - # @default image.tag - tag: - # liquibase.image.pullPolicy -- Image pull policy for the liquibase image - pullPolicy: IfNotPresent - # liquibase.args -- arguments for liquibase container - args: - - -jar - - liquibase.jar - # liquibase.env -- add env entries to liquibase init container as dict - env: {} - -pgchecker: - image: - # pgchecker.image.repository -- Image used to check Postgresql readiness at startup - repository: docker.io/busybox - # pgchecker.image.tag -- Image tag for the pgchecker image - tag: 1.32 - # pgchecker.image.pullPolicy -- Image pull policy for the pgchecker image - pullPolicy: IfNotPresent - # pgchecker.securityContext -- SecurityContext for the pgchecker container - securityContext: - allowPrivilegeEscalation: false - runAsUser: 1000 - runAsGroup: 1000 - runAsNonRoot: true - # pgchecker.resources -- Resource requests and limits for the pgchecker container - resources: - requests: - cpu: "10m" - memory: "16Mi" - limits: - cpu: "10m" - memory: "16Mi" - -image: - repository: activiti/replaceme - tag: latest - pullPolicy: IfNotPresent - -# registryPullSecrets -- configures additional pull secrets for this deployment -registryPullSecrets: [] - -statefulset: - podManagementPolicy: Parallel - updateStrategyType: RollingUpdate - -config: - volumeName: config - mountPath: /opt/config/ - command: "sh" - args: "-c" - image: - # config.image.repository -- Image used to run config init container at startup - repository: docker.io/busybox - # config.image.tag -- Image tag for the config image - tag: 1.32 - # config.image.pullPolicy -- Image pull policy for the config image - pullPolicy: IfNotPresent - # config.securityContext -- SecurityContext for the config container - securityContext: - allowPrivilegeEscalation: false - runAsUser: 1000 - runAsGroup: 1000 - runAsNonRoot: true - env: - APPLICATION_PROPERTIES: '{{ .Values.config.mountPath | trimSuffix "/" }}/application.properties' - - # config.resources -- Resource requests and limits for the config container - resources: - requests: - cpu: "10m" - memory: "16Mi" - limits: - cpu: "10m" - memory: "16Mi" - -postgresql: - enabled: false - name: postgresql - port: 5432 - -db: - uri: - username: postgres - password: - driver: org.postgresql.Driver - platform: org.hibernate.dialect.PostgreSQLDialect - generateDdl: false - ddlAuto: validate - -messaging: - enabled: false - # messaging.role -- required configuration of the messaging role, i.e. producer, consumer, or connector - role: "" - producer: - config: - script: | - echo activiti.cloud.messaging.broker={{ .Values.global.messaging.broker }} >> $APPLICATION_PROPERTIES - echo activiti.cloud.messaging.partitioned={{ .Values.global.messaging.partitioned }} >> $APPLICATION_PROPERTIES - echo activiti.cloud.messaging.partition-count={{ .Values.global.messaging.partitionCount }} >> $APPLICATION_PROPERTIES - consumer: - config: - script: | - echo activiti.cloud.messaging.broker={{ .Values.global.messaging.broker }} >> $APPLICATION_PROPERTIES - echo activiti.cloud.messaging.partitioned={{ .Values.global.messaging.partitioned }} >> $APPLICATION_PROPERTIES - echo activiti.cloud.messaging.partition-count={{ .Values.global.messaging.partitionCount }} >> $APPLICATION_PROPERTIES - echo activiti.cloud.messaging.instance-index=${HOSTNAME##*-} >> $APPLICATION_PROPERTIES - -rabbitmq: - # rabbbitmq.enabled -- enables rabbitmq backend configuration. Deprecated in favor of messaging.enabled in combination with global.messaging.broker values - enabled: false - host: '{{ tpl .Values.global.rabbitmq.host $ | default (include "common.rabbitmq.fullname" $) }}' - username: "{{ .Values.global.rabbitmq.username }}" - password: "{{ .Values.global.rabbitmq.password }}" - extraEnv: "{{ tpl .Values.global.rabbitmq.extraEnv $ }}" - -kafka: - brokers: "{{ tpl .Values.global.kafka.brokers $ }}" - port: "{{ .Values.global.kafka.port }}" - extraEnv: "{{ tpl .Values.global.kafka.extraEnv $ }}" - -javaOpts: - xmx: 1024m - xms: 256m - other: >- - -XX:+UnlockExperimentalVMOptions - -Dsun.zip.disableMemoryMapping=true - -XX:+UseParallelGC - -XX:MinHeapFreeRatio=5 - -XX:MaxHeapFreeRatio=10 - -XX:GCTimeRatio=4 - -XX:AdaptiveSizePolicyWeight=90 - # javaOpts.extra -- provide extra options for Java runtime, i.e. -Djavax.net.ssl.truststore=/mnt/secrets/cacerts - extra: "" - -# probePath -- set default probe path for both liveness and readiness -# @default empty, each service should provide its own value or template, i.e. '{{ tpl .Values.ingress.path . }}/actuator/health' -probePath: -livenessProbe: - # livenessProbe.path -- set liveness probe path, each service should provide its own value or default - # @default empty, each service should provide its own value or template or default probePath - path: - initialDelaySeconds: 60 - periodSeconds: 15 - successThreshold: 1 - timeoutSeconds: 4 - failureThreshold: 4 -readinessProbe: - # readinessProbe.path -- set readiness probe path, each service should provide its own value or default - # @default empty, each service should provide its own value or template or default probePath - path: - initialDelaySeconds: 20 - periodSeconds: 15 - successThreshold: 1 - timeoutSeconds: 3 - failureThreshold: 4 -terminationGracePeriodSeconds: 20 - -service: - name: - # service.envType -- which type of env, currently supported ones are either backend which is the default or frontend - envType: backend - type: ClusterIP - externalPort: 80 - internalPort: 8080 - nodePort: - annotations: {} - portName: http - portProtocol: TCP - -ingress: - # ingress.enabled -- set to false to disable ingress record generation - enabled: true - # ingress.servicePort -- the Service port targeted by the Ingress, defaults to service.externalPort - servicePort: - # ingress.tls -- set to true in order to enable TLS on the ingress record - tls: - # ingress.path -- set ingress path - path: / - # ingress.subPaths -- set multiple ingress subpaths - subPaths: [] - # ingress.tlsSecret -- if tls is set to true, you must declare what secret will store the key/certificate for TLS - tlsSecret: - # ingress.hostName -- if set, overrides .Values.global.gateway.host configuration - hostName: - # ingress.annotations -- configure ingress annotations as key:value pairs - annotations: {} - -# resources -- configure resources requests and limits for deployment -resources: {} - -# limits: -# cpu: 1 -# memory: 1024Mi -# requests: -# cpu: 150m -# memory: 256Mi - -# podAnnotations -- configure deployment pod podAnnotations as dict -podAnnotations: {} - -# podLabels -- configure deployment pod podLabels as dict -podLabels: {} - -podSecurityContext: {} -# fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true -# runAsUser: 1000 - -# nodeSelector -- allows customising nodeSelector -nodeSelector: {} - -# tolerations -- allows customising tolerations -tolerations: [] - -# affinity -- allows customising affinity -affinity: {} - -# extraVolumes -- add additional volumes as yaml string -extraVolumes: | - -# extraVolumeMounts -- add additional volume mounts as yaml string -extraVolumeMounts: | - -# volumes -- add additional volumes as list -volumes: [] - -# volumeMounts -- add additional volume mounts as list -volumeMounts: [] - -# initContainers -- add additional initContainers as list -initContainers: [] - -# sidecars -- add additional sidecar containers as list -sidecars: [] - -hpa: - enabled: false diff --git a/alfresco-content-services/charts/postgresql/.helmignore b/alfresco-content-services/charts/postgresql/.helmignore deleted file mode 100644 index f0c1319..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/Chart.lock b/alfresco-content-services/charts/postgresql/Chart.lock deleted file mode 100644 index ec67d36..0000000 --- a/alfresco-content-services/charts/postgresql/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: oci://registry-1.docker.io/bitnamicharts - version: 2.4.0 -digest: sha256:8c1a5dc923412d11d4d841420494b499cb707305c8b9f87f45ea1a8bf3172cb3 -generated: "2023-05-21T19:47:56.903329844Z" diff --git a/alfresco-content-services/charts/postgresql/Chart.yaml b/alfresco-content-services/charts/postgresql/Chart.yaml deleted file mode 100644 index 6b84dca..0000000 --- a/alfresco-content-services/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.6 diff --git a/alfresco-content-services/charts/postgresql/README.md b/alfresco-content-services/charts/postgresql/README.md deleted file mode 100644 index fc74780..0000000 --- a/alfresco-content-services/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-r7` | -| `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-r120` | -| `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-r91` | -| `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/alfresco-content-services/charts/postgresql/charts/common/.helmignore b/alfresco-content-services/charts/postgresql/charts/common/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/Chart.yaml b/alfresco-content-services/charts/postgresql/charts/common/Chart.yaml deleted file mode 100644 index 4fc56bb..0000000 --- a/alfresco-content-services/charts/postgresql/charts/common/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -annotations: - category: Infrastructure - licenses: Apache-2.0 -apiVersion: v2 -appVersion: 2.4.0 -description: A Library Helm Chart for grouping common logic between bitnami charts. - This chart is not deployable by itself. -home: https://bitnami.com -icon: https://bitnami.com/downloads/logos/bitnami-mark.png -keywords: -- common -- helper -- template -- function -- bitnami -maintainers: -- name: VMware, Inc. - url: https://github.com/bitnami/charts -name: common -sources: -- https://github.com/bitnami/charts -type: library -version: 2.4.0 diff --git a/alfresco-content-services/charts/postgresql/charts/common/README.md b/alfresco-content-services/charts/postgresql/charts/common/README.md deleted file mode 100644 index 72fca33..0000000 --- a/alfresco-content-services/charts/postgresql/charts/common/README.md +++ /dev/null @@ -1,235 +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. - -Looking to use our applications in production? Try [VMware Application Catalog](https://bitnami.com/enterprise), the enterprise edition of Bitnami Application Catalog. - -## 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/alfresco-content-services/charts/postgresql/charts/common/templates/_affinities.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_affinities.tpl deleted file mode 100644 index 81902a6..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/_capabilities.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_capabilities.tpl deleted file mode 100644 index 697486a..0000000 --- a/alfresco-content-services/charts/postgresql/charts/common/templates/_capabilities.tpl +++ /dev/null @@ -1,180 +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 daemonset. -*/}} -{{- define "common.capabilities.daemonset.apiVersion" -}} -{{- if semverCompare "<1.14-0" (include "common.capabilities.kubeVersion" .) -}} -{{- print "extensions/v1beta1" -}} -{{- else -}} -{{- print "apps/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 -}} - -{{/* -Return the appropriate apiVersion for Vertical Pod Autoscaler. -*/}} -{{- define "common.capabilities.vpa.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/alfresco-content-services/charts/postgresql/charts/common/templates/_errors.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_errors.tpl deleted file mode 100644 index a79cc2e..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/_images.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_images.tpl deleted file mode 100644 index d60c22e..0000000 --- a/alfresco-content-services/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 | uniq }} - - name: {{ . }} - {{- end }} - {{- end }} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names evaluating values as templates -{{ include "common.images.renderPullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $) }} -*/}} -{{- define "common.images.renderPullSecrets" -}} - {{- $pullSecrets := list }} - {{- $context := .context }} - - {{- 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 | uniq }} - - name: {{ . }} - {{- end }} - {{- end }} -{{- end -}} diff --git a/alfresco-content-services/charts/postgresql/charts/common/templates/_ingress.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_ingress.tpl deleted file mode 100644 index 831da9c..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/_labels.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_labels.tpl deleted file mode 100644 index 252066c..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/_names.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_names.tpl deleted file mode 100644 index 617a234..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/_secrets.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_secrets.tpl deleted file mode 100644 index a1708b2..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/_storage.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_storage.tpl deleted file mode 100644 index 60e2a84..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/_tplvalues.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_tplvalues.tpl deleted file mode 100644 index 2db1668..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/_utils.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_utils.tpl deleted file mode 100644 index b1ead50..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/_warnings.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/_warnings.tpl deleted file mode 100644 index ae10fa4..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_cassandra.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_cassandra.tpl deleted file mode 100644 index ded1ae3..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_mariadb.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_mariadb.tpl deleted file mode 100644 index b6906ff..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_mongodb.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_mongodb.tpl deleted file mode 100644 index f820ec1..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_mysql.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_mysql.tpl deleted file mode 100644 index 74472a0..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_postgresql.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_postgresql.tpl deleted file mode 100644 index 164ec0d..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_redis.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_redis.tpl deleted file mode 100644 index dcccfc1..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_validations.tpl b/alfresco-content-services/charts/postgresql/charts/common/templates/validations/_validations.tpl deleted file mode 100644 index 9a814cf..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/charts/common/values.yaml b/alfresco-content-services/charts/postgresql/charts/common/values.yaml deleted file mode 100644 index f2df68e..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/NOTES.txt b/alfresco-content-services/charts/postgresql/templates/NOTES.txt deleted file mode 100644 index 21b3d29..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/_helpers.tpl b/alfresco-content-services/charts/postgresql/templates/_helpers.tpl deleted file mode 100644 index 8189380..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/extra-list.yaml b/alfresco-content-services/charts/postgresql/templates/extra-list.yaml deleted file mode 100644 index 9ac65f9..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/networkpolicy-egress.yaml b/alfresco-content-services/charts/postgresql/templates/networkpolicy-egress.yaml deleted file mode 100644 index e862147..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/primary/configmap.yaml b/alfresco-content-services/charts/postgresql/templates/primary/configmap.yaml deleted file mode 100644 index d654a22..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/primary/extended-configmap.yaml b/alfresco-content-services/charts/postgresql/templates/primary/extended-configmap.yaml deleted file mode 100644 index d129bd3..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/primary/initialization-configmap.yaml b/alfresco-content-services/charts/postgresql/templates/primary/initialization-configmap.yaml deleted file mode 100644 index d3d26cb..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/primary/metrics-configmap.yaml b/alfresco-content-services/charts/postgresql/templates/primary/metrics-configmap.yaml deleted file mode 100644 index 8ad2f35..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/primary/metrics-svc.yaml b/alfresco-content-services/charts/postgresql/templates/primary/metrics-svc.yaml deleted file mode 100644 index a38b52a..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/primary/networkpolicy.yaml b/alfresco-content-services/charts/postgresql/templates/primary/networkpolicy.yaml deleted file mode 100644 index ce0052d..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/primary/servicemonitor.yaml b/alfresco-content-services/charts/postgresql/templates/primary/servicemonitor.yaml deleted file mode 100644 index c4a19fe..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/primary/statefulset.yaml b/alfresco-content-services/charts/postgresql/templates/primary/statefulset.yaml deleted file mode 100644 index d56d052..0000000 --- a/alfresco-content-services/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: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.adminPasswordKey" .) }} - {{- 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" (include "postgresql.userPasswordKey" .) }} - {{- 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: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.replicationPasswordKey" .) }} - {{- 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: {{ .Values.primary.persistence.mountPath }}/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: {{ .Values.primary.persistence.mountPath }}/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" (include "postgresql.userPasswordKey" .) }} - {{- 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/alfresco-content-services/charts/postgresql/templates/primary/svc-headless.yaml b/alfresco-content-services/charts/postgresql/templates/primary/svc-headless.yaml deleted file mode 100644 index 684177a..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/primary/svc.yaml b/alfresco-content-services/charts/postgresql/templates/primary/svc.yaml deleted file mode 100644 index 6ddd55b..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/prometheusrule.yaml b/alfresco-content-services/charts/postgresql/templates/prometheusrule.yaml deleted file mode 100644 index 24be710..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/psp.yaml b/alfresco-content-services/charts/postgresql/templates/psp.yaml deleted file mode 100644 index 48d1175..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/read/extended-configmap.yaml b/alfresco-content-services/charts/postgresql/templates/read/extended-configmap.yaml deleted file mode 100644 index e329d13..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/read/metrics-configmap.yaml b/alfresco-content-services/charts/postgresql/templates/read/metrics-configmap.yaml deleted file mode 100644 index b00a6ec..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/read/metrics-svc.yaml b/alfresco-content-services/charts/postgresql/templates/read/metrics-svc.yaml deleted file mode 100644 index 6f54ed2..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/read/networkpolicy.yaml b/alfresco-content-services/charts/postgresql/templates/read/networkpolicy.yaml deleted file mode 100644 index c969cd7..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/read/servicemonitor.yaml b/alfresco-content-services/charts/postgresql/templates/read/servicemonitor.yaml deleted file mode 100644 index d511d6b..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/read/statefulset.yaml b/alfresco-content-services/charts/postgresql/templates/read/statefulset.yaml deleted file mode 100644 index 9d28017..0000000 --- a/alfresco-content-services/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: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.adminPasswordKey" .) }} - {{- 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" (include "postgresql.userPasswordKey" .) }} - {{- 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: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.replicationPasswordKey" .) }} - {{- 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: {{ .Values.readReplicas.persistence.mountPath }}/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" (include "postgresql.userPasswordKey" .) }} - {{- 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/alfresco-content-services/charts/postgresql/templates/read/svc-headless.yaml b/alfresco-content-services/charts/postgresql/templates/read/svc-headless.yaml deleted file mode 100644 index ee8f756..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/read/svc.yaml b/alfresco-content-services/charts/postgresql/templates/read/svc.yaml deleted file mode 100644 index c308c3f..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/role.yaml b/alfresco-content-services/charts/postgresql/templates/role.yaml deleted file mode 100644 index 00f9222..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/rolebinding.yaml b/alfresco-content-services/charts/postgresql/templates/rolebinding.yaml deleted file mode 100644 index 0311c0e..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/secrets.yaml b/alfresco-content-services/charts/postgresql/templates/secrets.yaml deleted file mode 100644 index e3d6e7a..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/serviceaccount.yaml b/alfresco-content-services/charts/postgresql/templates/serviceaccount.yaml deleted file mode 100644 index 179f8f2..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/templates/tls-secrets.yaml b/alfresco-content-services/charts/postgresql/templates/tls-secrets.yaml deleted file mode 100644 index 482e298..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/values.schema.json b/alfresco-content-services/charts/postgresql/values.schema.json deleted file mode 100644 index fc41483..0000000 --- a/alfresco-content-services/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/alfresco-content-services/charts/postgresql/values.yaml b/alfresco-content-services/charts/postgresql/values.yaml deleted file mode 100644 index 7f8b20b..0000000 --- a/alfresco-content-services/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-r7 - 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-r120 - 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-r91 - 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/alfresco-content-services/community_values.yaml b/alfresco-content-services/community_values.yaml deleted file mode 100644 index 71984ae..0000000 --- a/alfresco-content-services/community_values.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# ACS Community values -repository: - edition: Community - replicaCount: 1 - image: - repository: alfresco/alfresco-content-repository-community - tag: 7.4.0.1 - persistence: - accessModes: - - ReadWriteOnce -pdfrenderer: - replicaCount: 1 -imagemagick: - replicaCount: 1 -libreoffice: - replicaCount: 1 -tika: - replicaCount: 1 -transformmisc: - replicaCount: 1 -share: - replicaCount: 1 - image: - repository: alfresco/alfresco-share - tag: 7.4.0.1 -alfresco-search: - searchServicesImage: - repository: alfresco/alfresco-search-services - tag: "2.0.7" - enabled: true -persistence: - # -- If set to false data will be lost with pods - enabled: true - # -- Only define if you have a specific claim already created - # existingClaim: "search-master-claim" - VolumeSizeRequest: 10Gi - search: - data: - mountPath: "/opt/alfresco-search-services/data" - subPath: "alfresco-content-services/solr-data" - EbsPvConfiguration: - fsType: ext4 -email: - server: - enabled: false - inbound: - enabled: false -imap: - server: - enabled: false -# Disable Enterprise only features -alfresco-search-enterprise: - enabled: false -alfresco-digital-workspace: - enabled: false -alfresco-sync-service: - enabled: false -ai: - enabled: false -s3connector: - enabled: false -ooi: - enabled: false -msTeams: - enabled: false diff --git a/alfresco-content-services/templates/NOTES.txt b/alfresco-content-services/templates/NOTES.txt deleted file mode 100644 index cd89b90..0000000 --- a/alfresco-content-services/templates/NOTES.txt +++ /dev/null @@ -1,45 +0,0 @@ - -{{ if .Values.externalHost }} -{{ $alfhost := tpl .Values.externalHost $ }} -{{ $alfprotocol := tpl (.Values.externalProtocol | default "http") $ }} -{{ $alfport := tpl (.Values.externalPort | default .Values.repository.service.externalPort | toString ) $ }} -{{ $alfurl := printf "%s://%s:%s" $alfprotocol $alfhost $alfport }} - - _,,,,_ - .@B@@@@@@EW_ - _;@BBB@m,`T@@@@@@@@W UUh-_ - _0@@@@@@BBBBm`0@@@BBBB ]LLLLU - B@@@@@@@BBBBBW @0BBBBB ]LLLLLL - !R""""P0N0BBBBB @BBBBB",LLLLLLL - _;@BBBBBWw`TBBBB @BBBM_+L"`^^^`` _ - #@@@0BBBBBBBW_TB0 @B^_=^^``````- {@b - [@@@@@@B0BBBBBBW_T " ="=====-``_;B@@@b - 0@@@@@BM"",,,,,,,_ +pppppp@@N@@@@@@E - '@@@P_mBNNNNNNBN",@ Ew`TNNNNNNB@@@@@@" - `0"/BNNNNNNBP`,0N@ 0B@p_TBNNNNNN@@R` - BBBBBBBE`,BNNN@ 0NNB@b,`"MMM^" - !@@@@@@@ ANNNNB@ 0NNNNN@@@BBBN@L - T@@@@@E NNNNNN@L'BNNNNb@@@@@@P - '0@@@@ 0NNBN@@@p_TBNBN@@@@B" - `"" 0@@@@@@@@b,_`"""` - `T0@@@@BP` - -You can access all components of Alfresco Content Services using the same root address, but different paths as follows: - - Content: {{ $alfurl }}/alfresco - Share: {{ $alfurl }}/share - API-Explorer: {{ $alfurl }}/api-explorer -{{ if eq .Values.repository.edition "Enterprise" }} Alfresco Digital Workspace: {{ $alfurl }}/workspace/ {{ end }} -{{ if index .Values "alfresco-search" "ingress" "enabled" }} Solr: {{ $alfurl }}/solr {{ end }} -{{ if (index .Values "alfresco-search" "alfresco-insight-zeppelin" "enabled") }} Zeppelin: {{ $alfurl }}/zeppelin {{ end }} -{{- if index .Values "alfresco-sync-service" "enabled" }} - {{- $alfportdsync := tpl (.Values.externalPort | toString ) $ }} - {{- $alfurldsync := printf "%s://%s:%s" $alfprotocol $alfhost $alfportdsync }} - Sync service: {{ $alfurldsync }}/syncservice/healthcheck -{{ end }} -{{ else }} -If you have a specific DNS address for the cluster please run the following commands to get the application paths and configure ACS: - -helm upgrade --reuse-values {{ .Release.Name }} --set externalProtocol="http" --set externalHost="domain.com" --set externalPort="80" alfresco-content-services - -{{ end }} diff --git a/alfresco-content-services/templates/_helpers-ai-transformer.tpl b/alfresco-content-services/templates/_helpers-ai-transformer.tpl deleted file mode 100644 index 01174eb..0000000 --- a/alfresco-content-services/templates/_helpers-ai-transformer.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "ai-transformer.selectorLabels" -}} -app: {{ template "content-services.shortname" . }}-ai-transformer -release: {{ .Release.Name }} -component: transformers -{{- end }} - -{{- define "ai-transformer.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "ai-transformer.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-elasticsearch.tpl b/alfresco-content-services/templates/_helpers-elasticsearch.tpl deleted file mode 100644 index f30c3c7..0000000 --- a/alfresco-content-services/templates/_helpers-elasticsearch.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "repo.elasticsearch.config" -}} -{{- if eq (index .Values "alfresco-search-enterprise" "elasticsearch" "protocol" | default .Values.global.elasticsearch.protocol) "https" }} --Delasticsearch.secureComms=https -{{- end }} --Delasticsearch.host={{ index .Values "alfresco-search-enterprise" "elasticsearch" "host" | default .Values.global.elasticsearch.host }} --Delasticsearch.port={{ index .Values "alfresco-search-enterprise" "elasticsearch" "port" | default .Values.global.elasticsearch.port }} --Delasticsearch.user={{ index .Values "alfresco-search-enterprise" "elasticsearch" "user" | default .Values.global.elasticsearch.user }} --Delasticsearch.password={{ index .Values "alfresco-search-enterprise" "elasticsearch" "password" | default .Values.global.elasticsearch.password }} --Delasticsearch.createIndexIfNotExists=true --Delasticsearch.indexName={{ index .Values "alfresco-search-enterprise" "indexName" }} -{{- end -}} diff --git a/alfresco-content-services/templates/_helpers-filestore.tpl b/alfresco-content-services/templates/_helpers-filestore.tpl deleted file mode 100644 index 01c1035..0000000 --- a/alfresco-content-services/templates/_helpers-filestore.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "filestore.selectorLabels" -}} -app: {{ template "alfresco.shortname" . }}-filestore -release: {{ .Release.Name }} -component: transformers -{{- end }} - -{{- define "filestore.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "filestore.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-imagemagick.tpl b/alfresco-content-services/templates/_helpers-imagemagick.tpl deleted file mode 100644 index 6652235..0000000 --- a/alfresco-content-services/templates/_helpers-imagemagick.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "imagemagick.selectorLabels" -}} -app: {{ template "content-services.shortname" . }}-imagemagick -release: {{ .Release.Name }} -component: transformers -{{- end }} - -{{- define "imagemagick.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "imagemagick.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-ingress.tpl b/alfresco-content-services/templates/_helpers-ingress.tpl deleted file mode 100644 index dafe61b..0000000 --- a/alfresco-content-services/templates/_helpers-ingress.tpl +++ /dev/null @@ -1,30 +0,0 @@ -{{/* -Define annotations as provided in values -*/}} -{{- define "ingress_annotations" }} -{{- range $annotation, $value := .ingress.annotations }} - {{- if ne $annotation "nginx.ingress.kubernetes.io/server-snippet" }} - {{- $annotation | nindent 4 }}: |- - {{- $value | nindent 6 }} - {{- end }} -{{- end }} -{{- end }} -{{/* -Define required annotations for secure nginx ingress -*/}} -{{- define "ingress_vhost_annotations" }} -{{- if index .ingress.annotations "nginx.ingress.kubernetes.io/server-snippet" }} - {{- range $annotation, $value := .ingress.annotations }} - {{- if eq $annotation "nginx.ingress.kubernetes.io/server-snippet" }} - nginx.ingress.kubernetes.io/server-snippet: | - {{- $value | nindent 6 }} - {{- end }} - {{- end }} -{{- else }} - nginx.ingress.kubernetes.io/server-snippet: | -{{- end }} - location ~ ^/.*/(wc)?s(ervice)?/api/solr/.*$ {return 403;} - location ~ ^/.*/proxy/.*/api/solr/.*$ {return 403;} - location ~ ^/.*/-default-/proxy/.*/api/.*$ {return 403;} - location ~ ^/.*/s/prometheus$ {return 403;} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-libreoffice.tpl b/alfresco-content-services/templates/_helpers-libreoffice.tpl deleted file mode 100644 index af9d29d..0000000 --- a/alfresco-content-services/templates/_helpers-libreoffice.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "libreoffice.selectorLabels" -}} -app: {{ template "content-services.shortname" . }}-libreoffice -release: {{ .Release.Name }} -component: transformers -{{- end }} - -{{- define "libreoffice.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "libreoffice.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-ms-teams-service.tpl b/alfresco-content-services/templates/_helpers-ms-teams-service.tpl deleted file mode 100644 index ee9a843..0000000 --- a/alfresco-content-services/templates/_helpers-ms-teams-service.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "ms-teams-service.selectorLabels" -}} -app: {{ template "content-services.shortname" . }}-ms-teams-service -release: {{ .Release.Name }} -component: msteamsservice -{{- end }} - -{{- define "ms-teams-service.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "ms-teams-service.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-ooi-service.tpl b/alfresco-content-services/templates/_helpers-ooi-service.tpl deleted file mode 100644 index 6fee467..0000000 --- a/alfresco-content-services/templates/_helpers-ooi-service.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "ooi-service.selectorLabels" -}} -app: {{ template "content-services.shortname" . }}-ooi-service -release: {{ .Release.Name }} -component: ooiservice -{{- end }} - -{{- define "ooi-service.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "ooi-service.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-pdfrenderer.tpl b/alfresco-content-services/templates/_helpers-pdfrenderer.tpl deleted file mode 100644 index bfdf597..0000000 --- a/alfresco-content-services/templates/_helpers-pdfrenderer.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "pdfrenderer.selectorLabels" -}} -app: {{ template "content-services.shortname" . }}-pdfrenderer -release: {{ .Release.Name }} -component: transformers -{{- end }} - -{{- define "pdfrenderer.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "pdfrenderer.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-repository.tpl b/alfresco-content-services/templates/_helpers-repository.tpl deleted file mode 100644 index 0c8b99e..0000000 --- a/alfresco-content-services/templates/_helpers-repository.tpl +++ /dev/null @@ -1,30 +0,0 @@ -{{- define "repository.selectorLabels" -}} -app: {{ template "content-services.shortname" . }}-repository -release: {{ .Release.Name }} -component: repository -{{- end }} - -{{- define "repository.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "repository.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} - -{{/* -Get Alfresco Repository Service Port ("external") -*/}} -{{- define "repository.svcPort" -}} -{{- $defaultSvcPort := 80 }} -{{- if hasKey .Values.repository "service" }} - {{- coalesce .Values.repository.service.externalPort $defaultSvcPort | int }} -{{- else }} - {{- $defaultSvcPort | int }} -{{- end }} -{{- end -}} - -{{/* -Get Alfresco Repository container Port ("internal") -*/}} -{{- define "repository.containerPort" -}} -{{- .Values.repository.image.internalPort | default 8080 | int }} -{{- end -}} diff --git a/alfresco-content-services/templates/_helpers-search.tpl b/alfresco-content-services/templates/_helpers-search.tpl deleted file mode 100644 index 4e0ad3f..0000000 --- a/alfresco-content-services/templates/_helpers-search.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -Alfresco Repository index subsystem -*/}} -{{- define "repository.indexSubsystem" -}} -{{- if or (index .Values "alfresco-search" "enabled") (index .Values "alfresco-search" "external" "host") -}} - solr6 -{{- else if index .Values "alfresco-search-enterprise" "enabled" -}} - elasticsearch -{{- else -}} - none -{{- end }} -{{- end -}} - -{{/* -Alfresco Repository search configuration -*/}} -{{- define "repository.indexConfig" -}} -{{- if index .Values "alfresco-search" "external" "host" }} --Dsolr.host={{ index .Values "alfresco-search" "external" "host" }} --Dsolr.port={{ index .Values "alfresco-search" "external" "port" | default 8983 }} --Dsolr.base.url={{ template "alfresco-search.baseurl" . }} --Dsolr.secureComms={{ .Values.global.tracking.auth | default "secret" }} -{{- else if index .Values "alfresco-search" "enabled" -}} -{{- $alfrescoSearchContext := dict "Chart" (index $.Subcharts "alfresco-search" "Chart") "Release" $.Release "Values" (index .Values "alfresco-search") }} --Dsolr.host={{ template "alfresco-search.host" $alfrescoSearchContext }} --Dsolr.port={{ template "alfresco-search.svcPort" $alfrescoSearchContext }} --Dsolr.base.url={{ index .Values "alfresco-search" "ingress" "path" | default "/solr" }} --Dsolr.secureComms={{ .Values.global.tracking.auth | default "secret" }} -{{- else if index .Values "alfresco-search-enterprise" "enabled" }} -{{- template "repo.elasticsearch.config" . }} -{{- end }} -{{- end -}} diff --git a/alfresco-content-services/templates/_helpers-share.tpl b/alfresco-content-services/templates/_helpers-share.tpl deleted file mode 100644 index fb38f85..0000000 --- a/alfresco-content-services/templates/_helpers-share.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "share.selectorLabels" -}} -app: {{ template "content-services.shortname" . }}-share -release: {{ .Release.Name }} -component: share -{{- end }} - -{{- define "share.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "share.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-tika.tpl b/alfresco-content-services/templates/_helpers-tika.tpl deleted file mode 100644 index 0338d7c..0000000 --- a/alfresco-content-services/templates/_helpers-tika.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "tika.selectorLabels" -}} -app: {{ template "content-services.shortname" . }}-tika -release: {{ .Release.Name }} -component: transformers -{{- end }} - -{{- define "tika.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "tika.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-transform-misc.tpl b/alfresco-content-services/templates/_helpers-transform-misc.tpl deleted file mode 100644 index 8e7c3a5..0000000 --- a/alfresco-content-services/templates/_helpers-transform-misc.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "transform-misc.selectorLabels" -}} -app: {{ template "content-services.shortname" . }}-transform-misc -release: {{ .Release.Name }} -component: transformers -{{- end }} - -{{- define "transform-misc.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "transform-misc.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-transform-router.tpl b/alfresco-content-services/templates/_helpers-transform-router.tpl deleted file mode 100644 index 831e3d1..0000000 --- a/alfresco-content-services/templates/_helpers-transform-router.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{{- define "transform-router.selectorLabels" -}} -app: {{ template "alfresco.shortname" . }}-router -release: {{ .Release.Name }} -component: transformrouter -{{- end }} - -{{- define "transform-router.labels" -}} -chart: {{ include "content-services.chart" . }} -{{ include "transform-router.selectorLabels" . }} -heritage: {{ .Release.Service }} -{{- end }} diff --git a/alfresco-content-services/templates/_helpers-url.tpl b/alfresco-content-services/templates/_helpers-url.tpl deleted file mode 100644 index b8132a2..0000000 --- a/alfresco-content-services/templates/_helpers-url.tpl +++ /dev/null @@ -1,35 +0,0 @@ -{{- define "alf.protocol" -}} -{{ .Values.externalProtocol | default "http" }} -{{- end -}} - -{{- define "alf.repo.host" -}} -{{ .Values.externalHost | default (printf "%s-repository" (include "content-services.shortname" .)) }} -{{- end -}} - -{{- define "alf.repo.port" -}} -{{ .Values.externalPort | default .Values.repository.service.externalPort | toString }} -{{- end -}} - -{{- define "alf.share.host" -}} -{{ .Values.externalHost | default (printf "%s-share" (include "content-services.shortname" .)) }} -{{- end -}} - -{{- define "alf.share.port" -}} -{{ .Values.externalPort | default .Values.share.service.externalPort | toString }} -{{- end -}} - -{{- define "repo.url" -}} -{{- include "url.builder" (dict "protocol" (include "alf.protocol" $) "host" (include "alf.repo.host" $) "port" (include "alf.repo.port" $) ) }} -{{- end -}} - -{{- define "share.url" -}} -{{- include "url.builder" (dict "protocol" (include "alf.protocol" $) "host" (include "alf.share.host" $) "port" (include "alf.share.port" $) ) }} -{{- end -}} - -{{- define "url.builder" -}} -{{- if or (and (eq .protocol "https") (eq .port "443")) (and (eq .protocol "http") (eq .port "80")) -}} -{{ .protocol }}://{{ .host }} -{{- else -}} -{{ .protocol }}://{{ .host }}:{{ .port }} -{{- end -}} -{{- end -}} diff --git a/alfresco-content-services/templates/_helpers.tpl b/alfresco-content-services/templates/_helpers.tpl deleted file mode 100644 index 1ece8d3..0000000 --- a/alfresco-content-services/templates/_helpers.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{{/* -Create a default fully qualified name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "content-services.fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "content-services.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" -}} -{{- end }} - -{{- define "content-services.activemq.fullname" -}} -{{- $data := dict "Release" .Release "Values" .Values.activemq "Chart" (dict "Name" "activemq") }} -{{- include "activemq.fullname" $data }} -{{- end }} diff --git a/alfresco-content-services/templates/config-ai-transformer.yaml b/alfresco-content-services/templates/config-ai-transformer.yaml deleted file mode 100644 index 63605e8..0000000 --- a/alfresco-content-services/templates/config-ai-transformer.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if .Values.global.ai.enabled }} -# Defines the properties required by the alfresco-ai-transformer container -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "content-services.shortname" . }}-ai-transformer-configmap - labels: - {{- include "ai-transformer.labels" . | nindent 4 }} -data: - # The JAVA_OPTS defined in the values.yaml file for "ai" are set here using proper quotes - {{- if .Values.aiTransformer.environment }} - {{- range $key, $val := .Values.aiTransformer.environment }} - {{ $key }}: {{ $val | quote }} - {{- end }} - {{- end }} - FILE_STORE_URL: http://{{ template "alfresco.shortname" . }}-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file - AWS_ACCESS_KEY: {{ .Values.ai.aws.accessKey }} - AWS_SECRET_ACCESS_KEY: {{ .Values.ai.aws.secretAccessKey }} - AWS_REGION: {{ .Values.ai.aws.region }} - AWS_S3_BUCKET: {{ .Values.ai.aws.s3Bucket }} - AWS_COMPREHEND_ROLE_ARN: {{ .Values.ai.aws.comprehendRoleARN }} - livenessPercent: "{{ .Values.aiTransformer.livenessProbe.livenessPercent }}" - livenessTransformPeriodSeconds: "{{ .Values.aiTransformer.livenessProbe.livenessTransformPeriodSeconds }}" - maxTransforms: "{{ .Values.aiTransformer.livenessProbe.maxTransforms }}" - maxTransformSeconds: "{{ .Values.aiTransformer.livenessProbe.maxTransformSeconds }}" -{{- end }} diff --git a/alfresco-content-services/templates/config-dev-log4j-properties.yaml b/alfresco-content-services/templates/config-dev-log4j-properties.yaml deleted file mode 100644 index aa7da00..0000000 --- a/alfresco-content-services/templates/config-dev-log4j-properties.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.repository.extraLogStatements }} -# Defines log4j properties -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "alfresco.shortname" . }}-custom-log4j-properties-configmap - labels: - {{- include "repository.labels" . | nindent 4 }} -data: - custom-log4j.properties: |- - {{- range $key, $val := .Values.repository.extraLogStatements }} - log4j.logger.{{ $key }}={{ $val }} - {{- end }} - custom-log4j2.properties: |- - {{- range $key, $val := .Values.repository.extraLogStatements }} - logger.{{ $key | replace "." "-" }}.name={{ $key }} - logger.{{ $key | replace "." "-" }}.level={{ $val }} - {{- end }} -{{- end }} diff --git a/alfresco-content-services/templates/config-email.yaml b/alfresco-content-services/templates/config-email.yaml deleted file mode 100644 index b094235..0000000 --- a/alfresco-content-services/templates/config-email.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if and .Values.email.server.enabled .Values.email.inbound.enabled }} -# Defines the email configmap for the alfresco content repository app -apiVersion: v1 -kind: ConfigMap -metadata: - name: tcp-services - labels: - {{- include "repository.labels" . | nindent 4 }} -data: - {{ .Values.email.server.port }}: "{{ .Release.Name }}/{{ template "content-services.shortname" . }}-email:{{ .Values.email.server.port }}::PROXY" - {{ .Values.imap.server.port }}: "{{ .Release.Name }}/{{ template "content-services.shortname" . }}-email:{{ .Values.imap.server.port }}::PROXY" - {{ .Values.imap.server.imaps.port }}: "{{ .Release.Name }}/{{ template "content-services.shortname" . }}-email:{{ .Values.imap.server.imaps.port }}::PROXY" -{{- end }} diff --git a/alfresco-content-services/templates/config-filestore.yaml b/alfresco-content-services/templates/config-filestore.yaml deleted file mode 100644 index b930e2e..0000000 --- a/alfresco-content-services/templates/config-filestore.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# Defines the properties required by the shared file store container -{{- if eq .Values.repository.edition "Enterprise" }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "alfresco.shortname" . }}-filestore-configmap - labels: - {{- include "filestore.labels" . | nindent 4 }} -data: - # The JAVA_OPTS defined in the values.yaml file for "shared file store" are set here using proper quotes - {{- if .Values.filestore.environment }} - {{- range $key, $val := .Values.filestore.environment }} - {{ $key }}: {{ $val | quote }} - {{- end }} - {{- end }} - livenessPercent: "{{ .Values.filestore.livenessProbe.livenessPercent }}" - livenessSavePeriodSeconds: "{{ .Values.filestore.livenessProbe.livenessSavePeriodSeconds }}" -{{- end }} diff --git a/alfresco-content-services/templates/config-imagemagick.yaml b/alfresco-content-services/templates/config-imagemagick.yaml deleted file mode 100644 index a9ca522..0000000 --- a/alfresco-content-services/templates/config-imagemagick.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Defines the properties required by the imagemagick container -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "content-services.shortname" . }}-imagemagick-configmap - labels: - {{- include "imagemagick.labels" . | nindent 4 }} -data: - # The JAVA_OPTS defined in the values.yaml file for the "imagemagick" are set here using proper quotes - {{- if .Values.imagemagick.environment }} - {{- range $key, $val := .Values.imagemagick.environment }} - {{ $key }}: {{ $val | quote }} - {{- end }} - {{- end }} - FILE_STORE_URL: http://{{ template "alfresco.shortname" . }}-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file - livenessPercent: "{{ .Values.imagemagick.livenessProbe.livenessPercent }}" - livenessTransformPeriodSeconds: "{{ .Values.imagemagick.livenessProbe.livenessTransformPeriodSeconds }}" - maxTransforms: "{{ .Values.imagemagick.livenessProbe.maxTransforms }}" - maxTransformSeconds: "{{ .Values.imagemagick.livenessProbe.maxTransformSeconds }}" diff --git a/alfresco-content-services/templates/config-libreoffice.yaml b/alfresco-content-services/templates/config-libreoffice.yaml deleted file mode 100644 index ec84fc0..0000000 --- a/alfresco-content-services/templates/config-libreoffice.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Defines the properties required by the libreoffice container -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "content-services.shortname" . }}-libreoffice-configmap - labels: - {{- include "libreoffice.labels" . | nindent 4 }} -data: - # The JAVA_OPTS defined in the values.yaml file for the "libreoffice" are set here using proper quotes - {{- if .Values.libreoffice.environment }} - {{- range $key, $val := .Values.libreoffice.environment }} - {{ $key }}: {{ $val | quote }} - {{- end }} - {{- end }} - FILE_STORE_URL: http://{{ template "alfresco.shortname" . }}-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file - livenessPercent: "{{ .Values.libreoffice.livenessProbe.livenessPercent }}" - livenessTransformPeriodSeconds: "{{ .Values.libreoffice.livenessProbe.livenessTransformPeriodSeconds }}" - maxTransforms: "{{ .Values.libreoffice.livenessProbe.maxTransforms }}" - maxTransformSeconds: "{{ .Values.libreoffice.livenessProbe.maxTransformSeconds }}" diff --git a/alfresco-content-services/templates/config-ms-teams-service.yaml b/alfresco-content-services/templates/config-ms-teams-service.yaml deleted file mode 100644 index df5ab54..0000000 --- a/alfresco-content-services/templates/config-ms-teams-service.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if .Values.msTeams.enabled }} -# Defines the properties required by the alfresco-ms-teams-service container -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "content-services.shortname" . }}-ms-teams-service-configmap - labels: - {{- include "ms-teams-service.labels" . | nindent 4 }} -data: - # The JAVA_OPTS defined in the values.yaml file for the "msTeamsService" are set here using proper quotes - {{- if .Values.msTeamsService.environment }} - {{- range $key, $val := .Values.msTeamsService.environment }} - {{ $key }}: {{ $val | quote }} - {{- end }} - {{- end }} - ALFRESCO_BASE_URL: "{{ .Values.msTeamsService.alfresco.baseUrl }}" - ALFRESCO_DIGITAL_WORKSPACE_CONTEXT_PATH: "{{ .Values.msTeamsService.alfresco.digitalWorkspace.contextPath }}" - MICROSOFT_APP_ID: "{{ .Values.msTeamsService.microsoft.app.id }}" - MICROSOFT_APP_PASSWORD: "{{ .Values.msTeamsService.microsoft.app.password }}" - MICROSOFT_APP_OAUTH_CONNECTION_NAME: "{{ .Values.msTeamsService.microsoft.app.oauth.connectionName }}" - TEAMS_CHAT_FILENAME_ENABLED: "{{ .Values.msTeamsService.teams.chat.filenameEnabled }}" - TEAMS_CHAT_METADATA_ENABLED: "{{ .Values.msTeamsService.teams.chat.metadataEnabled }}" - TEAMS_CHAT_IMAGE_ENABLED: "{{ .Values.msTeamsService.teams.chat.imageEnabled }}" -{{- end }} diff --git a/alfresco-content-services/templates/config-ooi-service.yaml b/alfresco-content-services/templates/config-ooi-service.yaml deleted file mode 100644 index f680f4a..0000000 --- a/alfresco-content-services/templates/config-ooi-service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.ooi.enabled }} -# Defines the properties required by the alfresco-ooi-service container -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "content-services.shortname" . }}-ooi-service-configmap - labels: - {{- include "ooi-service.labels" . | nindent 4 }} -data: - # The JAVA_OPTS defined in the values.yaml file for the "ooiService" are set here using proper quotes - {{- if .Values.ooiService.environment }} - {{- range $key, $val := .Values.ooiService.environment }} - {{ $key }}: {{ tpl $val $ | quote }} - {{- end }} - {{- end }} -{{- end }} diff --git a/alfresco-content-services/templates/config-pdfrenderer.yaml b/alfresco-content-services/templates/config-pdfrenderer.yaml deleted file mode 100644 index 407592d..0000000 --- a/alfresco-content-services/templates/config-pdfrenderer.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Defines the properties required by the alfresco-pdf-renderer container -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "content-services.shortname" . }}-pdfrenderer-configmap - labels: - {{- include "pdfrenderer.labels" . | nindent 4 }} -data: - # The JAVA_OPTS defined in the values.yaml file for the "pdfrenderer" are set here using proper quotes - {{- if .Values.pdfrenderer.environment }} - {{- range $key, $val := .Values.pdfrenderer.environment }} - {{ $key }}: {{ $val | quote }} - {{- end }} - {{- end }} - FILE_STORE_URL: http://{{ template "alfresco.shortname" . }}-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file - livenessPercent: "{{ .Values.pdfrenderer.livenessProbe.livenessPercent }}" - livenessTransformPeriodSeconds: "{{ .Values.pdfrenderer.livenessProbe.livenessTransformPeriodSeconds }}" - maxTransforms: "{{ .Values.pdfrenderer.livenessProbe.maxTransforms }}" - maxTransformSeconds: "{{ .Values.pdfrenderer.livenessProbe.maxTransformSeconds }}" diff --git a/alfresco-content-services/templates/config-repository.yaml b/alfresco-content-services/templates/config-repository.yaml deleted file mode 100644 index 9956d10..0000000 --- a/alfresco-content-services/templates/config-repository.yaml +++ /dev/null @@ -1,147 +0,0 @@ -# Defines the properties required by the content repository -apiVersion: v1 -kind: ConfigMap -metadata: - # the name of the config map - name: {{ template "content-services.shortname" . }}-repository-configmap - labels: - {{- include "repository.labels" . | nindent 4 }} -data: - # The JAVA_OPTS defined in the values.yaml file for the "repository" are set here using proper quotes - {{- if .Values.repository.environment }} - {{- range $key, $val := .Values.repository.environment }} - {{ $key }}: {{ tpl $val $ | quote }} - {{- end }} - {{- end }} - RELEASE_NAME: {{ .Release.Name }} - {{- $alfUrl := include "repo.url" $ }} - ALFRESCO_OPTS: >- - -Ddeployment.method=HELM_CHART - -Dalfresco.cluster.enabled={{ gt (.Values.repository.replicaCount | int) 1 }} - {{- if .Values.repository.licenseSecret }} - -Ddir.license.external=/usr/local/tomcat/shared/classes/alfresco/extension/license/ - {{- end }} - -Dalfresco.host={{ include "alf.repo.host" $ }} - -Dalfresco.protocol={{ include "alf.protocol" $ }} - -Dalfresco.port={{ include "alf.repo.port" $ }} - -Daos.baseUrlOverwrite={{ $alfUrl }}/alfresco/aos - -Dcsrf.filter.origin={{ $alfUrl }} - -Dcsrf.filter.referer={{ $alfUrl }}/.* - -Dshare.protocol={{ tpl (.Values.externalProtocol | default "https") $ }} - -Dshare.host={{ .Release.Namespace }}.{{ .Values.repository.ingress.hostName }} - -Dshare.port=443 - {{- $subsys := include "repository.indexSubsystem" . }} - {{- if ne $subsys "none" }} - {{- include "repository.indexConfig" . | indent 6 }} - {{- end }} - -Dindex.subsystem.name={{ $subsys }} - {{- if eq .Values.repository.edition "Enterprise" }} - -Dtransform.service.url=http://{{ template "alfresco.shortname" . }}-router - -Dsfs.url=http://{{ template "alfresco.shortname" . }}-filestore:80 - {{- end }} - -DlocalTransform.core-aio.url= - -DlocalTransform.pdfrenderer.url=http://{{ template "content-services.shortname" . }}-pdfrenderer - -DlocalTransform.imagemagick.url=http://{{ template "content-services.shortname" . }}-imagemagick - -DlocalTransform.libreoffice.url=http://{{ template "content-services.shortname" . }}-libreoffice - -DlocalTransform.tika.url=http://{{ template "content-services.shortname" . }}-tika - {{- if .Values.transformmisc.enabled }} - -DlocalTransform.misc.url=http://{{ template "content-services.shortname" . }}-transform-misc - {{- end }} - -Dalfresco-pdf-renderer.url=http://{{ template "content-services.shortname" . }}-pdfrenderer - -Dimg.url=http://{{ template "content-services.shortname" . }}-imagemagick - -Djodconverter.url=http://{{ template "content-services.shortname" . }}-libreoffice - -Dtika.url=http://{{ template "content-services.shortname" . }}-tika - {{- if .Values.transformmisc.enabled }} - -Dtransform.misc.url=http://{{ template "content-services.shortname" . }}-transform-misc - {{- end }} - {{- if .Values.s3connector.enabled }} - {{- range $key, $val := .Values.s3connector.config }} - -Ds3.{{ $key }}={{ $val }} - {{- end }} - {{- end }} - {{- if .Values.email.server.enabled }} - -Demail.server.enabled={{ .Values.email.server.enabled }} - -Demail.server.port={{ .Values.email.server.port }} - -Demail.server.domain={{ .Values.email.server.domain }} - -Demail.server.enableTLS={{ .Values.email.server.enableTLS }} - -Demail.server.hideTLS={{ .Values.email.server.hideTLS }} - -Demail.server.requireTLS={{ .Values.email.server.requireTLS }} - -Demail.server.auth.enabled={{ .Values.email.server.auth.enabled }} - -Demail.server.connections.max={{ .Values.email.server.connections.max }} - -Demail.server.allowed.senders={{ .Values.email.server.allowed.senders }} - -Demail.server.blocked.senders={{ .Values.email.server.blocked.senders }} - -Demail.inbound.enabled={{ .Values.email.inbound.enabled }} - -Demail.inbound.unknownUser={{ .Values.email.inbound.unknownUser }} - -Demail.inbound.emailContributorsAuthority={{ .Values.email.inbound.emailContributorsAuthority }} - -Demail.handler.folder.overwriteDuplicates={{ .Values.email.handler.folder.overwriteDuplicates }} - -Dimap.server.enabled={{ .Values.imap.server.enabled }} - -Dimap.server.port={{ .Values.imap.server.port }} - -Dimap.server.host={{ .Values.imap.server.host }} - -Dimap.server.imap.enabled={{ .Values.imap.server.imap.enabled }} - -Dimap.server.imaps.enabled={{ .Values.imap.server.imaps.enabled }} - -Dimap.server.imaps.port={{ .Values.imap.server.imaps.port }} - -Dimap.mail.from.default={{ .Values.imap.mail.from.default }} - -Dimap.mail.to.default={{ .Values.imap.mail.to.default }} - -Dsystem.usages.enabled=true - -Dnotification.email.siteinvite=true - {{- if .Values.email.server.enableTLS }} - -Djavax.net.ssl.keyStore=/var/run/secrets/java.io/keystores/keystore.jks -Djavax.net.ssl.keyStorePassword=changeit - {{- end }} - {{- end }} - {{- if .Values.mail.host }} - -Dmail.encoding={{ .Values.mail.encoding }} - -Dmail.host={{ .Values.mail.host }} - -Dmail.port={{ .Values.mail.port }} - -Dmail.protocol={{ .Values.mail.protocol }} - -Dmail.username={{ .Values.mail.username }} - -Dmail.from.default={{ .Values.mail.from.default }} - -Dmail.from.enabled={{ .Values.mail.from.enabled }} - -Dmail.smtp.auth={{ .Values.mail.smtp.auth }} - -Dmail.smtp.debug={{ .Values.mail.smtp.debug }} - -Dmail.smtp.starttls.enable={{ .Values.mail.smtp.starttls.enable }} - -Dmail.smtp.timeout={{ .Values.mail.smtp.timeout }} - -Dmail.smtps.auth={{ .Values.mail.smtps.auth }} - -Dmail.smtps.starttls.enable={{ .Values.mail.smtps.starttls.enable }} - {{- end }} - {{- if index .Values "alfresco-sync-service" "enabled" }} - -Ddsync.service.uris={{ $alfUrl }}/syncservice - {{- else }} - -Devents.subsystem.autoStart=false - {{- end }} - -Dfilecontentstore.subsystem.name=S3 - -Ds3.flatRoot=false - CATALINA_OPTS: >- - $ALFRESCO_OPTS - -Ddb.driver={{ .Values.database.driver | default "org.postgresql.Driver" }} - {{- if eq .Values.database.external false }} - -Ddb.url=jdbc:postgresql://{{ printf "%s-%s" .Release.Name .Values.postgresql.nameOverride }}:{{ .Values.postgresql.primary.service.ports.postgresql }}/{{ .Values.postgresql.auth.database }} - {{- else }} - -Ddb.url=jdbc:postgresql://$RDS_INSTANCE_ENDPOINT/$DATABASE_NAME - {{- end }} - {{- if and .Values.mail.host (or .Values.mail.password .Values.mail.existingSecretName) }} - -Dmail.password=$MAIL_PASSWORD - {{- end }} - -Ddb.username=$DATABASE_USERNAME - -Ddb.password=$DATABASE_PASSWORD - {{- if .Values.s3connector.enabled }} - {{- if .Values.s3connector.secrets.accessKey }} - -Ds3.accessKey=$ACCESSKEY - {{- end }} - {{- if .Values.s3connector.secrets.secretKey }} - -Ds3.secretKey=$SECRETKEY - {{- end }} - {{- if .Values.s3connector.secrets.encryption }} - -Ds3.encryption=$ENCRYPTION - {{- end }} - {{- if .Values.s3connector.secrets.awsKmsKeyId }} - -Ds3.awsKmsKeyId=$KMSKEYID - {{- end }} - {{- end }} - -Dmetadata-keystore.password=$METADATA_KEYSTORE_PASSWORD - -Dmetadata-keystore.metadata.password=$METADATA_KEY_PASSWORD - -Dmessaging.broker.url=$BROKER_URL - -Dmessaging.broker.username=$BROKER_USERNAME - -Dmessaging.broker.password=$BROKER_PASSWORD - -Dencryption.ssl.truststore.location=$JAVA_HOME/lib/security/cacerts - -Dalfresco_user_store.adminpassword=$REPO_ADMIN_PASSWORD - diff --git a/alfresco-content-services/templates/config-share.yaml b/alfresco-content-services/templates/config-share.yaml deleted file mode 100644 index 8a0c40f..0000000 --- a/alfresco-content-services/templates/config-share.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# temporarily disable for poc -# Defines the properties required by the share app -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "content-services.shortname" . }}-share-configmap - labels: - {{- include "share.labels" . | nindent 4 }} -data: - {{- $alfUrl := include "share.url" $ -}} - {{- $alfproxy := printf "-Dalfresco.proxy=%s" $alfUrl }} - REPO_HOST: "{{ template "content-services.shortname" . }}-repository" - REPO_PORT: "{{ .Values.repository.service.externalPort }}" - CSRF_FILTER_REFERER: "{{ $alfUrl }}/.*" - CSRF_FILTER_ORIGIN: "{{ $alfUrl }}" - {{- $environment := .Values.share.environment | default dict }} - JAVA_OPTS: {{ tpl (printf "%s %s" ($environment.JAVA_OPTS | default "") $alfproxy) $ | trim | quote }} - {{- range $key, $val := omit $environment "JAVA_OPTS" }} - {{ $key }}: {{ tpl $val $ | quote }} - {{- end }} diff --git a/alfresco-content-services/templates/config-tika.yaml b/alfresco-content-services/templates/config-tika.yaml deleted file mode 100644 index 5448cad..0000000 --- a/alfresco-content-services/templates/config-tika.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Defines the properties required by the alfresco-tika container -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "content-services.shortname" . }}-tika-configmap - labels: - {{- include "tika.labels" . | nindent 4 }} -data: - # The JAVA_OPTS defined in the values.yaml file for "tika" are set here using proper quotes - {{- if .Values.tika.environment }} - {{- range $key, $val := .Values.tika.environment }} - {{ $key }}: {{ $val | quote }} - {{- end }} - {{- end }} - FILE_STORE_URL: http://{{ template "alfresco.shortname" . }}-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file - livenessPercent: "{{ .Values.tika.livenessProbe.livenessPercent }}" - livenessTransformPeriodSeconds: "{{ .Values.tika.livenessProbe.livenessTransformPeriodSeconds }}" - maxTransforms: "{{ .Values.tika.livenessProbe.maxTransforms }}" - maxTransformSeconds: "{{ .Values.tika.livenessProbe.maxTransformSeconds }}" diff --git a/alfresco-content-services/templates/config-transform-misc.yaml b/alfresco-content-services/templates/config-transform-misc.yaml deleted file mode 100644 index aa69989..0000000 --- a/alfresco-content-services/templates/config-transform-misc.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.transformmisc.enabled }} -# Defines the properties required by the alfresco-transform-misc container -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "content-services.shortname" . }}-transform-misc-configmap - labels: - {{- include "transform-misc.labels" . | nindent 4 }} -data: - # The JAVA_OPTS defined in the values.yaml file for "transform-misc" are set here using proper quotes - {{- if .Values.transformmisc.environment }} - {{- range $key, $val := .Values.transformmisc.environment }} - {{ $key }}: {{ $val | quote }} - {{- end }} - {{- end }} - FILE_STORE_URL: http://{{ template "alfresco.shortname" . }}-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file - livenessPercent: "{{ .Values.transformmisc.livenessProbe.livenessPercent }}" - livenessTransformPeriodSeconds: "{{ .Values.transformmisc.livenessProbe.livenessTransformPeriodSeconds }}" - maxTransforms: "{{ .Values.transformmisc.livenessProbe.maxTransforms }}" - maxTransformSeconds: "{{ .Values.transformmisc.livenessProbe.maxTransformSeconds }}" -{{- end }} diff --git a/alfresco-content-services/templates/config-transform-router.yaml b/alfresco-content-services/templates/config-transform-router.yaml deleted file mode 100644 index 8727dea..0000000 --- a/alfresco-content-services/templates/config-transform-router.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Defines the properties required by the transform router container -{{- if eq .Values.repository.edition "Enterprise" }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "alfresco.shortname" . }}-router-configmap - labels: - {{- include "transform-router.labels" . | nindent 4 }} -data: - # The JAVA_OPTS defined in the values.yaml file for "transformrouter" are set here using proper quotes - {{- if .Values.transformrouter.environment }} - {{- range $key, $val := .Values.transformrouter.environment }} - {{ $key }}: {{ $val | quote }} - {{- end }} - {{- end }} - IMAGEMAGICK_URL: http://{{ template "content-services.shortname" . }}-imagemagick:80 - PDF_RENDERER_URL: http://{{ template "content-services.shortname" . }}-pdfrenderer:80 - LIBREOFFICE_URL: http://{{ template "content-services.shortname" . }}-libreoffice:80 - TIKA_URL: http://{{ template "content-services.shortname" . }}-tika:80 - {{- if .Values.transformmisc.enabled }} - MISC_URL: http://{{ template "content-services.shortname" . }}-transform-misc:80 - {{- end }} - FILE_STORE_URL: http://{{ template "alfresco.shortname" . }}-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file - {{- if .Values.global.ai.enabled }} - TRANSFORMER_URL_AWS_AI: http://{{ template "content-services.shortname" . }}-ai-transformer:80 - TRANSFORMER_QUEUE_AWS_AI: "org.alfresco.transform.engine.ai-aws.acs" - TRANSFORMER_ROUTES_ADDITIONAL_AI: "/mnt/routes/ai-pipeline-routes.json" - - {{- end }} -{{- end }} diff --git a/alfresco-content-services/templates/config-transformer-routes.yaml b/alfresco-content-services/templates/config-transformer-routes.yaml deleted file mode 100644 index 27c7897..0000000 --- a/alfresco-content-services/templates/config-transformer-routes.yaml +++ /dev/null @@ -1,388 +0,0 @@ -{{- if .Values.global.ai.enabled }} -# Defines transformer routes -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "alfresco.shortname" . }}-transform-routes-configmap - labels: - {{- include "transform-router.labels" . | nindent 4 }} -data: - ai-pipeline-routes.json: |- - { - "transformers": [ - { - "transformerName": "gifToRekognitionViaJpg", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/jpeg"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/gif", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.labels.v1+json" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "tiffToRekognitionViaGif", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/gif"}, - {"transformerName": "gifToRekognitionViaJpg"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/tiff", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.labels.v1+json" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "pdfToRekognitionViaPng", - "transformerPipeline" : [ - {"transformerName": "pdfrenderer", "targetMediaType": "image/png"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "application/pdf", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.labels.v1+json" } - ], - "transformOptions": [ - "pdfRendererOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "officeToRekognitionViaPdf", - "transformerPipeline" : [ - {"transformerName": "libreoffice", "targetMediaType": "application/pdf"}, - {"transformerName": "pdfToRekognitionViaPng"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "application/msword", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.labels.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.labels.v1+json" }, - {"sourceMediaType": "application/vnd.ms-excel", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.labels.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.labels.v1+json" }, - {"sourceMediaType": "application/vnd.ms-powerpoint", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.labels.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.labels.v1+json" } - ], - "transformOptions": [ - "pdfRendererOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "pdfToComprehendEntityRecognitionViaTextract", - "transformerPipeline" : [ - {"transformerName": "AWS_AI", "targetMediaType": "application/vnd.alfresco.ai.textract.v1+plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "application/pdf", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" } - ], - "transformOptions": [ - "awsAiOptions" - ] - }, - { - "transformerName": "officeToComprehendEntityRecognitionViaText", - "transformerPipeline" : [ - {"transformerName": "TikaAuto", "targetMediaType": "text/plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "application/msword", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" }, - {"sourceMediaType": "application/vnd.ms-excel", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" }, - {"sourceMediaType": "application/vnd.ms-powerpoint", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" } - ], - "transformOptions": [ - "awsAiOptions" - ] - }, - { - "transformerName": "msOutlookToComprehendEntityRecognitionViaText", - "transformerPipeline" : [ - {"transformerName": "OutlookMsg", "targetMediaType": "text/plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "application/vnd.ms-outlook", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" } - ], - "transformOptions": [ - "awsAiOptions" - ] - }, - { - "transformerName": "pdfToComprehendClassificationViaText", - "transformerPipeline" : [ - {"transformerName": "PdfBox", "targetMediaType": "text/plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "application/pdf", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" } - ], - "transformOptions": [ - "pdfboxOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "officeToComprehendClassificationViaText", - "transformerPipeline" : [ - {"transformerName": "libreoffice", "targetMediaType": "text/plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "application/msword", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" }, - {"sourceMediaType": "application/vnd.ms-excel", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" }, - {"sourceMediaType": "application/vnd.ms-powerpoint", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" }, - {"sourceMediaType": "application/vnd.ms-outlook", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" } - ], - "transformOptions": [ - "awsAiOptions" - ] - }, - { - "transformerName": "gifToTextractPlainViaJpg", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/jpeg"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/gif", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.textract.v1+plain" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "tiffToTextractPlainViaGif", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/gif"}, - {"transformerName": "gifToTextractPlainViaJpg"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/tiff", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.textract.v1+plain" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "gifToTextractViaJpg", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/jpeg"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/gif", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.textract.v1+json" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "tiffToTextractViaGif", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/gif"}, - {"transformerName": "gifToTextractViaJpg"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/tiff", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.textract.v1+json" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "officeToTextractViaPdf", - "transformerPipeline" : [ - {"transformerName": "libreoffice", "targetMediaType": "application/pdf"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "application/msword", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.textract.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.textract.v1+json" }, - {"sourceMediaType": "application/vnd.ms-excel", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.textract.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.textract.v1+json" }, - {"sourceMediaType": "application/vnd.ms-powerpoint", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.textract.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.textract.v1+json" } - ], - "transformOptions": [ - "awsAiOptions" - ] - }, - { - "transformerName": "imageToComprendEntityRecognitionViaTextractPlain", - "transformerPipeline" : [ - {"transformerName": "AWS_AI", "targetMediaType": "application/vnd.alfresco.ai.textract.v1+plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/png", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" }, - {"sourceMediaType": "image/jpeg", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" } - ], - "transformOptions": [ - "awsAiOptions" - ] - }, - { - "transformerName": "gifToComprendEntityRecognitionViaTextractPlain", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/jpeg"}, - {"transformerName": "AWS_AI", "targetMediaType": "application/vnd.alfresco.ai.textract.v1+plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/gif", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "tiffToComprendEntityRecognitionViaTextractPlain", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/jpeg"}, - {"transformerName": "gifToComprendEntityRecognitionViaTextractPlain"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/tiff", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.features.v1+json" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "imageToComprendClassificationViaTextractPlain", - "transformerPipeline" : [ - {"transformerName": "AWS_AI", "targetMediaType": "application/vnd.alfresco.ai.textract.v1+plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/png", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" }, - {"sourceMediaType": "image/jpeg", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" } - ], - "transformOptions": [ - "awsAiOptions" - ] - }, - { - "transformerName": "gifToComprendClassificationViaTextractPlain", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/jpeg"}, - {"transformerName": "AWS_AI", "targetMediaType": "application/vnd.alfresco.ai.textract.v1+plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/gif", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "tiffToComprendClassificationViaTextractPlain", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/jpeg"}, - {"transformerName": "gifToComprendClassificationViaTextractPlain"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/tiff", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "pdfToComprehendPiiEntityTypesViaTextractPlain", - "transformerPipeline" : [ - {"transformerName": "AWS_AI", "targetMediaType": "application/vnd.alfresco.ai.textract.v1+plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "application/pdf", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" } - ], - "transformOptions": [ - "awsAiOptions" - ] - }, - { - "transformerName": "officeToComprehendPiiEntityTypesViaText", - "transformerPipeline" : [ - {"transformerName": "TikaAuto", "targetMediaType": "text/plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "application/msword", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" }, - {"sourceMediaType": "application/vnd.ms-excel", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" }, - {"sourceMediaType": "application/vnd.ms-powerpoint", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" }, - {"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" }, - {"sourceMediaType": "application/vnd.ms-outlook", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" } - ], - "transformOptions": [ - "awsAiOptions" - ] - }, - { - "transformerName": "imageToComprehendPiiEntityTypesViaTextractPlain", - "transformerPipeline" : [ - {"transformerName": "AWS_AI", "targetMediaType": "application/vnd.alfresco.ai.textract.v1+plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/png", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" }, - {"sourceMediaType": "image/jpeg", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" } - ], - "transformOptions": [ - "awsAiOptions" - ] - }, - { - "transformerName": "gifToComprehendPiiEntityTypesViaTextractPlain", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/jpeg"}, - {"transformerName": "AWS_AI", "targetMediaType": "application/vnd.alfresco.ai.textract.v1+plain"}, - {"transformerName": "AWS_AI"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/gif", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - }, - { - "transformerName": "tiffToComprehendPiiEntityTypesViaTextractPlain", - "transformerPipeline" : [ - {"transformerName": "imagemagick", "targetMediaType": "image/jpeg"}, - {"transformerName": "gifToComprehendPiiEntityTypesViaTextractPlain"} - ], - "supportedSourceAndTargetList": [ - {"sourceMediaType": "image/tiff", "maxSourceSizeBytes": -1, "targetMediaType": "application/vnd.alfresco.ai.pii.entities.v1+json" } - ], - "transformOptions": [ - "imageMagickOptions", - "awsAiOptions" - ] - } - ] - } -{{- end }} diff --git a/alfresco-content-services/templates/deployment-ai-transformer.yaml b/alfresco-content-services/templates/deployment-ai-transformer.yaml deleted file mode 100644 index fa947f4..0000000 --- a/alfresco-content-services/templates/deployment-ai-transformer.yaml +++ /dev/null @@ -1,83 +0,0 @@ -{{- if .Values.global.ai.enabled }} -# Defines the deployment for the ai transformer app -# Details: https://github.com/Alfresco/alfresco-ai-transformers/tree/master/alfresco-ai-docker-engine -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "content-services.shortname" . }}-ai-transformer - labels: - {{- include "ai-transformer.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.aiTransformer.replicaCount }} - selector: - matchLabels: - {{- include "ai-transformer.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-ai-transformer.yaml") . | sha256sum }} - labels: - {{- include "ai-transformer.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.aiTransformer | indent 4 }} - {{- if .Values.aiTransformer.nodeSelector }} - nodeSelector: {{- .Values.aiTransformer.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-ai-transformer - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-ai-transformer - topologyKey: kubernetes.io/hostname - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.aiTransformer.image.repository }}:{{ .Values.aiTransformer.image.tag }}" - imagePullPolicy: {{ .Values.aiTransformer.image.pullPolicy }} - {{- include "component-security-context" .Values.aiTransformer | indent 8 }} - envFrom: - - configMapRef: - # config map to use, defined in config-ai-transformer.yaml - name: {{ template "content-services.shortname" . }}-ai-transformer-configmap - - secretRef: - name: {{ .Values.messageBroker.existingSecretName | default .Values.messageBroker.secretName }} - env: - {{- include "activemq.env" . | nindent 12 }} - ports: - - containerPort: {{ .Values.aiTransformer.image.internalPort }} - resources: {{- toYaml .Values.aiTransformer.resources | nindent 12 }} - readinessProbe: - httpGet: - path: /ready - port: {{ .Values.aiTransformer.image.internalPort }} - initialDelaySeconds: {{ .Values.aiTransformer.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.aiTransformer.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.aiTransformer.readinessProbe.timeoutSeconds }} - livenessProbe: - httpGet: - path: /live - port: {{ .Values.aiTransformer.image.internalPort }} - initialDelaySeconds: {{ .Values.aiTransformer.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.aiTransformer.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.aiTransformer.livenessProbe.timeoutSeconds }} -{{- end }} diff --git a/alfresco-content-services/templates/deployment-filestore.yaml b/alfresco-content-services/templates/deployment-filestore.yaml deleted file mode 100644 index 541f5c8..0000000 --- a/alfresco-content-services/templates/deployment-filestore.yaml +++ /dev/null @@ -1,85 +0,0 @@ -# Defines the deployment for the shared file store -# Details: https://git.alfresco.com/Repository/alfresco-shared file store -{{- if eq .Values.repository.edition "Enterprise" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "alfresco.shortname" . }}-filestore - labels: - {{- include "filestore.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.filestore.replicaCount }} - selector: - matchLabels: - {{- include "filestore.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-filestore.yaml") . | sha256sum }} - labels: - {{- include "filestore.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.filestore | indent 4 }} - {{- if .Values.filestore.nodeSelector }} - nodeSelector: {{- .Values.filestore.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco.shortname" . }}-filestore - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco.shortname" . }}-filestore - topologyKey: kubernetes.io/hostname - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.filestore.image.repository }}:{{ .Values.filestore.image.tag }}" - imagePullPolicy: {{ .Values.filestore.image.pullPolicy }} - {{- include "component-security-context" .Values.filestore | indent 8 }} - envFrom: - - configMapRef: - # config map to use, defined in config-filestore.yaml - name: {{ template "alfresco.shortname" . }}-filestore-configmap - ports: - - containerPort: {{ .Values.filestore.image.internalPort }} - resources: {{- toYaml .Values.filestore.resources | nindent 12 }} - readinessProbe: - httpGet: - path: /ready - port: {{ .Values.filestore.image.internalPort }} - initialDelaySeconds: {{ .Values.filestore.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.filestore.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.filestore.readinessProbe.timeoutSeconds }} - livenessProbe: - httpGet: - path: /live - port: {{ .Values.filestore.image.internalPort }} - initialDelaySeconds: {{ .Values.filestore.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.filestore.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.filestore.livenessProbe.timeoutSeconds }} - volumeMounts: - - name: data - mountPath: {{ .Values.filestore.persistence.data.mountPath }} - subPath: {{ .Values.filestore.persistence.data.subPath }} - volumes: - {{- include "data_volume" .Values.filestore | nindent 8 }} -{{- end }} diff --git a/alfresco-content-services/templates/deployment-imagemagick.yaml b/alfresco-content-services/templates/deployment-imagemagick.yaml deleted file mode 100644 index 68045ed..0000000 --- a/alfresco-content-services/templates/deployment-imagemagick.yaml +++ /dev/null @@ -1,81 +0,0 @@ -# Defines the deployment for the imagemagick transformer app -# Details: https://git.alfresco.com/Repository/alfresco-docker-transformers -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "content-services.shortname" . }}-imagemagick - labels: - {{- include "imagemagick.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.imagemagick.replicaCount }} - selector: - matchLabels: - {{- include "imagemagick.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-imagemagick.yaml") . | sha256sum }} - labels: - {{- include "imagemagick.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.imagemagick| indent 4 }} - {{- if .Values.imagemagick.nodeSelector }} - nodeSelector: {{- .Values.imagemagick.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-imagemagick - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-imagemagick - topologyKey: kubernetes.io/hostname - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.imagemagick.image.repository }}:{{ .Values.imagemagick.image.tag }}" - imagePullPolicy: {{ .Values.imagemagick.image.pullPolicy }} - {{- include "component-security-context" .Values.imagemagick| indent 8 }} - envFrom: - - configMapRef: - # config map to use, defined in config-imagemagick.yaml - name: {{ template "content-services.shortname" . }}-imagemagick-configmap - - secretRef: - name: {{ .Values.messageBroker.existingSecretName | default .Values.messageBroker.secretName }} - env: - {{- include "activemq.env" . | nindent 12 }} - ports: - - containerPort: {{ .Values.imagemagick.image.internalPort }} - resources: {{- toYaml .Values.imagemagick.resources | nindent 12 }} - readinessProbe: - httpGet: - path: /ready - port: {{ .Values.imagemagick.image.internalPort }} - initialDelaySeconds: {{ .Values.imagemagick.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.imagemagick.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.imagemagick.readinessProbe.timeoutSeconds }} - livenessProbe: - httpGet: - path: /live - port: {{ .Values.imagemagick.image.internalPort }} - initialDelaySeconds: {{ .Values.imagemagick.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.imagemagick.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.imagemagick.livenessProbe.timeoutSeconds }} diff --git a/alfresco-content-services/templates/deployment-libreoffice.yaml b/alfresco-content-services/templates/deployment-libreoffice.yaml deleted file mode 100644 index da15581..0000000 --- a/alfresco-content-services/templates/deployment-libreoffice.yaml +++ /dev/null @@ -1,82 +0,0 @@ -# Defines the deployment for the libreoffice transformer app -# Details: https://git.alfresco.com/Repository/alfresco-docker-transformers ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "content-services.shortname" . }}-libreoffice - labels: - {{- include "libreoffice.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.libreoffice.replicaCount }} - selector: - matchLabels: - {{- include "libreoffice.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-libreoffice.yaml") . | sha256sum }} - labels: - {{- include "libreoffice.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.libreoffice | indent 4 }} - {{- if .Values.libreoffice.nodeSelector }} - nodeSelector: {{- .Values.libreoffice.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-libreoffice - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-libreoffice - topologyKey: kubernetes.io/hostname - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.libreoffice.image.repository }}:{{ .Values.libreoffice.image.tag }}" - imagePullPolicy: {{ .Values.libreoffice.image.pullPolicy }} - {{- include "component-security-context" .Values.libreoffice | indent 8 }} - envFrom: - - configMapRef: - # config map to use, defined in config-libreoffice.yaml - name: {{ template "content-services.shortname" . }}-libreoffice-configmap - - secretRef: - name: {{ .Values.messageBroker.existingSecretName | default .Values.messageBroker.secretName }} - env: - {{- include "activemq.env" . | nindent 12 }} - ports: - - containerPort: {{ .Values.libreoffice.image.internalPort }} - resources: {{- toYaml .Values.libreoffice.resources | nindent 12 }} - readinessProbe: - httpGet: - path: /ready - port: {{ .Values.libreoffice.image.internalPort }} - initialDelaySeconds: {{ .Values.libreoffice.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.libreoffice.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.libreoffice.readinessProbe.timeoutSeconds }} - livenessProbe: - httpGet: - path: /live - port: {{ .Values.libreoffice.image.internalPort }} - initialDelaySeconds: {{ .Values.libreoffice.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.libreoffice.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.libreoffice.livenessProbe.timeoutSeconds }} diff --git a/alfresco-content-services/templates/deployment-ms-teams-service.yaml b/alfresco-content-services/templates/deployment-ms-teams-service.yaml deleted file mode 100644 index b3bb2f7..0000000 --- a/alfresco-content-services/templates/deployment-ms-teams-service.yaml +++ /dev/null @@ -1,78 +0,0 @@ -{{- if eq .Values.repository.edition "Enterprise" }} -{{- if .Values.msTeams.enabled }} -# Defines the deployment for the ms-teams-service app -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "content-services.shortname" . }}-ms-teams-service - labels: - {{- include "ms-teams-service.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.msTeamsService.replicaCount }} - selector: - matchLabels: - {{- include "ms-teams-service.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-ms-teams-service.yaml") . | sha256sum }} - labels: - {{- include "ms-teams-service.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.msTeams | indent 4 }} - {{- if .Values.msTeamsService.nodeSelector }} - nodeSelector: {{- .Values.msTeamsService.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-ms-teams-service - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-ms-team-service - topologyKey: kubernetes.io/hostname - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.msTeamsService.image.repository }}:{{ .Values.msTeamsService.image.tag }}" - imagePullPolicy: {{ .Values.msTeamsService.image.pullPolicy }} - {{- include "component-security-context" .Values.msTeams | indent 8 }} - envFrom: - - configMapRef: - # config map to use, defined in config-ms-teams-service.yaml - name: {{ template "content-services.shortname" . }}-ms-teams-service-configmap - ports: - - containerPort: {{ .Values.msTeamsService.image.internalPort }} - resources: {{- toYaml .Values.msTeamsService.resources | nindent 12 }} - readinessProbe: - tcpSocket: - port: {{ .Values.msTeamsService.image.internalPort }} - initialDelaySeconds: {{ .Values.msTeamsService.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.msTeamsService.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.msTeamsService.readinessProbe.timeoutSeconds }} - livenessProbe: - tcpSocket: - port: {{ .Values.msTeamsService.image.internalPort }} - initialDelaySeconds: {{ .Values.msTeamsService.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.msTeamsService.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.msTeamsService.livenessProbe.timeoutSeconds }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/templates/deployment-ooi-service.yaml b/alfresco-content-services/templates/deployment-ooi-service.yaml deleted file mode 100644 index db60ab8..0000000 --- a/alfresco-content-services/templates/deployment-ooi-service.yaml +++ /dev/null @@ -1,79 +0,0 @@ -{{- if eq .Values.repository.edition "Enterprise" }} -{{- if .Values.ooi.enabled }} -# Defines the deployment for the ooi-service app -# Details: https://github.com/Alfresco/onedrive -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "content-services.shortname" . }}-ooi-service - labels: - {{- include "ooi-service.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.ooiService.replicaCount }} - selector: - matchLabels: - {{- include "ooi-service.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-ooi-service.yaml") . | sha256sum }} - labels: - {{- include "ooi-service.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.ooi | indent 4 }} - {{- if .Values.ooiService.nodeSelector }} - nodeSelector: {{- .Values.ooiService.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-ooi-service - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-ooi-service - topologyKey: kubernetes.io/hostname - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.ooiService.image.repository }}:{{ .Values.ooiService.image.tag }}" - imagePullPolicy: {{ .Values.ooiService.image.pullPolicy }} - {{- include "component-security-context" .Values.ooi | indent 8 }} - envFrom: - - configMapRef: - # config map to use, defined in config-ooi-service.yaml - name: {{ template "content-services.shortname" . }}-ooi-service-configmap - ports: - - containerPort: {{ .Values.ooiService.image.internalPort }} - resources: {{- toYaml .Values.ooiService.resources | nindent 12 }} - readinessProbe: - tcpSocket: - port: {{ .Values.ooiService.image.internalPort }} - initialDelaySeconds: {{ .Values.ooiService.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.ooiService.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.ooiService.readinessProbe.timeoutSeconds }} - livenessProbe: - tcpSocket: - port: {{ .Values.ooiService.image.internalPort }} - initialDelaySeconds: {{ .Values.ooiService.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.ooiService.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.ooiService.livenessProbe.timeoutSeconds }} -{{- end }} -{{- end }} diff --git a/alfresco-content-services/templates/deployment-pdfrenderer.yaml b/alfresco-content-services/templates/deployment-pdfrenderer.yaml deleted file mode 100644 index d36a093..0000000 --- a/alfresco-content-services/templates/deployment-pdfrenderer.yaml +++ /dev/null @@ -1,81 +0,0 @@ -# Defines the deployment for the pdfrenderer transformer app -# Details: https://git.alfresco.com/Repository/alfresco-docker-transformers -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "content-services.shortname" . }}-pdfrenderer - labels: - {{- include "pdfrenderer.labels" . | nindent 6 }} -spec: - replicas: {{ .Values.pdfrenderer.replicaCount }} - selector: - matchLabels: - {{- include "pdfrenderer.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-pdfrenderer.yaml") . | sha256sum }} - labels: - {{- include "pdfrenderer.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.pdfrenderer | indent 4 }} - {{- if .Values.pdfrenderer.nodeSelector }} - nodeSelector: {{- .Values.pdfrenderer.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-pdfrenderer - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-pdfrenderer - topologyKey: kubernetes.io/hostname - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.pdfrenderer.image.repository }}:{{ .Values.pdfrenderer.image.tag }}" - imagePullPolicy: {{ .Values.pdfrenderer.image.pullPolicy }} - {{- include "component-security-context" .Values.pdfrenderer | indent 8 }} - envFrom: - - configMapRef: - # config map to use, defined in config-pdfrenderer.yaml - name: {{ template "content-services.shortname" . }}-pdfrenderer-configmap - - secretRef: - name: {{ .Values.messageBroker.existingSecretName | default .Values.messageBroker.secretName }} - env: - {{- include "activemq.env" . | nindent 12 }} - ports: - - containerPort: {{ .Values.pdfrenderer.image.internalPort }} - resources: {{- toYaml .Values.pdfrenderer.resources | nindent 12 }} - readinessProbe: - httpGet: - path: /ready - port: {{ .Values.pdfrenderer.image.internalPort }} - initialDelaySeconds: {{ .Values.pdfrenderer.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.pdfrenderer.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.pdfrenderer.readinessProbe.timeoutSeconds }} - livenessProbe: - httpGet: - path: /live - port: {{ .Values.pdfrenderer.image.internalPort }} - initialDelaySeconds: {{ .Values.pdfrenderer.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.pdfrenderer.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.pdfrenderer.livenessProbe.timeoutSeconds }} diff --git a/alfresco-content-services/templates/deployment-repository.yaml b/alfresco-content-services/templates/deployment-repository.yaml deleted file mode 100644 index df8ec8b..0000000 --- a/alfresco-content-services/templates/deployment-repository.yaml +++ /dev/null @@ -1,247 +0,0 @@ -# Defines the deployment for the alfresco content repository app -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "content-services.shortname" . }}-repository - labels: - {{- include "repository.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.repository.replicaCount }} - selector: - matchLabels: - {{- include "repository.selectorLabels" . | nindent 6 }} - strategy: - {{- if eq .Values.repository.strategy.type "Recreate" }} - type: {{ .Values.repository.strategy.type }} - {{- else }} - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - {{- end }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-repository.yaml") . | sha256sum }} - checksum/secretDatabase: {{ include (print $.Template.BasePath "/secret-database.yaml") . | sha256sum }} - checksum/secretS3: {{ include (print $.Template.BasePath "/secret-s3.yaml") . | sha256sum }} - labels: - {{- include "repository.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.repository | indent 4 }} - {{- if .Values.repository.nodeSelector }} - nodeSelector: {{- .Values.repository.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - containers: - {{- if .Values.repository.extraSideContainers }} -{{ tpl .Values.repository.extraSideContainers . | indent 8 }} - {{- end }} - - name: {{ .Chart.Name }} - image: "{{ .Values.repository.image.repository }}:{{ .Values.repository.image.tag }}" - imagePullPolicy: {{ .Values.repository.image.pullPolicy }} - {{- if .Values.repository.command }} - command: -{{ tpl .Values.repository.command . | indent 12 }} - {{- end }} - {{- include "component-security-context" .Values.repository | indent 8 }} - envFrom: - - secretRef: - name: {{ .Values.database.existingSecretName | default .Values.database.secretName }} - {{- if .Values.s3connector.enabled }} - - secretRef: - name: {{ default (printf "%s-s3secret" (include "content-services.shortname" .)) .Values.s3connector.existingSecretName }} - {{- end }} - {{- if and .Values.mail.host (or .Values.mail.password .Values.mail.existingSecretName) }} - - secretRef: - name: {{ default (printf "%s-mail-password" (include "content-services.shortname" .)) .Values.mail.existingSecretName }} - {{- end }} - - secretRef: - name: {{ template "content-services.shortname" . }}-metadata-keystore-secret - - secretRef: - name: {{ .Values.messageBroker.existingSecretName | default .Values.messageBroker.secretName }} - - secretRef: - name: {{ default (printf "%s-repository-secret" (include "content-services.shortname" .)) .Values.repository.existingSecretName }} - - configMapRef: - # config map to use, defined in config-repository.yaml - name: {{ template "content-services.shortname" . }}-repository-configmap - ports: - # internal port and the hazelcast port used for clustering - - containerPort: {{ .Values.repository.image.internalPort }} - - containerPort: {{ .Values.repository.image.hazelcastPort }} - {{- if and .Values.email.server.enabled .Values.email.inbound.enabled }} - - containerPort: {{ .Values.email.server.port }} - - containerPort: {{ .Values.imap.server.port }} - - containerPort: {{ .Values.imap.server.imaps.port }} - {{- end }} - resources: {{- toYaml .Values.repository.resources | nindent 12 }} - volumeMounts: - {{- if and (index .Values "alfresco-search" "enabled") (eq .Values.global.tracking.auth "secret") }} - - name: repository-properties - mountPath: /usr/local/tomcat/shared/classes/alfresco-global.properties - subPath: alfresco-global.properties - {{- end }} - - name: data - mountPath: {{ .Values.repository.persistence.data.mountPath }} - subPath: {{ .Values.repository.persistence.data.subPath }} - {{- if .Values.repository.licenseSecret }} - - mountPath: /usr/local/tomcat/shared/classes/alfresco/extension/license/ - name: acs-license - {{- end }} - {{- if .Values.repository.extraLogStatements }} - - name: repository-logging-properties-volume - mountPath: /usr/local/tomcat/shared/classes/alfresco/extension/custom-log4j.properties - subPath: custom-log4j.properties - - name: repository-logging-properties-volume - mountPath: /usr/local/tomcat/shared/classes/alfresco/extension/custom-log4j2.properties - subPath: custom-log4j2.properties - {{- end }} - startupProbe: - httpGet: - path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-ready- - port: {{ .Values.repository.image.internalPort }} - periodSeconds: {{ .Values.repository.startupProbe.periodSeconds }} - failureThreshold: {{ .Values.repository.startupProbe.failureThreshold }} - readinessProbe: - httpGet: - path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-ready- - port: {{ .Values.repository.image.internalPort }} - initialDelaySeconds: {{ .Values.repository.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.repository.readinessProbe.periodSeconds }} - failureThreshold: {{ .Values.repository.readinessProbe.failureThreshold }} - timeoutSeconds: {{ .Values.repository.readinessProbe.timeoutSeconds }} - livenessProbe: - httpGet: - path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-live- - port: {{ .Values.repository.image.internalPort }} - initialDelaySeconds: {{ .Values.repository.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.repository.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.repository.livenessProbe.timeoutSeconds }} - lifecycle: - preStop: - exec: - command: ["/bin/bash", "-c", "sleep 20"] - initContainers: - {{- if .Values.repository.extraInitContainers }} - {{- toYaml .Values.repository.extraInitContainers | nindent 8 }} - {{- end }} - {{- if not .Values.database.external }} - - name: wait-db-ready - image: "{{ .Values.repository.initContainers.db.image.repository }}:{{ .Values.repository.initContainers.db.image.tag }}" - imagePullPolicy: {{ .Values.repository.initContainers.db.image.pullPolicy }} - {{- include "component-security-context" .Values.repository.initContainers.db | indent 8 }} - resources: {{- toYaml .Values.repository.initContainers.db.resources | nindent 12 }} - command: ['sh', '-c', 'until nc -w1 {{ printf "%s-%s" .Release.Name .Values.postgresql.nameOverride }} {{ .Values.postgresql.primary.service.ports.postgresql }}; do echo "waiting for {{ printf "%s-%s" .Release.Name .Values.postgresql.nameOverride }}"; sleep 2; done;'] - {{- end }} - {{- if and .Values.email.server.enabled .Values.email.inbound.enabled .Values.email.server.enableTLS }} - - name: pem-to-keystore - image: "{{ .Values.email.initContainers.pemToKeystore.image.repository }}:{{ .Values.email.initContainers.pemToKeystore.image.tag }}" - imagePullPolicy: {{ .Values.email.initContainers.pemToKeystore.image.pullPolicy }} - {{- include "component-security-context" .Values.repository.initContainers.pemToKeystore | indent 8 }} - env: - - name: keyfile - value: /var/run/secrets/certs/tls.key - - name: crtfile - value: /var/run/secrets/certs/tls.crt - - name: keystore_pkcs12 - value: /var/run/secrets/java.io/keystores/keystore.pkcs12 - - name: keystore_jks - value: /var/run/secrets/java.io/keystores/keystore.jks - - name: password - value: changeit - command: ['/bin/bash'] - args: ['-c', "openssl pkcs12 -export -inkey $keyfile -in $crtfile -out $keystore_pkcs12 -password pass:$password && keytool -importkeystore -noprompt -srckeystore $keystore_pkcs12 -srcstoretype pkcs12 -destkeystore $keystore_jks -storepass $password -srcstorepass $password"] - volumeMounts: - - mountPath: /var/run/secrets/java.io/keystores - name: email-keystore-volume - - mountPath: /var/run/secrets/certs - name: email-certs - - name: pem-to-truststore - image: "{{ .Values.email.initContainers.pemToTruststore.image.repository }}:{{ .Values.email.initContainers.pemToTruststore.image.tag }}" - imagePullPolicy: {{ .Values.email.initContainers.pemToTruststore.image.pullPolicy }} - {{- include "component-security-context" .Values.repository.initContainers.pemToTruststore | indent 8 }} - env: - - name: ca_bundle - value: /var/run/secrets/cacert/ca.crt - - name: truststore_jks - value: /var/run/secrets/java.io/keystores/truststore.jks - - name: password - value: changeit - command: ['/bin/bash'] - args: ['-c', "csplit -z -f crt- $ca_bundle '/-----BEGIN CERTIFICATE-----/' '{*}' && for file in crt-*; do keytool -import -noprompt -keystore $truststore_jks -file $file -storepass changeit -alias service-$file; done"] - volumeMounts: - - name: email-keystore-volume - mountPath: /var/run/secrets/java.io/keystores - - name: ca-cert - mountPath: /var/run/secrets/cacert - - name: set-perms - image: "{{ .Values.email.initContainers.setPerms.image.repository }}:{{ .Values.email.initContainers.setPerms.image.tag }}" - imagePullPolicy: {{ .Values.email.initContainers.setPerms.image.pullPolicy }} - {{- include "component-security-context" .Values.repository.initContainers.setPerms | indent 8 }} - env: - - name: keystore_dir - value: /var/run/secrets/java.io/keystores - command: ["sh", "-c", "chown -R 33000:1000 $keystore_dir"] - volumeMounts: - - name: email-keystore-volume - mountPath: /var/run/secrets/java.io/keystores - {{- end }} - volumes: - {{- include "data_volume" .Values.repository | nindent 8 }} - {{- if and (index .Values "alfresco-search" "enabled") (eq .Values.global.tracking.auth "secret") }} - - name: repository-properties - secret: - secretName: {{ template "alfresco.shortname" . }}-repository-properties-secret - defaultMode: 0400 - items: - - key: alfresco-global.properties - path: alfresco-global.properties - {{- end }} - {{- if .Values.repository.licenseSecret }} - - name: acs-license - secret: - secretName: {{ .Values.repository.licenseSecret }} - defaultMode: 0400 - {{- end }} - {{- if .Values.repository.extraLogStatements }} - - name : repository-logging-properties-volume - configMap: - name: {{ template "alfresco.shortname" . }}-custom-log4j-properties-configmap - items: - - key: custom-log4j.properties - path: custom-log4j.properties - - key: custom-log4j2.properties - path: custom-log4j2.properties - {{- end }} - - name: custom-pipeline-config-volume - configMap: - optional: true - name: custom-pipeline-config - - name: custom-rendition-config-volume - configMap: - optional: true - name: custom-rendition-config - - name: custom-mimetype-config-volume - configMap: - optional: true - name: custom-mimetype-config - - name: custom-queryset-config-volume - configMap: - optional: true - name: custom-queryset-config - {{- if and .Values.email.server.enabled .Values.email.inbound.enabled .Values.email.server.enableTLS }} - - name: email-keystore-volume - emptyDir: {} - - name: email-certs - secret: - secretName: {{ .Values.email.ssl.secretName }} - - name: ca-cert - secret: - secretName: {{ .Values.email.ssl.secretName }} - items: - - key: ca.crt - path: ca.crt - {{- end }} - {{- if .Values.repository.extraVolumes }} - {{- toYaml .Values.repository.extraVolumes | nindent 8 }} - {{- end }} diff --git a/alfresco-content-services/templates/deployment-share.yaml b/alfresco-content-services/templates/deployment-share.yaml deleted file mode 100644 index 9d7f384..0000000 --- a/alfresco-content-services/templates/deployment-share.yaml +++ /dev/null @@ -1,80 +0,0 @@ -# Defines the deployment for the alfresco share app -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "content-services.shortname" . }}-share - labels: - {{- include "share.labels" . | nindent 4 }} - annotations: - checkov.io/skip1: CKV_K8S_23=Requires APPS-1832 first - checkov.io/skip2: CKV_K8S_40=Requires APPS-1832 first -spec: - replicas: {{ .Values.share.replicaCount }} - selector: - matchLabels: - {{- include "share.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-share.yaml") . | sha256sum }} - labels: - {{- include "share.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.share | indent 4 }} - {{- if .Values.share.nodeSelector }} - nodeSelector: {{- .Values.share.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - containers: - {{- if .Values.share.extraSideContainers }} -{{ tpl .Values.share.extraSideContainers . | indent 8 }} - {{- end }} - - name: {{ .Chart.Name }} - image: "{{ .Values.share.image.repository }}:{{ .Values.share.image.tag }}" - imagePullPolicy: {{ .Values.share.image.pullPolicy }} - {{- include "component-security-context" .Values.share | indent 8 }} - {{- if .Values.share.command }} - command: -{{ tpl .Values.share.command . | indent 12 }} - {{- end }} - ports: - - containerPort: {{ .Values.share.image.internalPort }} - resources: {{- toYaml .Values.share.resources | nindent 12 }} - envFrom: - - configMapRef: - name: {{ template "content-services.shortname" . }}-share-configmap - {{- if .Values.share.extraVolumeMounts }} - volumeMounts: -{{ toYaml .Values.share.extraVolumeMounts | indent 10 }} - {{- end }} - readinessProbe: - httpGet: - path: /share - port: {{ .Values.share.image.internalPort }} - initialDelaySeconds: {{ .Values.share.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.share.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.share.readinessProbe.timeoutSeconds }} - livenessProbe: - httpGet: - path: /share - port: {{ .Values.share.image.internalPort }} - initialDelaySeconds: {{ .Values.share.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.share.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.share.livenessProbe.timeoutSeconds }} - lifecycle: - preStop: - exec: - command: ["/bin/bash", "-c", "sleep 20"] - {{- if .Values.share.extraInitContainers }} - initContainers: -{{ tpl .Values.share.extraInitContainers . | indent 8 }} - {{- end }} - {{- if .Values.share.extraVolumes }} - volumes: -{{ toYaml .Values.share.extraVolumes | indent 6 }} - {{- end }} diff --git a/alfresco-content-services/templates/deployment-tika.yaml b/alfresco-content-services/templates/deployment-tika.yaml deleted file mode 100644 index d396fbc..0000000 --- a/alfresco-content-services/templates/deployment-tika.yaml +++ /dev/null @@ -1,81 +0,0 @@ -# Defines the deployment for the tika transformer app -# Details: https://git.alfresco.com/Repository/alfresco-docker-transformers -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "content-services.shortname" . }}-tika - labels: - {{- include "tika.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.tika.replicaCount }} - selector: - matchLabels: - {{- include "tika.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-tika.yaml") . | sha256sum }} - labels: - {{- include "tika.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.tika | indent 4 }} - {{- if .Values.tika.nodeSelector }} - nodeSelector: {{- .Values.tika.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-tika - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-tika - topologyKey: kubernetes.io/hostname - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.tika.image.repository }}:{{ .Values.tika.image.tag }}" - imagePullPolicy: {{ .Values.tika.image.pullPolicy }} - {{- include "component-security-context" .Values.tika | indent 8 }} - envFrom: - - configMapRef: - # config map to use, defined in config-tika.yaml - name: {{ template "content-services.shortname" . }}-tika-configmap - - secretRef: - name: {{ .Values.messageBroker.existingSecretName | default .Values.messageBroker.secretName }} - env: - {{- include "activemq.env" . | nindent 12 }} - ports: - - containerPort: {{ .Values.tika.image.internalPort }} - resources: {{- toYaml .Values.tika.resources | nindent 12 }} - readinessProbe: - httpGet: - path: /ready - port: {{ .Values.tika.image.internalPort }} - initialDelaySeconds: {{ .Values.tika.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.tika.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.tika.readinessProbe.timeoutSeconds }} - livenessProbe: - httpGet: - path: /live - port: {{ .Values.tika.image.internalPort }} - initialDelaySeconds: {{ .Values.tika.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.tika.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.tika.livenessProbe.timeoutSeconds }} diff --git a/alfresco-content-services/templates/deployment-transform-misc.yaml b/alfresco-content-services/templates/deployment-transform-misc.yaml deleted file mode 100644 index 5b8bb96..0000000 --- a/alfresco-content-services/templates/deployment-transform-misc.yaml +++ /dev/null @@ -1,83 +0,0 @@ -{{- if .Values.transformmisc.enabled }} -# Defines the deployment for the transform-misc transformer app -# Details: https://git.alfresco.com/Repository/alfresco-docker-transformers -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "content-services.shortname" . }}-transform-misc - labels: - {{- include "transform-misc.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.transformmisc.replicaCount }} - selector: - matchLabels: - {{- include "transform-misc.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-transform-misc.yaml") . | sha256sum }} - labels: - {{- include "transform-misc.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.transformmisc | indent 4 }} - {{- if .Values.transformmisc.nodeSelector }} - nodeSelector: {{- .Values.transformmisc.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-transform-misc - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "content-services.shortname" . }}-transform-misc - topologyKey: kubernetes.io/hostname - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.transformmisc.image.repository }}:{{ .Values.transformmisc.image.tag }}" - imagePullPolicy: {{ .Values.transformmisc.image.pullPolicy }} - {{- include "component-security-context" .Values.transformmisc | indent 8 }} - envFrom: - - configMapRef: - # config map to use, defined in config-transformmisc.yaml - name: {{ template "content-services.shortname" . }}-transform-misc-configmap - - secretRef: - name: {{ .Values.messageBroker.existingSecretName | default .Values.messageBroker.secretName }} - env: - {{- include "activemq.env" . | nindent 12 }} - ports: - - containerPort: {{ .Values.transformmisc.image.internalPort }} - resources: {{- toYaml .Values.transformmisc.resources | nindent 12 }} - readinessProbe: - httpGet: - path: /ready - port: {{ .Values.transformmisc.image.internalPort }} - initialDelaySeconds: {{ .Values.transformmisc.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.transformmisc.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.transformmisc.readinessProbe.timeoutSeconds }} - livenessProbe: - httpGet: - path: /live - port: {{ .Values.transformmisc.image.internalPort }} - initialDelaySeconds: {{ .Values.transformmisc.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.transformmisc.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.transformmisc.livenessProbe.timeoutSeconds }} -{{- end }} diff --git a/alfresco-content-services/templates/deployment-transform-router.yaml b/alfresco-content-services/templates/deployment-transform-router.yaml deleted file mode 100644 index 2d694b9..0000000 --- a/alfresco-content-services/templates/deployment-transform-router.yaml +++ /dev/null @@ -1,93 +0,0 @@ -{{- if eq .Values.repository.edition "Enterprise" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "alfresco.shortname" . }}-router - labels: - {{- include "transform-router.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.transformrouter.replicaCount }} - selector: - matchLabels: - {{- include "transform-router.selectorLabels" . | nindent 6 }} - strategy: - type: RollingUpdate - rollingUpdate: -{{ toYaml .Values.global.strategy.rollingUpdate | indent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/config-transform-router.yaml") . | sha256sum }} - checksum/config-routes: {{ include (print $.Template.BasePath "/config-transformer-routes.yaml") . | sha256sum }} - labels: - {{- include "transform-router.selectorLabels" . | nindent 8 }} - spec: - {{- include "component-pod-security-context" .Values.transformrouter | indent 4 }} - {{- if .Values.transformrouter.nodeSelector }} - nodeSelector: {{- .Values.transformrouter.nodeSelector | toYaml | nindent 8 }} - {{- end }} - {{- include "alfresco-content-services.imagePullSecrets" . | indent 6 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco.shortname" . }}-router - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco.shortname" . }}-router - topologyKey: kubernetes.io/hostname - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.transformrouter.image.repository }}:{{ .Values.transformrouter.image.tag }}" - imagePullPolicy: {{ .Values.transformrouter.image.pullPolicy }} - {{- include "component-security-context" .Values.transformrouter | indent 8 }} - envFrom: - - configMapRef: - # config map to use, defined in config-transform-router.yaml - name: {{ template "alfresco.shortname" . }}-router-configmap - - secretRef: - name: {{ .Values.messageBroker.existingSecretName | default .Values.messageBroker.secretName }} - env: - {{- include "activemq.env" . | nindent 12 }} - ports: - - containerPort: {{ .Values.transformrouter.image.internalPort }} - resources: {{- toYaml .Values.transformrouter.resources | nindent 12 }} - livenessProbe: - httpGet: - path: /actuator/health - port: {{ .Values.transformrouter.image.internalPort }} - initialDelaySeconds: {{ .Values.transformrouter.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.transformrouter.livenessProbe.periodSeconds }} - failureThreshold: 1 - timeoutSeconds: {{ .Values.transformrouter.livenessProbe.timeoutSeconds }} - readinessProbe: - httpGet: - path: /actuator/health - port: {{ .Values.transformrouter.image.internalPort }} - initialDelaySeconds: {{ .Values.transformrouter.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.transformrouter.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.transformrouter.readinessProbe.timeoutSeconds }} - {{- if .Values.global.ai.enabled }} - volumeMounts: - - name: config-volume - mountPath: /mnt/routes - {{- end }} - {{- if .Values.global.ai.enabled }} - volumes: - - name: config-volume - configMap: - name: {{ template "alfresco.shortname" . }}-transform-routes-configmap - {{- end }} -{{- end }} diff --git a/alfresco-content-services/templates/ingress-ms-teams-service.yaml b/alfresco-content-services/templates/ingress-ms-teams-service.yaml deleted file mode 100644 index 9a5160f..0000000 --- a/alfresco-content-services/templates/ingress-ms-teams-service.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.msTeams.enabled }} -{{- $serviceName := printf "%s-%s" (include "content-services.shortname" .) "ms-teams-service" -}} -{{- $servicePort := .Values.msTeamsService.service.externalPort -}} -apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ template "content-services.shortname" . }}-ms-teams-service - labels: - {{- include "ms-teams-service.labels" . | nindent 4 }} - annotations: - kubernetes.io/ingress.class: "nginx" - nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," .Values.global.whitelistSourceRanges }} -{{- if .Values.msTeamsService.extraAnnotations }} -{{ toYaml .Values.msTeamsService.extraAnnotations | indent 4 }} -{{- end }} - -spec: - {{- if .Values.msTeamsService.ingress.tls }} - tls: - {{- range .Values.msTeamsService.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- if .Values.msTeamsService.ingress.hostName }} - - host: {{ tpl .Values.msTeamsService.ingress.hostName $ }} - http: - {{- else }} - - http: - {{- end }} - paths: - - path: {{ .Values.msTeamsService.ingress.path }} - {{- if eq "true" (include "common.ingress.supportsPathType" .) }} - pathType: Prefix - {{- end }} - backend: {{- include "common.ingress.backend" (dict "serviceName" $serviceName "servicePort" $servicePort "context" $) | nindent 10 }} -{{- end }} diff --git a/alfresco-content-services/templates/ingress-ooi-service.yaml b/alfresco-content-services/templates/ingress-ooi-service.yaml deleted file mode 100644 index b031aba..0000000 --- a/alfresco-content-services/templates/ingress-ooi-service.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.ooi.enabled }} -{{- $serviceName := printf "%s-%s" (include "content-services.shortname" .) "ooi-service" -}} -{{- $servicePort := .Values.ooiService.service.externalPort -}} -apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ template "content-services.shortname" . }}-ooi-service - labels: - {{- include "ooi-service.labels" . | nindent 4 }} - annotations: - kubernetes.io/ingress.class: "nginx" - nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," .Values.global.whitelistSourceRanges }} -{{- if .Values.ooiService.extraAnnotations }} -{{ toYaml .Values.ooiService.extraAnnotations | indent 4 }} -{{- end }} - -spec: - {{- if .Values.ooiService.ingress.tls }} - tls: - {{- range .Values.ooiService.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- if .Values.ooiService.ingress.hostName }} - - host: {{ tpl .Values.ooiService.ingress.hostName $ }} - http: - {{- else }} - - http: - {{- end }} - paths: - - path: {{ .Values.ooiService.ingress.path }} - {{- if eq "true" (include "common.ingress.supportsPathType" .) }} - pathType: Prefix - {{- end }} - backend: {{- include "common.ingress.backend" (dict "serviceName" $serviceName "servicePort" $servicePort "context" $) | nindent 10 }} -{{- end }} diff --git a/alfresco-content-services/templates/ingress-repository.yaml b/alfresco-content-services/templates/ingress-repository.yaml deleted file mode 100644 index 6bb96b1..0000000 --- a/alfresco-content-services/templates/ingress-repository.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ template "content-services.shortname" . }}-repository - labels: - {{- include "repository.labels" . | nindent 4 }} - annotations: - nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," .Values.global.whitelistSourceRanges }} - nginx.ingress.kubernetes.io/affinity: "cookie" - nginx.ingress.kubernetes.io/session-cookie-name: "alf_affinity_route" - nginx.ingress.kubernetes.io/session-cookie-hash: "sha1" - # Default file limit (1m) check, document(s) above this size will throw 413 (Request Entity Too Large) error - nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.repository.ingress.maxUploadSize }} - {{- include "ingress_annotations" .Values.repository }} - {{- include "ingress_vhost_annotations" .Values.repository }} - external-dns.alpha.kubernetes.io/aws-weight: "100" - external-dns.alpha.kubernetes.io/set-identifier: "{{ template "content-services.shortname" . }}-repository-{{ .Release.Namespace }}-green" -spec: - ingressClassName: default - tls: - - hosts: - - {{ .Release.Namespace }}.{{ .Values.repository.ingress.hostName }} - rules: - - host: {{ .Release.Namespace }}.{{ .Values.repository.ingress.hostName }} - http: - paths: - - path: {{ .Values.repository.ingress.path }} - pathType: Prefix - backend: - service: - name: {{ template "content-services.shortname" . }}-repository - port: - number: {{ .Values.repository.service.externalPort }} - - path: {{ .Values.apiexplorer.ingress.path }} - pathType: Prefix - backend: - service: - name: {{ template "content-services.shortname" . }}-repository - port: - number: {{ .Values.repository.service.externalPort }} diff --git a/alfresco-content-services/templates/ingress-share.yaml b/alfresco-content-services/templates/ingress-share.yaml deleted file mode 100644 index cd3e12c..0000000 --- a/alfresco-content-services/templates/ingress-share.yaml +++ /dev/null @@ -1,51 +0,0 @@ -{{- $serviceName := printf "%s-%s" (include "content-services.shortname" .) "share" -}} -{{- $servicePort := .Values.share.service.externalPort -}} -apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ template "content-services.shortname" . }}-share - labels: - {{- include "share.labels" . | nindent 4 }} - annotations: - nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," .Values.global.whitelistSourceRanges }} - # Default limit is 1m, document(s) above this size will throw 413 (Request Entity Too Large) error - nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.repository.ingress.maxUploadSize }} - nginx.ingress.kubernetes.io/affinity: "cookie" - nginx.ingress.kubernetes.io/session-cookie-name: "alfrescoShare" - nginx.ingress.kubernetes.io/session-cookie-path: "/share" - nginx.ingress.kubernetes.io/session-cookie-max-age: "604800" - nginx.ingress.kubernetes.io/session-cookie-expires: "604800" - nginx.ingress.kubernetes.io/configuration-snippet: | - if ($request_uri = "/") { - return 301 /share/page/; - } - {{- include "ingress_annotations" .Values.share }} - {{- if ne .Values.share.ingress.hostName .Values.repository.ingress.hostName }} - {{- include "ingress_vhost_annotations" .Values.share }} - {{- end }} - external-dns.alpha.kubernetes.io/aws-weight: "100" - external-dns.alpha.kubernetes.io/set-identifier: "{{ template "content-services.shortname" . }}-share-{{ .Release.Namespace }}-green" -spec: - ingressClassName: default - tls: - - hosts: - - share.{{ .Release.Namespace }}.{{ .Values.repository.ingress.hostName }} - secretName: share-ingress-cert - rules: - - host: share.{{ .Release.Namespace }}.{{ .Values.repository.ingress.hostName }} - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: {{ template "content-services.shortname" . }}-share - port: - number: {{ .Values.share.service.externalPort }} - - path: /share/page/ - pathType: Prefix - backend: - service: - name: {{ template "content-services.shortname" . }}-share - port: - number: {{ .Values.share.service.externalPort }} diff --git a/alfresco-content-services/templates/pvc.yaml b/alfresco-content-services/templates/pvc.yaml deleted file mode 100644 index 2c76bb6..0000000 --- a/alfresco-content-services/templates/pvc.yaml +++ /dev/null @@ -1,7 +0,0 @@ -{{- if and (not .Values.repository.persistence.existingClaim) .Values.repository.persistence.enabled }} -{{ include "component_pvc" .Values.repository }} -{{- end }} - -{{- if and (not .Values.filestore.persistence.existingClaim) (eq .Values.repository.edition "Enterprise") .Values.filestore.persistence.enabled }} -{{ include "component_pvc" .Values.filestore }} -{{- end }} diff --git a/alfresco-content-services/templates/secret-database.yaml b/alfresco-content-services/templates/secret-database.yaml deleted file mode 100644 index 3661c7d..0000000 --- a/alfresco-content-services/templates/secret-database.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if not .Values.database.existingSecretName }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Values.database.secretName }} - labels: - {{- include "repository.labels" . | nindent 4 }} -type: Opaque -data: - DATABASE_USERNAME: {{ .Values.database.user | default .Values.postgresql.auth.username | b64enc | quote }} - DATABASE_PASSWORD: {{ .Values.database.password | default .Values.postgresql.auth.password | b64enc | quote }} -{{- end }} diff --git a/alfresco-content-services/templates/secret-mail-password.yaml b/alfresco-content-services/templates/secret-mail-password.yaml deleted file mode 100644 index 2fa4200..0000000 --- a/alfresco-content-services/templates/secret-mail-password.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if and .Values.mail.host (not .Values.mail.existingSecretName) .Values.mail.password }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "content-services.shortname" . }}-mail-password - labels: - {{- include "repository.labels" . | nindent 4 }} -type: Opaque -data: - MAIL_PASSWORD: {{ .Values.mail.password | b64enc | quote }} -{{- end }} diff --git a/alfresco-content-services/templates/secret-message-broker.yaml b/alfresco-content-services/templates/secret-message-broker.yaml deleted file mode 100644 index ef50aa1..0000000 --- a/alfresco-content-services/templates/secret-message-broker.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if not .Values.messageBroker.existingSecretName }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Values.messageBroker.secretName }} - labels: - {{- include "repository.labels" . | nindent 4 }} -type: Opaque -data: - {{- if .Values.activemq.enabled }} - BROKER_URL: {{ printf "failover:(nio://%s-broker:61616)?timeout=3000&jms.useCompression=true" (include "content-services.activemq.fullname" .) | b64enc | quote }} - BROKER_USERNAME: {{ .Values.activemq.adminUser.user | b64enc | quote }} - BROKER_PASSWORD: {{ .Values.activemq.adminUser.password | b64enc | quote }} - {{- else }} - BROKER_URL: {{ required "Disabling in-cluster ActiveMQ requires passing (at least) messageBroker.url" .Values.messageBroker.url | b64enc | quote }} - BROKER_USERNAME: {{ .Values.messageBroker.user | b64enc | quote }} - BROKER_PASSWORD: {{ .Values.messageBroker.password | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/alfresco-content-services/templates/secret-metadata-keystore.yaml b/alfresco-content-services/templates/secret-metadata-keystore.yaml deleted file mode 100644 index d2d1196..0000000 --- a/alfresco-content-services/templates/secret-metadata-keystore.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "content-services.shortname" . }}-metadata-keystore-secret - labels: - {{- include "repository.labels" . | nindent 4 }} -type: Opaque -data: - METADATA_KEYSTORE_PASSWORD: {{ .Values.metadataKeystore.keystorePassword | default .Values.metadataKeystore.defaultKeystorePassword | b64enc | quote }} - METADATA_KEY_PASSWORD: {{ .Values.metadataKeystore.keyPassword | default .Values.metadataKeystore.defaultKeyPassword | b64enc | quote }} diff --git a/alfresco-content-services/templates/secret-repository-properties.yaml b/alfresco-content-services/templates/secret-repository-properties.yaml deleted file mode 100644 index 64631d9..0000000 --- a/alfresco-content-services/templates/secret-repository-properties.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if and (index .Values "alfresco-search" "enabled") (eq .Values.global.tracking.auth "secret") }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "alfresco.shortname" . }}-repository-properties-secret - labels: - {{- include "repository.labels" . | nindent 4 }} -type: Opaque -data: - alfresco-global.properties: {{ printf "%s%s" "solr.sharedSecret=" (include "tracking-shared-secret" .) | b64enc | quote }} -{{- end }} diff --git a/alfresco-content-services/templates/secret-repository.yaml b/alfresco-content-services/templates/secret-repository.yaml deleted file mode 100644 index 3a666ee..0000000 --- a/alfresco-content-services/templates/secret-repository.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if not .Values.repository.existingSecretName }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ printf "%s-repository-secret" (include "content-services.shortname" .) }} - labels: - {{- include "repository.labels" . | nindent 4 }} -type: Opaque -data: - REPO_ADMIN_PASSWORD: {{ .Values.repository.adminPassword | default "209c6174da490caeb422f3fa5a7ae634" | b64enc | quote }} -{{- end }} diff --git a/alfresco-content-services/templates/secret-s3.yaml b/alfresco-content-services/templates/secret-s3.yaml deleted file mode 100644 index 65d21b2..0000000 --- a/alfresco-content-services/templates/secret-s3.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if and .Values.s3connector.enabled (not .Values.s3connector.existingSecretName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "content-services.shortname" . }}-s3secret - labels: - {{- include "repository.labels" . | nindent 4 }} -type: Opaque -data: - {{- if .Values.s3connector.secrets.accessKey }} - ACCESSKEY: {{ .Values.s3connector.secrets.accessKey | b64enc | quote }} - {{- end }} - {{- if .Values.s3connector.secrets.secretKey }} - SECRETKEY: {{ .Values.s3connector.secrets.secretKey | b64enc | quote }} - {{- end }} - {{- if .Values.s3connector.secrets.encryption }} - ENCRYPTION: {{ .Values.s3connector.secrets.encryption | b64enc | quote }} - {{- end }} - {{- if .Values.s3connector.secrets.awsKmsKeyId }} - KMSKEYID: {{ .Values.s3connector.secrets.awsKmsKeyId | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/alfresco-content-services/templates/svc-ai-transformer.yaml b/alfresco-content-services/templates/svc-ai-transformer.yaml deleted file mode 100644 index 4ed041d..0000000 --- a/alfresco-content-services/templates/svc-ai-transformer.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.global.ai.enabled }} -# Defines the service for the ai transformer app -apiVersion: v1 -kind: Service -metadata: - name: {{ template "content-services.shortname" . }}-ai-transformer - labels: - {{- include "ai-transformer.selectorLabels" . | nindent 4 }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.aiTransformer.service.type }} - ports: - - port: {{ .Values.aiTransformer.service.externalPort }} - targetPort: {{ .Values.aiTransformer.image.internalPort }} - name: {{ .Values.aiTransformer.service.name }} - selector: - {{- include "ai-transformer.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/alfresco-content-services/templates/svc-email.yaml b/alfresco-content-services/templates/svc-email.yaml deleted file mode 100644 index 2f5b854..0000000 --- a/alfresco-content-services/templates/svc-email.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and .Values.email.server.enabled .Values.email.inbound.enabled }} -# Defines the email service for the alfresco content repository app -apiVersion: v1 -kind: Service -metadata: - name: {{ template "content-services.shortname" . }}-email - labels: - {{- include "repository.labels" . | nindent 4 }} -spec: - type: LoadBalancer - externalTrafficPolicy: Local - ports: - - port: {{ .Values.email.server.port }} - targetPort: {{ .Values.email.server.port }} - name: {{ .Values.repository.service.name }}-email-inbound - protocol: TCP - - port: {{ .Values.imap.server.port }} - targetPort: {{ .Values.imap.server.port }} - name: {{ .Values.repository.service.name }}-email-imap - protocol: TCP - - port: {{ .Values.imap.server.imaps.port }} - targetPort: {{ .Values.imap.server.imaps.port }} - name: {{ .Values.repository.service.name }}-email-imap-secure - protocol: TCP - selector: - {{- include "repository.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/alfresco-content-services/templates/svc-filestore.yaml b/alfresco-content-services/templates/svc-filestore.yaml deleted file mode 100644 index 33decea..0000000 --- a/alfresco-content-services/templates/svc-filestore.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Defines the service for the shared file store -{{- if eq .Values.repository.edition "Enterprise" }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "alfresco.shortname" . }}-filestore - labels: - {{- include "filestore.labels" . | nindent 4 }} -spec: - type: {{ .Values.filestore.service.type }} - ports: - - port: {{ .Values.filestore.service.externalPort }} - targetPort: {{ .Values.filestore.image.internalPort }} - name: {{ .Values.filestore.service.name }} - selector: - {{- include "filestore.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/alfresco-content-services/templates/svc-imagemagick.yaml b/alfresco-content-services/templates/svc-imagemagick.yaml deleted file mode 100644 index 188c28e..0000000 --- a/alfresco-content-services/templates/svc-imagemagick.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Defines the service for the imagemagick transformer app -apiVersion: v1 -kind: Service -metadata: - name: {{ template "content-services.shortname" . }}-imagemagick - labels: - {{- include "imagemagick.labels" . | nindent 4 }} -spec: - type: {{ .Values.imagemagick.service.type }} - ports: - - port: {{ .Values.imagemagick.service.externalPort }} - targetPort: {{ .Values.imagemagick.image.internalPort }} - name: {{ .Values.imagemagick.service.name }} - selector: - {{- include "imagemagick.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/templates/svc-libreoffice.yaml b/alfresco-content-services/templates/svc-libreoffice.yaml deleted file mode 100644 index 0e832dc..0000000 --- a/alfresco-content-services/templates/svc-libreoffice.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Defines the service for the libreoffice transformer app -apiVersion: v1 -kind: Service -metadata: - name: {{ template "content-services.shortname" . }}-libreoffice - labels: - {{- include "libreoffice.labels" . | nindent 4 }} -spec: - type: {{ .Values.libreoffice.service.type }} - ports: - - port: {{ .Values.libreoffice.service.externalPort }} - targetPort: {{ .Values.libreoffice.image.internalPort }} - name: {{ .Values.libreoffice.service.name }} - selector: - {{- include "libreoffice.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/templates/svc-ms-teams-service.yaml b/alfresco-content-services/templates/svc-ms-teams-service.yaml deleted file mode 100644 index d478b3f..0000000 --- a/alfresco-content-services/templates/svc-ms-teams-service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.msTeams.enabled }} -# Defines the service for the ms-teams-service app -apiVersion: v1 -kind: Service -metadata: - name: {{ template "content-services.shortname" . }}-ms-teams-service - labels: - {{- include "ms-teams-service.labels" . | nindent 4 }} -spec: - type: {{ .Values.msTeamsService.service.type }} - ports: - - port: {{ .Values.msTeamsService.service.externalPort }} - targetPort: {{ .Values.msTeamsService.image.internalPort }} - name: {{ .Values.msTeamsService.service.name }} - selector: - {{- include "ms-teams-service.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/alfresco-content-services/templates/svc-ooi-service.yaml b/alfresco-content-services/templates/svc-ooi-service.yaml deleted file mode 100644 index 95e2153..0000000 --- a/alfresco-content-services/templates/svc-ooi-service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.ooi.enabled }} -# Defines the service for the ooi-service app -apiVersion: v1 -kind: Service -metadata: - name: {{ template "content-services.shortname" . }}-ooi-service - labels: - {{- include "ooi-service.labels" . | nindent 4 }} -spec: - type: {{ .Values.ooiService.service.type }} - ports: - - port: {{ .Values.ooiService.service.externalPort }} - targetPort: {{ .Values.ooiService.image.internalPort }} - name: {{ .Values.ooiService.service.name }} - selector: - {{- include "ooi-service.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/alfresco-content-services/templates/svc-pdfrenderer.yaml b/alfresco-content-services/templates/svc-pdfrenderer.yaml deleted file mode 100644 index 50b26e9..0000000 --- a/alfresco-content-services/templates/svc-pdfrenderer.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Defines the service for the pdfrenderer transformer app -apiVersion: v1 -kind: Service -metadata: - name: {{ template "content-services.shortname" . }}-pdfrenderer - labels: - {{- include "pdfrenderer.labels" . | nindent 4 }} -spec: - type: {{ .Values.pdfrenderer.service.type }} - ports: - - port: {{ .Values.pdfrenderer.service.externalPort }} - targetPort: {{ .Values.pdfrenderer.image.internalPort }} - name: {{ .Values.pdfrenderer.service.name }} - selector: - {{- include "pdfrenderer.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/templates/svc-repository.yaml b/alfresco-content-services/templates/svc-repository.yaml deleted file mode 100644 index 1ef7594..0000000 --- a/alfresco-content-services/templates/svc-repository.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Defines the service for the alfresco content repository app -apiVersion: v1 -kind: Service -metadata: - name: {{ template "content-services.shortname" . }}-repository - labels: - {{- include "repository.labels" . | nindent 4 }} -spec: - type: {{ .Values.repository.service.type }} - ports: - - port: {{ include "repository.svcPort" . }} - targetPort: {{ include "repository.containerPort" . }} - name: {{ .Values.repository.service.name }} - {{- if and .Values.email.server.enabled .Values.email.inbound.enabled }} - - port: {{ .Values.email.server.port }} - targetPort: {{ .Values.email.server.port }} - name: {{ .Values.repository.service.name }}-email-inbound - protocol: TCP - - port: {{ .Values.imap.server.port }} - targetPort: {{ .Values.imap.server.port }} - name: {{ .Values.repository.service.name }}-email-imap - protocol: TCP - - port: {{ .Values.imap.server.imaps.port }} - targetPort: {{ .Values.imap.server.imaps.port }} - name: {{ .Values.repository.service.name }}-email-imap-secure - protocol: TCP - {{- end }} - selector: - {{- include "repository.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/templates/svc-share.yaml b/alfresco-content-services/templates/svc-share.yaml deleted file mode 100644 index a6599ac..0000000 --- a/alfresco-content-services/templates/svc-share.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Defines the service for the alfresco share app -apiVersion: v1 -kind: Service -metadata: - name: {{ template "content-services.shortname" . }}-share - labels: - {{- include "share.selectorLabels" . | nindent 4 }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.share.service.type }} - ports: - - port: {{ .Values.share.service.externalPort }} - targetPort: {{ .Values.share.image.internalPort }} - name: {{ .Values.share.service.name }} - selector: - {{- include "share.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/templates/svc-tika.yaml b/alfresco-content-services/templates/svc-tika.yaml deleted file mode 100644 index a04dd31..0000000 --- a/alfresco-content-services/templates/svc-tika.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Defines the service for the tika transformer app -apiVersion: v1 -kind: Service -metadata: - name: {{ template "content-services.shortname" . }}-tika - labels: - {{- include "tika.labels" . | nindent 4 }} -spec: - type: {{ .Values.tika.service.type }} - ports: - - port: {{ .Values.tika.service.externalPort }} - targetPort: {{ .Values.tika.image.internalPort }} - name: {{ .Values.tika.service.name }} - selector: - {{- include "tika.selectorLabels" . | nindent 4 }} diff --git a/alfresco-content-services/templates/svc-transform-misc.yaml b/alfresco-content-services/templates/svc-transform-misc.yaml deleted file mode 100644 index 2d676ac..0000000 --- a/alfresco-content-services/templates/svc-transform-misc.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.transformmisc.enabled }} -# Defines the service for the transform-misc transformer app -apiVersion: v1 -kind: Service -metadata: - name: {{ template "content-services.shortname" . }}-transform-misc - labels: - {{- include "transform-misc.labels" . | nindent 4 }} -spec: - type: {{ .Values.transformmisc.service.type }} - ports: - - port: {{ .Values.transformmisc.service.externalPort }} - targetPort: {{ .Values.transformmisc.image.internalPort }} - name: {{ .Values.transformmisc.service.name }} - selector: - {{- include "transform-misc.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/alfresco-content-services/templates/svc-transform-router.yaml b/alfresco-content-services/templates/svc-transform-router.yaml deleted file mode 100644 index 06fb8df..0000000 --- a/alfresco-content-services/templates/svc-transform-router.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if eq .Values.repository.edition "Enterprise" }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "alfresco.shortname" . }}-router - labels: - {{- include "transform-router.labels" . | nindent 4 }} -spec: - type: {{ .Values.transformrouter.service.type }} - ports: - - port: {{ .Values.transformrouter.service.externalPort }} - targetPort: {{ .Values.transformrouter.image.internalPort }} - protocol: TCP - name: {{ .Values.transformrouter.service.name }} - selector: - {{- include "transform-router.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/alfresco-content-services/values_dev.yaml b/alfresco-content-services/values_dev.yaml deleted file mode 100644 index 738fcac..0000000 --- a/alfresco-content-services/values_dev.yaml +++ /dev/null @@ -1,53 +0,0 @@ -# this file overrides values defined in ./values.yaml -repository: - replicaCount: 2 -share: - replicaCount: 1 -global: - whitelistSourceRanges: - - "3.11.29.246" # legacy delius-mis-dev-az1-nat-gateway - - "18.130.165.209" # legacy delius-mis-dev-az2-nat-gateway - - "35.178.35.115" # legacy delius-mis-dev-az3-nat-gateway - - "35.178.209.113" # Cloud Platform live-1-eu-west-2a - - "3.8.51.207" # Cloud Platform live-1-eu-west-2c - - "35.177.252.54" # Cloud Platform live-1-eu-west-2b - - "35.176.93.186/32" # MoJ GlobalProtect - - "35.177.125.252/32" # MoJ VPN Gateway Proxies - - "35.177.137.160/32" # MoJ VPN Gateway Proxies - - "81.134.202.29/32" # MoJ VPN - - "51.149.250.0/24" # PTTP / MoJO Production Account BYOIP CIDR range - - "51.149.251.0/24" # PTTP / MoJO Production Account BYOIP CIDR range - PreProd - - "213.121.161.112/28" # 102 Petty France WiFi - - "217.33.148.210/32" # Digital studio - - "13.43.9.198/32" # MP non_live_data-public-eu-west-2a-nat - - "13.42.163.245/32" # MP non_live_data-public-eu-west-2b-nat - - "18.132.208.127/32" # MP non_live_data-public-eu-west-2c-nat - - "51.149.249.0/29" # ARK Corsham Internet Egress Exponential-E - - "51.149.249.32/29" # ARK Corsham Internet Egress Exponential-E - - "194.33.192.0/25" # ARK internet (DOM1) - - "194.33.193.0/25" # ARK internet (DOM1) - - "194.33.196.0/25" # ARK internet (DOM1) - - "194.33.197.0/25" # ARK internet (DOM1) - - "195.59.75.0/24" # ARK internet (DOM1) - - "194.33.248.0/29" # ARK Corsham Internet Egress Vodafone - - "194.33.249.0/29" # ARK Corsham Internet Egress Vodafone - - "62.25.106.209/32" # OMNI - - "195.92.40.49/32" # OMNI - - "62.25.109.197/32" # Quantum - - "195.92.38.16/28" # Quantum - - "212.137.36.230/32" # Quantum - - "78.33.10.50/31" # Unilink AOVPN - - "78.33.10.52/30" # Unilink AOVPN - - "78.33.10.56/30" # Unilink AOVPN - - "78.33.10.60/32" # Unilink AOVPN - - "78.33.32.99/32" # Unilink AOVPN - - "78.33.32.100/30" # Unilink AOVPN - - "78.33.32.104/30" # Unilink AOVPN - - "78.33.32.108/32" # Unilink AOVPN - - "83.98.63.176/29" # Unilink AOVPN - - "194.75.210.216/29" # Unilink AOVPN - - "217.138.45.109/32" # Unilink AOVPN - - "217.138.45.110/32" # Unilink AOVPN - - "34.241.149.106/32" # Airflow in Analytical Platform - - "52.210.79.20/32" # Airflow in Analytical Platform - - "54.228.134.38/32" # Airflow in Analytical Platform diff --git a/alfresco-content-services/values_poc.yaml b/alfresco-content-services/values_poc.yaml deleted file mode 100644 index 337dbef..0000000 --- a/alfresco-content-services/values_poc.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# this file overrides values defined in ./values.yaml -repository: - replicaCount: 1 -share: - replicaCount: 1 -global: - whitelistSourceRanges: - - "3.11.29.246" # legacy delius-mis-dev-az1-nat-gateway - - "18.130.165.209" # legacy delius-mis-dev-az2-nat-gateway - - "35.178.35.115" # legacy delius-mis-dev-az3-nat-gateway - - "35.178.209.113" # Cloud Platform live-1-eu-west-2a - - "3.8.51.207" # Cloud Platform live-1-eu-west-2c - - "35.177.252.54" # Cloud Platform live-1-eu-west-2b - - "35.176.93.186/32" # MoJ GlobalProtect - - "35.177.125.252/32" # MoJ VPN Gateway Proxies - - "35.177.137.160/32" # MoJ VPN Gateway Proxies - - "81.134.202.29/32" # MoJ VPN - - "51.149.250.0/24" # PTTP / MoJO Production Account BYOIP CIDR range - - "51.149.251.0/24" # PTTP / MoJO Production Account BYOIP CIDR range - PreProd - - "213.121.161.112/28" # 102 Petty France WiFi - - "217.33.148.210/32" # Digital studio - - "13.43.9.198/32" # MP non_live_data-public-eu-west-2a-nat - - "13.42.163.245/32" # MP non_live_data-public-eu-west-2b-nat - - "18.132.208.127/32" # MP non_live_data-public-eu-west-2c-nat - - "51.149.249.0/29" # ARK Corsham Internet Egress Exponential-E - - "51.149.249.32/29" # ARK Corsham Internet Egress Exponential-E - - "194.33.192.0/25" # ARK internet (DOM1) - - "194.33.193.0/25" # ARK internet (DOM1) - - "194.33.196.0/25" # ARK internet (DOM1) - - "194.33.197.0/25" # ARK internet (DOM1) - - "195.59.75.0/24" # ARK internet (DOM1) - - "194.33.248.0/29" # ARK Corsham Internet Egress Vodafone - - "194.33.249.0/29" # ARK Corsham Internet Egress Vodafone - - "62.25.106.209/32" # OMNI - - "195.92.40.49/32" # OMNI - - "62.25.109.197/32" # Quantum - - "195.92.38.16/28" # Quantum - - "212.137.36.230/32" # Quantum - - "78.33.10.50/31" # Unilink AOVPN - - "78.33.10.52/30" # Unilink AOVPN - - "78.33.10.56/30" # Unilink AOVPN - - "78.33.10.60/32" # Unilink AOVPN - - "78.33.32.99/32" # Unilink AOVPN - - "78.33.32.100/30" # Unilink AOVPN - - "78.33.32.104/30" # Unilink AOVPN - - "78.33.32.108/32" # Unilink AOVPN - - "83.98.63.176/29" # Unilink AOVPN - - "194.75.210.216/29" # Unilink AOVPN - - "217.138.45.109/32" # Unilink AOVPN - - "217.138.45.110/32" # Unilink AOVPN diff --git a/alfresco-content-services/values_stage.yaml b/alfresco-content-services/values_stage.yaml deleted file mode 100644 index c84061d..0000000 --- a/alfresco-content-services/values_stage.yaml +++ /dev/null @@ -1,94 +0,0 @@ -# this file overrides values defined in ./values.yaml -repository: - replicaCount: 2 - resources: - limits: - cpu: 8 - memory: 32Gi - persistence: - baseSize: 100Gi - environment: # override JAVA_OPTS to set XX:MaxRAM. TODO: this override can be removed once we can use cgroup v2 api - JAVA_OPTS: >- - -Dtransform.service.enabled=true - -XX:MinRAMPercentage=50 - -XX:MaxRAMPercentage=80 - -XX:MaxRAM=32212254720 - -Dencryption.keystore.type=JCEKS - -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding - -Dencryption.keyAlgorithm=DESede - -Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore - -Dmetadata-keystore.aliases=metadata - -Dmetadata-keystore.metadata.algorithm=DESede - -Dsystem.workflow.engine.activiti.enabled=false - -Dsystem.prop_table_cleaner.algorithm=V2 - -Dsystem.delete_not_exists.read_only=false - -Dsystem.delete_not_exists.timeout_seconds=3600 -share: - replicaCount: 1 -alfresco-search: - resources: - limits: - cpu: 8 - memory: 32Gi - environment: - SOLR_JAVA_MEM: >- - -XX:MinRAMPercentage=50 - -XX:MaxRAMPercentage=80 - -XX:MaxRAM=32212254720 - persistence: - VolumeSizeRequest: 2Ti -tika: - replicaCount: 4 # use more replicas for initial indexing. TODO: reduce to 2 for normal operation - resources: - limits: - cpu: 2 - memory: 4Gi - environment: - JAVA_OPTS: >- - -Xms1024M - -Xmx3276M -global: - whitelistSourceRanges: - - "3.10.104.193" # legacy delius-stage-az1-nat-gateway - - "3.11.26.150" # legacy delius-stage-az2-nat-gateway - - "18.130.189.137" # legacy delius-stage-az3-nat-gateway - - "35.178.209.113" # Cloud Platform live-1-eu-west-2a - - "3.8.51.207" # Cloud Platform live-1-eu-west-2c - - "35.177.252.54" # Cloud Platform live-1-eu-west-2b - - "35.176.93.186/32" # MoJ GlobalProtect - - "35.177.125.252/32" # MoJ VPN Gateway Proxies - - "35.177.137.160/32" # MoJ VPN Gateway Proxies - - "81.134.202.29/32" # MoJ VPN - - "51.149.250.0/24" # PTTP / MoJO Production Account BYOIP CIDR range - - "51.149.251.0/24" # PTTP / MoJO Production Account BYOIP CIDR range - PreProd - - "213.121.161.112/28" # 102 Petty France WiFi - - "217.33.148.210/32" # Digital studio - - "13.43.9.198/32" # MP non_live_data-public-eu-west-2a-nat - - "13.42.163.245/32" # MP non_live_data-public-eu-west-2b-nat - - "18.132.208.127/32" # MP non_live_data-public-eu-west-2c-nat - - "51.149.249.0/29" # ARK Corsham Internet Egress Exponential-E - - "51.149.249.32/29" # ARK Corsham Internet Egress Exponential-E - - "194.33.192.0/25" # ARK internet (DOM1) - - "194.33.193.0/25" # ARK internet (DOM1) - - "194.33.196.0/25" # ARK internet (DOM1) - - "194.33.197.0/25" # ARK internet (DOM1) - - "195.59.75.0/24" # ARK internet (DOM1) - - "194.33.248.0/29" # ARK Corsham Internet Egress Vodafone - - "194.33.249.0/29" # ARK Corsham Internet Egress Vodafone - - "62.25.106.209/32" # OMNI - - "195.92.40.49/32" # OMNI - - "62.25.109.197/32" # Quantum - - "195.92.38.16/28" # Quantum - - "212.137.36.230/32" # Quantum - - "78.33.10.50/31" # Unilink AOVPN - - "78.33.10.52/30" # Unilink AOVPN - - "78.33.10.56/30" # Unilink AOVPN - - "78.33.10.60/32" # Unilink AOVPN - - "78.33.32.99/32" # Unilink AOVPN - - "78.33.32.100/30" # Unilink AOVPN - - "78.33.32.104/30" # Unilink AOVPN - - "78.33.32.108/32" # Unilink AOVPN - - "83.98.63.176/29" # Unilink AOVPN - - "194.75.210.216/29" # Unilink AOVPN - - "217.138.45.109/32" # Unilink AOVPN - - "217.138.45.110/32" # Unilink AOVPN diff --git a/alfresco-content-services/values_test.yaml b/alfresco-content-services/values_test.yaml deleted file mode 100644 index 3938ebb..0000000 --- a/alfresco-content-services/values_test.yaml +++ /dev/null @@ -1,97 +0,0 @@ -# this file overrides values defined in ./values.yaml -repository: - replicaCount: 2 - resources: # requests and limits set closer together to ensure CP stability - requests: - cpu: 1 - memory: 2Gi - limits: - cpu: 3 - memory: 4Gi - persistence: - baseSize: 100Gi - environment: # override JAVA_OPTS to set XX:MaxRAM. TODO: this override can be removed once we can use cgroup v2 api - JAVA_OPTS: >- - -Dtransform.service.enabled=true - -XX:MinRAMPercentage=50 - -XX:MaxRAMPercentage=80 - -XX:MaxRAM=4294967296 - -Dencryption.keystore.type=JCEKS - -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding - -Dencryption.keyAlgorithm=DESede - -Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore - -Dmetadata-keystore.aliases=metadata - -Dmetadata-keystore.metadata.algorithm=DESede - -Dsystem.workflow.engine.activiti.enabled=false - -Dsystem.prop_table_cleaner.algorithm=V2 - -Dsystem.delete_not_exists.read_only=false - -Dsystem.delete_not_exists.timeout_seconds=3600 -share: - replicaCount: 1 -alfresco-search: - resources: - requests: - cpu: 1 - memory: 1Gi - limits: - cpu: 2 - memory: 2Gi - environment: - SOLR_JAVA_MEM: >- - -XX:MinRAMPercentage=50 - -XX:MaxRAMPercentage=80 - -XX:MaxRAM=2147483648 -tika: - replicaCount: 2 - resources: - limits: - cpu: 2 - memory: 2Gi -global: - whitelistSourceRanges: - - "35.176.126.163" # legacy delius-test-az1-nat-gateway - - "35.178.162.73" # legacy delius-test-az2-nat-gateway - - "52.56.195.113" # legacy delius-test-az3-nat-gateway - - "35.178.209.113" # Cloud Platform live-1-eu-west-2a - - "3.8.51.207" # Cloud Platform live-1-eu-west-2c - - "35.177.252.54" # Cloud Platform live-1-eu-west-2b - - "35.176.93.186/32" # MoJ GlobalProtect - - "35.177.125.252/32" # MoJ VPN Gateway Proxies - - "35.177.137.160/32" # MoJ VPN Gateway Proxies - - "81.134.202.29/32" # MoJ VPN - - "51.149.250.0/24" # PTTP / MoJO Production Account BYOIP CIDR range - - "51.149.251.0/24" # PTTP / MoJO Production Account BYOIP CIDR range - PreProd - - "213.121.161.112/28" # 102 Petty France WiFi - - "217.33.148.210/32" # Digital studio - - "13.43.9.198/32" # MP non_live_data-public-eu-west-2a-nat - - "13.42.163.245/32" # MP non_live_data-public-eu-west-2b-nat - - "18.132.208.127/32" # MP non_live_data-public-eu-west-2c-nat - - "51.149.249.0/29" # ARK Corsham Internet Egress Exponential-E - - "51.149.249.32/29" # ARK Corsham Internet Egress Exponential-E - - "194.33.192.0/25" # ARK internet (DOM1) - - "194.33.193.0/25" # ARK internet (DOM1) - - "194.33.196.0/25" # ARK internet (DOM1) - - "194.33.197.0/25" # ARK internet (DOM1) - - "195.59.75.0/24" # ARK internet (DOM1) - - "194.33.248.0/29" # ARK Corsham Internet Egress Vodafone - - "194.33.249.0/29" # ARK Corsham Internet Egress Vodafone - - "62.25.106.209/32" # OMNI - - "195.92.40.49/32" # OMNI - - "62.25.109.197/32" # Quantum - - "195.92.38.16/28" # Quantum - - "212.137.36.230/32" # Quantum - - "78.33.10.50/31" # Unilink AOVPN - - "78.33.10.52/30" # Unilink AOVPN - - "78.33.10.56/30" # Unilink AOVPN - - "78.33.10.60/32" # Unilink AOVPN - - "78.33.32.99/32" # Unilink AOVPN - - "78.33.32.100/30" # Unilink AOVPN - - "78.33.32.104/30" # Unilink AOVPN - - "78.33.32.108/32" # Unilink AOVPN - - "83.98.63.176/29" # Unilink AOVPN - - "194.75.210.216/29" # Unilink AOVPN - - "217.138.45.109/32" # Unilink AOVPN - - "217.138.45.110/32" # Unilink AOVPN - - "34.241.149.106/32" # Airflow in Analytical Platform - - "52.210.79.20/32" # Airflow in Analytical Platform - - "54.228.134.38/32" # Airflow in Analytical Platform diff --git a/kustomize/base/kustomization.yaml b/kustomize/base/kustomization.yaml new file mode 100644 index 0000000..b53cccd --- /dev/null +++ b/kustomize/base/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - resources.yaml + - reindex-prefixes-config-map.yaml + +patches: + # - path: patch-job-reindexing.yaml + - path: patch-ingress-repository.yaml + - path: patch-ingress-share.yaml diff --git a/kustomize/base/patch-ingress-repository.yaml b/kustomize/base/patch-ingress-repository.yaml new file mode 100644 index 0000000..5653f51 --- /dev/null +++ b/kustomize/base/patch-ingress-repository.yaml @@ -0,0 +1,9 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: alfresco-content-services-alfresco-cs-repository + annotations: + external-dns.alpha.kubernetes.io/aws-weight: "100" + kubernetes.io/ingress.class: default +spec: + ingressClassName: default diff --git a/kustomize/base/patch-ingress-share.yaml b/kustomize/base/patch-ingress-share.yaml new file mode 100644 index 0000000..119fc74 --- /dev/null +++ b/kustomize/base/patch-ingress-share.yaml @@ -0,0 +1,9 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: alfresco-content-services-alfresco-cs-share + annotations: + external-dns.alpha.kubernetes.io/aws-weight: "100" + kubernetes.io/ingress.class: default +spec: + ingressClassName: default diff --git a/kustomize/base/patch-job-reindexing.yaml b/kustomize/base/patch-job-reindexing.yaml new file mode 100644 index 0000000..16c17d1 --- /dev/null +++ b/kustomize/base/patch-job-reindexing.yaml @@ -0,0 +1,25 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: alfresco-content-services-alfresco-search-enterprise-reindexing +spec: + template: + spec: + containers: + - name: alfresco-search-enterprise-reindexing # Update this with the actual container name + volumeMounts: + - name: prefixes-file-volume + mountPath: /alf/reindex.prefixes-file.json + subPath: reindex.prefixes-file.json + env: + - name: ALFRESCO_REINDEX_PREFIXES_FILE + value: file:///alf/reindex.prefixes-file.json + - name: SPRING_DATASOURCE_URL + valueFrom: + secretKeyRef: + name: rds-instance-output + key: RDS_JDBC_URL + volumes: + - name: prefixes-file-volume + configMap: + name: prefixes-file diff --git a/alfresco-content-services/charts/alfresco-search-enterprise/templates/prefixes-file-config-map.yaml b/kustomize/base/reindex-prefixes-config-map.yaml similarity index 100% rename from alfresco-content-services/charts/alfresco-search-enterprise/templates/prefixes-file-config-map.yaml rename to kustomize/base/reindex-prefixes-config-map.yaml diff --git a/alfresco-content-services/values.yaml b/kustomize/base/values.yaml similarity index 99% rename from alfresco-content-services/values.yaml rename to kustomize/base/values.yaml index 2cba1af..40fa258 100644 --- a/alfresco-content-services/values.yaml +++ b/kustomize/base/values.yaml @@ -75,6 +75,8 @@ repository: -Dsystem.prop_table_cleaner.algorithm=V2 -Dsystem.delete_not_exists.read_only=false -Dsystem.delete_not_exists.timeout_seconds=3600 + -Dfilecontentstore.subsystem.name=S3 + -Ds3.flatRoot=false securityContext: allowPrivilegeEscalation: false runAsNonRoot: true @@ -697,7 +699,7 @@ activemq: user: admin # -- Default password for the embedded broker admin user password: admin -# -- external activemq connection setting when activemq.enabled=false + # -- external activemq connection setting when activemq.enabled=false securityContext: allowPrivilegeEscalation: false runAsNonRoot: true diff --git a/kustomize/kustomizer.sh b/kustomize/kustomizer.sh new file mode 100755 index 0000000..d47e8d1 --- /dev/null +++ b/kustomize/kustomizer.sh @@ -0,0 +1,19 @@ +#!/bin/bash +while getopts d: flag +do + case "${flag}" in + d) debug=${OPTARG};; + esac +done +if [ "$debug" == "true" ]; then + set -x + cat > ../base/resources.yaml + kubectl kustomize + kubectl kustomize > output.yaml + echo "leaving helm template in resources.yaml" + echo "leaving kustomized helm template in output.yaml" +else + cat > ../base/resources.yaml + kubectl kustomize + rm ../base/resources.yaml +fi diff --git a/kustomize/poc/allowlist.yaml b/kustomize/poc/allowlist.yaml new file mode 100644 index 0000000..0b1f235 --- /dev/null +++ b/kustomize/poc/allowlist.yaml @@ -0,0 +1,46 @@ +- "35.176.126.163" # legacy delius-test-az1-nat-gateway +- "35.178.162.73" # legacy delius-test-az2-nat-gateway +- "52.56.195.113" # legacy delius-test-az3-nat-gateway +- "35.178.209.113" # Cloud Platform live-1-eu-west-2a +- "3.8.51.207" # Cloud Platform live-1-eu-west-2c +- "35.177.252.54" # Cloud Platform live-1-eu-west-2b +- "35.176.93.186/32" # MoJ GlobalProtect +- "35.177.125.252/32" # MoJ VPN Gateway Proxies +- "35.177.137.160/32" # MoJ VPN Gateway Proxies +- "81.134.202.29/32" # MoJ VPN +- "51.149.250.0/24" # PTTP / MoJO Production Account BYOIP CIDR range +- "51.149.251.0/24" # PTTP / MoJO Production Account BYOIP CIDR range - PreProd +- "213.121.161.112/28" # 102 Petty France WiFi +- "217.33.148.210/32" # Digital studio +- "13.43.9.198/32" # MP non_live_data-public-eu-west-2a-nat +- "13.42.163.245/32" # MP non_live_data-public-eu-west-2b-nat +- "18.132.208.127/32" # MP non_live_data-public-eu-west-2c-nat +- "51.149.249.0/29" # ARK Corsham Internet Egress Exponential-E +- "51.149.249.32/29" # ARK Corsham Internet Egress Exponential-E +- "194.33.192.0/25" # ARK internet (DOM1) +- "194.33.193.0/25" # ARK internet (DOM1) +- "194.33.196.0/25" # ARK internet (DOM1) +- "194.33.197.0/25" # ARK internet (DOM1) +- "195.59.75.0/24" # ARK internet (DOM1) +- "194.33.248.0/29" # ARK Corsham Internet Egress Vodafone +- "194.33.249.0/29" # ARK Corsham Internet Egress Vodafone +- "62.25.106.209/32" # OMNI +- "195.92.40.49/32" # OMNI +- "62.25.109.197/32" # Quantum +- "195.92.38.16/28" # Quantum +- "212.137.36.230/32" # Quantum +- "78.33.10.50/31" # Unilink AOVPN +- "78.33.10.52/30" # Unilink AOVPN +- "78.33.10.56/30" # Unilink AOVPN +- "78.33.10.60/32" # Unilink AOVPN +- "78.33.32.99/32" # Unilink AOVPN +- "78.33.32.100/30" # Unilink AOVPN +- "78.33.32.104/30" # Unilink AOVPN +- "78.33.32.108/32" # Unilink AOVPN +- "83.98.63.176/29" # Unilink AOVPN +- "194.75.210.216/29" # Unilink AOVPN +- "217.138.45.109/32" # Unilink AOVPN +- "217.138.45.110/32" # Unilink AOVPN +- "34.241.149.106/32" # Airflow in Analytical Platform +- "52.210.79.20/32" # Airflow in Analytical Platform +- "54.228.134.38/32" # Airflow in Analytical Platform diff --git a/kustomize/poc/kustomization.yaml b/kustomize/poc/kustomization.yaml new file mode 100644 index 0000000..eaf31f0 --- /dev/null +++ b/kustomize/poc/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../base + +patches: + - path: patch-ingress-repository.yaml + - path: patch-ingress-share.yaml diff --git a/kustomize/poc/output.yaml b/kustomize/poc/output.yaml new file mode 100644 index 0000000..67e52e8 --- /dev/null +++ b/kustomize/poc/output.yaml @@ -0,0 +1,2159 @@ +apiVersion: v1 +data: + FILE_STORE_URL: http://alfresco-content-services-alfresco-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file + JAVA_OPTS: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 + livenessPercent: "150" + livenessTransformPeriodSeconds: "600" + maxTransformSeconds: "900" + maxTransforms: "10000" +kind: ConfigMap +metadata: + labels: + app: alfresco-content-services-alfresco-cs-imagemagick + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-imagemagick-configmap +--- +apiVersion: v1 +data: + FILE_STORE_URL: http://alfresco-content-services-alfresco-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file + JAVA_OPTS: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 + livenessPercent: "250" + livenessTransformPeriodSeconds: "600" + maxTransformSeconds: "1800" + maxTransforms: "99999" +kind: ConfigMap +metadata: + labels: + app: alfresco-content-services-alfresco-cs-libreoffice + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-libreoffice-configmap +--- +apiVersion: v1 +data: + FILE_STORE_URL: http://alfresco-content-services-alfresco-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file + JAVA_OPTS: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 + livenessPercent: "150" + livenessTransformPeriodSeconds: "600" + maxTransformSeconds: "1200" + maxTransforms: "10000" +kind: ConfigMap +metadata: + labels: + app: alfresco-content-services-alfresco-cs-pdfrenderer + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-pdfrenderer-configmap +--- +apiVersion: v1 +data: + ALFRESCO_OPTS: -Ddeployment.method=HELM_CHART -Dalfresco.cluster.enabled=false -Ddir.license.external=/usr/local/tomcat/shared/classes/alfresco/extension/license/ + -Dalfresco.host=hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk + -Dalfresco.protocol=https -Dalfresco.port=443 -Daos.baseUrlOverwrite=https://hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk/alfresco/aos + -Dcsrf.filter.origin=https://hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk + -Dcsrf.filter.referer=https://hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk/.* + -Dshare.protocol=https -Dshare.host=hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk + -Dshare.port=443 -Delasticsearch.host=opensearch-proxy-service-cloud-platform-62a206e0.hmpps-delius-alfrsco-poc.svc.cluster.local + -Delasticsearch.port=8080 -Delasticsearch.user= -Delasticsearch.password= -Delasticsearch.createIndexIfNotExists=true + -Delasticsearch.indexName=alfresco -Dindex.subsystem.name=elasticsearch -Dtransform.service.url=http://alfresco-content-services-alfresco-router + -Dsfs.url=http://alfresco-content-services-alfresco-filestore:80 -DlocalTransform.core-aio.url= + -DlocalTransform.pdfrenderer.url=http://alfresco-content-services-alfresco-cs-pdfrenderer + -DlocalTransform.imagemagick.url=http://alfresco-content-services-alfresco-cs-imagemagick + -DlocalTransform.libreoffice.url=http://alfresco-content-services-alfresco-cs-libreoffice + -DlocalTransform.tika.url=http://alfresco-content-services-alfresco-cs-tika -DlocalTransform.misc.url=http://alfresco-content-services-alfresco-cs-transform-misc + -Dalfresco-pdf-renderer.url=http://alfresco-content-services-alfresco-cs-pdfrenderer + -Dimg.url=http://alfresco-content-services-alfresco-cs-imagemagick -Djodconverter.url=http://alfresco-content-services-alfresco-cs-libreoffice + -Dtika.url=http://alfresco-content-services-alfresco-cs-tika -Dtransform.misc.url=http://alfresco-content-services-alfresco-cs-transform-misc + -Ds3.bucketLocation=eu-west-2 -Ds3.bucketName=cloud-platform-5ce784402d8052fe1cd006f1e7329f70 + -Devents.subsystem.autoStart=false + CATALINA_OPTS: $ALFRESCO_OPTS -Ddb.driver=org.postgresql.Driver -Ddb.url=jdbc:postgresql://cloud-platform-f05612b0b7cdbf33.cdwm328dlye6.eu-west-2.rds.amazonaws.com:5432/alfresco + -Ddb.username=$DATABASE_USERNAME -Ddb.password=$DATABASE_PASSWORD -Ds3.accessKey=$ACCESSKEY + -Ds3.secretKey=$SECRETKEY -Dmetadata-keystore.password=$METADATA_KEYSTORE_PASSWORD + -Dmetadata-keystore.metadata.password=$METADATA_KEY_PASSWORD -Dmessaging.broker.url=$BROKER_URL + -Dmessaging.broker.username=$BROKER_USERNAME -Dmessaging.broker.password=$BROKER_PASSWORD + -Dencryption.ssl.truststore.location=$JAVA_HOME/lib/security/cacerts -Dalfresco_user_store.adminpassword=$REPO_ADMIN_PASSWORD + JAVA_OPTS: -Dindex.subsystem.name=elasticsearch -Delasticsearch.indexName=alfresco + -Delasticsearch.createIndexIfNotExists=true -Dtransform.service.enabled=true -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 -Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding + -Dencryption.keyAlgorithm=DESede -Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore + -Dmetadata-keystore.aliases=metadata -Dmetadata-keystore.metadata.algorithm=DESede + -Dsystem.workflow.engine.activiti.enabled=false -Dsystem.prop_table_cleaner.algorithm=V2 + -Dsystem.delete_not_exists.read_only=false -Dsystem.delete_not_exists.timeout_seconds=3600 + -Dfilecontentstore.subsystem.name=S3 -Ds3.flatRoot=false + RELEASE_NAME: alfresco-content-services +kind: ConfigMap +metadata: + labels: + app: alfresco-content-services-alfresco-cs-repository + chart: alfresco-content-services-6.0.2 + component: repository + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-repository-configmap +--- +apiVersion: v1 +data: + CATALINA_OPTS: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 + CSRF_FILTER_ORIGIN: https://hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk + CSRF_FILTER_REFERER: https://hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk/.* + JAVA_OPTS: -Dalfresco.proxy=https://hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk + REPO_HOST: alfresco-content-services-alfresco-cs-repository + REPO_PORT: "80" +kind: ConfigMap +metadata: + labels: + app: alfresco-content-services-alfresco-cs-share + chart: alfresco-content-services-6.0.2 + component: share + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-share-configmap +--- +apiVersion: v1 +data: + FILE_STORE_URL: http://alfresco-content-services-alfresco-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file + JAVA_OPTS: -Xms1024M -Xmx1638M + livenessPercent: "400" + livenessTransformPeriodSeconds: "600" + maxTransformSeconds: "1800" + maxTransforms: "10000" +kind: ConfigMap +metadata: + labels: + app: alfresco-content-services-alfresco-cs-tika + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-tika-configmap +--- +apiVersion: v1 +data: + FILE_STORE_URL: http://alfresco-content-services-alfresco-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file + JAVA_OPTS: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 + livenessPercent: "400" + livenessTransformPeriodSeconds: "600" + maxTransformSeconds: "1800" + maxTransforms: "10000" +kind: ConfigMap +metadata: + labels: + app: alfresco-content-services-alfresco-cs-transform-misc + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-transform-misc-configmap +--- +apiVersion: v1 +data: + JAVA_OPTS: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 + livenessPercent: "150" + livenessSavePeriodSeconds: "600" + scheduler.cleanup.interval: "86400000" + scheduler.content.age.millis: "86400000" +kind: ConfigMap +metadata: + labels: + app: alfresco-content-services-alfresco-filestore + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-filestore-configmap +--- +apiVersion: v1 +data: + FILE_STORE_URL: http://alfresco-content-services-alfresco-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file + IMAGEMAGICK_URL: http://alfresco-content-services-alfresco-cs-imagemagick:80 + JAVA_OPTS: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 + LIBREOFFICE_URL: http://alfresco-content-services-alfresco-cs-libreoffice:80 + MISC_URL: http://alfresco-content-services-alfresco-cs-transform-misc:80 + PDF_RENDERER_URL: http://alfresco-content-services-alfresco-cs-pdfrenderer:80 + TIKA_URL: http://alfresco-content-services-alfresco-cs-tika:80 +kind: ConfigMap +metadata: + labels: + app: alfresco-content-services-alfresco-router + chart: alfresco-content-services-6.0.2 + component: transformrouter + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-router-configmap +--- +apiVersion: v1 +data: + ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_BASEURL: http://alfresco-content-services-alfresco-router/transform/config + ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_ENABLED: "true" + ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_REFRESHTIME: 0 0 * * * * + ALFRESCO_PATHINDEXINGCOMPONENT_ENABLED: "true" + ALFRESCO_SHAREDFILESTORE_BASEURL: http://alfresco-content-services-alfresco-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file/ + ELASTICSEARCH_INDEXNAME: alfresco + SPRING_ELASTICSEARCH_REST_URIS: http://opensearch-proxy-service-cloud-platform-62a206e0.hmpps-delius-alfrsco-poc.svc.cluster.local:8080 +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: alfresco-search-enterprise + app.kubernetes.io/version: 3.3.0 + helm.sh/chart: alfresco-search-enterprise-1.2.0 + name: alfresco-content-services-alfresco-search-enterprise-configmap +--- +apiVersion: v1 +data: + ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_BASEURL: http://alfresco-content-services-alfresco-router/transform/config + ALFRESCO_REINDEX_PATHINDEXINGENABLED: "true" + ALFRESCO_SHAREDFILESTORE_BASEURL: http://alfresco-content-services-alfresco-filestore:80/alfresco/api/-default-/private/sfs/versions/1/file/ + ELASTICSEARCH_INDEXNAME: alfresco + SPRING_DATASOURCE_URL: jdbc:postgresql://alfresco-content-services-postgresql-acs:5432/alfresco + SPRING_ELASTICSEARCH_REST_URIS: http://opensearch-proxy-service-cloud-platform-62a206e0.hmpps-delius-alfrsco-poc.svc.cluster.local:8080 +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: alfresco-search-enterprise + app.kubernetes.io/version: 3.3.0 + helm.sh/chart: alfresco-search-enterprise-1.2.0 + name: alfresco-content-services-alfresco-search-enterprise-reindexing-configmap +--- +apiVersion: v1 +data: + reindex.prefixes-file.json: | + { + "prefixUriMap":{ + "":"", + "http://www.alfresco.org/model/aos/1.0":"aos", + "http://www.alfresco.org/model/workflow/invite/nominated/1.0":"inwf", + "http://www.alfresco.org/model/solrfacetcustomproperty/1.0":"srftcustom", + "http://www.alfresco.org/model/datalist/1.0":"dl", + "http://www.alfresco.org/model/webdav/1.0":"webdav", + "http://www.alfresco.org/model/cmis/1.0/cs01ext":"cmisext", + "http://www.alfresco.org/model/distributionpolicies/1.0/model":"dp", + "http://www.alfresco.org/view/repository/1.0":"view", + "http://www.alfresco.org/model/download/1.0":"download", + "http://www.alfresco.org/model/publishing/twitter/1.0":"twitter", + "http://www.alfresco.org/model/action/1.0":"act", + "http://www.alfresco.org/system/registry/1.0":"reg", + "http://www.alfresco.org/model/user/1.0":"usr", + "http://www.alfresco.org/model/calendar":"ia", + "http://www.alfresco.org":"alf", + "http://www.alfresco.org/model/content/metadata/IPTCXMP/1.0":"iptcxmp", + "http://www.alfresco.org/model/application/1.0":"app", + "http://www.alfresco.org/model/surf/1.0":"surf", + "http://www.alfresco.org/model/versionstore/1.0":"ver", + "http://www.alfresco.org/system/modules/1.0":"module", + "http://www.alfresco.org/model/linksmodel/1.0":"lnk", + "http://iptc.org/std/Iptc4xmpExt/2008-02-29/":"Iptc4xmpExt", + "http://ns.adobe.com/photoshop/1.0/":"photoshop", + "http://www.alfresco.org/model/sync/1.0":"sync", + "http://ns.useplus.org/ldf/xmp/1.0/":"plus", + "http://www.alfresco.org/model/zaizi/gdpr/1.0":"gdpr", + "http://www.alfresco.org/model/remotecredentials/1.0":"rc", + "http://www.alfresco.org/model/emailserver/1.0":"emailserver", + "http://www.alfresco.org/model/hybridworkflow/1.0":"hwf", + "http://www.alfresco.org/model/sitecustomproperty/1.0":"stcp", + "http://www.alfresco.org/model/cmis/1.0/cs01":"cmis", + "http://www.alfresco.org/model/transfer/1.0":"trx", + "http://www.alfresco.org/model/rendition/1.0":"rn", + "http://www.alfresco.org/model/exif/1.0":"exif", + "http://www.alfresco.org/model/publishing/youtube/1.0":"youtube", + "http://ns.adobe.com/xap/1.0/rights/":"xmpRights", + "http://www.alfresco.org/model/custommodelmanagement/1.0":"cmm", + "http://www.alfresco.org/model/workflow/invite/moderated/1.0":"imwf", + "http://www.alfresco.org/model/forum/1.0":"fm", + "http://www.alfresco.org/model/rule/1.0":"rule", + "http://www.alfresco.org/model/publishing/linkedin/1.0":"linkedin", + "http://www.alfresco.org/model/publishing/slideshare/1.0":"slideshare", + "http://www.alfresco.org/model/system/1.0":"sys", + "http://www.alfresco.org/model/content/smartfolder/1.0":"smf", + "http://www.alfresco.org/model/zaizi/nomsspg/1.0":"nspg", + "http://www.alfresco.org/model/workflow/1.0":"wf", + "http://www.alfresco.org/model/qshare/1.0":"qshare", + "http://www.alfresco.org/model/versionstore/2.0":"ver2", + "http://www.alfresco.org/model/solrfacet/1.0":"srft", + "http://www.alfresco.org/model/audio/1.0":"audio", + "http://www.alfresco.org/model/blogintegration/1.0":"blg", + "http://www.alfresco.org/model/bpm/1.0":"bpm", + "http://www.alfresco.org/model/site/1.0":"st", + "http://www.alfresco.org/model/imap/1.0":"imap", + "http://www.alfresco.org/model/dictionary/1.0":"d", + "custom.model":"custom", + "http://www.alfresco.org/model/publishing/facebook/1.0":"facebook", + "http://www.alfresco.org/model/content/1.0":"cm", + "http://www.alfresco.org/model/cmis/custom":"cmiscustom", + "http://www.alfresco.org/model/devicesync/1.0":"devicesync", + "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/":"Iptc4xmpCore", + "http://www.alfresco.org/model/googledocs/2.0":"gd2", + "http://www.alfresco.org/model/publishing/flickr/1.0":"flickr", + "http://www.alfresco.org/model/workflow/resetpassword/1.0":"resetpasswordwf", + "http://www.alfresco.org/model/cmis/1.0/alfcmis":"alfcmis", + "http://www.alfresco.org/model/publishing/1.0":"pub", + "http://purl.org/dc/elements/1.1/":"dc" + } + } +kind: ConfigMap +metadata: + name: prefixes-file +--- +apiVersion: v1 +data: + BROKER_PASSWORD: YWRtaW4= + BROKER_URL: ZmFpbG92ZXI6KG5pbzovL2FsZnJlc2NvLWNvbnRlbnQtc2VydmljZXMtYWN0aXZlbXEtYnJva2VyOjYxNjE2KT90aW1lb3V0PTMwMDAmam1zLnVzZUNvbXByZXNzaW9uPXRydWU= + BROKER_USERNAME: YWRtaW4= +kind: Secret +metadata: + labels: + app: alfresco-content-services-alfresco-cs-repository + chart: alfresco-content-services-6.0.2 + component: repository + heritage: Helm + release: alfresco-content-services + name: acs-alfresco-cs-brokersecret +type: Opaque +--- +apiVersion: v1 +data: + BROKER_PASSWORD: YWRtaW4= + BROKER_USERNAME: YWRtaW4= +kind: Secret +metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: activemq + app.kubernetes.io/version: 5.17.4 + helm.sh/chart: activemq-3.1.0 + name: alfresco-content-services-activemq-brokersecret +type: Opaque +--- +apiVersion: v1 +data: + METADATA_KEY_PASSWORD: b0tJV3pWZEVkQQ== + METADATA_KEYSTORE_PASSWORD: bXA2eWMwVUQ5ZQ== +kind: Secret +metadata: + labels: + app: alfresco-content-services-alfresco-cs-repository + chart: alfresco-content-services-6.0.2 + component: repository + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-metadata-keystore-secret +type: Opaque +--- +apiVersion: v1 +data: + REPO_ADMIN_PASSWORD: MjA5YzYxNzRkYTQ5MGNhZWI0MjJmM2ZhNWE3YWU2MzQ= +kind: Secret +metadata: + labels: + app: alfresco-content-services-alfresco-cs-repository + chart: alfresco-content-services-6.0.2 + component: repository + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-repository-secret +type: Opaque +--- +apiVersion: v1 +data: + ELASTICSEARCH_PASSWORD: "" + ELASTICSEARCH_USERNAME: "" +kind: Secret +metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: alfresco-search-enterprise + app.kubernetes.io/version: 3.3.0 + helm.sh/chart: alfresco-search-enterprise-1.2.0 + name: alfresco-content-services-alfresco-search-enterprise-elasticsearch-secret +type: Opaque +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: activemq + app.kubernetes.io/version: 5.17.4 + helm.sh/chart: activemq-3.1.0 + name: alfresco-content-services-activemq-broker +spec: + ports: + - name: stomp + port: 61613 + protocol: TCP + targetPort: 61613 + - name: openwire + port: 61616 + protocol: TCP + targetPort: 61616 + - name: amqp + port: 5672 + protocol: TCP + targetPort: 5672 + selector: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: activemq + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: activemq + app.kubernetes.io/version: 5.17.4 + helm.sh/chart: activemq-3.1.0 + name: alfresco-content-services-activemq-web-console +spec: + ports: + - name: web-console + port: 8161 + protocol: TCP + targetPort: 8161 + selector: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: activemq + type: NodePort +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: alfresco-content-services-alfresco-cs-imagemagick + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-imagemagick +spec: + ports: + - name: imagemagick + port: 80 + targetPort: 8090 + selector: + app: alfresco-content-services-alfresco-cs-imagemagick + component: transformers + release: alfresco-content-services + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: alfresco-content-services-alfresco-cs-libreoffice + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-libreoffice +spec: + ports: + - name: libreoffice + port: 80 + targetPort: 8090 + selector: + app: alfresco-content-services-alfresco-cs-libreoffice + component: transformers + release: alfresco-content-services + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: alfresco-content-services-alfresco-cs-pdfrenderer + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-pdfrenderer +spec: + ports: + - name: pdfrenderer + port: 80 + targetPort: 8090 + selector: + app: alfresco-content-services-alfresco-cs-pdfrenderer + component: transformers + release: alfresco-content-services + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: alfresco-content-services-alfresco-cs-repository + chart: alfresco-content-services-6.0.2 + component: repository + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-repository +spec: + ports: + - name: alfresco + port: 80 + targetPort: 8080 + selector: + app: alfresco-content-services-alfresco-cs-repository + component: repository + release: alfresco-content-services + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: alfresco-content-services-alfresco-cs-share + chart: alfresco-content-services-6.0.2 + component: share + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-share +spec: + ports: + - name: share + port: 80 + targetPort: 8080 + selector: + app: alfresco-content-services-alfresco-cs-share + component: share + release: alfresco-content-services + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: alfresco-content-services-alfresco-cs-tika + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-tika +spec: + ports: + - name: tika + port: 80 + targetPort: 8090 + selector: + app: alfresco-content-services-alfresco-cs-tika + component: transformers + release: alfresco-content-services + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: alfresco-content-services-alfresco-cs-transform-misc + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-transform-misc +spec: + ports: + - name: transformmisc + port: 80 + targetPort: 8090 + selector: + app: alfresco-content-services-alfresco-cs-transform-misc + component: transformers + release: alfresco-content-services + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: alfresco-content-services-alfresco-filestore + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-filestore +spec: + ports: + - name: filestore + port: 80 + targetPort: 8099 + selector: + app: alfresco-content-services-alfresco-filestore + component: transformers + release: alfresco-content-services + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: alfresco-content-services-alfresco-router + chart: alfresco-content-services-6.0.2 + component: transformrouter + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-router +spec: + ports: + - name: transform-router + port: 80 + protocol: TCP + targetPort: 8095 + selector: + app: alfresco-content-services-alfresco-router + component: transformrouter + release: alfresco-content-services + type: ClusterIP +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: activemq-default-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20Gi + volumeMode: Filesystem +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: filestore-default-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20Gi + volumeMode: Filesystem +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: activemq + app.kubernetes.io/version: 5.17.4 + helm.sh/chart: activemq-3.1.0 + name: alfresco-content-services-activemq +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: activemq + strategy: + type: Recreate + template: + metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: activemq + spec: + containers: + - env: + - name: ACTIVEMQ_CONFIG_MINMEMORY + value: "512" + - name: ACTIVEMQ_CONFIG_MAXMEMORY + value: "2048" + - name: ACTIVEMQ_BROKER_NAME + value: alfresco-content-services-activemq + - name: ACTIVEMQ_ADMIN_LOGIN + valueFrom: + secretKeyRef: + key: BROKER_USERNAME + name: alfresco-content-services-activemq-brokersecret + - name: ACTIVEMQ_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + key: BROKER_PASSWORD + name: alfresco-content-services-activemq-brokersecret + image: alfresco/alfresco-activemq:5.17.4-jre17-rockylinux8 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 6 + initialDelaySeconds: 60 + periodSeconds: 10 + tcpSocket: + port: 61616 + timeoutSeconds: 1 + name: activemq + ports: + - containerPort: 61613 + name: stomp + - containerPort: 61616 + name: openwire + - containerPort: 5672 + name: amqp + - containerPort: 8161 + name: web-console + readinessProbe: + failureThreshold: 6 + initialDelaySeconds: 5 + periodSeconds: 10 + tcpSocket: + port: 61616 + timeoutSeconds: 1 + resources: + limits: + cpu: "2" + memory: 2048Mi + requests: + cpu: "0.25" + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /opt/activemq/data + name: data + subPath: alfresco-infrastructure/activemq-data + securityContext: + fsGroup: 1000 + runAsGroup: 1000 + runAsUser: 33031 + terminationGracePeriodSeconds: 1 + volumes: + - name: data + persistentVolumeClaim: + claimName: activemq-default-pvc +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: alfresco-content-services-alfresco-cs-imagemagick + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-imagemagick +spec: + replicas: 1 + selector: + matchLabels: + app: alfresco-content-services-alfresco-cs-imagemagick + component: transformers + release: alfresco-content-services + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: 77504232107df28e3fae1cd91fdc37518dfa5229d21f73e2058e526d7ad89c6b + labels: + app: alfresco-content-services-alfresco-cs-imagemagick + component: transformers + release: alfresco-content-services + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-cs-imagemagick + topologyKey: failure-domain.beta.kubernetes.io/zone + weight: 10 + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-cs-imagemagick + topologyKey: kubernetes.io/hostname + weight: 5 + containers: + - env: + - name: ACTIVEMQ_URL + value: $(BROKER_URL) + - name: ACTIVEMQ_USER + value: $(BROKER_USERNAME) + - name: ACTIVEMQ_PASSWORD + value: $(BROKER_PASSWORD) + envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-cs-imagemagick-configmap + - secretRef: + name: acs-alfresco-cs-brokersecret + image: alfresco/alfresco-imagemagick:3.0.0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 1 + httpGet: + path: /live + port: 8090 + initialDelaySeconds: 10 + periodSeconds: 20 + timeoutSeconds: 10 + name: alfresco-content-services + ports: + - containerPort: 8090 + readinessProbe: + httpGet: + path: /ready + port: 8090 + initialDelaySeconds: 20 + periodSeconds: 60 + timeoutSeconds: 10 + resources: + limits: + cpu: "4" + memory: 1000Mi + requests: + cpu: "0.5" + memory: 300Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + imagePullSecrets: + - name: quay-registry-secret + securityContext: + runAsNonRoot: true + runAsUser: 33002 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: alfresco-content-services-alfresco-cs-libreoffice + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-libreoffice +spec: + replicas: 1 + selector: + matchLabels: + app: alfresco-content-services-alfresco-cs-libreoffice + component: transformers + release: alfresco-content-services + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: c29b71fae340444799e63ddc2280c00de4c990a3dad047c0ebe70685ef7ab89c + labels: + app: alfresco-content-services-alfresco-cs-libreoffice + component: transformers + release: alfresco-content-services + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-cs-libreoffice + topologyKey: failure-domain.beta.kubernetes.io/zone + weight: 10 + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-cs-libreoffice + topologyKey: kubernetes.io/hostname + weight: 5 + containers: + - env: + - name: ACTIVEMQ_URL + value: $(BROKER_URL) + - name: ACTIVEMQ_USER + value: $(BROKER_USERNAME) + - name: ACTIVEMQ_PASSWORD + value: $(BROKER_PASSWORD) + envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-cs-libreoffice-configmap + - secretRef: + name: acs-alfresco-cs-brokersecret + image: alfresco/alfresco-libreoffice:3.0.0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 1 + httpGet: + path: /live + port: 8090 + initialDelaySeconds: 10 + periodSeconds: 20 + timeoutSeconds: 10 + name: alfresco-content-services + ports: + - containerPort: 8090 + readinessProbe: + httpGet: + path: /ready + port: 8090 + initialDelaySeconds: 20 + periodSeconds: 60 + timeoutSeconds: 10 + resources: + limits: + cpu: "4" + memory: 1000Mi + requests: + cpu: "0.5" + memory: 400Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + imagePullSecrets: + - name: quay-registry-secret + securityContext: + runAsNonRoot: true + runAsUser: 33003 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: alfresco-content-services-alfresco-cs-pdfrenderer + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-pdfrenderer +spec: + replicas: 1 + selector: + matchLabels: + app: alfresco-content-services-alfresco-cs-pdfrenderer + component: transformers + release: alfresco-content-services + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: e61eca295784c0d562e9f9e3fa9e70f707291420af8c0ac90b668d14b76b628f + labels: + app: alfresco-content-services-alfresco-cs-pdfrenderer + component: transformers + release: alfresco-content-services + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-cs-pdfrenderer + topologyKey: failure-domain.beta.kubernetes.io/zone + weight: 10 + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-cs-pdfrenderer + topologyKey: kubernetes.io/hostname + weight: 5 + containers: + - env: + - name: ACTIVEMQ_URL + value: $(BROKER_URL) + - name: ACTIVEMQ_USER + value: $(BROKER_USERNAME) + - name: ACTIVEMQ_PASSWORD + value: $(BROKER_PASSWORD) + envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-cs-pdfrenderer-configmap + - secretRef: + name: acs-alfresco-cs-brokersecret + image: alfresco/alfresco-pdf-renderer:3.0.0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 1 + httpGet: + path: /live + port: 8090 + initialDelaySeconds: 10 + periodSeconds: 20 + timeoutSeconds: 10 + name: alfresco-content-services + ports: + - containerPort: 8090 + readinessProbe: + httpGet: + path: /ready + port: 8090 + initialDelaySeconds: 20 + periodSeconds: 60 + timeoutSeconds: 10 + resources: + limits: + cpu: "2" + memory: 1000Mi + requests: + cpu: "0.25" + memory: 300Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + imagePullSecrets: + - name: quay-registry-secret + securityContext: + runAsNonRoot: true + runAsUser: 33001 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: alfresco-content-services-alfresco-cs-repository + chart: alfresco-content-services-6.0.2 + component: repository + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-repository +spec: + replicas: 1 + selector: + matchLabels: + app: alfresco-content-services-alfresco-cs-repository + component: repository + release: alfresco-content-services + strategy: + type: Recreate + template: + metadata: + annotations: + checksum/config: d955f674815090f6eeb81d81622cc02d896f030bdbf1bc89f53335ff61aae588 + checksum/secretDatabase: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + checksum/secretS3: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + labels: + app: alfresco-content-services-alfresco-cs-repository + component: repository + release: alfresco-content-services + spec: + containers: + - envFrom: + - secretRef: + name: rds-instance-output + - secretRef: + name: s3-bucket-output + - secretRef: + name: alfresco-content-services-alfresco-cs-metadata-keystore-secret + - secretRef: + name: acs-alfresco-cs-brokersecret + - secretRef: + name: alfresco-content-services-alfresco-cs-repository-secret + - configMapRef: + name: alfresco-content-services-alfresco-cs-repository-configmap + image: 754256621582.dkr.ecr.eu-west-2.amazonaws.com/hmpps-migration/alfresco-content-repository:content-9895398808-1 + imagePullPolicy: IfNotPresent + lifecycle: + preStop: + exec: + command: + - /bin/bash + - -c + - sleep 20 + livenessProbe: + failureThreshold: 1 + httpGet: + path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-live- + port: 8080 + initialDelaySeconds: 130 + periodSeconds: 20 + timeoutSeconds: 15 + name: alfresco-content-services + ports: + - containerPort: 8080 + - containerPort: 5701 + readinessProbe: + failureThreshold: 6 + httpGet: + path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-ready- + port: 8080 + initialDelaySeconds: 60 + periodSeconds: 20 + timeoutSeconds: 10 + resources: + limits: + cpu: "4" + memory: 3000Mi + requests: + cpu: "1" + memory: 1500Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + startupProbe: + failureThreshold: 10 + httpGet: + path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-ready- + port: 8080 + periodSeconds: 30 + volumeMounts: + - mountPath: /usr/local/tomcat/alf_data + name: data + subPath: alfresco-content-services/repository-data + - mountPath: /usr/local/tomcat/shared/classes/alfresco/extension/license/ + name: acs-license + imagePullSecrets: + - name: quay-registry-secret + initContainers: null + securityContext: + fsGroup: 1000 + runAsGroup: 1000 + runAsNonRoot: true + runAsUser: 33000 + volumes: + - emptyDir: + sizeLimit: 20Gi + name: data + - name: acs-license + secret: + defaultMode: 256 + secretName: alfresco-license + - configMap: + name: custom-pipeline-config + optional: true + name: custom-pipeline-config-volume + - configMap: + name: custom-rendition-config + optional: true + name: custom-rendition-config-volume + - configMap: + name: custom-mimetype-config + optional: true + name: custom-mimetype-config-volume + - configMap: + name: custom-queryset-config + optional: true + name: custom-queryset-config-volume +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + checkov.io/skip1: CKV_K8S_23=Requires APPS-1832 first + checkov.io/skip2: CKV_K8S_40=Requires APPS-1832 first + labels: + app: alfresco-content-services-alfresco-cs-share + chart: alfresco-content-services-6.0.2 + component: share + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-share +spec: + replicas: 1 + selector: + matchLabels: + app: alfresco-content-services-alfresco-cs-share + component: share + release: alfresco-content-services + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: 428c2ba2026a88cc7763ac0c1772943157c8a4822def1efc76743b72b74a19f8 + labels: + app: alfresco-content-services-alfresco-cs-share + component: share + release: alfresco-content-services + spec: + containers: + - envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-cs-share-configmap + image: 754256621582.dkr.ecr.eu-west-2.amazonaws.com/hmpps-migration/alfresco-share:share-9895398808-1 + imagePullPolicy: IfNotPresent + lifecycle: + preStop: + exec: + command: + - /bin/bash + - -c + - sleep 20 + livenessProbe: + failureThreshold: 1 + httpGet: + path: /share + port: 8080 + initialDelaySeconds: 200 + periodSeconds: 20 + timeoutSeconds: 10 + name: alfresco-content-services + ports: + - containerPort: 8080 + readinessProbe: + httpGet: + path: /share + port: 8080 + initialDelaySeconds: 60 + periodSeconds: 20 + timeoutSeconds: 15 + resources: + limits: + cpu: "4" + memory: 2000Mi + requests: + cpu: "1" + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - NET_RAW + - ALL + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + imagePullSecrets: + - name: quay-registry-secret + securityContext: + runAsNonRoot: true + runAsUser: 65534 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: alfresco-content-services-alfresco-cs-tika + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-tika +spec: + replicas: 1 + selector: + matchLabels: + app: alfresco-content-services-alfresco-cs-tika + component: transformers + release: alfresco-content-services + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: 4ce771746eed38f9cac09952793879c40330a2f75a60d4008c84810fe870eb58 + labels: + app: alfresco-content-services-alfresco-cs-tika + component: transformers + release: alfresco-content-services + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-cs-tika + topologyKey: failure-domain.beta.kubernetes.io/zone + weight: 10 + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-cs-tika + topologyKey: kubernetes.io/hostname + weight: 5 + containers: + - env: + - name: ACTIVEMQ_URL + value: $(BROKER_URL) + - name: ACTIVEMQ_USER + value: $(BROKER_USERNAME) + - name: ACTIVEMQ_PASSWORD + value: $(BROKER_PASSWORD) + envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-cs-tika-configmap + - secretRef: + name: acs-alfresco-cs-brokersecret + image: alfresco/alfresco-tika:3.0.0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 1 + httpGet: + path: /live + port: 8090 + initialDelaySeconds: 60 + periodSeconds: 20 + timeoutSeconds: 10 + name: alfresco-content-services + ports: + - containerPort: 8090 + readinessProbe: + httpGet: + path: /ready + port: 8090 + initialDelaySeconds: 60 + periodSeconds: 60 + timeoutSeconds: 10 + resources: + limits: + cpu: "2" + memory: 2Gi + requests: + cpu: "0.25" + memory: 600Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + imagePullSecrets: + - name: quay-registry-secret + securityContext: + runAsNonRoot: true + runAsUser: 33004 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: alfresco-content-services-alfresco-cs-transform-misc + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-transform-misc +spec: + replicas: 1 + selector: + matchLabels: + app: alfresco-content-services-alfresco-cs-transform-misc + component: transformers + release: alfresco-content-services + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: c44dc1b790fba68833f95ffeecc6878f057f3dd629b3a44a44b2a8ad1a517119 + labels: + app: alfresco-content-services-alfresco-cs-transform-misc + component: transformers + release: alfresco-content-services + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-cs-transform-misc + topologyKey: failure-domain.beta.kubernetes.io/zone + weight: 10 + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-cs-transform-misc + topologyKey: kubernetes.io/hostname + weight: 5 + containers: + - env: + - name: ACTIVEMQ_URL + value: $(BROKER_URL) + - name: ACTIVEMQ_USER + value: $(BROKER_USERNAME) + - name: ACTIVEMQ_PASSWORD + value: $(BROKER_PASSWORD) + envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-cs-transform-misc-configmap + - secretRef: + name: acs-alfresco-cs-brokersecret + image: alfresco/alfresco-transform-misc:3.0.0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 1 + httpGet: + path: /live + port: 8090 + initialDelaySeconds: 10 + periodSeconds: 20 + timeoutSeconds: 10 + name: alfresco-content-services + ports: + - containerPort: 8090 + readinessProbe: + httpGet: + path: /ready + port: 8090 + initialDelaySeconds: 20 + periodSeconds: 60 + timeoutSeconds: 10 + resources: + limits: + cpu: "2" + memory: 1000Mi + requests: + cpu: "0.25" + memory: 300Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + imagePullSecrets: + - name: quay-registry-secret + securityContext: + runAsNonRoot: true + runAsUser: 33006 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: alfresco-content-services-alfresco-filestore + chart: alfresco-content-services-6.0.2 + component: transformers + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-filestore +spec: + replicas: 1 + selector: + matchLabels: + app: alfresco-content-services-alfresco-filestore + component: transformers + release: alfresco-content-services + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: 934e365b21db873604fd6ac49595dfd1b1f60f86622c70ed3203cc9c3b4ee0bd + labels: + app: alfresco-content-services-alfresco-filestore + component: transformers + release: alfresco-content-services + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-filestore + topologyKey: failure-domain.beta.kubernetes.io/zone + weight: 10 + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-filestore + topologyKey: kubernetes.io/hostname + weight: 5 + containers: + - envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-filestore-configmap + image: quay.io/alfresco/alfresco-shared-file-store:2.0.2 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 1 + httpGet: + path: /live + port: 8099 + initialDelaySeconds: 10 + periodSeconds: 20 + timeoutSeconds: 10 + name: alfresco-content-services + ports: + - containerPort: 8099 + readinessProbe: + httpGet: + path: /ready + port: 8099 + initialDelaySeconds: 20 + periodSeconds: 60 + timeoutSeconds: 10 + resources: + limits: + cpu: "2" + memory: 1000Mi + requests: + cpu: "0.25" + memory: 200Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp/Alfresco + name: data + subPath: alfresco-content-services/filestore-data + imagePullSecrets: + - name: quay-registry-secret + securityContext: + fsGroup: 1000 + runAsGroup: 1000 + runAsUser: 33030 + volumes: + - name: data + persistentVolumeClaim: + claimName: filestore-default-pvc +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: alfresco-content-services-alfresco-router + chart: alfresco-content-services-6.0.2 + component: transformrouter + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-router +spec: + replicas: 1 + selector: + matchLabels: + app: alfresco-content-services-alfresco-router + component: transformrouter + release: alfresco-content-services + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: fb79f6128a708bde1b33453f31a1256968707e33ada087e455905c133a62c1f1 + checksum/config-routes: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + labels: + app: alfresco-content-services-alfresco-router + component: transformrouter + release: alfresco-content-services + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-router + topologyKey: failure-domain.beta.kubernetes.io/zone + weight: 10 + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - alfresco-content-services-alfresco-router + topologyKey: kubernetes.io/hostname + weight: 5 + containers: + - env: + - name: ACTIVEMQ_URL + value: $(BROKER_URL) + - name: ACTIVEMQ_USER + value: $(BROKER_USERNAME) + - name: ACTIVEMQ_PASSWORD + value: $(BROKER_PASSWORD) + envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-router-configmap + - secretRef: + name: acs-alfresco-cs-brokersecret + image: quay.io/alfresco/alfresco-transform-router:2.0.0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 1 + httpGet: + path: /actuator/health + port: 8095 + initialDelaySeconds: 140 + periodSeconds: 120 + timeoutSeconds: 60 + name: alfresco-content-services + ports: + - containerPort: 8095 + readinessProbe: + httpGet: + path: /actuator/health + port: 8095 + initialDelaySeconds: 140 + periodSeconds: 60 + timeoutSeconds: 10 + resources: + limits: + cpu: "1" + memory: 512Mi + requests: + cpu: "0.25" + memory: 300Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + imagePullSecrets: + - name: quay-registry-secret + securityContext: + runAsNonRoot: true + runAsUser: 33016 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: alfresco-search-enterprise + app.kubernetes.io/version: 3.3.0 + helm.sh/chart: alfresco-search-enterprise-1.2.0 + name: alfresco-content-services-alfresco-search-enterprise-content +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: alfresco-search-enterprise + template: + metadata: + annotations: + checksum/secret-broker: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + checksum/secret-database: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + checksum/secret-elasticsearch: 33982b5f025a1ffd247c4b02293a24e8211a8efdf19d96514ead79c07c330c8d + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: alfresco-search-enterprise + spec: + containers: + - env: + - name: SPRING_ACTIVEMQ_BROKERURL + value: $(BROKER_URL) + - name: SPRING_ACTIVEMQ_USER + value: $(BROKER_USERNAME) + - name: SPRING_ACTIVEMQ_PASSWORD + value: $(BROKER_PASSWORD) + - name: SPRING_ELASTICSEARCH_REST_USERNAME + valueFrom: + secretKeyRef: + key: ELASTICSEARCH_USERNAME + name: alfresco-content-services-alfresco-search-enterprise-elasticsearch-secret + - name: SPRING_ELASTICSEARCH_REST_PASSWORD + valueFrom: + secretKeyRef: + key: ELASTICSEARCH_PASSWORD + name: alfresco-content-services-alfresco-search-enterprise-elasticsearch-secret + envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-search-enterprise-configmap + - secretRef: + name: acs-alfresco-cs-brokersecret + image: quay.io/alfresco/alfresco-elasticsearch-live-indexing-content:3.2.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 300 + timeoutSeconds: 60 + name: alfresco-search-enterprise-content + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 60 + timeoutSeconds: 60 + resources: + limits: + cpu: "2" + memory: 2048Mi + requests: + cpu: "0.5" + memory: 256Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - NET_RAW + - ALL + runAsNonRoot: true + imagePullSecrets: + - name: quay-registry-secret + securityContext: + fsGroupChangePolicy: OnRootMismatch + runAsNonRoot: true + runAsUser: 33099 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: alfresco-search-enterprise + app.kubernetes.io/version: 3.3.0 + helm.sh/chart: alfresco-search-enterprise-1.2.0 + name: alfresco-content-services-alfresco-search-enterprise-mediation +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: alfresco-search-enterprise + template: + metadata: + annotations: + checksum/secret-broker: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + checksum/secret-database: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + checksum/secret-elasticsearch: 33982b5f025a1ffd247c4b02293a24e8211a8efdf19d96514ead79c07c330c8d + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: alfresco-search-enterprise + spec: + containers: + - env: + - name: SPRING_ACTIVEMQ_BROKERURL + value: $(BROKER_URL) + - name: SPRING_ACTIVEMQ_USER + value: $(BROKER_USERNAME) + - name: SPRING_ACTIVEMQ_PASSWORD + value: $(BROKER_PASSWORD) + - name: SPRING_ELASTICSEARCH_REST_USERNAME + valueFrom: + secretKeyRef: + key: ELASTICSEARCH_USERNAME + name: alfresco-content-services-alfresco-search-enterprise-elasticsearch-secret + - name: SPRING_ELASTICSEARCH_REST_PASSWORD + valueFrom: + secretKeyRef: + key: ELASTICSEARCH_PASSWORD + name: alfresco-content-services-alfresco-search-enterprise-elasticsearch-secret + envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-search-enterprise-configmap + - secretRef: + name: acs-alfresco-cs-brokersecret + image: quay.io/alfresco/alfresco-elasticsearch-live-indexing-mediation:3.2.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 300 + timeoutSeconds: 60 + name: alfresco-search-enterprise-mediation + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 60 + timeoutSeconds: 60 + resources: + limits: + cpu: "2" + memory: 2048Mi + requests: + cpu: "0.5" + memory: 256Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - NET_RAW + - ALL + runAsNonRoot: true + imagePullSecrets: + - name: quay-registry-secret + securityContext: + fsGroupChangePolicy: OnRootMismatch + runAsNonRoot: true + runAsUser: 33099 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: alfresco-search-enterprise + app.kubernetes.io/version: 3.3.0 + helm.sh/chart: alfresco-search-enterprise-1.2.0 + name: alfresco-content-services-alfresco-search-enterprise-metadata +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: alfresco-search-enterprise + template: + metadata: + annotations: + checksum/secret-broker: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + checksum/secret-database: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + checksum/secret-elasticsearch: 33982b5f025a1ffd247c4b02293a24e8211a8efdf19d96514ead79c07c330c8d + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: alfresco-search-enterprise + spec: + containers: + - env: + - name: SPRING_ACTIVEMQ_BROKERURL + value: $(BROKER_URL) + - name: SPRING_ACTIVEMQ_USER + value: $(BROKER_USERNAME) + - name: SPRING_ACTIVEMQ_PASSWORD + value: $(BROKER_PASSWORD) + - name: SPRING_ELASTICSEARCH_REST_USERNAME + valueFrom: + secretKeyRef: + key: ELASTICSEARCH_USERNAME + name: alfresco-content-services-alfresco-search-enterprise-elasticsearch-secret + - name: SPRING_ELASTICSEARCH_REST_PASSWORD + valueFrom: + secretKeyRef: + key: ELASTICSEARCH_PASSWORD + name: alfresco-content-services-alfresco-search-enterprise-elasticsearch-secret + envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-search-enterprise-configmap + - secretRef: + name: acs-alfresco-cs-brokersecret + image: quay.io/alfresco/alfresco-elasticsearch-live-indexing-metadata:3.2.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 300 + timeoutSeconds: 60 + name: alfresco-search-enterprise-metadata + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 60 + timeoutSeconds: 60 + resources: + limits: + cpu: "2" + memory: 2048Mi + requests: + cpu: "0.5" + memory: 256Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - NET_RAW + - ALL + runAsNonRoot: true + imagePullSecrets: + - name: quay-registry-secret + securityContext: + fsGroupChangePolicy: OnRootMismatch + runAsNonRoot: true + runAsUser: 33099 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: alfresco-search-enterprise + app.kubernetes.io/version: 3.3.0 + helm.sh/chart: alfresco-search-enterprise-1.2.0 + name: alfresco-content-services-alfresco-search-enterprise-path +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: alfresco-search-enterprise + template: + metadata: + annotations: + checksum/secret-broker: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + checksum/secret-database: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b + checksum/secret-elasticsearch: 33982b5f025a1ffd247c4b02293a24e8211a8efdf19d96514ead79c07c330c8d + labels: + app.kubernetes.io/instance: alfresco-content-services + app.kubernetes.io/name: alfresco-search-enterprise + spec: + containers: + - env: + - name: SPRING_ACTIVEMQ_BROKERURL + value: $(BROKER_URL) + - name: SPRING_ACTIVEMQ_USER + value: $(BROKER_USERNAME) + - name: SPRING_ACTIVEMQ_PASSWORD + value: $(BROKER_PASSWORD) + - name: SPRING_ELASTICSEARCH_REST_USERNAME + valueFrom: + secretKeyRef: + key: ELASTICSEARCH_USERNAME + name: alfresco-content-services-alfresco-search-enterprise-elasticsearch-secret + - name: SPRING_ELASTICSEARCH_REST_PASSWORD + valueFrom: + secretKeyRef: + key: ELASTICSEARCH_PASSWORD + name: alfresco-content-services-alfresco-search-enterprise-elasticsearch-secret + envFrom: + - configMapRef: + name: alfresco-content-services-alfresco-search-enterprise-configmap + - secretRef: + name: acs-alfresco-cs-brokersecret + image: quay.io/alfresco/alfresco-elasticsearch-live-indexing-path:3.2.0 + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 300 + timeoutSeconds: 60 + name: alfresco-search-enterprise-path + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + httpGet: + path: /actuator/health + port: http + initialDelaySeconds: 60 + timeoutSeconds: 60 + resources: + limits: + cpu: "2" + memory: 2048Mi + requests: + cpu: "0.5" + memory: 256Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - NET_RAW + - ALL + runAsNonRoot: true + imagePullSecrets: + - name: quay-registry-secret + securityContext: + fsGroupChangePolicy: OnRootMismatch + runAsNonRoot: true + runAsUser: 33099 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + external-dns.alpha.kubernetes.io/aws-weight: "100" + external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-alfresco-cs-repository-hmpps-delius-alfrsco-poc-green + kubernetes.io/ingress.class: default + nginx.ingress.kubernetes.io/affinity: cookie + nginx.ingress.kubernetes.io/proxy-body-size: 5g + nginx.ingress.kubernetes.io/server-snippet: | + location ~ ^/.*/(wc)?s(ervice)?/api/solr/.*$ {return 403;} + location ~ ^/.*/proxy/.*/api/solr/.*$ {return 403;} + location ~ ^/.*/-default-/proxy/.*/api/.*$ {return 403;} + location ~ ^/.*/s/prometheus$ {return 403;} + nginx.ingress.kubernetes.io/session-cookie-hash: sha1 + nginx.ingress.kubernetes.io/session-cookie-name: alf_affinity_route + nginx.ingress.kubernetes.io/whitelist-source-range: 35.176.126.163,35.178.162.73,52.56.195.113,35.178.209.113,3.8.51.207,35.177.252.54,35.176.93.186/32,35.177.125.252/32,35.177.137.160/32,81.134.202.29/32,51.149.250.0/24,51.149.251.0/24,213.121.161.112/28,217.33.148.210/32,13.43.9.198/32,13.42.163.245/32,18.132.208.127/32,51.149.249.0/29,51.149.249.32/29,194.33.192.0/25,194.33.193.0/25,194.33.196.0/25,194.33.197.0/25,195.59.75.0/24,194.33.248.0/29,194.33.249.0/29,62.25.106.209/32,195.92.40.49/32,62.25.109.197/32,195.92.38.16/28,212.137.36.230/32,78.33.10.50/31,78.33.10.52/30,78.33.10.56/30,78.33.10.60/32,78.33.32.99/32,78.33.32.100/30,78.33.32.104/30,78.33.32.108/32,83.98.63.176/29,194.75.210.216/29,217.138.45.109/32,217.138.45.110/32,34.241.149.106/32,52.210.79.20/32,54.228.134.38/32 + labels: + app: alfresco-content-services-alfresco-cs-repository + chart: alfresco-content-services-6.0.2 + component: repository + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-repository +spec: + ingressClassName: default + rules: + - host: hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk + http: + paths: + - backend: + service: + name: alfresco-content-services-alfresco-cs-repository + port: + number: 80 + path: / + pathType: Prefix + - backend: + service: + name: alfresco-content-services-alfresco-cs-repository + port: + number: 80 + path: /api-explorer + pathType: Prefix + tls: + - hosts: + - hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + external-dns.alpha.kubernetes.io/aws-weight: "100" + external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-alfresco-cs-share-hmpps-delius-alfrsco-poc-green + kubernetes.io/ingress.class: default + nginx.ingress.kubernetes.io/affinity: cookie + nginx.ingress.kubernetes.io/proxy-body-size: 5g + nginx.ingress.kubernetes.io/server-snippet: | + location ~ ^/.*/(wc)?s(ervice)?/api/solr/.*$ {return 403;} + location ~ ^/.*/proxy/.*/api/solr/.*$ {return 403;} + location ~ ^/.*/-default-/proxy/.*/api/.*$ {return 403;} + location ~ ^/.*/s/prometheus$ {return 403;} + nginx.ingress.kubernetes.io/session-cookie-expires: "604800" + nginx.ingress.kubernetes.io/session-cookie-max-age: "604800" + nginx.ingress.kubernetes.io/session-cookie-name: alfrescoShare + nginx.ingress.kubernetes.io/session-cookie-path: /share + nginx.ingress.kubernetes.io/whitelist-source-range: 35.176.126.163,35.178.162.73,52.56.195.113,35.178.209.113,3.8.51.207,35.177.252.54,35.176.93.186/32,35.177.125.252/32,35.177.137.160/32,81.134.202.29/32,51.149.250.0/24,51.149.251.0/24,213.121.161.112/28,217.33.148.210/32,13.43.9.198/32,13.42.163.245/32,18.132.208.127/32,51.149.249.0/29,51.149.249.32/29,194.33.192.0/25,194.33.193.0/25,194.33.196.0/25,194.33.197.0/25,195.59.75.0/24,194.33.248.0/29,194.33.249.0/29,62.25.106.209/32,195.92.40.49/32,62.25.109.197/32,195.92.38.16/28,212.137.36.230/32,78.33.10.50/31,78.33.10.52/30,78.33.10.56/30,78.33.10.60/32,78.33.32.99/32,78.33.32.100/30,78.33.32.104/30,78.33.32.108/32,83.98.63.176/29,194.75.210.216/29,217.138.45.109/32,217.138.45.110/32,34.241.149.106/32,52.210.79.20/32,54.228.134.38/32 + labels: + app: alfresco-content-services-alfresco-cs-share + chart: alfresco-content-services-6.0.2 + component: share + heritage: Helm + release: alfresco-content-services + name: alfresco-content-services-alfresco-cs-share +spec: + ingressClassName: default + rules: + - host: share.hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk + http: + paths: + - backend: + service: + name: alfresco-content-services-alfresco-cs-share + port: + number: 80 + path: / + pathType: Prefix + - backend: + service: + name: alfresco-content-services-alfresco-cs-share + port: + number: 80 + path: /share/page/ + pathType: Prefix + tls: + - hosts: + - share.hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk + secretName: share-ingress-cert diff --git a/kustomize/poc/patch-ingress-repository.yaml b/kustomize/poc/patch-ingress-repository.yaml new file mode 100644 index 0000000..6111c47 --- /dev/null +++ b/kustomize/poc/patch-ingress-repository.yaml @@ -0,0 +1,29 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: alfresco-content-services-alfresco-cs-repository + annotations: + external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-alfresco-cs-repository-hmpps-delius-alfrsco-poc-green + nginx.ingress.kubernetes.io/whitelist-source-range: placeholder +spec: + rules: + - host: hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk + http: + paths: + - backend: + service: + name: alfresco-content-services-alfresco-cs-repository + port: + number: 80 + path: / + pathType: Prefix + - backend: + service: + name: alfresco-content-services-alfresco-cs-repository + port: + number: 80 + path: /api-explorer + pathType: Prefix + tls: + - hosts: + - hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk diff --git a/kustomize/poc/patch-ingress-share.yaml b/kustomize/poc/patch-ingress-share.yaml new file mode 100644 index 0000000..05e61d4 --- /dev/null +++ b/kustomize/poc/patch-ingress-share.yaml @@ -0,0 +1,30 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: alfresco-content-services-alfresco-cs-share + annotations: + external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-alfresco-cs-share-hmpps-delius-alfrsco-poc-green + nginx.ingress.kubernetes.io/whitelist-source-range: placeholder +spec: + rules: + - host: share.hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk + http: + paths: + - backend: + service: + name: alfresco-content-services-alfresco-cs-share + port: + number: 80 + path: / + pathType: Prefix + - backend: + service: + name: alfresco-content-services-alfresco-cs-share + port: + number: 80 + path: /share/page/ + pathType: Prefix + tls: + - hosts: + - share.hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk + secretName: share-ingress-cert diff --git a/kustomize/poc/values.yaml b/kustomize/poc/values.yaml new file mode 100644 index 0000000..a948d31 --- /dev/null +++ b/kustomize/poc/values.yaml @@ -0,0 +1,10 @@ +# this file overrides values defined in ./values.yaml +repository: + replicaCount: 1 +share: + replicaCount: 1 +database: + url: jdbc:postgresql://cloud-platform-f05612b0b7cdbf33.cdwm328dlye6.eu-west-2.rds.amazonaws.com:5432/alfresco +externalHost: hmpps-delius-alfrsco-poc.apps.live.cloud-platform.service.justice.gov.uk +externalProtocol: https +externalPort: 443 diff --git a/makefile b/makefile index 80de682..7c7672a 100644 --- a/makefile +++ b/makefile @@ -1,16 +1,15 @@ # Define the Helm chart name and release name CHART_NAME := alfresco-content-services -VALUES := values.yaml -VALUES_ENV := values_$(ENV).yaml DEBUG := false ATOMIC := true # Helm upgrade/install command helm_upgrade: $(eval BUCKET_NAME := $(shell kubectl get secrets s3-bucket-output -o jsonpath='{.data.BUCKET_NAME}' | base64 -d)) - + @SECRET=$$(kubectl get secrets alfresco-content-services-alfresco-repository-properties-secret -o jsonpath='{.data.alfresco-global\.properties}' | base64 -d | awk '{print substr($$0, 19)}'); \ if [ -z "$$SECRET" ]; then \ + echo "No secret found, generating a new one"; \ SECRET=$$(openssl rand -base64 20); \ fi; \ if [ "$(ENV)" = "poc" ]; then \ @@ -21,8 +20,10 @@ helm_upgrade: echo "Using namespace: $${NAMESPACE}"; \ if [ "$(DEBUG)" = "true" ]; then \ DEBUG_FLAG="--debug"; \ + HELM_POST_RENDERER_ARGS="-d true"; \ else \ DEBUG_FLAG=""; \ + HELM_POST_RENDERER_ARGS="-d false"; \ fi; \ if [ "$(ATOMIC)" = "true" ]; then \ ATOMIC_FLAG="--atomic"; \ @@ -30,11 +31,20 @@ helm_upgrade: ATOMIC_FLAG=""; \ fi; \ echo "BUCKET_NAME: $(BUCKET_NAME)"; \ - helm upgrade --install $(CHART_NAME) ./$(CHART_NAME) --namespace $${NAMESPACE} \ - --values=./$(CHART_NAME)/$(VALUES) --values=./$(CHART_NAME)/$(VALUES_ENV) \ + cd ./kustomize/$${ENV}; \ + extracted=$$(yq 'join(",")' ./allowlist.yaml); \ + echo "Whitelist: $$extracted"; \ + export extracted=$$extracted; \ + yq '.metadata.annotations."nginx.ingress.kubernetes.io/whitelist-source-range" = strenv(extracted)' -i ./patch-ingress-repository.yaml; \ + yq '.metadata.annotations."nginx.ingress.kubernetes.io/whitelist-source-range" = strenv(extracted)' -i ./patch-ingress-share.yaml; \ + helm repo add alfresco https://kubernetes-charts.alfresco.com/stable --force-update; \ + helm upgrade --install $(CHART_NAME) alfresco/alfresco-content-services --version 6.0.2 --namespace $${NAMESPACE} \ + --values=../base/values.yaml --values=./values.yaml \ --set s3connector.config.bucketName=$(BUCKET_NAME) \ - --set global.tracking.sharedsecret=$${SECRET} $${ATOMIC_FLAG} $${DEBUG_FLAG} --wait --timeout=20m - + --set global.tracking.sharedsecret=$${SECRET} $${ATOMIC_FLAG} $${DEBUG_FLAG} --wait --timeout=20m \ + --post-renderer ../kustomizer.sh --post-renderer-args "$${HELM_POST_RENDERER_ARGS}"; \ + yq '.metadata.annotations."nginx.ingress.kubernetes.io/whitelist-source-range" = "placeholder"' -i ./patch-ingress-repository.yaml; \ + yq '.metadata.annotations."nginx.ingress.kubernetes.io/whitelist-source-range" = "placeholder"' -i ./patch-ingress-share.yaml # Default target .PHONY: default diff --git a/alfresco-content-services/charts/activemq/charts/alfresco-common/values.yaml b/test.yml similarity index 100% rename from alfresco-content-services/charts/activemq/charts/alfresco-common/values.yaml rename to test.yml