Skip to content

Commit

Permalink
improved the docs on the ksctl various aspects
Browse files Browse the repository at this point in the history
Signed-off-by: Dipankar Das <65275144+dipankardas011@users.noreply.github.com>
  • Loading branch information
dipankardas011 committed Jun 1, 2024
1 parent 2c6a4a1 commit 95285a6
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 19 deletions.
36 changes: 35 additions & 1 deletion content/en/docs/Concepts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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
```
10 changes: 1 addition & 9 deletions content/en/docs/Concepts/ksctl cloud controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

8 changes: 3 additions & 5 deletions content/en/docs/Concepts/ksctl distro controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}}
19 changes: 15 additions & 4 deletions content/en/docs/Concepts/ksctl manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
4 changes: 4 additions & 0 deletions content/en/docs/Ksctl Operators/stateimporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}}

0 comments on commit 95285a6

Please sign in to comment.