Skip to content

Commit

Permalink
chore: backport #1664 (#1666)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag authored Aug 29, 2024
2 parents 1bd0735 + b584f55 commit e48031e
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 48 deletions.
10 changes: 10 additions & 0 deletions components/ledger/internal/storage/ledgerstore/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ var updateIKUniqueIndex string
//go:embed migrations/9-fix-incorrect-volumes-aggregation.sql
var fixIncorrectVolumes string

//go:embed migrations/10-fillfactor-on-moves.sql
var fillFactorOnMoves string

type Bucket struct {
name string
db *bun.DB
Expand Down Expand Up @@ -220,6 +223,13 @@ func registerMigrations(migrator *migrations.Migrator, name string) {
return err
},
},
migrations.Migration{
Name: "Add fill factor on moves",
UpWithContext: func(ctx context.Context, tx bun.Tx) error {
_, err := tx.ExecContext(ctx, fillFactorOnMoves)
return err
},
},
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table moves set (fillfactor = 80);
10 changes: 5 additions & 5 deletions components/operator/docs/02-Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To install the Formance Operator CRDs, you can use the following command:

```bash
helm upgrade --install operator-crds oci://ghcr.io/formancehq/helm/operator-crds \
--version v2.0.16 \
--version v2.0.17 \
--namespace formance-system \
--create-namespace
```
Expand All @@ -28,13 +28,13 @@ As noticed above, the version will always be the same as the operator version. C

### Operator Deployment

From version v2.0.16, CRDs are now packaged with `helm.sh/resource-policy: keep` to avoid deletion of the CRDs when the operator is uninstalled.
From version v2.0.17, CRDs are now packaged with `helm.sh/resource-policy: keep` to avoid deletion of the CRDs when the operator is uninstalled.

You can deploy Formance Operator using Helm:

```bash
helm upgrade --install regions oci://ghcr.io/formancehq/helm/regions \
--version v2.0.16 \
--version v2.0.17 \
--namespace formance-system \
--create-namespace \
--set operator.operator-crds.create=false
Expand Down Expand Up @@ -86,7 +86,7 @@ Then you will be able to disable `operator-crds.create: false` and install the o

```bash
helm upgrade --install regions oci://ghcr.io/formancehq/helm/regions \
--version v2.0.16 \
--version v2.0.17 \
--namespace $NAMESPACE \
--create-namespace \
--set operator.operator-crds.create=false
Expand All @@ -97,7 +97,7 @@ helm upgrade --install regions oci://ghcr.io/formancehq/helm/regions \

```bash
helm upgrade --install $RELEASE_NAME oci://ghcr.io/formancehq/helm/operator-crds \
--version v2.0.16 \
--version v2.0.17 \
--namespace $NAMESPACE \
--create-namespace
```
4 changes: 2 additions & 2 deletions components/operator/helm/crds/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: v2.0.16
version: v2.0.17

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v2.0.16
appVersion: v2.0.17
6 changes: 3 additions & 3 deletions components/operator/helm/operator/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: operator-crds
repository: file://../crds
version: v2.0.16
digest: sha256:4bc58536989b9aba34e66a82864a447206ef79f0b4740f3c08308f862d21a9f0
generated: "2024-08-28T11:01:40.897187038Z"
version: v2.0.17
digest: sha256:c00a694a24c1196850c6ac85d72e33f6e7f99bded76618be0e5ffe83aeb12710
generated: "2024-08-29T15:17:00.07561115Z"
6 changes: 3 additions & 3 deletions components/operator/helm/operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: v2.0.16
version: v2.0.17

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v2.0.16
appVersion: v2.0.17

dependencies:
- name: operator-crds
version: v2.0.16
version: v2.0.17
repository: "file://../crds"
condition: operator-crds.create
4 changes: 2 additions & 2 deletions components/operator/helm/operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
repository: ghcr.io/formancehq/operator
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: v2.0.16
tag: v2.0.17

imagePullSecrets: []
nameOverride: ""
Expand All @@ -32,7 +32,7 @@ operator:
issuer: ""

utils:
tag: "v2.0.16"
tag: "v2.0.17"

podAnnotations: {}

Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- ".local/gateway/Caddyfile:/etc/caddy/Caddyfile"

ledger:
image: "ghcr.io/formancehq/ledger:v2.0.16"
image: "ghcr.io/formancehq/ledger:v2.0.17"
healthcheck:
test: [ "CMD", "wget", "http://127.0.0.1:8080/_info", "-O", "-", "-q" ]
interval: 10s
Expand All @@ -24,7 +24,7 @@ services:
POSTGRES_URI: "postgresql://formance:formance@postgres:${FORMANCE_POSTGRES_PORT:-5432}/ledger?sslmode=disable"

