mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-09-07 20:46:16 +00:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 268334bd25 | |||
| a3cb3bc862 | |||
| c22b7499b8 | |||
| ae29f7f73f | |||
| 3dbcad9dda | |||
| cca7acae33 | |||
| b30ad6dfcc | |||
| ceadd2c0d2 | |||
| 67ada6ee78 | |||
| 229ec977d5 | |||
| 13b264afce | |||
| 6b50841d00 | |||
| 6dd5a6e823 | |||
| 683b419047 | |||
| 4d83477bb6 | |||
| b69cfcb857 | |||
| b934548c47 | |||
| 69a3608300 | |||
| a3bd785fb2 |
Generated
+18
-13
@@ -1513,7 +1513,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"assert-json-diff",
|
||||
"async-trait",
|
||||
@@ -1581,7 +1581,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_api_admin"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"argon2",
|
||||
"async-trait",
|
||||
@@ -1613,7 +1613,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_api_common"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"bytes",
|
||||
@@ -1649,7 +1649,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_api_k2v"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"futures",
|
||||
@@ -1672,7 +1672,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_api_s3"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"aes-gcm",
|
||||
"async-compression",
|
||||
@@ -1717,7 +1717,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_block"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"async-compression",
|
||||
@@ -1741,7 +1741,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_db"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"fjall",
|
||||
"heed",
|
||||
@@ -1756,7 +1756,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_model"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
"argon2",
|
||||
@@ -1784,7 +1784,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_net"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"bytes",
|
||||
@@ -1810,7 +1810,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_rpc"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"async-trait",
|
||||
@@ -1821,6 +1821,9 @@ dependencies = [
|
||||
"garage_util",
|
||||
"gethostname",
|
||||
"hex",
|
||||
"hyper 1.9.0",
|
||||
"hyper-rustls 0.27.9",
|
||||
"hyper-util",
|
||||
"ipnet",
|
||||
"itertools 0.14.0",
|
||||
"k8s-openapi",
|
||||
@@ -1831,6 +1834,7 @@ dependencies = [
|
||||
"pnet_datalink",
|
||||
"rand 0.9.4",
|
||||
"reqwest",
|
||||
"rustls 0.23.39",
|
||||
"schemars",
|
||||
"serde",
|
||||
"serde_bytes",
|
||||
@@ -1843,7 +1847,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_table"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"async-trait",
|
||||
@@ -1864,7 +1868,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_util"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
"arc-swap",
|
||||
@@ -1899,7 +1903,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "garage_web"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"garage_api_common",
|
||||
"garage_api_s3",
|
||||
@@ -2833,6 +2837,7 @@ dependencies = [
|
||||
"hyper-util",
|
||||
"log",
|
||||
"percent-encoding",
|
||||
"rustls 0.23.39",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2 0.10.9",
|
||||
|
||||
+13
-12
@@ -25,18 +25,18 @@ default-members = ["src/garage"]
|
||||
|
||||
# Internal Garage crates
|
||||
format_table = { version = "0.1.1", path = "src/format-table" }
|
||||
garage_api_common = { version = "2.4.0", path = "src/api/common" }
|
||||
garage_api_admin = { version = "2.4.0", path = "src/api/admin" }
|
||||
garage_api_s3 = { version = "2.4.0", path = "src/api/s3" }
|
||||
garage_api_k2v = { version = "2.4.0", path = "src/api/k2v" }
|
||||
garage_block = { version = "2.4.0", path = "src/block" }
|
||||
garage_db = { version = "2.4.0", path = "src/db", default-features = false }
|
||||
garage_model = { version = "2.4.0", path = "src/model", default-features = false }
|
||||
garage_net = { version = "2.4.0", path = "src/net" }
|
||||
garage_rpc = { version = "2.4.0", path = "src/rpc" }
|
||||
garage_table = { version = "2.4.0", path = "src/table" }
|
||||
garage_util = { version = "2.4.0", path = "src/util" }
|
||||
garage_web = { version = "2.4.0", path = "src/web" }
|
||||
garage_api_common = { version = "2.4.1", path = "src/api/common" }
|
||||
garage_api_admin = { version = "2.4.1", path = "src/api/admin" }
|
||||
garage_api_s3 = { version = "2.4.1", path = "src/api/s3" }
|
||||
garage_api_k2v = { version = "2.4.1", path = "src/api/k2v" }
|
||||
garage_block = { version = "2.4.1", path = "src/block" }
|
||||
garage_db = { version = "2.4.1", path = "src/db", default-features = false }
|
||||
garage_model = { version = "2.4.1", path = "src/model", default-features = false }
|
||||
garage_net = { version = "2.4.1", path = "src/net" }
|
||||
garage_rpc = { version = "2.4.1", path = "src/rpc" }
|
||||
garage_table = { version = "2.4.1", path = "src/table" }
|
||||
garage_util = { version = "2.4.1", path = "src/util" }
|
||||
garage_web = { version = "2.4.1", path = "src/web" }
|
||||
k2v-client = { version = "0.0.4", path = "src/k2v-client" }
|
||||
|
||||
# External crates from crates.io
|
||||
@@ -121,6 +121,7 @@ reqwest = { version = "0.13", default-features = false, features = [
|
||||
"rustls-no-provider",
|
||||
"json",
|
||||
] }
|
||||
rustls = { version = "0.23", default-features = false, features = ["std", "ring"] }
|
||||
|
||||
form_urlencoded = "1.2"
|
||||
http = "1.4"
|
||||
|
||||
@@ -33,12 +33,27 @@ kubectl apply -k ../k8s/crd
|
||||
helm install --create-namespace --namespace garage garage ./garage -f values.override.yaml
|
||||
```
|
||||
|
||||
After deploying, cluster layout must be configured manually as described in [Creating a cluster layout](@/documentation/quick-start/_index.md#creating-a-cluster-layout). Use the following command to access garage CLI:
|
||||
For multi-node deployments, cluster layout must be configured manually after deploying, as described in [Creating a cluster layout](@/documentation/quick-start/_index.md#creating-a-cluster-layout). Use the following command to access garage CLI:
|
||||
|
||||
```bash
|
||||
kubectl exec --stdin --tty -n garage garage-0 -- ./garage status
|
||||
```
|
||||
|
||||
## Single-node deployments
|
||||
|
||||
For a fresh single-node deployment, enable Garage's automatic single-node setup:
|
||||
|
||||
```yaml
|
||||
garage:
|
||||
singleNode: true
|
||||
```
|
||||
|
||||
With the chart-generated `garage.toml`, this starts Garage with `--single-node`, runs one StatefulSet replica, and sets `replication_factor = 1`.
|
||||
|
||||
If you use `garage.garageTomlString` or `garage.existingConfigMap`, the chart cannot update your configuration file. In that case, make sure your Garage configuration sets `replication_factor = 1`; otherwise Garage will refuse to start in single-node mode.
|
||||
|
||||
Garage refuses to run with `--single-node` if the cluster already has a multi-node layout, so this option is intended for new single-node deployments.
|
||||
|
||||
## Overriding default values
|
||||
|
||||
All possible configuration values can be found with:
|
||||
|
||||
@@ -96,14 +96,14 @@ to store 2 TB of data in total.
|
||||
## Get a Docker image
|
||||
|
||||
Our docker image is currently named `dxflrs/garage` and is stored on the [Docker Hub](https://hub.docker.com/r/dxflrs/garage/tags?page=1&ordering=last_updated).
|
||||
We encourage you to use a fixed tag (eg. `v2.4.0`) and not the `latest` tag.
|
||||
For this example, we will use the latest published version at the time of the writing which is `v2.4.0` but it's up to you
|
||||
We encourage you to use a fixed tag (eg. `v2.4.1`) and not the `latest` tag.
|
||||
For this example, we will use the latest published version at the time of the writing which is `v2.4.1` but it's up to you
|
||||
to check [the most recent versions on the Docker Hub](https://hub.docker.com/r/dxflrs/garage/tags?page=1&ordering=last_updated).
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
docker pull dxflrs/garage:v2.4.0
|
||||
docker pull dxflrs/garage:v2.4.1
|
||||
```
|
||||
|
||||
## Deploying and configuring Garage
|
||||
@@ -171,7 +171,7 @@ docker run \
|
||||
-v /etc/garage.toml:/etc/garage.toml \
|
||||
-v /var/lib/garage/meta:/var/lib/garage/meta \
|
||||
-v /var/lib/garage/data:/var/lib/garage/data \
|
||||
dxflrs/garage:v2.4.0
|
||||
dxflrs/garage:v2.4.1
|
||||
```
|
||||
|
||||
With this command line, Garage should be started automatically at each boot.
|
||||
@@ -185,7 +185,7 @@ If you want to use `docker-compose`, you may use the following `docker-compose.y
|
||||
version: "3"
|
||||
services:
|
||||
garage:
|
||||
image: dxflrs/garage:v2.4.0
|
||||
image: dxflrs/garage:v2.4.1
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
|
||||
@@ -157,7 +157,7 @@ docker run \
|
||||
-e GARAGE_DEFAULT_ACCESS_KEY \
|
||||
-e GARAGE_DEFAULT_SECRET_KEY \
|
||||
-e GARAGE_DEFAULT_BUCKET \
|
||||
dxflrs/garage:v2.4.0
|
||||
dxflrs/garage:v2.4.1
|
||||
/garage server --single-node --default-bucket
|
||||
```
|
||||
|
||||
@@ -337,7 +337,7 @@ When you first start a cluster without automatic configuration, the output of `g
|
||||
```
|
||||
==== HEALTHY NODES ====
|
||||
ID Hostname Address Tags Zone Capacity DataAvail Version
|
||||
563e1ac825ee3323 linuxbox 127.0.0.1:3901 NO ROLE ASSIGNED v2.4.0
|
||||
563e1ac825ee3323 linuxbox 127.0.0.1:3901 NO ROLE ASSIGNED v2.4.1
|
||||
```
|
||||
|
||||
Creating a cluster layout for a Garage deployment means informing Garage of the
|
||||
|
||||
@@ -47,6 +47,10 @@ bootstrap_peers = []
|
||||
$REPLICATION_MODE
|
||||
rpc_secret = "$NETWORK_SECRET"
|
||||
|
||||
[consul_discovery]
|
||||
service_name = "panic-catcher"
|
||||
consul_http_addr = "http://localhost:9876"
|
||||
|
||||
[s3_api]
|
||||
api_bind_addr = "0.0.0.0:$((3910+$count))" # the S3 API port, HTTP without TLS. Add a reverse proxy for the TLS part.
|
||||
s3_region = "garage" # set this to anything. S3 API calls will fail if they are not made against the region set here.
|
||||
|
||||
@@ -2,8 +2,8 @@ apiVersion: v2
|
||||
name: garage
|
||||
description: S3-compatible object store for small self-hosted geo-distributed deployments
|
||||
type: application
|
||||
version: 0.10.0
|
||||
appVersion: "v2.4.0"
|
||||
version: 0.10.2
|
||||
appVersion: "v2.4.1"
|
||||
home: https://garagehq.deuxfleurs.fr/
|
||||
icon: https://garagehq.deuxfleurs.fr/images/garage-logo.svg
|
||||
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
# garage
|
||||
|
||||
  
|
||||
  
|
||||
|
||||
S3-compatible object store for small self-hosted geo-distributed deployments
|
||||
|
||||
**Homepage:** <https://garagehq.deuxfleurs.fr/>
|
||||
|
||||
## Maintainers
|
||||
|
||||
| Name | Email | Url |
|
||||
| ---- | ------ | --- |
|
||||
| Garage maintainer team | <garagehq@deuxfleurs.fr> | |
|
||||
|
||||
## Source Code
|
||||
|
||||
* <https://git.deuxfleurs.fr/Deuxfleurs/garage.git>
|
||||
@@ -15,36 +21,42 @@ S3-compatible object store for small self-hosted geo-distributed deployments
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| affinity | object | `{}` | |
|
||||
| commonLabels | object | `{}` | Extra labels for all resources |
|
||||
| args | list | `[]` | Override the container arguments. |
|
||||
| command | list | `[]` | Override the container entrypoint. |
|
||||
| commonLabels | object | `{}` | Additional labels to add to all resources created by this chart |
|
||||
| deployment.kind | string | `"StatefulSet"` | Switchable to DaemonSet |
|
||||
| deployment.podManagementPolicy | string | `"OrderedReady"` | If using statefulset, allow Parallel or OrderedReady (default) |
|
||||
| deployment.replicaCount | int | `3` | Number of StatefulSet replicas/garage nodes to start |
|
||||
| environment | object | `{}` | |
|
||||
| extraVolumeMounts | object | `{}` | |
|
||||
| extraVolumes | object | `{}` | |
|
||||
| environment | object | `{}` | Extra container env vars, as a list of {name, value} objects (same shape as a Pod container's env) |
|
||||
| extraVolumeMounts | object | `{}` | Extra volume mounts, as a list of mount objects (same shape as a container's volumeMounts) |
|
||||
| extraVolumes | object | `{}` | Extra volumes, as a list of volume objects (same shape as a PodSpec's volumes) |
|
||||
| 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.additionalTopLevelConfig | string | `""` | Additional configuration to append to garage.toml. Use a multi-line string for custom config. Example: additionalTopLevelConfig: |- data_fsync = true |
|
||||
| garage.admin.apiBindAddr | string | `"[::]:3903"` | |
|
||||
| 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 |
|
||||
| garage.consistencyMode | string | `"consistent"` | By default, enable read-after-write consistency guarantees, see the consistency_mode section at https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#consistency_mode |
|
||||
| garage.dbEngine | string | `"lmdb"` | Can be changed for better performance on certain systems, use "sqlite" to prioritize durability 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.existingRpcSecret | string | `""` | If you want to provide an rpcSecret within an existing k8s secret, specify the secret name here, and store the value under the secret key `rpcSecret` the default secret will not be created |
|
||||
| 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 resources |
|
||||
| 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.metadataAutoSnapshotInterval | string | `""` | If this value is set, Garage will automatically take a snapshot of the metadata DB file at a regular interval and save it in the metadata directory. https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#metadata_auto_snapshot_interval |
|
||||
| garage.admin.apiBindAddr | string | `"[::]:3903"` | |
|
||||
| garage.rpcBindAddr | string | `"[::]:3901"` | |
|
||||
| garage.noClusterRole | bool | `false` | Set to true if you want to use roles instead of cluster roles |
|
||||
| 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.rpcBindAddr | string | `"[::]:3901"` | Port used for node-to-node RPC |
|
||||
| garage.rpcSecret | string | `""` | If not given, a random secret will be generated and stored in a Secret object |
|
||||
| garage.s3.api.bindAddr | string | `"[::]:3900"` | |
|
||||
| garage.s3.api.region | string | `"garage"` | |
|
||||
| garage.s3.api.rootDomain | string | `".s3.garage.tld"` | |
|
||||
| garage.s3.web.index | string | `"index.html"` | |
|
||||
| garage.s3.web.bindAddr | string | `"[::]:3902"` | |
|
||||
| garage.s3.web.index | string | `"index.html"` | |
|
||||
| garage.s3.web.rootDomain | string | `".web.garage.tld"` | |
|
||||
| garage.singleNode | bool | `false` | Start Garage with `--single-node`, run one StatefulSet replica, and render replication_factor = 1 in the generated garage.toml, if using garageTomlString or existingConfigMap, set replication_factor = 1 yourself. |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | |
|
||||
| image.repository | string | `"dxflrs/amd64_garage"` | default to amd64 docker image |
|
||||
| image.tag | string | `""` | set the image tag, please prefer using the chart version and not this to avoid compatibility issues |
|
||||
| image.tag | string | `""` | set the image tag, please prefer using the chart version and not this, to avoid compatibility issues |
|
||||
| imagePullSecrets | list | `[]` | set if you need credentials to pull your custom image |
|
||||
| ingress.s3.api.annotations | object | `{}` | Rely _either_ on the className or the annotation below but not both! If you want to use the className, set className: "nginx" and replace "nginx" by an Ingress controller name, examples [here](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers). |
|
||||
| ingress.s3.api.enabled | bool | `false` | |
|
||||
@@ -81,13 +93,16 @@ S3-compatible object store for small self-hosted geo-distributed deployments
|
||||
| persistence.meta.size | string | `"100Mi"` | |
|
||||
| podAnnotations | object | `{}` | additional pod annotations |
|
||||
| podSecurityContext.fsGroup | int | `1000` | |
|
||||
| podSecurityContext.fsGroupChangePolicy | string | `"OnRootMismatch"` | |
|
||||
| podSecurityContext.runAsGroup | int | `1000` | |
|
||||
| podSecurityContext.runAsNonRoot | bool | `true` | |
|
||||
| podSecurityContext.runAsUser | int | `1000` | |
|
||||
| priorityClassName | string | `""` | Optional priority class name to assign to the pods. See https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ |
|
||||
| readinessProbe | object | `{}` | Specifies a readinessProbe |
|
||||
| resources | object | `{}` | |
|
||||
| securityContext.capabilities | object | `{"drop":["ALL"]}` | The default security context is heavily restricted, feel free to tune it to your requirements |
|
||||
| securityContext.readOnlyRootFilesystem | bool | `true` | |
|
||||
| service.annotations | object | `{}` | Annotations to add to the service |
|
||||
| service.s3.api.port | int | `3900` | |
|
||||
| service.s3.web.port | int | `3902` | |
|
||||
| service.type | string | `"ClusterIP"` | You can rely on any service to expose your cluster - ClusterIP (+ Ingress) - NodePort (+ Ingress) - LoadBalancer |
|
||||
|
||||
@@ -15,7 +15,7 @@ data:
|
||||
|
||||
block_size = "{{ .Values.garage.blockSize }}"
|
||||
|
||||
replication_factor = {{ .Values.garage.replicationFactor }}
|
||||
replication_factor = {{ ternary 1 .Values.garage.replicationFactor .Values.garage.singleNode }}
|
||||
consistency_mode = "{{ .Values.garage.consistencyMode }}"
|
||||
|
||||
compression_level = {{ .Values.garage.compressionLevel }}
|
||||
|
||||
@@ -9,7 +9,7 @@ spec:
|
||||
matchLabels:
|
||||
{{- include "garage.selectorLabels" . | nindent 6 }}
|
||||
{{- if eq .Values.deployment.kind "StatefulSet" }}
|
||||
replicas: {{ .Values.deployment.replicaCount }}
|
||||
replicas: {{ ternary 1 .Values.deployment.replicaCount .Values.garage.singleNode }}
|
||||
serviceName: {{ include "garage.fullname" . }}-headless
|
||||
podManagementPolicy: {{ .Values.deployment.podManagementPolicy }}
|
||||
{{- end }}
|
||||
@@ -59,6 +59,13 @@ spec:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.garage.singleNode }}
|
||||
command:
|
||||
- /garage
|
||||
args:
|
||||
- server
|
||||
- --single-node
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: {{ include "garage.portFromBindAddr" .Values.garage.s3.api.bindAddr | int }}
|
||||
name: s3-api
|
||||
|
||||
@@ -128,6 +128,15 @@ tests:
|
||||
# namespace: NAMESPACE
|
||||
replication_factor = 7
|
||||
|
||||
- it: forces replication_factor to 1 when garage.singleNode is enabled
|
||||
set:
|
||||
garage.singleNode: true
|
||||
garage.replicationFactor: "5"
|
||||
asserts:
|
||||
- matchRegex:
|
||||
path: data["garage.toml"]
|
||||
pattern: 'replication_factor = 1'
|
||||
|
||||
- it: does not render a ConfigMap when an existing one is referenced
|
||||
set:
|
||||
garage.existingConfigMap: my-external-cm
|
||||
|
||||
@@ -167,6 +167,33 @@ tests:
|
||||
path: spec.template.spec.volumes[0].configMap.name
|
||||
value: my-external-cm
|
||||
|
||||
- it: runs a single replica with --single-node when garage.singleNode is enabled
|
||||
template: templates/workload.yaml
|
||||
set:
|
||||
garage.singleNode: true
|
||||
deployment.replicaCount: 3
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.replicas
|
||||
value: 1
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].command
|
||||
value:
|
||||
- /garage
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].args
|
||||
value:
|
||||
- server
|
||||
- --single-node
|
||||
|
||||
- it: does not set a custom command/args when garage.singleNode is disabled
|
||||
template: templates/workload.yaml
|
||||
asserts:
|
||||
- isNull:
|
||||
path: spec.template.spec.containers[0].command
|
||||
- isNull:
|
||||
path: spec.template.spec.containers[0].args
|
||||
|
||||
- it: uses a custom service account name without creating one when disabled
|
||||
template: templates/workload.yaml
|
||||
set:
|
||||
|
||||
@@ -7,14 +7,13 @@ commonLabels: {}
|
||||
# app.kubernetes.io/part-of: storage
|
||||
# team: platform
|
||||
|
||||
# Garage configuration. These values go to garage.toml
|
||||
# Garage configuration. These values configure Garage and render to garage.toml unless noted otherwise.
|
||||
garage:
|
||||
# -- Can be changed for better performance on certain systems
|
||||
# -- Can be changed for better performance on certain systems, use "sqlite" to prioritize durability
|
||||
# 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
|
||||
# -- Defaults is 1MB, an increase can result in better performance in certain scenarios
|
||||
# https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block_size
|
||||
blockSize: "1048576"
|
||||
|
||||
@@ -22,6 +21,10 @@ garage:
|
||||
# https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication_factor
|
||||
replicationFactor: "3"
|
||||
|
||||
# -- Start Garage with `--single-node`, run one StatefulSet replica, and render replication_factor = 1 in the generated garage.toml,
|
||||
# if using garageTomlString or existingConfigMap, set replication_factor = 1 yourself.
|
||||
singleNode: false
|
||||
|
||||
# -- 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"
|
||||
@@ -34,6 +37,7 @@ garage:
|
||||
# https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#metadata_auto_snapshot_interval
|
||||
metadataAutoSnapshotInterval: ""
|
||||
|
||||
# -- Port used for node-to-node RPC
|
||||
rpcBindAddr: "[::]:3901"
|
||||
# -- If not given, a random secret will be generated and stored in a Secret object
|
||||
rpcSecret: ""
|
||||
@@ -102,7 +106,7 @@ deployment:
|
||||
image:
|
||||
# -- default to amd64 docker image
|
||||
repository: dxflrs/amd64_garage
|
||||
# -- set the image tag, please prefer using the chart version and not this
|
||||
# -- set the image tag, please prefer using the chart version and not this,
|
||||
# to avoid compatibility issues
|
||||
tag: ""
|
||||
pullPolicy: IfNotPresent
|
||||
@@ -252,6 +256,12 @@ priorityClassName: ""
|
||||
# as a Pod container's env)
|
||||
environment: {}
|
||||
|
||||
# -- Override the container entrypoint.
|
||||
command: []
|
||||
|
||||
# -- Override the container arguments.
|
||||
args: []
|
||||
|
||||
# -- Extra volumes, as a list of volume objects (same shape as a PodSpec's volumes)
|
||||
extraVolumes: {}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_api_admin"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_api_common"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_api_k2v"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_api_s3"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_block"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_db"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
@@ -24,6 +24,7 @@ percent-encoding.workspace = true
|
||||
hyper = { workspace = true, default-features = false, features = ["http1", "http2"] }
|
||||
hyper-util.workspace = true
|
||||
hyper-rustls.workspace = true
|
||||
rustls.workspace = true
|
||||
serde = { workspace = true, default-features = false, features = ["derive", "std"] }
|
||||
serde_json.workspace = true
|
||||
thiserror.workspace = true
|
||||
|
||||
@@ -72,7 +72,7 @@ impl K2vClient {
|
||||
/// Create a new K2V client.
|
||||
pub fn new(config: K2vClientConfig) -> Result<Self, Error> {
|
||||
let connector = hyper_rustls::HttpsConnectorBuilder::new()
|
||||
.with_native_roots()?
|
||||
.with_provider_and_native_roots(rustls::crypto::ring::default_provider())?
|
||||
.https_or_http()
|
||||
.enable_http1()
|
||||
.enable_http2()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_model"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_net"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
+6
-2
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_rpc"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
@@ -41,6 +41,10 @@ kube = { workspace = true, optional = true }
|
||||
k8s-openapi = { workspace = true, optional = true }
|
||||
schemars = { workspace = true, optional = true }
|
||||
reqwest = { workspace = true, optional = true }
|
||||
hyper = { workspace = true, optional = true }
|
||||
hyper-rustls = { workspace = true, optional = true }
|
||||
hyper-util = { workspace = true, optional = true }
|
||||
rustls = { workspace = true, optional = true }
|
||||
|
||||
pnet_datalink.workspace = true
|
||||
|
||||
@@ -50,7 +54,7 @@ opentelemetry.workspace = true
|
||||
|
||||
[features]
|
||||
kubernetes-discovery = ["kube", "k8s-openapi", "schemars"]
|
||||
consul-discovery = ["reqwest", "thiserror"]
|
||||
consul-discovery = ["hyper", "hyper-rustls", "hyper-util", "reqwest", "rustls", "thiserror"]
|
||||
system-libs = ["sodiumoxide/use-pkg-config"]
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -80,6 +80,10 @@ pub struct ConsulDiscovery {
|
||||
|
||||
impl ConsulDiscovery {
|
||||
pub fn new(config: ConsulDiscoveryConfig) -> Result<Self, ConsulError> {
|
||||
if rustls::crypto::CryptoProvider::get_default().is_none() {
|
||||
_ = rustls::crypto::ring::default_provider().install_default();
|
||||
}
|
||||
|
||||
let mut builder: reqwest::ClientBuilder = reqwest::Client::builder().use_rustls_tls();
|
||||
if config.tls_skip_verify {
|
||||
builder = builder.danger_accept_invalid_certs(true);
|
||||
|
||||
+10
-3
@@ -29,8 +29,15 @@ pub struct Node {
|
||||
port: u16,
|
||||
}
|
||||
|
||||
pub async fn get_client() -> Result<Client, kube::Error> {
|
||||
if rustls::crypto::CryptoProvider::get_default().is_none() {
|
||||
_ = rustls::crypto::ring::default_provider().install_default();
|
||||
}
|
||||
Client::try_default().await
|
||||
}
|
||||
|
||||
pub async fn create_kubernetes_crd() -> Result<(), kube::Error> {
|
||||
let client = Client::try_default().await?;
|
||||
let client = get_client().await?;
|
||||
let crds: Api<CustomResourceDefinition> = Api::all(client.clone());
|
||||
|
||||
let params = PatchParams::apply(&format!("garage.{}", K8S_GROUP));
|
||||
@@ -45,7 +52,7 @@ pub async fn create_kubernetes_crd() -> Result<(), kube::Error> {
|
||||
pub async fn get_kubernetes_nodes(
|
||||
kubernetes_config: &KubernetesDiscoveryConfig,
|
||||
) -> Result<Vec<(NodeID, SocketAddr)>, kube::Error> {
|
||||
let client = Client::try_default().await?;
|
||||
let client = get_client().await?;
|
||||
let nodes: Api<GarageNode> = Api::namespaced(client.clone(), &kubernetes_config.namespace);
|
||||
|
||||
let lp = ListParams::default().labels(&format!(
|
||||
@@ -98,7 +105,7 @@ pub async fn publish_kubernetes_node(
|
||||
|
||||
debug!("Node object to be applied: {:#?}", node);
|
||||
|
||||
let client = Client::try_default().await?;
|
||||
let client = get_client().await?;
|
||||
let nodes: Api<GarageNode> = Api::namespaced(client.clone(), &kubernetes_config.namespace);
|
||||
|
||||
if let Ok(old_node) = nodes.get(&node_pubkey).await {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_table"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_util"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "garage_web"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
authors = ["Alex Auvolat <alex@adnab.me>", "Quentin Dufour <quentin@dufour.io>"]
|
||||
edition = "2018"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
Reference in New Issue
Block a user