mirror of https://github.com/codevalet/codevalet
92 lines
2.1 KiB
YAML
92 lines
2.1 KiB
YAML
---
|
|
apiVersion: 'v1'
|
|
kind: 'List'
|
|
items:
|
|
- apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: 'canary'
|
|
namespace: 'canary'
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
targetPort: 9292
|
|
protocol: TCP
|
|
selector:
|
|
app: 'canary'
|
|
|
|
- apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: 'canary'
|
|
namespace: 'canary'
|
|
labels:
|
|
name: 'canary'
|
|
spec:
|
|
replicas: 3
|
|
strategy:
|
|
type: RollingUpdate
|
|
selector:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: 'canary'
|
|
annotations:
|
|
spec:
|
|
containers:
|
|
- name: 'canary'
|
|
image: 'rtyler/codevalet-canary:latest'
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 9292
|
|
name: http
|
|
resources:
|
|
requests:
|
|
memory: 64M
|
|
limits:
|
|
memory: 256M
|
|
env:
|
|
- name: RACK_ENV
|
|
value: 'production'
|
|
- name: PRODUCTION
|
|
value: 'true'
|
|
- name: SENTRY_DSN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: canary
|
|
key: sentry
|
|
- name: SENTRY_API_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: canary
|
|
key: sentryapi
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 9292
|
|
initialDelaySeconds: 60
|
|
timeoutSeconds: 10
|
|
|
|
- apiVersion: extensions/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: 'http-ingress'
|
|
namespace: 'canary'
|
|
annotations:
|
|
kubernetes.io/tls-acme: "true"
|
|
kubernetes.io/ingress.class: "nginx"
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- canary.codevalet.io
|
|
secretName: ingress-tls
|
|
rules:
|
|
- host: canary.codevalet.io
|
|
http:
|
|
paths:
|
|
- path: /
|
|
backend:
|
|
serviceName: canary
|
|
servicePort: 80
|
|
# vim: ft=yaml
|