Skip to content

Commit

Permalink
Merge pull request #1141 from equinor/master
Browse files Browse the repository at this point in the history
add-batchstatus-rules (#1134)
  • Loading branch information
satr authored Jul 10, 2024
2 parents 1bd8ffe + 3749447 commit b361e07
Show file tree
Hide file tree
Showing 20 changed files with 416 additions and 136 deletions.
4 changes: 2 additions & 2 deletions charts/radix-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: radix-operator
version: 1.37.1
appVersion: 1.57.0
version: 1.37.2
appVersion: 1.57.1
kubeVersion: ">=1.24.0"
description: Radix Operator
keywords:
Expand Down
109 changes: 109 additions & 0 deletions charts/radix-operator/templates/radixapplication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2101,6 +2101,60 @@ spec:
format: int32
minimum: 0
type: integer
batchStatusRules:
description: BatchStatusRules Rules define how a batch status
is set corresponding to batch job statuses
items:
description: BatchStatusRule Rule how to set a batch status
by job statuses
properties:
batchStatus:
description: BatchStatus The status of the batch corresponding
to job statuses
enum:
- Running
- Succeeded
- Failed
- Waiting
- Stopping
- Stopped
- Active
- Completed
type: string
condition:
description: Condition of a rule
enum:
- All
- Any
type: string
jobStatuses:
description: JobStatuses Matching job statuses within
the rule
items:
description: RadixBatchJobPhase represents the phase
of the job
enum:
- Waiting
- Active
- Running
- Succeeded
- Failed
- Stopped
type: string
type: array
operator:
description: Operator of a rule
enum:
- In
- NotIn
type: string
required:
- batchStatus
- condition
- jobStatuses
- operator
type: object
type: array
dockerfileName:
description: |-
Name of the Dockerfile that builds the job.
Expand All @@ -2125,6 +2179,61 @@ spec:
format: int32
minimum: 0
type: integer
batchStatusRules:
description: BatchStatusRules Rules define how a batch
status in an environment is set corresponding to batch
job statuses
items:
description: BatchStatusRule Rule how to set a batch
status by job statuses
properties:
batchStatus:
description: BatchStatus The status of the batch
corresponding to job statuses
enum:
- Running
- Succeeded
- Failed
- Waiting
- Stopping
- Stopped
- Active
- Completed
type: string
condition:
description: Condition of a rule
enum:
- All
- Any
type: string
jobStatuses:
description: JobStatuses Matching job statuses within
the rule
items:
description: RadixBatchJobPhase represents the
phase of the job
enum:
- Waiting
- Active
- Running
- Succeeded
- Failed
- Stopped
type: string
type: array
operator:
description: Operator of a rule
enum:
- In
- NotIn
type: string
required:
- batchStatus
- condition
- jobStatuses
- operator
type: object
type: array
dockerfileName:
description: |-
Name of the Dockerfile that builds the component.
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ module github.com/equinor/radix-operator

go 1.22.0

toolchain go1.22.1
toolchain go1.22.4

require (
dario.cat/mergo v1.0.0
github.com/cert-manager/cert-manager v1.14.2
github.com/equinor/radix-common v1.7.1
github.com/equinor/radix-common v1.9.2
github.com/golang/mock v1.6.0
github.com/google/uuid v1.6.0
github.com/kedacore/keda/v2 v2.13.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emicklei/go-restful/v3 v3.11.2 h1:1onLa9DcsMYO9P+CXaL0dStDqQ2EHHXLiz+BtnqkLAU=
github.com/emicklei/go-restful/v3 v3.11.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/equinor/radix-common v1.7.1 h1:kl7Tuo2VEo2WHGm/vkvktrZ9t9S3Nht7Mob3CSIzcJI=
github.com/equinor/radix-common v1.7.1/go.mod h1:M6mhgHtFQ3rnjJnyOuECXiZOh7XQ5xVeHMyCAU+YPzQ=
github.com/equinor/radix-common v1.9.2 h1:pOYN/mSAoPe6KO/Nvudfd5DUETbLv4nLTLzFPr62ADw=
github.com/equinor/radix-common v1.9.2/go.mod h1:ekn86U68NT4ccSdt3GT+ukpiclzfuhr96a7zBJKv/jw=
github.com/evanphx/json-patch v5.8.1+incompatible h1:2toJaoe7/rNa1zpeQx0UnVEjqk6z2ecyA20V/zg8vTU=
github.com/evanphx/json-patch v5.8.1+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
Expand Down
124 changes: 124 additions & 0 deletions json-schema/radixapplication.json
Original file line number Diff line number Diff line change
Expand Up @@ -2128,6 +2128,68 @@
"minimum": 0,
"type": "integer"
},
"batchStatusRules": {
"description": "BatchStatusRules Rules define how a batch status is set corresponding to batch job statuses",
"items": {
"description": "BatchStatusRule Rule how to set a batch status by job statuses",
"properties": {
"batchStatus": {
"description": "BatchStatus The status of the batch corresponding to job statuses",
"enum": [
"Running",
"Succeeded",
"Failed",
"Waiting",
"Stopping",
"Stopped",
"Active",
"Completed"
],
"type": "string"
},
"condition": {
"description": "Condition of a rule",
"enum": [
"All",
"Any"
],
"type": "string"
},
"jobStatuses": {
"description": "JobStatuses Matching job statuses within the rule",
"items": {
"description": "RadixBatchJobPhase represents the phase of the job",
"enum": [
"Waiting",
"Active",
"Running",
"Succeeded",
"Failed",
"Stopped"
],
"type": "string"
},
"type": "array"
},
"operator": {
"description": "Operator of a rule",
"enum": [
"In",
"NotIn"
],
"type": "string"
}
},
"required": [
"batchStatus",
"condition",
"jobStatuses",
"operator"
],
"type": "object"
},
"type": "array"
},
"dockerfileName": {
"description": "Name of the Dockerfile that builds the job.\nMore info: https://www.radix.equinor.com/references/reference-radix-config/#dockerfilename-2",
"type": "string"
Expand All @@ -2147,6 +2209,68 @@
"minimum": 0,
"type": "integer"
},
"batchStatusRules": {
"description": "BatchStatusRules Rules define how a batch status in an environment is set corresponding to batch job statuses",
"items": {
"description": "BatchStatusRule Rule how to set a batch status by job statuses",
"properties": {
"batchStatus": {
"description": "BatchStatus The status of the batch corresponding to job statuses",
"enum": [
"Running",
"Succeeded",
"Failed",
"Waiting",
"Stopping",
"Stopped",
"Active",
"Completed"
],
"type": "string"
},
"condition": {
"description": "Condition of a rule",
"enum": [
"All",
"Any"
],
"type": "string"
},
"jobStatuses": {
"description": "JobStatuses Matching job statuses within the rule",
"items": {
"description": "RadixBatchJobPhase represents the phase of the job",
"enum": [
"Waiting",
"Active",
"Running",
"Succeeded",
"Failed",
"Stopped"
],
"type": "string"
},
"type": "array"
},
"operator": {
"description": "Operator of a rule",
"enum": [
"In",
"NotIn"
],
"type": "string"
}
},
"required": [
"batchStatus",
"condition",
"jobStatuses",
"operator"
],
"type": "object"
},
"type": "array"
},
"dockerfileName": {
"description": "Name of the Dockerfile that builds the component.\nMore info: https://www.radix.equinor.com/references/reference-radix-config/#dockerfilename",
"type": "string"
Expand Down
44 changes: 0 additions & 44 deletions pipeline-runner/pipelines/testdata/radixconfig.variable.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions pipeline-runner/pipelines/testdata/radixconfig.yaml

This file was deleted.

Loading

0 comments on commit b361e07

Please sign in to comment.