feat: obot app scheduling info & page - #7070
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an admin-facing “App Scheduling” view (Kubernetes-only) that displays Helm-managed pod scheduling settings for the Obot application deployment, and refactors the existing “Server Scheduling” page to reuse a shared scheduling form component. On the backend, it introduces a new read-only API endpoint that pulls a Helm values snapshot from the chart-managed config secret.
Changes:
- UI: Add
/admin/app-scheduling(read-only) and refactor/admin/server-schedulingto use a sharedSchedulingFormcomponent. - Backend/API: Add
GET /api/app-k8s-settingsendpoint that reads anapp-k8s-settings.yamlsnapshot from the Helm config secret. - Helm/OpenAPI/types: Snapshot app scheduling values into the config secret and expose the new type through generated OpenAPI/apiclient types.
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/user/src/routes/admin/server-scheduling/+page.ts | Gates route to Kubernetes engine and uses parent() profile/version for error handling. |
| ui/user/src/routes/admin/server-scheduling/+page.svelte | Refactors UI to use SchedulingForm and shared resource parsing helper; updates page title. |
| ui/user/src/routes/admin/app-scheduling/+page.ts | New load function fetching app scheduling settings and redirecting when unavailable. |
| ui/user/src/routes/admin/app-scheduling/+page.svelte | New read-only UI page rendering SchedulingForm for app deployment settings. |
| ui/user/src/lib/services/admin/types.ts | Adds AppK8sSettings TS interface for the new endpoint. |
| ui/user/src/lib/services/admin/operations.ts | Adds getAppK8sSettings() client operation. |
| ui/user/src/lib/format.ts | Extracts resource YAML parsing into formatSchedulingResources(). |
| ui/user/src/lib/components/Layout.svelte | Adds “App Scheduling” nav item when running on Kubernetes. |
| ui/user/src/lib/components/admin/SchedulingForm.svelte | New shared scheduling form component for affinity/tolerations/resources/runtimeClassName. |
| pkg/storage/openapi/generated/openapi_generated.go | Adds OpenAPI schema for AppK8sSettings. |
| pkg/services/config.go | Plumbs ConfigSecret through services; scopes Helm parsing to Kubernetes backend. |
| pkg/mcp/loader.go | Adds ConfigSecret option for identifying the config secret name. |
| pkg/k8ssettings/secret.go | Reads app-k8s-settings.yaml from the config secret and unmarshals it. |
| pkg/k8ssettings/helm.go | Adds helpers for marshaling/handling empty Helm values. |
| pkg/k8ssettings/appsettings.go | Converts Helm snapshot values into API response (types.AppK8sSettings). |
| pkg/api/router/router.go | Registers GET /api/app-k8s-settings route. |
| pkg/api/handlers/appk8ssettings.go | Implements handler to build app scheduling settings from secret snapshot. |
| pkg/api/handlers/appk8ssettings_test.go | Adds unit tests for handler secret parsing and unavailable cases. |
| pkg/api/authz/authz.go | Allows authorized roles to call GET /api/app-k8s-settings. |
| chart/templates/secret.yaml | Adds app-k8s-settings.yaml snapshot into the config secret. |
| chart/templates/deployment.yaml | Sets OBOT_SERVER_CONFIG_SECRET env var for server to find the secret. |
| chart/templates/_helpers.tpl | Adds helper to render the app scheduling snapshot YAML. |
| apiclient/types/zz_generated.deepcopy.go | Adds deepcopy support for AppK8sSettings. |
| apiclient/types/appk8ssettings.go | Adds API client type for app scheduling settings. |
Files not reviewed (1)
- apiclient/types/zz_generated.deepcopy.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
57982fe to
ae89f67
Compare
g-linville
left a comment
There was a problem hiding this comment.
In general, the backend changes seem overcomplicated to me. I don't think we need to fetch the secret and read from it, when we already have access to all of the k8s settings within the system anyway, right? Or was this part of a design discussion I missed?
Oh no no, the only requirement was to display read-only information of scheduling and thought I'd take a crack at it. Thanks Grant for the review! Gonna run through it again and will address your review comments! |
22d1fb0 to
420224e
Compare
420224e to
fa695d1
Compare
fa695d1 to
a13a903
Compare
a13a903 to
126ef67
Compare
407b1b2 to
461fcee
Compare
461fcee to
bda10ce
Compare
bda10ce to
e33b0ed
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 16 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- apiclient/types/zz_generated.deepcopy.go: Generated file
Suppressed comments (1)
ui/user/src/routes/admin/app-scheduling/+page.svelte:40
lockedtriggers the Helm-managed copy/pill insideSchedulingForm, but the App Scheduling page is meant to be read-only because values are sourced from the live Deployment and may not be Helm-managed. This will show misleading "managed by your Helm chart" messaging.
<SchedulingForm
readonly
locked
bind:resourceInfo
GET /api/app-k8s-settings