Skip to content

0.4.1

Choose a tag to compare

@solidDoWant solidDoWant released this 30 Oct 19:26
· 81 commits to master since this release
074bd95

vault-sync is a self-hosted replacement for Obsidian Sync: an Obsidian plugin and a sync server backed by PostgreSQL and S3. This is a maintenance release after 0.4.0. It reworks the Helm chart, which is a breaking change for anyone who deploys with the chart, so read the first section before you upgrade. It also adds device renaming, metrics that cover the whole deployment, Grafana dashboards and Prometheus alerting rules, a tidier settings tab, and dependency updates. Sync behaviour, the protocol and the stored data are unchanged. Install the server from the image ghcr.io/soliddowant/vault-sync:0.4.1 or the Helm chart oci://ghcr.io/soliddowant/charts/vault-sync (version 0.4.1), and the plugin with BRAT from this repository's GitHub releases. A 0.4.0 deployment can be upgraded replica by replica. Upgrade the server before the plugin.

BREAKING (Helm chart)

The Helm chart was reworked so that it renders only what the server needs to run correctly and sets no policy you can't cleanly replace. Before you upgrade a chart release, render the new chart with your values (helm template or helm diff upgrade) and compare the result with what runs now: several defaults changed, and values the new schema doesn't know now fail the install. (#1378, #1390)

  • Every resource is renamed. Resources are now named after the release, never with the chart name twice: a release obsidian-vault-sync gets the Deployment, Service, ServiceAccount, ServiceMonitor and HTTPRoute obsidian-vault-sync and the CronJob obsidian-vault-sync-export (previously <release>-vault-sync-main and so on). Upgrading therefore replaces the Deployment and the Service: expect the server's pods to be recreated, and point anything that names the old Service (an Ingress, a scrape config, a NetworkPolicy) at the new name. The identifiers under resources (main, export) are unchanged, so overrides keep working.
  • One Service. The separate metrics Service is merged into the main Service, which now has ports http (8080, primary), metrics (9090) and service-metrics (9091). A plain resources.ingress or route now resolves its backend to port http without naming a Service. Only port http may be routed to from outside the cluster.
  • No PodDisruptionBudget and no default container resources (and no topology spread constraint). The chart no longer creates a PodDisruptionBudget or sets CPU and memory requests and limits. If you relied on them, set them under resources.controllers.<main|export>; docs/deployment.md has examples and the previous values as a starting point.
  • The export job is off by default (config.export.enabled: false). Set it to true to keep your plaintext disaster-recovery copy; we recommend it.
  • The ServiceMonitor is off by default and opt-in (config.server.metrics.serviceMonitor.enabled: false), so installs no longer fail on clusters without the prometheus-operator CRDs. Turn it on to keep scraping; it now selects the main Service.
  • A strict values schema. A values.schema.json checks config: unknown keys, wrong types and malformed durations now fail the install instead of being silently ignored. Optional settings default to null instead of "" and take typed values: integers for sizes and counts (maxRequestBytes: 1048576, not "1048576"), booleans for switches (forcePathStyle: false), and Go duration strings (30s) for durations.
  • HTTPRoute support: config.route (enabled, hostnames, parentRefs, annotations, labels) renders a Gateway API HTTPRoute to port http with timeouts suited to the API: 15 minutes for requests (an upload commit may take up to 10 minutes) and none for the /v1/realtime WebSocket.

Devices and sign-in

  • Rename a device after it is registered: while you are signed in, changing Device name in the plugin's settings renames this device on the server about a second after you stop typing. The device list shows the new name, and the device keeps its id and its history. If the rename fails, a notice says so and the setting goes back to the last name the server accepted. Rename devices only once every server replica runs 0.4.1: older replicas answer the rename with an error. (#1380, #1389)
  • The settings tab is laid out in setup order: Sync status first, then Server, Account, and, while signed in, End-to-end encryption, Remote vault, Sharing and Devices. Settings you rarely need (the OIDC issuer URL and client ID, and an owner's Rotate key and Re-encrypt history for an encrypted vault) move to a collapsed Advanced group at the bottom, which remembers whether you left it open. Every control works as before. (#1396)

Server and deployment

  • Service-wide metrics on their own port. The server serves metrics about the whole deployment (counts of devices, users with devices, vaults, memberships, documents and stored blobs, upload, garbage-collection and end-to-end-encryption backlogs, and when retention and the export last succeeded) on a third port, VAULT_SYNC_SERVICE_METRICS_LISTEN_ADDRESS (default :9091), named vault_sync_service_* and with no per-user, per-vault or per-device label. Each replica refreshes them from PostgreSQL in the background every VAULT_SYNC_SERVICE_METRICS_INTERVAL (default 1m), so a scrape never queries the database. Don't expose this port to the internet. The new migration 0028 only adds the two tables that record the last retention and export runs. (#1387, #1391, #1392)
  • ServiceMonitor endpoint for the service-wide metrics: with config.server.metrics.serviceMonitor.enabled and config.server.metrics.serviceWide.enabled, the chart's ServiceMonitor also scrapes port service-metrics. (#1390)
  • Per-replica dependency metrics: PostgreSQL connection pool use and wait times, S3 requests and their latency by operation and outcome, the age of the OIDC signing keys and failed refreshes of them, and blob bytes uploaded and downloaded, on the existing metrics port. (#1388)
  • Grafana dashboards ship with the chart: Overview, Server and Dependencies. The chart renders them as grafana-operator GrafanaDashboards (config.grafana.dashboards.enabled) or as ConfigMaps for the Grafana chart's dashboard sidecar (config.grafana.dashboards.configMaps.enabled); both are off by default. (#1394)
  • Alerting rules: the chart can render a prometheus-operator PrometheusRule (config.alerts.prometheusRule.enabled, off by default) covering availability (server errors, slow syncs, the realtime listener, limit rejections, optional kube-state-metrics replica alerts), dependencies (PostgreSQL pool, S3 errors, OIDC key refresh) and data safety (retention, export, upload and garbage-collection backlogs, re-key and escrow re-wrap progress, stale service-wide metrics). Each alert can be turned off or have its for, severity and threshold overridden under config.alerts.rules, and links to its runbook in docs/alerts.md. The service-wide alerts need the service-wide metrics to be scraped. (#1395)

Dependency updates

  • Updated the AWS SDK for Go (S3), ConnectRPC for the plugin, the pinned Nix packages (Go toolchain and tools), and the plugin's npm dependencies. The bech32 encoding of age keys now comes from btcd's address/v2 instead of the retired btcutil package; key formats are unchanged and the shared crypto test vectors pass. (#1381)

Internal work: CI actions moved to new major versions and pinned by digest, test database images updated, and the agent scheduler routes dependency-update PRs (#1381, #1393).

Known issues

  • None known: no bug is open, and no item of this release was deferred.