From 708efca878985482321ee667c1e272e102c31c73 Mon Sep 17 00:00:00 2001 From: Grant Hunter <5445379+grantdhunter@users.noreply.github.com> Date: Sun, 7 Dec 2025 15:25:24 -0700 Subject: [PATCH] set memory limits --- 53ll/values.yaml.gotmpl | 10 +++++----- helmfile.d/01-infrastructure.yaml | 2 ++ immich/values.yaml.gotmpl | 14 ++++++++++---- incngrnt-web/values.yaml.gotmpl | 8 ++++++++ k8up-backup/values.yaml.gotmpl | 8 ++++++++ k8up/values.yaml.gotmpl | 7 +++++++ kgnot/values.yaml.gotmpl | 10 +++++----- mariadb/values.yaml.gotmpl | 16 ++++++++-------- matrix-registration/values.yaml.gotmpl | 10 +++++++++- metallb/values.yaml.gotmpl | 17 +++++++++++++++++ postgres/operator-values.yaml.gotmpl | 8 ++++++++ postgres/values.yaml.gotmpl | 18 +++++++++++++++++- rook-ceph-cluster/values.yaml.gotmpl | 18 +++++++++--------- rook-ceph/values.yaml.gotmpl | 2 +- synapse/values.yaml.gotmpl | 4 ++-- tailscale/values.yaml.gotmpl | 8 ++++++++ traefik/values.yaml.gotmpl | 10 +++++++++- 17 files changed, 133 insertions(+), 37 deletions(-) create mode 100644 metallb/values.yaml.gotmpl diff --git a/53ll/values.yaml.gotmpl b/53ll/values.yaml.gotmpl index fad7603..a3616d6 100644 --- a/53ll/values.yaml.gotmpl +++ b/53ll/values.yaml.gotmpl @@ -13,14 +13,14 @@ readinessProbe: enabled: false resources: - limits: - cpu: 500m - ephemeral-storage: 2Gi - memory: 250Mi requests: cpu: 10m ephemeral-storage: 50Mi - memory: 128Mi + memory: 64Mi + limits: + cpu: 500m + ephemeral-storage: 2Gi + memory: 224Mi persistence: size: 1Gi diff --git a/helmfile.d/01-infrastructure.yaml b/helmfile.d/01-infrastructure.yaml index c8bfbd7..0a8fede 100644 --- a/helmfile.d/01-infrastructure.yaml +++ b/helmfile.d/01-infrastructure.yaml @@ -12,6 +12,8 @@ releases: namespace: metallb-system createNamespace: true chart: ../metallb + values: + - ../metallb/values.yaml.gotmpl - name: traefik namespace: traefik createNamespace: true diff --git a/immich/values.yaml.gotmpl b/immich/values.yaml.gotmpl index d1e1b3c..e3cc2d6 100644 --- a/immich/values.yaml.gotmpl +++ b/immich/values.yaml.gotmpl @@ -26,8 +26,10 @@ valkey: resources: requests: cpu: 10m - limits: - cpu: 1 + memory: 64Mi + limits: + cpu: 1 + memory: 32Mi server: enabled: true @@ -39,8 +41,10 @@ server: resources: requests: cpu: 10m - limits: + memory: 256Mi + limits: cpu: 1 + memory: 512Mi ingress: main: enabled: true @@ -62,5 +66,7 @@ machine-learning: resources: requests: cpu: 10m - limits: + memory: 128Mi + limits: cpu: 1 + memory: 384Mi diff --git a/incngrnt-web/values.yaml.gotmpl b/incngrnt-web/values.yaml.gotmpl index 84726b5..57156e8 100644 --- a/incngrnt-web/values.yaml.gotmpl +++ b/incngrnt-web/values.yaml.gotmpl @@ -3,6 +3,14 @@ init: wget: url: https://git.incngrnt.ca/grant/incngrnt/releases/download/v0.0.8/v0.0.8.tar +resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 500m + memory: 32Mi + ingress: enabled: true annotations: diff --git a/k8up-backup/values.yaml.gotmpl b/k8up-backup/values.yaml.gotmpl index a82f448..74b7359 100644 --- a/k8up-backup/values.yaml.gotmpl +++ b/k8up-backup/values.yaml.gotmpl @@ -6,3 +6,11 @@ credentials: key: {{ requiredEnv "HETZNER_S3_ACCESS_SECRET" }} repoPassword: {{ requiredEnv "k8UP_REPO_PASSWORD" }} + +resources: + requests: + cpu: 10m + memory: 64Mi + limits: + cpu: 500m + memory: 128Mi diff --git a/k8up/values.yaml.gotmpl b/k8up/values.yaml.gotmpl index 7b2b09d..51db585 100644 --- a/k8up/values.yaml.gotmpl +++ b/k8up/values.yaml.gotmpl @@ -2,3 +2,10 @@ k8up: envVars: - name: BACKUP_GLOBAL_CONCURRENT_BACKUP_JOBS_LIMIT values: 1 + resources: + requests: + cpu: 10m + memory: 64Mi + limits: + cpu: 500m + memory: 64Mi diff --git a/kgnot/values.yaml.gotmpl b/kgnot/values.yaml.gotmpl index 465ba07..9eddd47 100644 --- a/kgnot/values.yaml.gotmpl +++ b/kgnot/values.yaml.gotmpl @@ -13,14 +13,14 @@ readinessProbe: enabled: false resources: - limits: - cpu: 500m - ephemeral-storage: 2Gi - memory: 250Mi requests: cpu: 10m ephemeral-storage: 50Mi - memory: 128Mi + memory: 64Mi + limits: + cpu: 500m + ephemeral-storage: 2Gi + memory: 224Mi persistence: size: 1Gi diff --git a/mariadb/values.yaml.gotmpl b/mariadb/values.yaml.gotmpl index e55dc60..954b0a5 100644 --- a/mariadb/values.yaml.gotmpl +++ b/mariadb/values.yaml.gotmpl @@ -6,11 +6,11 @@ persistent: primary: resources: - limits: - cpu: 375m - ephemeral-storage: 2Gi - memory: 384Mi - requests: - cpu: 50m - ephemeral-storage: 50Mi - memory: 256Mi + requests: + cpu: 50m + ephemeral-storage: 50Mi + memory: 96Mi + limits: + cpu: 1 + ephemeral-storage: 2Gi + memory: 192Mi diff --git a/matrix-registration/values.yaml.gotmpl b/matrix-registration/values.yaml.gotmpl index c58388b..c80b57f 100644 --- a/matrix-registration/values.yaml.gotmpl +++ b/matrix-registration/values.yaml.gotmpl @@ -2,4 +2,12 @@ serverLocation: http://goatchat-matrix-synapse:8008 serverName: goatchat.ca serverBaseUrl: /gate registrationSharedSecret: {{ requiredEnv "GOATCHAT_REGISTRATION_SHARED_SECRET" }} -adminApiSharedSecret: {{ requiredEnv "GOATCHAT_REGISTRATION_ADMIN_API_SHARE_SECRET" }} \ No newline at end of file +adminApiSharedSecret: {{ requiredEnv "GOATCHAT_REGISTRATION_ADMIN_API_SHARE_SECRET" }} + +resources: + requests: + cpu: 10m + memory: 64Mi + limits: + cpu: 500m + memory: 64Mi \ No newline at end of file diff --git a/metallb/values.yaml.gotmpl b/metallb/values.yaml.gotmpl new file mode 100644 index 0000000..fee90ef --- /dev/null +++ b/metallb/values.yaml.gotmpl @@ -0,0 +1,17 @@ +controller: + resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 500m + memory: 64Mi + +speaker: + resources: + requests: + cpu: 10m + memory: 48Mi + limits: + cpu: 500m + memory: 96Mi diff --git a/postgres/operator-values.yaml.gotmpl b/postgres/operator-values.yaml.gotmpl index a4783b6..2a29fbd 100644 --- a/postgres/operator-values.yaml.gotmpl +++ b/postgres/operator-values.yaml.gotmpl @@ -1,2 +1,10 @@ pgoControllerLeaseName: '' replicas: 1 + +resources: + requests: + cpu: 10m + memory: 64Mi + limits: + cpu: 500m + memory: 160Mi diff --git a/postgres/values.yaml.gotmpl b/postgres/values.yaml.gotmpl index 95369ce..aec2799 100644 --- a/postgres/values.yaml.gotmpl +++ b/postgres/values.yaml.gotmpl @@ -1,5 +1,21 @@ instanceSize: 50Gi - +instanceMemory: 1Gi +instanceCPU: 2 +instances: + - name: instance1 + resources: + requests: + cpu: 100m + memory: 192Mi + limits: + cpu: 2 + memory: 256Mi + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 50Gi patroni: dynamicConfiguration: postgresql: diff --git a/rook-ceph-cluster/values.yaml.gotmpl b/rook-ceph-cluster/values.yaml.gotmpl index d9d0d91..46a1627 100644 --- a/rook-ceph-cluster/values.yaml.gotmpl +++ b/rook-ceph-cluster/values.yaml.gotmpl @@ -7,29 +7,29 @@ cephClusterSpec: useAllDevices: false deviceFilter: "^sda" config: - osd_memory_target: "1610612736" # 1.5GB per OSD to prevent excessive memory usage + osd_memory_target: "1073741824" # 1GB per OSD to maintain 70% node capacity resources: mgr: requests: cpu: 50m - memory: 512Mi + memory: 256Mi limits: cpu: "1" - memory: 768Mi + memory: 704Mi mon: requests: cpu: 100m - memory: 512Mi + memory: 256Mi limits: cpu: "1" - memory: 768Mi + memory: 64Mi osd: requests: cpu: 100m - memory: 1536Mi + memory: 896Mi limits: cpu: "1" - memory: 2Gi + memory: 1280Mi ingress: dashboard: @@ -60,10 +60,10 @@ cephFileSystems: resources: requests: cpu: 50m - memory: 256Mi + memory: 64Mi limits: cpu: "1" - memory: 512Mi + memory: 32Mi storageClass: enabled: true isDefault: false diff --git a/rook-ceph/values.yaml.gotmpl b/rook-ceph/values.yaml.gotmpl index ec2552b..0470b7e 100644 --- a/rook-ceph/values.yaml.gotmpl +++ b/rook-ceph/values.yaml.gotmpl @@ -4,4 +4,4 @@ resources: memory: 128Mi limits: cpu: 1 - memory: 256Mi + memory: 300Mi diff --git a/synapse/values.yaml.gotmpl b/synapse/values.yaml.gotmpl index d4c15bc..85e5c78 100644 --- a/synapse/values.yaml.gotmpl +++ b/synapse/values.yaml.gotmpl @@ -16,10 +16,10 @@ synapse: resources: requests: cpu: 10m - memory: 160Mi + memory: 128Mi limits: cpu: '1' - memory: 320Mi + memory: 192Mi config: macaroonSecretKey: {{ requiredEnv "GOATCHAT_SYNAPSE_MACAROON_SECRET_KEY" }} diff --git a/tailscale/values.yaml.gotmpl b/tailscale/values.yaml.gotmpl index 796c043..888437e 100644 --- a/tailscale/values.yaml.gotmpl +++ b/tailscale/values.yaml.gotmpl @@ -3,6 +3,14 @@ operatorConfig: - name: PROXY_PRIORITY_CLASS_NAME value: critical +resources: + requests: + cpu: 10m + memory: 48Mi + limits: + cpu: 500m + memory: 64Mi + oauth: clientId: {{ requiredEnv "TAILSCALE_OAUTH_CLIENT_ID" }} clientSecret: {{ requiredEnv "TAILSCALE_OAUTH_CLIENT_SECRET" }} \ No newline at end of file diff --git a/traefik/values.yaml.gotmpl b/traefik/values.yaml.gotmpl index 922fa4f..d640344 100644 --- a/traefik/values.yaml.gotmpl +++ b/traefik/values.yaml.gotmpl @@ -7,6 +7,14 @@ deployment: - name: data mountPath: /data +resources: + requests: + cpu: 50m + memory: 64Mi + limits: + cpu: 1 + memory: 128Mi + updateStrategy: type: Recreate @@ -99,4 +107,4 @@ certificatesResolvers: provider: hetzner delaybeforecheck: 30 email: {{ requiredEnv "ACME_EMAIL" }} - storage: /data/acme.json \ No newline at end of file + storage: /data/acme.json