From 7fe5a7c5a629dc3d0d688ee1dea730ac1e82090d Mon Sep 17 00:00:00 2001 From: cmoulliard Date: Wed, 25 Oct 2023 11:57:29 +0200 Subject: [PATCH 1/3] Log the kind config file generated by our IDP builder Signed-off-by: cmoulliard --- pkg/kind/cluster.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/kind/cluster.go b/pkg/kind/cluster.go index 203b1271..fdf04017 100644 --- a/pkg/kind/cluster.go +++ b/pkg/kind/cluster.go @@ -90,6 +90,10 @@ func (c *Cluster) Reconcile(ctx context.Context, recreate bool) error { return err } + fmt.Print("########################### Our kind config ############################\n") + fmt.Printf("%s", rawConfig) + fmt.Print("\n######################### config end ############################\n") + fmt.Printf("Creating kind cluster %s\n", c.name) if err = c.provider.Create( c.name, From 1f0ea4153ace15257f95daaf2a76117b1c8cb013 Mon Sep 17 00:00:00 2001 From: cmoulliard Date: Tue, 31 Oct 2023 14:48:01 +0100 Subject: [PATCH 2/3] Addind a TOC and developer section Signed-off-by: cmoulliard --- README.md | 35 ++++++++++++++++++++++++++++++++++- pkg/kind/resources/kind.yaml | 1 - 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a6af065c..d2c03131 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,21 @@ +Table of Contents +================= + +* [IDP Builder](#idp-builder) + * [About](#about) + * [Quickstart](#quickstart) + * [Build](#build) + * [Run](#run) + * [Use](#use) + * [Architecture](#architecture) + * [Kind cluster](#kind-cluster) + * [Localbuild](#localbuild) + * [Gitserver](#gitserver) + * [Embedded Argo Apps](#embedded-argo-apps) + * [Diagram](#diagram) + * [To start developing](#to-start-developing) +* [Extending the IDP builder](#extending-the-idpbuilder) + # IDP Builder Internal development platform binary launcher. @@ -73,7 +91,22 @@ As you can imagine each of these apps are are deployed by ArgoCD to the Kind clu [Excalidraw diagram here:](https://excalidraw.com/#json=MNOQf_OeLtKYe_Y80Bt2l,AP-ftLAwZoDWjp2yudnMKA) - +## To start developing + +If you want to contribute and extend the existing project, make sure that you have installed go (>= 1.20) and cloned this project. +Next, you can build it `make` or launch the `main.go` within your IDE or locally `./idpbuilder`. + +You can override the kind configuration generated by the idpbuilder. For that purpose, look to the +console to grab the config and save it in a file: +```text +########################### Our kind config ############################ +# Kind kubernetes release images https://github.com/kubernetes-sigs/kind/releases +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +... +######################### config end ############################ +``` +Next, import it `./idpbuilder create --kindConfig ` ## Extending the IDP builder In the future we hope to allow for a pluggable interface to allow for extending the IDP builder with additional argo apps. For now you simply need to add additional apps in the [Embedded Apps](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/resources.go#L20-L32) and also add the resources they will deploy in the `srv` folder: [pkg/apps/srv](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/srv/) diff --git a/pkg/kind/resources/kind.yaml b/pkg/kind/resources/kind.yaml index a65f4dc1..2b3d8191 100644 --- a/pkg/kind/resources/kind.yaml +++ b/pkg/kind/resources/kind.yaml @@ -1,4 +1,3 @@ -# two node (one workers) cluster config # Kind kubernetes release images https://github.com/kubernetes-sigs/kind/releases kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 From 0472283bdf663f281be425bb806d96356aa5df44 Mon Sep 17 00:00:00 2001 From: cmoulliard Date: Tue, 31 Oct 2023 18:03:30 +0100 Subject: [PATCH 3/3] Rename the developer section and move it after the Quickstart Signed-off-by: cmoulliard --- README.md | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index d2c03131..aa62894b 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ Table of Contents * [Build](#build) * [Run](#run) * [Use](#use) + * [Developer notes](#developer-notes) * [Architecture](#architecture) * [Kind cluster](#kind-cluster) * [Localbuild](#localbuild) * [Gitserver](#gitserver) * [Embedded Argo Apps](#embedded-argo-apps) * [Diagram](#diagram) - * [To start developing](#to-start-developing) * [Extending the IDP builder](#extending-the-idpbuilder) # IDP Builder @@ -49,6 +49,25 @@ Argo: https://argocd.cnoe.localtest.me:8443/ Backstage: https://backstage.cnoe.localtest.me:8443/ + +## Developer notes + +If you want to contribute and extend the existing project, make sure that you have installed go (>= 1.20) and cloned this project. +Next, you can build it `make` or launch the `main.go` within your IDE or locally `./idpbuilder`. + +You can override the kind configuration generated by the idpbuilder. For that purpose, look to the +console to grab the config and save it in a file: +```text +########################### Our kind config ############################ +# Kind kubernetes release images https://github.com/kubernetes-sigs/kind/releases +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +... +######################### config end ############################ +``` +Next, import it `./idpbuilder create --kindConfig ` + + ## Architecture The IDP builder binary is primarily composed of a wrapper around a [Kubebuilder](https://kubebuilder.io) based operator and associated type called localbuild. See: [api/v1alpha1/localbuild_types.go](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/api/v1alpha1/localbuild_types.go#L28-L66) and [pkg/controllers/localbuild/controller.go](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/controllers/localbuild/controller.go#L54-L84) @@ -91,22 +110,5 @@ As you can imagine each of these apps are are deployed by ArgoCD to the Kind clu [Excalidraw diagram here:](https://excalidraw.com/#json=MNOQf_OeLtKYe_Y80Bt2l,AP-ftLAwZoDWjp2yudnMKA) -## To start developing - -If you want to contribute and extend the existing project, make sure that you have installed go (>= 1.20) and cloned this project. -Next, you can build it `make` or launch the `main.go` within your IDE or locally `./idpbuilder`. - -You can override the kind configuration generated by the idpbuilder. For that purpose, look to the -console to grab the config and save it in a file: -```text -########################### Our kind config ############################ -# Kind kubernetes release images https://github.com/kubernetes-sigs/kind/releases -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -... -######################### config end ############################ -``` -Next, import it `./idpbuilder create --kindConfig ` - ## Extending the IDP builder In the future we hope to allow for a pluggable interface to allow for extending the IDP builder with additional argo apps. For now you simply need to add additional apps in the [Embedded Apps](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/resources.go#L20-L32) and also add the resources they will deploy in the `srv` folder: [pkg/apps/srv](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/srv/)