Integrate NOVUM-RGI chart into the official helm chart. #7

Merged
techknowlogick merged 25 commits from luhahn/helm-chart:master into master 2020-08-23 17:56:58 +00:00
Member

As discussed in Discord here's my PR to migrate NOVUM-RGI chart into the official helm chart.

First of all, i know that's a lot of stuff. But I gave jfeltens original chart a big rework since a lot of the approaches are deprecated.

What has changed:

  • app.ini is almost completly configurable with the values
  • gitea will be deployed as a statefulset, which is much easier than handling the PVC directly (and also helm best practice)
  • requirements.yaml is deprecated and replaced with Charts.yaml dependencies:
  • Postgresql, Mysql and Memcached are included as helm dependencies. This enables us to use the initialization in the original charts instead of caring in hard coded pods.
  • MariaDB was abandoned, sorry for that. But I can easily readd this again, if desired.
  • Replaced the README.md with NOVUM-RGI Readme md, since the download of the current state is avaiable there. Also it includes all the app.ini configuration.
  • An init container waits for the Database to be deployed and than adds admin user and ldap settings. Also it is upgradable, since we're either creating a new user, or if the user exists update the password. Same for ldap settings.

I'm open for discussions about what to actually migrate and what not :)

As discussed in Discord here's my PR to migrate NOVUM-RGI chart into the official helm chart. First of all, i know that's a lot of stuff. But I gave jfeltens original chart a big rework since a lot of the approaches are deprecated. What has changed: - app.ini is almost completly configurable with the values - gitea will be deployed as a statefulset, which is much easier than handling the PVC directly (and also helm best practice) - requirements.yaml is deprecated and replaced with Charts.yaml dependencies: - Postgresql, Mysql and Memcached are included as helm dependencies. This enables us to use the initialization in the original charts instead of caring in hard coded pods. - MariaDB was abandoned, sorry for that. But I can easily readd this again, if desired. - Replaced the README.md with NOVUM-RGI Readme md, since the download of the current state is avaiable there. Also it includes all the app.ini configuration. - An init container waits for the Database to be deployed and than adds admin user and ldap settings. Also it is upgradable, since we're either creating a new user, or if the user exists update the password. Same for ldap settings. I'm open for discussions about what to actually migrate and what not :)
luhahn added 10 commits 2020-07-30 13:30:01 +00:00
3b5cd59240 Rework templates for helm chart.
- app.ini configurable via config
- admin user and ldap settings configurable via config
- using statefulset to handle pvc
- update helpers for new dependencies
84501027ac Remove now unused dependencies and deployments
- init is no longer used since databases are initialized
  on original charts and managed with dependency
- ingress.yaml moved to templates/gitea
- deployment.yaml no longer used and replaced with templates/gitea/statefulset.yaml
- memcached also handled with helm dependency and initialized in original chart
All checks were successful
continuous-integration/drone/pr Build is passing
af6de140d4
update values to support most configuration gitea offers
luhahn requested review from lunny 2020-07-30 13:51:49 +00:00
luhahn requested review from techknowlogick 2020-07-30 13:51:53 +00:00
luhahn requested review from cdrage 2020-07-30 13:52:00 +00:00
Owner

@luhahn Could you change the title to a suitable title, current is too simple.

@luhahn Could you change the title to a suitable title, current is too simple.
techknowlogick changed title from master to Integrate NOVUM-RGI chart into the official helm chart. 2020-07-31 03:41:17 +00:00
luhahn added 1 commit 2020-08-05 07:29:44 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
4e4189f7c5
Fix and operator for newer helm versions
luhahn added 2 commits 2020-08-05 10:53:11 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
b29d6a236b
Add examples to readme
lunny added the
kind
feature
label 2020-08-05 13:43:27 +00:00
luhahn added 1 commit 2020-08-05 14:40:13 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
a7f5cef321
Fix PVC mounting issues for longhorn storageClass
luhahn added 1 commit 2020-08-07 08:57:25 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
73f8cb5c5b
Multiple improvements for the chart:
- add terminationGracePeriodSeconds to shutdown the statefulset gracefully on error
- add guard for loadbalancer settings in ssh service
- use mysql from bitnami, since they update the version much more frequent (old mysql only uses mysql ~6)
- init container now also provisions mysql and external database correctly
lafriks reviewed 2020-08-07 09:12:11 +00:00
Dismissed
LICENSE Outdated
@ -1,5 +1,7 @@
MIT License
Copyright (c) 2020 NOVUM-RGI
Member

