apiVersion: apps/v1
kind: Deployment
metadata:
  name: phpipam-cron
spec:
  replicas: 1
  selector:
    matchLabels:
      app: phpipam-cron
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: phpipam-cron
    spec:
      containers:
        - env:
            - name: IPAM_DATABASE_HOST
              value: phpipam-db
            - name: IPAM_DATABASE_USER
              value: root
            - name: IPAM_DATABASE_PASS
              value: Saasadmin1234@
            - name: IPAM_DATABASE_NAME
              value: phpipam
            - name: SCAN_INTERVAL
              value: 3m
            - name: TZ
              value: Asia/Seoul
          image: phpipam/phpipam-cron:latest
          name: phpipam-cron
          resources: {}
          volumeMounts:
            - mountPath: /usr/local/share/ca-certificates
              name: phpipam-ca
            - name: phpipam-crontab-setting
              mountPath: /etc/crontabs/root
              subPath: root
      restartPolicy: Always
      volumes:
        - name: phpipam-ca
          persistentVolumeClaim:
            claimName: phpipam-ca
        - name: phpipam-crontab-setting
          configMap:
            name: phpipam-crontab-setting
status: {}
