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

Configure external redis #30

Closed
wants to merge 1 commit into from
Closed

Configure external redis #30

wants to merge 1 commit into from

Conversation

filippolmt
Copy link
Contributor

No description provided.

@filippolmt
Copy link
Contributor Author

@tananaev and @tamcore, can you do a review please?

@tananaev
Copy link
Member

tananaev commented Jan 7, 2024

Not an expert, so I'll defer to @tamcore to review this.

Copy link
Contributor

@tamcore tamcore left a comment

Choose a reason for hiding this comment

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

Sorry for the delay. Got struck with Covid. Left a few comments :)

charts/traccar/templates/_helpers.tpl Show resolved Hide resolved
charts/traccar/templates/_helpers.tpl Outdated Show resolved Hide resolved
charts/traccar/values.yaml Show resolved Hide resolved
charts/traccar/values.yaml Outdated Show resolved Hide resolved
@filippolmt
Copy link
Contributor Author

@tamcore is there any news?

Copy link
Contributor

@tamcore tamcore left a comment

Choose a reason for hiding this comment

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

2 more :D

@@ -115,18 +120,14 @@ mysql:
persistence:
enabled: false

# NOTE: When using multiple replicas, you must configure broadcast.type and broadcast.address
# NOTE: When using multiple replicas, you must configure broadcast.enabled
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd reword the entire block here. Because now there are essentially 3 options

  1. just set redis.enabled=true (as seen in line 125)
  2. manually set traccar.broadcast.enabled and traccar.broadcast.address
  3. when using configOverride, by configuring broadcast.type and broadcast.address

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In my opinion you should design the whole chart differently and use only the environment variables and not the conf generation in the configmap, this would simplify everything.

Unfortunately, I don't have the time to review the whole chart and try to eliminate the whole thing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Using a ConfigMap is perfectly fine and cleaner than having everything defined as individual env variables. (And envFrom would reference a CM / Secret again anyways.) But if you want to have a look at #28, I've started a bit of a different approach there, which would allow everyone to just pass every desired configuration parameter as part of the yaml dict. I just don't have the time to finish it.

Anyhow, my comment here regarding

# NOTE: When using multiple replicas, you must configure broadcast.enabled
# This can be done via configOverride. See https://www.traccar.org/configuration-file/#:~:text=attributes%20to%20log.-,broadcast.type,-config
# Or by setting redis.enabled=true
still stands. Those 3 lines need to be reworded now. As of now it states "you must configure broadcast.enabled ... via configOverride", which is false and will not work.

{{- end }}
{{- if and (.Values.traccar.broadcast.enabled) (not (index .Values "redis-ha").enabled) }}
<entry key='broadcast.type'>redis</entry>
<entry key='broadcast.address'>{{ .Values.traccar.broadcast.address }}</entry>
Copy link
Contributor

Choose a reason for hiding this comment

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

Might want to change this to {{ required "A Redis address must be configured!" .Values.traccar.broadcast.address }} or something similar, to avoid issues where . Values.traccar.broadcast.enabled could be enabled without an address configured.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wouldn't change it, I don't think it's a good idea to add exceptions, plus to date it hasn't been configured/thought out to make it as you suggested.

@filippolmt filippolmt closed this Jan 15, 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.

3 participants