rules:
  - id: no-fractional-cpu-limits
    patterns:
      - pattern-inside: |
          limits:
            ...
      - pattern: |
          cpu: $CPU_LIMIT
      - metavariable-regex:
          metavariable: $CPU_LIMIT
          regex: \d{0,3}m
    fix: "cpu: 1000m"
    message: >-
      When you set a fractional CPU limit on a container,
      the CPU cycles available will be throttled,
      even though most nodes can handle processes
      alternating between using 100% of the CPU.
    severity: WARNING
    languages: [yaml]
    metadata:
      category: best-practice
      technology:
        - kubernetes
