diff options
| author | 2024-04-15 12:45:57 +0100 | |
|---|---|---|
| committer | 2024-04-15 12:46:20 +0100 | |
| commit | 9d0bbdfb9f7ef186d61b9074e782b036cabc576e (patch) | |
| tree | 6f98353dea90f749defb3d86c8898edd2f86bd82 /kubernetes/namespaces/tooling | |
| parent | Move rTeX to apis namespace (diff) | |
Move metabase to tooling namespace
Diffstat (limited to 'kubernetes/namespaces/tooling')
| -rw-r--r-- | kubernetes/namespaces/tooling/metabase/README.md | 14 | ||||
| -rw-r--r-- | kubernetes/namespaces/tooling/metabase/deployment.yaml | 36 | ||||
| -rw-r--r-- | kubernetes/namespaces/tooling/metabase/ingress.yaml | 25 | ||||
| -rw-r--r-- | kubernetes/namespaces/tooling/metabase/secrets.yaml | bin | 0 -> 338 bytes | |||
| -rw-r--r-- | kubernetes/namespaces/tooling/metabase/service.yaml | 12 | 
5 files changed, 87 insertions, 0 deletions
diff --git a/kubernetes/namespaces/tooling/metabase/README.md b/kubernetes/namespaces/tooling/metabase/README.md new file mode 100644 index 0000000..b246d54 --- /dev/null +++ b/kubernetes/namespaces/tooling/metabase/README.md @@ -0,0 +1,14 @@ +# Metabase +These manifests provision an instance of Metabase, our database analysis tool. + +## Secrets +A single secret of name `metabase-env` is used with the following values: + +| Environment  | Description                               | +|--------------|-------------------------------------------| +| MB_DB_DBNAME | Database name for internal metabase usage | +| MB_DB_HOST   | Address of PostgreSQL database            | +| MB_DB_TYPE   | Always postgres                           | +| MB_DB_PASS   | Database user password                    | +| MB_DB_PORT   | Always 5432                               | +| MB_DB_USER   | User for metabase internal                | diff --git a/kubernetes/namespaces/tooling/metabase/deployment.yaml b/kubernetes/namespaces/tooling/metabase/deployment.yaml new file mode 100644 index 0000000..d55ac22 --- /dev/null +++ b/kubernetes/namespaces/tooling/metabase/deployment.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: +  name: metabase +  namespace: tooling +spec: +  replicas: 1 +  selector: +    matchLabels: +      app: metabase +  template: +    metadata: +      labels: +        app: metabase +    spec: +      securityContext: +        fsGroup: 2000 +        runAsUser: 1000 +        runAsNonRoot: true +      containers: +        - name: metabase +          image: metabase/metabase:latest +          imagePullPolicy: Always +          ports: +            - containerPort: 3000 +          envFrom: +            - secretRef: +                name: metabase-env +          volumeMounts: +            - mountPath: /plugins +              name: mb-plugins-volume +          securityContext: +            readOnlyRootFilesystem: true +      volumes: +        - name: mb-plugins-volume +          emptyDir: {} diff --git a/kubernetes/namespaces/tooling/metabase/ingress.yaml b/kubernetes/namespaces/tooling/metabase/ingress.yaml new file mode 100644 index 0000000..b29bdd8 --- /dev/null +++ b/kubernetes/namespaces/tooling/metabase/ingress.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: +  annotations: +    nginx.ingress.kubernetes.io/auth-tls-verify-client: "on" +    nginx.ingress.kubernetes.io/auth-tls-secret: "kube-system/mtls-client-crt-bundle" +    nginx.ingress.kubernetes.io/auth-tls-error-page: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" +  name: metabase +  namespace: tooling +spec: +  tls: +  - hosts: +      - "*.pythondiscord.com" +    secretName: pythondiscord.com-tls +  rules: +  - host: metabase.pythondiscord.com +    http: +      paths: +      - path: / +        pathType: Prefix +        backend: +          service: +            name: metabase +            port: +              number: 80 diff --git a/kubernetes/namespaces/tooling/metabase/secrets.yaml b/kubernetes/namespaces/tooling/metabase/secrets.yaml Binary files differnew file mode 100644 index 0000000..909264d --- /dev/null +++ b/kubernetes/namespaces/tooling/metabase/secrets.yaml diff --git a/kubernetes/namespaces/tooling/metabase/service.yaml b/kubernetes/namespaces/tooling/metabase/service.yaml new file mode 100644 index 0000000..76e2841 --- /dev/null +++ b/kubernetes/namespaces/tooling/metabase/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: +  name: metabase +  namespace: tooling +spec: +  selector: +    app: metabase +  ports: +    - protocol: TCP +      port: 80 +      targetPort: 3000  |