-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added docs on how to use the ksctl application components
Signed-off-by: Dipankar Das <65275144+dipankardas011@users.noreply.github.com>
- Loading branch information
1 parent
d28481d
commit 98b7851
Showing
4 changed files
with
119 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
--- | ||
title: Ksctl Components | ||
description: Place of all the documentation for the Operators used specifically for k8s clusters | ||
categories: [Examples, Placeholders] | ||
tags: [test, docs] | ||
tags: [docs] | ||
--- | ||
|
||
Operators | ||
## Components | ||
- ksctl agent | ||
- ksctl stateimporter | ||
- ksctl application controller | ||
|
||
|
||
|
||
## Sequence diagram on how its deployed | ||
```mermaid | ||
flowchart TD | ||
Base(Ksctl Infra and Bootstrap) -->|Cluster is created| KC(Ksctl controller) | ||
KC -->|Creates| Storage{storageProvider=='local'} | ||
Storage -->|Yes| KSI(Ksctl Storage Importer) | ||
Storage -->|No| KA(Ksctl Agent) | ||
KSI -->KA | ||
KA -->|Health| D(Deploy other ksctl controllers) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
title: Ksctl Agent | ||
description: Documentation on ksctl agent | ||
categories: [Examples, Placeholders] | ||
tags: [docs] | ||
--- | ||
|
||
|
||
{{% pageinfo %}} | ||
It is a ksctl's solution to infrastructure management and also kubernetes management. | ||
|
||
Especially inside the kubertes cluster | ||
{{% /pageinfo %}} | ||
|
||
|
||
It is a GRPC server running as a deployment. and a fleet of controllers will call it to perform certain operations. For instance, application installation via `stack.application.ksctl.com/v1alpha`, etc. | ||
|
||
It will be installed on all kubernetes cluster created via ksctl from >= v1.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: Ksctl Application Controller | ||
description: Documentation on ksctl application controller | ||
categories: [Examples, Placeholders] | ||
tags: [docs] | ||
--- | ||
|
||
{{% pageinfo %}} | ||
It helps in deploying applications using crd to help manage with installaztion, upgrades, downgrades, uninstallaztion. from one version to another and provide a single place of truth where to look for which applications are installed | ||
{{% /pageinfo %}} | ||
|
||
## Types | ||
|
||
### Stack | ||
|
||
For defining a hetrogenous components we came up with a stack which contains `M` number of components which are different applications with their versions | ||
|
||
{{% alert title="Info" color="info" %}} | ||
this is current available on all clusters created by `ksctl@v1.2.0` | ||
{{% /alert %}} | ||
|
||
{{% alert title="Note" color="info" %}} | ||
It has a dependency on `ksctl agent` | ||
{{% /alert %}} | ||
|
||
#### Example usage | ||
|
||
Lets deploy `argocd@v2.9.X`, `prometheus-stack@v55.X.Y` | ||
```yaml | ||
apiVersion: application.ksctl.com/v1alpha1 | ||
kind: Stack | ||
metadata: | ||
name: monitoring-plus-gitops | ||
spec: | ||
components: | ||
- appName: argocd | ||
appType: app | ||
version: v2.9.12 | ||
|
||
- appName: prometheus-stack | ||
appType: app | ||
version: "55.0.0" | ||
``` | ||
|
||
You can see once its deployed it fetch and deploys them | ||
|
||
Lets try to upgrade them to their latest versions | ||
```bash | ||
kubeclt edit stack monitoring-plus-gitops | ||
``` | ||
|
||
```yaml | ||
apiVersion: application.ksctl.com/v1alpha1 | ||
kind: Stack | ||
metadata: | ||
name: monitoring-plus-gitops | ||
spec: | ||
components: | ||
- appName: argocd | ||
appType: app | ||
version: latest | ||
|
||
- appName: prometheus-stack | ||
appType: app | ||
version: latest | ||
``` | ||
|
||
once edited it will uninstall the previous install and reinstalls the latest deployments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: Ksctl State-Importer | ||
description: Documentation on ksctl stateimporter | ||
categories: [Examples, Placeholders] | ||
tags: [docs] | ||
--- | ||
|
||
{{% pageinfo %}} | ||
It is a helper deployment to transfer state information from one storage option to another. | ||
{{% /pageinfo %}} | ||
|
||
It is used to transfer data in `~/.ksctl` location (provided the cluster is created via `storageProvider: store-local`). | ||
|
||
|
||
It utilizes the these 2 methods: | ||
- `Export`: [StorageFactory Interface](https://github.com/ksctl/ksctl/blob/d3c2d74fe03ab1e8ad48d45290662c878196889b/pkg/types/typesStorage.go#L34) | ||
- `Import`: [StorageFactory Interface](https://github.com/ksctl/ksctl/blob/d3c2d74fe03ab1e8ad48d45290662c878196889b/pkg/types/typesStorage.go#L37) | ||
|
||
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 |