Skip to content

Commit 5a380c8

Browse files
committed
More detail for the RFC
Signed-off-by: GregoireW <[email protected]>
1 parent 2d92cdd commit 5a380c8

File tree

1 file changed

+16
-5
lines changed
  • rfcs/0005-managed-attributes-image-automation

1 file changed

+16
-5
lines changed

rfcs/0005-managed-attributes-image-automation/README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,23 @@ This raise the question on should this feature to be included in flux or not.
5555

5656
## Design Details
5757

58-
Simple update on the image automation controller should be enough. Today a
59-
filter in the image policy is like:
58+
Two options are possible here:
59+
60+
- Only modify the Image Automation Controller to make it read ImagePolicies spec
61+
and compute attributes
62+
- Modify the Image Reflector Controller, to extract the attributes, stores them
63+
in the status and update the Image Automation Controller to use this new data storage.
64+
65+
The second option seems to be preferable to separate concerns.
66+
67+
A simple option would be to allow multiple capture group in the filter in the ImagePolicy:
6068

6169
```yaml
6270
extract: $ts
6371
pattern: ^pr-(?P<pr>.*)-(?P<ts>\d*)-(?P<sha1>.*)$
6472
```
6573
66-
It is possible to modify the image automation to take comment like:
74+
And then to modify the Image Automation Controller to take comment like:
6775
6876
```yaml
6977
# {"$imagepolicy": "{namespace}:{imagepolicy}:{attributes}"
@@ -77,8 +85,11 @@ From previous pattern example, accepted attributes will be:
7785
- ts
7886
- sha1
7987

80-
If a user try to use an attribute name like `tag` or `name` which is
81-
already defined by flux core, then the original meaning will still be kept :
88+
If a user try to capture an attribute with a name like `tag` or `name` (already defined
89+
by flux core), then the original value will be kept and a warning should show on the
90+
Image Reflector Controller logs.
91+
92+
As reminder, here is the definition for those default attributes:
8293

8394
- tag: the full tag string
8495
- name: the image name

0 commit comments

Comments
 (0)