---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kobs
  namespace: kobs
  labels:
    app.kubernetes.io/name: kobs
    app.kubernetes.io/instance: kobs
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: kobs
      app.kubernetes.io/instance: kobs
  template:
    metadata:
      labels:
        app.kubernetes.io/name: kobs
        app.kubernetes.io/instance: kobs
    spec:
      serviceAccountName: kobs
      containers:
        - name: kobs
          image: "kobsio/kobs:v0.7.0"
          imagePullPolicy: IfNotPresent
          args:
            - --log.level=info
            - --log.format=plain
          ports:
            - name: http-web
              containerPort: 15219
              protocol: TCP
            - name: http-api
              containerPort: 15220
              protocol: TCP
            - name: http-metrics
              containerPort: 15221
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /health
              port: http-web
          readinessProbe:
            httpGet:
              path: /health
              port: http-web
          resources:
            requests:
              cpu: 100m
              memory: 64Mi
            limits:
              cpu: 200m
              memory: 128Mi
          volumeMounts:
            - name: config
              mountPath: /kobs/config.yaml
              subPath: config.yaml
              readOnly: true
      volumes:
        - name: config
          configMap:
            name: kobs
