mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-02 16:18:50 +00:00
non-reconciliable & readiness of static objects
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 commit is contained in:
parent
6135c326d8
commit
b28b5dd9b9
22 changed files with 80 additions and 97 deletions
|
|
@ -60,6 +60,7 @@ type reconcilable interface {
|
|||
GetAnnotations() map[string]string
|
||||
SetAnnotations(map[string]string)
|
||||
|
||||
isStatic() bool // is it a static object that does not have a reconciler?
|
||||
lastHandledReconcileRequest() string // what was the last handled reconcile request?
|
||||
successMessage() string // what do you want to tell people when successfully reconciled?
|
||||
}
|
||||
|
|
@ -100,6 +101,11 @@ func (reconcile reconcileCommand) run(cmd *cobra.Command, args []string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if reconcile.object.isStatic() {
|
||||
logger.Successf("reconciliation not supported by the object")
|
||||
return nil
|
||||
}
|
||||
|
||||
if reconcile.object.isSuspended() {
|
||||
return fmt.Errorf("resource is suspended")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue