Skip to content

Commit e6dcd9d

Browse files
Merge pull request #179 from nrwl/release/1.2.0
nx-cloud release 1.2.0
2 parents c11fd80 + 395fa9d commit e6dcd9d

File tree

10 files changed

+491
-68
lines changed

10 files changed

+491
-68
lines changed

charts/nx-cloud/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: nx-cloud
33
description: Nx Cloud Helm Chart
44
type: application
5-
version: 1.1.1
5+
version: 1.2.0
66
maintainers:
77
- name: nx
88
url: "https://nx.app/"

charts/nx-cloud/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ Below is a summary table of configurable values from values.yaml.
8484
| fileServer.deployment.volumeMounts | list | [] | Additional volume mounts. |
8585
| fileServer.deployment.extraContainers | list | [] | Extra sidecars for file server only. |
8686
| fileServer.deployment.initContainers | list | [] | Init containers for file server. |
87+
| fileServer.deployment.livenessProbe | object | httpGet on /file/uptime-check:5000 | Liveness probe configuration for file server container. |
88+
| fileServer.deployment.startupProbe | object | httpGet on /file/uptime-check:5000 | Startup probe configuration for file server container. |
89+
| fileServer.deployment.readinessProbe | object | {} | Readiness probe configuration for file server container. |
8790
| fileServer.pvc.name | string | nx-cloud-file-server | PVC name for file server storage. |
8891
| fileServer.pvc.annotations | object | {} | PVC annotations. |
8992
| fileServer.pvc.labels | object | {} | PVC labels. |
@@ -157,11 +160,23 @@ Below is a summary table of configurable values from values.yaml.
157160
| frontend.deployment.volumeMounts | list | [] | Additional volume mounts. |
158161
| frontend.deployment.extraContainers | list | [] | Extra sidecars for frontend only. |
159162
| frontend.deployment.initContainers | list | [] | Init containers for frontend. |
163+
| frontend.deployment.startupProbe | object | {} | Startup probe configuration for frontend container. |
164+
| frontend.deployment.livenessProbe | object | httpGet on /healthz:4202 | Liveness probe configuration for frontend container. |
165+
| frontend.deployment.readinessProbe | object | httpGet on /readyz:4202 | Readiness probe configuration for frontend container. |
160166
| frontend.serviceAccount.create | bool | true | Whether to create a ServiceAccount for frontend. |
161167
| frontend.serviceAccount.name | string | nx-cloud-frontend | ServiceAccount name for frontend. |
162168
| frontend.serviceAccount.annotations | object | {} | ServiceAccount annotations for frontend. |
163169
| frontend.serviceAccount.labels | object | {} | ServiceAccount labels for frontend. |
164170
| frontend.serviceAccount.automount | bool | false | Automount service account token for frontend pods. |
171+
| frontend.hpa.enabled | bool | false | Enable Horizontal Pod Autoscaler for frontend. |
172+
| frontend.hpa.annotations | object | {} | HPA annotations for frontend. |
173+
| frontend.hpa.labels | object | {} | HPA labels for frontend. |
174+
| frontend.hpa.minReplicas | int | 1 | Minimum number of frontend replicas for HPA. |
175+
| frontend.hpa.maxReplicas | int | 10 | Maximum number of frontend replicas for HPA. |
176+
| frontend.hpa.targetCPUUtilizationPercentage | int | 80 | Target CPU utilization percentage for scaling. |
177+
| frontend.hpa.targetMemoryUtilizationPercentage | string | "" | Target memory utilization percentage (empty to disable). |
178+
| frontend.hpa.behavior | object | {} | HPA scaling behavior configuration (scaleUp/scaleDown policies). |
179+
| frontend.hpa.customMetrics | list | [] | Custom metrics for HPA scaling decisions. |
165180
| api.verboseLogging | bool | false | Enable verbose logging for API. |
166181
| api.logLevel | string | "INFO" | Log level for API. |
167182
| api.valkey.clientProvider | string | "redisson" | Valkey client provider implementation. |
@@ -205,6 +220,9 @@ Below is a summary table of configurable values from values.yaml.
205220
| api.deployment.volumeMounts | list | [] | Additional volume mounts. |
206221
| api.deployment.extraContainers | list | [] | Extra sidecars for API only. |
207222
| api.deployment.initContainers | list | [] | Init containers for API. |
223+
| api.deployment.startupProbe | object | httpGet on /nx-cloud/uptime-check:4203 | Startup probe configuration for API container. |
224+
| api.deployment.livenessProbe | object | httpGet on /nx-cloud/uptime-check:4203 | Liveness probe configuration for API container. |
225+
| api.deployment.readinessProbe | object | {} | Readiness probe configuration for API container. |
208226
| api.serviceAccount.create | bool | true | Whether to create a ServiceAccount for API. |
209227
| api.serviceAccount.name | string | nx-cloud-nx-api | ServiceAccount name for API. |
210228
| api.serviceAccount.annotations | object | {} | ServiceAccount annotations for API. |

