Skip to content

Commit 58ec470

Browse files
Initial version of Operator book structure
This commit puts together skeleton of Netlify book structure and by no means a final one and subject to change and iterations Signed-off-by: Furkat Gofurov <[email protected]>
1 parent b1f52e3 commit 58ec470

34 files changed

+1032
-14
lines changed

docs/book/src/01_intro.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/book/src/CONTRIBUTING.MD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{#include ../../../CONTRIBUTING.md}}

docs/book/src/SUMMARY.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1-
[Introduction](./01_intro.md)
2-
-[Installation](./02_installation/00.md)
3-
- [Plugin](./02_installation/01_plugin.md)
1+
# Summary
2+
3+
[Introduction](./introduction.md)
4+
[Quick Start](./user/quick-start.md)
5+
- [Installation](./installation/installation.md)
6+
- [Using plugin](./installation/plugin-installation.md)
7+
- [Using Manifests from Release Assets](./installation/manifest-installation.md)
8+
- [Using Helm Charts](./installation/helm-chart-installation.md)
9+
[Concepts](./user/concepts.md)
10+
- [Topics](./topics/topics.md)
11+
- [Cluster API Provider Lifecycle](./topics/capi-provides-lifecycle.md)
12+
- [Installing a Provider](./topics/installing-provider.md)
13+
- [Upgrading a Provider](./topics/upgrading-provider.md)
14+
- [Modifying a Provider](./topics/modifying-provider.md)
15+
- [Deleting a Provider](./topics/deleting-provider.md)
16+
- [Basic Cluster API Provider Installation](./topics/basic-capi-provider-installation.md)
17+
- [Installing the CoreProvider](./topics/installing-core-provider.md)
18+
- [Installing Azure Infrastructure Provider](./topics/installing-capz.md)
19+
- [Deleting providers](./topics/deleting-providers.md)
20+
- [Air-gapped Environment](./topics/air-gapped-environtment.md)
21+
- [Injecting additional manifests](./topics/injecting-additional-manifests.md)
22+
- [Developer Guide](./developer/guide.md)
23+
- [Releasing](./developer/release.md)
24+
- [Version migration](./developer/v1alpha1-to-v1alpha2.md)
25+
- [Reference](./reference/reference.md)
26+
- [API Reference](./reference/api_reference.md)
27+
- [Glossary](./reference/glossary.md)
28+
- [Code of Conduct](./code-of-conduct.md)
29+
- [Contributing](./CONTRIBUTING.md)
30+
- [CI Jobs](./reference/ci-jobs.md)

docs/book/src/code-of-conduct.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Code of Conduct
2+
3+
{{#include ../../../code-of-conduct.md}}

docs/book/src/developer/guide.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Developer Guide
2+
3+
## Prerequisites
4+
5+
### Docker
6+
7+
Iterating on the Cluster API Operator involves repeatedly building Docker containers.
8+
9+
[docker]: https://docs.docker.com/install/
10+
11+
### A Cluster
12+
13+
You'll likely want an existing cluster as your [management cluster][mcluster].
14+
The easiest way to do this is with [kind] v0.9 or newer, as explained in the quick start.
15+
16+
Make sure your cluster is set as the default for `kubectl`.
17+
If it's not, you will need to modify subsequent `kubectl` commands below.
18+
19+
[mcluster]: ../reference/glossary.md#management-cluster
20+
[kind]: https://github.com/kubernetes-sigs/kind
21+
22+
### kubectl
23+
24+
[kubectl] for interacting with the management cluster.
25+
26+
[kubectl]: https://kubernetes.io/docs/tasks/tools/install-kubectl/
27+
28+
### Helm
29+
30+
[Helm] for installing operator on the cluster (optional).
31+
32+
[Helm]: https://helm.sh/docs/intro/install/
33+
34+
### A container registry
35+
36+
If you're using [kind], you'll need a way to push your images to a registry so they can be pulled.
37+
You can instead [side-load] all images, but the registry workflow is lower-friction.
38+
39+
Most users test with [GCR], but you could also use something like [Docker Hub][hub].
40+
If you choose not to use GCR, you'll need to set the `REGISTRY` environment variable.
41+
42+
[side-load]: https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster
43+
[GCR]: https://cloud.google.com/container-registry/
44+
[hub]: https://hub.docker.com/
45+
46+
### Kustomize
47+
48+
You'll need to [install `kustomize`][kustomize].
49+
There is a version of `kustomize` built into kubectl, but it does not have all the features of `kustomize` v3 and will not work.
50+
51+
[kustomize]: https://kubectl.docs.kubernetes.io/installation/kustomize/
52+
53+
### Kubebuilder
54+
55+
You'll need to [install `kubebuilder`][kubebuilder].
56+
57+
[kubebuilder]: https://book.kubebuilder.io/quick-start.html#installation
58+
59+
### Cert-Manager
60+
61+
You'll need to deploy [cert-manager] components on your [management cluster][mcluster], using `kubectl`
62+
63+
```bash
64+
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.2/cert-manager.yaml
65+
```
66+
67+
Ensure the cert-manager webhook service is ready before creating the Cluster API Operator components.
68+
69+
This can be done by following instructions for [manual verification](https://cert-manager.io/docs/installation/verify/#manual-verification)
70+
from the [cert-manager] web site.
71+
Note: make sure to follow instructions for the release of cert-manager you are installing.
72+
73+
[cert-manager]: https://github.com/cert-manager/cert-manager
74+
75+
## Development
76+
77+
## Option 1: Tilt
78+
79+
[Tilt][tilt] is a tool for quickly building, pushing, and reloading Docker containers as part of a Kubernetes deployment.
80+
81+
Once you have a running Kubernetes cluster, you can run:
82+
83+
```bash
84+
tilt up
85+
```
86+
87+
That's it! Tilt will automatically reload the deployment to your local cluster every time you make a code change.
88+
89+
[tilt]: https://tilt.dev
90+
91+
## Option 2: The kustomize way
92+
93+
```bash
94+
# Build all the images
95+
make docker-build
96+
97+
# Push images
98+
make docker-push
99+
100+
# Apply the manifests
101+
kustomize build config/default | ./hack/tools/bin/envsubst | kubectl apply -f -
102+
```
103+
104+
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Using Helm Charts

docs/book/src/02_installation/00.md renamed to docs/book/src/installation/installation.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@
22

33
This section describes `cluster-api-operator` components installation instructions.
44

5-
## [Plugin](./01_plugin.md)
6-
7-
This document describes the plugin installation steps and prerequisites.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Using Manifests from Release Assets

docs/book/src/introduction.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Cluster API Operator
2+
3+
The **Cluster API Operator** is a Kubernetes Operator designed to empower cluster administrators to handle the lifecycle of Cluster API providers within a management cluster using a declarative approach. It aims to improve user experience in deploying and managing Cluster API, making it easier to handle day-to-day tasks and automate workflows with GitOps.
4+
5+
This operator leverages a declarative API and extends the capabilities of the `clusterctl` CLI, allowing greater flexibility and configuration options for cluster administrators.
6+
7+
## Features
8+
9+
- Offers a **declarative API** that simplifies the management of Cluster API providers and enables GitOps workflows.
10+
- Facilitates **provider upgrades and downgrades** making it more convenient for distributed teams and CI pipelines.
11+
- Aims to support **air-gapped environments** without direct access to GitHub/GitLab.
12+
- Leverages **controller-runtime** configuration API for a more flexible Cluster API providers setup.
13+
- Provides a **transparent and effective** way to interact with various Cluster API components on the management cluster.
14+
15+
## Getting started
16+
17+
* [Quick Start](./user/quick-start.md)
18+
* [Concepts](./user/concepts.md)
19+
* [Developer guide](./developer/guide.md)
20+
* [Contributing](./CONTRIBUTING.md)
21+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# API Reference
2+
3+
Cluster API Operator currently exposes the following APIs:
4+
5+
* Cluster API Operator Custom Resource Definitions (CRDs): [documentation](https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api-operator)
6+
7+
* Golang APIs: [godoc](https://pkg.go.dev/sigs.k8s.io/cluster-api-operator)

docs/book/src/reference/ci-jobs.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# CI Jobs
2+
3+
This document intends to provide an overview over our jobs running via Prow, GitHub actions and Google Cloud Build.
4+
It also documents the cluster-api-operator specific configuration in test-infra.
5+
6+
## Builds and Tests running on the main branch
7+
8+
> NOTE: To see which test jobs execute which tests or e2e tests, you can click on the links which lead to the respective test overviews in testgrid.
9+
10+
The dashboards for the ProwJobs can be found here: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-operator
11+
12+
More details about ProwJob configurations can be found [here](https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/cluster-api-operator).
13+
14+
### Presubmits
15+
16+
Prow Presubmits:
17+
* mandatory for merge, always run:
18+
* [pull-cluster-api-operator-build-main] `./scripts/ci-build.sh`
19+
* [pull-cluster-api-operator-make-main] `./scripts/ci-make.sh`
20+
* [pull-cluster-api-operator-verify-main] `./scripts/ci-verify.sh`
21+
* mandatory for merge, run if go code changes:
22+
* [pull-cluster-api-operator-test-main] `./scripts/ci-test.sh`
23+
* [pull-cluster-api-operator-e2e-main] `./scripts/ci-e2e.sh`
24+
* optional for merge, run if go code changes:
25+
* [pull-cluster-api-operator-apidiff-main] `./scripts/ci-apidiff.sh`
26+
27+
GitHub Presubmit Workflows:
28+
* PR golangci-lint: golangci/golangci-lint-action
29+
* Runs golangci-lint. Can be run locally via `make lint`.
30+
* PR verify: kubernetes-sigs/kubebuilder-release-tools verifier
31+
* Verifies the PR titles have a valid format, i.e. contains one of the valid icons.
32+
* Verifies the PR description is valid, i.e. is long enough.
33+
* PR dependabot (run on dependabot PRs)
34+
* Regenerates Go modules and code.
35+
36+
Other Github workflows
37+
* release (runs when tags are pushed)
38+
* Creates a GitHub release with release notes for the tag.
39+
* book publishing
40+
* Deploys operator book to GitHub Pages
41+
42+
### Postsubmits
43+
44+
Prow Postsubmits:
45+
* [post-cluster-api-operator-push-images] Google Cloud Build: `make release-staging`
46+
47+
### Periodics
48+
49+
Prow Periodics:
50+
* [periodic-cluster-api-operator-test-main] `./scripts/ci-test.sh`
51+
* [periodic-cluster-api-operator-e2e-main] `./scripts/ci-e2e.sh`
52+
53+
## Test-infra configuration
54+
55+
* config/jobs/image-pushing/k8s-staging-cluster-api.yaml
56+
* Configures postsubmit job to push images and manifests.
57+
* config/jobs/kubernetes-sigs/cluster-api-operator/
58+
* Configures Cluster API Operator presubmit and periodic jobs.
59+
* config/testgrids/kubernetes/sig-cluster-lifecycle/config.yaml
60+
* Configures Cluster API Operator testgrid dashboards.
61+
* config/prow/plugins.yaml
62+
* `approve`: disable auto-approval of PR authors, ignore GitHub reviews (/approve is explicitly required)
63+
* `lgtm`: enables retaining lgtm through squash
64+
* `require_matching_label`: configures `needs-triage`
65+
* `plugins`: enables `require-matching-label` plugin
66+
* `external_plugins`: enables `cherrypicker` plugin
67+
* label_sync/labels.yaml
68+
* Configures labels for the `cluster-api-operator` repository.
69+
70+
<!-- links -->
71+
[pull-cluster-api-operator-build-main]: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-operator#capi-operator-pr-build-main
72+
[pull-cluster-api-operator-make-main]: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-operator#capi-operator-pr-make-main
73+
[pull-cluster-api-operator-verify-main]: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-operator#capi-operator-pr-verify-main
74+
[pull-cluster-api-operator-test-main]: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-operator#capi-operator-pr-test-main
75+
[pull-cluster-api-operator-e2e-main]: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-operator#capi-operator-pr-e2e-main
76+
[pull-cluster-api-operator-apidiff-main]: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-operator#capi-operator-pr-apidiff-main
77+
[post-cluster-api-operator-push-images]: https://testgrid.k8s.io/sig-cluster-lifecycle-image-pushes#post-cluster-api-operator-push-images
78+
[periodic-cluster-api-operator-test-main]: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-operator#capi-operator-test-main
79+
[periodic-cluster-api-operator-e2e-main]: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-operator#capi-operator-e2e-main

docs/book/src/reference/glossary.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Glossary
2+
3+
The lexicon used in this document is described in more detail [here](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/book/src/reference/glossary.md). Any discrepancies should be rectified in the main Cluster API glossary.

docs/book/src/reference/providers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Provider List

docs/book/src/reference/reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Reference
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Air-gapped Environment
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Basic Cluster API Provider Installation
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Cluster API Provider Lifecycle
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Deleting a Provider
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Deleting providers
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Injecting additional manifests
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Installing Azure Infrastructure Provider
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Installing the CoreProvider
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Installing a Provider
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Modifying a Provider

docs/book/src/topics/topics.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Topics
2+
3+
This section contains information about enabling and configuring various features of Cluster API Operator.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Upgrading a Provider

docs/book/src/user/concepts.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Concepts
2+
3+
## CoreProvider
4+
5+
A component responsible for providing the fundamental building blocks of the Cluster API. It defines and implements the main Cluster API resources such as Clusters, Machines, and MachineSets, and manages their lifecycle. This includes:
6+
7+
1. Defining the main Cluster API resources and their schemas.
8+
2. Implementing the logic for creating, updating, and deleting these resources.
9+
3. Managing the overall lifecycle of Clusters, Machines, and MachineSets.
10+
4. Providing the base upon which other providers like BootstrapProvider and InfrastructureProvider build.
11+
12+
## BootstrapProvider
13+
14+
A component responsible for turning a server into a Kubernetes node as well as for:
15+
16+
1. Generating the cluster certificates, if not otherwise specified
17+
2. Initializing the control plane, and gating the creation of other nodes until it is complete
18+
3. Joining control plane and worker nodes to the cluster
19+
20+
## ControlPlaneProvider
21+
22+
A component responsible for managing the control plane of a Kubernetes cluster. This includes:
23+
24+
1. Provisioning the control plane nodes.
25+
2. Managing the lifecycle of the control plane, including upgrades and scaling.
26+
27+
## InfrastructureProvider
28+
29+
A component responsible for the provisioning of infrastructure/computational resources required by the Cluster or by Machines (e.g. VMs, networking, etc.).
30+
For example, cloud Infrastructure Providers include AWS, Azure, and Google, and bare metal Infrastructure Providers include VMware, MAAS, and metal3.io.
31+
32+
## AddonProvider
33+
34+
A component that extends the functionality of Cluster API by providing a solution for managing the installation, configuration, upgrade, and deletion of Cluster add-ons using Helm charts.
35+
36+
## IPAMProvider
37+
38+
A component that manages pools of IP addresses using Kubernetes resources. It serves as a reference implementation for IPAM providers, but can also be used as a simple replacement for DHCP.

0 commit comments

Comments
 (0)