Skip to content

Commit 785b04f

Browse files
committed
Update docs to use KRO instead
1 parent 5c8cd3c commit 785b04f

File tree

21 files changed

+605
-626
lines changed

21 files changed

+605
-626
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

website/docs/api/out.md

Lines changed: 61 additions & 107 deletions
Large diffs are not rendered by default.

website/docs/docs/concepts/00-resource-groups.md

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ sidebar_position: 1
44

55
# 1. ResourceGroups
66

7-
**ResourceGroups** are the fundamental building blocks in Symphony. They
8-
provide a way to define, organize, and manage sets of related Kubernetes
9-
resources as a single, reusable unit.
7+
**ResourceGroups** are the fundamental building blocks in KRO. They provide a
8+
way to define, organize, and manage sets of related Kubernetes resources as a
9+
single, reusable unit.
1010

1111
## What is a **ResourceGroup**?
1212

1313
A **ResourceGroup** is a custom resource that serves as a blueprint for creating
1414
and managing a collection of Kubernetes resources. It allows you to:
15+
1516
- Define multiple resources in a single, cohesive unit
1617
- Establish relationships and dependencies between resources
1718
- Create high-level abstractions of complex Kubernetes configurations
@@ -20,19 +21,21 @@ and managing a collection of Kubernetes resources. It allows you to:
2021
## Anatomy of a **ResourceGroup**
2122

2223
A **ResourceGroup**, like any Kubernetes resource, consists of three main parts:
24+
2325
1. **Metadata**: Name, namespace, labels, etc.
2426
2. **Spec**: Defines the structure and properties of the ResourceGroup
2527
3. **Status**: Reflects the current state of the ResourceGroup
2628

2729
The `spec` section of a ResourceGroup typically includes:
30+
2831
- **Parameters**: Define the customizable aspects of the ResourceGroup
2932
- **Resources**: Specify the Kubernetes resources to be created
3033
- The **kind** and **apiVersion** fields within the spec define the CRD that
31-
will be generated for this ResourceGroup.
32-
Here's a simple example of a ResourceGroup:
34+
will be generated for this ResourceGroup. Here's a simple example of a
35+
ResourceGroup:
3336

3437
```yaml text title="simple-web-app.yaml"
35-
apiVersion: symphony.k8s.aws/v1
38+
apiVersion: kro.run/v1
3639
kind: ResourceGroup
3740
metadata:
3841
name: simple-web-app
@@ -77,59 +80,58 @@ spec:
7780
targetPort: 80
7881
```
7982
80-
In this example, the **ResourceGroup** defines a simple web application with
81-
a Deployment and a Service. The appName, image, and replicas are
82-
parameters that can be set when instantiating this ResourceGroup.
83+
In this example, the **ResourceGroup** defines a simple web application with a
84+
Deployment and a Service. The appName, image, and replicas are parameters that
85+
can be set when instantiating this ResourceGroup.
8386
8487
## **ResourceGroup** Processing
8588
86-
When a **ResourceGroup** is submitted to the Kubernetes API server, the
87-
Symphony controller processes it as follows:
89+
When a **ResourceGroup** is submitted to the Kubernetes API server, the KRO
90+
controller processes it as follows:
91+
92+
1. **Formal Verification**: The controller performs a comprehensive analysis of
93+
the ResourceGroup definition. This includes:
8894
89-
1. **Formal Verification**: The controller performs a comprehensive analysis
90-
of the ResourceGroup definition. This includes:
9195
- **Syntax checking**: Ensuring all fields are correctly formatted.
92-
- **Type checking**: Validating that parameter types match their
93-
definitions.
94-
- **Semantic validation**: Verifying that resource relationships and
96+
- **Type checking**: Validating that parameter types match their definitions.
97+
- **Semantic validation**: Verifying that resource relationships and
9598
dependencies are logically sound.
96-
- **Dry-run validation**: Simulating the creation of resources to detect
99+
- **Dry-run validation**: Simulating the creation of resources to detect
97100
potential issues.
98101
99-
2. **CRD Generation**: The controller automatically generates a new **Custom
100-
Resource Definition (CRD)** based on the ResourceGroup's specification.
101-
This CRD represents the type for instances of this ResourceGroup.
102+
2. **CRD Generation**: The controller automatically generates a new **Custom
103+
Resource Definition (CRD)** based on the ResourceGroup's specification. This
104+
CRD represents the type for instances of this ResourceGroup.
102105
103-
3. **CRD Registration**: It registers the newly generated CRD with the
106+
3. **CRD Registration**: It registers the newly generated CRD with the
104107
Kubernetes API server, making it available for use in the cluster.
105108
106-
4. **Micro-Controller Deployment**: Symphony deploys a dedicated
107-
micro-controller for this ResourceGroup. This micro-controller will
108-
listen for **"claim" events** - instances of the CRD created in step 2.
109-
It will be responsible for managing the **lifecycle of resources** defined
110-
in the ResourceGroup for each claim.
109+
4. **Micro-Controller Deployment**: KRO deploys a dedicated micro-controller for
110+
this ResourceGroup. This micro-controller will listen for **"claim"
111+
events** - instances of the CRD created in step 2. It will be responsible for
112+
managing the **lifecycle of resources** defined in the ResourceGroup for each
113+
claim.
111114
112-
5. **Status Update**: The controller updates the status of the ResourceGroup
113-
to reflect that the corresponding CRD has been created and registered.
115+
5. **Status Update**: The controller updates the status of the ResourceGroup to
116+
reflect that the corresponding CRD has been created and registered.
114117
115-
For example, given our `simple-web-app` ResourceGroup, the controller
116-
would create and register a CRD named `SimpleWebApps` (plural form of the
117-
ResourceGroup name). This CRD defines the structure for creating instances
118-
of the web application with customizable parameters. The deployed
119-
micro-controller would then manage all **SimpleWebApps instances**, creating
120-
and managing the associated **Deployments** and **Services** as defined in the
121-
ResourceGroup.
118+
For example, given our `simple-web-app` ResourceGroup, the controller would
119+
create and register a CRD named `SimpleWebApps` (plural form of the
120+
ResourceGroup name). This CRD defines the structure for creating instances of
121+
the web application with customizable parameters. The deployed micro-controller
122+
would then manage all **SimpleWebApps instances**, creating and managing the
123+
associated **Deployments** and **Services** as defined in the ResourceGroup.
122124

123-
The Symphony controller continues to monitor the **ResourceGroup** for any
125+
The **KRO** controller continues to monitor the **ResourceGroup** for any
124126
changes, updating the corresponding CRD and micro-controller as necessary.
125127

126128
## **ResourceGroup** Claim Example
127129

128-
After the **ResourceGroup** is processed, users can create instances of it. Here's
129-
an example of how a claim for the `SimpleWebApp` might look:
130+
After the **ResourceGroup** is processed, users can create instances of it.
131+
Here's an example of how a claim for the `SimpleWebApp` might look:
130132

131133
```yaml title="my-web-app-claim.yaml"
132-
apiVersion: symphony.k8s.aws/v1alpha1
134+
apiVersion: kro.run/v1alpha1
133135
kind: SimpleWebApp
134136
metadata:
135137
name: my-web-app
@@ -140,4 +142,4 @@ spec:
140142
```
141143

142144
In the next section, we'll explore the `parameters` and `resources` sections of
143-
a **ResourceGroup** in more detail.
145+
a **ResourceGroup** in more detail.

website/docs/docs/concepts/10-simple-schema.md

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ sidebar_position: 2
44

55
# 2. Simple Schema
66

7-
Symphony's Simple Schema provides a powerful yet intuitive way to define the structure
8-
of your ResourceGroup. Here is comprehensive example:
7+
KRO's Simple Schema provides a powerful yet intuitive way to define the
8+
structure of your ResourceGroup. Here is comprehensive example:
99

1010
```yaml
11-
apiVersion: symphony.k8s.aws/v1alpha1
11+
apiVersion: kro.run/v1alpha1
1212
kind: ResourceGroup
1313
metadata:
14-
name: webapplication.symphony.k8s.aws
14+
name: web-application
1515
spec:
1616
apiVersion: v1alpha1
1717
kind: WebApplication
@@ -40,6 +40,7 @@ spec:
4040
### 1. Spec Field Definition
4141
4242
#### Basic Types
43+
4344
- `string`: Basic string type
4445
- `integer`: Whole number
4546
- `boolean`: True/False value
@@ -53,11 +54,11 @@ age: integer
5354

5455
#### Structure types
5556

56-
Structure types or object types are defined by specifying the fields within the object. The fields
57-
can be of basic types or other structure types.
57+
Structure types or object types are defined by specifying the fields within the
58+
object. The fields can be of basic types or other structure types.
5859

59-
for example to define a structure type for a person with name and age fields, you can define it as
60-
follows:
60+
for example to define a structure type for a person with name and age fields,
61+
you can define it as follows:
6162

6263
```yaml
6364
person:
@@ -68,34 +69,40 @@ person:
6869
#### Map Types
6970

7071
- Arrays: Denoted by `[]`, e.g., `'[]string'`
71-
- Maps: Denoted by `map[keyType]valueType`, e.g., `'map[string]string'` and `'map[string]Person'`
72+
- Maps: Denoted by `map[keyType]valueType`, e.g., `'map[string]string'` and
73+
`'map[string]Person'`
7274

7375
### 2. Validation and Documentation Markers
7476

75-
In addition to the type, fields can also have markers for validation, documentation and
76-
other purposes that are OpenAPISchema compatible.
77+
In addition to the type, fields can also have markers for validation,
78+
documentation and other purposes that are OpenAPISchema compatible.
7779

78-
For example to define a field that is required, has a default value and a description, you can
79-
define it as follows:
80+
For example to define a field that is required, has a default value and a
81+
description, you can define it as follows:
8082

8183
```yaml
8284
person:
83-
name: string | required=true default="Kylian Mbappé" description="Name of the person"
85+
name:
86+
string | required=true default="Kylian Mbappé" description="Name of the
87+
person"
8488
```
8589

8690
Currently supported markers include:
91+
8792
- `required=true`: Field must be provided
8893
- `default=value`: Default value if not provided
8994
- `description="..."`: Provides documentation for the field
9095
- `enum="value1,value2,..."`: Restricts to a set of values **NOT IMPLEMENTED**
91-
- `minimum=value` and `maximum=value`: For numeric constraints **NOT IMPLEMENTED**
96+
- `minimum=value` and `maximum=value`: For numeric constraints **NOT
97+
IMPLEMENTED**
9298

9399
### 3. Custom Types Definition
94100

95-
Custom types are defined in the `customTypes` section, allowing for reusable complex
96-
structures. They can be referenced by name in the spec or status fields.
101+
Custom types are defined in the `customTypes` section, allowing for reusable
102+
complex structures. They can be referenced by name in the spec or status fields.
97103

98104
Example:
105+
99106
```yaml
100107
customTypes:
101108
ConfigType:
@@ -107,48 +114,45 @@ spec:
107114

108115
### 4. Status Field Definition
109116

110-
Status fields are defined similarly to spec fields and can include validation and documentation
111-
markers. However on top of that, status fields can also include value markers:
117+
Status fields are defined similarly to spec fields and can include validation
118+
and documentation markers. However on top of that, status fields can also
119+
include value markers:
112120

113121
#### Value Marker **NOT IMPLEMENTED**
114122

115-
- `value="${resource.status.field}"`: Specifies that this field's value should be dynamically
116-
obtained from another resource. The value is a CEL expression that is validated at ResourceGroup
117-
processing time and evaluated at runtime.
123+
- `value="${resource.status.field}"`: Specifies that this field's value should
124+
be dynamically obtained from another resource. The value is a CEL expression
125+
that is validated at ResourceGroup processing time and evaluated at runtime.
118126

119-
:::tip
120-
Note that the value marker is a symphony extension to the OpenAPISchema and is not part of the
121-
official OpenAPISchema specification.
122-
:::
127+
:::tip Note that the value marker is a KRO extension to the OpenAPISchema and is
128+
not part of the official OpenAPISchema specification. :::
123129

124130
Example:
131+
125132
```yaml
126133
status:
127134
url: string | value="${service.status.loadBalancer.ingress[0].hostname}"
128135
```
129136

130137
## Default status fields
131138

132-
Symphony automatically injects two common fields into the status of all claims
133-
generated from **ResourceGroups**: `conditions` and `state`. These fields provide
134-
essential information about the current status of the claim and its associated
135-
resources.
136-
137-
:::tip
138-
`conditions` and `state` are reserved words in the status
139-
section. If a user defines these fields in their **ResourceGroup**'s status schema,
140-
Symphony will override them with its own values.
141-
:::
139+
**KRO** automatically injects two common fields into the status of all claims
140+
generated from **ResourceGroups**: `conditions` and `state`. These fields
141+
provide essential information about the current status of the claim and its
142+
associated resources.
142143

144+
:::tip `conditions` and `state` are reserved words in the status section. If a
145+
user defines these fields in their **ResourceGroup**'s status schema, KRO will
146+
override them with its own values. :::
143147

144148
### 1. Conditions
145149

146150
The `conditions` field is an array of condition objects, each representing a
147-
specific aspect of the claim's state. Symphony automatically manages this field.
151+
specific aspect of the claim's state. KRO automatically manages this field.
148152

149153
```yaml
150154
status:
151-
conditions: '[]condition'
155+
conditions: "[]condition"
152156
customTypes:
153157
condition:
154158
type: string
@@ -159,9 +163,12 @@ customTypes:
159163
```
160164

161165
Common condition types include:
166+
162167
- `Ready`: Indicates whether the claim is fully reconciled and operational.
163-
- `Progressing`: Shows if the claim is in the process of reaching the desired state.
164-
- `Degraded`: Signals that the claim is operational but not functioning optimally.
168+
- `Progressing`: Shows if the claim is in the process of reaching the desired
169+
state.
170+
- `Degraded`: Signals that the claim is operational but not functioning
171+
optimally.
165172
- `Error`: Indicates that an error has occurred during reconciliation.
166173

167174
### 2. State
@@ -174,5 +181,5 @@ status:
174181
```
175182

176183
> These default status fields are automatically added to every claim's status,
177-
providing a consistent way to check the health and state of resources across
178-
different **ResourceGroups**.
184+
> providing a consistent way to check the health and state of resources across
185+
> different **ResourceGroups**.

0 commit comments

Comments
 (0)