apiVersion: apps/v1
kind: Deployment
metadata:
  name: telemetry
  labels:
    app: telemetry
spec:
  replicas: 1
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  selector:
    matchLabels:
      app: telemetry
  template:
    metadata:
      labels:
        app: telemetry
      annotations:
        prometheus.io/scrape: "false"
        prometheus.io/port: "9090"
    spec:
      restartPolicy: Always
      containers:
        - name: telemetry-backend
          image: parity/substrate-telemetry-backend
          args:
            - "--listen"
            - "0.0.0.0:8000"
          ports:
            - name: web
              containerPort: 8000
          env:
            - name: SUBSTRATE_TELEMETRY_URL
              value: "ws://localhost:10001/feed"
        - name: telemetry-frontend
          image: parity/substrate-telemetry-frontend
          ports:
            - name: web
              containerPort: 80
