Skip to content

Instantly share code, notes, and snippets.

@jesseshieh
Last active June 17, 2018 19:25
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 jesseshieh/f4c95651f6f2adb500f7c28e8d0e84c6 to your computer and use it in GitHub Desktop.
Save jesseshieh/f4c95651f6f2adb500f7c28e8d0e84c6 to your computer and use it in GitHub Desktop.
Gigalixir Kubernetes Deployment Spec
apiVersion: v1
kind: Namespace
metadata:
name: bewitched-occasional-harpyeagle
---
apiVersion: v1
kind: Service
metadata:
labels:
repo: bewitched-occasional-harpyeagle
name: bewitched-occasional-harpyeagle
namespace: bewitched-occasional-harpyeagle
spec:
ports:
- name: http
port: 80
targetPort: 4000
selector:
repo: bewitched-occasional-harpyeagle
sessionAffinity: None
type: LoadBalancer
---
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
repo: bewitched-occasional-harpyeagle
name: bewitched-occasional-harpyeagle
namespace: bewitched-occasional-harpyeagle
spec:
replicas: 1
selector:
matchLabels:
repo: bewitched-occasional-harpyeagle
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
labels:
repo: bewitched-occasional-harpyeagle
namespace: bewitched-occasional-harpyeagle
spec:
containers:
- command:
- /usr/bin/dumb-init
- --
- gigalixir_run
- init
- bewitched-occasional-harpyeagle
- foreground
env:
- name: PORT
value: "4000"
- name: GET_HOSTS_FROM
value: dns
- name: APP_KEY
value: REDACTED
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: MY_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: SECRET_KEY_BASE
value: REDACTED
- name: ERLANG_COOKIE
value: REDACTED
- name: LOGPLEX_TOKEN
value: REDACTED
- name: HOME
value: /app
image: us.gcr.io/gigalixir-152404/run
imagePullPolicy: Always
lifecycle:
preStop:
exec:
command:
- sleep
- "35"
name: bewitched-occasional-harpyeagle
ports:
- containerPort: 22
protocol: TCP
- containerPort: 80
protocol: TCP
readinessProbe:
failureThreshold: 3
periodSeconds: 3
successThreshold: 1
tcpSocket:
port: 4000
timeoutSeconds: 1
resources:
limits:
cpu: "8"
memory: 2Gi
requests:
cpu: 400m
memory: 2Gi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment