Media Processing Helm Chart
Phonexia Media Processing microservice (CPU only) converting audio streams, splitting or mixing channels, and merging multiple streams into multichannel output
Maintainers
| Name | Url | |
|---|---|---|
| Phonexia | support@phonexia.com | https://www.phonexia.com |
Helm: >= 3.2.0
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | Affinity for pod assignment (node/pod affinity rules) |
| annotations | object | {} | Annotations of deployment (custom metadata for the deployment) |
| config.instancesPerDevice | int | 1 | Number of instances per device. Microservice can process requests concurrently if value is >1. |
| config.keepAliveTime | int | 60 | Time between 2 consecutive keep-alive messages, that are sent if there is no activity from the client. If set to 0, the default gRPC configuration (2hr) will be set (note, that this may get the microservice into unresponsive state). |
| config.keepAliveTimeout | int | 20 | Time to wait for keep alive acknowledgement until the connection is dropped by the server. |
| config.listeningAddress | string | "" | Address on which the server will be listening. Address '[::]' also accepts IPv4 connections. |
| config.logLevel | string | "" | Logging level. Possible values: error, warning, info, debug, trace. |
| config.maxAudioLength | int | 0 | Maximum length of input audio in seconds. 0 means no limit. |
| config.port | int | 8080 | Port where the service will listen (must match service.port) |
| extraEnvVars | list | [] | Extra environment variables for media-processing container |
| fullnameOverride | string | "" | String to fully override media-processing.fullname template |
| global.image.registry | string | "" | Global image registry (overrides local image.registry and global.imageRegistry) For backward compatibility, if both global.imageRegistry and image.registry are set, image.registry takes precedence. |
| global.imagePullSecrets | list | [] | Global image pull secrets (overrides local imagePullSecrets) |
| global.imageRegistry | string | "" | Global image registry (overrides local image.registry) |
| image.pullPolicy | string | "IfNotPresent" | Image pull policy (Always, IfNotPresent, Never) |
| image.registry | string | "registry.phonexia.com" | Image registry URL |
| image.repository | string | "phonexia/dev/technologies/services-monorepo/media-processing" | Image repository path |
| image.tag | string | "" | Image tag (defaults to appVersion from Chart.yaml) |
| image.useFreeFFmpeg | bool | true | Use free ffmpeg version (adds -free suffix to tag) Ignored if image.tag is set |
| imagePullSecrets | list | [] | Specify docker-registry secret names as an array |
| ingress.annotations | object | {} | Ingress annotations (e.g., nginx ingress class, TLS settings) |
| ingress.className | string | "" | Ingress class name (e.g., "nginx") |
| ingress.enabled | bool | false | Enable ingress resource creation |
| ingress.hosts | list | [{"host":"media-processing.example.com","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}] | Ingress host configuration |
| ingress.tls | list | [] | TLS configuration for ingress |
| initContainers | list | [] | Init containers (evaluated as template, can be used to prepare environment) |
| livenessProbe | object | {"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":30,"successThreshold":1,"timeoutSeconds":5} | Liveness probe settings (checks if container is alive) |
| nameOverride | string | "" | String to partially override media-processing.fullname template |
| nodeSelector | object | {} | Node labels for pod assignment (node selector) |
| onDemand.cooldownPeriod | int | 300 | Cooldown period in seconds after scaling down |
| onDemand.enabled | bool | false | Enable on-demand scaling with KEDA |
| onDemand.idleReplicaCount | int | 0 | Number of replicas when idle (usually 0 for cost savings) |
| onDemand.maxReplicaCount | int | 1 | Maximum number of replicas to scale up to |
| onDemand.minReplicaCount | int | 1 | Minimum number of replicas to maintain |
| onDemand.pollingInterval | int | 30 | How often KEDA checks metrics (seconds) |
| onDemand.schedule.desiredReplicas | string | "1" | Desired number of replicas during the period |
| onDemand.schedule.enabled | bool | false | Enable schedule for scaling pods |
| onDemand.schedule.periodEnd | string | "" | End of the period Example: "0 19 * * 1-5" run on Monday-Friday until 7pm |
| onDemand.schedule.periodStart | string | "" | Start of the period Example: "0 6 * * 1-5" run on Monday-Friday from 6am |
| onDemand.schedule.timezone | string | "Europe/Prague" | Timezone which to base the schedule on |
| onDemand.trigger.activationThreshold | int | 5 | Threshold to activate scaling (minimum metric value to start scaling) |
| onDemand.trigger.query | string | "sum(increase(nginx_ingress_controller_requests{ exported_namespace=\"{{ .Release.Namespace }}\", exported_service=\"{{ include \"media-processing.fullname\" . }}\", method=\"POST\"}[5m]))" | Prometheus query to determine scaling metrics |
| onDemand.trigger.serverAddress | string | "http://kube-prometheus-stack-prometheus.monitoring:9090/prometheus" | Prometheus server address for metrics collection |
| onDemand.trigger.threshold | int | 100 | Threshold value for scaling decisions |
| podAnnotations | object | {} | Annotations for pods (custom metadata for pods) |
| podSecurityContext | object | {} | Security context for pods (fsGroup, etc.) |
| readinessProbe | object | {"failureThreshold":3,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5} | Readiness probe settings (checks if container is ready to serve traffic) |
| replicaCount | int | 1 | Number of replicas to deploy |
| resources | object | {} | The resources limits/requests for the media-processing container |
| runtimeClassName | string | "" | Specify runtime class (e.g., for specific container runtimes) |
| securityContext | object | {} | Security context for media-processing container |
| service.clusterIP | string | "" | Service Cluster IP (use None for headless service) |
| service.port | int | 8080 | Service port (must match config.port) |
| service.type | string | "ClusterIP" | Service type (ClusterIP, NodePort, LoadBalancer) |
| serviceAccount.annotations | object | {} | Annotations to add to the service account |
| serviceAccount.create | bool | true | Specifies whether a service account should be created |
| serviceAccount.name | string | "" | The name of the service account to use |
| startupProbe | object | {"failureThreshold":30,"initialDelaySeconds":0,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5} | Startup probe settings (checks if container has started successfully) |
| tmpdir.mountPath | string | "/tmp" | Mount path for temporary directory inside the container |
| tmpdir.options | object | {} | Mount options for temporary directory (e.g., size limits, permissions) |
| tolerations | list | [] | Tolerations for pod assignment (allows pods on tainted nodes) |
| updateStrategy | object | {"type":"RollingUpdate"} | Deployment update strategy (RollingUpdate, Recreate) |
Installation
Installing the Chart
Run the following command to install the chart with the release name my-release.
Use --version parameter to install specific version.
Available versions can be found on docker hub.
helm install my-release oci://registry-1.docker.io/phonexia/media-processing --version 1.0.0-helm
This command deploys media-processing on the Kubernetes cluster in the default configuration.
Exposing the service
To expose the service outside of kubernetes cluster follow Using a Service to Expose Your App.
Ingress
Media Processing service is using GRPC protocol which can be exposed by some ingress controllers. For example nginx-ingress controller support this. To expose media-processing service via ingress use following configuration:
ingress:
# Deploy ingress object
enabled: true
# Ingress class name
className: "nginx"
annotations:
# Force redirect to SSL
nginx.ingress.kubernetes.io/ssl-redirect: "true"
# Tell nginx that backend service use GRPC
nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
hosts:
# Hostnames
- host: media-processing.example.com
paths:
- path: /
pathType: ImplementationSpecific
# Use tls
tls:
# Secret containing TLS certificate
- secretName: media-processing-tls
# TLS hostnames
hosts:
- media-processing.example.com
Use grpcurl to check if everything works as expected. Output of the following command
$ grpcurl --insecure media-processing.example.com:443 grpc.health.v1.Health/Check
should be
{
"status": "SERVING"
}
Uninstalling the Chart
To uninstall/delete the my-release release:
helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.