<commit_before>{{- range $index, $memcached := .Values.memcached_servers }}
kind: Deployment
apiVersion: apps/v1

metadata:
  name: swift-{{ $memcached }}
  labels:
    release: "{{ $.Release.Name }}"
spec:
  revisionHistoryLimit: 5
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 3
  selector:
    matchLabels:
      name: swift-{{ $memcached }}
  template:
    metadata:
      labels:
        name: swift-{{ $memcached }}
    spec:
      containers:
        - name: memcached
          image: {{ $.Values.global.dockerHubMirrorAlternateRegion }}/library/memcached:{{ $.Values.image_version_auxiliary_memcached }}
          ports:
            - name: memcached
              containerPort: 11211
          command: ["memcached", "-m", "1024", "-c", "16384"]
          resources:
            # observed usage: CPU = 15m-100m, RAM = 25-70 MiB
            requests:
              cpu: '50m'
              memory: '1024Mi'
            limits:
              cpu: '200m'
              memory: '2048Mi'
        - name: metrics
          image: {{ $.Values.global.dockerHubMirrorAlternateRegion }}/prom/memcached-exporter:{{ $.Values.image_version_auxiliary_memcached_exporter }}
          ports:
            - name: metrics
              containerPort: 9150
          resources:
            # observed usage: CPU <= 2m-4m, RAM = 18-20 MiB
            requests:
              cpu: '10m'
              memory: '36Mi'
            limits:
              cpu: '50m'
              memory: '64Mi'
---
{{end}}<commit_msg>swift: give the memcached metrics container some more headroom<commit_after>{{- range $index, $memcached := .Values.memcached_servers }}
kind: Deployment
apiVersion: apps/v1

metadata:
  name: swift-{{ $memcached }}
  labels:
    release: "{{ $.Release.Name }}"
spec:
  revisionHistoryLimit: 5
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 3
  selector:
    matchLabels:
      name: swift-{{ $memcached }}
  template:
    metadata:
      labels:
        name: swift-{{ $memcached }}
    spec:
      containers:
        - name: memcached
          image: {{ $.Values.global.dockerHubMirrorAlternateRegion }}/library/memcached:{{ $.Values.image_version_auxiliary_memcached }}
          ports:
            - name: memcached
              containerPort: 11211
          command: ["memcached", "-m", "1024", "-c", "16384"]
          resources:
            # observed usage: CPU = 15m-100m, RAM = 25-70 MiB
            requests:
              cpu: '50m'
              memory: '1024Mi'
            limits:
              cpu: '200m'
              memory: '2048Mi'
        - name: metrics
          image: {{ $.Values.global.dockerHubMirrorAlternateRegion }}/prom/memcached-exporter:{{ $.Values.image_version_auxiliary_memcached_exporter }}
          ports:
            - name: metrics
              containerPort: 9150
          resources:
            # observed usage: CPU <= 2m-4m, RAM = up to 50 MiB
            requests:
              cpu: '10m'
              memory: '64Mi'
            limits:
              cpu: '50m'
              memory: '128Mi'
---
{{end}}
{'fraction_non_alphanumeric': 0.11797929086915594, 'fraction_numerical': 0.03671164104173204, 'mean_word_length': 1.8014059753954306, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1080695', 'n_tokens_mistral': 1021, 'n_tokens_neox': 923, 'n_words': 223}