Skip to content

Commit 921b93b

Browse files
committed
feat(info): display minimum Kubernetes job user ID (#181)
Render the new `kubernetes_min_user_uid` field from the `/info` endpoint so that users can verify the cluster-configured minimum runtime container user ID accepted in `kubernetes_uid` workflow hints. Closes reanahub/reana#951
1 parent a1c7657 commit 921b93b

4 files changed

Lines changed: 112 additions & 0 deletions

File tree

client/operations/info_responses.go

Lines changed: 100 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/info.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,13 @@ func (o *infoOptions) run(cmd *cobra.Command) error {
180180
if p.KubernetesMaxMemoryRequest != nil {
181181
displayInfoStringItem(cmd, p.KubernetesMaxMemoryRequest.Title, p.KubernetesMaxMemoryRequest.Value)
182182
}
183+
if p.KubernetesMinUserUID != nil {
184+
cmd.Printf(
185+
"%s: %d\n",
186+
p.KubernetesMinUserUID.Title,
187+
p.KubernetesMinUserUID.Value,
188+
)
189+
}
183190
if p.MaximumInteractiveSessionInactivityPeriod != nil {
184191
displayInfoStringItem(cmd, p.MaximumInteractiveSessionInactivityPeriod.Title, p.MaximumInteractiveSessionInactivityPeriod.Value)
185192
}

cmd/info_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ func TestInfo(t *testing.T) {
4949
"Maximum allowed memory request for Kubernetes jobs: 5Gi",
5050
"Default memory limit for Kubernetes jobs: 3Gi",
5151
"Maximum allowed memory limit for Kubernetes jobs: 10Gi",
52+
"Minimum allowed user runtime container UID for Kubernetes jobs: 100",
5253
"Maximum inactivity period in days before automatic closure of interactive sessions: 7",
5354
"Maximum timeout for Kubernetes jobs: 500",
5455
"Maximum retention period in days for workspace files: 250",

testdata/inputs/info_big.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@
5555
"title": "Maximum timeout for Kubernetes jobs",
5656
"value": "500"
5757
},
58+
"kubernetes_min_user_uid": {
59+
"title": "Minimum allowed user runtime container UID for Kubernetes jobs",
60+
"value": 100
61+
},
5862
"maximum_workspace_retention_period": {
5963
"title": "Maximum retention period in days for workspace files",
6064
"value": "250"

0 commit comments

Comments
 (0)