Skip to content

Commit

Permalink
Merge pull request #770 from at88mph/arc-init-fix
Browse files Browse the repository at this point in the history
Arc init fix
  • Loading branch information
at88mph authored Jan 9, 2025
2 parents 1c4cb5b + e33b4fd commit a2baa0a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
3 changes: 3 additions & 0 deletions deployment/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,9 @@ deployment:
The Cavern API provides access to the User Storage which is shared between Skaha and all of the User Sessions. A [Bearer token](#obtaining-a-bearer-token) is required when trying to read
private access, or any writing.

> [!NOTE]
> The `/home` and `/projects` folders will be created if not present during install. Do **not** include them with your configuration!
Create a `my-cavern-local-values-file.yaml` file to override Values from the main [template `values.yaml` file](cavern/values.yaml).

`my-cavern-local-values-file.yaml`
Expand Down
2 changes: 1 addition & 1 deletion deployment/helm/cavern/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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: 0.5.2
version: 0.5.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
Expand Down
4 changes: 4 additions & 0 deletions deployment/helm/cavern/config/cavern.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ org.opencadc.cavern.filesystem.subPath = {{ .Values.deployment.cavern.filesystem

org.opencadc.cavern.nodes.QuotaPlugin = {{ .Values.deployment.cavern.quotaPlugin }}

# Required folders. This will check for the existence of them, and create if necessary.
org.opencadc.cavern.allocationParent = /home
org.opencadc.cavern.allocationParent = /projects

{{- with .Values.deployment.cavern.filesystem.rootOwner }}
# owner of root node has admin power
org.opencadc.cavern.filesystem.rootOwner = {{ .adminUsername }}
Expand Down
15 changes: 1 addition & 14 deletions deployment/helm/cavern/templates/cavern-tomcat-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,11 @@ spec:
nodeAffinity:
{{ . | toYaml | indent 10 }}
{{- end }}
{{- with .Values.deployment.cavern.filesystem }}
{{ $cavernTLD := printf "%s/%s" .dataDir .subPath }}
securityContext:
fsGroup: {{ .rootOwner.gid }}
fsGroup: {{ .Values.deployment.cavern.filesystem.rootOwner.gid }}
runAsUser: 0
seccompProfile:
type: RuntimeDefault
initContainers:
- name: init-{{ $.Release.Name }}-fs
image: busybox
imagePullPolicy: IfNotPresent
command: ['sh', '-c', 'mkdir -p {{ $cavernTLD }}/home && mkdir -p {{ $cavernTLD }}/projects && chown {{ .rootOwner.uid }}:{{ .rootOwner.gid }} {{ $cavernTLD }}/home && chown {{ .rootOwner.uid }}:{{ .rootOwner.gid }} {{ $cavernTLD }}/projects']
volumeMounts:
- mountPath: "{{ .dataDir }}"
name: cavern-volume
securityContext:
allowPrivilegeEscalation: false
{{- end }}
containers:
- image: {{ .Values.deployment.cavern.image }}
imagePullPolicy: {{ .Values.deployment.cavern.imagePullPolicy }}
Expand Down
1 change: 1 addition & 0 deletions deployment/helm/cavern/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ deployment:
#
# quotaPlugin: {NoQuotaPlugin | CephFSQuotaPlug}

# The /home and /projects folders will be automatically created if not present.
# filesystem:
# persistent data directory in container
# dataDir: "/data"
Expand Down

0 comments on commit a2baa0a

Please sign in to comment.