Skip to content

Commit 029d03c

Browse files
committed
ci: merge main
1 parent 216b0ec commit 029d03c

File tree

9 files changed

+106
-23
lines changed

9 files changed

+106
-23
lines changed

helm/applications/skaha/CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
# CHANGELOG for Skaha User Session API (Chart 1.0.4)
1+
# CHANGELOG for Skaha User Session API (Chart 1.1.0)
2+
3+
## 2025.09.29 (1.1.0)
4+
- Bump Skaha API image to `1.1.0`
5+
- Feature Gate to support `LimitRange` objects to enforce resource limits on User Sessions
6+
7+
## 2025.09.29 (1.0.5)
8+
- Fix for status reporting in User Sessions
29

310
## 2025.09.11 (1.0.4)
411
- Provide Kueue examples with documentation

helm/applications/skaha/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ type: application
1616
# This is the chart version. This version number should be incremented each time you make changes
1717
# to the chart and its templates, including the app version.
1818
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19-
version: 1.0.5
19+
version: 1.1.0
2020

2121
# This is the version number of the application being deployed. This version number should be
2222
# incremented each time you make changes to the application. Versions are not expected to
2323
# follow Semantic Versioning. They should reflect the version the application is using.
2424
# It is recommended to use it with quotes.
25-
appVersion: "1.0.4"
25+
appVersion: "1.1.0"
2626

2727
dependencies:
2828
- name: "redis"

helm/applications/skaha/skaha-config/k8s-resources.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@
8989
28
9090
]
9191
},
92-
"maxInteractiveSessions": 3
92+
"maxInteractiveSessions": {{ .Values.deployment.skaha.sessions.maxCount }}
9393
}

helm/applications/skaha/templates/NOTES.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,10 @@ If user Jobs remain Pending:
3131
- Ensure LocalQueue exists in {{ .Values.skahaWorkload.namespace }} and references your configured ClusterQueue.
3232
- Verify ClusterQueue quotas are sufficient.
3333
- Confirm priority classes referenced by sessions exist or are created.
34+
35+
Experimental Features Configured:
36+
{{- if and .Values.experimentalFeatures .Values.experimentalFeatures.enabled }}
37+
{{ include "skaha.experimentalFeatureGates" $ }}
38+
{{- else }}
39+
None
40+
{{- end }}

helm/applications/skaha/templates/_helpers.tpl

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,41 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4242
app.kubernetes.io/managed-by: {{ .Release.Service }}
4343
{{- end }}
4444

45+
{{/*
46+
Obtain a comma-delimited string of Experimental Features and a flag to set if any are enabled.
47+
*/}}
48+
{{- define "skaha.experimentalFeatureGates" -}}
49+
{{- $features := "" -}}
50+
{{- $featureEnabled := false -}}
51+
{{- with .Values.experimentalFeatures }}
52+
{{- if .enabled }}
53+
{{- range $feature, $map := . }}
54+
55+
{{- if eq $feature "enabled" -}}
56+
{{- continue -}}
57+
{{- end -}}
58+
59+
{{- if ne $feature "" }}
60+
{{- $thisMap := $map | default dict }}
61+
62+
{{- if or (not (hasKey $thisMap "enabled")) (not (kindIs "bool" $thisMap.enabled)) -}}
63+
{{- fail ( printf "Feature gate '%s' must have 'enabled' (false | true) key" $feature ) -}}
64+
{{- end }}
65+
66+
{{- if eq $features "" -}}
67+
{{- $features = printf "%s=%t" $feature $thisMap.enabled -}}
68+
{{- else -}}
69+
{{- $features = printf "%s,%s=%t" $features $feature $thisMap.enabled -}}
70+
{{- end }}
71+
{{- end }}
72+
73+
{{- end }}
74+
{{- end }}
75+
{{- end }}
76+
{{- printf "%s" $features -}}
77+
{{- end }}
78+
*/}}
79+
4580
{{/*
4681
Selector labels
4782
*/}}
@@ -85,7 +120,7 @@ The init containers for the launch scripts.
85120
drop:
86121
- ALL
87122
- name: init-users-groups
88-
image: {{ $.Values.deployment.skaha.sessions.initContainerImage | default "redis:7.4.2-alpine3.21" }}
123+
image: {{ $.Values.deployment.skaha.sessions.initContainerImage | default "redis:8.2.2-bookworm" }}
89124
command: ["/init-users-groups/init-users-groups.sh"]
90125
env:
91126
- name: HOME

helm/applications/skaha/templates/limit-range.yaml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,48 @@ spec:
1212
{{- with .limitSpec }}
1313
limits:
1414
- type: Container
15-
{{ . | toYaml | indent 6 }}
15+
{{- if .max }}
16+
max:
17+
{{ toYaml .max | indent 8 }}
1618
{{- end }}
19+
{{- if .default }}
20+
default:
21+
{{ toYaml .default | indent 8 }}
22+
{{- end }}
23+
{{- if .defaultRequest }}
24+
defaultRequest:
25+
{{ toYaml .defaultRequest | indent 8 }}
26+
{{- end }}
27+
{{- end }}
28+
---
29+
apiVersion: rbac.authorization.k8s.io/v1
30+
kind: Role
31+
metadata:
32+
name: {{ $.Release.Name }}-session-limit-range-role
33+
namespace: {{ $.Values.skahaWorkload.namespace }}
34+
rules:
35+
- apiGroups:
36+
- ""
37+
resources:
38+
- limitranges
39+
verbs:
40+
- get
41+
- list
42+
- status
43+
---
44+
apiVersion: rbac.authorization.k8s.io/v1
45+
kind: RoleBinding
46+
metadata:
47+
name: {{ $.Release.Name }}-session-limit-range
48+
namespace: {{ $.Values.skahaWorkload.namespace }}
49+
roleRef:
50+
apiGroup: rbac.authorization.k8s.io
51+
kind: Role
52+
name: {{ $.Release.Name }}-session-limit-range-role
53+
subjects:
54+
- kind: ServiceAccount
55+
name: {{ $.Values.deployment.skaha.serviceAccountName | required ".Values.deployment.skaha.serviceAccountName value is required" }}
56+
namespace: {{ $.Release.Namespace }}
1757
{{- end }}
1858
{{- end }}
1959
{{- end }}

helm/applications/skaha/templates/skaha-config-configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ data:
2121
{{ base $path }}: |
2222
{{- tpl ($.Files.Get $path) $currContext | nindent 4 }}
2323
{{ end }}
24-
{{ ($.Files.Glob "skaha-config/*.json").AsConfig | indent 2 }}
24+
{{ tpl ($.Files.Glob "skaha-config/*.json").AsConfig . | indent 2 }}
2525
{{- include "utils.extraConfig" (dict "extraConfigData" .Values.deployment.skaha.extraConfigData) -}}
2626
{{- (.Files.Glob "image-cache/*").AsConfig | nindent 2 }}

helm/applications/skaha/templates/skaha-tomcat-deployment.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,8 @@ spec:
8888
value: "{{ .Release.Name }}-redis-master.{{ .Release.Namespace }}.svc.{{ .Values.kubernetesClusterDomain }}"
8989
- name: REDIS_PORT
9090
value: "6379"
91-
{{- with .Values.experimentalFeatures }}
92-
{{- if .enable }}
93-
{{- with .sessionLimitRange }}
94-
{{- if eq .enabled true }}
95-
- name: SKAHA_EXPERIMENTAL_SESSION_LIMIT_RANGE_NAME
96-
value: "{{ $.Release.Name }}-session-limit-range"
97-
{{- end }}
98-
{{- end }}
99-
{{- end }}
100-
{{- end }}
91+
- name: SKAHA_EXPERIMENTAL_FEATURE_GATES
92+
value: "{{ include "skaha.experimentalFeatureGates" $ }}"
10193
{{- with .Values.deployment.skaha.extraEnv }}
10294
{{- toYaml . | nindent 8 }}
10395
{{- end }}

helm/applications/skaha/values.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ skahaWorkload:
1515
deployment:
1616
hostname: myhost.example.com # Change this!
1717
skaha:
18-
image: images.opencadc.org/platform/skaha:1.0.3
18+
image: images.opencadc.org/platform/skaha:1.1.0
1919
imagePullPolicy: Always
2020

2121
# Cron string for the image caching cron job schedule. Defaults to every half hour.
@@ -97,10 +97,11 @@ deployment:
9797
imagePullPolicy: Always
9898

9999
# Optionally configure the initContainer image for Redis. Useful for those not able to reach docker.io
100-
# Defaults to redis-7.4.2-alpine3.21.
100+
# Defaults to redis:8.2.2-bookworm.
101101
# Example:
102102
# initContainerImage: "private-image-repo/project/my-own-redis:1.0"
103103
# initContainerImage:
104+
initContainerImage: "redis:8.2.2-bookworm"
104105

105106
# Optionally configure the Kueue system to handle large workloads. Configurable per session type (e.g. desktop, notebook, etc.).
106107
# Leaving this empty will default to submitting Jobs to the base Kubernetes system.
@@ -289,6 +290,8 @@ experimentalFeatures:
289290

290291
# YAML to pass to a LimitRange object called "{{ .Release.Name }}-session-limit-range" in the workload Namespace to define the resource limits.
291292
# These limits will be applied to Container objects (User Sessions).
293+
# **NOTE**: This requires the experimentalFeatures.enabled to be true as well as the sessionLimitRange.enabled to be true.
294+
# **NOTE**: The min clause is ignored due to hard-coded resources for Desktop and Firefly sessions. The `defaultRequest` is used instead for these session types.
292295
# See https://kubernetes.io/docs/concepts/policy/limit-range/
293296
#
294297
# Example:
@@ -299,10 +302,6 @@ experimentalFeatures:
299302
# memory: "96Gi"
300303
# cpu: "12"
301304
# "nvidia.com/gpu": "4"
302-
# min:
303-
# memory: "1Gi"
304-
# cpu: "1"
305-
# "nvidia.com/gpu": "0"
306305
# default: # actually refers to default limit
307306
# memory: "32Gi"
308307
# cpu: "8"
@@ -330,6 +329,9 @@ storage:
330329

331330
# For caching images from the Image Repository and for the writing the POSIX Users and Groups to be shared with Job files
332331
redis:
332+
image:
333+
repository: redis
334+
tag: 8.2.2-bookworm
333335
architecture: 'standalone'
334336
auth:
335337
enabled: false

0 commit comments

Comments
 (0)