Could you add this below Gitea copyright?

Could you add this below Gitea copyright?
luhahn marked this conversation as resolved
lafriks reviewed 2020-08-07 09:14:09 +00:00
Dismissed
README.md Outdated
@ -2,0 +5,4 @@
Readme will be updated with examples in the next few days
# Content
<!-- vscode-markdown-toc -->
Member

Please use Gitea toc functionality

Please use Gitea toc functionality
Author
Member

how is this used in gitea? Couldn't find any examples

how is this used in gitea? Couldn't find any examples
Author
Member

Or did you want me to remove the vscode-markdown comment the toc is in usual markdown format? I was too lazy to create the toc by hand so I used a vscode plugin which did it for me.

Or did you want me to remove the vscode-markdown comment the toc is in usual markdown format? I was too lazy to create the toc by hand so I used a vscode plugin which did it for me.
luhahn marked this conversation as resolved
lunny requested changes 2020-08-07 12:01:45 +00:00
Dismissed
Chart.yaml Outdated
@ -15,7 +17,23 @@ sources:
- https://github.com/go-gitea/gitea
- https://hub.docker.com/r/gitea/gitea/
maintainers:
- name: Lucas Hahn
Owner

alphabet order

alphabet order
luhahn marked this conversation as resolved
luhahn force-pushed master from e2080106c4 to 9de2d078c4 2020-08-10 09:02:27 +00:00 Compare
luhahn requested review from lunny 2020-08-10 09:03:02 +00:00
lunny approved these changes 2020-08-10 13:04:47 +00:00
Dismissed
lunny left a comment
Owner

I think we could merge this one and add some ci tests after.

I think we could merge this one and add some ci tests after.
zeripath reviewed 2020-08-15 18:13:58 +00:00
Dismissed
Chart.yaml Outdated
@ -22,0 +31,4 @@
condition: gitea.cache.enabled
- name: mysql
repository: https://charts.bitnami.com/bitnami
version: 6.14.8
Owner

Previously we were using mariadb 7.3.0 not mysql 6.14.8

Previously we were using mariadb 7.3.0 not mysql 6.14.8
Author
Member

That's only the chart version. It is a bit confusing in helm, you have a chart version which only referes to the chart, templates etc. and an app version, which is the actual version of the application. For mariadb this is appVersion: 8.0.21 for chart version 6.14.8

That's only the chart version. It is a bit confusing in helm, you have a chart version which only referes to the chart, templates etc. and an app version, which is the actual version of the application. For mariadb this is appVersion: 8.0.21 for chart version 6.14.8
luhahn marked this conversation as resolved
zeripath reviewed 2020-08-15 18:14:27 +00:00
Dismissed
LICENSE Outdated
@ -1,6 +1,8 @@
MIT License
Owner

Don't need an additional blank line here

Don't need an additional blank line here
luhahn marked this conversation as resolved
zeripath reviewed 2020-08-15 18:18:07 +00:00
Dismissed
README.md Outdated
@ -2,0 +60,4 @@
* Memcached
* Mysql
## 2. <a name='Installing'></a>Installing
Owner

Who is expected to be rendering this Markdown? As far I as understood Gitea will automatically add an anchor with the name "Installing" anyway

Who is expected to be rendering this Markdown? As far I as understood Gitea will automatically add an anchor with the name "Installing" anyway
luhahn marked this conversation as resolved
zeripath reviewed 2020-08-15 18:23:29 +00:00
Dismissed
README.md Outdated
@ -190,0 +496,4 @@
|gitea.log.x.flags|A comma separated string representing the log flags.|stdflags|
|gitea.log.x.expression| regular expression to match either the function name, file or message. Defaults to empty. Only log messages that match the expression will be saved in the logger.||
|gitea.log.x.prefix|An additional prefix for every log line in this logger. Defaults to empty.||
|gitea.log.x.colorize| Colorize the log lines by default|false|
Owner

