apiVersion: apps/v1
kind: Deployment
metadata:
  name: zabbix-proxy-pod
  labels:
    app: zabbix-proxy
spec:
  # preparation for Zabbix HA setup, which shall be available since version 6.0 - then replicas may be greater than 1
  replicas: 1
  selector:
    matchLabels:
      app: zabbix-proxy
  template:
    metadata:
      labels:
        app: zabbix-proxy
    spec:
      containers:
      - name: zabbix-proxy-sqlite3 
        image: docker.io/zabbix/zabbix-proxy-sqlite3:5.4.4-alpine
        ports:
        - protocol: TCP
          containerPort: 10051
        volumeMounts:
        - name: db-data
          mountPath: /var/lib/zabbix/db_data
      - name: zabbix-agent2
        image: docker.io/zabbix/zabbix-agent2:5.4.4-alpine
        ports:
        - protocol: TCP
          containerPort: 10050
      volumes:
      - name: db-data
#        persistentVolumeClaim:
#          claimName: azure-managed-disk
        emptyDir: {}
      securityContext:
        fsGroup: 1997
    
#      env: # defaults according to https://hub.docker.com/r/zabbix/zabbix-proxy-sqlite3
#      - name: ZBX_PROXYMODE
#        value: 0
#      - name: ZBX_HOSTNAME
#        value: "zabbix-proxy-sqlite3"
#      - name: ZBX_SERVER_HOST
#        value: "zabbix-server"
#      - name: ZBX_SERVER_PORT
#        value: 10051
#      - name: ZBX_LOADMODULE
#        value: ""
#      - name: ZBX_DEBUGLEVEL
#        value: 3
#      - name: ZBX_TIMEOUT
#        value: 4
#      - name: ZBX_JAVAGATEWAY_ENABLE
#        value: false
#      - name: ZBX_VAULTDBPATH
#        value: ""
#      - name: ZBX_VAULTURL
#        value: "https://127.0.0.1:8200"
#      - name: ZBX_ENABLEREMOTECOMMANDS
#        value: 0
#      - name: VAULT_TOKEN
#        value: ""
#      - name: ZBX_SOURCEIP
#        value: ""
#      - name: ZBX_HOSTNAMEITEM
#        value: "system.hostname"


#    resources:
#      request:
#        cpu: ???
#        memory: ???
#      limit:
#        cpu: ???
#        memory: ???

#    readinessProbe:
#      tcpSocket:
#        port: ???

#    livenessProbe:
#      tcpSocket:
#        port: ???   


#  - name: zabbix-agent2
#    image: zabbix/zabbix-agent2:alpine-5.4.4


#    emptyDir: {} 

