From 20d10df762e19843bfd4d0a92908357facdb637d Mon Sep 17 00:00:00 2001 From: jjcallis Date: Wed, 11 Dec 2024 13:54:20 +0000 Subject: [PATCH 1/4] Update ingress rules to include /eventcatalog path and include documentation to setup and deploy helm chart --- charts/eventcatalog/README.md | 153 ++++++++++++++++++++++++++ charts/eventcatalog/eventcatalog.yaml | 6 + charts/eventcatalog/values.yaml | 4 +- 3 files changed, 161 insertions(+), 2 deletions(-) create mode 100644 charts/eventcatalog/README.md create mode 100644 charts/eventcatalog/eventcatalog.yaml diff --git a/charts/eventcatalog/README.md b/charts/eventcatalog/README.md new file mode 100644 index 0000000..f4e9d3f --- /dev/null +++ b/charts/eventcatalog/README.md @@ -0,0 +1,153 @@ +# EventCatalog Helm Chart Instructions + +This guide provides detailed instructions for deploying EventCatalog using the Helm chart. You can use the default configuration or customize the deployment to suit your needs, including examples with and without a domain. + +## Table of Contents + +1. [Introduction](#introduction) +2. [Adding the Helm Repository](#adding-the-helm-repository) +3. [Installing the EventCatalog Chart](#installing-the-eventcatalog-chart) +4. [Available Values to Override](#available-values-to-override) +5. [Example Configurations - values.yaml](#example-configurations---valuesyaml) + - [Without a Domain](#without-a-domain) + - [With a Domain](#with-a-domain) +6. [Building a Custom EventCatalog Image](#building-a-custom-eventcatalog-image) +7. [Default Image and Demo UI](#default-image-and-demo-ui) +8. [Additional Resources](#additional-resources) + +## Introduction + +EventCatalog helps you document, manage, and visualize the events in your microservices architecture. This guide walks you through deploying the Helm chart, configuring ingress, and setting up your instance with a default or custom image. + +The deployment uses the **cert-manager** and **ingress-nginx** Helm charts for managing TLS certificates and ingress resources, respectively. + +## Adding the Helm Repository + +Add the Helm repository: + +```bash +helm repo add oso-devops https://osodevops.github.io/helm-charts/ +``` + +## Installing the EventCatalog Chart + +Install the Helm chart using the following command: + +```bash +helm install eventcatalog oso-devops/eventcatalog -f values.yaml +``` + +## Available Values to Override + +Below are the default values provided by the Helm chart that can be overridden in your `values.yaml` file: + +```yaml +replicaCount: 1 + +image: + name: eventcatalog + # Container image with static EventCatalog demo built + repository: quay.io/osodevops/eventcatalog + # If not specified, defaults to .Chart.AppVersion + tag: "" + pullPolicy: IfNotPresent + +service: + type: ClusterIP + # Default port for the service + port: 80 + +ingress: + enabled: true + domain: true + ingressClass: nginx + annotations: + nginx.ingress.kubernetes.io/rewrite-target: / + cert-manager.io/cluster-issuer: letsencrypt-prod + hosts: + - host: example.com + paths: + - path: / + pathType: ImplementationSpecific + tls: + - secretName: test-eventcatalog + hosts: + - example.com + +resources: + requests: + memory: "256Mi" + cpu: "500m" + limits: + memory: "512Mi" + cpu: "1" +``` + +### Example Configurations - values.yaml +#### Without a Domain +Use the following configuration for deployments without a domain using the default demo image. The application will be accessible via a LoadBalancer: +```yaml +ingress: + enabled: true + domain: false + ingressClass: nginx + annotations: + nginx.ingress.kubernetes.io/rewrite-target: / + hosts: + - paths: + - path: /eventcatalog + pathType: ImplementationSpecific + tls: [] + +``` + +#### With a Domain +Use this configuration to deploy EventCatalog with a custom domain, using the default demo image: + +```yaml +ingress: + enabled: true + domain: true + ingressClass: nginx + annotations: + nginx.ingress.kubernetes.io/rewrite-target: / + cert-manager.io/cluster-issuer: letsencrypt-prod + hosts: + - host: example-domain.com + paths: + - path: / + pathType: ImplementationSpecific + tls: + - secretName: test-eventcatalog + hosts: + - example-domain.com +``` + +## Building a Custom EventCatalog Image +You can build your own EventCatalog image if required. The following example demonstrates a multi-architecture image build: + +We used this to provide the default demo image. + +```bash +docker buildx build --platform linux/amd64,linux/arm64 -t quay.io/osodevops/eventcatalog:1.0.1 --push . +``` + +This image can then be referenced in your Helm values file for deployment. + +### Default Image and Demo UI +The Helm chart uses a default EventCatalog image that provides a demo experience. The UI is expected to resemble the [EventCatalog demo](https://demo.eventcatalog.dev). + +For testing locally, you can forward the service: + +```bash +kubectl port-forward svc/eventcatalog 8080:80 +``` + +## Additional Resources +- **Deployment and Hosting Documentation:** https://www.eventcatalog.dev/docs/development/deployment +- **Getting Started on GitHub:** https://github.com/event-catalog/eventcatalog +- **Create a Local Instance:** Start a local instance of EventCatalog with: + +```bash +npx @eventcatalog/create-eventcatalog@latest my-catalog +``` \ No newline at end of file diff --git a/charts/eventcatalog/eventcatalog.yaml b/charts/eventcatalog/eventcatalog.yaml new file mode 100644 index 0000000..12cd6a9 --- /dev/null +++ b/charts/eventcatalog/eventcatalog.yaml @@ -0,0 +1,6 @@ +ingress: + enabled: true + ingressClass: nginx + annotations: + nginx.ingress.kubernetes.io/rewrite-target: / + cert-manager.io/cluster-issuer: letsencrypt-prod \ No newline at end of file diff --git a/charts/eventcatalog/values.yaml b/charts/eventcatalog/values.yaml index c2c62ad..e37c37c 100644 --- a/charts/eventcatalog/values.yaml +++ b/charts/eventcatalog/values.yaml @@ -11,8 +11,8 @@ service: # Default port for the service port: 80 ingress: - enabled: true - domain: true + enabled: false + domain: false ingressClass: nginx annotations: nginx.ingress.kubernetes.io/rewrite-target: / From 49330864ca1eacd41b18c12cd0dc88a4ead994a3 Mon Sep 17 00:00:00 2001 From: MrDevopsman Date: Wed, 11 Dec 2024 13:59:06 +0000 Subject: [PATCH 2/4] example values are covered in docs --- charts/eventcatalog/eventcatalog.yaml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 charts/eventcatalog/eventcatalog.yaml diff --git a/charts/eventcatalog/eventcatalog.yaml b/charts/eventcatalog/eventcatalog.yaml deleted file mode 100644 index 12cd6a9..0000000 --- a/charts/eventcatalog/eventcatalog.yaml +++ /dev/null @@ -1,6 +0,0 @@ -ingress: - enabled: true - ingressClass: nginx - annotations: - nginx.ingress.kubernetes.io/rewrite-target: / - cert-manager.io/cluster-issuer: letsencrypt-prod \ No newline at end of file From 7bd25962b45c819840a307c43d5c4be5281ce160 Mon Sep 17 00:00:00 2001 From: MrDevopsman Date: Wed, 11 Dec 2024 14:15:36 +0000 Subject: [PATCH 3/4] update to include prefix so uri are written as normall y expected /eventcatalog/something will be rewritten as /something asn the /eventcatalog part essentially ignored --- charts/eventcatalog/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/eventcatalog/README.md b/charts/eventcatalog/README.md index f4e9d3f..3d190c9 100644 --- a/charts/eventcatalog/README.md +++ b/charts/eventcatalog/README.md @@ -96,7 +96,7 @@ ingress: hosts: - paths: - path: /eventcatalog - pathType: ImplementationSpecific + pathType: Prefix tls: [] ``` From ec48e9d4850069abc0dce0ca8f471a1fca1aba66 Mon Sep 17 00:00:00 2001 From: MrDevopsman Date: Thu, 12 Dec 2024 08:10:02 +0000 Subject: [PATCH 4/4] bump chart version --- charts/eventcatalog/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/eventcatalog/Chart.yaml b/charts/eventcatalog/Chart.yaml index c49ca0d..1f335cf 100644 --- a/charts/eventcatalog/Chart.yaml +++ b/charts/eventcatalog/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: eventcatalog description: A Helm chart for deploying EventCatalog's static site type: application -version: 0.1.0 +version: 0.1.1 appVersion: "1.0.1" maintainers: - name: oso