---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: alertmanager
  namespace: imxc
spec:
  replicas: 1
  selector:
    matchLabels:
      name: alertmanager
  template:
    metadata:
      labels:
        name: alertmanager
    spec:
      imagePullSecrets:
      - name: {{ .Values.global.imagepullsecrets }}
      containers:
      - name: alertmanager
#        image: quay.io/cortexproject/cortex:v1.9.0
#        image: registry.cloud.intermax:5000/library/cortex:v1.11.0
        image: {{ .Values.global.IMXC_IN_REGISTRY }}/cortex:v1.11.0
        imagePullPolicy: IfNotPresent
        args:
        - -target=alertmanager
#        - -log.level=debug
        - -server.http-listen-port=80
        - -alertmanager.configs.url=http://{{ template "cortex.fullname" . }}-configs:8080
        - -alertmanager.web.external-url=/alertmanager
        ports:
        - containerPort: 80
