Skip to content

Commit

Permalink
Add a more complete example kubernetes config
Browse files Browse the repository at this point in the history
Thanks to @bu3 for providing this.

Relates to buchgr#652.
  • Loading branch information
mostynb committed Mar 21, 2023
1 parent 4855aff commit 0960a34
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,9 @@ the maximum size in Gibibytes.

### Kubernetes notes

* See [examples/kubernetes.yml](examples/kubernetes.yml) for an example
configuration.

* Don't name your deployment `bazel-remote`!

Kubernetes sets some environment variables based on this name, which conflict
Expand Down
49 changes: 49 additions & 0 deletions examples/kubernetes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This configuration has been reported as working with k8s >= 1.24

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: bazel-remote-cache
image: buchgr/bazel-remote-cache:latest
ports:
- containerPort: 7442
name: http
protocol: TCP
- containerPort: 8080
name: http-default
protocol: TCP
livenessProbe:
grpc:
service: /grpc.health.v1.Health/Check
port: 9092
failureThreshold: 3
initialDelaySeconds: 3
periodSeconds: 1
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
grpc:
service: /grpc.health.v1.Health/Check
port: 9092
failureThreshold: 3
periodSeconds: 3
successThreshold: 1
timeoutSeconds: 10
env:
# Set bazel-remote configuration value here...
BAZEL_REMOTE_DIR: /data
BAZEL_REMOTE_MAX_SIZE: 1000

0 comments on commit 0960a34

Please sign in to comment.