Configurations
Schedule Specifications¶
This page provides examples and schema references for defining schedules at project
, profile
, and instance
levels.
Project Tags (Advanced)¶
Use the paas.envmgmt.io/schedules
tag to apply global schedules to all profiles and instances in a project.
apiVersion: tags.k8smgmt.io/v3
kind: ProjectTagsAssociation
metadata:
name: projecttagassocdemo1
project: defaultproject
spec:
associations:
- tagType: cost
tagKey: paas.envmgmt.io/schedules
tagValue: >
[{"name":"stop-action-1","actionName":"start","cronExpression":"0 10 * * *","cronTimezone":"Asia/Kolkata","profileName":"schedule-partner-2","enforceTimeWindow":true}]
Schedule Spec Format¶
Schedules are defined as an array of objects using a standard JSON structure. This structure is used across project tags, profiles, and instance-level configurations.
"schedules": [
{
"name": "schedule-1",
"actionName": "start",
"cronExpression": "0 2 * * *",
"cronTimezone": "Asia/Kolkata",
"enforceTimeWindow": false,
"profileName": "profile1"
},
{
"name": "schedule-2",
"actionName": "stop",
"cronExpression": "0 15 * * *",
"cronTimezone": "Asia/Kolkata",
"enforceTimeWindow": false,
"profileName": "profile2"
}
]
actionName
: Action to execute (e.g.,start
,stop
)cronExpression
: Schedule in standard cron formatcronTimezone
: Time zone for cron interpretationenforceTimeWindow
: If true, prevents manual start/deploy outside the defined timeprofileName
: (Optional) Used to target a specific profile in tag-based schedules
Profile-Level Schedule Specification¶
The following examples show how to define schedules directly in service and compute profiles.
Service Profile with Schedules¶
apiVersion: paas.envmgmt.io/v1
kind: ServiceProfile
metadata:
name: notebook-demo-schedules
project: system-catalog
spec:
environmentTemplate:
name: actions-env-temp
version: v3
variables:
- name: input1
valueType: text
value: test1default
options:
required: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: input3
valueType: text
options:
sensitive: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: input4
valueType: text
value: test5
options:
required: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: run_strategy
valueType: text
value: default
options:
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
sharing:
shareMode: None
serviceType: notebook
envVars:
- key: env_var1
value: '5'
options:
override:
type: allowed
files:
- name: file-upload
options:
override:
type: allowed
systemCatalog: true
schedules:
- name: start
actionName: start
cronExpression: 00 9 * * *
cronTimezone: Asia/Calcutta
enforceTimeWindow: true
- name: stop
actionName: stop
cronExpression: 0 18 * * *
cronTimezone: Asia/Calcutta
enforceTimeWindow: true
Compute Profile with Schedules¶
apiVersion: paas.envmgmt.io/v1
kind: ComputeProfile
metadata:
name: vcluster-demo-schedules
project: system-catalog
spec:
type: Compute
allocationType: Dedicated
scalabilityType: Fixed
environmentTemplate:
name: actions-env-temp
version: v1
variables:
- name: input1
valueType: text
value: test1default
options:
required: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: input3
valueType: text
options:
sensitive: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: input4
valueType: text
value: test5
options:
required: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: run_strategy
valueType: text
value: default
options:
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
sharing:
shareMode: None
systemCatalog: true
computeType: baremetal
schedules:
- name: start
actionName: start
cronExpression: 00 10 * * *
cronTimezone: Asia/Calcutta
enforceTimeWindow: true
- name: stop
actionName: stop
cronExpression: 00 19 * * *
cronTimezone: Asia/Calcutta
enforceTimeWindow: true
Instance-Level Schedule Specification¶
The end user can define schedules directly on individual compute or service instances.
Compute Instance with Schedules¶
apiVersion: paas.envmgmt.io/v1
kind: ComputeInstance
metadata:
name: vcluster-demo-schedules
project: system-catalog
spec:
computeProfile:
name: vcluster-demo-schedules
systemCatalog: true
variables:
- name: input1
valueType: text
value: test1default
options:
required: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: input4
valueType: text
value: test5
options:
required: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: input3
valueType: text
options:
sensitive: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: run_strategy
valueType: text
value: default
options:
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
computeType: baremetal
schedules:
- name: start
actionName: start
cronExpression: 00 9 * * *
cronTimezone: Asia/Calcutta
enforceTimeWindow: true
- name: stop
actionName: stop
cronExpression: 00 17 * * *
cronTimezone: Asia/Calcutta
enforceTimeWindow: true
Service Instance with Schedules¶
apiVersion: paas.envmgmt.io/v1
kind: Service
metadata:
name: notebook-demo-schedules
project: system-catalog
spec:
computeInstance:
name: actions-instance
serviceProfile:
name: notebook-demo-schedules
systemCatalog: true
variables:
- name: input1
valueType: text
value: test1default
options:
required: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: input4
valueType: text
value: test5
options:
required: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: input3
valueType: text
options:
sensitive: true
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
- name: run_strategy
valueType: text
value: default
options:
override:
type: allowed
displayMetadata:
disabled: false
section: ''
sectionDescription: ''
tooltip: ''
weight: ''
sharing:
shareMode: None
serviceType: notebook
envVars:
- key: env_var
value: '1'
options:
override:
type: allowed
schedules:
- name: start
actionName: start
cronExpression: 00 9 * * *
cronTimezone: Asia/Calcutta
enforceTimeWindow: true
- name: stop
actionName: stop
cronExpression: 00 18 * * *
cronTimezone: Asia/Calcutta
enforceTimeWindow: true
Environment Variables via Global Settings (Optional)¶
To enable scheduled PaaS actions (e.g., start/stop) across tenant projects, the partner must configure their Partner API Key
as a sensitive environment variable in Global Settings
. This API key enables cross-organization access, is securely injected into environment workflows, and is used to authenticate actions across multiple project instances in tenant organizations based on the defined schedules.
apiVersion: system.k8smgmt.io/v3
kind: GlobalSettings
metadata:
name: globalSettings
project: default-catalog
spec:
envs:
- key: PARTNER_API_KEY
options:
sensitive: true
override:
type: notallowed
mask: true
value: "<REDACTED-KEY>"
This ensures API-based automation runs securely and reliably without hardcoding sensitive values.