@@ -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
1313A ** ResourceGroup** is a custom resource that serves as a blueprint for creating
1414and 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
2223A ** ResourceGroup** , like any Kubernetes resource, consists of three main parts:
24+
23251 . ** Metadata** : Name, namespace, labels, etc.
24262 . ** Spec** : Defines the structure and properties of the ResourceGroup
25273 . ** Status** : Reflects the current state of the ResourceGroup
2628
2729The ` 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
3639kind : ResourceGroup
3740metadata :
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
124126changes, 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
133135kind: SimpleWebApp
134136metadata:
135137 name: my-web-app
@@ -140,4 +142,4 @@ spec:
140142` ` `
141143
142144In the next section, we'll explore the `parameters` and `resources` sections of
143- a **ResourceGroup** in more detail.
145+ a **ResourceGroup** in more detail.
0 commit comments