-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make memdb txn read only and defer abort (#10)
- Loading branch information
1 parent
95a3c4d
commit 2d4a149
Showing
4 changed files
with
97 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Assumes kind installed locally | ||
kind delete cluster --name coffee-service-debug | ||
|
||
make build_linux | ||
|
||
docker build -t coffee-service:debug . | ||
|
||
kind create cluster --name coffee-service-debug | ||
|
||
kind load docker-image coffee-service:debug --name coffee-service-debug | ||
|
||
kubectl apply -f ./deployments/debug/coffee-service.yaml | ||
|
||
kubectl get pods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: coffee-service | ||
spec: | ||
selector: | ||
app: coffee-service | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 9090 | ||
targetPort: 9090 | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: coffee-service | ||
automountServiceAccountToken: true | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: coffee-service | ||
labels: | ||
app: coffee-service | ||
version: v3 | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: coffee-service | ||
template: | ||
metadata: | ||
labels: | ||
app: coffee-service | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
prometheus.io/port: "9102" | ||
consul.hashicorp.com/connect-inject: "true" | ||
consul.hashicorp.com/service-meta-version: "v1" | ||
consul.hashicorp.com/service-tags: "api" | ||
spec: | ||
serviceAccountName: coffee-service | ||
containers: | ||
- name: coffee-service | ||
image: coffee-service:debug | ||
ports: | ||
- containerPort: 9090 | ||
- containerPort: 9102 | ||
env: | ||
- name: "LOG_FORMAT" | ||
value: "text" | ||
- name: "LOG_LEVEL" | ||
value: "DEBUG" | ||
- name: "BIND_ADDRESS" | ||
value: "localhost:9090" | ||
- name: "METRICS_ADDRESS" | ||
value: "localhost:9102" | ||
- name: "VERSION" | ||
value: "v3" | ||
livenessProbe: | ||
httpGet: | ||
path: /health | ||
port: 9090 | ||
initialDelaySeconds: 15 | ||
timeoutSeconds: 1 | ||
periodSeconds: 10 | ||
failureThreshold: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters