deploy umami

This commit is contained in:
Vivian 2022-05-26 14:34:01 +02:00
parent a3ac4b8cc0
commit 0de792fd0d
12 changed files with 118 additions and 3 deletions

View file

@ -6,3 +6,4 @@ resources:
- authentik
- gitops
- monitoring
- olympus

View file

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- xirion-registry-creds.yaml
- umami

View file

@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: umami
namespace: olympus
labels:
app: umami
spec:
replicas: 1
selector:
matchLabels:
app: umami
template:
metadata:
labels:
app: umami
spec:
containers:
- name: umami
imagePullPolicy: IfNotPresent
image: ghcr.io/mikecao/umami:postgresql-v1.31.0
ports:
- containerPort: 3000
name: web
env:
- name: DATABASE_TYPE
value: postgres
- name: DATABASE_URL
value: "postgresql://umami@10.42.42.26/umami"
envFrom:
- secretRef:
name: umami

View file

@ -0,0 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: umami
namespace: olympus
spec:
refreshInterval: "5m"
secretStoreRef:
name: vault
kind: ClusterSecretStore
target:
name: umami
data:
- secretKey: HASH_SALT
remoteRef:
key: olympus/umami
property: hash_salt

View file

@ -0,0 +1,17 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: umami
namespace: olympus
spec:
rules:
- host: "analytics.0x76.dev"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: umami
port:
number: 80

View file

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- ingress.yaml
- svc.yaml

View file

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: umami
namespace: olympus
spec:
selector:
app: umami
ports:
- protocol: TCP
port: 80
targetPort: web

View file

@ -0,0 +1,19 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: xirion-registry-creds
namespace: olympus
spec:
refreshInterval: "5m"
secretStoreRef:
name: vault
kind: ClusterSecretStore
target:
name: xirion-registry-creds
template:
type: kubernetes.io/dockerconfigjson
data:
- secretKey: .dockerconfigjson
remoteRef:
key: xirion-registry-creds
property: dockerconfigjson

View file

@ -15,4 +15,3 @@ spec:
name: zookeeper
port:
number: 8085

View file

@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: olympus
labels:
goldilocks.fairwinds.com/enabled: "true"

View file

@ -4,7 +4,7 @@
{ config, pkgs, ... }:
let
databases = [ "authentik" ];
databases = [ "authentik" "umami" ];
in
{

View file

@ -46,7 +46,7 @@ in
# Kubernetes endpoints
virtualHosts."0x76.dev" = k8s_proxy;
virtualHosts."id.0x76.dev" = k8s_proxy;
virtualHosts."agola.0x76.dev" = k8s_proxy;
virtualHosts."analytics.0x76.dev" = k8s_proxy;
virtualHosts."zookeeper.0x76.dev" = k8s_proxy;
virtualHosts."wooloofan.club" = k8s_proxy;
virtualHosts."whoami.wooloofan.club" = k8s_proxy;