add configs
This commit is contained in:
82
k8s/worker-cpp-deployment.yaml
Normal file
82
k8s/worker-cpp-deployment.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: liquidcode-tester-worker-cpp
|
||||
namespace: liquidcode-tester
|
||||
labels:
|
||||
app: worker-cpp
|
||||
language: cpp
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: worker-cpp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: worker-cpp
|
||||
language: cpp
|
||||
spec:
|
||||
containers:
|
||||
- name: worker-cpp
|
||||
image: liquidcode-tester-worker-cpp:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
env:
|
||||
- name: ASPNETCORE_ENVIRONMENT
|
||||
value: "Production"
|
||||
- name: Cpp__Compiler
|
||||
value: "g++"
|
||||
- name: Cpp__CompilerFlags
|
||||
value: "-O2 -std=c++17 -Wall"
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "200m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "1000m"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/test/health
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/test/health
|
||||
port: 8080
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
# Security context for isolation
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: false
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: liquidcode-tester-worker-cpp
|
||||
namespace: liquidcode-tester
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: worker-cpp
|
||||
ports:
|
||||
- port: 8080
|
||||
targetPort: 8080
|
||||
protocol: TCP
|
||||
name: http
|
||||
Reference in New Issue
Block a user