From fe52b53276769040e8ed85f5bd76445fea662a6f Mon Sep 17 00:00:00 2001 From: Danny Eiselt Date: Mon, 26 Aug 2024 11:22:09 +0200 Subject: [PATCH 1/3] fixed: docs formatting for docs.scs.community Signed-off-by: Danny Eiselt --- docs/architecture/overview.md | 20 +++++++++++--------- docs/develop/develop.md | 12 ++++++------ docs/reference/clusterstack.md | 10 +++++----- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/docs/architecture/overview.md b/docs/architecture/overview.md index d9e842dec..5e8d5d489 100644 --- a/docs/architecture/overview.md +++ b/docs/architecture/overview.md @@ -1,4 +1,6 @@ -# Architecture +# Overview + +## Architecture ![Cluster Stacks](../pics/syself-cluster-stacks-web.png) @@ -6,7 +8,7 @@ The cluster stacks are opinionated templates of clusters in which all configuration and all core components are defined. They can be implemented on any provider. -There can be multiple cluster stacks that acknowledge the many ways in which a cluster can be set up. There is no right or wrong and cluster stacks make sure that the flexibility is not lost. +There can be multiple cluster stacks that acknowledge the many ways in which a cluster can be set up. There is no right or wrong and cluster stacks make sure that the flexibility is not lost. At the same time, they offer ready-made templates for users, who do not have to spend a lot of thought on how to build clusters so that everything works well together. @@ -20,23 +22,23 @@ To sum up, there are three components of a cluster stack: 2. Cluster API objects: The `ClusterClass` object makes it easier to use Cluster-API. The cluster stack contains a `ClusterClass` object and other Cluster-API objects that are necessary in order to use the `ClusterClass`. These objects have to be applied in the management cluster. 3. Node images: Node images can be provided to the user in different form. They are released and tested together with the other two components of the cluster stack. -More information about cluster stacks and their three parts can be found in https://github.com/SovereignCloudStack/cluster-stacks/blob/main/README.md. +More information about cluster stacks and their three parts can be found in https://github.com/SovereignCloudStack/cluster-stacks/blob/main/README.md. ## Cluster Stack Operator The Cluster Stack Operator takes care of all steps that have to be done in order to use a certain cluster stack implementation. -It has to be installed in the management cluster and can be interacted with by applying custom resources. It extends the functionality of the Cluster API operators. +It has to be installed in the management cluster and can be interacted with by applying custom resources. It extends the functionality of the Cluster API operators. The Cluster Stack Operator mainly applies the two Helm charts from a cluster stack implementation. It is also able to automatically fetch a remote Github repository to see whether there are new releases of a certain cluster stack. -The first and second component of a cluster stack are handled by the Cluster Stack Operator. +The first and second component of a cluster stack are handled by the Cluster Stack Operator. The node images, on the other hand, have to be handled by separate provider integrations, similar to the ones that [Cluster-API uses](https://cluster-api.sigs.k8s.io/developer/providers/implementers-guide/overview). ## Cluster Stack Provider Integrations -The Cluster Stack Operator is accompanied by Cluster Stack Provider Integrations. A provider integration is also an operator that works together with the Cluster Stack Operator in a specific way, which is described in the docs about building [provider integrations](../develop/provider-integration.md). +The Cluster Stack Operator is accompanied by Cluster Stack Provider Integrations. A provider integration is also an operator that works together with the Cluster Stack Operator in a specific way, which is described in the docs about building [provider integrations](../develop/provider-integration.md). A provider integration makes sure that the node images are taken care of and made available to the user. @@ -46,7 +48,7 @@ If there is no work to be done for node images, then the Cluster Stack Operator There are many steps that are needed in order to make cluster stacks ready to use. In order to understand the full flow better and to get an idea of how much work there is and how many personas are involved, we will give an overview of how to start from scratch with a new cluster stack and provider. -We will assume that this operator exists, but that you want to use a new cluster stack and provider. +We will assume that this operator exists, but that you want to use a new cluster stack and provider. ### Defining a cluster stack @@ -58,8 +60,8 @@ The next step is to implement your cluster stack for your provider. You can take ### Implementing a Cluster Stack Provider Integration -We assume that you need to do some manual tasks in order to make node images accessible on your provider. These steps should be implemented in a Cluster Stack Provider Integration, which of course has to work together with the details of how you implemented your cluster stack. +We assume that you need to do some manual tasks in order to make node images accessible on your provider. These steps should be implemented in a Cluster Stack Provider Integration, which of course has to work together with the details of how you implemented your cluster stack. ### Using everything -Finally, you can use the new cluster stack you defined and implemented on the infrastructure of your provider. Enjoy! \ No newline at end of file +Finally, you can use the new cluster stack you defined and implemented on the infrastructure of your provider. Enjoy! diff --git a/docs/develop/develop.md b/docs/develop/develop.md index cb45a9027..00de4abdc 100644 --- a/docs/develop/develop.md +++ b/docs/develop/develop.md @@ -1,7 +1,7 @@ # Develop Cluster Stack Operator -Developing our operator is quite easy. First, you need to install some base requirements: Docker and Go. Second, you need to configure your environment variables. Then you can start developing with the local Kind cluster and the Tilt UI to create a workload cluster that is already pre-configured. +Developing our operator is quite easy. First, you need to install some base requirements: Docker and Go. Second, you need to configure your environment variables. Then you can start developing with the local Kind cluster and the Tilt UI to create a workload cluster that is already pre-configured. ## Setting Tilt up 1. Install Docker and Go. We expect you to run on a Linux OS. @@ -10,8 +10,8 @@ Developing our operator is quite easy. First, you need to install some base requ ## Developing with Tilt

