Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions infra/k8s/account-lien-go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: account-lien-go
labels:
app: account-lien-go
tier: platform
spec:
replicas: 2
selector:
matchLabels:
app: account-lien-go
template:
metadata:
labels:
app: account-lien-go
spec:
initContainers:
- name: wait-for-postgres
image: busybox:1.36
command: ["sh", "-c", "until nc -z postgres 5432; do sleep 2; done"]
- name: wait-for-kafka
image: busybox:1.36
command: ["sh", "-c", "until nc -z kafka 9092; do sleep 2; done"]
containers:
- name: account-lien-go
image: 54bank/account-lien-go:latest
ports:
- containerPort: 9046
env:
- name: PORT
value: "9046"
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: db-credentials
key: url
- name: KAFKA_BROKERS
value: "kafka:9092"
- name: REDIS_URL
value: "redis://redis:6379"
livenessProbe:
httpGet:
path: /healthz
port: 9046
initialDelaySeconds: 10
periodSeconds: 15
readinessProbe:
httpGet:
path: /healthz
port: 9046
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: account-lien-go
spec:
selector:
app: account-lien-go
ports:
- port: 9046
targetPort: 9046
type: ClusterIP
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: account-lien-go-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: account-lien-go
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: account-lien-go-pdb
spec:
minAvailable: 1
selector:
matchLabels:
app: account-lien-go
101 changes: 101 additions & 0 deletions infra/k8s/behavioral-biometrics-py.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: behavioral-biometrics-py
labels:
app: behavioral-biometrics-py
tier: platform
spec:
replicas: 2
selector:
matchLabels:
app: behavioral-biometrics-py
template:
metadata:
labels:
app: behavioral-biometrics-py
spec:
initContainers:
- name: wait-for-postgres
image: busybox:1.36
command: ["sh", "-c", "until nc -z postgres 5432; do sleep 2; done"]
- name: wait-for-kafka
image: busybox:1.36
command: ["sh", "-c", "until nc -z kafka 9092; do sleep 2; done"]
containers:
- name: behavioral-biometrics-py
image: 54bank/behavioral-biometrics-py:latest
ports:
- containerPort: 9047
env:
- name: PORT
value: "9047"
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: db-credentials
key: url
- name: KAFKA_BROKERS
value: "kafka:9092"
- name: REDIS_URL
value: "redis://redis:6379"
livenessProbe:
httpGet:
path: /healthz
port: 9047
initialDelaySeconds: 10
periodSeconds: 15
readinessProbe:
httpGet:
path: /healthz
port: 9047
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: behavioral-biometrics-py
spec:
selector:
app: behavioral-biometrics-py
ports:
- port: 9047
targetPort: 9047
type: ClusterIP
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: behavioral-biometrics-py-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: behavioral-biometrics-py
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: behavioral-biometrics-py-pdb
spec:
minAvailable: 1
selector:
matchLabels:
app: behavioral-biometrics-py
101 changes: 101 additions & 0 deletions infra/k8s/biometric-vault-rs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: biometric-vault-rs
labels:
app: biometric-vault-rs
tier: platform
spec:
replicas: 2
selector:
matchLabels:
app: biometric-vault-rs
template:
metadata:
labels:
app: biometric-vault-rs
spec:
initContainers:
- name: wait-for-postgres
image: busybox:1.36
command: ["sh", "-c", "until nc -z postgres 5432; do sleep 2; done"]
- name: wait-for-kafka
image: busybox:1.36
command: ["sh", "-c", "until nc -z kafka 9092; do sleep 2; done"]
containers:
- name: biometric-vault-rs
image: 54bank/biometric-vault-rs:latest
ports:
- containerPort: 9032
env:
- name: PORT
value: "9032"
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: db-credentials
key: url
- name: KAFKA_BROKERS
value: "kafka:9092"
- name: REDIS_URL
value: "redis://redis:6379"
livenessProbe:
httpGet:
path: /healthz
port: 9032
initialDelaySeconds: 10
periodSeconds: 15
readinessProbe:
httpGet:
path: /healthz
port: 9032
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: biometric-vault-rs
spec:
selector:
app: biometric-vault-rs
ports:
- port: 9032
targetPort: 9032
type: ClusterIP
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: biometric-vault-rs-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: biometric-vault-rs
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: biometric-vault-rs-pdb
spec:
minAvailable: 1
selector:
matchLabels:
app: biometric-vault-rs
Loading