diff options
Diffstat (limited to 'bundles/geopulse/files/kube.yaml')
| -rw-r--r-- | bundles/geopulse/files/kube.yaml | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/bundles/geopulse/files/kube.yaml b/bundles/geopulse/files/kube.yaml new file mode 100644 index 0000000..b10bc7f --- /dev/null +++ b/bundles/geopulse/files/kube.yaml @@ -0,0 +1,148 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: geopulse +data: + GEOPULSE_UI_URL: https://where.gzr.im + GEOPULSE_AUTH_SECURE_COOKIES: true + GEOPULSE_AUTH_REGISTRATION_ENABLED: true + GEOPULSE_AUTH_OIDC_REGISTRATION_ENABLED: true + GEOPULSE_AUTH_PASSWORD_REGISTRATION_ENABLED: false + GEOPULSE_BACKEND_URL: http://localhost:8080 + GEOPULSE_OIDC_ENABLED: true + GEOPULSE_OIDC_PROVIDER_GENERIC_ENABLED: true + GEOPULSE_OIDC_PROVIDER_GENERIC_NAME: login.gzr.im + GEOPULSE_OIDC_PROVIDER_GENERIC_DISCOVERY_URL: https://login.gzr.im/.well-known/openid-configuration + GEOPULSE_OIDC_PROVIDER_GENERIC_ICON: pi pi-lock + OSM_RESOLVER: 127.0.0.11 9.9.9.9 + # GEOPULSE_GEOCODING_DELAY_MS: 1000 + GEOPULSE_GEOCODING_PRIMARY_PROVIDER: nominatim + GEOPULSE_GEOCODING_FALLBACK_PROVIDER: photon + GEOPULSE_GEOCODING_PHOTON_ENABLED: true + GEOPULSE_GEOCODING_NOMINATIM_ENABLED: true + # GEOPULSE_SHARE_BASE_URL: + GEOPULSE_MQTT_ENABLED: false +--- +apiVersion: v1 +kind: Pod +metadata: + name: geopulse + labels: + traefik.enable: true + traefik.http.routers.geopulse.tls: true + traefik.http.routers.geopulse.tls.certresolver: le + traefik.http.routers.geopulse.entrypoints: http,https + traefik.http.routers.geopulse.rule: Host(`where.gzr.im`) + traefik.http.routers.geopulse.service: geopulse + traefik.http.services.geopulse.loadbalancer.server.port: 80 + # metrics + traefik.http.middlewares.replacepath-metrics-geopulse.replacepath.path: /api/prometheus/metrics + traefik.http.routers.geopulse-metrics.entrypoints: metrics + traefik.http.routers.geopulse-metrics.rule: Path(`/metrics/geopulse`) + traefik.http.routers.geopulse-metrics.middlewares: replacepath-metrics-geopulse +spec: + restartPolicy: Never + dnsPolicy: Default + containers: + - name: backend + image: ghcr.io/tess1o/geopulse-backend:${version}-native + restartPolicy: OnFailure + envFrom: + - secretRef: + name: geopulse + - configMapRef: + name: geopulse + volumeMounts: + - name: keys + mountPath: /app/keys + readOnly: true + ports: + - containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: /api/health + port: 8080 + initialDelaySeconds: 20 + resources: + limits: + memory: 512Mi + + - name: ui + image: ghcr.io/tess1o/geopulse-ui:${version} + envFrom: + - secretRef: + name: geopulse + - configMapRef: + name: geopulse + ports: + - containerPort: 80 + protocol: TCP + livenessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 5 + resources: + limits: + memory: 256Mi + + - name: postgres + image: index.docker.io/postgis/postgis:17-3.5 + ports: + - containerPort: 5432 + hostIP: 100.82.12.64 + hostPort: 25432 + volumeMounts: + - name: pg-data + mountPath: /var/lib/postgresql/data + envFrom: + - secretRef: + name: geopulse + - configMapRef: + name: geopulse + livenessProbe: + exec: + command: ["pg_isready", "-U", "geopulse"] + initialDelaySeconds: 5 + resources: + limits: + memory: 128Mi + # Conservative PostgreSQL settings optimized for minimal resource usage + # Suitable for small deployments and idle GPS tracking workloads + args: + - -c + - shared_buffers=256MB + - -c + - work_mem=8MB + - -c + - maintenance_work_mem=64MB + - -c + - effective_cache_size=1GB + - -c + - max_wal_size=512MB + - -c + - checkpoint_completion_target=0.9 + - -c + - wal_buffers=16MB + - -c + - random_page_cost=1.1 + - -c + - effective_io_concurrency=100 + - -c + - autovacuum_naptime=60s + - -c + - autovacuum_vacuum_scale_factor=0.2 + - -c + - log_min_duration_statement=5000 + - -c + - track_io_timing=on + volumes: + - name: keys + hostPath: + path: /var/lib/geopulse/keys + type: Directory + - name: pg-data + hostPath: + path: /var/lib/geopulse/data + type: DirectoryOrCreate |