apiVersion: apps/v1
kind: Deployment
metadata:
  name: hdfs-httpfs
spec:
  replicas: 1
  selector:
    matchLabels: {}
  template:
    spec:
      initContainers:
      - name: httpfs-prepare
        image: zookage-util
        args:
        - hdfs-httpfs-prepare
        envFrom:
        - configMapRef:
            name: hadoop-env
        - configMapRef:
            name: httpfs-env
        securityContext:
          runAsUser: 0
          runAsGroup: 0
        volumeMounts:
        - name: catalina
          mountPath: /var/opt/catalina
        - name: hadoop-conf
          mountPath: /etc/hadoop/conf
        - name: package-hadoop
          mountPath: /opt/hadoop
      containers:
      - name: httpfs
        image: zookage-util
        args:
        - hdfs-httpfs
        envFrom:
        - configMapRef:
            name: hadoop-env
        - configMapRef:
            name: httpfs-env
        readinessProbe:
          tcpSocket:
            port: 14000
        securityContext:
          runAsUser: 1014
          runAsGroup: 1014
        volumeMounts:
        - name: catalina
          mountPath: /var/opt/catalina
        - name: hadoop-conf
          mountPath: /etc/hadoop/conf
        - name: mnt
          mountPath: /mnt
        - name: package-hadoop
          mountPath: /opt/hadoop
        - name: httpfs-tmp
          mountPath: /var/tmp/httpfs
      terminationGracePeriodSeconds: 5
      volumes:
      - name: catalina
        emptyDir: {}
      - name: hadoop-conf
        configMap:
          name: hadoop-conf
      - name: mnt
        emptyDir: {}
      - name: package-hadoop
        persistentVolumeClaim:
          claimName: package-hadoop
      - name: httpfs-tmp
        emptyDir: {}
