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

fix: allow Redis only and fix Redis password use in BROKER_URL #24

Merged
merged 9 commits into from
Mar 5, 2020

Conversation

Kampfmoehre
Copy link

This allows to skip the deployment of RabbitMQ and therefore skip the deployment of the Sentry worker that connects to it.

This also fixes the Sentry Redis Worker, so that the correct BROKER_URL is used, when Redis is configured to connect with password.

This also updates the Sentry configmap to set the Broker URL to a Redis connection string, if RabbitMQ is disabled.

Adds an enabled setting for RabbitMQ and Redis so the user can choose
what to use.
Updates Sentry configmap to set redis as Broker URL if no RabbitMQ is
deployed.
Updates Redis worker deployment to include the password when set
When RabbitMQ is disabled, use Redis connection string as BROKER_URL
for the Sentry cron.
@Mokto
Copy link
Contributor

Mokto commented Mar 4, 2020

Amazing! Thanks.

I'll put my comments right away

BROKER_URL = os.environ.get("BROKER_URL", "amqp://{{ .Values.rabbitmq.username }}:{{ .Values.rabbitmq.password }}@{{ .Values.rabbitmq.host }}:5672//")
{{- else if .Values.redis.enabled }}
{{- if .Values.redis.password }}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is repeated, could you use a template helper instead?

Thanks.

Copy link
Author

Choose a reason for hiding this comment

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

I changed this, since Redis is always enabled. Since I'm fairly new to helm charts, I'm not sure how to write helpers yet. But I could take a look at it.

sentry/templates/deployment-sentry-cron.yaml Outdated Show resolved Hide resolved
sentry/templates/deployment-sentry-worker-redis.yaml Outdated Show resolved Hide resolved
sentry/values.yaml Outdated Show resolved Hide resolved
Simplifies some if/else conditions, since Redis is always enabled.
Also remove redis.enabled setting from values.
@Kampfmoehre Kampfmoehre requested a review from Mokto March 5, 2020 07:01
@Mokto
Copy link
Contributor

Mokto commented Mar 5, 2020

Thanks ! That's perfect. Could you just activate rabbitmq per default, please ?

@Kampfmoehre
Copy link
Author

Kampfmoehre commented Mar 5, 2020

Of course.
Btw: I thought about putting password in secrets, did you start any work on this yet?

@Mokto
Copy link
Contributor

Mokto commented Mar 5, 2020

No, not yet ! Go for it ;)

I'll merge your PR in the early evening.

Thanks for your work !

@Mokto Mokto merged commit 20c4ca1 into sentry-kubernetes:develop Mar 5, 2020
This was referenced Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants