docs: refer to apply command instead of init or upgrade apply (#2487)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-10-27 08:30:59 +02:00 committed by GitHub
parent fff35bdb2a
commit f4bfbe3564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 49 additions and 40 deletions

View file

@ -5,7 +5,7 @@ In particular, it is responsible for updating the OS images of nodes by replacin
## High level goals
- Admin or `constellation init` can create custom resources for node related components
- Admin or `constellation apply` can create custom resources for node related components
- The operator will manage nodes in the cluster by trying to ensure every node has the specified image
- If a node uses an outdated image, it will be replaced by a new node
- Admin can update the specified image at any point in time which will trigger a rolling upgrade through the cluster
@ -20,6 +20,7 @@ The operator has multiple controllers with corresponding custom resource definit
`NodeVersion` is the only user controlled CRD. The spec allows an administrator to update the desired image and trigger a rolling update.
Example for GCP:
```yaml
apiVersion: update.edgeless.systems/v1alpha1
kind: NodeVersion
@ -30,6 +31,7 @@ spec:
```
Example for Azure:
```yaml
apiVersion: update.edgeless.systems/v1alpha1
kind: NodeVersion
@ -39,7 +41,6 @@ spec:
image: "/subscriptions/<subscription-id>/resourceGroups/CONSTELLATION-IMAGES/providers/Microsoft.Compute/galleries/Constellation/images/<image-definition-name>/versions/<image-version>"
```
### AutoscalingStrategy
`AutoscalingStrategy` is used and modified by the `NodeVersion` controller to pause the `cluster-autoscaler` while an image update is in progress.
@ -124,12 +125,13 @@ spec:
deadline: "2022-07-04T08:33:18+00:00"
```
## Getting Started
Youll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster.
**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).
### Running on the cluster
1. Install Instances of Custom Resources:
```sh
@ -149,6 +151,7 @@ make deploy IMG=<some-registry>/constellation/node-operator:tag
```
### Uninstall CRDs
To delete the CRDs from the cluster:
```sh
@ -156,6 +159,7 @@ make uninstall
```
### Undeploy controller
UnDeploy the controller to the cluster:
```sh
@ -163,12 +167,14 @@ make undeploy
```
### How it works
This project aims to follow the Kubernetes [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/)
It uses [Controllers](https://kubernetes.io/docs/concepts/architecture/controller/)
which provides a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster
### Test It Out
1. Install the CRDs into the cluster:
```sh
@ -184,6 +190,7 @@ make run
**NOTE:** You can also run this in one step by running: `make install run`
### Modifying the API definitions
If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
```sh