mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
test(harbor): pin the resources of the nginx proxy and the portal
Both containers run nginx with worker_processes auto, so their idle
memory follows the CPU count of the node, whatever their own CPU limit
is. In a tenant namespace a container without resources gets the
LimitRange default of 128Mi, which the proxy outgrows on a node with
many CPUs before it serves a request. The presets that keep both out
of that default have no test, so dropping them or tying them to
another component's values would go unnoticed.
Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 7c0634586b)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
474effcf3b
commit
33f4e93e10
1 file changed
+67
@@ -0,0 +1,67 @@
|
||||
suite: nginx proxy and portal resources
|
||||
|
||||
release:
|
||||
name: harbor
|
||||
namespace: tenant-test
|
||||
|
||||
set:
|
||||
_namespace:
|
||||
host: example.org
|
||||
ingress: nginx
|
||||
gateway: ""
|
||||
seaweedfs: seaweedfs
|
||||
_cluster:
|
||||
solver: http01
|
||||
|
||||
tests:
|
||||
- it: sizes the nginx proxy with t1.small instead of leaving it to the namespace LimitRange
|
||||
template: templates/harbor.yaml
|
||||
documentSelector:
|
||||
path: kind
|
||||
value: HelmRelease
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.values.harbor.nginx.resources.limits.memory
|
||||
value: 512Mi
|
||||
- equal:
|
||||
path: spec.values.harbor.nginx.resources.limits.cpu
|
||||
value: "1"
|
||||
- exists:
|
||||
path: spec.values.harbor.nginx.resources.requests.memory
|
||||
|
||||
- it: sizes the portal with t1.micro
|
||||
template: templates/harbor.yaml
|
||||
documentSelector:
|
||||
path: kind
|
||||
value: HelmRelease
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.values.harbor.portal.resources.limits.memory
|
||||
value: 256Mi
|
||||
- equal:
|
||||
path: spec.values.harbor.portal.resources.limits.cpu
|
||||
value: 500m
|
||||
|
||||
- it: keeps both sizes when the other components are resized
|
||||
template: templates/harbor.yaml
|
||||
documentSelector:
|
||||
path: kind
|
||||
value: HelmRelease
|
||||
set:
|
||||
core:
|
||||
resourcesPreset: t1.nano
|
||||
registry:
|
||||
resources:
|
||||
cpu: "2"
|
||||
memory: 1Gi
|
||||
jobservice:
|
||||
resourcesPreset: t1.medium
|
||||
trivy:
|
||||
resourcesPreset: t1.large
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.values.harbor.nginx.resources.limits.memory
|
||||
value: 512Mi
|
||||
- equal:
|
||||
path: spec.values.harbor.portal.resources.limits.memory
|
||||
value: 256Mi
|
||||
Reference in new issue
Block a user