From 95285a67a23058f02e775d4a5daf2620181760a0 Mon Sep 17 00:00:00 2001 From: Dipankar Das <65275144+dipankardas011@users.noreply.github.com> Date: Sat, 1 Jun 2024 20:52:42 +0530 Subject: [PATCH] improved the docs on the ksctl various aspects Signed-off-by: Dipankar Das <65275144+dipankardas011@users.noreply.github.com> --- content/en/docs/Concepts/_index.md | 36 ++++++++++++++++++- .../docs/Concepts/ksctl cloud controller.md | 10 +----- .../docs/Concepts/ksctl distro controller.md | 8 ++--- content/en/docs/Concepts/ksctl manager.md | 19 +++++++--- .../en/docs/Ksctl Operators/stateimporter.md | 4 +++ 5 files changed, 58 insertions(+), 19 deletions(-) diff --git a/content/en/docs/Concepts/_index.md b/content/en/docs/Concepts/_index.md index 7b1e13e..479d40c 100644 --- a/content/en/docs/Concepts/_index.md +++ b/content/en/docs/Concepts/_index.md @@ -4,4 +4,38 @@ description: > Concepts around ksctl core --- -This section will help you to learn about the underlying system of Ksctl. It will help you to obtain a deeper understanding of how Ksctl works. \ No newline at end of file +This section will help you to learn about the underlying system of Ksctl. It will help you to obtain a deeper understanding of how Ksctl works. + +## Sequence diagrams for 2 major operations + +### Create Cloud-Managed Clusters +```mermaid +sequenceDiagram + participant cm as Manager Cluster Managed + participant cc as Cloud Controller + participant kc as Ksctl Kubernetes Controller + cm->>cc: transfers specs from user or machine + cc->>cc: to create the cloud infra (network, subnet, firewall, cluster) + cc->>cm: 'kubeconfig' and other cluster access to the state + cm->>kc: shares 'kubeconfig' + kc->>kc: installs kubectl agent, stateimporter and controllers + kc->>cm: status of creation +``` + +### Create Self-Managed HA clusters +```mermaid +sequenceDiagram + participant csm as Manager Cluster Self-Managed + participant cc as Cloud Controller + participant bc as Bootstrap Controller + participant kc as Ksctl Kubernetes Controller + csm->>cc: transfers specs from user or machine + cc->>cc: to create the cloud infra (network, subnet, firewall, vms) + cc->>csm: return state to be used by BootstrapController + csm->>bc: transfers infra state like ssh key, pub IPs, etc + bc->>bc: bootstrap the infra by either (k3s or kubeadm) + bc->>csm: 'kubeconfig' and other cluster access to the state + csm->>kc: shares 'kubeconfig' + kc->>kc: installs kubectl agent, stateimporter and controllers + kc->>csm: status of creation +``` \ No newline at end of file diff --git a/content/en/docs/Concepts/ksctl cloud controller.md b/content/en/docs/Concepts/ksctl cloud controller.md index 463ee5d..2ac325d 100644 --- a/content/en/docs/Concepts/ksctl cloud controller.md +++ b/content/en/docs/Concepts/ksctl cloud controller.md @@ -6,13 +6,5 @@ categories: [Examples] --- {{% pageinfo %}} -This is a placeholder page. Replace it with your own content. +It is responsible for controlling the sequence of tasks for every cloud provider to be executed {{% /pageinfo %}} - -## Ksctl Cloud Controller - -Controller for Cloud Providers - -## Role -Cloud Controller is responsible for controlling the sequence of tasks for every cloud provider to be executed - diff --git a/content/en/docs/Concepts/ksctl distro controller.md b/content/en/docs/Concepts/ksctl distro controller.md index d5fde35..a278f5f 100644 --- a/content/en/docs/Concepts/ksctl distro controller.md +++ b/content/en/docs/Concepts/ksctl distro controller.md @@ -5,9 +5,7 @@ description: > categories: [Examples] --- -# Ksctl Distribution Controller -Controller for Kubernetes Distribution - -## Role -Distribution Controller is responsible for controlling the execution sequence for configuring Cloud Resources wrt to the Kubernetes distribution choosen +{{% pageinfo %}} +It is responsible for controlling the execution sequence for configuring Cloud Resources wrt to the Kubernetes distribution choosen +{{% /pageinfo %}} diff --git a/content/en/docs/Concepts/ksctl manager.md b/content/en/docs/Concepts/ksctl manager.md index b2576e3..45d8924 100644 --- a/content/en/docs/Concepts/ksctl manager.md +++ b/content/en/docs/Concepts/ksctl manager.md @@ -5,10 +5,21 @@ description: > categories: [Examples] --- -# Ksctl Core Manager +{{% pageinfo %}} +It is responsible for managing client requests and calls the corresponding controller +{{% /pageinfo %}} -Core ksctl manager. Every ksctl request flows through it +## Types -## Role -Manager is responsible for managing client requests and calls the corresponding controller +### ManagerClusterKsctl +`Role`: Perform ksctl **getCluster**, **switchCluster** +### ManagerClusterKubernetes +`Role`: Perform ksctl **addApplicationAndCrds** +Currently to be used by machine to machine not by ksctl cli + +### ManagerClusterManaged +`Role`: Perform ksctl **createCluster**, **deleteCluster** + +### ManagerClusterSelfManaged +`Role`: Perform ksctl **createCluster**, **deleteCluster**, **addWorkerNodes**, **delWorkerNodes** diff --git a/content/en/docs/Ksctl Operators/stateimporter.md b/content/en/docs/Ksctl Operators/stateimporter.md index 5388156..5175a53 100644 --- a/content/en/docs/Ksctl Operators/stateimporter.md +++ b/content/en/docs/Ksctl Operators/stateimporter.md @@ -19,3 +19,7 @@ It utilizes the these 2 methods: so before the ksctl agent is deployed we first create this pod which in turn runs a http server having `storageProvider: store-kubernetes` and uses `storage.Import()` method once we get 200 OK responses from the http server we remove the pod and move to ksctl agent deployment so that it can use the state file present in configmaps, secrets + +{{% alert title="Warning" color="warning" %}} +If the storageType is external (mongodb), we don't need this to be happening instead we create kubernetes secret where the external storage solution environment variable is set and also we need to customize the ksctl agent deployment +{{% /alert %}} \ No newline at end of file