kind: Deployment
apiVersion: apps/v1
metadata:
  name: srv
spec:
  replicas: 3
  selector:
    matchLabels:
      app: edge
  template:
    metadata:
      labels:
        app: edge
    spec:
      volumes:
        - name: conf
          configMap:
            name: edge-conf
      containers:
        - name: srs
          image: 'hub.bigdatagz.com/ossrs/srs:v4.0'
          imagePullPolicy: Always
          ports:
            - name: rtmp
              containerPort: 1935
        - name: sidecar
          image: 'hub.bigdatagz.com/ossrs/srs-sidecar:latest'
          imagePullPolicy: Always
          ports:
            - name: sidecar
              containerPort: 8080
          envFrom:
            - configMapRef:
                name: sidecar-env
          volumeMounts:
            - name: conf
              mountPath: /app/conf
          args:
            - --srs-proxy-server
            - backup-svc.srs-cluster.svc.prod.dict.gz.cmcc:8080
      restartPolicy: Always
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1