Skip to content

Commit

Permalink
Merge pull request #97 from awslabs/introduce/kro
Browse files Browse the repository at this point in the history
Change the project name to KRO (Kube Resource Orchestrator)
  • Loading branch information
michaelhtm authored Nov 9, 2024
2 parents 3499476 + 148bf5b commit 9e087ef
Show file tree
Hide file tree
Showing 152 changed files with 1,167 additions and 1,189 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Dockerfile.cross
*.swo
*~

symphony-controller
symphony-chart*
kro-controller
kro-chart*
cover.html
.read
.snapshots
Expand Down
6 changes: 3 additions & 3 deletions ATTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

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

The github.com/aws-controllers-k8s/symphony source code is licensed under the
The github.com/awslabs/kro source code is licensed under the
Apache License, version 2.0. A copy of this license is available in the
[LICENSE](LICENSE) file in the root source code directory and is included,
along with this document, in any images containing github.com/aws-controllers-k8s/symphony
along with this document, in any images containing github.com/awslabs/kro
binaries.

## Package dependencies

The module github.com/aws-controllers-k8s/symphony depends on a number of Open Source Go packages. Direct
The module github.com/awslabs/kro depends on a number of Open Source Go packages. Direct
dependencies are listed in the ./go.mod file.
Those direct package dependencies have some dependencies of their own (known as
"transitive dependencies")
Expand Down
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ AWS_REGION ?= us-west-2
RELEASE_VERSION ?= dev-$(shell git rev-parse --short HEAD)
ECR_REPO ?= ${AWS_ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com

CONTROLLER_IMAGE ?= ${ECR_REPO}/symphony:${RELEASE_VERSION}
HELM_IMAGE ?= ${ECR_REPO}/symphony-chart:${RELEASE_VERSION}
DOCS_IMAGE ?= ${ECR_REPO}/symphony-docs:${RELEASE_VERSION}
CONTROLLER_IMAGE ?= ${ECR_REPO}/kro:${RELEASE_VERSION}
HELM_IMAGE ?= ${ECR_REPO}/kro-chart:${RELEASE_VERSION}
DOCS_IMAGE ?= ${ECR_REPO}/kro-docs:${RELEASE_VERSION}

KO_DOCKER_REPO ?= ${ECR_REPO}/symphony
KO_DOCKER_REPO ?= ${ECR_REPO}/kro
KOCACHE ?= ~/.ko
KO_PUSH ?= true

Expand Down Expand Up @@ -175,15 +175,15 @@ $(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: image
build-image: ## Build the Symphony controller images using ko build
$(WITH_GOFLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO="095708837592.dkr.ecr.us-west-2.amazonaws.com/symphony" \
ko build --bare github.com/awslabs/symphony/cmd/controller \
build-image: ## Build the KRO controller images using ko build
$(WITH_GOFLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO="095708837592.dkr.ecr.us-west-2.amazonaws.com/kro" \
ko build --bare github.com/awslabs/kro/cmd/controller \
--push=false --tags ${RELEASE_VERSION} --sbom=none

.PHONY: publish
publish-image: ## Publish the Symphony controller images to ECR
$(WITH_GOFLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO="095708837592.dkr.ecr.us-west-2.amazonaws.com/symphony" \
ko publish --bare github.com/awslabs/symphony/cmd/controller \
publish-image: ## Publish the KRO controller images to ECR
$(WITH_GOFLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO="095708837592.dkr.ecr.us-west-2.amazonaws.com/kro" \
ko publish --bare github.com/awslabs/kro/cmd/controller \
--tags ${RELEASE_VERSION} --sbom=none

.PHONY: package-helm
Expand All @@ -196,7 +196,7 @@ package-helm: ## Package Helm chart

.PHONY: publish-helm
publish-helm: ## Helm publish
helm push ./symphony-chart-${RELEASE_VERSION}.tgz oci://${ECR_REPO}
helm push ./kro-chart-${RELEASE_VERSION}.tgz oci://${ECR_REPO}

.PHONY:
release: build-image publish-image package-helm publish-helm
2 changes: 1 addition & 1 deletion OWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See the OWNERS docs at https://go.k8s.io/owners

approvers:
- symphony-maintainers
- kro-maintainers
2 changes: 1 addition & 1 deletion OWNERS_ALIASES
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See the OWNERS docs at https://go.k8s.io/owners#owners_aliases

aliases:
symphony-maintainers:
kro-maintainers:
- a-hilaly
- michaelhtm
- TiberiuGC
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Symphony
# KRO

<p align="center">
<img src="./images/logo/final-blue.svg" />
</p>

Symphony is a Kubernetes controller that simplifies application management and
KRO is a Kubernetes controller that simplifies application management and
deployment. It provides a powerful abstraction layer, allowing you to define
complex, multi-resource applications as single reusable units.

Expand Down
20 changes: 10 additions & 10 deletions api/v1alpha1/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,31 @@ type ConditionType string

const (
// ResourceGroupConditionTypeGraphSynced indicates the state of the directed
// acyclic graph (DAG) that Symphony uses to manage the resources in a
// acyclic graph (DAG) that KRO uses to manage the resources in a
// ResourceGroup.
ResourceGroupConditionTypeGraphVerified ConditionType = "symphony.aws.dev/GraphVerified"
ResourceGroupConditionTypeGraphVerified ConditionType = "kro.aws.dev/GraphVerified"
// ResourceGroupConditionTypeCustomResourceDefinitionSynced indicates the state of the
// CustomResourceDefinition (CRD) that Symphony uses to manage the resources in a
// CustomResourceDefinition (CRD) that KRO uses to manage the resources in a
// ResourceGroup.
ResourceGroupConditionTypeCustomResourceDefinitionSynced ConditionType = "symphony.aws.dev/CustomResourceDefinitionSynced"
ResourceGroupConditionTypeCustomResourceDefinitionSynced ConditionType = "kro.aws.dev/CustomResourceDefinitionSynced"
// ResourceGroupConditionTypeReconcilerReady indicates the state of the reconciler.
// Whenever an ResourceGroup resource is created, Symphony will spin up a
// Whenever an ResourceGroup resource is created, KRO will spin up a
// reconciler for that resource. This condition indicates the state of the
// reconciler.
ResourceGroupConditionTypeReconcilerReady ConditionType = "symphony.aws.dev/ReconcilerReady"
ResourceGroupConditionTypeReconcilerReady ConditionType = "kro.aws.dev/ReconcilerReady"
)

const (
InstanceConditionTypeReady ConditionType = "symphony.aws.dev/Ready"
InstanceConditionTypeReady ConditionType = "kro.aws.dev/Ready"

// Creating Deleting Migrating
InstanceConditionTypeProgressing ConditionType = "symphony.aws.dev/Progressing"
InstanceConditionTypeProgressing ConditionType = "kro.aws.dev/Progressing"

// Unexpected situation, behaviour, need human intervention
InstanceConditionTypeDegraded ConditionType = "symphony.aws.dev/Degraded"
InstanceConditionTypeDegraded ConditionType = "kro.aws.dev/Degraded"

// Something is wrong but i'm gonna try again
InstanceConditionTypeError ConditionType = "symphony.aws.dev/Error"
InstanceConditionTypeError ConditionType = "kro.aws.dev/Error"
)

// Condition is the common struct used by all CRDs managed by ACK service
Expand Down
7 changes: 3 additions & 4 deletions api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,22 @@

// Package v1alpha1 contains API Schema definitions for the x v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=x.symphony.k8s.aws
// +groupName=kro.run
package v1alpha1

import (
"fmt"

"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

const (
SymphonyDomainName = "symphony.k8s.aws"
KroDomainName = "kro.run"
)

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: fmt.Sprintf("x.%s", SymphonyDomainName), Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: KroDomainName, Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/resource_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ type Dependency struct {

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="APIVERSION",type=string,priority=0,JSONPath=`.spec.apiVersion`
// +kubebuilder:printcolumn:name="KIND",type=string,priority=0,JSONPath=`.spec.kind`
// +kubebuilder:printcolumn:name="APIVERSION",type=string,priority=0,JSONPath=`.spec.schema.apiVersion`
// +kubebuilder:printcolumn:name="KIND",type=string,priority=0,JSONPath=`.spec.schema.kind`
// +kubebuilder:printcolumn:name="STATE",type=string,priority=0,JSONPath=`.status.state`
// +kubebuilder:printcolumn:name="TOPOLOGICALORDER",type=string,priority=1,JSONPath=`.status.topologicalOrder`
// +kubebuilder:printcolumn:name="AGE",type="date",priority=0,JSONPath=".metadata.creationTimestamp"
Expand Down
14 changes: 7 additions & 7 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ import (
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/predicate"

xv1alpha1 "github.com/awslabs/symphony/api/v1alpha1"
resourcegroupctrl "github.com/awslabs/symphony/internal/controller/resourcegroup"
"github.com/awslabs/symphony/internal/dynamiccontroller"
"github.com/awslabs/symphony/internal/graph"
"github.com/awslabs/symphony/internal/kubernetes"
xv1alpha1 "github.com/awslabs/kro/api/v1alpha1"
resourcegroupctrl "github.com/awslabs/kro/internal/controller/resourcegroup"
"github.com/awslabs/kro/internal/dynamiccontroller"
"github.com/awslabs/kro/internal/graph"
"github.com/awslabs/kro/internal/kubernetes"
//+kubebuilder:scaffold:imports
)

Expand Down Expand Up @@ -73,7 +73,7 @@ func main() {
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
flag.BoolVar(&allowCRDDeletion, "allow-crd-deletion", false, "allow symphony to delete CRDs")
flag.BoolVar(&allowCRDDeletion, "allow-crd-deletion", false, "allow kro to delete CRDs")
flag.IntVar(&resourceGroupConcurrentReconciles, "resource-group-concurrent-reconciles", 1, "The number of resource group reconciles to run in parallel")
flag.IntVar(&dynamicControllerConcurrentReconciles, "dynamic-controller-concurrent-reconciles", 1, "The number of dynamic controller reconciles to run in parallel")
// log level flags
Expand All @@ -97,7 +97,7 @@ func main() {
},
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "6f0f64a5.symphony.k8s.aws",
LeaderElectionID: "6f0f64a5.kro.run",
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
// when the Manager ends. This requires the binary to immediately end when the
// Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.2
name: resourcegroups.x.symphony.k8s.aws
name: resourcegroups.kro.run
spec:
group: x.symphony.k8s.aws
group: kro.run
names:
kind: ResourceGroup
listKind: ResourceGroupList
Expand All @@ -17,10 +17,10 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.apiVersion
- jsonPath: .spec.schema.apiVersion
name: APIVERSION
type: string
- jsonPath: .spec.kind
- jsonPath: .spec.schema.kind
name: KIND
type: string
- jsonPath: .status.state
Expand Down
2 changes: 1 addition & 1 deletion config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
resources:
- bases/x.symphony.k8s.aws_resourcegroups.yaml
- bases/kro.run_resourcegroups.yaml
#+kubebuilder:scaffold:crdkustomizeresource

patches:
Expand Down
4 changes: 2 additions & 2 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Adds namespace to all resources.
namespace: symphony-system
namespace: kro-system

# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
namePrefix: symphony-
namePrefix: kro-

# Labels to add to all resources and selectors.
#labels:
Expand Down
8 changes: 4 additions & 4 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ metadata:
app.kubernetes.io/name: namespace
app.kubernetes.io/instance: system
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: symphony
app.kubernetes.io/part-of: symphony
app.kubernetes.io/created-by: kro
app.kubernetes.io/part-of: kro
app.kubernetes.io/managed-by: kustomize
name: system
---
Expand All @@ -21,8 +21,8 @@ metadata:
app.kubernetes.io/name: deployment
app.kubernetes.io/instance: controller-manager
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: symphony
app.kubernetes.io/part-of: symphony
app.kubernetes.io/created-by: kro
app.kubernetes.io/part-of: kro
app.kubernetes.io/managed-by: kustomize
spec:
selector:
Expand Down
4 changes: 2 additions & 2 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ metadata:
app.kubernetes.io/name: servicemonitor
app.kubernetes.io/instance: controller-manager-metrics-monitor
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: symphony
app.kubernetes.io/part-of: symphony
app.kubernetes.io/created-by: kro
app.kubernetes.io/part-of: kro
app.kubernetes.io/managed-by: kustomize
name: controller-manager-metrics-monitor
namespace: system
Expand Down
8 changes: 4 additions & 4 deletions config/rbac/abstraction_editor_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ metadata:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: resourcegroup-editor-role
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: symphony
app.kubernetes.io/part-of: symphony
app.kubernetes.io/created-by: kro
app.kubernetes.io/part-of: kro
app.kubernetes.io/managed-by: kustomize
name: resourcegroup-editor-role
rules:
- apiGroups:
- x.symphony.k8s.aws
- kro.run
resources:
- resourcegroups
verbs:
Expand All @@ -24,7 +24,7 @@ rules:
- update
- watch
- apiGroups:
- x.symphony.k8s.aws
- kro.run
resources:
- resourcegroups/status
verbs:
Expand Down
8 changes: 4 additions & 4 deletions config/rbac/abstraction_viewer_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ metadata:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: resourcegroup-viewer-role
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: symphony
app.kubernetes.io/part-of: symphony
app.kubernetes.io/created-by: kro
app.kubernetes.io/part-of: kro
app.kubernetes.io/managed-by: kustomize
name: resourcegroup-viewer-role
rules:
- apiGroups:
- x.symphony.k8s.aws
- kro.run
resources:
- resourcegroups
verbs:
- get
- list
- watch
- apiGroups:
- x.symphony.k8s.aws
- kro.run
resources:
- resourcegroups/status
verbs:
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/auth_proxy_client_clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ metadata:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: metrics-reader
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: symphony
app.kubernetes.io/part-of: symphony
app.kubernetes.io/created-by: kro
app.kubernetes.io/part-of: kro
app.kubernetes.io/managed-by: kustomize
name: metrics-reader
rules:
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/auth_proxy_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ metadata:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: proxy-role
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: symphony
app.kubernetes.io/part-of: symphony
app.kubernetes.io/created-by: kro
app.kubernetes.io/part-of: kro
app.kubernetes.io/managed-by: kustomize
name: proxy-role
rules:
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/auth_proxy_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ metadata:
app.kubernetes.io/name: clusterrolebinding
app.kubernetes.io/instance: proxy-rolebinding
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: symphony
app.kubernetes.io/part-of: symphony
app.kubernetes.io/created-by: kro
app.kubernetes.io/part-of: kro
app.kubernetes.io/managed-by: kustomize
name: proxy-rolebinding
roleRef:
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ metadata:
app.kubernetes.io/name: service
app.kubernetes.io/instance: controller-manager-metrics-service
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: symphony
app.kubernetes.io/part-of: symphony
app.kubernetes.io/created-by: kro
app.kubernetes.io/part-of: kro
app.kubernetes.io/managed-by: kustomize
name: controller-manager-metrics-service
namespace: system
Expand Down
Loading

0 comments on commit 9e087ef

Please sign in to comment.