apiVersion: apps/v1
kind: Deployment
metadata:
  name: espocrm
spec:
  replicas: 1
  selector:
    matchLabels:
      app: espocrm
  template:
    metadata:
      labels:
        app: espocrm
    spec:
      containers:
        - name: espocrm
          image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - containerPort: 80
          env:          
            - name: ESPOCRM_DATABASE_PLATFORM
              value: "Mysql"
            - name: ESPOCRM_DATABASE_HOST
              value: {{ .Values.database.host }}   # value: "hf-espocrm-mariadb"
            - name: ESPOCRM_DATABASE_USER
              value: {{ .Values.database.user }}   # value: "espocrm"
            - name: ESPOCRM_DATABASE_PASSWORD
              value: {{ .Values.database.password }}  # value: value: "espocrm-pass" 
            - name: ESPOCRM_DATABASE_NAME
              value: {{ .Values.database.name }} # value: "my_database"  
