apiVersion: apps/v1
kind: Deployment
metadata:
  name: sdx-transform
  labels:
    app: sdx-transform
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sdx-transform
  template:
    metadata:
      labels:
        app: sdx-transform
    spec:
      containers:
      - image: eu.gcr.io/{{ .Values.registry_location }}/sdx-transform:{{ .Chart.AppVersion }}
        imagePullPolicy: Always
        name: sdx-transform
        resources:
          requests:
            memory: "512Mi"
            cpu: "250m"
          limits:
            memory: "512Mi"
            cpu: "250m"
        ports:
        - containerPort: 5000
        livenessProbe:
          httpGet:
            path: /healthcheck
            port: 5000
          initialDelaySeconds: 30
          timeoutSeconds: 10
          periodSeconds: 30
          failureThreshold: 3
        env:
        - name: PROJECT_ID
          valueFrom:
            configMapKeyRef:
              name: sdx-config
              key: project_id
        - name: LOGGING_LEVEL
          valueFrom:
            configMapKeyRef:
              name: sdx-config
              key: logging_level
        - name: FTP_PATH
          valueFrom:
            configMapKeyRef:
              name: sdx-config
              key: ftp_path
      serviceAccountName: sdx-workload-identity
