From 55b22d2225fa10b71adffec87fc976829ccee862 Mon Sep 17 00:00:00 2001 From: Cyril Jouve Date: Tue, 2 May 2023 21:32:54 +0800 Subject: [PATCH] add `extraDeploy` to add arbitrary objects to the release (#441) Signed-off-by: Cyril Jouve ### Description of the change add a new value `extraDeploy` to add arbitrary resources inspired by bitnami charts ([example](https://github.com/bitnami/charts/blob/main/bitnami/postgresql/values.yaml#L58) ### Benefits with the change, I can deploy additional resources and keep them consistent with the chart (reuse macro, same labels, etc)., same workflow (helm upgrade), etc ### Possible drawbacks ### Additional information ### Checklist - [x] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm) Co-authored-by: pat-s Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/441 Reviewed-by: pat-s Reviewed-by: luhahn Reviewed-by: justusbunsi Co-authored-by: Cyril Jouve Co-committed-by: Cyril Jouve --- README.md | 3 ++- templates/gitea/extra-list.yaml | 8 ++++++++ values.yaml | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 templates/gitea/extra-list.yaml diff --git a/README.md b/README.md index 37952c7..34f7e99 100644 --- a/README.md +++ b/README.md @@ -756,7 +756,7 @@ gitea: | Name | Description | Value | | ------------------------------------------------------- | ---------------------------------------------------------------- | ------- | | `postgresql.enabled` | Enable PostgreSQL | `true` | -| `postgresql.global.postgresql.auth.password` | Password for the "Gitea" user (overrides `auth.password`) | `gitea` | +| `postgresql.global.postgresql.auth.password` | Password for the `gitea` user (overrides `auth.password`) | `gitea` | | `postgresql.global.postgresql.auth.database` | Name for a custom database to create (overrides `auth.database`) | `gitea` | | `postgresql.global.postgresql.auth.username` | Name for a custom user to create (overrides `auth.username`) | `gitea` | | `postgresql.global.postgresql.service.ports.postgresql` | PostgreSQL service port (overrides `service.ports.postgresql`) | `5432` | @@ -770,6 +770,7 @@ gitea: | `test.enabled` | Set it to false to disable test-connection Pod. | `true` | | `test.image.name` | Image name for the wget container used in the test-connection Pod. | `busybox` | | `test.image.tag` | Image tag for the wget container used in the test-connection Pod. | `latest` | +| `extraDeploy` | Array of extra objects to deploy with the release | `[]` | ## Contributing diff --git a/templates/gitea/extra-list.yaml b/templates/gitea/extra-list.yaml new file mode 100644 index 0000000..62c0aca --- /dev/null +++ b/templates/gitea/extra-list.yaml @@ -0,0 +1,8 @@ +{{- range .Values.extraDeploy }} +--- +{{- if typeIs "string" . }} + {{- tpl . $ }} +{{- else }} + {{- tpl (. | toYaml) $ }} +{{- end }} +{{- end }} diff --git a/values.yaml b/values.yaml index de358c6..4e3e085 100644 --- a/values.yaml +++ b/values.yaml @@ -450,7 +450,7 @@ memcached: ## @section PostgreSQL # ## @param postgresql.enabled Enable PostgreSQL -## @param postgresql.global.postgresql.auth.password Password for the "gitea" user (overrides `auth.password`) +## @param postgresql.global.postgresql.auth.password Password for the `gitea` user (overrides `auth.password`) ## @param postgresql.global.postgresql.auth.database Name for a custom database to create (overrides `auth.database`) ## @param postgresql.global.postgresql.auth.username Name for a custom user to create (overrides `auth.username`) ## @param postgresql.global.postgresql.service.ports.postgresql PostgreSQL service port (overrides `service.ports.postgresql`) @@ -483,3 +483,7 @@ test: image: name: busybox tag: latest + +## @param extraDeploy Array of extra objects to deploy with the release +## +extraDeploy: []