canonical / microk8s-core-addons

Core MicroK8s addons
Apache License 2.0
43 stars 34 forks source link

No Resource requests for addons #223

Closed jniclas closed 1 year ago

jniclas commented 1 year ago

Summary

Hey, I am new to microk8s and after deploying a 3-mode cluster and enabling cert-manager, server-metrics, ingress and dns, I only found resource requests in the coredns service, but not on ingress, cert-manager and server-metrics. Is this by design, or do I have to enable the addons with an extra yaml, that specifies resource requests and limits?

Why is this important?

It would be important to manage the resources properly, especially when the cluster uses a lot of addons.

Are you interested in contributing to this feature?

maybe, did not do that for until now.

ktsakalozos commented 1 year ago

Hi @jniclas, welcome to k8s. What do you mean by "resource requests"? Can you give me an example of what kind of manageable resources you have for coredns?

jniclas commented 1 year ago

of course, when I output the coredns values, the service, enabled by microk8s enable dns I get values:

containers:
  - name: coredns
    image: coredns/coredns:1.10.0
    ...
    resources:
      limits:
        memory: 170Mi
      requests:
        cpu: 100m
        memory: 70Mi

But cert-manager has values:

containers:
  - name: cert-manager
    image: quay.io/jetstack/cert-manager-webhook:v1.8.0
    ...
    resources: {}
ktsakalozos commented 1 year ago

Indeed some of the manifests in the addons do not specify any resource requests and limits [1]. One way to set them is to edit the yaml files you find under /var/snap/microk8s/common/addons/core/addons/the_addon_name/ before enabling the addon.

[1] https://kubernetes.io/docs/concepts/configuration/manage-resources-containers

jniclas commented 1 year ago

ah ok, thanks!