Skip to content

Commit

Permalink
feat(plausible): support customizing the mount path of the geoip data…
Browse files Browse the repository at this point in the history
…base
  • Loading branch information
pascaliske committed Nov 22, 2023
1 parent 5174848 commit 07dd4ef
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
8 changes: 2 additions & 6 deletions charts/plausible/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
type: application
name: plausible
description: A Helm chart for Plausible
version: 1.0.0
version: 1.1.0
# renovate: image=plausible/analytics
appVersion: "v2.0.0"

Expand All @@ -29,9 +29,5 @@ dependencies:

annotations:
artifacthub.io/changes: |-
- kind: removed
description: 'Remove support for CRDs from "traefik.containo.us".'
- kind: added
description: 'Add support for CRDs from "traefik.io".'
- kind: changed
description: 'Switch to GHCR based image for GeoIP database.'
description: 'Add support for customizing the mount path of the GeoIP database.'
3 changes: 2 additions & 1 deletion charts/plausible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> A Helm chart for Plausible
[![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/plausible/)[![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/plausible/)[![AppVersion: v2.0.0](https://img.shields.io/badge/AppVersion-v2.0.0-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/plausible/)
[![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/plausible/)[![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/plausible/)[![AppVersion: v2.0.0](https://img.shields.io/badge/AppVersion-v2.0.0-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/plausible/)

* <https://github.com/pascaliske/helm-charts>
* <https://github.com/plausible/analytics>
Expand Down Expand Up @@ -62,6 +62,7 @@ The following values can be used to adjust the helm chart.
| geoip.image.repository | string | `"ghcr.io/maxmind/geoipupdate"` | The repository for the geoip image. |
| geoip.image.tag | string | `"v6.0.0"` | The docker tag for the geoip image. |
| geoip.licenseKey | string | `""` | Required. Case-sensitive MaxMind license key. |
| geoip.mountPath | string | `"/geoip"` | Optional. Specify the database mount path inside the containers. |
| image.pullPolicy | string | `"IfNotPresent"` | The pull policy for the controller. |
| image.repository | string | `"plausible/analytics"` | The repository to pull the image from. |
| image.tag | string | `.Chart.AppVersion` | The docker tag, if left empty chart's appVersion will be used. |
Expand Down
8 changes: 5 additions & 3 deletions charts/plausible/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ spec:
{{- end }}
{{- if .Values.geoip.enabled }}
- name: GEOLITE2_COUNTRY_DB
value: /geoip/GeoLite2-Country.mmdb
value: {{ default "/geoip" .Values.geoip.mountPath }}/GeoLite2-Country.mmdb
{{- end }}
{{- if .Values.geoip.enabled }}
volumeMounts:
- name: geoip-volume
mountPath: /geoip
mountPath: {{ default "/geoip" .Values.geoip.mountPath | quote }}
readOnly: true
{{- end }}
livenessProbe:
Expand All @@ -101,6 +101,8 @@ spec:
image: "{{ .Values.geoip.image.repository }}:{{ .Values.geoip.image.tag }}"
imagePullPolicy: IfNotPresent
env:
- name: GEOIPUPDATE_DB_DIR
value: {{ default "/geoip" .Values.geoip.mountPath | quote }}
- name: GEOIPUPDATE_ACCOUNT_ID
value: {{ .Values.geoip.accountId | quote }}
- name: GEOIPUPDATE_LICENSE_KEY
Expand All @@ -111,7 +113,7 @@ spec:
value: GeoLite2-Country
volumeMounts:
- name: geoip-volume
mountPath: /usr/share/GeoIP
mountPath: {{ default "/geoip" .Values.geoip.mountPath | quote }}
{{- end }}
{{- if .Values.geoip.enabled }}
volumes:
Expand Down
2 changes: 2 additions & 0 deletions charts/plausible/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ geoip:
licenseKey: ''
# -- Optional. Database update frequency. Defaults to "168" which equals 7 days.
frequency: 168
# -- Optional. Specify the database mount path inside the containers.
mountPath: /geoip

serviceAccount:
# -- Specify the service account used for the controller.
Expand Down

0 comments on commit 07dd4ef

Please sign in to comment.