Add helm chart#150
Conversation
XaviTorello
left a comment
There was a problem hiding this comment.
Well done @jbagot, I like it :)
Just a few things to make k8s v1.18+ compatible and fix the possibility to deploy it (some bugs, env vars and some patchs)
I'm going to submit some changes to make it work
| command: | ||
| - invoke | ||
| - celery-queues | ||
| envFrom: |
There was a problem hiding this comment.
Maybe liveness tests could be implemented via celery -b XXX inspect ping command (or something similar)
| release: {{ .Release.Name | quote }} | ||
| heritage: {{ .Release.Service | quote }} | ||
| data: | ||
| BASE_URL: {{ .Values.baseurl | b64enc | quote }} |
There was a problem hiding this comment.
Why all those vars are stored as a Secret? Is there any added value that justifies it?
| tls: | ||
| - secretName: {{ $fullName }}-cert | ||
| {{- end }} | ||
| rules: |
| pathType: Prefix | ||
| backend: | ||
| service: | ||
| name: {{ $fullName }} |
There was a problem hiding this comment.
This is not k8s 1.18+ compatible
| @@ -0,0 +1,79 @@ | |||
| baseurl: https://nemperfeina.cat | |||
| POSTGRES_PASSWORD: {{ required "postgres password is needed" .Values.postgresql.postgresqlPassword | b64enc | quote }} | ||
| # Celery | ||
| CELERY_BROKER_PROTOCOL: {{ .Values.celery.broker.protocol | b64enc | quote }} | ||
| CELERY_BROKER_HOST: {{ printf "%s-redis-master" (include "apf.name" .) | b64enc | quote }} |
| # Postgres | ||
| POSTGRES_DB: {{ .Values.postgresql.postgresqlDatabase | b64enc | quote }} | ||
| POSTGRES_USER: {{ .Values.postgresql.postgresqlUsername | b64enc | quote }} | ||
| POSTGRES_HOST: {{ printf "%s-postgresql" (include "apf.name" .) | b64enc | quote }} |
| # Telegram | ||
| TELEGRAM_TOKEN: {{ .Values.notifications.telegram.token | b64enc | quote }} | ||
| NOTIF_TELEGRAM_ENABLED: {{ .Values.notifications.telegram.enabled | b64enc | quote }} | ||
| TELEGRAM_CHAT_IDS: {{ .Values.notifications.telegram.chatIds | b64enc | quote }} No newline at end of file |
There was a problem hiding this comment.
There are more env vars needed to deploy the NPF (twitter, sentry, ...)
| @@ -52,8 +52,8 @@ def uwsgi( | |||
|
|
|||
| command_args = [ | |||
| "uwsgi", | |||
There was a problem hiding this comment.
uWSGI is not currently integrated into the env, maybe it's better to handle it in another PR
|
I commited some changes to your PR to make it works, feel free to rollback or continue patching it @jbagot :) When this PR is ready, a massive |
Description
Fix #97
Add helm chart. You need a myvalues.yaml file with some secrets to execute it.
Now uses uwsgi.
Postgresql and redis as a depencies charts.
Code formating
The code has to be well formatted following the formatting rules. For example in Python the code has to follow the PEP8.
Before create your PR, please make sure your code is well formatted and styled doing:
$ >> pre-commit run --all