From cfa867efd51cf49e59ba6349a024ad9974c46986 Mon Sep 17 00:00:00 2001 From: Bertrand THOMAS Date: Thu, 11 Sep 2025 10:40:34 +0200 Subject: [PATCH 01/10] Fix typo in links --- charts/capi-templates/README.md | 2 +- docs/custom-charts/capi-templates.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/capi-templates/README.md b/charts/capi-templates/README.md index 95ce170..f19e3c1 100644 --- a/charts/capi-templates/README.md +++ b/charts/capi-templates/README.md @@ -1,6 +1,6 @@ # Kubernetes CAPI Templates Helm Chart -This chart will simplify the use of [Cluster API (CAPI))](https://cluster-api.sigs.k8s.io/) to manage your Kubernetes clusters. +This chart will simplify the use of [Cluster API (CAPI)](https://cluster-api.sigs.k8s.io/) to manage your Kubernetes clusters. ## Getting started diff --git a/docs/custom-charts/capi-templates.md b/docs/custom-charts/capi-templates.md index d6cbfd7..721a779 100644 --- a/docs/custom-charts/capi-templates.md +++ b/docs/custom-charts/capi-templates.md @@ -1,6 +1,6 @@ # Cluster API Templates -Let's see how to simplify the use of [Cluster API (CAPI)] to manage your Kubernetes clusters. +Let's see how to simplify the use of [Cluster API (CAPI)](https://cluster-api.sigs.k8s.io/) to manage your Kubernetes clusters. > [!NOTE] > Cluster API is a Kubernetes sub-project focused on providing declarative APIs and tooling to simplify provisioning, upgrading, and operating multiple Kubernetes clusters. From 5cc4b55709eee5f396df81679d3dfeb24267b2ec Mon Sep 17 00:00:00 2001 From: Bertrand THOMAS Date: Fri, 3 Oct 2025 11:20:31 +0200 Subject: [PATCH 02/10] Dump sales-portal version --- charts/devpro-salesportal/Chart.yaml | 4 ++-- charts/devpro-salesportal/values.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/devpro-salesportal/Chart.yaml b/charts/devpro-salesportal/Chart.yaml index d2a3515..87d09cf 100644 --- a/charts/devpro-salesportal/Chart.yaml +++ b/charts/devpro-salesportal/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: devpro-salesportal description: Helm chart for Devpro Sales Portal type: application -version: 0.2.6 -appVersion: "1.1.0" +version: 0.2.7 +appVersion: "1.1.18203306613" dependencies: - name: mongodb version: 14.10.1 # MongoDB 7.0.5 diff --git a/charts/devpro-salesportal/values.yaml b/charts/devpro-salesportal/values.yaml index 479ad07..628db43 100644 --- a/charts/devpro-salesportal/values.yaml +++ b/charts/devpro-salesportal/values.yaml @@ -3,7 +3,7 @@ front: host: sales-portal.random name: salesportal-wasmapp image: docker.io/devprofr/salesportal-wasmapp - tag: 1.1.7976633545 + tag: 1.1.18203306613 port: 80 replicaCount: 1 healthEndpoint: /health @@ -27,7 +27,7 @@ adapter: host: crm-adapter.random name: salesportal-crmadapterwebapi image: docker.io/devprofr/salesportal-crmadapterwebapi - tag: 1.1.7976633545 + tag: 1.1.18203306613 replicaCount: 1 port: 8080 healthEndpoint: /health @@ -43,7 +43,7 @@ data: host: crm-data.random name: salesportal-crmdatawebapi image: docker.io/devprofr/salesportal-crmdatawebapi - tag: 1.1.7976633545 + tag: 1.1.18203306613 replicaCount: 1 port: 8080 healthEndpoint: /health From 08099c32f2344ee57337076768fb35ccdb1b4aa8 Mon Sep 17 00:00:00 2001 From: Bertrand THOMAS Date: Fri, 3 Oct 2025 12:11:22 +0200 Subject: [PATCH 03/10] Add guide for MySQL --- docs/application-guides/databases/mysql.md | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 docs/application-guides/databases/mysql.md diff --git a/docs/application-guides/databases/mysql.md b/docs/application-guides/databases/mysql.md new file mode 100644 index 0000000..76ed303 --- /dev/null +++ b/docs/application-guides/databases/mysql.md @@ -0,0 +1,47 @@ +# MySQL + +Let's see how to run [MySQL](https://www.mysql.com/) in a Kubernetes cluster with [MySQL Operator for Kubernetes](https://dev.mysql.com/doc/mysql-operator/en/). + +## Configuration + +We'll use the [official Helm chart](https://dev.mysql.com/doc/mysql-operator/en/mysql-operator-installation-helm.html) ([code](https://github.com/mysql/mysql-operator)): + +- [values.yaml](https://github.com/mysql/mysql-operator/blob/trunk/helm/mysql-operator/values.yaml) + +## Deployment + +```bash +# adds Helm chart repository +helm repo add mysql-operator https://mysql.github.io/mysql-operator/ +helm repo update + +# installs +helm upgrade --install mysql-operator mysql-operator/mysql-operator --namespace mysql --create-namespace + +# checks everything is ok +kubectl get pod -n mysql + +# uninstalls +helm uninstall mysql -n mysql +kubectl delete ns mysql +``` + + From cad6c4b977de44c13af451102f49a438d7fecacd Mon Sep 17 00:00:00 2001 From: Bertrand THOMAS Date: Fri, 3 Oct 2025 14:53:07 +0200 Subject: [PATCH 04/10] Write ngrok guide --- docs/application-guides/networking/ngrok.md | 97 +++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/docs/application-guides/networking/ngrok.md b/docs/application-guides/networking/ngrok.md index 8721016..1ad6ed0 100644 --- a/docs/application-guides/networking/ngrok.md +++ b/docs/application-guides/networking/ngrok.md @@ -1 +1,98 @@ # ngrok + +Let's see how to run [ngrok](https://ngrok.com/) in a Kubernetes cluster with the [ngrok Kubernetes Operator](https://ngrok.com/docs/k8s). + +## Introduction + +ngrok Kubernetes Operator was announced in June of 2023, read the [blog post](https://ngrok.com/blog-post/ngrok-k8s) to know more about it. + +## Authentication + +Log in [dashboard.ngrok.com](https://dashboard.ngrok.com/) and retrieve the information: + +Key | Dashboard page +----------|------------------------------------------------------------------------- +AUTHTOKEN | [Your Authtoken](https://dashboard.ngrok.com/get-started/your-authtoken) +API_KEY | [API Keys](https://dashboard.ngrok.com/api-keys) + +## Domain reservation + +Go to [dashboard.ngrok.com/domains](https://dashboard.ngrok.com/domains) and click **New Domain**. + +## Repository + +We'll use the [official Helm chart](https://github.com/ngrok/ngrok-operator/tree/main/helm/ngrok-operator): + +```bash +helm repo add ngrok https://charts.ngrok.com +helm repo update +``` + +## Configuration + +Create the `values.yaml` file to override [default parameters.yaml](https://github.com/ngrok/ngrok-operator/blob/main/helm/ngrok-operator/values.yaml). + +::: code-group + +```yaml [Default] +# replicaCount: 1 +# image: +# registry: docker.io +# repository: ngrok/ngrok-operator +# tag: "" +# log: +# format: json +# level: info +# stacktraceLevel: error +``` + +```yaml [Secret credentials] +# kubectl create secret generic --namespace ngrok ngrok-operator-credentials --from-literal=AUTHTOKEN=[AUTHTOKEN] --from-literal=API_KEY=[API_KEY] +credentials: + secret: + name: "ngrok-credentials" +``` + +```yaml [Raw credentials] +credentials: + apiKey: "[AUTHTOKEN]" + authtoken: "[API_KEY]" +``` + +::: + +## Deployment + +Install the application: + +```bash +helm upgrade --install ngrok-operator ngrok/ngrok-operator -f values.yaml --namespace ngrok --create-namespace +``` + +Watch objects being created: + +```bash +kubectl get pod -n ngrok +``` + +> [!TIP] +> A new ingress class has been created with the default name `ngrok` + +## Usecases + +- [Ingress](https://ngrok.com/docs/getting-started/kubernetes/ingress) +- [Gateway API](https://ngrok.com/docs/getting-started/kubernetes/gateway-api) +- [Endpoints](https://ngrok.com/docs/getting-started/kubernetes/endpoints) + +## Clean-up + +Uninstall the application and delete the namespace: + +```bash +helm uninstall ngrok-operator -n ngrok +kubectl delete ns ngrok +``` + +## Integrations + +- [Kubernetes ingress to applications and clusters managed by Rancher](https://ngrok.com/docs/integrations/kubernetes-ingress/rancher-k8s#kubernetes-ingress-to-applications-and-clusters-managed-by-rancher) From a6068fa8b8fbf8add17a913b04651dd77ee4f3b7 Mon Sep 17 00:00:00 2001 From: Bertrand THOMAS Date: Fri, 3 Oct 2025 15:10:01 +0200 Subject: [PATCH 05/10] Add search in website --- CONTRIBUTING.md | 10 ++++++++++ docs/.vitepress/config.mts | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 319d802..a82dd56 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,8 +74,18 @@ The website is built with [VitePress](https://vitepress.dev/) and: The project was generated using `npx vitepress init`. +Website files are in `docs` folder. + +For configuration, look at [docs/.vitepress/config.mts](docs/.vitepress/config.mts). + ### Local review +Install dependencies: + +```bash +npm install +``` + Run the website with: ```bash diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 05ffe18..e4ed314 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -29,12 +29,15 @@ export default defineConfig({ socialLinks: [ { icon: 'github', link: 'https://github.com/devpro/helm-charts' } ], - outline: false + outline: false, + search: { + provider: 'local' + } }, markdown: { theme: { light: 'catppuccin-latte', - dark: 'catppuccin-mocha', + dark: 'catppuccin-mocha' } } }) From 906ad0bd0fb40781892a2084d2108b3998b65df4 Mon Sep 17 00:00:00 2001 From: Bertrand THOMAS Date: Sat, 4 Oct 2025 10:41:14 +0200 Subject: [PATCH 06/10] Update Longhorn guide --- CONTRIBUTING.md | 31 +++++- docs/application-guides/storage/longhorn.md | 103 +++++++++++--------- docs/application-guides/storage/mariadb.md | 17 ++++ 3 files changed, 99 insertions(+), 52 deletions(-) create mode 100644 docs/application-guides/storage/mariadb.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a82dd56..34ad853 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,11 +58,6 @@ docker run --rm -v $(pwd)/charts:/charts -v $(pwd)/.kube-linter.yaml:/etc/config lint /charts --config /etc/config.yaml ``` -### View Chart repository references - -- [aws/eks-charts](https://github.com/aws/eks-charts) -- [rancher/helm3-charts](https://github.com/rancher/helm3-charts) - ## Documentation website ### Static Site Generator @@ -112,3 +107,29 @@ npm run docs:dev > [!CAUTION] > Negative potential consequences of an action. ``` + +- Containers + +```md +::: info +This is an info box. +::: + +::: tip +This is a tip. +::: + +::: warning +This is a warning. +::: + +::: danger +This is a dangerous warning. +::: + +::: details +This is a details block. +::: +``` + +- [Markdown Extensions](https://vitepress.dev/guide/markdown) diff --git a/docs/application-guides/storage/longhorn.md b/docs/application-guides/storage/longhorn.md index 1e6db34..88a2648 100644 --- a/docs/application-guides/storage/longhorn.md +++ b/docs/application-guides/storage/longhorn.md @@ -1,76 +1,85 @@ # Longhorn -Let's see how to run [Longhorn](https://longhorn.io/) ([docs](https://longhorn.io/docs/), [code](https://github.com/longhorn/longhorn)) in a Kubernetes cluster. +Let's see how to run [Longhorn](https://longhorn.io/) in a Kubernetes cluster with the [official Helm chart](https://longhorn.io/docs/deploy/install/install-with-helm/). -## Configuration - -We'll use the [official Helm chart](https://longhorn.io/docs/1.9.0/deploy/install/install-with-helm/) ([code](https://github.com/longhorn/charts)): +📝 [DevPro note](https://tech.devpro.fr/organizations/companies/suse/longhorn/) -- [values.yaml](https://github.com/longhorn/charts/blob/master/charts/longhorn/values.yaml) +## Repository -## Deployment +First, we add the [Helm repository](https://github.com/longhorn/charts): ```bash -# adds Helm chart repository helm repo add longhorn https://charts.longhorn.io helm repo update +``` -# installs -helm upgrade --install longhorn longhorn/longhorn --namespace longhorn-system --create-namespace +## Configuration -# checks everything is ok -kubectl get pod -n longhorn-system -kubectl get sc longhorn +Create the `values.yaml` file to override [default parameters.yaml](https://github.com/longhorn/charts/blob/master/charts/longhorn/values.yaml). -# uninstalls -helm uninstall longhorn -n longhorn-system -kubectl delete ns longhorn-system +::: code-group + +```yaml [Default] +# persistence: +# defaultClass: true +# longhornUI: +# replicas: 2 ``` -## Examples +```yaml [Ingress] +ingress: + enabled: true + ingressClassName: nginx + host: longhorn.mydomain.io + tls: true + tlsSecret: longhorn-tls + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/auth-type: basic + nginx.ingress.kubernetes.io/ssl-redirect: "false" + nginx.ingress.kubernetes.io/auth-secret: basic-auth + nginx.ingress.kubernetes.io/auth-realm: "Authentication Required " + nginx.ingress.kubernetes.io/proxy-body-size: 10000m +``` -### Kubernetes cluster with NGINX Ingress Controller, UI secured by password, cert-manager and Let's Encrypt issuers +::: -Install Longhorn: +## Authentication + +🌐 [Create an Ingress with Basic Authentication (nginx)](https://longhorn.io/docs/deploy/accessing-the-ui/longhorn-ingress/) + +Create a password for the UI: ```bash -# creates a password for the UI (see https://longhorn.io/docs/1.4.0/deploy/accessing-the-ui/longhorn-ingress/) USER=; PASSWORD=; echo "${USER}:$(openssl passwd -stdin -apr1 <<< ${PASSWORD})" >> auth kubectl -n longhorn-system create secret generic basic-auth --from-file=auth - -# retrieves public IP -NGINX_PUBLIC_IP=`kubectl get service -n ingress-nginx ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'` - -# installs the chart -helm upgrade --install longhorn . -f values.yaml --namespace longhorn-system --create-namespace \ - --set longhorn.ingress.enabled=true \ - --set longhorn.ingress.ingressClassName=nginx \ - --set longhorn.ingress.host=longhorn.${NGINX_PUBLIC_IP}.sslip.io \ - --set longhorn.ingress.tls=true \ - --set 'longhorn.ingress.annotations.cert-manager\.io/cluster-issuer=letsencrypt-prod' \ - --set 'longhorn.ingress.annotations.nginx\.ingress\.kubernetes\.io/auth-type=basic' \ - --set 'longhorn.ingress.annotations.nginx\.ingress\.kubernetes\.io/ssl-redirect="false"' \ - --set 'longhorn.ingress.annotations.nginx\.ingress\.kubernetes\.io/auth-secret=basic-auth' \ - --set 'longhorn.ingress.annotations.nginx\.ingress\.kubernetes\.io/auth-realm="Authentication Required "' \ - --set 'longhorn.ingress.annotations.nginx\.ingress\.kubernetes\.io/proxy-body-size=10000m' ``` -Open Longhorn dashboard (UI), in this case `https://longhorn.${NGINX_PUBLIC_IP}.sslip.io/`. +## Deployment -### MariaDB persistence storage +Install the application: ```bash -# installs MariaDB -helm upgrade --install mariadb bitnami/mariadb --namespace mariadb-system --create-namespace \ - --set global.storageClass=longhorn +helm upgrade --install longhorn longhorn/longhorn -f values.yaml --namespace longhorn-system --create-namespace +``` -# checks the pod (state should be Running) -kubectl get pod -n mariadb-system +Watch objects being created: + +```bash +kubectl get pod -n longhorn-system +kubectl get sc longhorn +``` -# checks the persistent volume and claims (status should be Bound) -kubectl get pvc,pv -n mariadb-system +> [!TIP] +> A new storage class has been created (default class by default) with the name `longhorn` -# cleans-up resources -helm delete mariadb -n mariadb-system -kubectl delete persistentvolumeclaim/data-mariadb-0 -n mariadb-system +If ingress has been set, you can access Longhorn dashboard (web UI). + +## Clean-up + +Uninstall the application and delete the namespace: + +```bash +helm uninstall longhorn -n longhorn-system +kubectl delete ns longhorn-system ``` diff --git a/docs/application-guides/storage/mariadb.md b/docs/application-guides/storage/mariadb.md new file mode 100644 index 0000000..c2aa2f0 --- /dev/null +++ b/docs/application-guides/storage/mariadb.md @@ -0,0 +1,17 @@ +# MariaDB + +```bash +# installs MariaDB +helm upgrade --install mariadb bitnami/mariadb --namespace mariadb-system --create-namespace \ + --set global.storageClass=longhorn + +# checks the pod (state should be Running) +kubectl get pod -n mariadb-system + +# checks the persistent volume and claims (status should be Bound) +kubectl get pvc,pv -n mariadb-system + +# cleans-up resources +helm delete mariadb -n mariadb-system +kubectl delete persistentvolumeclaim/data-mariadb-0 -n mariadb-system +``` From 11bc0980969a840a45bc65cfd5f59f3931f20f23 Mon Sep 17 00:00:00 2001 From: Bertrand THOMAS Date: Sat, 4 Oct 2025 10:54:50 +0200 Subject: [PATCH 07/10] Update mongodb-community chart to use operator 0.13.0 --- charts/mongodb-community/CONTRIBUTING.md | 6 ++++-- charts/mongodb-community/Chart.lock | 6 +++--- charts/mongodb-community/Chart.yaml | 6 +++--- charts/mongodb-community/README.md | 1 - 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/charts/mongodb-community/CONTRIBUTING.md b/charts/mongodb-community/CONTRIBUTING.md index 519de1e..cee09c6 100644 --- a/charts/mongodb-community/CONTRIBUTING.md +++ b/charts/mongodb-community/CONTRIBUTING.md @@ -2,6 +2,8 @@ ## How to update the dependencies +This chart uses [MongoDB Controllers for Kubernetes Operator](https://www.mongodb.com/docs/kubernetes/current/) ([code](https://github.com/mongodb/mongodb-kubernetes/tree/master/helm_chart)). + ```bash # makes sure the repository has been added and refreshed helm repo add mongodb https://mongodb.github.io/helm-charts @@ -20,7 +22,7 @@ helm dependency update ```bash # installs the operator -helm install community-operator-crds mongodb/community-operator-crds --namespace mongodb --version "0.9.0" --create-namespace --namespace mongodb +helm install community-operator-crds mongodb/community-operator-crds --namespace mongodb --version "0.13.0" --create-namespace --namespace mongodb # creates the user(s) secret containing the password value kubectl create secret generic mongodb-clusteradmin --from-literal=username=clusteradmin --from-literal=password='S!B\*d$zDsb=' --namespace mongodb @@ -30,7 +32,7 @@ cat < Date: Sat, 4 Oct 2025 11:39:42 +0200 Subject: [PATCH 08/10] Update salesportal mongodb bitnami dependency to 16.5.45 --- charts/devpro-salesportal/CONTRIBUTING.md | 77 +++++++++++++++++++++++ charts/devpro-salesportal/Chart.lock | 6 +- charts/devpro-salesportal/Chart.yaml | 2 +- charts/devpro-salesportal/README.md | 73 ++------------------- charts/devpro-salesportal/values.yaml | 13 +++- 5 files changed, 98 insertions(+), 73 deletions(-) create mode 100644 charts/devpro-salesportal/CONTRIBUTING.md diff --git a/charts/devpro-salesportal/CONTRIBUTING.md b/charts/devpro-salesportal/CONTRIBUTING.md new file mode 100644 index 0000000..695a7df --- /dev/null +++ b/charts/devpro-salesportal/CONTRIBUTING.md @@ -0,0 +1,77 @@ +# Contributing guide + +## Update chart dependencies + +1. Add Bitnami chart repository: + + ```bash + helm repo add bitnami https://charts.bitnami.com/bitnami + helm repo update + ``` + +2. Search for the latest version: + + ```bash + helm search repo -l bitnami/mongodb --versions + ``` + +3. Edit manually `Chart.yaml` with the new version + +4. Update `Chart.lock`: + + ```bash + helm dependency update + ``` + +## Examples + +### Installation with MongoDB + +```bash +# installs or updates the Helm release +helm upgrade --install sales-portal . -f values.yaml --create-namespace \ + --set mongodb.enabled=true \ + --set mongodb.auth.rootPassword=admin \ + --set data.db.connectionString=mongodb://root:admin@sales-portal-mongodb:27017/sales-portal?authSource=admin \ + --set data.db.databaseName=sales-portal \ + --namespace sales-portal + +# (optional) forwards MongoDB port for local access +kubectl port-forward service/sales-portal-mongodb 27017:27017 -n sales-portal + +# forwards port for local access +kubectl port-forward service/salesportal-wasmapp-svc 3001:80 -n sales-portal + +# accesses with http://localhost:3001/ +curl http://localhost:3001/ + +# cleans up +helm delete sales-portal -n sales-portal +kubectl delete ns sales-portal +``` + +### Installation with MongoDB, cert-manager, Let's Encrypt & NGINX Ingress Controller + +```bash +# retrieves public IP +NGINX_PUBLIC_IP=`kubectl get service -n ingress-nginx ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'` + +# applies the manifest (add "--debug > output.yaml" in case of issue) +helm upgrade --install sales-portal-beta . -f values.yaml --namespace sales-portal-beta --create-namespace \ + --set mongodb.enabled=true \ + --set mongodb.auth.rootPassword=admin \ + --set data.db.connectionString=mongodb://root:admin@sales-portal-beta-mongodb:27017/sales-portal-beta?authSource=admin \ + --set data.db.databaseName=sales-portal-beta \ + --set ingress.enabled=true \ + --set ingress.className=nginx \ + --set ingress.annotations.'cert-manager\.io/cluster-issuer'=letsencrypt-prod \ + --set front.host=sales-portal.${NGINX_PUBLIC_IP}.sslip.io \ + --set front.tls.secretName=sales-portal-tls \ + --set adapter.host=crm-adapter.${NGINX_PUBLIC_IP}.sslip.io \ + --set adapter.tls.secretName=crm-adapter-tls \ + --set data.host=crm-data.${NGINX_PUBLIC_IP}.sslip.io \ + --set data.tls.secretName=crm-data-tls \ + --set dotnet.environment=Development \ + --set dotnet.enableSwagger=true \ + --set dotnet.enableOpenTelemetry=true +``` diff --git a/charts/devpro-salesportal/Chart.lock b/charts/devpro-salesportal/Chart.lock index 054305e..46b4d90 100644 --- a/charts/devpro-salesportal/Chart.lock +++ b/charts/devpro-salesportal/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: mongodb repository: https://charts.bitnami.com/bitnami - version: 14.10.1 -digest: sha256:39b91464456843d9d4c04b4d6c6d844edc37a9037875dd2338ebc0b5035b6cfc -generated: "2024-02-20T22:33:40.999563045+01:00" + version: 16.5.45 +digest: sha256:0c44aac2a97d60cdf7606684a4d4662e06e7fd28f9840c9712d58c426a0ad3a0 +generated: "2025-10-04T11:26:20.051647013+02:00" diff --git a/charts/devpro-salesportal/Chart.yaml b/charts/devpro-salesportal/Chart.yaml index 87d09cf..40d1c97 100644 --- a/charts/devpro-salesportal/Chart.yaml +++ b/charts/devpro-salesportal/Chart.yaml @@ -6,7 +6,7 @@ version: 0.2.7 appVersion: "1.1.18203306613" dependencies: - name: mongodb - version: 14.10.1 # MongoDB 7.0.5 + version: 16.5.45 # MongoDB 8.0.13 repository: https://charts.bitnami.com/bitnami alias: mongodb condition: mongodb.enabled diff --git a/charts/devpro-salesportal/README.md b/charts/devpro-salesportal/README.md index 3f80fcd..a07b795 100644 --- a/charts/devpro-salesportal/README.md +++ b/charts/devpro-salesportal/README.md @@ -4,19 +4,20 @@ This Helm chart will install [Devpro Sales Portal](https://github.com/devpro/sal ## Usage -[Helm](https://helm.sh) must be installed to use the charts. Once correctly setup, add the repository: +Add [Helm](https://helm.sh) repository: ```bash helm repo add devpro https://devpro.github.io/helm-charts +helm repo update ``` -If you had already added this repo earlier, run `helm repo update` to retrieve the latest versions of the packages. To install the chart: +Install the application: ```bash helm upgrade --install sales-portal devpro/sales-portal --create-namespace --namespace sales-portal ``` -To uninstall the chart and clean-up the cluster: +Uninstall the chart and clean-up the cluster: ```bash helm delete sales-portal @@ -25,68 +26,4 @@ kubectl delete ns sales-portal ## Development -### Update chart dependencies - -Make sure to run `../../scripts/add_helm_repos.sh` and look at available version with with `helm search repo -l mongodb --versions`. - -Every time you update `Chart.yaml`, run `helm dependency update` to update `Chart.lock`. - -### Linting - -Run `helm lint` to check the chart. - -### Reviewing generated chart - -Run `helm template sales-portal . -f values.yaml > temp.yaml` to look at what is generated. - -## Examples - -### Installation with MongoDB - -```bash -# installs or updates the Helm release -helm upgrade --install sales-portal-beta . -f values.yaml --create-namespace \ ---set mongodb.enabled=true,mongodb.auth.rootPassword=admin \ ---set data.db.connectionString=mongodb://root:admin@sales-portal-beta-mongodb:27017/sales-portal-beta?authSource=admin \ ---set data.db.databaseName=sales-portal-beta \ ---namespace sales-portal-beta - -# (optional) forwards MongoDB port for local access -kubectl port-forward service/sales-portal-beta-mongodb 27017:27017 -n sales-portal-beta - -# forwards port for local access -kubectl port-forward service/salesportal-wasmapp-svc 3001:80 -n sales-portal-beta - -# accesses with http://localhost:3001/ -curl http://localhost:3001/ - -# cleans up -helm delete sales-portal-beta -n sales-portal-beta -kubectl delete ns sales-portal-beta -``` - -### Installation with MongoDB, cert-manager, Let's Encrypt & NGINX Ingress Controller - -```bash -# retrieves public IP -NGINX_PUBLIC_IP=`kubectl get service -n ingress-nginx ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'` - -# applies the manifest (add "--debug > output.yaml" in case of issue) -helm upgrade --install sales-portal-beta . -f values.yaml --namespace sales-portal-beta --create-namespace \ - --set mongodb.enabled=true \ - --set mongodb.auth.rootPassword=admin \ - --set data.db.connectionString=mongodb://root:admin@sales-portal-beta-mongodb:27017/sales-portal-beta?authSource=admin \ - --set data.db.databaseName=sales-portal-beta \ - --set ingress.enabled=true \ - --set ingress.className=nginx \ - --set ingress.annotations.'cert-manager\.io/cluster-issuer'=letsencrypt-prod \ - --set front.host=sales-portal.${NGINX_PUBLIC_IP}.sslip.io \ - --set front.tls.secretName=sales-portal-tls \ - --set adapter.host=crm-adapter.${NGINX_PUBLIC_IP}.sslip.io \ - --set adapter.tls.secretName=crm-adapter-tls \ - --set data.host=crm-data.${NGINX_PUBLIC_IP}.sslip.io \ - --set data.tls.secretName=crm-data-tls \ - --set dotnet.environment=Development \ - --set dotnet.enableSwagger=true \ - --set dotnet.enableOpenTelemetry=true -``` +Look at the [Contributing guide](CONTRIBUTING.md). diff --git a/charts/devpro-salesportal/values.yaml b/charts/devpro-salesportal/values.yaml index 628db43..945f5be 100644 --- a/charts/devpro-salesportal/values.yaml +++ b/charts/devpro-salesportal/values.yaml @@ -74,6 +74,17 @@ ingress: mongodb: enabled: false - # https://github.com/bitnami/charts/blob/main/bitnami/mongodb/values.yaml +# https://github.com/bitnami/charts/blob/main/bitnami/mongodb/values.yaml + global: + # imageRegistry: "" + # imagePullSecrets: [] + # defaultStorageClass: "" + # storageClass: "" + security: + allowInsecureImages: true + image: + registry: docker.io + repository: bitnamisecure/mongodb + tag: latest auth: {} # rootPassword: "" From 99551a6253d3e86b6d47ac25a9588c28d83a4abe Mon Sep 17 00:00:00 2001 From: Bertrand THOMAS Date: Sat, 4 Oct 2025 18:13:29 +0200 Subject: [PATCH 09/10] Improve sales-portal doc --- charts/devpro-salesportal/CONTRIBUTING.md | 63 +++++++-------- charts/devpro-salesportal/README.md | 10 ++- .../devpro-salesportal/templates/ingress.yaml | 6 +- .../devpro-salesportal/templates/service.yaml | 2 +- docs/custom-charts/index.md | 2 +- docs/custom-charts/sales-portal.md | 81 +++++++++++++++++++ 6 files changed, 121 insertions(+), 43 deletions(-) create mode 100644 docs/custom-charts/sales-portal.md diff --git a/charts/devpro-salesportal/CONTRIBUTING.md b/charts/devpro-salesportal/CONTRIBUTING.md index 695a7df..e93134f 100644 --- a/charts/devpro-salesportal/CONTRIBUTING.md +++ b/charts/devpro-salesportal/CONTRIBUTING.md @@ -23,55 +23,46 @@ helm dependency update ``` -## Examples +## Run locally -### Installation with MongoDB +### ngrok + +Deploy on a cluster with ngrok for the ingress and certificate (ngrok operator must be installed with Helm): ```bash -# installs or updates the Helm release -helm upgrade --install sales-portal . -f values.yaml --create-namespace \ +helm upgrade --install sales-portal . -f values.yaml --namespace sales-portal --create-namespace \ --set mongodb.enabled=true \ --set mongodb.auth.rootPassword=admin \ --set data.db.connectionString=mongodb://root:admin@sales-portal-mongodb:27017/sales-portal?authSource=admin \ --set data.db.databaseName=sales-portal \ - --namespace sales-portal + --set ingress.enabled=true \ + --set ingress.className=ngrok \ + --set front.host=sales-portal.devpro.ngrok.dev \ + --set front.tls=null \ + --set adapter.host=crm-adapter.devpro.ngrok.dev \ + --set adapter.tls=null \ + --set data.host=crm-data.devpro.ngrok.dev \ + --set data.tls=null \ + --set dotnet.environment=Development \ + --set dotnet.enableSwagger=true \ + --set dotnet.enableOpenTelemetry=true +``` -# (optional) forwards MongoDB port for local access -kubectl port-forward service/sales-portal-mongodb 27017:27017 -n sales-portal +Check everything is ok: -# forwards port for local access -kubectl port-forward service/salesportal-wasmapp-svc 3001:80 -n sales-portal +```bash +kubectl get all -n sales-portal +``` -# accesses with http://localhost:3001/ -curl http://localhost:3001/ +Optionally forwards MongoDB port for local access and open MongoDB compass (`mongodb://localhost:27017/`, `root/admin`): -# cleans up -helm delete sales-portal -n sales-portal -kubectl delete ns sales-portal +```bash +kubectl port-forward service/sales-portal-mongodb 27017:27017 -n sales-portal ``` -### Installation with MongoDB, cert-manager, Let's Encrypt & NGINX Ingress Controller +Clean-up: ```bash -# retrieves public IP -NGINX_PUBLIC_IP=`kubectl get service -n ingress-nginx ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'` - -# applies the manifest (add "--debug > output.yaml" in case of issue) -helm upgrade --install sales-portal-beta . -f values.yaml --namespace sales-portal-beta --create-namespace \ - --set mongodb.enabled=true \ - --set mongodb.auth.rootPassword=admin \ - --set data.db.connectionString=mongodb://root:admin@sales-portal-beta-mongodb:27017/sales-portal-beta?authSource=admin \ - --set data.db.databaseName=sales-portal-beta \ - --set ingress.enabled=true \ - --set ingress.className=nginx \ - --set ingress.annotations.'cert-manager\.io/cluster-issuer'=letsencrypt-prod \ - --set front.host=sales-portal.${NGINX_PUBLIC_IP}.sslip.io \ - --set front.tls.secretName=sales-portal-tls \ - --set adapter.host=crm-adapter.${NGINX_PUBLIC_IP}.sslip.io \ - --set adapter.tls.secretName=crm-adapter-tls \ - --set data.host=crm-data.${NGINX_PUBLIC_IP}.sslip.io \ - --set data.tls.secretName=crm-data-tls \ - --set dotnet.environment=Development \ - --set dotnet.enableSwagger=true \ - --set dotnet.enableOpenTelemetry=true +helm delete sales-portal -n sales-portal +kubectl delete ns sales-portal ``` diff --git a/charts/devpro-salesportal/README.md b/charts/devpro-salesportal/README.md index a07b795..94d563c 100644 --- a/charts/devpro-salesportal/README.md +++ b/charts/devpro-salesportal/README.md @@ -1,6 +1,10 @@ # Helm chart for Devpro Sales Portal -This Helm chart will install [Devpro Sales Portal](https://github.com/devpro/sales-portal) on a Kubernetes cluster. +This is the official Helm chart to install [Devpro Sales Portal](https://github.com/devpro/sales-portal) on a Kubernetes cluster. + +## Getting started + +Start with the [documentation](https://kwt.devpro.fr/custom-charts/sales-portal.html). ## Usage @@ -11,10 +15,12 @@ helm repo add devpro https://devpro.github.io/helm-charts helm repo update ``` +Create the `values.yaml` file to override [default values](values.yaml). + Install the application: ```bash -helm upgrade --install sales-portal devpro/sales-portal --create-namespace --namespace sales-portal +helm upgrade --install sales-portal devpro/sales-portal -f values.yaml --create-namespace --namespace sales-portal ``` Uninstall the chart and clean-up the cluster: diff --git a/charts/devpro-salesportal/templates/ingress.yaml b/charts/devpro-salesportal/templates/ingress.yaml index 9c62237..85780f5 100644 --- a/charts/devpro-salesportal/templates/ingress.yaml +++ b/charts/devpro-salesportal/templates/ingress.yaml @@ -6,7 +6,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ $name }}-ingress + name: {{ $name }} {{- with $.Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -23,7 +23,7 @@ spec: pathType: Prefix backend: service: - name: {{ $name }}-svc + name: {{ $name }} port: number: 80 {{- range .ingressExtraHosts }} @@ -35,7 +35,7 @@ spec: pathType: {{ .pathType }} backend: service: - name: {{ $name }}-svc + name: {{ $name }} port: number: 80 {{- end }} diff --git a/charts/devpro-salesportal/templates/service.yaml b/charts/devpro-salesportal/templates/service.yaml index 0f09919..cdfec3a 100644 --- a/charts/devpro-salesportal/templates/service.yaml +++ b/charts/devpro-salesportal/templates/service.yaml @@ -8,7 +8,7 @@ metadata: labels: app: {{ .name }} app.kubernetes.io/name: {{ .name }} - name: {{ .name }}-svc + name: {{ .name }} spec: type: ClusterIP ports: diff --git a/docs/custom-charts/index.md b/docs/custom-charts/index.md index b39bd68..c3d3c5c 100644 --- a/docs/custom-charts/index.md +++ b/docs/custom-charts/index.md @@ -11,9 +11,9 @@ order: 2 ## Demo applications * Cow Demo -* Devpro Sales Portal * E Corp Demo * Game 2048 +* [Sales Portal](sales-portal.md) ## Infrastructure automation diff --git a/docs/custom-charts/sales-portal.md b/docs/custom-charts/sales-portal.md new file mode 100644 index 0000000..e3c72f8 --- /dev/null +++ b/docs/custom-charts/sales-portal.md @@ -0,0 +1,81 @@ +# Sales Portal + +Let's see how to deploy [Sales Portal](https://github.com/devpro/sales-portal) on a Kubernetes cluster. + +## Repository + +Make sure to have the **devpro** Helm repository: + +```bash +helm repo add devpro https://devpro.github.io/helm-charts +helm repo update +``` + +## Configuration + +Create the `values.yaml` file to override [default parameters](https://github.com/devpro/helm-charts/blob/main/charts/sales-portal/values.yaml). + +::: code-group + +```yaml [Application settings] +dotnet: + environment: Development + enableSwagger: true + enableOpenTelemetry: true +``` + +```yaml [MongoDB subchart] +mongodb: + enabled: true + auth: + rootPassword: admin +data: + db: + connectionString: mongodb://root:admin@sales-portal-mongodb:27017/sales-portal?authSource=admin + databaseName: sales-portal +``` + +```yaml [NGINX Ingress & cert-manager] +ingress: + enabled: true + className: nginx + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod +front: + host: sales-portal.my.domain +adapter: + host: crm-adapter.my.domain +data: + host: crm-data.my.domain +``` + +::: + +## Deployment + +Install the application: + +```bash +helm upgrade --install sales-portal devpro/sales-portal -f values.yaml -namespace sales-portal --create-namespace +``` + +## Optional checks + +If enabled, open the Swagger page from the browser (`/swagger`). + +Forward MongoDB port for local access: + +```bash +kubectl port-forward service/sales-portal-mongodb 27017:27017 -n sales-portal +``` + +Use MongoDB Compass to look at the database. + +## Clean-up + +Uninstall the application and delete the namespace: + +```bash +helm delete sales-portal -n sales-portal +kubectl delete ns sales-portal +``` From 29ba70fb91b1cd1a4c9e022a45f4d88407c46afb Mon Sep 17 00:00:00 2001 From: Bertrand THOMAS Date: Sat, 4 Oct 2025 18:16:40 +0200 Subject: [PATCH 10/10] Bump capi-templates chart --- charts/capi-templates/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/capi-templates/Chart.yaml b/charts/capi-templates/Chart.yaml index eb56270..f6ddb16 100644 --- a/charts/capi-templates/Chart.yaml +++ b/charts/capi-templates/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: capi-templates description: Helm chart for Cluster API (CAPI) Templates type: application -version: 0.1.1 +version: 0.1.2 appVersion: "1.0.0" home: https://github.com/devpro/helm-charts/tree/main/charts/capi-templates maintainers: