mirror of
https://github.com/morten-olsen/homelab-apps.git
synced 2026-02-08 01:36:28 +01:00
migrate metabase
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
apiVersion: v2
|
||||
version: 1.0.0
|
||||
name: metabase
|
||||
dependencies:
|
||||
- name: common
|
||||
version: 1.0.0
|
||||
repository: file://../../common
|
||||
|
||||
@@ -1,6 +1 @@
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: PostgresDatabase
|
||||
metadata:
|
||||
name: '{{ .Release.Name }}'
|
||||
spec:
|
||||
environment: '{{ .Values.globals.environment }}'
|
||||
{{ include "common.database" . }}
|
||||
|
||||
@@ -1,51 +1 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 0
|
||||
selector:
|
||||
matchLabels:
|
||||
app: "{{ .Release.Name }}"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
containers:
|
||||
- name: "{{ .Release.Name }}"
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: http
|
||||
env:
|
||||
- name: MB_DB_TYPE
|
||||
value: postgres
|
||||
- name: MB_DB_DBNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ .Release.Name }}-pg-connection"
|
||||
key: database
|
||||
- name: MB_DB_PORT
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ .Release.Name }}-pg-connection"
|
||||
key: port
|
||||
- name: MB_DB_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ .Release.Name }}-pg-connection"
|
||||
key: user
|
||||
- name: MB_DB_PASS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ .Release.Name }}-pg-connection"
|
||||
key: password
|
||||
- name: MB_DB_HOST
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ .Release.Name }}-pg-connection"
|
||||
key: host
|
||||
{{ include "common.deployment" . }}
|
||||
|
||||
@@ -1,15 +1 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: '{{ .Release.Name }}'
|
||||
labels:
|
||||
app: '{{ .Release.Name }}'
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 3000
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: '{{ .Release.Name }}'
|
||||
{{ include "common.service" . }}
|
||||
|
||||
@@ -1,39 +1 @@
|
||||
apiVersion: networking.istio.io/v1
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-public"
|
||||
namespace: "{{ .Release.Namespace }}"
|
||||
spec:
|
||||
gateways:
|
||||
- "{{ .Values.globals.istio.gateways.public }}"
|
||||
- mesh
|
||||
hosts:
|
||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
||||
- mesh
|
||||
http:
|
||||
- route:
|
||||
- destination:
|
||||
host: "{{ .Release.Name }}"
|
||||
port:
|
||||
number: 80
|
||||
|
||||
---
|
||||
apiVersion: networking.istio.io/v1
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-private"
|
||||
namespace: "{{ .Release.Namespace }}"
|
||||
spec:
|
||||
gateways:
|
||||
- "{{ .Values.globals.istio.gateways.private }}"
|
||||
- mesh
|
||||
hosts:
|
||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
||||
- mesh
|
||||
http:
|
||||
- route:
|
||||
- destination:
|
||||
host: "{{ .Release.Name }}"
|
||||
port:
|
||||
number: 80
|
||||
|
||||
{{ include "common.virtualService" . }}
|
||||
|
||||
@@ -1,4 +1,63 @@
|
||||
subdomain: metabase
|
||||
|
||||
image:
|
||||
repository: index.docker.io/metabase/metabase
|
||||
tag: latest@sha256:791299d1e7e382fb2426bcc3bbb4f29d51e9a63f96c5aa40d590f72285d02a53
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
# Deployment configuration
|
||||
deployment:
|
||||
strategy: Recreate
|
||||
replicas: 1
|
||||
|
||||
# Container configuration
|
||||
container:
|
||||
port: 3000
|
||||
healthProbe:
|
||||
type: tcpSocket
|
||||
port: http # Use named port
|
||||
|
||||
# Service configuration
|
||||
service:
|
||||
port: 80
|
||||
type: ClusterIP
|
||||
|
||||
# VirtualService configuration
|
||||
virtualService:
|
||||
enabled: true
|
||||
gateways:
|
||||
public: true
|
||||
private: true
|
||||
|
||||
# Database configuration
|
||||
database:
|
||||
enabled: true
|
||||
|
||||
# Environment variables
|
||||
env:
|
||||
MB_DB_TYPE: postgres
|
||||
MB_DB_DBNAME:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{release}-connection"
|
||||
key: database
|
||||
MB_DB_PORT:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{release}-connection"
|
||||
key: port
|
||||
MB_DB_USER:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{release}-connection"
|
||||
key: user
|
||||
MB_DB_PASS:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{release}-connection"
|
||||
key: password
|
||||
MB_DB_HOST:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{release}-connection"
|
||||
key: host
|
||||
|
||||
Reference in New Issue
Block a user