Do you really understand what's going on here with these loggging settings?

Do you really understand what's going on here with these loggging settings?
luhahn marked this conversation as resolved
zeripath reviewed 2020-08-15 18:26:10 +00:00
Dismissed
@ -0,0 +680,4 @@
FLAGS = {{ .Values.gitea.log.x.flags }}
EXPRESSION = {{ .Values.gitea.log.x.expression }}
PREFIX = {{ .Values.gitea.log.x.prefix }}
COLORIZE = {{ .Values.gitea.log.x.colorize }}
Owner

[log.x] is not a logger - this configuration section does not make sense.

[log.x] is not a logger - this configuration section does not make sense.
luhahn marked this conversation as resolved
luhahn added 7 commits 2020-08-17 15:10:08 +00:00
26f58bbf6d make app.ini generic
- app.ini is now configurable via dictionary in values.yaml
- database and server configuration is autogenerated if not defined
- http and ssh services now use gitea config settings for targetPort
- add default security value INSTALL_LOCK = true
- clean up builtin cache settings
All checks were successful
continuous-integration/drone/pr Build is passing
3935c8d238
Remove blank line from LICENSE file
luhahn requested review from zeripath 2020-08-17 15:17:10 +00:00
Author
Member

As suggested from @zeripath we changed the configuration part of the app.ini to a more generic approach. It's now possible to use all the Configurations in gitea.config

gitea:
    config:
      APP_NAME: "Gitea: With a cup of tea."
      repository:
        ROOT: "~/gitea-repositories"
      repository.pull-request:
        WORK_IN_PROGRESS_PREFIXES: "WIP:,[WIP]:"
As suggested from @zeripath we changed the configuration part of the app.ini to a more generic approach. It's now possible to use all the [Configurations](https://docs.gitea.io/en-us/config-cheat-sheet/) in gitea.config ```yaml gitea: config: APP_NAME: "Gitea: With a cup of tea." repository: ROOT: "~/gitea-repositories" repository.pull-request: WORK_IN_PROGRESS_PREFIXES: "WIP:,[WIP]:" ```
luhahn added 1 commit 2020-08-20 09:13:55 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
d9fcdf0b7d
Fix ssh routing
zeripath reviewed 2020-08-20 12:14:38 +00:00
Dismissed
Owner

Generally once things are given to Gitea any future changes are assigned to Gitea as the copyright holder but I think that might be a discussion with the Gitea owners.

Generally once things are given to Gitea any future changes are assigned to Gitea as the copyright holder but I think that might be a discussion with the Gitea owners.
luhahn force-pushed master from d9fcdf0b7d to de8530ba29 2020-08-20 12:54:30 +00:00 Compare
luhahn force-pushed master from de8530ba29 to e3b292724c 2020-08-20 12:56:16 +00:00 Compare
zeripath approved these changes 2020-08-23 09:31:10 +00:00
Dismissed
zeripath left a comment
Owner

Things with the app.ini look much better - this autogeneration will prevent
having to constantly change the chart to add more features.

Caveats with this review:

  • I'm assuming that the ldap auth addition code is correct.
  • Need to check that the Copyright header is OK

Otherwise, LGTM

Things with the app.ini look much better - this autogeneration will prevent having to constantly change the chart to add more features. Caveats with this review: * I'm assuming that the ldap auth addition code is correct. * Need to check that the Copyright header is OK Otherwise, LGTM

Copyright header in LICENSE file is fine (for this PR at least)

Copyright header in LICENSE file is fine (for this PR at least)
techknowlogick approved these changes 2020-08-23 17:54:25 +00:00
Dismissed
techknowlogick left a comment
Owner

Thanks for PR

Thanks for PR
techknowlogick merged commit 5e0cfed9be into master 2020-08-23 17:56:58 +00:00
Sign in to join this conversation.
No description provided.