diff --git a/neon_diana_utils/helm_charts/backend/diana-backend/Chart.yaml b/neon_diana_utils/helm_charts/backend/diana-backend/Chart.yaml index 1d2d2f59..9bdc7915 100644 --- a/neon_diana_utils/helm_charts/backend/diana-backend/Chart.yaml +++ b/neon_diana_utils/helm_charts/backend/diana-backend/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.25 +version: 0.1.26 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to @@ -24,16 +24,16 @@ version: 0.1.25 appVersion: "1.0.1a24" dependencies: -# nginx needs to deploy to its own namespace -# - name: ingress-nginx -# version: 4.6.0 -# repository: https://kubernetes.github.io/ingress-nginx + # nginx needs to deploy to its own namespace + # - name: ingress-nginx + # version: 4.6.0 + # repository: https://kubernetes.github.io/ingress-nginx - name: rabbitmq version: 11.13.0 repository: https://charts.bitnami.com/bitnami - name: diana-http - version: 0.0.14 + version: 0.0.15 repository: file://../http-services - name: diana-mq version: 0.0.17 - repository: file://../mq-services \ No newline at end of file + repository: file://../mq-services diff --git a/neon_diana_utils/helm_charts/backend/http-services/Chart.yaml b/neon_diana_utils/helm_charts/backend/http-services/Chart.yaml index 2aea704f..ffd905ae 100644 --- a/neon_diana_utils/helm_charts/backend/http-services/Chart.yaml +++ b/neon_diana_utils/helm_charts/backend/http-services/Chart.yaml @@ -3,8 +3,8 @@ name: diana-http description: Deploy DIANA HTTP Services type: application -version: 0.0.14 -appVersion: "1.0.1a24" +version: 0.0.15 +appVersion: "1.0.1a23" dependencies: - name: libretranslate alias: libretranslate @@ -42,7 +42,11 @@ dependencies: alias: stt-nemo version: 0.0.2 repository: file://../../http/stt-nemo + - name: stt-fasterwhisper + alias: stt-fasterwhisper + version: 0.0.1 + repository: file://../../http/stt-fasterwhisper - name: hana alias: endpoint-hana version: 0.0.1 - repository: file://../../http/hana \ No newline at end of file + repository: file://../../http/hana diff --git a/neon_diana_utils/helm_charts/backend/http-services/values.yaml b/neon_diana_utils/helm_charts/backend/http-services/values.yaml index 7504ce74..8cbf81f6 100644 --- a/neon_diana_utils/helm_charts/backend/http-services/values.yaml +++ b/neon_diana_utils/helm_charts/backend/http-services/values.yaml @@ -59,6 +59,11 @@ ww-snowboy: ingress: enabled: False # image.tag: +stt-fasterwhisper: + subdomain: &host_fasterwhisper fasterwhisper + servicePort: *default_port + ingress: + enabled: True ingress: enabled: True @@ -96,4 +101,7 @@ ingress: - host: *host_snowboy serviceName: backend-snowboy servicePort: *default_port - extraRules: [] \ No newline at end of file + - host: *host_fasterwhisper + serviceName: backend-fasterwhisper + servicePort: *default_port + extraRules: [] diff --git a/neon_diana_utils/helm_charts/base/base-http/Chart.yaml b/neon_diana_utils/helm_charts/base/base-http/Chart.yaml index ddcf5db5..835e5bba 100644 --- a/neon_diana_utils/helm_charts/base/base-http/Chart.yaml +++ b/neon_diana_utils/helm_charts/base/base-http/Chart.yaml @@ -3,5 +3,5 @@ name: base-http description: Library chart for basic HTTP Services type: library -version: 0.0.5 -appVersion: "1.0.1a24" +version: 0.0.6 +appVersion: "1.0.1a23" diff --git a/neon_diana_utils/helm_charts/base/base-http/templates/_deployment.tpl b/neon_diana_utils/helm_charts/base/base-http/templates/_deployment.tpl index 4be4b027..9e89163a 100644 --- a/neon_diana_utils/helm_charts/base/base-http/templates/_deployment.tpl +++ b/neon_diana_utils/helm_charts/base/base-http/templates/_deployment.tpl @@ -28,10 +28,20 @@ spec: - name: {{ $fullName }} containerPort: {{ .Values.servicePort }} protocol: TCP - {{- if .Values.configSecret }} + {{- if .Values.env }} + env: + {{- range $key, $value := .Values.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- end }} + {{- if .Values.configSecret || .Values.volumeMounts }} volumeMounts: + {{- if .Values.configSecret }} - mountPath: /config/neon name: config + {{- if .Values.volumeMounts }} + {{- toYaml $.Values.volumeMounts | nindent 12 -}} {{- if .Values.resources }} resources: {{- toYaml $.Values.resources | nindent 12 -}} @@ -42,6 +52,9 @@ spec: sources: - secret: name: {{ .Values.configSecret }} + {{- if .Values.volumes}} + {{- toYaml $.Values.volumes | nindent 8 -}} + {{- end }} {{- end }} restartPolicy: Always {{- end -}} \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/http/stt-fasterwhisper/.helmignore b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/neon_diana_utils/helm_charts/http/stt-fasterwhisper/Chart.yaml b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/Chart.yaml new file mode 100644 index 00000000..d8b0a6a0 --- /dev/null +++ b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v2 +name: stt-fasterwhisper +description: Deploy a FasterWhisper STT Server + +type: application +version: 0.0.1 +appVersion: "1.0.1a23" + +dependencies: + - name: base-http + version: 0.0.6 + repository: file://../../base/base-http diff --git a/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/_helpers.tpl b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/_helpers.tpl new file mode 100644 index 00000000..ff825c9c --- /dev/null +++ b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "stt-fasterwhisper.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "stt-fasterwhisper.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "stt-fasterwhisper.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "stt-fasterwhisper.labels" -}} +helm.sh/chart: {{ include "stt-fasterwhisper.chart" . }} +{{ include "stt-fasterwhisper.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "stt-fasterwhisper.selectorLabels" -}} +app.kubernetes.io/name: {{ include "stt-fasterwhisper.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "stt-fasterwhisper.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "stt-fasterwhisper.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/deployment.yaml b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/deployment.yaml new file mode 100644 index 00000000..a2446c4b --- /dev/null +++ b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/deployment.yaml @@ -0,0 +1 @@ +{{- include "base-http.deployment" .}} \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/ingress.yaml b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/ingress.yaml new file mode 100644 index 00000000..b7af14d9 --- /dev/null +++ b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/ingress.yaml @@ -0,0 +1 @@ +{{- include "base-http.ingress" .}} diff --git a/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/service.yaml b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/service.yaml new file mode 100644 index 00000000..a3493c81 --- /dev/null +++ b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/service.yaml @@ -0,0 +1 @@ +{{- include "base-http.service" .}} \ No newline at end of file diff --git a/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/tests/test-connection.yaml b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/tests/test-connection.yaml new file mode 100644 index 00000000..4436ece4 --- /dev/null +++ b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "stt-fasterwhisper.fullname" . }}-test-connection" + labels: + {{- include "stt-fasterwhisper.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "stt-fasterwhisper.fullname" . }}:{{ .Values.service.targetPort }}'] + restartPolicy: Never diff --git a/neon_diana_utils/helm_charts/http/stt-fasterwhisper/values.yaml b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/values.yaml new file mode 100644 index 00000000..4cfdb6d6 --- /dev/null +++ b/neon_diana_utils/helm_charts/http/stt-fasterwhisper/values.yaml @@ -0,0 +1,53 @@ +# Default values for tts-coqui. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +serviceName: backend-fasterwhisper +replicaCount: 1 +subdomain: fasterwhisper +domain: diana.local +servicePort: "8080" + +env: + OVOS_CONFIG_BASE_FOLDER: neon + OVOS_CONFIG_FILENAME: diana.yaml + XDG_CONFIG_HOME: /config +image: + repository: docker.io/smartgic/ovos-stt-server-fasterwhisper + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: alpha + +resources: + requests: + memory: "4Gi" + cpu: "2.0" + +service: + type: NodePort + targetPort: "8080" + +ingress: + enabled: true + className: nginx + annotations: + {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - paths: + - path: / + pathType: Prefix + backend: + service: + tls: + secretName: tls-letsencrypt-prod + +core: + fasterwhisperConfig: + stt: + module: ovos-stt-plugin-fasterwhisper + ovos-stt-plugin-fasterwhisper: + model: medium + cpu_threads: 4 + gradio: true diff --git a/neon_diana_utils/templates/backend/Chart.yaml b/neon_diana_utils/templates/backend/Chart.yaml index 993770c8..7d545c94 100644 --- a/neon_diana_utils/templates/backend/Chart.yaml +++ b/neon_diana_utils/templates/backend/Chart.yaml @@ -3,10 +3,10 @@ name: backend-deployment description: A Helm chart to deploy the Neon Diana backend type: application -version: 1.0.0 +version: 1.1.0 appVersion: "1.0.1a5" dependencies: - name: backend - version: 0.1.25 - repository: https://neongeckocom.github.io/neon-diana-utils \ No newline at end of file + version: 0.1.26 + repository: https://neongeckocom.github.io/neon-diana-utils