helm icon indicating copy to clipboard operation
helm copied to clipboard

fix: improve handling of config file

Open wrenix opened this issue 1 year ago • 14 comments

Split of #478

Move all the configfiles for nginx, nextcloud, htaccess out of the kubernetes-resources as single file beside the helmchart and load them with helm function into the kubernetes-resources.

benefits:

  • config files are readible (still support of golang/sring/helm-templates)
  • logic of which defaultConfigs is loaded is generic (is an range over the map)

wrenix avatar Nov 20 '23 10:11 wrenix

Please detail in the description of this PR what you're doing and why to make it easier to review. Ideally, please use the PR template.

jessebot avatar Nov 21 '23 12:11 jessebot

Done

wrenix avatar Nov 22 '23 00:11 wrenix

@jessebot do you like to review?

wrenix avatar Nov 27 '23 08:11 wrenix

rebased after https://github.com/nextcloud/helm/pull/393 was merged

ci lint says:

Update Complete. ⎈Happy Helming!⎈
Saving 3 charts
Downloading postgresql from repo oci://registry-1.docker.io/bitnamicharts
Downloading mariadb from repo oci://registry-1.docker.io/bitnamicharts
Downloading redis from repo oci://registry-1.docker.io/bitnamicharts
Deleting outdated charts
Pulled: registry-1.docker.io/bitnamicharts/postgresql:12.12.10
Digest: sha256:179d5c6d017298bb9ab868321bcacb1a9efe5eb8224902f89f8693c69a72e428
Pulled: registry-1.docker.io/bitnamicharts/mariadb:12.2.9
Digest: sha256:834d78c385839bac4a7ec8cd0d25adea6b9a3324ef8c7e284e59d9e33c1e96b6
Pulled: registry-1.docker.io/bitnamicharts/redis:17.13.2
Digest: sha256:b7892f0842f1758bb35c61aaccdbb2ca30a7ff234477a2b270de31db8c0920e0
Linting chart "nextcloud => (version: \"4.5.3\", path: \"charts/nextcloud\")"
Checking chart "nextcloud => (version: \"4.5.3\", path: \"charts/nextcloud\")" for a version bump...
Old chart version: 4.4.0
New chart version: 4.5.3
Chart version ok.
Validating /home/wrenix/src/github.com/nextcloud/helm/charts/nextcloud/Chart.yaml...
Validation success! 👍
Validating maintainers...

Linting chart with values file "charts/nextcloud/ci/ct-all-enabled-values.yaml"...

==> Linting charts/nextcloud

1 chart(s) linted, 0 chart(s) failed

Linting chart with values file "charts/nextcloud/ci/ct-empty-values.yaml"...

==> Linting charts/nextcloud

1 chart(s) linted, 0 chart(s) failed

Linting chart with values file "charts/nextcloud/ci/ct-specials-values.yaml"...

==> Linting charts/nextcloud

1 chart(s) linted, 0 chart(s) failed

------------------------------------------------------------------------------------------------------------------------
 ✔︎ nextcloud => (version: "4.5.3", path: "charts/nextcloud")
------------------------------------------------------------------------------------------------------------------------
All charts linted successfully

wrenix avatar Nov 30 '23 11:11 wrenix

rebased and version bump again

wrenix avatar Dec 08 '23 17:12 wrenix

It looks like there's an error after the nginx default config PR was merged.

https://github.com/nextcloud/helm/actions/runs/7144375839/job/19639651937?pr=480#step:9:219

jessebot avatar Dec 14 '23 17:12 jessebot

rebased again and set an valid nginx.config.custom in charts/nextcloud/ci/ct-specials-values.yaml.

wrenix avatar Dec 19 '23 21:12 wrenix

rebased and version dump again

wrenix avatar Dec 25 '23 10:12 wrenix

rebased (after #520) and version dump again

wrenix avatar Feb 04 '24 17:02 wrenix

huhu @provokateurin do you like to take a look here too?

wrenix avatar Feb 05 '24 07:02 wrenix

This is the last for nd importend PR from my big bunch ;) Thanks so much till here.

wrenix avatar Feb 05 '24 12:02 wrenix

I'll have a look soon

provokateurin avatar Feb 05 '24 12:02 provokateurin

I do not know, why it / i close this

wrenix avatar Mar 31 '24 21:03 wrenix

Any update?

I found a not good default value for nginx, which i like to improve (and then i good a merge conflict)

wrenix avatar Apr 19 '24 10:04 wrenix

Hi and sorry for the super long delay. In principle I agree with the changes, I just find it hard to review as it is not so easy to verify nothing in the config file was actually changed. I'll try to give it a review soon.

provokateurin avatar Jun 14 '24 21:06 provokateurin

merged main and kicking off tests again, this time with new database tests :)

jessebot avatar Jul 22 '24 08:07 jessebot

OK, now that I've finally spent some time looking at this, my first new request is that you rename the .gotmpl file extensions to be .tpl as that seems to be standard. I'm gonna point my Argo CD ApplicationSet at this branch and if everything is working, we'll call this good to go and merge it. If anything breaks, I may kindly ping you @wrenix 🙏

jessebot avatar Jul 22 '24 11:07 jessebot

I've tested this and it looks good to me :) Please still update the gotmpl file extensions to be tpl though, just for consistency.

jessebot avatar Jul 22 '24 12:07 jessebot

Nice stuff, let's get this merged finally :)

provokateurin avatar Jul 22 '24 14:07 provokateurin

@wrenix when you get a chance, could you please update the file extensions to tpl for the config files? Then we can get this merged :)

jessebot avatar Jul 23 '24 07:07 jessebot

@provokateurin, since wrenix is a little busy right now, how about after the tests run (assuming they are all valid), we merge this, and then in #464, I can refactor it to use the new format that wrenix has introduced here, and then also change the file extensions there, so all the tpl files are consistent?

Edit: I would be squashing and merging this, to prevent history from being weird :)

jessebot avatar Jul 24 '24 07:07 jessebot

I think the file extensions should be fixed in this PR, but other than that it sounds good.

provokateurin avatar Jul 24 '24 07:07 provokateurin

I think the file extensions should be fixed in this PR, but other than that it sounds good.

Turns out since maintainers were given access to the PR, I was actually able to clone wrenix's fork and just update the extensions locally and push them up 👍

jessebot avatar Jul 24 '24 07:07 jessebot

oh sorry, i have overseen that review. And it is merged, now. Nice and thank you for patching (the extension).

wrenix avatar Aug 11 '24 19:08 wrenix