Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helm chart #150

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Add helm chart #150

wants to merge 11 commits into from

Conversation

jbagot
Copy link

@jbagot jbagot commented Oct 30, 2020

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

@jbagot jbagot requested a review from XaviTorello October 30, 2020 17:20
@jbagot jbagot marked this pull request as draft October 30, 2020 17:40
@jbagot jbagot marked this pull request as ready for review October 31, 2020 19:39
@francescarpi francescarpi added the arch & CI arch team label Nov 1, 2020
@francescarpi francescarpi added this to the sprint 4 milestone Nov 1, 2020
Copy link

@XaviTorello XaviTorello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why all those vars are stored as a Secret? Is there any added value that justifies it?

tls:
- secretName: {{ $fullName }}-cert
{{- end }}
rules:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo: review traefik

pathType: Prefix
backend:
service:
name: {{ $fullName }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,79 @@
baseurl: https://nemperfeina.cat

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The case is not correct

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 }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be apf.fullname

# 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 }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be apf.fullname

# 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 }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are more env vars needed to deploy the NPF (twitter, sentry, ...)

@@ -52,8 +52,8 @@ def uwsgi(

command_args = [
"uwsgi",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uWSGI is not currently integrated into the env, maybe it's better to handle it in another PR

@XaviTorello
Copy link

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 git mv helm/apf helm/npf should be performed before merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch & CI arch team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helm Chart for APF backend
3 participants