apiVersion: v1
kind: ReplicationController
metadata:
  name: zabbix-web
  namespace: monitoring
  labels:
    app: zabbix
    tier: frontend
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: zabbix-web
        app: zabbix
    spec:
      containers:
        - name: zabbix-web
          #image: monitoringartist/zabbix-xxl:latest
          image: zabbix/zabbix-web-nginx-pgsql:alpine-4.2.0
          ports:
          - containerPort: 80
          env:
          - name: ZBX_SERVER_HOST
            value: "zabbix-server"
          - name: ZBX_SERVER_PORT
            value: "10051"
          - name: DB_SERVER_HOST
            value: "zabbix-db"
          - name: POSTGRES_DB
            value: "zabbix"
          - name: POSTGRES_USER
            value: "zabbix"
          - name: POSTGRES_PASSWORD
            value: "pg_password"
          - name: PHP_TZ
            value: "Asia/Shanghai"
          #- name: ZBX_HISTORYSTORAGEURL
          #  value: "http://elasticsearch:9200"
          #- name: ZBX_HISTORYSTORAGETYPES
          #  value: "uint,dbl,str,log,text"
          - name: ZBX_MAXEXECUTIONTIME
            value: "600"
          - name: ZBX_MEMORYLIMIT
            value: "256M"
          - name: ZBX_POSTMAXSIZE
            value: "32M"
          - name: ZBX_UPLOADMAXFILESIZE
            value: "32M"
          - name: ZBX_MAXINPUTTIME
            value: "600"
          - name: ZBX_SESSION_NAME
            value: "zbx_sessionid"
