ci: add gitea deploy workflow and k3s manifests with cert-manager tls
Some checks failed
Deploy Noval to K3s / deploy (push) Failing after 1s
Some checks failed
Deploy Noval to K3s / deploy (push) Failing after 1s
This commit is contained in:
65
k8s/deployment.yaml
Normal file
65
k8s/deployment.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: noval
|
||||
namespace: noval-roog-code
|
||||
labels:
|
||||
app: noval
|
||||
spec:
|
||||
replicas: 2
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 1
|
||||
maxUnavailable: 0
|
||||
selector:
|
||||
matchLabels:
|
||||
app: noval
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: noval
|
||||
spec:
|
||||
containers:
|
||||
- name: noval
|
||||
image: noval-app:latest
|
||||
imagePullPolicy: Never
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
env:
|
||||
- name: TZ
|
||||
value: Asia/Shanghai
|
||||
- name: NOVAL_DATA_DIR
|
||||
value: /app/data
|
||||
volumeMounts:
|
||||
- name: noval-data
|
||||
mountPath: /app/data
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
memory: "128Mi"
|
||||
limits:
|
||||
cpu: "500m"
|
||||
memory: "512Mi"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/health
|
||||
port: http
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/health
|
||||
port: http
|
||||
initialDelaySeconds: 8
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
volumes:
|
||||
- name: noval-data
|
||||
persistentVolumeClaim:
|
||||
claimName: noval-data-pvc
|
||||
terminationGracePeriodSeconds: 30
|
||||
Reference in New Issue
Block a user