Keep state under prefix path
We currently keep configuration separated for each prefix in subfolders. However, the state is in the root of the configuration repository, which means that the kubeconfig and some other things end up there.
Due to the way we currently set up multiple workload clusters, this becomes a problem, since compliantkubernetes-apps will be configured to use the prefix subfolder and thus look for the kubeconfig in ${PREFIX}-config/.state instead of .state.
I suggest we move the state to the prefix subfolders to solve this. Otherwise we will have to copy/link these files around all the time.
Definition of done: State is stored per cluster in the subfolders, instead of in a common folder with different names for the kubeconfigs.
Relevant code:
- How apps is configured for multiple clusters: https://github.com/elastisys/compliantkubernetes/blob/main/docs/operator-manual/exoscale.md#apps
- Common paths for apps: https://github.com/elastisys/compliantkubernetes-apps/blob/main/bin/common.bash
- Common paths for kubespray: https://github.com/elastisys/compliantkubernetes-kubespray/blob/main/bin/common.bash
This should be unnecessary once ADR 0006 "Use Standard Kubeconfig Mechanisms" is approved and implemented.
Meanwhile, we run into this every time we set up a new environment. I think a quick fix for this would be very much appreciated while we wait for the ADR to be implemented.