Skip to content

Commit

Permalink
Merge pull request #10 from foomo/feature/sesamy-umami
Browse files Browse the repository at this point in the history
feat(sesamy-umami): add database uri
  • Loading branch information
franklinkim authored Jun 26, 2024
2 parents 6e51080 + b9487f1 commit ddca246
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion charts/sesamy-umami/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ annotations:
url: https://github.com/foomo/helm-charts
- name: Umami Source
url: https://github.com/umami-software/umami
version: 0.0.1
version: 0.0.2
appVersion: 2.11.3
4 changes: 2 additions & 2 deletions charts/sesamy-umami/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# sesamy-umami

![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.11.3](https://img.shields.io/badge/AppVersion-2.11.3-informational?style=flat-square)
![Version: 0.0.2](https://img.shields.io/badge/Version-0.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.11.3](https://img.shields.io/badge/AppVersion-2.11.3-informational?style=flat-square)

Helm chart for the Sesamy Umami integration.

Expand Down Expand Up @@ -81,6 +81,7 @@ Helm chart for the Sesamy Umami integration.
| umami.config.database.auth.username | string | `""` | Database username |
| umami.config.database.existingSecret | string | `""` | Use an existing secret containing the database uri. |
| umami.config.database.existingSecretKey | string | `""` | Key in the existing secret containing value (default: database-url) |
| umami.config.database.uri | string | `""` | Full connection string |
| umami.config.disableBotCheck | string | `"1"` | By default bots are excluded from statistics. This disables checking for bots. |
| umami.config.disableLogin | string | `"1"` | Disables the login page for the application |
| umami.config.disableTelemetry | string | `"1"` | Umami collects completely anonymous telemetry data in order help improve the application. You can choose to disable this if you don't want to participate. |
Expand All @@ -95,7 +96,6 @@ Helm chart for the Sesamy Umami integration.
| umami.config.removeTrailingSlash | string | `"1"` | Removes the trailing slash from all incoming urls. |
| umami.config.trackerScriptName | string | `"umami"` | Allows you to assign a custom name to the tracker script different from the default umami. This is to help you avoid some ad-blockers. |
| umami.dnsConfig | object | `{}` | DNSConfig settings for pods. |
| umami.enabled | bool | `false` | Enable umami |
| umami.extraEnv | list | `[]` | Environment variables to add |
| umami.extraEnvFrom | list | `[]` | Environment variables from secrets or configmaps to add |
| umami.extraPorts | list | `[]` | Port definitions to add |
Expand Down
6 changes: 5 additions & 1 deletion charts/sesamy-umami/templates/umami/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ app.kubernetes.io/component: umami
umami database uri
*/}}
{{- define "sesamy.umami.umami.database.uri" -}}
{{- printf "postgres://%s:%s@%s/%s" (tpl .Values.umami.config.database.auth.username $) (tpl .Values.umami.config.database.auth.password $) (tpl .Values.umami.config.database.auth.hostname $) (tpl .Values.umami.config.database.auth.database $) -}}
{{- if .Values.umami.config.database.uri -}}
{{- printf "%s" (tpl .Values.umami.config.database.uri $) -}}
{{- else -}}
{{- printf "postgres://%s:%s@%s/%s" (tpl .Values.umami.config.database.auth.username $) (tpl .Values.umami.config.database.auth.password $) (tpl .Values.umami.config.database.auth.hostname $) (tpl .Values.umami.config.database.auth.database $) -}}
{{- end -}}
{{- end -}}

{{/*
Expand Down
2 changes: 0 additions & 2 deletions charts/sesamy-umami/templates/umami/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.umami.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -197,4 +196,3 @@ spec:
dnsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
2 changes: 0 additions & 2 deletions charts/sesamy-umami/templates/umami/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.umami.enabled }}
{{- if gt (int .Values.umami.replicaCount) 1 }}
apiVersion: policy/v1
kind: PodDisruptionBudget
Expand All @@ -15,4 +14,3 @@ spec:
maxUnavailable: {{ . }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 0 additions & 2 deletions charts/sesamy-umami/templates/umami/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.umami.enabled }}
{{- if not .Values.umami.config.appSecret.existingSecret }}
apiVersion: v1
kind: Secret
Expand Down Expand Up @@ -29,4 +28,3 @@ data:
{{ default "database-uri" .Values.umami.config.database.existingSecretKey }}: {{ include "sesamy.umami.umami.database.uri" . | b64enc }}
---
{{- end }}
{{- end }}
2 changes: 0 additions & 2 deletions charts/sesamy-umami/templates/umami/validate.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{{- if .Values.umami.enabled }}
{{- if and (gt (int .Values.umami.replicaCount) 1) (kindIs "invalid" .Values.umami.maxUnavailable)}}
{{- fail "`.Values.umami.maxUnavailable` must be set when `.Values.umami.replicas` is greater than 1." }}
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/sesamy-umami/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@
},
"existingSecretKey": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -366,9 +369,6 @@
"dnsConfig": {
"type": "object"
},
"enabled": {
"type": "boolean"
},
"extraEnv": {
"type": "array"
},
Expand Down
4 changes: 2 additions & 2 deletions charts/sesamy-umami/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ proxy:
# Umami
umami:
# -- Enable umami
enabled: false
# Umami configurations
config:
# -- Disables users, teams, and websites settings page.
Expand Down Expand Up @@ -105,6 +103,8 @@ umami:
existingSecretKey: ""
# Database configurations
database:
# -- Full connection string
uri: ""
auth:
# -- Database name
database: ""
Expand Down

0 comments on commit ddca246

Please sign in to comment.