compliantkubernetes-kubespray icon indicating copy to clipboard operation
compliantkubernetes-kubespray copied to clipboard

Keep state under prefix path

Open lentzi90 opened this issue 4 years ago • 2 comments

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

lentzi90 avatar Jan 28 '21 12:01 lentzi90

This should be unnecessary once ADR 0006 "Use Standard Kubeconfig Mechanisms" is approved and implemented.

cristiklein avatar Feb 11 '21 09:02 cristiklein

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.

lentzi90 avatar Feb 11 '21 11:02 lentzi90