apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    control-plane: controller
  name: source-watcher
  namespace: flux-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app: source-watcher
  template:
    metadata:
      annotations:
        prometheus.io/port: "8080"
        prometheus.io/scrape: "true"
      labels:
        app: source-watcher
    spec:
      serviceAccountName: source-controller
      terminationGracePeriodSeconds: 10
      containers:
      - args:
        - --log-level=debug
        - --log-encoding=console
        env:
        - name: RUNTIME_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: ghcr.io/c0c0n3/osmops:latest
        imagePullPolicy: IfNotPresent
        name: manager
        ports:
        - containerPort: 8080
          name: http-prom
        resources:
          limits:
            cpu: 1000m
            memory: 1Gi
          requests:
            cpu: 50m
            memory: 64Mi
        securityContext:
          allowPrivilegeEscalation: false
          readOnlyRootFilesystem: true
        volumeMounts:
          - name: osmops
            mountPath: "/etc/osmops"
            readOnly: true
          - mountPath: /tmp
            name: tmp
      volumes:
        - name: osmops
          secret:
            secretName: nbi-connection
        - name: tmp
          emptyDir: {}


