Skip to content

Instantly share code, notes, and snippets.

View martincalvert's full-sized avatar

Martin martincalvert

View GitHub Profile
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 2
maxUnavailable: 0
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:
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: 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:
replicas: {{ .Values.ruby.app.replicas }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.app.name }}-nginx-config
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: matterhorn-{{ .Values.app.name }}
tier: nginx
data:
nginx.conf: |-
@martincalvert
martincalvert / requirements.yml
Created November 9, 2017 16:44
K8s: Requirements
dependencies:
- name: shared-helm-templates
version: 1.0.0
#repository: https://github.com/raw/martincalvert/helms/master
repository: file://../shared-helm-templates
@martincalvert
martincalvert / affinity_notation.yml
Created November 9, 2017 16:41
K8s: Random Templates
{{ define "affinity_notation" }}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .Values.nodeAffinity.key }}
operator: In
values:
- {{ .Values.nodeAffinity.value }}
@martincalvert
martincalvert / values.yml
Created November 9, 2017 16:36
K8s: Template Values File Example
environment: integration
nodeAffinity:
key: cloud.google.com/gke-nodepool
value: default
rubyApi:
name: guest
replicas: 1
livenessProbe:
type: livenessProbe
path: /health.json
@martincalvert
martincalvert / deployment_template.yml
Created November 9, 2017 16:33
K8s: Deployment Template
{{ define "ruby_api_deployment" }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ .Values.rubyApi.name }}-api
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
annotations:
"helm/created": {{ .Release.Time.Seconds | quote }}
spec:
{{ define "affinity_notation" }}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .Values.nodeAffinity.key }}
operator: In
values:
- {{ .Values.nodeAffinity.value }}