From 7a1514e3988633f93ce00d46782b559a1f92ba6d Mon Sep 17 00:00:00 2001 From: scme0 Date: Tue, 21 Oct 2025 17:49:11 +0200 Subject: [PATCH 1/5] update promotiontasks crd --- .../gitops-operator/crds/promotiontasks.yaml | 114 +++++++++++++++++- 1 file changed, 109 insertions(+), 5 deletions(-) diff --git a/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml b/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml index cac9a9d6..443ee9cf 100644 --- a/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml +++ b/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml @@ -256,6 +256,33 @@ spec: - promotionValues - targetApplication type: object + revertPromotionCommit: + properties: + commitSha: + maxLength: 40 + minLength: 7 + pattern: ^[A-Fa-f0-9]+$ + type: string + targetApplication: + properties: + name: + maxLength: 253 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?)(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + namespace: + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - name + - namespace + type: object + required: + - commitSha + - targetApplication + type: object runWorkflow: properties: labels: @@ -487,6 +514,8 @@ spec: type: string healthMessage: type: string + revision: + type: string sync: description: SyncStatusCode is a type which represents possible comparison results @@ -500,11 +529,29 @@ spec: - healthMessage - sync type: object - commitSha: - maxLength: 40 - minLength: 7 - pattern: (^[A-Fa-f0-9]+$|^$) - type: string + commitInfo: + properties: + commitAuthorId: + properties: + email: + type: string + username: + type: string + required: + - email + - username + type: object + commitDate: + format: date-time + type: string + commitMessage: + type: string + commitSha: + maxLength: 40 + minLength: 7 + pattern: (^[A-Fa-f0-9]+$|^$) + type: string + type: object phase: description: PromoteAppWithCommitPhase enum: @@ -525,6 +572,8 @@ spec: type: string healthMessage: type: string + revision: + type: string sync: description: SyncStatusCode is a type which represents possible comparison results @@ -538,6 +587,29 @@ spec: - healthMessage - sync type: object + commitInfo: + properties: + commitAuthorId: + properties: + email: + type: string + username: + type: string + required: + - email + - username + type: object + commitDate: + format: date-time + type: string + commitMessage: + type: string + commitSha: + maxLength: 40 + minLength: 7 + pattern: (^[A-Fa-f0-9]+$|^$) + type: string + type: object phase: description: PromoteAppWithPRPhase enum: @@ -552,6 +624,36 @@ spec: required: - phase type: object + revertPromotionCommit: + properties: + appStatus: + properties: + health: + description: Represents resource health status + type: string + healthMessage: + type: string + revision: + type: string + sync: + description: SyncStatusCode is a type which represents + possible comparison results + type: string + syncOperation: + type: string + syncOperationMessage: + type: string + required: + - health + - healthMessage + - sync + type: object + commitSha: + maxLength: 40 + minLength: 7 + pattern: (^[A-Fa-f0-9]+$|^$) + type: string + type: object runWorkflow: properties: nodes: @@ -613,6 +715,8 @@ spec: type: string healthMessage: type: string + revision: + type: string sync: description: SyncStatusCode is a type which represents possible comparison results From 329273f32cf43371fd56868a2792a8cb30fb98ee Mon Sep 17 00:00:00 2001 From: scme0 Date: Tue, 21 Oct 2025 17:53:52 +0200 Subject: [PATCH 2/5] fixup --- .../gitops-operator/crds/promotiontasks.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml b/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml index 443ee9cf..6351be94 100644 --- a/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml +++ b/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml @@ -653,6 +653,17 @@ spec: minLength: 7 pattern: (^[A-Fa-f0-9]+$|^$) type: string + phase: + description: RevertPromotionCommitPhase + enum: + - Unknown + - Pending + - RevertDone + - Syncing + - Complete + type: string + required: + - phase type: object runWorkflow: properties: From 1cf12a261461573e09c78c3ab40fd957ee2d14ac Mon Sep 17 00:00:00 2001 From: scme0 Date: Tue, 21 Oct 2025 18:29:21 +0200 Subject: [PATCH 3/5] fix crd --- .../gitops-operator/crds/promotiontasks.yaml | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml b/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml index 6351be94..cd5fab83 100644 --- a/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml +++ b/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml @@ -648,11 +648,29 @@ spec: - healthMessage - sync type: object - commitSha: - maxLength: 40 - minLength: 7 - pattern: (^[A-Fa-f0-9]+$|^$) - type: string + commitInfo: + properties: + commitAuthorId: + properties: + email: + type: string + username: + type: string + required: + - email + - username + type: object + commitDate: + format: date-time + type: string + commitMessage: + type: string + commitSha: + maxLength: 40 + minLength: 7 + pattern: (^[A-Fa-f0-9]+$|^$) + type: string + type: object phase: description: RevertPromotionCommitPhase enum: From 3c70ba92582ae5208db1a43c3670c019b415008a Mon Sep 17 00:00:00 2001 From: Noam Gal Date: Wed, 22 Oct 2025 12:22:34 +0300 Subject: [PATCH 4/5] use specific app-proxy and gitops-operator tags --- charts/gitops-runtime/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/gitops-runtime/values.yaml b/charts/gitops-runtime/values.yaml index 63a07799..52a76a82 100644 --- a/charts/gitops-runtime/values.yaml +++ b/charts/gitops-runtime/values.yaml @@ -469,8 +469,8 @@ app-proxy: repository: codefreshplugins/argo-hub-codefresh-csdp-image-enricher-jira-info tag: 1.1.17-main image: - repository: quay.io/codefresh/cap-app-proxy - tag: 1.3820.0 + repository: quay.io/codefresh/dev/cap-app-proxy + tag: 1.3844.0-emea-hackathon-reverterators-b24bcf6 pullPolicy: IfNotPresent # -- Extra volume mounts for main container extraVolumeMounts: [] @@ -633,8 +633,8 @@ gitops-operator: image: # -- defaults registry: quay.io - repository: codefresh/codefresh-gitops-operator - tag: "6881890" + repository: codefresh/dev/codefresh-gitops-operator + tag: feat-hackathon-rollback-support-63752f3 env: GITOPS_OPERATOR_VERSION: 0.11.1 serviceAccount: From 362cda8eb58f884edd9a6ad6804b60cf2e73ccaf Mon Sep 17 00:00:00 2001 From: scme0 Date: Wed, 22 Oct 2025 11:25:56 +0200 Subject: [PATCH 5/5] update crd --- .../gitops-operator/crds/promotiontasks.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml b/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml index cd5fab83..66362d92 100644 --- a/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml +++ b/charts/gitops-runtime/templates/_components/gitops-operator/crds/promotiontasks.yaml @@ -337,8 +337,9 @@ spec: type: object x-kubernetes-validations: - message: exactly one of the fields in [runWorkflow promoteAppWithCommit - promoteAppWithPR verifyApp getPromotionValues] must be set - rule: '[has(self.runWorkflow),has(self.promoteAppWithCommit),has(self.promoteAppWithPR),has(self.verifyApp),has(self.getPromotionValues)].filter(x,x==true).size() + promoteAppWithPR verifyApp getPromotionValues revertPromotionCommit] + must be set + rule: '[has(self.runWorkflow),has(self.promoteAppWithCommit),has(self.promoteAppWithPR),has(self.verifyApp),has(self.getPromotionValues),has(self.revertPromotionCommit)].filter(x,x==true).size() == 1' maxItems: 100 minItems: 1 @@ -440,7 +441,6 @@ spec: phase: description: PromotionTaskPhase enum: - - Pending - Executing - Terminating - Succeeded @@ -497,7 +497,6 @@ spec: phase: description: PromotionTaskPhase enum: - - Pending - Executing - Terminating - Succeeded @@ -781,8 +780,9 @@ spec: type: object x-kubernetes-validations: - message: exactly one of the fields in [runWorkflow promoteAppWithCommit - promoteAppWithPR verifyApp getPromotionValues] must be set - rule: '[has(self.runWorkflow),has(self.promoteAppWithCommit),has(self.promoteAppWithPR),has(self.verifyApp),has(self.getPromotionValues)].filter(x,x==true).size() + promoteAppWithPR verifyApp getPromotionValues revertPromotionCommit] + must be set + rule: '[has(self.runWorkflow),has(self.promoteAppWithCommit),has(self.promoteAppWithPR),has(self.verifyApp),has(self.getPromotionValues),has(self.revertPromotionCommit)].filter(x,x==true).size() == 1' maxItems: 100 minItems: 1