Skip to content

Instantly share code, notes, and snippets.

@ozaydinb
Created July 3, 2021 05:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozaydinb/6ba0ebb6e1aeb1e03db3960e5ff1c889 to your computer and use it in GitHub Desktop.
Save ozaydinb/6ba0ebb6e1aeb1e03db3960e5ff1c889 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${CI_PROJECT_NAME}-deployment
namespace: ${NAMESPACE}
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: ${CI_PROJECT_NAME}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
template:
metadata:
labels:
app: ${CI_PROJECT_NAME}
version: "${VERSION}"
cluster: ${K8S_CLUSTER}
spec:
terminationGracePeriodSeconds: 30
containers:
- name: ${CI_PROJECT_NAME}
image: ${DOCKER_IMAGE_RELEASE}
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: ${CI_PROJECT_NAME}-config
ports:
- name: http
containerPort: 8080
readinessProbe:
successThreshold: 1
failureThreshold: 3
httpGet:
path: /_monitoring/health
port: http
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 5
timeoutSeconds: 20
livenessProbe:
successThreshold: 1
failureThreshold: 3
httpGet:
path: /healtcheck
port: http
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 5
timeoutSeconds: 20
resources:
limits:
cpu: "500m"
memory: "1Gi"
requests:
cpu: "50m"
memory: "250Mi"
imagePullSecrets:
- name: ${GITLAB_REGISTRY_SECRET_NAME}
restartPolicy: Always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment