Commit Graph

9 Commits (bf36a29ca2c91f9e61b6b0f11f61f752f37e61dc)

Author SHA1 Message Date
Sunny 9dd98fb2b2 Update image-reflector API to v1beta2
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2 years ago
Somtochi Onyekwere 82a8697f28 Add gvk to rest of api type
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
3 years ago
Hidde Beydals 9607b07e65 Request reconcile using patch instead of update
This should prevent the generation of the object getting bumped, as
observed on a GKE K8s 1.18 cluster using the  logic before this commit.

We only want to generation to increase when there are actual changes to
the `spec` of a resource, as some controllers use the `generation`
value to make assumptions about what they should do during a
reconciliation.

Signed-off-by: Hidde Beydals <hello@hidde.co>
3 years ago
Michael Bridgen 34484734d8 Use image API v1beta1
Signed-off-by: Michael Bridgen <michael@weave.works>
4 years ago
Hidde Beydals 3a8aad7e5c Move to `v1alpha2` image update APIs
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Michael Bridgen cafce536bb Rename asRuntime* -> asClient*
For the avoidance of misdirection.

Signed-off-by: Michael Bridgen <michael@weave.works>
4 years ago
Michael Bridgen d03280a12f Update to controller-runtime 0.7.0
controller-runtime methods now accept `client.Object` and
`client.ObjectList` rather than `runtime.Object`. This means the
adapter interfaces need to change signature, but happily, little else.

Since the list adapter is now distinct to the object adapter, `len()`
can go there instead of the command-specific interfaces.

Signed-off-by: Michael Bridgen <michael@weave.works>
4 years ago
Michael Bridgen 0e35c209d9 Factor out upsert and upsertAndWait
It's a common pattern in the create commands to construct a value,
then (if not exporting it) upsert it and wait for it to
reconcile. This commit factors `upsert`, which does the update/insert
bit, and `upsertAndWait`, which does the whole thing.

Since these output messages, they are methods of `apiType` (previously
`names`), so that they have access to the name of the kind they are
operating on.

Signed-off-by: Michael Bridgen <michael@weave.works>
4 years ago
Michael Bridgen 45240bdb71 Rename "auto" subcommands to "image"
This means all the sub-subcommands can drop the `image-` prefix,
making them shorter and more fluent.

E.g.,

    flux create image policy

rather than

    flux create auto image-policy

Signed-off-by: Michael Bridgen <michael@weave.works>
4 years ago