Commit 8420727
RHOAIENG-48052: Scheduled sessions (#864)
Introduce scheduled sessions that let users create cron-based schedules
for automatically launching agentic sessions. The feature spans all
layers of the platform:
Backend: CRUD handlers for scheduled sessions backed by Kubernetes
CronJobs, with suspend/resume, manual trigger, and run-history
endpoints. Auth checks delegate to the user's token while CronJob
operations use the backend service account.
Operator: session-trigger subcommand that runs inside CronJob-spawned
pods, reads a session template from env vars, and creates an
AgenticSession CR. ProjectSettings reconciler ensures per-namespace
RBAC (ServiceAccount, Role, RoleBinding) for the trigger SA.
Frontend: Schedules tab in the project workspace, create dialog with
cron presets and expression preview, detail page with run history,
Next.js API route proxies, React Query hooks, and TypeScript types.
Manifests: Backend ClusterRole gains CronJob and Job/create permissions,
operator ClusterRole gains AgenticSession/create, backend deployment
reads OPERATOR_IMAGE and IMAGE_PULL_POLICY from operator-config
ConfigMap, Vertex AI config keys made optional to avoid clobbering.
Includes unit tests for backend helpers (sanitizeLabelValue,
cronJobToScheduledSession), operator trigger (sanitizeName), operator
RBAC (ensureSessionTriggerRBAC), frontend query hooks, and cron utils.
---------
Signed-off-by: Martin Prpič <mprpic@redhat.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 3f8f78b commit 8420727
48 files changed
Lines changed: 3448 additions & 755 deletions
File tree
- components
- backend
- handlers
- server
- types
- frontend
- src
- app
- api/projects/[name]/scheduled-sessions
- [scheduledSessionName]
- resume
- runs
- suspend
- trigger
- projects/[name]
- scheduled-sessions/[scheduledSessionName]
- _components
- components
- chat
- workspace-sections
- lib
- __tests__
- services
- api
- queries
- __tests__
- types/api
- manifests
- base
- crds
- rbac
- overlays
- e2e
- kind
- operator
- internal
- handlers
- trigger
- public-api
- handlers
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
783 | 791 | | |
784 | 792 | | |
785 | 793 | | |
| |||
0 commit comments