mirror of
https://github.com/Direct-Dev-Ru/go-lcg.git
synced 2025-11-16 01:29:55 +00:00
Исправления в ветке main
This commit is contained in:
95
deploy/3.deployment.tmpl.yaml
Normal file
95
deploy/3.deployment.tmpl.yaml
Normal file
@@ -0,0 +1,95 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: lcg
|
||||
namespace: lcg
|
||||
labels:
|
||||
app: lcg
|
||||
version: ${VERSION}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: lcg
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: lcg
|
||||
version: ${VERSION}
|
||||
spec:
|
||||
containers:
|
||||
- name: lcg
|
||||
image: ${REPOSITORY}:${VERSION}
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: lcg-config
|
||||
- secretRef:
|
||||
name: lcg-secrets
|
||||
env:
|
||||
# Pod information
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- name: lcg-data
|
||||
mountPath: /app/data
|
||||
- name: lcg-config
|
||||
mountPath: /app/config
|
||||
readOnly: true
|
||||
# Health checks
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /login
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
failureThreshold: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /login
|
||||
port: 8080
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /login
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 60
|
||||
volumes:
|
||||
- name: lcg-data
|
||||
persistentVolumeClaim:
|
||||
claimName: lcg-data
|
||||
- name: lcg-config
|
||||
configMap:
|
||||
name: lcg-config
|
||||
# Security context
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1001
|
||||
readOnlyRootFilesystem: false
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
restartPolicy: Always
|
||||
Reference in New Issue
Block a user