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

chart: allow to use external redis instance #20322

Closed
wants to merge 6 commits into from

Conversation

norman-zon
Copy link

This PR adds the capability to use an external redis instance, instead of the bundled one, to the helm chart.
I tried to be consistent with syntax used for the database.

Copy link
Contributor

@deepy deepy left a comment

Choose a reason for hiding this comment

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

Needs to quote the value otherwise this breaks

@@ -12,7 +12,7 @@ data:
{{- end }}
DB_NAME: {{ .Values.postgresql.auth.database }}
DB_POOL: {{ .Values.mastodon.sidekiq.concurrency | quote }}
DB_PORT: "5432"
DB_PORT: {{ .Values.postgresql.auth.port | default "5432" | quote }}
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a separate PR tackling this specifically so it might be a good idea to drop it from here
(and I guess technically the port shouldn't be in auth. database is in there because it's sort of "related" to the authentication being used)
I Think port should probably be on the same level as the external hostname which is slightly confusing, but the place bitnami has it is bizarre and you'll probably only change this if you're also specifying the hostname

Choose a reason for hiding this comment

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

Do you have a link to the other PR @deepy ? I was going to raise a PR to set a non-standard Postgres port too, would be great to track it.

Copy link
Contributor

Choose a reason for hiding this comment

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

REDIS_HOST: {{ template "mastodon.redis.fullname" . }}-master
REDIS_PORT: "6379"
{{- else }}
REDIS_HOST: {{ .Values.redis.hostname }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is required if redis is disabled it'd be nice to add validation for it, perhaps something like: required "When the redis chart is disabled .Values.redis.hostname is required" .Values.redis.hostname?

@ineffyble
Copy link
Member

This has merge conflicts now.

@ineffyble ineffyble added the deployment Related to runtime configuration, production setups label Nov 14, 2022
@TCFox
Copy link

TCFox commented Nov 21, 2022

Do we only need to remove the (now redundant through #20370) PostgreSQL port portions of this PR in order to resolve the merge conflicts? Extremely keen to see this PR launch!

@deepy
Copy link
Contributor

deepy commented Nov 21, 2022

Probably yeah, it's pretty clean so should be easy to fix

@norman-zon
Copy link
Author

I reverted the commit for the postgres port. sorry for the late response, was on holiday

@TCFox
Copy link

TCFox commented Nov 22, 2022

At the risk of being slightly off-topic, absolutely no need to apologise @norman-zon! 2022 has been a rough year, we've all needed a break! Mental health should absolutely come first <3

@@ -31,8 +31,13 @@ data:
MALLOC_ARENA_MAX: "2"
NODE_ENV: "production"
RAILS_ENV: "production"
{{- if .Values.redis.enabled }}
REDIS_HOST: {{ template "mastodon.redis.fullname" . }}-master
REDIS_PORT: "6379"
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this already covered by both {{ .Values.redis.port | default "6379" | quote }} and also the new redis.port defaulting to 6379?

Copy link

Choose a reason for hiding this comment

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

It is, and I have to apologize 😣 I made a comment yesterday based on the current changes on main but after taking a closer look at @norman-zon's code I realized that his implementation was better. I deleted the message soon afterwards hoping no one had seen it, but I guess it made it to some mailboxes.

@Gargron
Copy link
Member

Gargron commented Nov 27, 2022

Moving the Helm chart out to mastodon/chart

@norman-zon
Copy link
Author

Replaced by mastodon/chart#6

@norman-zon norman-zon closed this Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Related to runtime configuration, production setups
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants