-
Notifications
You must be signed in to change notification settings - Fork 716
Description
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