2020-02-22 01:19:02 +00:00

87 lines
2.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
name: LABEL
name: RESOURCE_NAME
namespace: default
spec:
replicas: 0
selector:
matchLabels:
app: RESOURCE_NAME
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: RESOURCE_NAME
spec:
containers:
- image: REPOSITORY/IMAGE
name: RESOURCE_NAME
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
ports:
- containerPort: 9090
name: RESOURCE_NAME
# livenessProbe:
# httpGet:
# path: /actuator/health
# port: 9090
# scheme: HTTP
# initialDelaySeconds: 30
# periodSeconds: 30
# timeoutSeconds: 1
# successThreshold: 1
# failureThreshold: 3
# readinessProbe:
# httpGet:
# port: 9090
# path: /actuator/health
# scheme: HTTP
# initialDelaySeconds: 30
# periodSeconds: 5
# timeoutSeconds: 1
# successThreshold: 1
# failureThreshold: 10
imagePullPolicy: Always
resources:
requests:
cpu: 0.25
memory: 128Mi
limits:
cpu: 0.5
memory: 256Mi
restartPolicy: Always
imagePullSecrets:
- name: registry-secret