Skip to content

Commit

Permalink
feat(helm): Add demo project
Browse files Browse the repository at this point in the history
  • Loading branch information
flemzord committed Dec 26, 2023
1 parent fe3f199 commit 70cd991
Show file tree
Hide file tree
Showing 14 changed files with 216 additions and 53 deletions.
12 changes: 5 additions & 7 deletions docs/docs/deployment/cloudprem/operator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
```
:::

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/deployment/elements/operator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/operator/upgrade.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
```

Expand Down
9 changes: 9 additions & 0 deletions helm/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tasks:
build:
cmds:
- task: build:regions
- task: build:demo

build:regions:
dir: ./regions
Expand All @@ -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 ./../
1 change: 1 addition & 0 deletions helm/demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts
12 changes: 12 additions & 0 deletions helm/demo/Chart.lock
Original file line number Diff line number Diff line change
@@ -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"
28 changes: 28 additions & 0 deletions helm/demo/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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: "[email protected]"
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
61 changes: 61 additions & 0 deletions helm/demo/README.md
Original file line number Diff line number Diff line change
@@ -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:** <https://formance.com>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| Formance Team | <[email protected]> | |

## Source Code

* <https://github.com/formancehq/stack>

## 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)
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -94,5 +92,3 @@ spec:
tls:
crt: string
key: string
{{- end }}
{{ end -}}
51 changes: 51 additions & 0 deletions helm/demo/values.yaml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 2 additions & 11 deletions helm/regions/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
16 changes: 2 additions & 14 deletions helm/regions/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
40 changes: 34 additions & 6 deletions helm/regions/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand All @@ -34,21 +37,46 @@ 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` | |
| operator.operator.env | string | `"private"` | |
| 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)
18 changes: 9 additions & 9 deletions helm/regions/templates/versions/v2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

1 comment on commit 70cd991

@vercel
Copy link

@vercel vercel bot commented on 70cd991 Dec 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.