Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow certs to be loaded on readonly filesystems #135

Merged
merged 5 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/nx-cloud/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: nx-cloud
description: Nx Cloud Helm Chart
type: application
version: 0.15.10
version: 0.15.11
maintainers:
- name: nx
url: "https://nx.app/"
Expand Down
23 changes: 22 additions & 1 deletion charts/nx-cloud/templates/nx-cloud-aggregator-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,38 @@
spec:
template:
spec:
{{- if .Values.selfSignedCertConfigMap }}
initContainers:
- command:
- sh
- -c
- cp -r /usr/lib/jvm/java-17-amazon-corretto/jre/lib/security /cacerts
image: {{ include "nxCloud.images.aggregator.image" . }}
name: copy-cacerts
{{- if .Values.aggregator.securityContext }}
securityContext:
{{- toYaml .Values.aggregator.securityContext | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /cacerts
name: cacerts
{{- end}}
containers:
- name: nx-cloud-aggregator
image: {{ include "nxCloud.images.aggregator.image" . }}
imagePullPolicy: {{ .Values.aggregator.image.pullPolicy | quote }}
{{- if .Values.aggregator.resources }}
resources: {{- toYaml .Values.aggregator.resources | nindent 16 }}
{{- end }}
{{- if .Values.selfSignedCertConfigMap }}
{{- if .Values.aggregator.securityContext }}
securityContext:
{{- toYaml .Values.aggregator.securityContext | nindent 12 }}
{{- end }}
{{- if .Values.selfSignedCertConfigMap }}
volumeMounts:
- mountPath: /usr/lib/jvm/java-17-amazon-corretto/jre/lib/security
name: cacerts
subPath: security
- mountPath: /self-signed-certs
name: self-signed-certs-volume
{{- end}}
Expand Down Expand Up @@ -49,6 +68,8 @@ spec:
{{- end }}
{{- if .Values.selfSignedCertConfigMap }}
volumes:
- emptyDir: { }
name: cacerts
- configMap:
name: {{ .Values.selfSignedCertConfigMap }}
name: self-signed-certs-volume
Expand Down
23 changes: 22 additions & 1 deletion charts/nx-cloud/templates/nx-cloud-nx-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ spec:
{{- if .Values.awsS3.serviceAccountName }}
serviceAccountName: {{ .Values.awsS3.serviceAccountName }}
{{- end }}
{{- if .Values.selfSignedCertConfigMap }}
initContainers:
- command:
- sh
- -c
- cp -r /usr/lib/jvm/java-17-amazon-corretto/jre/lib/security /cacerts
image: {{ include "nxCloud.images.nxApi.image" . }}
name: copy-cacerts
{{- if .Values.nxApi.securityContext }}
securityContext:
{{- toYaml .Values.nxApi.securityContext | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /cacerts
name: cacerts
{{- end}}
containers:
- name: nx-cloud-nx-api
image: {{ include "nxCloud.images.nxApi.image" . }}
Expand All @@ -36,12 +52,15 @@ spec:
{{- end }}
ports:
- containerPort: {{ .Values.nxApi.deployment.port }}
{{- if .Values.selfSignedCertConfigMap }}
{{- if .Values.nxApi.securityContext }}
securityContext:
{{- toYaml .Values.nxApi.securityContext | nindent 12 }}
{{- end }}
{{- if .Values.selfSignedCertConfigMap }}
volumeMounts:
- mountPath: /usr/lib/jvm/java-17-amazon-corretto/jre/lib/security
name: cacerts
subPath: security
- mountPath: /self-signed-certs
name: self-signed-certs-volume
{{- end}}
Expand Down Expand Up @@ -131,6 +150,8 @@ spec:
{{- end }}
{{- if .Values.selfSignedCertConfigMap }}
volumes:
- emptyDir: { }
name: cacerts
- configMap:
name: {{ .Values.selfSignedCertConfigMap }}
name: self-signed-certs-volume
Expand Down
Binary file added helm-charts/nx-cloud-0.15.11.tgz
Binary file not shown.
Loading