controlplaneio / simulator

Kubernetes Security Training Platform - focusing on security mitigation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move all the state into the kubesim folder

raoulmillais opened this issue · comments

Create an abstraction to formalise what state is stored and pave a path for adding future state. Also make sure that the state can be moved somewhere else in an atomic unit if needed.

We currently store:

  • SSH config in ~/.ssh
  • SSH keypair in ~/.ssh
  • perturb log files for each node and master in ~/.kubesim/
  • docker-all-pods (all pods in the cluster) in ~/.kubesim
  • docker-master (all containers running on master) in ~/.kubesim
  • docker-node-0 (all containers running on node-0) in ~/.kubesim
  • docker-node-1 (all containers running on node-1) in ~/.kubesim

We ought to also store:

  • Infra IP addresses (separate from SSH config)
  • Scenario deployed to the cluster
  • Cluster creation date
  • Progress for all scenarios run so far

We ought to archive cluster-specific state apart from progress when simulator infra destroy is run

includes figure out if it should even be in kubesim/cloud/where?

includes figure out if it should even be in kubesim/cloud/where?

My thoughts on this was that I'll standardise putting everything in kubesim folder for now as that's the simplest thing that will work, requiring the least code changes. Simulator will define an interface for retrieving / storing state with the default implementation doing this but we can swap out and use a new implementation if we want to keep the state somewhere else.

Dying issue, will be closed soon

this completed?

yup 👍