payments-migrate:
image: "ghcr.io/formancehq/payments:v2.0.16"
image: "ghcr.io/formancehq/payments:v2.0.17"
command: migrate up
depends_on:
postgres:
Expand All @@ -33,7 +33,7 @@ services:
POSTGRES_URI: "postgres://formance:formance@postgres:${FORMANCE_POSTGRES_PORT:-5432}/payments?sslmode=disable"

payments-api:
image: "ghcr.io/formancehq/payments:v2.0.16"
image: "ghcr.io/formancehq/payments:v2.0.17"
command: api server
healthcheck:
test: [ "CMD", "curl", "-f", "http://127.0.0.1:8080/_healthcheck" ]
Expand All @@ -51,7 +51,7 @@ services:
CONFIG_ENCRYPTION_KEY: mysuperencryptionkey

payments-connectors:
image: "ghcr.io/formancehq/payments:v2.0.16"
image: "ghcr.io/formancehq/payments:v2.0.17"
command: connectors server
healthcheck:
test: [ "CMD", "curl", "-f", "http://127.0.0.1:8080/_healthcheck" ]
Expand Down
4 changes: 2 additions & 2 deletions ee/agent/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ maintainers:
icon: "https://avatars.github.com/u/84325077?s=200&v=4"

type: application
version: v2.0.16
appVersion: v2.0.16
version: v2.0.17
appVersion: v2.0.17
2 changes: 1 addition & 1 deletion ee/agent/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ image:
repository: ghcr.io/formancehq/agent
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: v2.0.16
tag: v2.0.17

imagePullSecrets: []
nameOverride: ""
Expand Down
8 changes: 4 additions & 4 deletions helm/regions/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: agent
repository: file://../../ee/agent/helm
version: v2.0.16
version: v2.0.17
- name: operator
repository: file://../../components/operator/helm/operator
version: v2.0.16
digest: sha256:15f558fbcaa38be7dc4a4462f44db45055941faaad1cb4408ded459019ea3e8d
generated: "2024-08-28T11:03:11.396748161Z"
version: v2.0.17
digest: sha256:79f0b02a53b26d0cb0018d52238ba9dd80519f7f923a30c33b348da2a0c7535a
generated: "2024-08-29T15:17:39.825712144Z"
6 changes: 3 additions & 3 deletions helm/regions/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ maintainers:
icon: "https://avatars.github.com/u/84325077?s=200&v=4"

type: application
version: v2.0.16
version: v2.0.17
appVersion: "latest"

dependencies:
- name: agent
version: v2.0.16
version: v2.0.17
repository: "file://../../ee/agent/helm"
condition: agent.enabled
- name: operator
version: v2.0.16
version: v2.0.17
repository: "file://../../components/operator/helm/operator"
condition: operator.enabled
38 changes: 19 additions & 19 deletions helm/regions/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ operator:

image:
repository: "ghcr.io/formancehq/operator"
tag: "v2.0.16"
tag: "v2.0.17"
operator:
disableWebhooks: false
region: "private"
Expand All @@ -29,7 +29,7 @@ agent:
enabled: false

image:
tag: "v2.0.16"
tag: "v2.0.17"
server:
address: "app.formance.cloud:443"
tls:
Expand All @@ -54,33 +54,33 @@ versions:
search: v0.10.0
auth: v0.4.4
wallets: v0.4.6
webhooks: v2.0.16
webhooks: v2.0.17
payments: v1.0.0-rc.5
stargate: v0.1.10
gateway: v2.0.16
gateway: v2.0.17
ledger: v1.10.14
operator-utils: v2.0.16
operator-utils: v2.0.17
v1.0:
orchestration: v0.2.1
reconciliation: v0.1.0
search: v0.10.0
auth: v0.4.4
wallets: v0.4.6
webhooks: v2.0.16
webhooks: v2.0.17
payments: v1.0.0-rc.5
stargate: v0.1.10
gateway: v2.0.16
gateway: v2.0.17
ledger: v1.10.14
operator-utils: v2.0.16
operator-utils: v2.0.17
v2.0:
ledger: v2.0.16
search: v2.0.16
stargate: v2.0.16
auth: v2.0.16
wallets: v2.0.16
webhooks: v2.0.16
gateway: v2.0.16
payments: v2.0.16
orchestration: v2.0.16
reconciliation: v2.0.16
operator-utils: v2.0.16
ledger: v2.0.17
search: v2.0.17
stargate: v2.0.17
auth: v2.0.17
wallets: v2.0.17
webhooks: v2.0.17
gateway: v2.0.17
payments: v2.0.17
orchestration: v2.0.17
reconciliation: v2.0.17
operator-utils: v2.0.17

0 comments on commit e48031e

Please sign in to comment.