From e0ba681143fea7bd7263f5027387874be762652f Mon Sep 17 00:00:00 2001 From: Steffen Illium Date: Mon, 6 May 2024 10:49:02 +0200 Subject: [PATCH] combine deployments --- .../voice/{piper => }/base/deployment.yaml | 22 ++++++++++---- projects/voice/{ => base}/namespace.yaml | 0 projects/voice/base/service.yaml | 17 +++++++++++ projects/voice/kustomization.yaml | 7 +++-- projects/voice/piper/base/ingress.yaml | 15 ---------- projects/voice/piper/base/service.yaml | 13 -------- projects/voice/piper/kustomization.yaml | 7 ----- projects/voice/whisper/base/deployment.yaml | 30 ------------------- projects/voice/whisper/base/ingress.yaml | 16 ---------- projects/voice/whisper/base/service.yaml | 13 -------- projects/voice/whisper/kustomization.yaml | 7 ----- 11 files changed, 38 insertions(+), 109 deletions(-) rename projects/voice/{piper => }/base/deployment.yaml (54%) rename projects/voice/{ => base}/namespace.yaml (100%) create mode 100644 projects/voice/base/service.yaml delete mode 100644 projects/voice/piper/base/ingress.yaml delete mode 100644 projects/voice/piper/base/service.yaml delete mode 100644 projects/voice/piper/kustomization.yaml delete mode 100644 projects/voice/whisper/base/deployment.yaml delete mode 100644 projects/voice/whisper/base/ingress.yaml delete mode 100644 projects/voice/whisper/base/service.yaml delete mode 100644 projects/voice/whisper/kustomization.yaml diff --git a/projects/voice/piper/base/deployment.yaml b/projects/voice/base/deployment.yaml similarity index 54% rename from projects/voice/piper/base/deployment.yaml rename to projects/voice/base/deployment.yaml index 1c7690d..f329211 100644 --- a/projects/voice/piper/base/deployment.yaml +++ b/projects/voice/base/deployment.yaml @@ -2,17 +2,17 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app: piper - name: piper + app: voice + name: voice spec: replicas: 1 selector: matchLabels: - app: piper + app: voice template: metadata: labels: - app: piper + app: voice spec: containers: - image: lscr.io/linuxserver/piper:latest @@ -23,8 +23,20 @@ spec: - name: PIPER_VOICE value: en_US-hfc_female-medium ports: - - name: http + - name: piper containerPort: 10200 protocol: TCP resources: {} + - image: linuxserver/faster-whisper:latest + name: whisper + env: + - name: TZ + value: Europe/Berlin + - name: WHISPER_MODEL + value: large-v3 + ports: + - name: whisper + containerPort: 10300 + protocol: TCP + resources: {} restartPolicy: Always diff --git a/projects/voice/namespace.yaml b/projects/voice/base/namespace.yaml similarity index 100% rename from projects/voice/namespace.yaml rename to projects/voice/base/namespace.yaml diff --git a/projects/voice/base/service.yaml b/projects/voice/base/service.yaml new file mode 100644 index 0000000..4525871 --- /dev/null +++ b/projects/voice/base/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: voice + name: voice +spec: + ports: + - name: piper + port: 10200 + targetPort: piper + - name: whisper + port: 10300 + targetPort: whisper + selector: + app: voice + type: LoadBalancer diff --git a/projects/voice/kustomization.yaml b/projects/voice/kustomization.yaml index f7d2dd6..3abcc99 100644 --- a/projects/voice/kustomization.yaml +++ b/projects/voice/kustomization.yaml @@ -4,6 +4,7 @@ kind: Kustomization namespace: voice resources: -- whisper -- piper -- namespace.yaml +- base/deployment.yaml +- base/ingress.yaml +- base/service.yaml +- base/namespace.yaml diff --git a/projects/voice/piper/base/ingress.yaml b/projects/voice/piper/base/ingress.yaml deleted file mode 100644 index f0a951c..0000000 --- a/projects/voice/piper/base/ingress.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: traefik.io/v1alpha1 -kind: IngressRoute -metadata: - name: piper -spec: - entryPoints: - - traefik - tls: {} - routes: - - match: Host(`piper.steffenillium.de`) - kind: Rule - services: - - name: piper - port: http - diff --git a/projects/voice/piper/base/service.yaml b/projects/voice/piper/base/service.yaml deleted file mode 100644 index a93218c..0000000 --- a/projects/voice/piper/base/service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app: piper - name: piper -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: piper \ No newline at end of file diff --git a/projects/voice/piper/kustomization.yaml b/projects/voice/piper/kustomization.yaml deleted file mode 100644 index 08da9b9..0000000 --- a/projects/voice/piper/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- base/deployment.yaml -- base/ingress.yaml -- base/service.yaml diff --git a/projects/voice/whisper/base/deployment.yaml b/projects/voice/whisper/base/deployment.yaml deleted file mode 100644 index 598d9bb..0000000 --- a/projects/voice/whisper/base/deployment.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: whisper - name: whisper -spec: - replicas: 1 - selector: - matchLabels: - app: whisper - template: - metadata: - labels: - app: whisper - spec: - containers: - - image: linuxserver/faster-whisper:latest - name: whisper - env: - - name: TZ - value: Europe/Berlin - - name: WHISPER_MODEL - value: large-v3 - ports: - - name: http - containerPort: 10300 - protocol: TCP - resources: {} - restartPolicy: Always diff --git a/projects/voice/whisper/base/ingress.yaml b/projects/voice/whisper/base/ingress.yaml deleted file mode 100644 index db3c368..0000000 --- a/projects/voice/whisper/base/ingress.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: traefik.io/v1alpha1 -kind: IngressRoute -metadata: - name: whisper - namespace: whisper -spec: - entryPoints: - - websecure-local - tls: {} - routes: - - match: Host(`whisper.steffenillium.de`) - kind: Rule - services: - - name: whisper - port: http - diff --git a/projects/voice/whisper/base/service.yaml b/projects/voice/whisper/base/service.yaml deleted file mode 100644 index d655349..0000000 --- a/projects/voice/whisper/base/service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app: whisper - name: whisper -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: whisper diff --git a/projects/voice/whisper/kustomization.yaml b/projects/voice/whisper/kustomization.yaml deleted file mode 100644 index 08da9b9..0000000 --- a/projects/voice/whisper/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- base/deployment.yaml -- base/ingress.yaml -- base/service.yaml