---
# memcached deployment used by Flux to cache
# container image metadata.
apiVersion: apps/v1
kind: Deployment
metadata:
  name: memcached
  namespace: flux
spec:
  replicas: 1
  selector:
    matchLabels:
      name: memcached
  template:
    metadata:
      labels:
        name: memcached
    spec:
      nodeSelector:
        beta.kubernetes.io/os: linux
      containers:
        - name: memcached
          image: memcached:1.5.20
          imagePullPolicy: IfNotPresent
          args:
            - -m 512    # Maximum memory to use, in megabytes
            - -I 5m     # Maximum size for one item
            - -p 11211  # Default port
            # - -vv     # Uncomment to get logs of each request and response.
          ports:
            - name: clients
              containerPort: 11211
          securityContext:
            runAsUser: 11211
            runAsGroup: 11211
            allowPrivilegeEscalation: false
