apiVersion: apps/v1
kind: Deployment
metadata:
  name: "ratelimit-deployment"
  namespace: "ratelimit"
  labels:
    component: "ratelimit"
    project: "demo"
spec:
  replicas: 1
  selector:
    matchLabels:
      component: "ratelimit"
      project: "demo"
  template:
    metadata:
      name: "ratelimit"
      labels:
        component: "ratelimit"
        project: "demo"
    spec:
      containers:
        - "name": "ratelimit-server"
          "image": "envoyproxy/ratelimit:v1.4.0"
          "imagePullPolicy": "IfNotPresent"
          "ports":
            - "containerPort": 8080
            - "containerPort": 8081
            - "containerPort": 6070
          "env":
            - name: "LOG_LEVEL"
              value: "debug"
            - name: "REDIS_SOCKET_TYPE"
              value: "tcp"
            - name: "REDIS_URL"
              value: "localhost:6379"
            - name: "RUNTIME_ROOT"
              value: "/data"
            - name: "RUNTIME_SUBDIRECTORY"
              value: "ratelimit"
            - name: "RUNTIME_WATCH_ROOT"
              value: "true"
            - name: "USE_STATSD"
              value: "false"
          command: ["/bin/sh","-c"]
          args: ["mkdir -p /data/ratelimit;/bin/ratelimit"]
        - "name": "ratelimit-redis"
          "image": "redis:alpine"
          "imagePullPolicy": "IfNotPresent"
          "ports":
            - "containerPort": 6379


