diff --git a/apps/argo-apps/kustomization.yaml b/apps/argo-apps/kustomization.yaml index 295a374..8753b8d 100644 --- a/apps/argo-apps/kustomization.yaml +++ b/apps/argo-apps/kustomization.yaml @@ -30,6 +30,7 @@ resources: # - ../hackqc2024/ - ../integrale/website/ - ../applets/hello/ +- ../point-virgule/ - ../cedille-wiki/ - ../dronolab/wikijs/ # ... other apps ... diff --git a/apps/point-virgule/argo.yaml b/apps/point-virgule/argo.yaml new file mode 100644 index 0000000..e88bdb0 --- /dev/null +++ b/apps/point-virgule/argo.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: point-virgule + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "2" +spec: + project: default + destination: + server: https://kubernetes.default.svc + namespace: point-virgule + source: + repoURL: https://github.com/ClubCedille/Plateforme-Cedille + path: apps/point-virgule/base + targetRevision: HEAD + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/apps/point-virgule/base/network.yaml b/apps/point-virgule/base/network.yaml new file mode 100644 index 0000000..94675c3 --- /dev/null +++ b/apps/point-virgule/base/network.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: point-svc +spec: + selector: + app: point + ports: + - protocol: TCP + port: 5000 + targetPort: 5000 diff --git a/apps/point-virgule/base/point-virgule.yaml b/apps/point-virgule/base/point-virgule.yaml new file mode 100644 index 0000000..94e9503 --- /dev/null +++ b/apps/point-virgule/base/point-virgule.yaml @@ -0,0 +1,47 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: point-virgule +spec: + replicas: 1 + selector: + matchLabels: + app: point-virgule + template: + metadata: + labels: + app: point-virgule + annotations: + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/tls-skip-verify: 'true' + vault.hashicorp.com/role: 'secret-reader' + vault.hashicorp.com/agent-inject-template-point-virgule-env: | + {{- with secret "kv/point-virgule/default/point-virgule" -}} + export DISCORD_TOKEN="{{ .Data.data.discord_token }}" + {{- end }} + spec: + containers: + - name: point-virgule + image: ghcr.io/clubcedille/point-virgule:latest + imagePullPolicy: Always + command: ["/bin/sh", "-c"] + args: + - > + . /vault/secrets/point-virgule && python main.py + env: + - name: TRANSCRIPTION_API_URL + value: http://point.point-virgule.svc.cluster.local:5000/transcript + resources: + requests: + cpu: "500m" + memory: "2Gi" + limits: + cpu: "2000m" + memory: "5Gi" + volumeMounts: + - name: storage + mountPath: /app/recordings + volumes: + - name: storage + persistentVolumeClaim: + claimName: point-virgule-pvc diff --git a/apps/point-virgule/base/point.yaml b/apps/point-virgule/base/point.yaml new file mode 100644 index 0000000..ae9b3bd --- /dev/null +++ b/apps/point-virgule/base/point.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: point +spec: + replicas: 1 + selector: + matchLabels: + app: point + template: + metadata: + labels: + app: point + spec: + containers: + - name: point + image: ghcr.io/clubcedille/point:latest + imagePullPolicy: Always + env: + - name: WHISPER_MODEL_SIZE + value: large-v3 + resources: + requests: + cpu: "4000m" + memory: "12Gi" + limits: + memory: "20Gi" + containerPort: 5000 diff --git a/apps/point-virgule/base/pvc.yaml b/apps/point-virgule/base/pvc.yaml new file mode 100644 index 0000000..f3ca371 --- /dev/null +++ b/apps/point-virgule/base/pvc.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: point-virgule-pvc +spec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: "24Gi" diff --git a/apps/point-virgule/kustomization.yaml b/apps/point-virgule/kustomization.yaml new file mode 100644 index 0000000..bde676e --- /dev/null +++ b/apps/point-virgule/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- argo.yaml