Skip to content

Instantly share code, notes, and snippets.

@martincalvert
Last active October 25, 2017 15:47
Show Gist options
  • Save martincalvert/a2a531eba2068e9100749ce23d8cee00 to your computer and use it in GitHub Desktop.
Save martincalvert/a2a531eba2068e9100749ce23d8cee00 to your computer and use it in GitHub Desktop.
K8s: Deployments
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
spec:
replicas: {{ .Values.api.replicas }}
template:
metadata:
labels:
layer: backend
annotations:
createdAt: {{ .Release.Time.Seconds | quote }}
spec:
containers:
- name: api
image: {{ .Values.api.image.name }}
imagePullPolicy: {{ .Values.api.image.pullPolicy }}
command:
- bundle
- exec
- unicorn
- "-c"
- /etc/api/unicorn.rb
ports:
- containerPort: 8080
readinessProbe
httpGet:
path: /health.json
port: 8080
initialDelaySeconds: 30
periodSeconds: 2
timeoutSeconds: 1
livenessProbe
httpGet:
path: /health.json
port: 8080
initialDelaySeconds: 60
periodSeconds: 15
timeoutSeconds: 2
volumeMounts:
- mountPath: /etc/matterhorn/unicorn.rb
subPath: unicorn.rb
name: unicorn-configmap
readOnly: true
volumes:
- name: unicorn-configmap
configMap:
name: unicorn-rb-configmap
api:
image:
name: gcr.io/api:latest
pullPolicy: always
replicas: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment