---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ruler
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ruler
  template:
    metadata:
      labels:
        name: ruler
    spec:
      containers:
      - name: ruler
        image: quay.io/cortexproject/cortex:v1.8.1
        imagePullPolicy: IfNotPresent
        args:
        - -target=ruler
        - -log.level=debug
        - -server.http-listen-port=80
        - -ruler.configs.url=http://configs.default.svc.cluster.local:80
        - -ruler.alertmanager-url=http://alertmanager.default.svc.cluster.local/alertmanager/
        - -consul.hostname=consul.default.svc.cluster.local:8500
        - -s3.url=s3://cortex:supersecret@default.svc.cluster.local:9000/cortex
        - -s3.force-path-style=true
        - -dynamodb.url=dynamodb://user:pass@dynamodb.default.svc.cluster.local:8000
        - -schema-config-file=/etc/cortex/schema.yaml
        - -store.chunks-cache.memcached.hostname=memcached.default.svc.cluster.local
        - -store.chunks-cache.memcached.timeout=100ms
        - -store.chunks-cache.memcached.service=memcached
        - -distributor.replication-factor=1
        ports:
        - containerPort: 80
        volumeMounts:
        - name: config-volume
          mountPath: /etc/cortex
      volumes:
        - name: config-volume
          configMap:
            name: schema-config
