Skip to content

Commit

Permalink
Merge branch 'master' into 232-image-registry
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis authored Feb 24, 2025
2 parents 5029159 + 8219a31 commit 383a4b7
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Chart dependencies
**/charts/*.tgz

# macOS
.DS_Store
2 changes: 1 addition & 1 deletion charts/rucio-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rucio-server
version: 36.0.3
version: 36.0.4
apiVersion: v1
description: A Helm chart to deploy servers for Rucio
keywords:
Expand Down
39 changes: 39 additions & 0 deletions charts/rucio-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ spec:
{{- end }}
- name: httpdlog
emptyDir: {}
{{- if .Values.policyPackages.enabled }}
- name: policy-package-volume
persistentVolumeClaim:
claimName: policy-package-volume
{{- end }}
{{- range $key, $val := .Values.secretMounts }}
- name: {{ coalesce $val.volumeName $val.secretName $val.secretFullName }}
secret:
Expand Down Expand Up @@ -86,6 +91,32 @@ spec:
secret:
secretName: {{ .Release.Name }}-server-cafile
{{- end }}
{{- end }}
{{- if .Values.policyPackages.enabled }}
initContainers:
- name: install-policy-packages
# A slim Python image could be used instead, but using the same image as the base image for the main container ensures that the same Python version is used
image: almalinux:9
command:
- /bin/bash
- -e
- -c
- |
export PYTHONPATH={{ .Values.policyPackages.mountPath }}:$PYTHONPATH
{{- range .Values.policyPackages.packages }}
if python3 -c "from importlib.metadata import version; assert version({{ .moduleName | squote }}) == {{ .version | squote }}"; then
echo "module {{ .moduleName }} version {{ .version }} is already installed"
else
if [[ {{ .requirement | squote }} == git+* ]]; then
dnf install --assumeyes git-all
fi
dnf install --assumeyes python-pip
pip install {{ .requirement }} --target {{ $.Values.policyPackages.mountPath }}
fi
{{- end }}
volumeMounts:
- name: policy-package-volume
mountPath: {{ .Values.policyPackages.mountPath }}
{{- end }}
containers:
{{- if .Values.exposeErrorLogs }}
Expand Down Expand Up @@ -130,6 +161,10 @@ spec:
mountPath: /opt/certs
{{- end }}
{{- end }}
{{- if .Values.policyPackages.enabled }}
- name: policy-package-volume
mountPath: {{ .Values.policyPackages.mountPath }}
{{- end }}
- name: httpdlog
mountPath: /var/log/httpd
{{- range $key, $val := .Values.secretMounts }}
Expand Down Expand Up @@ -227,6 +262,10 @@ spec:
- name: {{ $key1 | upper }}
value: "{{ $val1 }}"
{{- end}}
{{- if .Values.policyPackages.enabled}}
- name: PYTHONPATH
value: {{.Values.policyPackages.mountPath}}:${PYTHONPATH}
{{- end}}
{{- if .Values.useSSL }}
- name: RUCIO_ENABLE_SSL
value: "True"
Expand Down
13 changes: 13 additions & 0 deletions charts/rucio-server/templates/policy-package-storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if .Values.policyPackages.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: policy-package-volume
spec:
storageClassName: {{ .Values.policyPackages.storageClass.name }}
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.policyPackages.resources.requests.storage }}
{{- end }}
24 changes: 23 additions & 1 deletion charts/rucio-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ useSSL: false

image:
repository: rucio/rucio-server
tag: release-34.2.0
tag: release-36.2.0
pullPolicy: Always

imagePullSecrets: []
Expand Down Expand Up @@ -151,6 +151,28 @@ ftsRenewal:
cpu: 100m
memory: 128Mi

policyPackages:
enabled: false
# Make sure the trailing slash is present
mountPath: /opt/policy_packages/
# Use underscores instead of hyphens for module names
# (e.g. atlas_rucio_policy_package instead of atlas-rucio-policy-package)
packages: []
# example: install from an index (default is PyPI)
# - moduleName: vo_1_policy_package
# requirement: vo_1_policy_package==1.4.0
# version: 1.4.0
# example: install from a git repository
# - moduleName: vo_2_policy_package
# requirement: git+/~https://github.com/vo-2/vo-2-policy-package@v0.1.0
# version: 0.1.0
resources:
requests:
# Storage required by the policy packages - resize if needed
storage: 100Mi
storageClass:
name:

automaticRestart:
enabled: 0
image:
Expand Down

0 comments on commit 383a4b7

Please sign in to comment.