87 lines
2.1 KiB
YAML
87 lines
2.1 KiB
YAML
apiVersion: v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
name: db-gateway
|
|
name: db-gateway
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
app: db-gateway
|
|
strategy:
|
|
type: Rolling
|
|
rollingParams:
|
|
updatePeriodSeconds: 1
|
|
intervalSeconds: 1
|
|
timeoutSeconds: 300
|
|
maxSurge: 1
|
|
maxUnavailable: 0
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: db-gateway
|
|
spec:
|
|
containers:
|
|
- name: db-gateway
|
|
image: REPOSITORY_IMAGE
|
|
env:
|
|
- name: KUBERNETES_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: CONTAINER_CORE_LIMIT
|
|
valueFrom:
|
|
resourceFieldRef:
|
|
resource: limits.cpu
|
|
- name: CONTAINER_MAX_MEMORY
|
|
valueFrom:
|
|
resourceFieldRef:
|
|
resource: limits.memory
|
|
|
|
- name: JDBC_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: jdbc
|
|
key: jdbc.url
|
|
- name: JDBC_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: jdbc
|
|
key: jdbc.username
|
|
- name: JDBC_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: jdbc
|
|
key: jdbc.password
|
|
- name: TZ
|
|
value: Europe/London
|
|
image: ${IMAGE}:${IMAGE_VERSION}
|
|
imagePullPolicy: Always
|
|
name: db-gateway
|
|
livenessProbe:
|
|
httpGet:
|
|
path: ${LIVENESS_PATH}
|
|
port: 9090
|
|
initialDelaySeconds: 90
|
|
periodSeconds: 30
|
|
timeoutSeconds: 1
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: ${READINESS_PATH}
|
|
port: 9090
|
|
initialDelaySeconds: 90
|
|
periodSeconds: 5
|
|
timeoutSeconds: 1
|
|
successThreshold: 1
|
|
failureThreshold: 10
|
|
resources:
|
|
requests:
|
|
cpu: 10m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 256Mi
|
|
restartPolicy: Always
|
|
triggers: [] |