-tilt -

+tilt +

Operator development requires a lot of iteration, and the “build, tag, push, update deployment” workflow can be very tedious. Tilt makes this process much simpler by watching for updates and automatically building and deploying them. To build a kind cluster and to start Tilt, run: @@ -23,7 +23,7 @@ make tilt-up You should make sure that everything in the UI looks green. If not, e.g. if the clusterstack has not been synced, you can trigger the Tilt workflow again. In case of the clusterstack button this might be necessary, as it cannot be applied right after startup of the cluster and fails. Tilt unfortunately does not include a waiting period. -If everything is green, then you can already check for your clusterstack that has been deployed. You can use a tool like k9s to have a look at the management cluster and its custom resources. +If everything is green, then you can already check for your clusterstack that has been deployed. You can use a tool like k9s to have a look at the management cluster and its custom resources. Example: @@ -47,7 +47,7 @@ In case you want to change some code, you can do so and see that Tilt triggers o If you want to change something in your ClusterStack or Cluster custom resources, you can have a look at `.cluster.yaml` and `.clusterstack.yaml`, which Tilt uses. -To tear down the workload cluster press the "Delete Workload Cluster" button. After a few minutes the resources should be deleted. +To tear down the workload cluster press the "Delete Workload Cluster" button. After a few minutes the resources should be deleted. To tear down the kind cluster, use: @@ -55,4 +55,4 @@ To tear down the kind cluster, use: $ make delete-bootstrap-cluster ``` -If you have any trouble finding the right command, then you can use `make help` to get a list of all available make targets. +If you have any trouble finding the right command, then you can use `make help` to get a list of all available make targets. diff --git a/docs/reference/clusterstack.md b/docs/reference/clusterstack.md index 1e044dfa1..88bed9744 100644 --- a/docs/reference/clusterstack.md +++ b/docs/reference/clusterstack.md @@ -1,6 +1,6 @@ ## ClusterStack -The `ClusterStack` object is the main resource for users to work with. It contains the most important details of a cluster stack and its releases (i.e. certain versions). In its status is the main source of information of the state of everything related to cluster stacks. +The `ClusterStack` object is the main resource for users to work with. It contains the most important details of a cluster stack and its releases (i.e. certain versions). In its status is the main source of information of the state of everything related to cluster stacks. @@ -8,9 +8,9 @@ The `ClusterStack` object is the main resource for users to work with. It contai The `ClusterStack` object has a sub-resource `ClusterStackRelease` for every release that should be provided to the user, either by specifying them manually in the versions array, or automatically through the auto-subscribe functionality. -The controller reconciles the two sources of information and checks whether for every release that should exist, there is actually one. It also deletes `ClusterStackRelease` objects that are not required anymore. +The controller reconciles the two sources of information and checks whether for every release that should exist, there is actually one. It also deletes `ClusterStackRelease` objects that are not required anymore. -Additionally, it fetches information from the `ClusterStackRelease` objects and populates its own state with it. +Additionally, it fetches information from the `ClusterStackRelease` objects and populates its own state with it. In case that a provider integration is used, it will create `ProviderClusterStackRelease` objects in addition to `ClusterStackRelease` objects, based on the `ProviderClusterStackReleaseTemplate` objects given as reference in `spec.providerRef`. @@ -21,7 +21,7 @@ In case that a provider integration is used, it will create `ProviderClusterStac | ------------------------ | --------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | provider | string | | yes | Name of the provider, e.g. "docker". It is used in various places, e.g. while fetching the respective release assets or while naming resources (ClusterStackReleases, ProviderClusterStackResources, etc.).| | name | string | | yes | Name of the cluster stack. It is used as well for fetching release assets and other tasks. | -| kubernetesVersion | string | | yes | Kubernetes version in the format '.', e.g. 1.26. Specifies the Kubernetes minor version of the cluster stack that should be taken.| +| kubernetesVersion | string | | yes | Kubernetes version in the format `.`, e.g. 1.26. Specifies the Kubernetes minor version of the cluster stack that should be taken.| | channel | string | stable | no | Name of release channel that is used, e.g. stable channel ("v1", "v2", etc.) or beta channel (e.g. "v0-beta.1").| | versions | []string | | no | List of versions that the controller should make available of a cluster stack. Used only in case very specific versions are supposed to be used. Not required if always the latest versions should be made available. | | autoSubscribe | bool | true | no | Specifies whether the controller should automatically check whether there are new releases of the cluster stack and if so automatically download them. | @@ -45,4 +45,4 @@ spec: channel: stable autoSubscribe: true noProvider: true -``` \ No newline at end of file +``` From bfe9a357453813d7654dee586bf6116f7e3f32b2 Mon Sep 17 00:00:00 2001 From: Danny Eiselt Date: Mon, 26 Aug 2024 11:50:28 +0200 Subject: [PATCH 2/3] fixed: troubleshooting docs heading Signed-off-by: Danny Eiselt --- docs/topics/troubleshoot.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/topics/troubleshoot.md b/docs/topics/troubleshoot.md index eef5fdf89..40bc0e780 100644 --- a/docs/topics/troubleshoot.md +++ b/docs/topics/troubleshoot.md @@ -1,5 +1,4 @@ - -## Troubleshooting +# Troubleshooting Check the latest events: @@ -10,7 +9,7 @@ kubectl get events -A --sort-by=.lastTimestamp Check the conditions: ```shell -go run github.com/guettli/check-conditions@latest all +go run github.com/guettli/check-conditions@latest all ``` Check with `clusterctl`: From f68db3269c592c8e5e527754f01e9675a23ba313 Mon Sep 17 00:00:00 2001 From: Danny Eiselt Date: Mon, 26 Aug 2024 12:04:07 +0200 Subject: [PATCH 3/3] fixed: develop docs heading Signed-off-by: Danny Eiselt --- docs/develop/develop.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/develop/develop.md b/docs/develop/develop.md index 00de4abdc..1c8be00d8 100644 --- a/docs/develop/develop.md +++ b/docs/develop/develop.md @@ -1,4 +1,6 @@ -# Develop Cluster Stack Operator +# Contributing + +## Develop Cluster Stack Operator Developing our operator is quite easy. First, you need to install some base requirements: Docker and Go. Second, you need to configure your environment variables. Then you can start developing with the local Kind cluster and the Tilt UI to create a workload cluster that is already pre-configured.