apiVersion: apps/v1
kind: Deployment
metadata:
  name: twemproxy
  labels:
    app: twemproxy
spec:
  selector:
    matchLabels:
      app: twemproxy
  template:
    metadata:
      labels:
        app: twemproxy
    spec:
      containers:
      - name: twemproxy
        image: jgoodall/twemproxy
        ports:
        - name: twemproxy
          containerPort: 22121
        resources:
          requests:
            memory: 256Mi
            cpu: 100m
        volumeMounts:
        - name: "twemproxy-conf"
          mountPath: "/etc/twemproxy/conf"
      volumes:
        - name: "twemproxy-conf"
          configMap:
            name: "twemproxy-conf"
            items:
              - key: "twemproxy.yml"
                path: "twemproxy.yml"