From 70cd9916b2b22d520298d2bc376a44aefd182e6c Mon Sep 17 00:00:00 2001 From: Maxence Maireaux Date: Tue, 26 Dec 2023 17:21:18 +0100 Subject: [PATCH] feat(helm): Add demo project --- docs/docs/deployment/cloudprem/operator.mdx | 12 ++-- docs/docs/deployment/elements/operator.mdx | 2 +- docs/docs/operator/upgrade.mdx | 2 +- helm/Taskfile.yaml | 9 +++ helm/demo/.gitignore | 1 + helm/demo/Chart.lock | 12 ++++ helm/demo/Chart.yaml | 28 +++++++++ helm/demo/README.md | 61 +++++++++++++++++++ .../templates/configuration.yaml | 4 -- helm/demo/values.yaml | 51 ++++++++++++++++ helm/regions/Chart.lock | 13 +--- helm/regions/Chart.yaml | 16 +---- helm/regions/README.md | 40 ++++++++++-- helm/regions/templates/versions/v2.0.yaml | 18 +++--- 14 files changed, 216 insertions(+), 53 deletions(-) create mode 100644 helm/demo/.gitignore create mode 100644 helm/demo/Chart.lock create mode 100644 helm/demo/Chart.yaml create mode 100644 helm/demo/README.md rename helm/{regions => demo}/templates/configuration.yaml (94%) create mode 100644 helm/demo/values.yaml diff --git a/docs/docs/deployment/cloudprem/operator.mdx b/docs/docs/deployment/cloudprem/operator.mdx index 0953ce049d..ed2e0148db 100644 --- a/docs/docs/deployment/cloudprem/operator.mdx +++ b/docs/docs/deployment/cloudprem/operator.mdx @@ -42,7 +42,7 @@ With this file in place, we can deploy our private region using Helm: ```bash helm install regions oci://ghcr.io/formancehq/helm/regions \ --- version 0.4.4 \ +--version 0.5.0 \ --namespace formance-system \ --create-namespace \ --values region.values.yaml @@ -65,7 +65,7 @@ Thanks to this CRD, you can also deploy a custom version of a service, including You can install the latest versions of CRD Versions with the following command: ```bash helm upgrade regions oci://ghcr.io/formancehq/helm/regions \ --- version 0.4.4 \ +--version 0.5.0 \ --namespace formance-system \ --create-namespace \ --values region.values.yaml @@ -78,12 +78,10 @@ The "Configuration" CRD defines the configuration of our application. This inclu :::tip If you wish to create all the configurations required for testing. You can run the following command: ```bash -helm upgrade regions oci://ghcr.io/formancehq/helm/regions \ --- version 0.4.4 \ +helm upgrade regions oci://ghcr.io/formancehq/helm/demo \ +-- version 0.1.0 \ --namespace formance-system \ ---create-namespace \ ---values region.values.yaml ---set demo.enabled=true +--create-namespace ``` ::: diff --git a/docs/docs/deployment/elements/operator.mdx b/docs/docs/deployment/elements/operator.mdx index e6024be9e4..5f95d507f9 100644 --- a/docs/docs/deployment/elements/operator.mdx +++ b/docs/docs/deployment/elements/operator.mdx @@ -99,7 +99,7 @@ Run the following command to apply the Kubernetes manifest that includes the ope ```shell helm upgrade --install regions oci://ghcr.io/formancehq/helm/regions \ --- version 0.4.4 \ +--version 0.5.0 \ --namespace formance-system \ --create-namespace \ --set agent.enabled=false diff --git a/docs/docs/operator/upgrade.mdx b/docs/docs/operator/upgrade.mdx index fa8d51566c..8eb32aaf4d 100644 --- a/docs/docs/operator/upgrade.mdx +++ b/docs/docs/operator/upgrade.mdx @@ -8,7 +8,7 @@ The operator can be upgraded by running the following command: ```bash helm upgrade regions oci://ghcr.io/formancehq/helm/regions \ --- version 0.4.4 \ +--version 0.5.0 \ --namespace formance-system \ ``` diff --git a/helm/Taskfile.yaml b/helm/Taskfile.yaml index c3e96494e3..96495bd98a 100644 --- a/helm/Taskfile.yaml +++ b/helm/Taskfile.yaml @@ -9,6 +9,7 @@ tasks: build: cmds: - task: build:regions + - task: build:demo build:regions: dir: ./regions @@ -17,3 +18,11 @@ tasks: - helm dependencies build - helm package ./ - mv *.tgz ./../ + + build:demo: + dir: ./demo + cmds: + - helm dependencies update + - helm dependencies build + - helm package ./ + - mv *.tgz ./../ diff --git a/helm/demo/.gitignore b/helm/demo/.gitignore new file mode 100644 index 0000000000..ebf1d3dceb --- /dev/null +++ b/helm/demo/.gitignore @@ -0,0 +1 @@ +charts diff --git a/helm/demo/Chart.lock b/helm/demo/Chart.lock new file mode 100644 index 0000000000..28e5930341 --- /dev/null +++ b/helm/demo/Chart.lock @@ -0,0 +1,12 @@ +dependencies: +- name: nats + repository: https://nats-io.github.io/k8s/helm/charts/ + version: 1.1.4 +- name: postgresql + repository: oci://registry-1.docker.io/bitnamicharts + version: 13.2.24 +- name: opensearch + repository: oci://registry-1.docker.io/bitnamicharts + version: 0.6.1 +digest: sha256:0ba507db4977c1b36e846b75cf90e5e9b8018404120a9bd0bb80dd347c80bd5a +generated: "2023-12-26T17:05:57.75503+01:00" diff --git a/helm/demo/Chart.yaml b/helm/demo/Chart.yaml new file mode 100644 index 0000000000..ab364400c5 --- /dev/null +++ b/helm/demo/Chart.yaml @@ -0,0 +1,28 @@ +apiVersion: v2 +name: demo +description: Formance Private Regions Demo Helm Chart +home: "https://formance.com" +sources: + - "https://github.com/formancehq/stack" +maintainers: + - name: "Formance Team" + email: "support@formance.com" +icon: "https://avatars.githubusercontent.com/u/84325077?s=200&v=4" + +type: application +version: 0.1.0 +appVersion: "latest" + +dependencies: + - name: nats + version: 1.1.4 + repository: "https://nats-io.github.io/k8s/helm/charts/" + condition: nats.enabled + - name: postgresql + version: 13.2.24 + repository: "oci://registry-1.docker.io/bitnamicharts" + condition: postgresql.enabled + - name: opensearch + version: 0.6.1 + repository: "oci://registry-1.docker.io/bitnamicharts" + condition: opensearch.enabled diff --git a/helm/demo/README.md b/helm/demo/README.md new file mode 100644 index 0000000000..3d6ff8d86d --- /dev/null +++ b/helm/demo/README.md @@ -0,0 +1,61 @@ +# demo + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) + +Formance Private Regions Demo Helm Chart + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Formance Team | | | + +## Source Code + +* + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| https://nats-io.github.io/k8s/helm/charts/ | nats | 1.1.4 | +| oci://registry-1.docker.io/bitnamicharts | opensearch | 0.6.1 | +| oci://registry-1.docker.io/bitnamicharts | postgresql | 13.2.24 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| nats.config.cluster.enabled | bool | `true` | | +| nats.config.cluster.replicas | int | `3` | | +| nats.config.jetstream.enabled | bool | `true` | | +| nats.config.jetstream.fileStore.dir | string | `"/data"` | | +| nats.config.jetstream.fileStore.enabled | bool | `true` | | +| nats.config.jetstream.fileStore.pvc.enabled | bool | `false` | | +| nats.config.jetstream.fileStore.pvc.size | string | `"20Gi"` | | +| nats.enabled | bool | `true` | | +| nats.fullnameOverride | string | `"nats"` | | +| opensearch.coordinating.replicaCount | int | `0` | | +| opensearch.dashboards.enabled | bool | `true` | | +| opensearch.data.persistence.enabled | bool | `false` | | +| opensearch.data.replicaCount | int | `2` | | +| opensearch.enabled | bool | `true` | | +| opensearch.fullnameOverride | string | `"opensearch"` | | +| opensearch.ingest.enabled | bool | `false` | | +| opensearch.ingest.replicaCount | int | `0` | | +| opensearch.master.persistence.enabled | bool | `false` | | +| opensearch.master.replicaCount | int | `1` | | +| opensearch.security.enabled | bool | `false` | | +| postgresql.architecture | string | `"standalone"` | | +| postgresql.enabled | bool | `true` | | +| postgresql.fullnameOverride | string | `"postgresql"` | | +| postgresql.global.postgresql.auth.database | string | `"formance"` | | +| postgresql.global.postgresql.auth.password | string | `"formance"` | | +| postgresql.global.postgresql.auth.postgresPassword | string | `"formance"` | | +| postgresql.global.postgresql.auth.username | string | `"formance"` | | +| postgresql.primary.persistence.enabled | bool | `false` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2) diff --git a/helm/regions/templates/configuration.yaml b/helm/demo/templates/configuration.yaml similarity index 94% rename from helm/regions/templates/configuration.yaml rename to helm/demo/templates/configuration.yaml index 926e76729a..915004d8fa 100644 --- a/helm/regions/templates/configuration.yaml +++ b/helm/demo/templates/configuration.yaml @@ -1,5 +1,3 @@ -{{ if .Capabilities.APIVersions.Has "stack.formance.com/v1beta3/Configuration" -}} -{{- if .Values.demo.enabled }} apiVersion: stack.formance.com/v1beta3 kind: Configuration metadata: @@ -94,5 +92,3 @@ spec: tls: crt: string key: string -{{- end }} -{{ end -}} \ No newline at end of file diff --git a/helm/demo/values.yaml b/helm/demo/values.yaml new file mode 100644 index 0000000000..173c7962d6 --- /dev/null +++ b/helm/demo/values.yaml @@ -0,0 +1,51 @@ +nats: + enabled: true + fullnameOverride: nats + config: + cluster: + enabled: true + replicas: 3 + jetstream: + enabled: true + fileStore: + enabled: true + dir: /data + pvc: + enabled: false + size: 20Gi + +postgresql: + enabled: true + fullnameOverride: postgresql + architecture: standalone + global: + postgresql: + auth: + username: formance + password: formance + database: formance + postgresPassword: formance + primary: + persistence: + enabled: false + +opensearch: + enabled: true + fullnameOverride: opensearch + security: + enabled: false + master: + replicaCount: 1 + persistence: + enabled: false + data: + replicaCount: 2 + persistence: + enabled: false + coordinating: + replicaCount: 0 + ingest: + enabled: false + replicaCount: 0 + dashboards: + enabled: true \ No newline at end of file diff --git a/helm/regions/Chart.lock b/helm/regions/Chart.lock index d2cd1645ae..1ec7f5bd9c 100644 --- a/helm/regions/Chart.lock +++ b/helm/regions/Chart.lock @@ -5,14 +5,5 @@ dependencies: - name: operator repository: file://../../components/operator/helm version: 0.3.2 -- name: nats - repository: https://nats-io.github.io/k8s/helm/charts/ - version: 1.1.4 -- name: postgresql - repository: oci://registry-1.docker.io/bitnamicharts - version: 13.2.24 -- name: opensearch - repository: oci://registry-1.docker.io/bitnamicharts - version: 0.6.1 -digest: sha256:1a49aa950846d624957df86450c85ddff5fefa80dd8c310f1ac6ee1c42cc8961 -generated: "2023-12-21T16:55:41.883592+01:00" +digest: sha256:1d35d1c2839e05a0218e6881cfa36cbec609f90c5b50b0bbf37eed7cb9f4cd7b +generated: "2023-12-26T17:04:17.148107+01:00" diff --git a/helm/regions/Chart.yaml b/helm/regions/Chart.yaml index 8edb086a04..dbe8b3ee88 100644 --- a/helm/regions/Chart.yaml +++ b/helm/regions/Chart.yaml @@ -10,7 +10,7 @@ maintainers: icon: "https://avatars.githubusercontent.com/u/84325077?s=200&v=4" type: application -version: 0.4.4 +version: 0.5.0 appVersion: "latest" dependencies: @@ -21,16 +21,4 @@ dependencies: - name: operator version: 0.3.2 repository: "file://../../components/operator/helm" - condition: operator.enabled - - name: nats - version: 1.1.4 - repository: "https://nats-io.github.io/k8s/helm/charts/" - condition: demo.enabled - - name: postgresql - version: 13.2.24 - repository: "oci://registry-1.docker.io/bitnamicharts" - condition: demo.enabled - - name: opensearch - version: 0.6.1 - repository: "oci://registry-1.docker.io/bitnamicharts" - condition: demo.enabled + condition: operator.enabled \ No newline at end of file diff --git a/helm/regions/README.md b/helm/regions/README.md index dc9c0a2b33..ec38dcbe1c 100644 --- a/helm/regions/README.md +++ b/helm/regions/README.md @@ -1,6 +1,6 @@ # regions -![Version: 0.2.6](https://img.shields.io/badge/Version-0.2.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 0.4.4](https://img.shields.io/badge/Version-0.4.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) Formance Private Regions Helm Chart @@ -20,8 +20,11 @@ Formance Private Regions Helm Chart | Repository | Name | Version | |------------|------|---------| -| file://../../components/agent/helm | agent | 0.2.0 | -| file://../../components/operator/helm | operator | 0.2.6 | +| file://../../components/operator/helm | operator | 0.3.2 | +| file://../../ee/agent/helm | agent | 0.3.0 | +| https://nats-io.github.io/k8s/helm/charts/ | nats | 1.1.4 | +| oci://registry-1.docker.io/bitnamicharts | opensearch | 0.6.1 | +| oci://registry-1.docker.io/bitnamicharts | postgresql | 13.2.24 | ## Values @@ -34,14 +37,32 @@ Formance Private Regions Helm Chart | agent.agent.baseUrl | string | `"https://sandbox.formance.cloud"` | | | agent.agent.id | string | `"aws-eu-west-1-sandbox"` | | | agent.enabled | bool | `true` | | -| agent.image.tag | string | `"v0.5.0"` | | +| agent.image.tag | string | `"v0.6.0"` | | | agent.server.address | string | `"app.formance.cloud:443"` | | | agent.server.tls.enabled | bool | `true` | | | agent.server.tls.insecureSkipVerify | bool | `true` | | +| nats.config.cluster.enabled | bool | `true` | | +| nats.config.cluster.replicas | int | `3` | | +| nats.config.jetstream.enabled | bool | `true` | | +| nats.config.jetstream.fileStore.dir | string | `"/data"` | | +| nats.config.jetstream.fileStore.enabled | bool | `true` | | +| nats.config.jetstream.fileStore.pvc.enabled | bool | `false` | | +| nats.config.jetstream.fileStore.pvc.size | string | `"20Gi"` | | +| nats.fullnameOverride | string | `"nats"` | | +| opensearch.coordinating.replicaCount | int | `0` | | +| opensearch.dashboards.enabled | bool | `true` | | +| opensearch.data.persistence.enabled | bool | `false` | | +| opensearch.data.replicaCount | int | `2` | | +| opensearch.fullnameOverride | string | `"opensearch"` | | +| opensearch.ingest.enabled | bool | `false` | | +| opensearch.ingest.replicaCount | int | `0` | | +| opensearch.master.persistence.enabled | bool | `false` | | +| opensearch.master.replicaCount | int | `1` | | +| opensearch.security.enabled | bool | `false` | | | operator.enabled | bool | `true` | | | operator.fullnameOverride | string | `"operator"` | | | operator.image.repository | string | `"ghcr.io/formancehq/operator"` | | -| operator.image.tag | string | `"v0.16.15"` | | +| operator.image.tag | string | `"v0.22.2"` | | | operator.nameOverride | string | `"operator"` | | | operator.operator.disableWebhooks | bool | `false` | | | operator.operator.enableLeaderElection | bool | `true` | | @@ -49,6 +70,13 @@ Formance Private Regions Helm Chart | operator.operator.metricsAddr | string | `":8080"` | | | operator.operator.probeAddr | string | `":8081"` | | | operator.operator.region | string | `"private"` | | +| postgresql.architecture | string | `"standalone"` | | +| postgresql.fullnameOverride | string | `"postgresql"` | | +| postgresql.global.postgresql.auth.database | string | `"formance"` | | +| postgresql.global.postgresql.auth.password | string | `"formance"` | | +| postgresql.global.postgresql.auth.postgresPassword | string | `"formance"` | | +| postgresql.global.postgresql.auth.username | string | `"formance"` | | +| postgresql.primary.persistence.enabled | bool | `false` | | ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2) diff --git a/helm/regions/templates/versions/v2.0.yaml b/helm/regions/templates/versions/v2.0.yaml index b045dc6a88..766b0cb193 100644 --- a/helm/regions/templates/versions/v2.0.yaml +++ b/helm/regions/templates/versions/v2.0.yaml @@ -5,13 +5,13 @@ metadata: name: v2.0 spec: ledger: v2.0.0-beta.7 - search: v2.0.0-beta.2 - stargate: v2.0.0-beta.2 - auth: v2.0.0-beta.2 - wallets: v2.0.0-beta.2 - webhooks: v2.0.0-beta.2 - gateway: v2.0.0-beta.2 - payments: v2.0.0-beta.2 - orchestration: v2.0.0-beta.2 - reconciliation: v2.0.0-beta.2 + search: v2.0.0-beta.3 + stargate: v2.0.0-beta.3 + auth: v2.0.0-beta.3 + wallets: v2.0.0-beta.3 + webhooks: v2.0.0-beta.3 + gateway: v2.0.0-beta.3 + payments: v2.0.0-beta.3 + orchestration: v2.0.0-beta.3 + reconciliation: v2.0.0-beta.3 {{ end }}