diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml new file mode 100644 index 0000000..3cde01f --- /dev/null +++ b/.github/workflows/helm.yml @@ -0,0 +1,88 @@ +name: Helm Chart + +on: + push: + branches: [main] + paths: + - "charts/**" + - "Dockerfile" + - "docker-entrypoint.sh" + - "cmd/**" + - "web/**" + - ".github/workflows/helm.yml" + pull_request: + branches: [main] + paths: + - "charts/**" + - "Dockerfile" + - "docker-entrypoint.sh" + - "cmd/**" + - "web/**" + - ".github/workflows/helm.yml" + +permissions: + contents: read + +jobs: + lint-and-template: + name: Lint & Template + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - uses: azure/setup-helm@v4 + with: + version: "v3.18.4" + + - name: helm lint + run: helm lint charts/spectogram + + - name: helm template (default values) + run: helm template test charts/spectogram + + - name: helm template (all features enabled) + run: | + helm template test charts/spectogram \ + --set ingress.enabled=true \ + --set autoscaling.enabled=true \ + --set generateJob.enabled=true \ + --set generateJob.audioConfigMap=my-audio + + kind-install: + name: Deploy to kind + runs-on: ubuntu-latest + needs: lint-and-template + steps: + - uses: actions/checkout@v7 + + - uses: azure/setup-helm@v4 + with: + version: "v3.18.4" + + - name: Build image + run: docker build -t spectogram:ci . + + - name: Create kind cluster + uses: helm/kind-action@v1 + with: + cluster_name: spectogram-ci + + - name: Load image into kind + run: kind load docker-image spectogram:ci --name spectogram-ci + + - name: helm install + run: | + helm install spectogram charts/spectogram \ + --set image.repository=spectogram \ + --set image.tag=ci \ + --wait --timeout 2m + + - name: helm test + run: helm test spectogram --timeout 1m + + - name: Describe resources on failure + if: failure() + run: | + kubectl get all + kubectl describe pod -l app.kubernetes.io/instance=spectogram + kubectl logs -l app.kubernetes.io/instance=spectogram --all-containers --tail=200 || true diff --git a/README.md b/README.md index 0bf317c..7ab363c 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,10 @@ docker run --rm -p 8000:8000 -v "$(pwd)":/app/data spectogram serve Then open `http://localhost:8000/web` in your browser, same as the local workflow above. +## ☸️ Running on Kubernetes + +A Helm chart at [`charts/spectogram`](charts/spectogram) deploys the containerized viewer to any Kubernetes cluster β€” a local `kind` cluster, a managed cloud cluster, or on-prem β€” using the same image built by the `Dockerfile` above. See [`charts/spectogram/README.md`](charts/spectogram/README.md) for the full quickstart (kind), generating data via an in-cluster Job, and cloud/on-prem deployment options (registry, ingress, storage class, scaling). + ## 🧠 How It Works? The `Go` script: @@ -132,12 +136,13 @@ Unit and integration tests live alongside the code in `cmd/spectogram/main_test. ## πŸ“ Folder Structure ``` -.github/workflows/ - CI pipeline (build, vet, test, Docker image build) +.github/workflows/ - CI pipeline (build, vet, test, Docker image build, Helm chart lint/kind test) cmd/spectogram/ - main Go application and tests (main.go, main_test.go) web/ - HTML viewer with Plotly data/ - generated spectrogram.json output (created automatically, not tracked in git) Dockerfile - containerized build (Go binary + Python static file server) docker-entrypoint.sh - dispatches `generate` and `serve` container commands +charts/spectogram/ - Helm chart for deploying to kind / cloud / on-prem Kubernetes README.md - this file go.mod - Go module info ``` diff --git a/charts/spectogram/.helmignore b/charts/spectogram/.helmignore new file mode 100644 index 0000000..fd799e4 --- /dev/null +++ b/charts/spectogram/.helmignore @@ -0,0 +1,7 @@ +.git/ +.gitignore +*.swp +*.bak +*.tmp +*.orig +.DS_Store diff --git a/charts/spectogram/Chart.yaml b/charts/spectogram/Chart.yaml new file mode 100644 index 0000000..ec21c70 --- /dev/null +++ b/charts/spectogram/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: spectogram +description: Helm chart for the Spectogram viewer (Go generator + Plotly web viewer) +type: application +version: 0.1.0 +appVersion: "0.1.0" +home: https://github.com/landscape82/spectogram +sources: + - https://github.com/landscape82/spectogram +maintainers: + - name: landscape82 diff --git a/charts/spectogram/README.md b/charts/spectogram/README.md new file mode 100644 index 0000000..30a94f1 --- /dev/null +++ b/charts/spectogram/README.md @@ -0,0 +1,116 @@ +# spectogram Helm chart + +Deploys the Spectogram web viewer (Deployment + Service, plus optional +Ingress and a one-off "generate" Job) using the image built from the +repo root [`Dockerfile`](../../Dockerfile). + +The chart is written so that moving from a local `kind` cluster to a +cloud or on-prem cluster is purely a matter of `--set`/values overrides +β€” no template changes are needed. + +## Quickstart on `kind` + +```bash +# from the repo root +docker build -t spectogram:local . +kind create cluster --name spectogram +kind load docker-image spectogram:local --name spectogram + +helm install spectogram charts/spectogram \ + --set image.repository=spectogram \ + --set image.tag=local \ + --wait + +helm test spectogram + +kubectl port-forward svc/spectogram 8000:8000 +# open http://localhost:8000/web +``` + +There's no spectrogram data yet at this point (see "Generating data" +below). + +## Generating data + +The chart can run the Go CLI's `generate` step as a one-off Job before +the viewer starts, sharing the same PersistentVolumeClaim as the +`serve` Deployment: + +```bash +kubectl create configmap my-audio --from-file=audio.wav=./audio.wav + +helm upgrade spectogram charts/spectogram \ + --set image.repository=spectogram \ + --set image.tag=local \ + --set generateJob.enabled=true \ + --set generateJob.audioConfigMap=my-audio \ + --set generateJob.audioKey=audio.wav \ + --set generateJob.inputPath=/app/audio-input/audio.wav \ + --wait +``` + +`generateJob.audioKey` and the trailing path segment of +`generateJob.inputPath` must match (the ConfigMap is mounted at +`/app/audio-input`, so key `audio.wav` appears at +`/app/audio-input/audio.wav`). The audio format is detected from the +file extension (`.mp3` or `.wav`), so the key/path extension must match +the actual file content. + +Alternatively, `kubectl cp` an audio file into a running pod and run +`spectogram generate` manually, or `kubectl cp` pre-generated +`spectrogram.png`/`data/spectrogram.json` directly onto the volume. + +## Deploying to a cloud or on-prem cluster + +The defaults (`ClusterIP` Service, chart-managed PVC using the +cluster's default StorageClass, no Ingress) work unmodified on `kind`. +For a real cluster: + +```bash +helm install spectogram charts/spectogram \ + --set image.repository=ghcr.io/landscape82/spectogram \ + --set image.tag=v0.1.0 \ + --set ingress.enabled=true \ + --set ingress.className=nginx \ + --set ingress.host=spectogram.example.com \ + --set persistence.storageClassName= \ + --set resources.requests.cpu=50m \ + --set resources.requests.memory=64Mi \ + --set resources.limits.cpu=250m \ + --set resources.limits.memory=256Mi +``` + +- **Image**: push the image built from the repo `Dockerfile` to your + registry and set `image.repository`/`image.tag` (and + `imagePullSecrets` if the registry is private). +- **Exposure**: set `service.type=LoadBalancer` on a cloud provider + that supports it, `service.type=NodePort` for bare on-prem clusters + without a load balancer, or enable `ingress` with your ingress + controller's class. +- **Storage**: set `persistence.storageClassName` to a StorageClass + available in your cluster, or set `persistence.existingClaim` to + reuse an existing PVC. Leave it empty to use the cluster's default + StorageClass (this is what makes the chart work unmodified on + `kind`, which registers a default StorageClass out of the box). +- **Scaling**: enable `autoscaling.enabled=true` if your cluster has + the metrics-server needed for CPU-based HPA scaling. Note the + `generateJob`/PVC model here assumes `ReadWriteOnce`, single-writer + access β€” it's not designed for multi-replica concurrent writes. + +## Values reference + +See [`values.yaml`](values.yaml) for the full list of configurable +values and inline documentation for each one. + +## Testing + +- `helm lint charts/spectogram` +- `helm template spectogram charts/spectogram` to review rendered + manifests +- `helm install ... --wait && helm test spectogram` runs a `helm test` + hook Pod that fetches `/web/index.html` from the Service and asserts + the Plotly viewer page is served + +CI (`.github/workflows/helm.yml`) lints and templates the chart on +every PR touching it, and additionally spins up a real `kind` cluster +to `helm install` and `helm test` the chart end-to-end. diff --git a/charts/spectogram/templates/NOTES.txt b/charts/spectogram/templates/NOTES.txt new file mode 100644 index 0000000..a18c736 --- /dev/null +++ b/charts/spectogram/templates/NOTES.txt @@ -0,0 +1,26 @@ +Spectogram has been deployed as {{ include "spectogram.fullname" . }} in namespace {{ .Release.Namespace }}. + +{{- if .Values.ingress.enabled }} +Ingress is enabled β€” once DNS/hosts resolve {{ .Values.ingress.host }}, visit: + http://{{ .Values.ingress.host }}{{ .Values.ingress.path }}web +{{- else if contains "NodePort" .Values.service.type }} +Get the NodePort and visit the app: + export NODE_PORT=$(kubectl get -n {{ .Release.Namespace }} svc {{ include "spectogram.fullname" . }} -o jsonpath="{.spec.ports[0].nodePort}") + export NODE_IP=$(kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}") + echo "http://$NODE_IP:$NODE_PORT/web" +{{- else if contains "LoadBalancer" .Values.service.type }} +Get the LoadBalancer IP (may take a few minutes to be assigned): + kubectl get -n {{ .Release.Namespace }} svc -w {{ include "spectogram.fullname" . }} +{{- else }} +Service is ClusterIP β€” port-forward to reach it locally (works on kind and any cluster): + kubectl port-forward -n {{ .Release.Namespace }} svc/{{ include "spectogram.fullname" . }} 8000:{{ .Values.service.port }} +Then open http://localhost:8000/web +{{- end }} + +{{- if not .Values.generateJob.enabled }} + +No spectrogram data has been generated yet. Either: + - enable generateJob in values (see charts/spectogram/README.md), or + - `kubectl cp` an audio file into the pod and run `spectogram generate` manually, or + - `kubectl cp` a pre-generated spectrogram.png/data/spectrogram.json onto the persistent volume. +{{- end }} diff --git a/charts/spectogram/templates/_helpers.tpl b/charts/spectogram/templates/_helpers.tpl new file mode 100644 index 0000000..336d1c3 --- /dev/null +++ b/charts/spectogram/templates/_helpers.tpl @@ -0,0 +1,53 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "spectogram.name" -}} +{{- .Chart.Name | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +*/}} +{{- define "spectogram.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 }} + +{{- define "spectogram.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{- define "spectogram.labels" -}} +helm.sh/chart: {{ include "spectogram.chart" . }} +{{ include "spectogram.selectorLabels" . }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{- define "spectogram.selectorLabels" -}} +app.kubernetes.io/name: {{ include "spectogram.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{- define "spectogram.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "spectogram.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{- define "spectogram.pvcName" -}} +{{- if .Values.persistence.existingClaim }} +{{- .Values.persistence.existingClaim }} +{{- else }} +{{- include "spectogram.fullname" . }}-data +{{- end }} +{{- end }} diff --git a/charts/spectogram/templates/deployment.yaml b/charts/spectogram/templates/deployment.yaml new file mode 100644 index 0000000..bbe73e8 --- /dev/null +++ b/charts/spectogram/templates/deployment.yaml @@ -0,0 +1,75 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "spectogram.fullname" . }} + labels: + {{- include "spectogram.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "spectogram.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "spectogram.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "spectogram.serviceAccountName" . }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: ["serve"] + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + ports: + - name: http + containerPort: 8000 + protocol: TCP + readinessProbe: + httpGet: + path: /web/index.html + port: http + initialDelaySeconds: 2 + periodSeconds: 5 + livenessProbe: + httpGet: + path: /web/index.html + port: http + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- if .Values.persistence.enabled }} + volumeMounts: + - name: data + mountPath: /app/data + {{- end }} + {{- if .Values.persistence.enabled }} + volumes: + - name: data + persistentVolumeClaim: + claimName: {{ include "spectogram.pvcName" . }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/spectogram/templates/hpa.yaml b/charts/spectogram/templates/hpa.yaml new file mode 100644 index 0000000..e523b86 --- /dev/null +++ b/charts/spectogram/templates/hpa.yaml @@ -0,0 +1,22 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "spectogram.fullname" . }} + labels: + {{- include "spectogram.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "spectogram.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} +{{- end }} diff --git a/charts/spectogram/templates/ingress.yaml b/charts/spectogram/templates/ingress.yaml new file mode 100644 index 0000000..2f9da80 --- /dev/null +++ b/charts/spectogram/templates/ingress.yaml @@ -0,0 +1,31 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "spectogram.fullname" . }} + labels: + {{- include "spectogram.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- toYaml .Values.ingress.tls | nindent 4 }} + {{- end }} + rules: + - host: {{ .Values.ingress.host | quote }} + http: + paths: + - path: {{ .Values.ingress.path }} + pathType: {{ .Values.ingress.pathType }} + backend: + service: + name: {{ include "spectogram.fullname" . }} + port: + number: {{ .Values.service.port }} +{{- end }} diff --git a/charts/spectogram/templates/job-generate.yaml b/charts/spectogram/templates/job-generate.yaml new file mode 100644 index 0000000..e98daab --- /dev/null +++ b/charts/spectogram/templates/job-generate.yaml @@ -0,0 +1,49 @@ +{{- if .Values.generateJob.enabled }} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "spectogram.fullname" . }}-generate + labels: + {{- include "spectogram.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-weight": "0" + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded +spec: + backoffLimit: 2 + template: + metadata: + labels: + {{- include "spectogram.selectorLabels" . | nindent 8 }} + spec: + restartPolicy: Never + containers: + - name: generate + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + - generate + - -in + - {{ .Values.generateJob.inputPath | quote }} + - -out + - {{ .Values.generateJob.outputPng | quote }} + - -json + - {{ .Values.generateJob.outputJSON | quote }} + volumeMounts: + - name: audio + mountPath: /app/audio-input + readOnly: true + {{- if .Values.persistence.enabled }} + - name: data + mountPath: /app/data + {{- end }} + volumes: + - name: audio + configMap: + name: {{ .Values.generateJob.audioConfigMap }} + {{- if .Values.persistence.enabled }} + - name: data + persistentVolumeClaim: + claimName: {{ include "spectogram.pvcName" . }} + {{- end }} +{{- end }} diff --git a/charts/spectogram/templates/pvc.yaml b/charts/spectogram/templates/pvc.yaml new file mode 100644 index 0000000..4988320 --- /dev/null +++ b/charts/spectogram/templates/pvc.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ include "spectogram.pvcName" . }} + labels: + {{- include "spectogram.labels" . | nindent 4 }} +spec: + accessModes: + - {{ .Values.persistence.accessMode }} + {{- if .Values.persistence.storageClassName }} + storageClassName: {{ .Values.persistence.storageClassName }} + {{- end }} + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- end }} diff --git a/charts/spectogram/templates/service.yaml b/charts/spectogram/templates/service.yaml new file mode 100644 index 0000000..f310430 --- /dev/null +++ b/charts/spectogram/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "spectogram.fullname" . }} + labels: + {{- include "spectogram.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "spectogram.selectorLabels" . | nindent 4 }} diff --git a/charts/spectogram/templates/serviceaccount.yaml b/charts/spectogram/templates/serviceaccount.yaml new file mode 100644 index 0000000..33906c0 --- /dev/null +++ b/charts/spectogram/templates/serviceaccount.yaml @@ -0,0 +1,8 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "spectogram.serviceAccountName" . }} + labels: + {{- include "spectogram.labels" . | nindent 4 }} +{{- end }} diff --git a/charts/spectogram/templates/tests/test-connection.yaml b/charts/spectogram/templates/tests/test-connection.yaml new file mode 100644 index 0000000..4634de9 --- /dev/null +++ b/charts/spectogram/templates/tests/test-connection.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: Pod +metadata: + name: {{ include "spectogram.fullname" . }}-test-connection + labels: + {{- include "spectogram.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded +spec: + restartPolicy: Never + containers: + - name: wget + image: busybox:1.36 + command: + - "sh" + - "-c" + - | + set -e + url="http://{{ include "spectogram.fullname" . }}:{{ .Values.service.port }}/web/index.html" + for i in $(seq 1 10); do + if wget -q -T 5 -O- "$url" | grep -qi plotly; then + echo "OK: web viewer served plotly page" + exit 0 + fi + sleep 3 + done + echo "FAIL: could not fetch $url after retries" + exit 1 diff --git a/charts/spectogram/values.yaml b/charts/spectogram/values.yaml new file mode 100644 index 0000000..ac20f4c --- /dev/null +++ b/charts/spectogram/values.yaml @@ -0,0 +1,95 @@ +# Default values for the spectogram chart. +# This chart deploys the "serve" side of the app (the static Plotly web +# viewer + generated data) as a Deployment + Service, with an optional +# Ingress and an optional one-off Job to run the "generate" step. +# +# Designed to work unmodified against a local `kind` cluster, and to be +# adapted for cloud/on-prem clusters purely via values overrides (image +# registry, service type, ingress, storage class) β€” no template changes +# should be needed. + +replicaCount: 1 + +image: + # For kind: build the image locally and `kind load docker-image + # spectogram:local --name `, then set repository/tag to match. + # For cloud/on-prem: point at your registry, e.g. + # ghcr.io/landscape82/spectogram, and set imagePullSecrets below. + repository: spectogram + tag: local + pullPolicy: IfNotPresent + +imagePullSecrets: [] + +serviceAccount: + create: false + name: "" + +podAnnotations: {} + +securityContext: {} + +service: + # ClusterIP works everywhere and is the safest default; combine with + # ingress.enabled for cloud/on-prem, or use `kubectl port-forward` / + # NodePort for bare kind clusters. Set to LoadBalancer on cloud + # providers that support it, or NodePort for on-prem without an LB. + type: ClusterIP + port: 8000 + +ingress: + enabled: false + className: "" + annotations: {} + host: spectogram.local + path: / + pathType: Prefix + tls: [] + # - secretName: spectogram-tls + # hosts: + # - spectogram.local + +persistence: + # Backs /app/data, which holds the generated spectrogram.png/json the + # web viewer serves. Leave storageClassName empty to use the cluster's + # default StorageClass β€” this is what kind's local-path provisioner + # registers as default, and what most cloud/on-prem clusters also + # provide, so the chart needs no changes to move between them. + enabled: true + existingClaim: "" + storageClassName: "" + accessMode: ReadWriteOnce + size: 1Gi + +# Optional one-off Job that runs `spectogram generate` against an audio +# file before the Deployment serves it. Disabled by default since it +# requires supplying the input audio via a ConfigMap/Secret binary key. +# Runs as a Helm post-install/post-upgrade hook so it completes before +# `helm test` (and typical users) hit the Service. +generateJob: + enabled: false + audioConfigMap: "" + audioKey: audio.mp3 + # Must match audioKey above β€” the ConfigMap is mounted as a volume at + # /app/audio-input, so the file appears at /app/audio-input/. + inputPath: /app/audio-input/audio.mp3 + outputPng: /app/data/spectrogram.png + outputJSON: /app/data/spectrogram.json + +resources: {} + # requests: + # cpu: 50m + # memory: 64Mi + # limits: + # cpu: 250m + # memory: 256Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 3 + targetCPUUtilizationPercentage: 80 + +nodeSelector: {} +tolerations: [] +affinity: {}