apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: actions-cache-server
  name: actions-cache-server
spec:
  selector:
    matchLabels:
      app: actions-cache-server
  revisionHistoryLimit: 10
  minReadySeconds: 0
  template:
    metadata:
      annotations:
        prometheus.io/scrape: 'true'
        prometheus.io/port: '9102'
      labels:
        app: actions-cache-server
    spec:
      containers:
        - name: server
          image: ghcr.io/terrycain/actions-cache-server:0.1.7
          imagePullPolicy: IfNotPresent
          env:
            - name: LISTEN_ADDR
              value: 0.0.0.0:80
            - name: LOG_LEVEL
              value: info
          securityContext:
            capabilities:
              drop:
                - ALL
              add:
                - NET_BIND_SERVICE
          livenessProbe:
            failureThreshold: 5
            httpGet:
              path: /healthz
              port: 80
              scheme: HTTP
            initialDelaySeconds: 10
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          ports:
            - name: http
              containerPort: 80
              protocol: TCP
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
      nodeSelector:
        kubernetes.io/os: linux
