Skip to content

Commit ad9101f

Browse files
committed
fix merge conflicts
Signed-off-by: Arsh Sharma <[email protected]>
2 parents 604dcdd + fcb80cd commit ad9101f

File tree

121 files changed

+5296
-856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+5296
-856
lines changed

Diff for: .github/ISSUE_TEMPLATE/bug.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ body:
1515
1616
**Expected Behavior**:
1717
18-
**Reproduction Steps** (Please include `ResourceGroup` and `Instances` files):
18+
**Reproduction Steps** (Please include `ResourceGraphDefinition` and `Instances` files):
1919
2020
**Versions**:
2121
- kro version:
@@ -38,7 +38,7 @@ body:
3838
label: Which option describes the most your issue?
3939
multiple: true
4040
options:
41-
- ResourceGroup (Create, Update, Deletion)
41+
- ResourceGraphDefinition (Create, Update, Deletion)
4242
- Instance (Create, Update, Deletion)
4343
- Directed Acyclic Graph inference
4444
- Common Expression Language (CEL)

Diff for: ATTRIBUTION.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
[//]: # (File generated by attribution-gen. DO NOT EDIT.)
44

5-
The github.com/awslabs/kro source code is licensed under the
5+
The github.com/kro-run/kro source code is licensed under the
66
Apache License, version 2.0. A copy of this license is available in the
77
[LICENSE](LICENSE) file in the root source code directory and is included,
8-
along with this document, in any images containing github.com/awslabs/kro
8+
along with this document, in any images containing github.com/kro-run/kro
99
binaries.
1010

1111
## Package dependencies
1212

13-
The module github.com/awslabs/kro depends on a number of Open Source Go packages. Direct
13+
The module github.com/kro-run/kro depends on a number of Open Source Go packages. Direct
1414
dependencies are listed in the ./go.mod file.
1515
Those direct package dependencies have some dependencies of their own (known as
1616
"transitive dependencies")

Diff for: Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and
6666
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
6767

6868
tt:
69-
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./pkg/controller/resourcegroup"
69+
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./pkg/controller/resourcegraphdefinition"
7070

7171
.PHONY: fmt
7272
fmt: ## Run go fmt against code.
@@ -177,13 +177,13 @@ $(CONTROLLER_GEN): $(LOCALBIN)
177177
.PHONY: image
178178
build-image: ## Build the kro controller images using ko build
179179
$(WITH_GOFLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO="public.ecr.aws/kro/controller" \
180-
ko build --bare github.com/awslabs/kro/cmd/controller \
180+
ko build --bare github.com/kro-run/kro/cmd/controller \
181181
--push=false --tags ${RELEASE_VERSION} --sbom=none
182182

183183
.PHONY: publish
184184
publish-image: ## Publish the kro controller images to ECR
185185
$(WITH_GOFLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO="public.ecr.aws/kro/controller" \
186-
ko publish --bare github.com/awslabs/kro/cmd/controller \
186+
ko publish --bare github.com/kro-run/kro/cmd/controller \
187187
--tags ${RELEASE_VERSION} --sbom=none
188188

189189
.PHONY: package-helm

Diff for: README.md

+11-20
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This project aims to simplify the creation and management of complex custom resources for Kubernetes.
44

55
Kube Resource Orchestrator (**kro**) provides a powerful abstraction layer that allows you to define complex multi-resource constructs as reusable components in your applications and systems.
6-
You define these using kro's fundamental custom resource, *ResourceGroup*.
6+
You define these using kro's fundamental custom resource, *ResourceGraphDefinition*.
77
This resource serves as a blueprint for creating and managing collections of underlying Kubernetes resources.
88

99
With kro, you define custom resources as your fundamental building blocks for Kubernetes.
@@ -19,7 +19,7 @@ kro is Kubernetes native and integrates seamlessly with existing tools to preser
1919
| -------------------------------------- | ------------------------------- |
2020
| [Introduction][kro-overview] | An introduction to kro |
2121
| [Installation][kro-installation] | Install kro in your cluster |
22-
| [Getting started][kro-getting-started] | Deploy your first ResourceGroup |
22+
| [Getting started][kro-getting-started] | Deploy your first ResourceGraphDefinition |
2323
| [Concepts][kro-concepts] | Learn more about kro concepts |
2424
| [Examples][kro-examples] | Example resources |
2525
| [Contributions](./CONTRIBUTING.md) | How to get involved |
@@ -35,28 +35,28 @@ kro is Kubernetes native and integrates seamlessly with existing tools to preser
3535
1. **What is kro?**
3636

3737
Kube Resource Orchestrator (**kro**) is a new operator for Kubernetes that simplifies the creation of complex Kubernetes resource configurations.
38-
kro lets you create and manage custom groups of Kubernetes resources by defining them as a *ResourceGroup*, the project's fundamental custom resource.
39-
ResourceGroup specifications define a set of resources and how they relate to each other functionally.
38+
kro lets you create and manage custom groups of Kubernetes resources by defining them as a *ResourceGraphDefinition*, the project's fundamental custom resource.
39+
ResourceGraphDefinition specifications define a set of resources and how they relate to each other functionally.
4040
Once defined, resource groups can be applied to a Kubernetes cluster where the kro controller is running.
4141
Once validated by kro, you can create instances of your resource group.
42-
kro translates your ResourceGroup instance and its parameters into specific Kubernetes resources and configurations which it then manages for you.
42+
kro translates your ResourceGraphDefinition instance and its parameters into specific Kubernetes resources and configurations which it then manages for you.
4343

4444
2. **How does kro work?**
4545

4646
kro is designed to use core Kubernetes primitives to make resource grouping, customization, and dependency management simpler.
47-
When a ResourceGroup is applied to the cluster, the kro controller verifies its specification, then dynamically creates a new CRD and registers it with the API server.
47+
When a ResourceGraphDefinition is applied to the cluster, the kro controller verifies its specification, then dynamically creates a new CRD and registers it with the API server.
4848
kro then deploys a dedicated controller to respond to instance events on the CRD.
49-
This microcontroller is responsible for managing the lifecycle of resources defined in the ResourceGroup for each instance that is created.
49+
This microcontroller is responsible for managing the lifecycle of resources defined in the ResourceGraphDefinition for each instance that is created.
5050

5151
3. **How do I use kro?**
5252

53-
First, you define your custom resource groups by creating *ResourceGroup* specifications.
53+
First, you define your custom resource groups by creating *ResourceGraphDefinition* specifications.
5454
These specify one or more Kubernetes resources, and can include specific configuration for each resource.
5555

5656
For example, you can define a *WebApp* resource group that is composed of a *Deployment*, pre-configured to deploy your web server backend, and a *Service* configured to run on a specific port.
5757
You can just as easily create a more complex *WebAppWithDB* resource group by combining the existing *WebApp* resource group with a *Table* custom resource to provision a cloud managed database instance for your web app to use.
5858

59-
Once you have defined a ResourceGroup, you can apply it to a Kubernetes cluster where the kro controller is running.
59+
Once you have defined a ResourceGraphDefinition, you can apply it to a Kubernetes cluster where the kro controller is running.
6060
kro will take care of the heavy lifting of creating CRDs and deploying dedicated controllers in order to manage instances of your new custom resource group.
6161

6262
You are now ready to create instances of your new custom resource group, and kro will respond by dynamically creating, configuring, and managing the underlying Kubernetes resources for you.
@@ -67,19 +67,10 @@ kro is Kubernetes native and integrates seamlessly with existing tools to preser
6767
Building with Kubernetes means dealing with resources that need to operate and work together, and orchestrating this can get complex and difficult at scale.
6868
With this project, we're taking a first step in reducing the complexity of resource dependency management and customization, paving the way for a simple and scalable way to create complex custom resources for Kubernetes.
6969

70-
5. **Do I need to have an AWS account to use this?**
71-
72-
No, you can use kro with any Kubernetes cluster.
73-
74-
6. **Can I use this in production?**
70+
5. **Can I use this in production?**
7571

7672
This project is in active development and not yet intended for production use.
77-
The *ResourceGroup* CRD and other APIs used in this project are not solidified and highly subject to change.
78-
79-
7. **Will this be built into Amazon Elastic Kubernetes Service (EKS)?**
80-
81-
This project is a public experiment, and not currently integrated into Amazon EKS.
82-
We welcome your feedback and want to hear about what works and what doesn't for your use cases, please let us know what you think.
73+
The *ResourceGraphDefinition* CRD and other APIs used in this project are not solidified and highly subject to change.
8374

8475
## Community Participation
8576

Diff for: api/v1alpha1/conditions.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ import (
2121
type ConditionType string
2222

2323
const (
24-
// ResourceGroupConditionTypeGraphSynced indicates the state of the directed
24+
// ResourceGraphDefinitionConditionTypeGraphSynced indicates the state of the directed
2525
// acyclic graph (DAG) that kro uses to manage the resources in a
26-
// ResourceGroup.
27-
ResourceGroupConditionTypeGraphVerified ConditionType = "GraphVerified"
28-
// ResourceGroupConditionTypeCustomResourceDefinitionSynced indicates the state of the
26+
// ResourceGraphDefinition.
27+
ResourceGraphDefinitionConditionTypeGraphVerified ConditionType = "GraphVerified"
28+
// ResourceGraphDefinitionConditionTypeCustomResourceDefinitionSynced indicates the state of the
2929
// CustomResourceDefinition (CRD) that kro uses to manage the resources in a
30-
// ResourceGroup.
31-
ResourceGroupConditionTypeCustomResourceDefinitionSynced ConditionType = "CustomResourceDefinitionSynced"
32-
// ResourceGroupConditionTypeReconcilerReady indicates the state of the reconciler.
33-
// Whenever an ResourceGroup resource is created, kro will spin up a
30+
// ResourceGraphDefinition.
31+
ResourceGraphDefinitionConditionTypeCustomResourceDefinitionSynced ConditionType = "CustomResourceDefinitionSynced"
32+
// ResourceGraphDefinitionConditionTypeReconcilerReady indicates the state of the reconciler.
33+
// Whenever an ResourceGraphDefinition resource is created, kro will spin up a
3434
// reconciler for that resource. This condition indicates the state of the
3535
// reconciler.
36-
ResourceGroupConditionTypeReconcilerReady ConditionType = "ReconcilerReady"
36+
ResourceGraphDefinitionConditionTypeReconcilerReady ConditionType = "ReconcilerReady"
3737
)
3838

3939
const (

Diff for: api/v1alpha1/resourcegroup_state.go

-24
This file was deleted.

Diff for: api/v1alpha1/resource_group.go renamed to api/v1alpha1/types.go

+40-30
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ const (
2424
DefaultServiceAccountKey = "*"
2525
)
2626

27-
// ResourceGroupSpec defines the desired state of ResourceGroup
28-
type ResourceGroupSpec struct {
29-
// The schema of the resourcegroup, which includes the
27+
// ResourceGraphDefinitionSpec defines the desired state of ResourceGraphDefinition
28+
type ResourceGraphDefinitionSpec struct {
29+
// The schema of the resourcegraphdefinition, which includes the
3030
// apiVersion, kind, spec, status, types, and some validation
3131
// rules.
3232
//
3333
// +kubebuilder:validation:Required
3434
Schema *Schema `json:"schema,omitempty"`
35-
// The resources that are part of the resourcegroup.
35+
// The resources that are part of the resourcegraphdefinition.
3636
//
3737
// +kubebuilder:validation:Optional
3838
Resources []*Resource `json:"resources,omitempty"`
@@ -46,36 +46,36 @@ type ResourceGroupSpec struct {
4646
}
4747

4848
// Schema represents the attributes that define an instance of
49-
// a resourcegroup.
49+
// a resourcegraphdefinition.
5050
type Schema struct {
51-
// The kind of the resourcegroup. This is used to generate
52-
// and create the CRD for the resourcegroup.
51+
// The kind of the resourcegraphdefinition. This is used to generate
52+
// and create the CRD for the resourcegraphdefinition.
5353
//
5454
// +kubebuilder:validation:Required
5555
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="kind is immutable"
5656
Kind string `json:"kind,omitempty"`
57-
// The APIVersion of the resourcegroup. This is used to generate
58-
// and create the CRD for the resourcegroup.
57+
// The APIVersion of the resourcegraphdefinition. This is used to generate
58+
// and create the CRD for the resourcegraphdefinition.
5959
//
6060
// +kubebuilder:validation:Required
6161
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="apiVersion is immutable"
6262
APIVersion string `json:"apiVersion,omitempty"`
63-
// The group of the resourcegroup. This is used to set the API group
63+
// The group of the resourcegraphdefinition. This is used to set the API group
6464
// of the generated CRD. If omitted, it defaults to "kro.run".
6565
//
6666
// +kubebuilder:validation:Optional
6767
// +kubebuilder:default="kro.run"
6868
Group string `json:"group,omitempty"`
69-
// The spec of the resourcegroup. Typically, this is the spec of
70-
// the CRD that the resourcegroup is managing. This is adhering
69+
// The spec of the resourcegraphdefinition. Typically, this is the spec of
70+
// the CRD that the resourcegraphdefinition is managing. This is adhering
7171
// to the SimpleSchema spec
7272
Spec runtime.RawExtension `json:"spec,omitempty"`
73-
// The status of the resourcegroup. This is the status of the CRD
74-
// that the resourcegroup is managing. This is adhering to the
73+
// The status of the resourcegraphdefinition. This is the status of the CRD
74+
// that the resourcegraphdefinition is managing. This is adhering to the
7575
// SimpleSchema spec.
7676
Status runtime.RawExtension `json:"status,omitempty"`
7777
// Validation is a list of validation rules that are applied to the
78-
// resourcegroup.
78+
// resourcegraphdefinition.
7979
// Not implemented yet.
8080
Validation []string `json:"validation,omitempty"`
8181
}
@@ -96,11 +96,21 @@ type Resource struct {
9696
IncludeWhen []string `json:"includeWhen,omitempty"`
9797
}
9898

99-
// ResourceGroupStatus defines the observed state of ResourceGroup
100-
type ResourceGroupStatus struct {
101-
// State is the state of the resourcegroup
102-
State ResourceGroupState `json:"state,omitempty"`
103-
// TopologicalOrder is the topological order of the resourcegroup graph
99+
// ResourceGraphDefinitionState defines the state of the resource group.
100+
type ResourceGraphDefinitionState string
101+
102+
const (
103+
// ResourceGraphDefinitionStateActive represents the active state of the resource group.
104+
ResourceGraphDefinitionStateActive ResourceGraphDefinitionState = "Active"
105+
// ResourceGraphDefinitionStateInactive represents the inactive state of the resource group
106+
ResourceGraphDefinitionStateInactive ResourceGraphDefinitionState = "Inactive"
107+
)
108+
109+
// ResourceGraphDefinitionStatus defines the observed state of ResourceGraphDefinition
110+
type ResourceGraphDefinitionStatus struct {
111+
// State is the state of the resourcegraphdefinition
112+
State ResourceGraphDefinitionState `json:"state,omitempty"`
113+
// TopologicalOrder is the topological order of the resourcegraphdefinition graph
104114
TopologicalOrder []string `json:"topologicalOrder,omitempty"`
105115
// Conditions represent the latest available observations of an object's state
106116
Conditions []Condition `json:"conditions,omitempty"`
@@ -109,7 +119,7 @@ type ResourceGroupStatus struct {
109119
}
110120

111121
// ResourceInformation defines the information about a resource
112-
// in the resourcegroup
122+
// in the resourcegraphdefinition
113123
type ResourceInformation struct {
114124
// ID represents the id of the resources we're providing information for
115125
ID string `json:"id,omitempty"`
@@ -131,26 +141,26 @@ type Dependency struct {
131141
// +kubebuilder:printcolumn:name="STATE",type=string,priority=0,JSONPath=`.status.state`
132142
// +kubebuilder:printcolumn:name="TOPOLOGICALORDER",type=string,priority=1,JSONPath=`.status.topologicalOrder`
133143
// +kubebuilder:printcolumn:name="AGE",type="date",priority=0,JSONPath=".metadata.creationTimestamp"
134-
// +kubebuilder:resource:shortName=rg
144+
// +kubebuilder:resource:shortName=rgd
135145

136-
// ResourceGroup is the Schema for the resourcegroups API
137-
type ResourceGroup struct {
146+
// ResourceGraphDefinition is the Schema for the resourcegraphdefinitions API
147+
type ResourceGraphDefinition struct {
138148
metav1.TypeMeta `json:",inline"`
139149
metav1.ObjectMeta `json:"metadata,omitempty"`
140150

141-
Spec ResourceGroupSpec `json:"spec,omitempty"`
142-
Status ResourceGroupStatus `json:"status,omitempty"`
151+
Spec ResourceGraphDefinitionSpec `json:"spec,omitempty"`
152+
Status ResourceGraphDefinitionStatus `json:"status,omitempty"`
143153
}
144154

145155
//+kubebuilder:object:root=true
146156

147-
// ResourceGroupList contains a list of ResourceGroup
148-
type ResourceGroupList struct {
157+
// ResourceGraphDefinitionList contains a list of ResourceGraphDefinition
158+
type ResourceGraphDefinitionList struct {
149159
metav1.TypeMeta `json:",inline"`
150160
metav1.ListMeta `json:"metadata,omitempty"`
151-
Items []ResourceGroup `json:"items"`
161+
Items []ResourceGraphDefinition `json:"items"`
152162
}
153163

154164
func init() {
155-
SchemeBuilder.Register(&ResourceGroup{}, &ResourceGroupList{})
165+
SchemeBuilder.Register(&ResourceGraphDefinition{}, &ResourceGraphDefinitionList{})
156166
}

0 commit comments

Comments
 (0)