apiVersion: apps/v1
kind: Deployment
metadata:
  name: azure-devops-janitor-api-deployment
  namespace: developerautomation-xavgy
  labels:
    project: developerautomation
    department: cloudengineering
    component: azure-devops-janitor
    app: azure-devops-janitor-api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: azure-devops-janitor-api
  template:
    metadata:
      labels:
        project: developerautomation
        department: cloudengineering
        app: azure-devops-janitor-api
    spec:
      priorityClassName: selfservice
      containers:
      - name: azure-devops-janitor-api
        image: 642375522597.dkr.ecr.eu-west-1.amazonaws.com/dfds.developerautomation-xavgy.azure-devops-janitor:azure-devops-janitor-api-#(Build.BuildId)
        ports:
        - containerPort: 54323
          name: web
        - containerPort: 8080
          name: metrics
        env:
          - name: AdoClient__ClientAccessToken
            valueFrom:
              secretKeyRef:
                name: ado-credentials
                key: clientAccessToken
          - name: Kafka__Configuration__sasl.username
            valueFrom:
              secretKeyRef:
                name: kafka-credentials
                key: username
          - name: Kafka__Configuration__sasl.password
            valueFrom:
              secretKeyRef:
                name: kafka-credentials
                key: password
        resources:
          requests:
            memory: "200Mi"
            cpu: "100m"
          limits:
            memory: "400Mi"
            cpu: "200m"