Skip to content

Dynamic Feature branch supported ? #5727

@bdoublet91

Description

@bdoublet91

Hi,
I have a specific usecase about the feature branch deployement.
The idea is that the dev will create a feature branch named feature/rbac and versionned it 1.4.0-rbac.1.
Also I would have an imagePolicies test-feature

  - name: test-feature
    labels:
      app: test
      type: rc
    imageRepositoryRef:
      name: test
    policy:
      semver:
        range: ">=0.0.0-0"
    filterTags:
      pattern: '^\d+\.\d+\.\d+(?:-rbac\.\d+)?$'

And a marker in my values.yaml in order to update automatically the values.yaml when a new incremental rbac image is trigger:

    appVersion: "1.37.0-rc2" # {"$imagepolicy": "flux-system:test-feature:tag"}

For now the setup is working but it's not dynamic at all. If a new dev create a feature branch toto, I have to create another Image Policies, change the pattern, redeploy flux, change marker (for each dev feature) ...

Do you have a way to create a dynamic ImagePolicy with a variable or something that come from marker like:

    appVersion: "1.37.0-rc2" # {"$imagepolicy": "flux-system:test-feature:tag","feature": "rbac"}

  - name: test-feature
    labels:
      app: test
      type: rc
    imageRepositoryRef:
      name: test
    policy:
      semver:
        range: ">=0.0.0-0"
    filterTags:
      pattern: '^\d+\.\d+\.\d+(?:-{{ feature }}\.\d+)?$'

I quite understand that an image policy only trigger one image at a time so maybe it' s not possible by design ?

flux-system   test-release            **/test             1.36.0        True    Latest image tag for **/test resolved to 1.36.0 (previously **/test/1.35.0)                                7d1h

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions