🧑‍💻(tilt) add dimail

This adds dimail to the tilt kube deployment
This commit is contained in:
Quentin BEY
2024-12-09 16:21:14 +01:00
parent 80976e3761
commit 010d3674de
10 changed files with 116 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
apiVersion: v2
name: dimail
description: A Helm chart for deploying dimail
type: application
version: 0.1.0

View File

@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: dimail
labels:
app: dimail
spec:
replicas: 1
selector:
matchLabels:
app: dimail
template:
metadata:
labels:
app: dimail
spec:
containers:
- name: dimail
command: ["/bin/sh", "-c", "/opt/dimail-api/start-dev.sh"]
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
ports:
- containerPort: 8000
env:
- name: DIMAIL_MODE
value: FAKE
- name: DIMAIL_JWT_SECRET
value: fake_jwt_secret

View File

@@ -0,0 +1,20 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: dimail
labels:
app: dimail
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: dimail.127.0.0.1.nip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: dimail
port:
number: 8000

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: dimail
labels:
app: dimail
spec:
type: ClusterIP
ports:
- port: 8000
targetPort: 8000
protocol: TCP
name: http
selector:
app: dimail

View File

@@ -0,0 +1,18 @@
replicaCount: 1
image:
repository: registry.mim-libre.fr/dimail/dimail-api
tag: v0.0.13
pullPolicy: Always
service:
type: ClusterIP
port: 8000
ingress:
enabled: true
hostname: dimail.127.0.0.1.nip.io
env:
DIMAIL_MODE: FAKE
DIMAIL_JWT_SECRET: fake_jwt_secret

View File

@@ -65,7 +65,7 @@ backend:
POSTGRES_PASSWORD: pass
REDIS_URL: redis://default:pass@redis-master:6379/1
WEBMAIL_URL: "https://onestendev.yapasdewebmail.fr"
MAIL_PROVISIONING_API_URL: "http://dimail:8000"
MAIL_PROVISIONING_API_URL: "http://dimail.127.0.0.1.nip.io"
MAIL_PROVISIONING_API_CREDENTIALS:
secretKeyRef:
name: backend

View File

@@ -49,7 +49,7 @@ releases:
metadata:
name: desk-keycloak
data:
meet.json: |
desk.json: |
{{ readFile "../../docker/auth/realm.json" | replace "http://localhost:3200" "https://desk.127.0.0.1.nip.io" | indent 14 }}
- name: postgres
@@ -78,6 +78,12 @@ releases:
password: pass
architecture: standalone
- name: dimail
installed: {{ eq .Environment.Name "dev" | toYaml }}
missingFileHandler: Warn
namespace: {{ .Namespace }}
chart: ./dimail
- name: desk
installed: {{ regexMatch "^dev.*" .Environment.Name | toYaml }}
missingFileHandler: Warn