brusnika-stage: deploy SpiceDB with persistent PostgreSQL
This commit is contained in:
parent
3ab786c0bd
commit
6b7d461034
@ -6,6 +6,7 @@ resources:
|
||||
- ../../../infrastructure/istio-gateway/brusnika-stage
|
||||
- ../../../infrastructure/istio-config/brusnika-stage
|
||||
- ../../../infrastructure/vault/brusnika-stage
|
||||
- ../../../infrastructure/spicedb/brusnika-stage
|
||||
- ../../../infrastructure/rabbitmq/brusnika-stage
|
||||
- ../../../infrastructure/zitadel/brusnika-stage
|
||||
- ../../../infrastructure/openobserve/brusnika-stage
|
||||
|
||||
6
infrastructure/spicedb/brusnika-stage/kustomization.yaml
Normal file
6
infrastructure/spicedb/brusnika-stage/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- postgresql.yaml
|
||||
- spicedb.yaml
|
||||
4
infrastructure/spicedb/brusnika-stage/namespace.yaml
Normal file
4
infrastructure/spicedb/brusnika-stage/namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: spicedb
|
||||
79
infrastructure/spicedb/brusnika-stage/postgresql.yaml
Normal file
79
infrastructure/spicedb/brusnika-stage/postgresql.yaml
Normal file
@ -0,0 +1,79 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: postgres-data
|
||||
namespace: spicedb
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-path
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: postgres
|
||||
namespace: spicedb
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: spicedb-postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: spicedb-postgres
|
||||
spec:
|
||||
tolerations:
|
||||
- key: dedicated
|
||||
operator: Equal
|
||||
value: processing-light
|
||||
effect: NoSchedule
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:17.5
|
||||
ports:
|
||||
- name: postgres
|
||||
containerPort: 5432
|
||||
env:
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/data/pgdata
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: postgres-secret
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -ec
|
||||
- pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB"
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-data
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: postgres
|
||||
namespace: spicedb
|
||||
spec:
|
||||
selector:
|
||||
app: spicedb-postgres
|
||||
ports:
|
||||
- name: postgres
|
||||
port: 5432
|
||||
targetPort: postgres
|
||||
60
infrastructure/spicedb/brusnika-stage/spicedb.yaml
Normal file
60
infrastructure/spicedb/brusnika-stage/spicedb.yaml
Normal file
@ -0,0 +1,60 @@
|
||||
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
|
||||
tolerations:
|
||||
- key: dedicated
|
||||
operator: Equal
|
||||
value: processing-light
|
||||
effect: NoSchedule
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
migration:
|
||||
hook:
|
||||
enabled: false
|
||||
postRenderers:
|
||||
- kustomize:
|
||||
patches:
|
||||
- target:
|
||||
kind: Job
|
||||
patch: "- op: add\n path: /spec/template/spec/tolerations\n value:\n \
|
||||
\ - key: dedicated\n operator: Equal\n value: processing-light\n\
|
||||
\ effect: NoSchedule\n"
|
||||
Loading…
Reference in New Issue
Block a user