apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: resource
    project: resource
  name: resource-arangodb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: resource-arangodb
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: resource-arangodb
    spec:
      containers:
      - env:
        - name: ARANGO_ROOT_PASSWORD
          valueFrom:
            secretKeyRef:
              key: ARANGO_ROOT_PASSWORD
              name: resource-db-password
        image: arangodb:3.3.21
        imagePullPolicy: IfNotPresent
        name: resource-arangodb
        ports:
        - containerPort: 8529
          name: tcp
          protocol: TCP
        resources:
          limits:
            cpu: "3"
            memory: 512Mi
          requests:
            cpu: 500m
            memory: 128Mi
        volumeMounts:
        - mountPath: /var/lib/arangodb3
          name: arangodb-data
      volumes:
      - name: arangodb-data
        persistentVolumeClaim:
          claimName: resource-arangodb-data
