apiVersion: apps/v1
kind: Deployment
metadata:
  name: service-proxy
  namespace: service-proxy-e2e
  labels:
    app: service-proxy
    app.kubernetes.io/name: service-proxy
    app.kubernetes.io/part-of: service-proxy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: service-proxy
  template:
    metadata:
      labels:
        app: service-proxy
    spec:
      containers:
        - name: service-proxy
          image: service-proxy:e2e
          imagePullPolicy: Never
          ports:
            - name: http
              containerPort: 8080
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 3
            periodSeconds: 10
            timeoutSeconds: 3
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8080
            initialDelaySeconds: 2
            periodSeconds: 5
            timeoutSeconds: 3
            failureThreshold: 6
          volumeMounts:
            - name: config
              mountPath: /etc/config.yaml
              subPath: config.yaml
              readOnly: true
          resources:
            requests:
              memory: "64Mi"
              cpu: "20m"
            limits:
              memory: "256Mi"
              cpu: "200m"
          securityContext:
            allowPrivilegeEscalation: false
            runAsNonRoot: true
            capabilities:
              drop:
                - ALL
      volumes:
        - name: config
          configMap:
            name: service-proxy-config
