apiVersion: apps/v1
kind: Deployment
metadata:
  name: lake-publisher
  namespace: stonks-oracle
  labels:
    app: lake-publisher
    app.kubernetes.io/part-of: stonks-oracle
    stonks-oracle/tier: analytics
spec:
  replicas: 1
  selector:
    matchLabels:
      app: lake-publisher
  template:
    metadata:
      labels:
        app: lake-publisher
        stonks-oracle/tier: analytics
    spec:
      automountServiceAccountToken: false
      securityContext:
        runAsNonRoot: true
        runAsUser: 1000
        runAsGroup: 1000
        fsGroup: 1000
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: lake-publisher
          image: registry.celestium.life/stonks-oracle/lake-publisher:latest
          imagePullPolicy: Always
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            capabilities:
              drop: ["ALL"]
          envFrom:
            - configMapRef:
                name: stonks-config
            - secretRef:
                name: stonks-core-secrets
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
            limits:
              cpu: 500m
              memory: 256Mi
          volumeMounts:
            - name: tmp
              mountPath: /tmp
      volumes:
        - name: tmp
          emptyDir:
            sizeLimit: 10Mi
