apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontier-squid
  namespace: cvmfs
  labels:
    k8s-app: frontier-squid
spec:
  selector:
    matchLabels:
      k8s-app: frontier-squid
  template:
    metadata: 
      labels:
        k8s-app: frontier-squid
    spec:
      containers:
      - name: frontier-squid
        image: fbarreir/frontier-squid:latest
        imagePullPolicy: Always
        #command: ["sh", "-c", "sleep infinity"]
        resources:
           limits:
             memory: 4Gi
             cpu: 1
             ephemeral-storage: 20Gi
           requests:
             memory: 2Gi
             cpu: 1
             ephemeral-storage: 10Gi
        ports:
        - containerPort: 3128
        volumeMounts:
          - name: config-map-frontier
            mountPath: /etc/squid/customize_k8s.sh
            subPath: customize_k8s.sh
      priorityClassName: system-cluster-critical
      volumes:
      - name: config-map-frontier
        configMap:
          name: config-map-frontier
          defaultMode: 0777

