diff --git a/doc/book/cookbook/kubernetes.md b/doc/book/cookbook/kubernetes.md index af04e94d..afa4fdb1 100644 --- a/doc/book/cookbook/kubernetes.md +++ b/doc/book/cookbook/kubernetes.md @@ -45,7 +45,7 @@ This is an example `values.overrride.yaml` for deploying in a microk8s cluster w ```yaml garage: # Use only 2 replicas per object - replicationMode: "2" + replicationFactor: 2 # Start 4 instances (StatefulSets) of garage deployment: diff --git a/script/dev-cluster.sh b/script/dev-cluster.sh index 998ffdb9..60991a66 100755 --- a/script/dev-cluster.sh +++ b/script/dev-cluster.sh @@ -38,7 +38,7 @@ data_dir = "/tmp/garage-data-$count" rpc_bind_addr = "0.0.0.0:$((3900+$count))" # the port other Garage nodes will use to talk to this node rpc_public_addr = "127.0.0.1:$((3900+$count))" bootstrap_peers = [] -replication_mode = "3" +replication_factor = 3 rpc_secret = "$NETWORK_SECRET" [s3_api] diff --git a/script/helm/garage/README.md b/script/helm/garage/README.md index c2eb086f..55a809b8 100644 --- a/script/helm/garage/README.md +++ b/script/helm/garage/README.md @@ -16,14 +16,15 @@ S3-compatible object store for small self-hosted geo-distributed deployments | extraVolumeMounts | object | `{}` | | | extraVolumes | object | `{}` | | | fullnameOverride | string | `""` | | -| garage.blockSize | string | `"1048576"` | Defaults is 1MB An increase can result in better performance in certain scenarios https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block-size | +| garage.blockSize | string | `"1048576"` | Defaults is 1MB An increase can result in better performance in certain scenarios https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block_size | | garage.bootstrapPeers | list | `[]` | This is not required if you use the integrated kubernetes discovery | -| garage.compressionLevel | string | `"1"` | zstd compression level of stored blocks https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#compression-level | -| garage.dbEngine | string | `"lmdb"` | Can be changed for better performance on certain systems https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db-engine-since-v0-8-0 | +| garage.compressionLevel | string | `"1"` | zstd compression level of stored blocks https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#compression_level | +| garage.dbEngine | string | `"lmdb"` | Can be changed for better performance on certain systems https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db_engine | | garage.existingConfigMap | string | `""` | if not empty string, allow using an existing ConfigMap for the garage.toml, if set, ignores garage.toml | | garage.garageTomlString | string | `""` | String Template for the garage configuration if set, ignores above values. Values can be templated, see https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/ | | garage.kubernetesSkipCrd | bool | `false` | Set to true if you want to use k8s discovery but install the CRDs manually outside of the helm chart, for example if you operate at namespace level without cluster ressources | -| garage.replicationMode | string | `"3"` | Default to 3 replicas, see the replication_mode section at https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication-mode | +| garage.replicationFactor | string | `"3"` | Default to 3 replicas, see the replication_factor section at https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication_factor | +| garage.consistencyMode | string | `"consistent"` | Default to read-after-write consistency, see the consistency_mode section at https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#consistency_mode | | garage.rpcBindAddr | string | `"[::]:3901"` | | | garage.rpcSecret | string | `""` | If not given, a random secret will be generated and stored in a Secret object | | garage.s3.api.region | string | `"garage"` | | diff --git a/script/helm/garage/templates/configmap.yaml b/script/helm/garage/templates/configmap.yaml index 81ca205e..38ee5c25 100644 --- a/script/helm/garage/templates/configmap.yaml +++ b/script/helm/garage/templates/configmap.yaml @@ -15,7 +15,8 @@ data: block_size = {{ .Values.garage.blockSize }} - replication_mode = "{{ .Values.garage.replicationMode }}" + replication_factor = {{ .Values.garage.replicationFactor }} + consistency_mode = "{{ .Values.garage.consistencyMode }}" compression_level = {{ .Values.garage.compressionLevel }} diff --git a/script/helm/garage/values.yaml b/script/helm/garage/values.yaml index 38715e38..f8ea30e5 100644 --- a/script/helm/garage/values.yaml +++ b/script/helm/garage/values.yaml @@ -5,20 +5,24 @@ # Garage configuration. These values go to garage.toml garage: # -- Can be changed for better performance on certain systems - # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db-engine-since-v0-8-0 + # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db_engine dbEngine: "lmdb" # -- Defaults is 1MB # An increase can result in better performance in certain scenarios - # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block-size + # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block_size blockSize: "1048576" - # -- Default to 3 replicas, see the replication_mode section at - # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication-mode - replicationMode: "3" + # -- Default to 3 replicas, see the replication_factor section at + # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication_factor + replicationFactor: "3" + + # -- By default, enable read-after-write consistency guarantees, see the consistency_mode section at + # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#consistency_mode + consistencyMode: "consistent" # -- zstd compression level of stored blocks - # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#compression-level + # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#compression_level compressionLevel: "1" rpcBindAddr: "[::]:3901" diff --git a/script/jepsen.garage/src/jepsen/garage/daemon.clj b/script/jepsen.garage/src/jepsen/garage/daemon.clj index 0ea773fb..9267a03a 100644 --- a/script/jepsen.garage/src/jepsen/garage/daemon.clj +++ b/script/jepsen.garage/src/jepsen/garage/daemon.clj @@ -43,7 +43,7 @@ "rpc_bind_addr = \"0.0.0.0:3901\"\n" "rpc_public_addr = \"" node ":3901\"\n" "db_engine = \"lmdb\"\n" - "replication_mode = \"3\"\n" + "replication_factor = 3\n" "data_dir = \"" data-dir "\"\n" "metadata_dir = \"" meta-dir "\"\n" "[s3_api]\n" diff --git a/script/k8s/config.yaml b/script/k8s/config.yaml index 8cf40fc2..bfefd999 100644 --- a/script/k8s/config.yaml +++ b/script/k8s/config.yaml @@ -8,7 +8,7 @@ data: metadata_dir = "/tmp/meta" data_dir = "/tmp/data" - replication_mode = "3" + replication_factor = 3 rpc_bind_addr = "[::]:3901" rpc_secret = "1799bccfd7411eddcf9ebd316bc1f5287ad12a68094e1c6ac6abde7e6feae1ec"