diff --git a/k8s/coturn/Chart.yaml b/k8s/coturn/Chart.yaml index f817d02..028231d 100644 --- a/k8s/coturn/Chart.yaml +++ b/k8s/coturn/Chart.yaml @@ -1,3 +1,10 @@ apiVersion: v2 name: coturn -version: '1.0' +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: "1.16.0" +dependencies: + - name: redis + version: "16.8.6" + repository: "https://charts.bitnami.com/bitnami" \ No newline at end of file diff --git a/k8s/coturn/requirements.lock b/k8s/coturn/requirements.lock new file mode 100644 index 0000000..19a4b64 --- /dev/null +++ b/k8s/coturn/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: redis + repository: https://charts.bitnami.com/bitnami + version: 16.8.6 +digest: sha256:d7b350a334e2f84c033542d714521b6642f657739f6d3433c432422d2328272a +generated: "2025-11-19T12:00:00Z" diff --git a/k8s/coturn/templates/configmap.yml b/k8s/coturn/templates/configmap.yml new file mode 100644 index 0000000..fe7c256 --- /dev/null +++ b/k8s/coturn/templates/configmap.yml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: coturn-config +data: + turnserver.conf: | + log-file=stdout + redis-status-db="redis://coturn-redis-master:6379" + verbose + fingerprint + lt-cred-mech + realm=jamkazam.com + min-port=49152 + max-port=65535 + static-auth-secret=j@mk@Z@3 diff --git a/k8s/coturn/templates/deployment.yml b/k8s/coturn/templates/deployment.yml index 8bcdb94..ee4da83 100644 --- a/k8s/coturn/templates/deployment.yml +++ b/k8s/coturn/templates/deployment.yml @@ -11,21 +11,45 @@ spec: replicas: 1 template: metadata: - labels: - app: coturn + labels: + app: coturn + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: "/metrics" + prometheus.io/port: "9643" spec: hostNetwork: true imagePullSecrets: - name: gcr-json-key + volumes: + - name: coturn-config-volume + configMap: + name: coturn-config containers: - name: coturn image: gcr.io/tough-craft-276813/coturn:latest imagePullPolicy: Always + command: ["turnserver", "-c", "/etc/coturn/turnserver.conf"] env: - name: MY_POD_IP valueFrom: fieldRef: fieldPath: status.podIP ports: - - containerPort: 3478 - name: coturn + - containerPort: 3478 + name: coturn + volumeMounts: + - name: coturn-config-volume + mountPath: /etc/coturn/turnserver.conf + subPath: turnserver.conf + - name: exporter + image: "{{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }}" + imagePullPolicy: {{ .Values.exporter.image.pullPolicy }} + env: + - name: REDIS_URL + value: "redis://coturn-redis-master:6379" + - name: LOG_LEVEL + value: "info" + ports: + - containerPort: 9643 + name: metrics diff --git a/k8s/coturn/values.yaml b/k8s/coturn/values.yaml new file mode 100644 index 0000000..e771c34 --- /dev/null +++ b/k8s/coturn/values.yaml @@ -0,0 +1,22 @@ +# Default values for coturn. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +image: + repository: gcr.io/tough-craft-276813/coturn + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: "latest" + +imagePullSecrets: + - name: gcr-json-key + +redis: + enabled: true + +exporter: + enabled: true + image: + repository: ghcr.io/coturn/coturn-exporter + tag: latest + pullPolicy: IfNotPresent