From a12566f5a8086f1eb6eb2cc2d9111964ddaae8c5 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 27 Nov 2026 16:58:17 +0500 Subject: [PATCH] wb: deploy SpiceDB with external PostgreSQL datastore --- clusters/wb/infrastructure/kustomization.yaml | 1 + infrastructure/spicedb/wb/kustomization.yaml | 5 ++ infrastructure/spicedb/wb/namespace.yaml | 6 +++ infrastructure/spicedb/wb/spicedb.yaml | 51 +++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 infrastructure/spicedb/wb/kustomization.yaml create mode 100644 infrastructure/spicedb/wb/namespace.yaml create mode 100644 infrastructure/spicedb/wb/spicedb.yaml diff --git a/clusters/wb/infrastructure/kustomization.yaml b/clusters/wb/infrastructure/kustomization.yaml index 7138fdf..18fd9cd 100644 --- a/clusters/wb/infrastructure/kustomization.yaml +++ b/clusters/wb/infrastructure/kustomization.yaml @@ -1,6 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: + - ../../../infrastructure/spicedb/wb - ../../../infrastructure/istio-config - ../../../infrastructure/vault - ../../../infrastructure/openobserve diff --git a/infrastructure/spicedb/wb/kustomization.yaml b/infrastructure/spicedb/wb/kustomization.yaml new file mode 100644 index 0000000..bea562c --- /dev/null +++ b/infrastructure/spicedb/wb/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - namespace.yaml + - spicedb.yaml diff --git a/infrastructure/spicedb/wb/namespace.yaml b/infrastructure/spicedb/wb/namespace.yaml new file mode 100644 index 0000000..7a7af0f --- /dev/null +++ b/infrastructure/spicedb/wb/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: spicedb + labels: + istio-injection: disabled diff --git a/infrastructure/spicedb/wb/spicedb.yaml b/infrastructure/spicedb/wb/spicedb.yaml new file mode 100644 index 0000000..f1f5fc1 --- /dev/null +++ b/infrastructure/spicedb/wb/spicedb.yaml @@ -0,0 +1,51 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: spicedb + namespace: spicedb +spec: + interval: 5m + timeout: 10m + chart: + spec: + chart: spicedb + version: 0.1.4-prod + sourceRef: + kind: HelmRepository + name: yc-oci-charts + namespace: flux-system + interval: 10m + install: + remediation: + retries: 3 + upgrade: + remediation: + retries: 0 + remediateLastFailure: false + values: + replicas: 1 + image: + repository: cr.yandex/crp3ccidau046kdj8g9q/spicedb-prod + tag: v1.54.0 + imagePullSecrets: + - name: regcred + datastore: + mode: external + database: spicedb + username: spicedb + auth: + existingSecret: spicedb-secret + istio: + enabled: false + deploymentName: spicedb + resources: + requests: + cpu: 100m + memory: 256Mi + migration: + hook: + enabled: true + resources: + requests: + cpu: 100m + memory: 128Mi