apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/managed-by: karavel
    app.kubernetes.io/name: grafana-operator
    app.kubernetes.io/part-of: grafana
    app.kubernetes.io/version: 8.3.3
    karavel.io/component-name: grafana
    karavel.io/component-version: 0.1.0-SNAPSHOT
  name: grafana-operator
  namespace: monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/managed-by: karavel
      app.kubernetes.io/name: grafana-operator
      app.kubernetes.io/part-of: grafana
      karavel.io/component-name: grafana
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app.kubernetes.io/managed-by: karavel
        app.kubernetes.io/name: grafana-operator
        app.kubernetes.io/part-of: grafana
        app.kubernetes.io/version: 8.3.3
        karavel.io/component-name: grafana
        karavel.io/component-version: 0.1.0-SNAPSHOT
    spec:
      containers:
      - args:
        - --zap-log-level=info
        - --scan-all
        - --grafana-image=docker.io/grafana/grafana
        - --grafana-image-tag=8.3.3
        command:
        - /manager
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: WATCH_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: quay.io/grafana-operator/grafana-operator:v4.1.1
        imagePullPolicy: Always
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 15
          periodSeconds: 20
        name: manager
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8081
          initialDelaySeconds: 5
          periodSeconds: 10
        resources:
          limits:
            cpu: 200m
            memory: 300Mi
          requests:
            cpu: 100m
            memory: 100Mi
        securityContext:
          allowPrivilegeEscalation: false
      serviceAccountName: grafana-operator
      terminationGracePeriodSeconds: 10
