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

Apply promotion policy to multiple stages #3670

Open
jessesuen opened this issue Mar 18, 2025 · 0 comments
Open

Apply promotion policy to multiple stages #3670

jessesuen opened this issue Mar 18, 2025 · 0 comments

Comments

@jessesuen
Copy link
Member

Proposed Feature

It would be useful to set a promotion policy based on a set of labels and/or naming patterns.

Today, a promotion policy is set against explicit names:

apiVersion: kargo.akuity.io/v1alpha1
kind: Project
metadata:
  name: example
spec:
  promotionPolicies:
  - stage: test
    autoPromotionEnabled: true
  - stage: uat
    autoPromotionEnabled: true

Instead, we could possibly use selectors:

spec:
  promotionPolicies:
  - stageSelector:
      matchLabels:
        autopromote: "true"
      matchExpressions:
        - { key: foo, operator: In, values: [bar] }
        - { key: env, operator: NotIn, values: [prod] }

or globs/regex:

spec:
  promotionPolicies:
  - autoPromotionEnabled: true
    name: glob:prod-*

Motivation

Currently, all the Stages need to be referened in the Project if you want auto promotion

Suggested Implementation

NOTE: labels are mutable on resources, but names cannot be changed. It could mean that there is a use case for globs/regex vs. labels. So we might want both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant