Buildbuddy deployment manifests

This commit is contained in:
Mustafa Gezen 2022-10-30 04:26:46 +01:00
parent 4ec7ae004a
commit ce3a4c0373
Signed by untrusted user who does not match committer: mustafa
GPG Key ID: DCDF010D946438C1
6 changed files with 126 additions and 0 deletions

View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: buildbuddy
namespace: default
data:
config.yaml: |
app:
build_buddy_url: "https://bz.build.resf.org"
default_to_dense_mode: true
database:
data_source: "sqlite3:///data/buildbuddy.db"
storage:
aws_s3:
region: us-east-2
bucket: resf-prod-buildbuddy-bz

View File

@ -0,0 +1,14 @@
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: buildbuddy
namespace: default
labels:
app: buildbuddy
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi

View File

@ -0,0 +1,7 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: buildbuddy
namespace: default
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::893168113496:role/resf-buildbuddy-peridot

View File

@ -0,0 +1,45 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: buildbuddy-app
namespace: default
spec:
replicas: 1
serviceName: buildbuddy-app
selector:
matchLabels:
app: buildbuddy-app
template:
metadata:
labels:
app: buildbuddy-app
spec:
serviceAccountName: buildbuddy
containers:
- name: buildbuddy-app
image: gcr.io/flame-public/buildbuddy-app-onprem:v2.12.1
env:
- name: ENV
value: "onprem"
- name: SERVICE_NAME
value: "app-backend"
- name: VERSION
value: "prod-1.0"
ports:
- name: http
containerPort: 8080
- name: grpc
containerPort: 1985
volumeMounts:
- mountPath: /data
name: database
- mountPath: "/config.yaml"
name: config
subPath: "config.yaml"
volumes:
- name: config
configMap:
name: buildbuddy
- name: database
persistentVolumeClaim:
claimName: buildbuddy

View File

@ -0,0 +1,21 @@
apiVersion: v1
kind: Service
metadata:
name: buildbuddy
namespace: default
spec:
selector:
app: buildbuddy-app
ports:
- port: 8080
---
apiVersion: v1
kind: Service
metadata:
name: buildbuddy-grpc
namespace: default
spec:
selector:
app: buildbuddy-app
ports:
- port: 1985

View File

@ -0,0 +1,23 @@
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: buildbuddy
namespace: default
annotations:
external-dns.alpha.kubernetes.io/target: ingress.build.resf.org
spec:
gateways:
- istio-system/base-gateway-public
hosts:
- bz.build.resf.org
http:
- name: buildbuddy
match:
- uri:
prefix: "/invocation"
route:
- destination:
host: buildbuddy.default.svc.cluster.local
port:
number: 8080