diff --git a/README.md b/README.md index 1204443..84467e3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # IAG5 Helm Chart This chart is designed to enable the easy and rapid deployment of IAG5 environments and -architectures. +architectures. Requires Kubernetes version `1.31` or greater and Helm version `v3.15.0`. ## IAG5 Architectures diff --git a/charts/iag5/Chart.yaml b/charts/iag5/Chart.yaml index a72981e..4acbda7 100644 --- a/charts/iag5/Chart.yaml +++ b/charts/iag5/Chart.yaml @@ -10,7 +10,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.2 +version: 1.0.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/iag5/templates/deployment-runner.yaml b/charts/iag5/templates/deployment-runner.yaml index f522391..36ba0f6 100644 --- a/charts/iag5/templates/deployment-runner.yaml +++ b/charts/iag5/templates/deployment-runner.yaml @@ -132,8 +132,10 @@ spec: readinessProbe: {{- toYaml $.Values.readinessProbe.settings | nindent 12 }} {{- end }} + {{- if $.Values.resources.enabled }} resources: - {{- toYaml $.Values.resources | nindent 12 }} + {{- toYaml $.Values.resources.runners | nindent 12 }} + {{- end }} volumeMounts: - name: gateway-secrets-volume mountPath: /etc/gateway/keys/encryption.key diff --git a/charts/iag5/templates/deployment-server.yaml b/charts/iag5/templates/deployment-server.yaml index 048bbc0..d45dc81 100644 --- a/charts/iag5/templates/deployment-server.yaml +++ b/charts/iag5/templates/deployment-server.yaml @@ -134,8 +134,14 @@ spec: readinessProbe: {{- toYaml .Values.readinessProbe.settings | nindent 12 }} {{- end }} + {{- if .Values.resources.enabled }} resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- if $distributedExecution }} + {{- toYaml .Values.resources.servers | nindent 12 }} + {{- else }} + {{- toYaml .Values.resources.runners | nindent 12 }} + {{- end }} + {{- end }} volumeMounts: - name: gateway-secrets-volume mountPath: /etc/gateway/keys/encryption.key diff --git a/charts/iag5/tests/deployment-runner_test.yaml b/charts/iag5/tests/deployment-runner_test.yaml index 1231b48..06949f0 100644 --- a/charts/iag5/tests/deployment-runner_test.yaml +++ b/charts/iag5/tests/deployment-runner_test.yaml @@ -481,26 +481,19 @@ tests: - it: should configure resources when specified set: runnerSettings.replicaCount: 1 - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 500m - memory: 512Mi asserts: - equal: path: spec.template.spec.containers[0].resources.requests.cpu - value: 100m + value: 1000m - equal: path: spec.template.spec.containers[0].resources.requests.memory - value: 128Mi + value: 256Mi - equal: path: spec.template.spec.containers[0].resources.limits.cpu - value: 500m + value: "4" - equal: path: spec.template.spec.containers[0].resources.limits.memory - value: 512Mi + value: "8Gi" - it: should handle runnerSettings.env as empty dict when not defined set: diff --git a/charts/iag5/tests/deployment-server_test.yaml b/charts/iag5/tests/deployment-server_test.yaml index a2be3f5..f33cc00 100644 --- a/charts/iag5/tests/deployment-server_test.yaml +++ b/charts/iag5/tests/deployment-server_test.yaml @@ -460,26 +460,19 @@ tests: - it: should configure resources when specified set: serverSettings.replicaCount: 1 - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 500m - memory: 512Mi asserts: - equal: path: spec.template.spec.containers[0].resources.requests.cpu - value: 100m + value: 1000m - equal: path: spec.template.spec.containers[0].resources.requests.memory - value: 128Mi + value: 256Mi - equal: path: spec.template.spec.containers[0].resources.limits.cpu - value: 500m + value: "1" - equal: path: spec.template.spec.containers[0].resources.limits.memory - value: 512Mi + value: 2Gi - it: should have the expected standard annotations set: diff --git a/charts/iag5/tests/test-values.yaml b/charts/iag5/tests/test-values.yaml index 7d0e30e..8114208 100644 --- a/charts/iag5/tests/test-values.yaml +++ b/charts/iag5/tests/test-values.yaml @@ -63,7 +63,22 @@ certificate: postalCodes: - "30309" -resources: {} +resources: + enabled: true + runners: + limits: + cpu: "4" + memory: "8Gi" + requests: + cpu: "1000m" + memory: "256Mi" + servers: + limits: + cpu: "1" + memory: "2Gi" + requests: + cpu: "1000m" + memory: "256Mi" livenessProbe: enabled: true diff --git a/charts/iag5/values.yaml b/charts/iag5/values.yaml index b29710c..6292a7c 100644 --- a/charts/iag5/values.yaml +++ b/charts/iag5/values.yaml @@ -157,7 +157,22 @@ certificate: postalCodes: - "30309" -resources: {} +resources: + enabled: true + runners: + limits: + cpu: "4" + memory: "8Gi" + requests: + cpu: "1000m" + memory: "256Mi" + servers: + limits: + cpu: "1" + memory: "2Gi" + requests: + cpu: "1000m" + memory: "256Mi" livenessProbe: enabled: true