Skip to content

Instantly share code, notes, and snippets.

View martincalvert's full-sized avatar

Martin martincalvert

View GitHub Profile
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ .Values.ruby.app.name }}-api
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
annotations:
"helm/created": {{ .Release.Time.Seconds | quote }}
spec:
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.ruby.app.name }}-origin
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ .Values.ruby.app.name }}
tier: {{ .Values.ruby.app.name }}-api
spec:
ports:
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 2
maxUnavailable: 0
spec:
revisionHistoryLimit: 2
spec:
template:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: myCustomKey
operator: In
spec:
template:
spec:
containers:
- resources:
requests:
memory: 500m
cpu: 500m
limits:
memory: 1200m
spec:
template:
spec:
containers:
- lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo Hello"]
preStop:
exec:
spec:
template:
spec:
containers:
- volumeMounts:
- mountPath: /cache
name: cache-volume
volumes:
- name: cache-volume
emptyDir: {}
spec:
selector:
myKey: myValue
spec:
hostAliases:
- ip: "127.0.0.1"
hostnames:
- "foo.local"
- "bar.local"