Skip to content

add cluster annotation for codefresh builds. deploys - #36

Merged
vigneshrajsb merged 2 commits into
mainfrom
add-cluster-annotation-codefresh-build
Aug 18, 2025
Merged

add cluster annotation for codefresh builds. deploys #36
vigneshrajsb merged 2 commits into
mainfrom
add-cluster-annotation-codefresh-build

Conversation

@vigneshrajsb

Copy link
Copy Markdown
Contributor

What

Adds additional annotation eksCluster to differentiate if deploys are across different clusters

example:

hooks:
  on_elected:
    annotations:
      set:
        - annotations:
            - uuid: twilight-glade-591445
            - deployUUID: backend-svc-twilight-glade-591445
            - branch: vigneshrajsb-patch
            - author: vigneshrajsb
            - eksCluster: lifecycle-gke

@vigneshrajsb
vigneshrajsb requested a review from a team as a code owner August 18, 2025 23:02
@vigneshrajsb
vigneshrajsb requested a review from Copilot August 18, 2025 23:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds cluster annotation support to differentiate Codefresh builds and deploys across different clusters. The change introduces an eksCluster annotation that is set from the lifecycleDefaults.deployCluster configuration value.

Key changes:

  • Added deployCluster parameter to build options and passed through the deployment pipeline
  • Updated Helm YAML generation to include eksCluster annotation with fallback to 'unknown'
  • Enhanced test fixtures to validate the new annotation behavior

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/server/services/deploy.ts Added deployCluster parameter to build options from lifecycleDefaults
src/server/lib/helm/helm.ts Updated Helm YAML generation to include eksCluster annotation
src/server/lib/codefresh/utils/generateYaml.ts Added eksCluster annotation to Codefresh YAML generation
src/server/lib/codefresh/types.ts Added deployCluster as optional property to ContainerBuildOptions
src/server/lib/codefresh/utils/tests/generateYaml.test.ts Updated test to validate eksCluster annotation
src/server/lib/codefresh/fixtures/codefresh.ts Added deployCluster field to test fixtures

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@vigneshrajsb
vigneshrajsb merged commit 0619eb8 into main Aug 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants