Skip to content

Instantly share code, notes, and snippets.

@lsjostro
Created May 9, 2017 08:21
Show Gist options
  • Save lsjostro/536f016f2f89fae0a1010b1d740b74f2 to your computer and use it in GitHub Desktop.
Save lsjostro/536f016f2f89fae0a1010b1d740b74f2 to your computer and use it in GitHub Desktop.
oklog kubernetes
---
kind: Service
apiVersion: v1
metadata:
name: oklog
labels:
app: oklog
spec:
ports:
- name: api
port: 3000
protocol: TCP
- name: ingest-fast
port: 3001
protocol: TCP
- name: ingest-durable
port: 3002
protocol: TCP
- name: ingest-bulk
port: 3003
protocol: TCP
- name: ingest-cluster
port: 3009
protocol: TCP
clusterIP: None
selector:
app: oklog
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: oklog
labels:
app: oklog
spec:
serviceName: oklog
replicas: 4
selector:
matchLabels:
app: oklog
template:
metadata:
name: oklog
labels:
app: oklog
annotations:
prometheus.io/port: '3000'
prometheus.io/scrape: 'true'
spec:
containers:
- name: oklog
image: oklog/oklog:v0.2.1
resources:
requests:
memory: 128Mi
cpu: 125m
limits:
memory: 512Mi
cpu: 500m
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
args:
- ingeststore
- -debug
- -api=tcp://0.0.0.0:3000
- -ingest.fast=tcp://0.0.0.0:3001
- -ingest.durable=tcp://0.0.0.0:3002
- -ingest.bulk=tcp://0.0.0.0:3003
- -store.segment-target-size=1000000
- -store.segment-replication-factor=2
- -store.segment-retain=30m
- -store.segment-purge=5m
- -cluster=tcp://$(POD_IP):3009
- -peer=oklog-0.oklog.$(POD_NAMESPACE):3009
- -peer=oklog-1.oklog.$(POD_NAMESPACE):3009
- -peer=oklog-2.oklog.$(POD_NAMESPACE):3009
- -peer=oklog-3.oklog.$(POD_NAMESPACE):3009
volumeMounts:
- name: oklog-data
mountPath: /data
ports:
- name: api
containerPort: 3000
- name: ingest-fast
containerPort: 3001
- name: ingest-durable
containerPort: 3002
- name: ingest-bulk
containerPort: 3003
- name: ingest-cluster
containerPort: 3009
volumeClaimTemplates:
- metadata:
name: oklog-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 20Gi
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: oklog
spec:
rules:
- host: logs.example.com
http:
paths:
- path: /
backend:
serviceName: oklog
servicePort: api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment