db-gateway/configuration/templates/deploy-config.yaml

119 lines
3.2 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: registry.cryptosky.me:4243/
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: []
parameters:
- name: RESOURCE_NAME
displayName: Resource Name
description: The name of the deployment configuration resource that also matches other resources.
required: true
- name: APP_LABEL
displayName: Application Label
description: Name of the application label that should be used in all resources.
required: true
- name: IMAGE
displayName: Image Reference
description: Complete reference to an image in external Docker Registry.
required: true
- name: IMAGE_VERSION
displayName: Image Version
description: Version of specific image to pull from external Docker registry.
required: true
- name: LIVENESS_PATH
displayName: Liveness Probe Path
description: Path to use in HTTP Get for the liveness probe.
value: /health
required: false
- name: READINESS_PATH
displayName: Readiness Probe Path
description: Path to use in HTTP Get for the readiness probe.
value: /info
required: false
- name: SPRING_PROFILES_ACTIVE
displayName: Spring Profiles Active
description: The active Spring profile(s)
required: false