apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: hsds-bucket-watch
  name: hsds-bucket-watch
spec:
  replicas: 1
  selector:
    matchLabels:
      app: hsds-bucket-watch
  template:
    metadata:
      labels:
        app: hsds-bucket-watch
    spec:
      serviceAccountName: hsds-eks-policy
      containers:
        -
          name: watch
          image: hdfgroup/bucket_loader:v0.3
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              memory: "128M"
            limits:
              memory: "256M"
          volumeMounts:
          - name: bucket-config
            mountPath: "/config/config.yml"
            subPath: config.yml
          env:
          - name: RUN_COMMAND
            value: watch
          - name: PASSWORD_FILE
            value: /config/passwd.txt
          - name: HS_USERNAME
            valueFrom:
              secretKeyRef:
                name: hs-loader-keys
                key: hs_username
          - name: HS_PASSWORD
            valueFrom:
              secretKeyRef:
                name: hs-loader-keys
                key: hs_password
      volumes:
      - name: accounts
        secret:
          secretName: user-password
      - name: bucket-config
        configMap:
          name: hsds-bucket-loader-config
      - name: hsds-config
        configMap:
          name: hsds-config
      - name: hsds-override
        configMap:
          name: hsds-override