Using flux bootstrap, but preventing overwrite of an existing flux #4235
-
We are using flux bootstrap to install and configure an initial installation onto a brand new cluster. However, there are multiple implementations of Flux including Azure Flux AKS Add-on, Azure Arc Flux Add-on, the flux terraform provider to name just a few. If flux was already installed and managed by a different source, such as via Azure Flux on AKS or with a cluster build using the flux terraform provider, then the Flux CLI should not take over management of the installation due to conflicts with the existing source. It would therefore be beneficial for an option to the flux bootstrap command to safely detect an existing flux already installed and exit instead of upgrading the existing flux installation to handle this case. For example: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
When running We can look for the
The Flux version should be extracted from the Both xref: #4342 To prevent people from upgrading by mistake a cluster with
The Flux version should be extracted from the xref: #4341 |
Beta Was this translation helpful? Give feedback.
When running
flux bootstrap
orflux install
we should detect if Flux is already installed on the cluster with Helm (what the Azure Flux addon does).We can look for the
app.kubernetes.io/managed-by: Helm
label on thegitrepositories.source.toolkit.fluxcd.io
CRD. If the CRD exists and has this label & value, we should prompt like so:The Flux version should be extracted from the
app.kubernetes.io/version
label value.Both
flux bootstrap
andflux install
commands should have a--force
flag, when set, this will bypass the above prompt.xref: #4342
To prev…