apiVersion: apps/v1
kind: Deployment
metadata:
  name: httplogger
  namespace: monitoring
spec:
  replicas: 2
  selector:
    matchLabels:
      app: httplogger
  template:
    metadata:
      labels:
        app: httplogger
      annotations:
        prometheus.io/path: "/metrics"
        prometheus.io/port: "8080"
        prometheus.io/scrape: "true"
        container.seccomp.security.alpha.kubernetes.io/httplogger: runtime/default
    spec:
      containers:
        - name: httplogger
          image: czarsimon/httplogger:0.8
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
          resources:
            requests:
              memory: 50Mi
              cpu: 50m
            limits:
              memory: 100Mi
              cpu: 100m
          env:
            - name: JAEGER_DISABLED
              value: "true"
          livenessProbe:
            httpGet:
              path: /health
              port: 8080
            initialDelaySeconds: 30
            periodSeconds: 5
            timeoutSeconds: 2
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /health
              port: 8080
            initialDelaySeconds: 20
            periodSeconds: 5
            timeoutSeconds: 2
            successThreshold: 1
            failureThreshold: 3
          securityContext:
            seccompProfile:
              type: RuntimeDefault
            allowPrivilegeEscalation: false
            capabilities:
              drop: ["ALL"]
            runAsNonRoot: true
            readOnlyRootFilesystem: true
            runAsUser: 10001
            runAsGroup: 10001
