apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    app.kubernetes.io/managed-by: karavel
    app.kubernetes.io/name: goldpinger
    app.kubernetes.io/part-of: goldpinger
    app.kubernetes.io/version: 3.3.0
    karavel.io/component-name: goldpinger
    karavel.io/component-version: 0.1.0-SNAPSHOT
  name: goldpinger
  namespace: monitoring
spec:
  selector:
    matchLabels:
      app.kubernetes.io/managed-by: karavel
      app.kubernetes.io/name: goldpinger
      app.kubernetes.io/part-of: goldpinger
      karavel.io/component-name: goldpinger
  template:
    metadata:
      annotations:
        prometheus.io/port: "8080"
        prometheus.io/scrape: "true"
      labels:
        app.kubernetes.io/managed-by: karavel
        app.kubernetes.io/name: goldpinger
        app.kubernetes.io/part-of: goldpinger
        app.kubernetes.io/version: 3.3.0
        karavel.io/component-name: goldpinger
        karavel.io/component-version: 0.1.0-SNAPSHOT
    spec:
      containers:
      - env:
        - name: HOST
          value: 0.0.0.0
        - name: PORT
          value: "8080"
        - name: HOSTNAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        - name: POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: HOSTS_TO_RESOLVE
          value: kubernetes.io
        - name: LABEL_SELECTOR
          value: app.kubernetes.io/name=goldpinger,karavel.io/component-name=goldpinger
        image: docker.io/bloomberg/goldpinger:v3.3.0
        imagePullPolicy: Always
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 20
          periodSeconds: 5
        name: goldpinger
        ports:
        - containerPort: 8080
          name: http
        readinessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 20
          periodSeconds: 5
        resources:
          limits:
            memory: 80Mi
          requests:
            cpu: 1m
            memory: 40Mi
        securityContext:
          allowPrivilegeEscalation: false
          readOnlyRootFilesystem: true
      securityContext:
        fsGroup: 2000
        runAsNonRoot: true
        runAsUser: 1000
      serviceAccountName: goldpinger
      tolerations:
      - effect: NoSchedule
        operator: Exists
  updateStrategy:
    type: RollingUpdate
