Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions apps/instant-chat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: apps-instant-chat
namespace: flux-system
spec:
dependsOn:
- name: infra-controllers
interval: 1h
retryInterval: 2m
timeout: 5m
sourceRef:
kind: GitRepository
name: flux-system
path: ./apps/instant-chat
prune: true
wait: true
11 changes: 11 additions & 0 deletions apps/instant-chat/imagepolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
name: do-instant-chat
namespace: do-instant-chat
spec:
imageRepositoryRef:
name: do-instant-chat
policy:
alphabetical:
order: asc
10 changes: 10 additions & 0 deletions apps/instant-chat/imagerepository.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageRepository
metadata:
name: do-instant-chat
namespace: do-instant-chat
spec:
interval: 5m
image: gitlab.polytech.umontpellier.fr:5050/dev-web/messagerie-instantane
secretRef:
name: gitlab-registry
24 changes: 24 additions & 0 deletions apps/instant-chat/imageupdate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageUpdateAutomation
metadata:
name: do-instant-chat
namespace: flux-system
spec:
interval: 5m
sourceRef:
kind: GitRepository
name: flux-system
git:
checkout:
ref:
branch: main
commit:
author:
email: flux-bot@polydo.dev
name: FluxCD Image Automation
messageTemplate: "chore(images): update do-instant-chat to {{range .Updated.Images}}{{.NewTag}}{{end}}"
push:
branch: main
update:
path: ./apps/instant-chat
strategy: Setters
80 changes: 80 additions & 0 deletions apps/instant-chat/instant-chat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: do-instant-chat
namespace: do-instant-chat
spec:
interval: 1h
timeout: 5m
releaseName: do-instant-chat
chart:
spec:
chart: helm/messagerie
sourceRef:
kind: GitRepository
name: do-instant-chat
namespace: do-instant-chat
interval: 5m
values:
imagePullSecrets:
- name: gitlab-registry
image:
repository: gitlab.polytech.umontpellier.fr:5050/dev-web/messagerie-instantane
tag: latest # {"$imagepolicy": "do-instant-chat:do-instant-chat"}
pullPolicy: IfNotPresent
service:
type: ClusterIP
apiPort: 3000
frontPort: 8081
env:
apiPort: 3000
frontPort: 8081
frontOrigin: https://instant-chat.polydo.dev
frontOrigins: https://instant-chat.polydo.dev
database:
user: instant_chat_app
name: instant_chat
extraEnv:
- name: COOKIE_SECURE
value: "true"
- name: COOKIE_SAMESITE
value: "None"
- name: COOKIE_DOMAIN
value: ".polydo.dev"
secrets:
create: true
existingSecret: instant-chat-secret
jwtSecret: wDmqkXPI_N4-lH5H6dbVlcEkpAYdofuSbxDl7Aa1w_hJst_TreYPmHeZdmrH4Xh8e6MiopuLjUwfDxXVA747Yg
pepper: vns1BPZsxYNx1lZI4oVT-IEt9w8m9eqVRWqeSq7h7i-giViJH815HT3lSjgMRZVfzYqac4thefaXxtiIzN9GuQ
databasePassword: pUXxb4TkefHz0kXC-59jgWP-gQQAyaYRkYHWqODF_wNotPcEuKTT-6vShTTONQtpGHbk_pLK7ANSVe7keCFhtw
databaseAdminPassword: 9TuVVq0swCdKfRjJALAqaEIFGAX-jk5FpYH2OViEFtrwByHMlAO9j923xo37Mc6m9O7WFe2sEk3w9JESSACEqQ
postgresql:
enabled: true
auth:
username: instant_chat_app
database: instant_chat
existingSecret: instant-chat-secret
password: pUXxb4TkefHz0kXC-59jgWP-gQQAyaYRkYHWqODF_wNotPcEuKTT-6vShTTONQtpGHbk_pLK7ANSVe7keCFhtw
postgresPassword: 9TuVVq0swCdKfRjJALAqaEIFGAX-jk5FpYH2OViEFtrwByHMlAO9j923xo37Mc6m9O7WFe2sEk3w9JESSACEqQ
secretKeys:
adminPasswordKey: POSTGRES_PASSWORD
userPasswordKey: DATABASE_PASSWORD
primary:
persistence:
size: 20Gi
ingress:
enabled: true
className: traefik
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
tls:
- secretName: cloudflare-origin-cert
hosts:
- instant-chat.polydo.dev
- instant-chat-api.polydo.dev
frontend:
host: instant-chat.polydo.dev
path: /
api:
host: instant-chat-api.polydo.dev
path: /
8 changes: 8 additions & 0 deletions apps/instant-chat/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- registry-secret.yaml
- imagerepository.yaml
- imagepolicy.yaml
- imageupdate.yaml
- instant-chat.yaml
8 changes: 8 additions & 0 deletions apps/instant-chat/registry-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: gitlab-registry
namespace: do-instant-chat
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: eyJhdXRocyI6IHsiZ2l0bGFiLnBvbHl0ZWNoLnVtb250cGVsbGllci5mciI6IHsidXNlcm5hbWUiOiAiZ2l0bGFiK2RlcGxveS10b2tlbi01MSIsICJwYXNzd29yZCI6ICJnbGR0LWVNeEgtZExwZFRtTDJ4Z1Y3cHlqIiwgImVtYWlsIjogIiIsICJhdXRoIjogIloybDBiR0ZpSzJSbGNHeHZlUzEwYjJ0bGJpMDFNVHBuYkdSMExXVk5lRWd0WkV4d1pGUnRUREo0WjFZM2NIbHEifX19
1 change: 1 addition & 0 deletions apps/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ kind: Kustomization
resources:
- kube-prometheus-stack.yaml
- minecraft.yaml
- instant-chat.yaml
- uptime-kuma.yaml
8 changes: 8 additions & 0 deletions infrastructure/controllers/bitnami.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: bitnami
namespace: do-instant-chat
spec:
interval: 1h
url: https://charts.bitnami.com/bitnami
10 changes: 10 additions & 0 deletions infrastructure/controllers/do-instant-chat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: do-instant-chat
namespace: do-instant-chat
spec:
interval: 1h
url: https://gitlab.polytech.umontpellier.fr/dev-web/messagerie-instantane.git
ref:
branch: main
2 changes: 2 additions & 0 deletions infrastructure/controllers/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- bitnami.yaml
- do-instant-chat.yaml
- kube-prometheus-stack.yaml
- minecraft.yaml
- uptime-kuma.yaml
4 changes: 4 additions & 0 deletions infrastructure/namespaces/do-instant-chat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: do-instant-chat
1 change: 1 addition & 0 deletions infrastructure/namespaces/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- do-instant-chat.yaml
- minecraft.yaml
- monitoring.yaml
2 changes: 1 addition & 1 deletion scripts/tls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

CERT="$1"
KEY="$2"
NAMESPACES=("kube-system" "monitoring")
NAMESPACES=("kube-system" "monitoring" "do-instant-chat")
SECRET_NAME="cloudflare-origin-cert"

if [[ $# -lt 2 ]]; then
Expand Down