-
The goal is to design the image-{reflector,automation} APIs for v1beta1, which will then be kept backward-compatible. To make sure changes have time in the field before that, the first part of the proposal is this:
The rest of the proposal explains features we want to make room for in the API, and where they will fit. I'll put together a suggested API with YAML examples, in an answer. Image automation APIUse of
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
I propose we add |
Beta Was this translation helpful? Give feedback.
-
Here are examples of the image.toolkit.fluxcd.io types with all the discussed bits put in, as marked by comments: apiVersion: image.toolkit.fluxcd.io/v1alpha2
kind: ImageUpdateAutomation
metadata:
name: foo
namespace: foo-system
spec:
interval: 5m
suspend: false
targetNamespace: app # "Namespaces and source references"; optional, use policies in this namespace, default is same namespace
sourceRef: # renamed from .spec.checkout.gitRepositoryRef
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository # | Bucket
name: tenant-repo
namespace: tenant # NB "Namespaces and source references" cross-namespace source ref
update: # a union, other strategies could go in here
path: ./config
strategy: Setters
git: # git repository source specific; | bucket: {...}
checkout:
# (gitRepositoryRef was here)
ref: # optional; falls back to using the ref given in the git repository
branch: main # | tag: v1 | commit: 321cba | semver: '1.x', if semantics for these allow
commit:
author: # required because .spec.commit.author.email is required
name: Fluxbot
email: [email protected]
messageTemplate: |
Another commit from fluxbot!
signing: # "Signing commits" above
secretRef:
name: gpg-keys
push:
branch: auto-updates apiVersion: image.toolkit.fluxcd.io/v1alpha2
kind: ImagePolicy
metadata:
name: app-version
namespace: app
spec:
imageRepositoryRef:
name: app-image
policy:
semver: # | alphabetical | numerical | timestamp | git, with their own fields
range: '1.x'
filterTags: {...} # as before
pinVersion: # "Pin the image tag or digest", not sure of design here, just a placeholder
tag: v1.2.5 # | digest apiVersion: image.toolkit.fluxcd.io/v1alpha2
kind: ImageRepository
metadata:
name: app-image
name: app
spec:
image: podinfo
exclude: # "Exclude bad images at the repository level" above, design TBD
- v1.2.4
interval: 10m
timeout: 30s
secretRef:
name: dockerconfig
certSecretRef:
name: certs
platform: {...} # "Authentication for specific platforms", for platform-specific auth; requirement TBD
suspend: false |
Beta Was this translation helpful? Give feedback.
-
One thing that you are writing about is the secret duplication and enabling cross-namespace references. Another option (that may make the spec easier) could be to recommend a third party solution for that and leave it to the end users to decide if they want to manually duplicate something or use automation. In my case, especially when using GitOps, duplication usually isn't a problem. If I need a secret per namespace the automation we use can do that instead of relying on Flux to take care of that using cross-namespace references. If we don't use the automation for it, something else like the Azure KeyVault CSI driver can be used, or something like kubed to sync between namespaces: https://github.com/appscode/kubed At least worth thinking about 😊 |
Beta Was this translation helpful? Give feedback.
-
Update on graduating to v1beta1We've now released the image controllers, and a flux which will install them, that uses
(and for the sake of completeness, bugs that have been closed were closed without changing the API) Some issues logged suggest possible new features, so let's cover those off:
(If I've missed any you think are worth mentioning, please tell me) I propose the |
Beta Was this translation helpful? Give feedback.
Update on graduating to v1beta1
We've now released the image controllers, and a flux which will install them, that uses
v1alpha2
. There are some issues logged since then, but I do not think they are problems with the API itself:(and for the sake of completeness, bugs that have been closed were closed without changing the API)
Some issues logged suggest possible new features, so let's cover those off: