Trigger a Flux reconciliation from the cluster UI
### Release notes While FluxCD triggers a reconciliation following the configured interval, there are situations where you might want to get an immediate reconciliation. There are multiple options for this, like triggering the reconciliation from CI or the command line. GitLab now allows you to trigger a reconciliation without any additional setup from the GitLab UI. To trigger a reconciliation, you should navigate to the Kubernetes dashboard configured for the specific Flux resource, and open the Flux details by clicking on the Flux status badge. ### Problem to solve As an application operator, I want to trigger a reconciliation of Flux resources, so I don't have to wait for the reconciliation loop to start. ### Proposal Flux uses the `reconcile.fluxcd.io/requestedAt` annotation to trigger a reconciliation. Whenever the value differs from the value saved in the resources `state`, Flux reconciles. For example, the Flux documentation describes to manually trigger a reconciliation with ```sh kubectl annotate --field-manager=flux-client-side-apply --overwrite gitrepository/<repository-name> reconcile.fluxcd.io/requestedAt="$(date +%s)" ``` ### Intended users * [Allison (Application Ops)](https://about.gitlab.com/handbook/product/personas/#allison-application-ops) ### Feature Usage Metrics - MAU of button clicks ### Impletetion guide 1. Add a "refresh" button into the details drawer, near the status field. 2. Create a client Graphql mutation using PATCH request to the `/-/k8s-proxy/apis/kustomize.toolkit.fluxcd.io/v1/namespaces/<namespace>/kustomizations/<name>` or `/-/k8s-proxy/apis/helm.toolkit.fluxcd.io/v2beta1/namespaces/<namespace>/helmreleases/<name>`. 3. Include body: ```javascript "body": `[{ "op": "replace", "path": "/metadata/annotations/reconcile.fluxcd.io~1requestedAt", "value": ${new Date()} }]` ``` 4. Set `"Content-Type": "application/json-patch+json"` header. ### Does this feature require an audit event? No _This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc._ <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> *This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.* <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
issue