charts/nx-cloud/ci/existing-serviceaccount-values.yaml renamed to charts/nx-cloud/ci/hpa-values.yaml

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
global:
2+
imageRegistry: "docker.io"
23
nxCloudAppURL: "https://nx.test"
34
mongodbConnectionString:
45
secretName: nx-cloud-credentials
@@ -16,42 +17,25 @@ extraObjects:
1617
NX_CLOUD_MONGO_SERVER_ENDPOINT: mongodb://mongo-mongodb-0.mongo-mongodb-headless.mongodb.svc.cluster.local:27017
1718
ADMIN_PASSWORD: password
1819

19-
fileServerServiceAccount:
20+
backendNotFoundService:
2021
apiVersion: v1
21-
kind: ServiceAccount
22+
kind: Service
2223
metadata:
23-
name: existing-file-server-sa
24-
25-
aggregatorServiceAccount:
26-
apiVersion: v1
27-
kind: ServiceAccount
28-
metadata:
29-
name: existing-aggregator-sa
30-
31-
frontendServiceAccount:
32-
apiVersion: v1
33-
kind: ServiceAccount
34-
metadata:
35-
name: existing-frontend-sa
36-
37-
apiServiceAccount:
38-
apiVersion: v1
39-
kind: ServiceAccount
40-
metadata:
41-
name: existing-api-sa
42-
43-
fileServer:
44-
enabled: true
45-
serviceAccount:
46-
create: false
47-
name: existing-file-server-sa
48-
deployment:
49-
resources: null
24+
name: backend-not-found
25+
labels:
26+
app: backend-not-found
27+
app.kubernetes.io/name: nx-cloud
28+
app.kubernetes.io/instance: nx-cloud
29+
spec:
30+
selector:
31+
app: backend-not-found
32+
type: ClusterIP
33+
ports:
34+
- name: http
35+
port: 80
36+
targetPort: 80
5037

5138
aggregator:
52-
serviceAccount:
53-
create: false
54-
name: existing-aggregator-sa
5539
cronjob:
5640
env:
5741
NX_CLOUD_SKIP_SLOW_AGGREGATOR_QUERIES: 'true'
@@ -64,18 +48,19 @@ aggregator:
6448
resources: null
6549

6650
frontend:
67-
serviceAccount:
68-
create: false
69-
name: existing-frontend-sa
7051
deployment:
7152
env:
7253
NX_API_INTERNAL_BASE_URL: 'http://nx-cloud-nx-api-service'
7354
resources: null
55+
hpa:
56+
enabled: true
57+
minReplicas: 2
58+
maxReplicas: 5
59+
targetCPUUtilizationPercentage: 50
7460

7561
api:
76-
serviceAccount:
77-
create: false
78-
name: existing-api-sa
62+
image:
63+
digest: sha256:034e529bbf353fe6ac2fffe551fa0edc5165f1dc1eba26cae86d104b75d896c1
7964
valkey:
8065
clientProvider: "redisson"
8166
useSentinel: true

charts/nx-cloud/templates/aggregator/cronjob.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ spec:
2626
{{- toYaml . | nindent 12 }}
2727
{{- end }}
2828
spec:
29+
{{- if .Values.aggregator.serviceAccount.create }}
2930
serviceAccountName: {{ .Values.aggregator.serviceAccount.name }}
31+
{{- end }}
3032
{{- with .Values.aggregator.cronjob.nodeSelector }}
3133
nodeSelector:
3234
{{- toYaml . | nindent 12 }}

charts/nx-cloud/templates/api/deployment.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ spec:
3232
{{- toYaml . | nindent 8 }}
3333
{{- end }}
3434
spec:
35+
{{- if .Values.api.serviceAccount.create }}
3536
serviceAccountName: {{ .Values.api.serviceAccount.name }}
37+
{{- end }}
3638
{{- if or .Values.config.agentConfigs .Values.api.deployment.volumes }}
3739
volumes:
3840
{{- if .Values.config.agentConfigs }}
@@ -83,18 +85,18 @@ spec:
8385
{{- end }}
8486
ports:
8587
- containerPort: 4203
88+
{{- with .Values.api.deployment.startupProbe }}
8689
startupProbe:
87-
httpGet:
88-
path: /nx-cloud/uptime-check
89-
port: 4203
90-
initialDelaySeconds: 10
91-
failureThreshold: 5
92-
periodSeconds: 10
90+
{{- toYaml . | nindent 12 }}
91+
{{- end }}
92+
{{- with .Values.api.deployment.livenessProbe }}
9393
livenessProbe:
94-
httpGet:
95-
path: /nx-cloud/uptime-check
96-
port: 4203
97-
initialDelaySeconds: 30
94+
{{- toYaml . | nindent 12 }}
95+
{{- end }}
96+
{{- with .Values.api.deployment.readinessProbe }}
97+
readinessProbe:
98+
{{- toYaml . | nindent 12 }}
99+
{{- end }}
98100
env:
99101
- name: NX_CLOUD_MODE
100102
value: {{ .Values.global.nxCloudMode | default "private-enterprise" | quote }}

charts/nx-cloud/templates/file-server/deployment.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ spec:
3232
{{- toYaml . | nindent 8 }}
3333
{{- end }}
3434
spec:
35+
{{- if .Values.fileServer.serviceAccount.create }}
3536
serviceAccountName: {{ .Values.fileServer.serviceAccount.name }}
37+
{{- end }}
3638
{{- if .Values.fileServer.deployment.securityContext }}
3739
securityContext: {{- toYaml .Values.fileServer.deployment.securityContext | nindent 8 }}
3840
{{- end }}
@@ -88,17 +90,18 @@ spec:
8890
{{- end }}
8991
ports:
9092
- containerPort: {{ .Values.fileServer.deployment.port }}
93+
{{- with .Values.fileServer.deployment.livenessProbe }}
9194
livenessProbe:
92-
httpGet:
93-
path: /file/uptime-check
94-
port: {{ .Values.fileServer.deployment.port }}
95-
initialDelaySeconds: 10
95+
{{- toYaml . | nindent 12 }}
96+
{{- end }}
97+
{{- with .Values.fileServer.deployment.startupProbe }}
9698
startupProbe:
97-
httpGet:
98-
path: /file/uptime-check
99-
port: {{ .Values.fileServer.deployment.port }}
100-
failureThreshold: 10
101-
periodSeconds: 5
99+
{{- toYaml . | nindent 12 }}
100+
{{- end }}
101+
{{- with .Values.fileServer.deployment.readinessProbe }}
102+
readinessProbe:
103+
{{- toYaml . | nindent 12 }}
104+
{{- end }}
102105
{{- if .Values.fileServer.deployment.securityContext }}
103106
securityContext:
104107
{{- omit .Values.fileServer.deployment.securityContext "fsGroup" "fsGroupChangePolicy" | toYaml | nindent 12 }}

charts/nx-cloud/templates/frontend/deployment.yaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ metadata:
1010
{{- toYaml . | nindent 4 }}
1111
{{- end }}
1212
spec:
13+
{{- if not .Values.frontend.hpa.enabled }}
1314
replicas: {{ .Values.frontend.deployment.replicas | default 1}}
15+
{{- end }}
1416
selector:
1517
matchLabels:
1618
app: nx-cloud-frontend
@@ -33,7 +35,9 @@ spec:
3335
{{- toYaml . | nindent 8 }}
3436
{{- end }}
3537
spec:
38+
{{- if .Values.frontend.serviceAccount.create }}
3639
serviceAccountName: {{ .Values.frontend.serviceAccount.name }}
40+
{{- end }}
3741
{{- if .Values.frontend.deployment.volumes }}
3842
volumes:
3943
{{- toYaml .Values.frontend.deployment.volumes | nindent 8 }}
@@ -61,18 +65,18 @@ spec:
6165
{{- if .Values.frontend.deployment.resources }}
6266
resources: {{- toYaml .Values.frontend.deployment.resources | nindent 12 }}
6367
{{- end }}
68+
{{- with .Values.frontend.deployment.startupProbe }}
69+
startupProbe:
70+
{{- toYaml . | nindent 12 }}
71+
{{- end }}
72+
{{- with .Values.frontend.deployment.livenessProbe }}
6473
livenessProbe:
65-
httpGet:
66-
path: /healthz
67-
port: 4202
68-
initialDelaySeconds: 15
69-
periodSeconds: 20
74+
{{- toYaml . | nindent 12 }}
75+
{{- end }}
76+
{{- with .Values.frontend.deployment.readinessProbe }}
7077
readinessProbe:
71-
httpGet:
72-
path: /readyz
73-
port: 4202
74-
initialDelaySeconds: 5
75-
periodSeconds: 10
78+
{{- toYaml . | nindent 12 }}
79+
{{- end }}
7680
ports:
7781
- containerPort: 4202
7882
env:
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{{- if .Values.frontend.hpa.enabled }}
2+
apiVersion: autoscaling/v2
3+
kind: HorizontalPodAutoscaler
4+
metadata:
5+
name: nx-cloud-frontend
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- include "nxCloud.mergedLabels" (dict "resourceLabels" .Values.frontend.hpa.labels "context" .) | nindent 4 }}
9+
{{- with .Values.frontend.hpa.annotations }}
10+
annotations:
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
13+
spec:
14+
scaleTargetRef:
15+
apiVersion: apps/v1
16+
kind: Deployment
17+
name: nx-cloud-frontend
18+
minReplicas: {{ .Values.frontend.hpa.minReplicas }}
19+
maxReplicas: {{ .Values.frontend.hpa.maxReplicas }}
20+
{{- with .Values.frontend.hpa.behavior }}
21+
behavior:
22+
{{- toYaml . | nindent 4 }}
23+
{{- end }}
24+
metrics:
25+
{{- if .Values.frontend.hpa.targetCPUUtilizationPercentage }}
26+
- type: Resource
27+
resource:
28+
name: cpu
29+
target:
30+
type: Utilization
31+
averageUtilization: {{ .Values.frontend.hpa.targetCPUUtilizationPercentage }}
32+
{{- end }}
33+
{{- if .Values.frontend.hpa.targetMemoryUtilizationPercentage }}
34+
- type: Resource
35+
resource:
36+
name: memory
37+
target:
38+
type: Utilization
39+
averageUtilization: {{ .Values.frontend.hpa.targetMemoryUtilizationPercentage }}
40+
{{- end }}
41+
{{- with .Values.frontend.hpa.customMetrics }}
42+
{{- toYaml . | nindent 2 }}
43+
{{- end }}
44+
{{- end }}

0 commit comments

Comments
 (0)