This can happen when Custom Resource Definitions do not exist on the
cluster. For example, because only a subset of the Flux controllers are
installed on the cluster.
Previously, the detection was based on a combination of error type and
string matching. However, a more reliable (and maintained)
`apimeta.IsNoMatchError` checker is available upstream. Making it less
likely this suddenly stops to matching properly when Kubernetes changes
things.
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Remove reconcile subcommand for static object APIs Alerts and Providers.
Add a isStatic() method on all the object adapters to determine if
they are static and don't have reconciler. The objects that don't
have reconcilers are skipped from reconciliation and readiness
checks like HelmRepository of type OCI.
Add default ready message for `get` subcommand output for static
objects, Alerts, Providers and HelmRepositories of type OCI, as ready
message can't be derived for them from their status.
Signed-off-by: Sunny <darkowlzz@protonmail.com>
This change replaces all the many functions and ways of calculating
readiness of objects into one unified way that uses kstatus.Compute() to
check if the object is in progress or current. Only the objects that are
current are considered to be ready. This takes advantage of the kstatus
compatibility of Flux's APIs and also makes sure that they remain
kstatus compatible.
The new isObjectReady() function is also aware of static/statusless
objects and knows how to check their readiness using kstatus. This
prepares the CLI for the upcoming static API objects.
All the is*Ready() functions for specific objects have been removed.
This change doesn't affect any of the existing tests results.
Introduce suspend and resume subcommands for alert-provider.
Signed-off-by: Sunny <darkowlzz@protonmail.com>
Add flag `--ca-crt-file` to `flux create secret git` to specify the path
to CA certificate. It takes precedence over `--ca-file` and uses the
key `ca.crt` in the generated Secret.
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Add support for using `tls.key`, `tls.crt` and `ca.crt` keys while
generating a Secret, using the `--tls-key-file`, `--tls-crt-file` and
`--ca-crt-file` flags respectively.
Mark the flags `--key-file`, `--cert-file` and `--ca-file` as
deprecated.
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
If implemented users will be able to use a local kustomization file while
retrieving status from the live kustomization file.
Signed-off-by: Soule BA <soule@weave.works>
This change adds support for running `suspend/resume` on multiple
supported resources at the same time. This improves the user
experience by converting
```
flux suspend ks operator && \
flux suspend ks database && \
flux suspend ks app
```
to
```
flux suspend ks operator database app
```
This works for all types of resources (Kustomizations, Sources, etc.)
since it has been implemented at the `suspend.go` and `resume.go`
level.
When the `--wait` flag is passed to the `resume` command, then Flux
will wait for all resources in parallel within a goroutine each.
Each object is only processed once, even if user provided its name
more than once.
If suspension or resuming fails for one object, it is still carried
out for the remaining objects.
As a special case, the old behaviour of `resume` is retained, i.e.
when only one object name is provided, `resume` waits for the object
to become ready even if the `--wait` flag is not provided. In all
other cases the `--wait` flag is always considered.
closes#3746closes#3793
Co-Authored-By: Max Jonas Werner <mail@makk.es>
Signed-off-by: Rishikesh Nair <alienware505@gmail.com>
Signed-off-by: Max Jonas Werner <mail@makk.es>