Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change event trigger replica properties to executions, add polling in… #23810

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,11 @@
}
},
"ScaleRuleAuth": {
"description": "Auth Secrets for Container App Scale Rule",
"description": "Auth Secrets for Scale Rule",
"type": "object",
"properties": {
"secretRef": {
"description": "Name of the Container App secret from which to pull the auth params.",
"description": "Name of the secret from which to pull the auth params.",
"type": "string"
},
"triggerParameter": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@
},
"eventTriggerConfig": {
"type": "object",
"description": "Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default",
"description": "Trigger configuration of an event driven job.",
"properties": {
"replicaCompletionCount": {
"$ref": "#/definitions/ReplicaCompletionCount"
Expand All @@ -720,7 +720,7 @@
"$ref": "#/definitions/Parallelism"
},
"scale": {
"$ref": "./CommonDefinitions.json#/definitions/Scale"
"$ref": "#/definitions/JobScale"
}
}
},
Expand Down Expand Up @@ -935,6 +935,64 @@
"format": "int32",
"type": "integer"
},
"PollingInterval": {
"description": "Interval to check each event source in seconds. Defaults to 30s",
"format": "int32",
"type": "integer"
},
trajkobal marked this conversation as resolved.
Show resolved Hide resolved
"JobScaleRule": {
"description": "Scaling rule.",
"type": "object",
"properties": {
"name": {
"description": "Scale Rule Name",
"type": "string"
},
"type": {
"description": "Type of the scale rule\neg: azure-servicebus, redis etc.",
"type": "string"
},
"metadata": {
"description": "Metadata properties to describe the scale rule.",
"type": "object"
},
"auth": {
"description": "Authentication secrets for the scale rule.",
"type": "array",
"items": {
"$ref": "./CommonDefinitions.json#/definitions/ScaleRuleAuth"
}
}
}
},
"JobScale": {
"description": "Scaling configurations for event driven jobs.",
"type": "object",
"properties": {
"pollingInterval": {
"$ref": "#/definitions/PollingInterval"
},
"minExecutions": {
"format": "int32",
"description": "Minimum number of job executions that are created for a trigger, default 0",
"type": "integer",
"default": 0
},
"maxExecutions": {
"format": "int32",
"description": "Maximum number of job executions that are created for a trigger, default 100.",
"type": "integer",
"default": 100
},
"rules": {
"description": "Scaling rules.",
"type": "array",
"items": {
"$ref": "#/definitions/JobScaleRule"
}
}
}
},
"JobExecutionBase": {
"description": "Container App's Job execution name.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@
"replicaCompletionCount": 1,
"parallelism": 4,
"scale": {
"minReplicas": 1,
"maxReplicas": 5,
"pollingInterval": 40,
"minExecutions": 1,
"maxExecutions": 5,
"rules": [
{
"name": "servicebuscalingrule",
"custom": {
"type": "azure-servicebus",
"metadata": {
"concurrentRequests": "50"
}
"type": "azure-servicebus",
"metadata": {
"topicName": "my-topic"
}
}
]
Expand All @@ -36,24 +35,7 @@
"containers": [
{
"image": "repo/testcontainerAppsJob0:v1",
"name": "testcontainerAppsJob0",
"probes": [
{
"type": "Liveness",
"httpGet": {
"path": "/health",
"port": 8080,
"httpHeaders": [
{
"name": "Custom-Header",
"value": "Awesome"
}
]
},
"initialDelaySeconds": 5,
"periodSeconds": 3
}
]
"name": "testcontainerAppsJob0"
}
],
"initContainers": [
Expand Down Expand Up @@ -95,16 +77,15 @@
"replicaCompletionCount": 1,
"parallelism": 4,
"scale": {
"minReplicas": 1,
"maxReplicas": 5,
"pollingInterval": 20,
"minExecutions": 1,
"maxExecutions": 5,
"rules": [
{
"name": "servicebuscalingrule",
"custom": {
"type": "azure-servicebus",
"metadata": {
"concurrentRequests": "50"
}
"name": "githubscalingrule",
"type": "github-runner",
"metadata": {
"githubAPIURL": "https://api.github.com"
}
}
]
Expand All @@ -120,24 +101,7 @@
"resources": {
"cpu": 0.2,
"memory": "100Mi"
},
"probes": [
{
"type": "Liveness",
"httpGet": {
"path": "/health",
"port": 8080,
"httpHeaders": [
{
"name": "Custom-Header",
"value": "Awesome"
}
]
},
"initialDelaySeconds": 3,
"periodSeconds": 3
}
]
}
}
],
"initContainers": [
Expand Down Expand Up @@ -181,16 +145,16 @@
"replicaCompletionCount": 1,
"parallelism": 4,
"scale": {
"minReplicas": 1,
"maxReplicas": 5,
"minExecutions": 1,
"maxExecutions": 5,
"pollingInterval": 20,
"rules": [
{
"name": "servicebuscalingrule",
"custom": {
"type": "azure-servicebus",
"metadata": {
"concurrentRequests": "50"
}
"type": "azure-servicebus",
"metadata": {
"queueName": "my-queue",
"messageCount": "50"
}
}
]
Expand All @@ -206,24 +170,7 @@
"resources": {
"cpu": 0.2,
"memory": "100Mi"
},
"probes": [
{
"type": "Liveness",
"httpGet": {
"path": "/health",
"port": 8080,
"httpHeaders": [
{
"name": "Custom-Header",
"value": "Awesome"
}
]
},
"initialDelaySeconds": 3,
"periodSeconds": 3
}
]
}
}
],
"initContainers": [
Expand Down