---                                                    
apiVersion: apps/v1                                    
kind: Deployment
metadata:
  name: emojify-cache
  labels:
    app: emojify-cache
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: emojify-cache
  template:
    metadata:
      labels:
        app: emojify-cache
      annotations:
        "consul.hashicorp.com/connect-inject": "true"
        "consul.hashicorp.com/connect-service-protocol": "grpc"
        "prometheus_io_scrape": "true"
    spec:
      containers:

      - name: emojify-cache
        image: "nicholasjackson/emojify-cache:v0.4.3"
        ports:
        - containerPort: 9090
        env:
        - name: STATSD_ADDRESS
          value: localhost:9125
      
      - name: prometheus-statsd
        image: "prom/statsd-exporter:latest"
        ports:
          - name: metrics
            containerPort: 9102
          - name: statsd
            containerPort: 9125
        resources:
          limits:
            memory: 100Mi
          requests:
            cpu: 100m
            memory: 100Mi
