enix / kube-image-keeper

kuik is a container image caching system for Kubernetes
MIT License
445 stars 32 forks source link

cronjob garbage-collection can't be resources specified #359

Closed RogerSik closed 1 month ago

RogerSik commented 3 months ago

For the cronjob I can't specificy

          resources:
            limits:
              memory: 200Mi
            requests:
              cpu: 10m
              memory: 100Mi

because i have in every namespace ResourceQuota enabled (enforcement of use of resources.limits and resources.requests) the pod is failing queitly (no scheduling of the pod).

RogerSik commented 3 months ago

A workaround is to use LimitRange. For everyone who is struggling with the same issue:

apiVersion: v1
kind: LimitRange
metadata:
  name: kuik
  namespace: kuik
spec:
  limits:
    - default:
        memory: 200Mi
      defaultRequest:
        cpu: 10m
        memory: 100Mi
      type: Container
Nicolasgouze commented 2 months ago

Hi @RogerSik , Thanks for this proposal. @donch will soon update the chart with these parameters ! I'll then close this ticket.