Skip to content

Instantly share code, notes, and snippets.

@cassioeskelsen
Last active April 12, 2022 03:02
Show Gist options
  • Save cassioeskelsen/f91dd3037440a2a988360c1cf92ceb5f to your computer and use it in GitHub Desktop.
Save cassioeskelsen/f91dd3037440a2a988360c1cf92ceb5f to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: #{deployment}#-pvc-data
namespace: #{namespace}#
spec:
storageClassName: default
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
volumeMode: Filesystem
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: #{deployment}#
namespace: #{namespace}#
labels:
app: #{deployment}#
annotations:
monitoring: "true"
spec:
replicas: 1
revisionHistoryLimit: 1
minReadySeconds: 10
progressDeadlineSeconds: 120
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app: #{deployment}#
template:
metadata:
labels:
app: #{deployment}#
spec:
containers:
- name: #{deployment}#
image: #{containerRegistry}#/#{imageRepository}#:#{image_version}#
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities: {}
privileged: false
readOnlyRootFilesystem: false
runAsNonRoot: false
stdin: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
tty: true
env:
- name: ENVIRONMENT
value: #{ambiente}#
- name: JAVA_OPTS
value: '-Dfile.encoding=UTF-8'
envFrom:
- secretRef:
name: my-secrets
resources:
limits:
cpu: 1
memory: 1Gi
requests:
cpu: 500m
memory: 512Mi
volumeMounts:
- name: config-volume
mountPath: /debezium/conf
- name: data-volume
mountPath: /debezium/data
volumes:
- name: config-volume
configMap:
name: debezium-server-config
- name: data-volume
persistentVolumeClaim:
claimName: #{deployment}#-pvc-data
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: #{imagePullSecret}#
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
fsGroup: 2000
terminationGracePeriodSeconds: 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment