apiVersion: apps/v1
kind: Deployment
metadata:
  name: kafka-janitor
  namespace: $(kubernetes-namespace)
  labels:
    project: selfservice
    department: devex
    app: kafka-janitor
    component: kafka-janitor
    version: 0.0.1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kafka-janitor
  template:
    metadata:
      labels:
        logging_dfds_cloud_format_json: "true"
        app: kafka-janitor
        project: selfservice
        department: devex
      annotations:
        iam.amazonaws.com/role: PutKafkaParameter
        prometheus.io/port: "8080"
        prometheus.io/scrape: "true"
    spec:
      priorityClassName: selfservice
      containers:
      - name: kafka-janitor
        image: 579478677147.dkr.ecr.eu-central-1.amazonaws.com/ded/kafka-janitor:$(Build.BuildId)
        securityContext:
          runAsUser: 10001
          runAsGroup: 3000
          runAsNonRoot: true
          allowPrivilegeEscalation: false
        ports:
        - containerPort: 5000
          name: web
        - containerPort: 8080
          name: metrics
        resources:
          requests:
            memory: "64Mi"
            cpu: "100m"
          limits:
            memory: "128Mi"
            cpu: "200m"
        env:
        - name: "KAFKAJANITOR_VAULT_HEALTHCHECK"
          value: "false"
        - name: TIKA_ENABLE_MULTI_CLUSTER
          value: "true"
        - name: "TIKA_API_ENDPOINT"
          value: "http://tika-lkc-4npj6:3000"
        - name: KAFKAJANITOR_VAULT
          value: "AWS_SSM"
        - name: ASPNETCORE_URLS
          value: http://+:5000
        livenessProbe:
          initialDelaySeconds: 5
          periodSeconds: 60
          timeoutSeconds: 5
          httpGet:
            port: web
            path: /healthz
        readinessProbe:
          initialDelaySeconds: 5
          periodSeconds: 10
          timeoutSeconds: 5
          httpGet:
            port: web
            path: /healthz