{{- /*
{{- if .Values.enabled.cluster }}
  {{- $namespace := .Release.Namespace -}}
  {{- $applicationName := .Values.deploy.name -}}
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ $applicationName }}-eg
  namespace: {{ $namespace }}
  labels:
  {{- include "srs.labels.edge" . | nindent 4 }}
spec:
  replicas: {{ .Values.apps.srs.replicas.edge }}
  selector:
    matchLabels:
  {{- include "srs.matchLabels.edge" . | nindent 6 }}
  template:
    metadata:
      labels:
      {{- include "srs.labels.edge" . | nindent 8 }}
      annotations:
        pod.alpha.kubernetes.io/initialized: "true"
    spec:
      affinity:
      {{- include "srs.affinity" . | nindent 8 }}
      containers:
        - name: srs
          image: {{ .Values.apps.srs.image.srs.name }}:{{ .Values.apps.srs.image.srs.tag }}
          resources:
            limits:
              memory: 4Gi
              cpu: 1200m
            requests:
              memory: 256Mi
              cpu: 100m
          ports:
            - name: srs-rtmp
              containerPort: {{ .Values.apps.srs.ports.rtmp }}
              protocol: TCP
            - name: srs-api
              containerPort: {{ .Values.apps.srs.ports.api }}
              protocol: TCP
            - name: srs-flv
              containerPort: {{ .Values.apps.srs.ports.flv }}
              protocol: TCP
          volumeMounts:
            - name: srs-conf-file
              mountPath: /usr/local/srs/conf/docker.conf
              subPath: docker.conf
      volumes:
        - name: srs-conf-file
          configMap:
            name: {{ $applicationName }}-cm
            items:
              - key: "srs.edge.conf"
                path: "docker.conf"

---

  {{- end -}}*/}}
