Skip to content

Commit 4db6ba1

Browse files
authored
Merge pull request #42 from cluangmanee/chatchai/feat/bazel-remote-ds
feat(bazel-remote): support DaemonSet and updateStrategy
2 parents 1659070 + 71d9625 commit 4db6ba1

File tree

6 files changed

+43
-4
lines changed

6 files changed

+43
-4
lines changed

charts/bazel-remote/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: bazel-remote
33
description: |-
44
Helm chart to deploy [bazel-remote](https://github.com/buchgr/bazel-remote).
55
type: application
6-
version: 0.0.4
7-
appVersion: v2.3.8
6+
version: 0.0.5
7+
appVersion: v2.4.1
88
home: https://github.com/slamdev/helm-charts/tree/master/charts/bazel-remote
99
icon: https://bazel.build/images/bazel-icon.svg
1010
maintainers:

charts/bazel-remote/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Helm chart to deploy [bazel-remote](https://github.com/buchgr/bazel-remote).
2626
| image.repository | string | `"buchgr/bazel-remote-cache"` | image repository |
2727
| image.tag | string | `""` | image tag (chart's appVersion value will be used if not set) |
2828
| imagePullSecrets | list | `[]` | image pull secret for private images |
29-
| kind | string | `"Deployment"` | resource type to operate bazel-remote, can be StatefulSet or Deployment |
29+
| kind | string | `"Deployment"` | resource type to operate bazel-remote, can be StatefulSet, Deployment or DaemonSet |
3030
| livenessProbe.httpGet.path | string | `"/status"` | path for liveness probe |
3131
| livenessProbe.httpGet.port | string | `"http"` | port for liveness probe |
3232
| nameOverride | string | `""` | override name of the chart |
@@ -48,6 +48,7 @@ Helm chart to deploy [bazel-remote](https://github.com/buchgr/bazel-remote).
4848
| startupProbe.httpGet.path | string | `"/status"` | |
4949
| startupProbe.httpGet.port | string | `"http"` | |
5050
| tolerations | list | `[]` | tolerations for scheduler pod assignment |
51+
| updateStrategy | object | `{}` | configure automated rolling updates for pods |
5152
| volumeClaimTemplates | list | `[]` | volume claim templates; used only when 'kind: StatefulSet' |
5253
| volumeMounts | list | `[]` | additional volume mounts |
5354
| volumes | list | `[]` | additional volumes |
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{{- if eq .Values.kind "DaemonSet" }}
2+
apiVersion: apps/v1
3+
kind: DaemonSet
4+
metadata:
5+
name: {{ include "bazel-remote.fullname" . }}
6+
namespace: {{ .Release.Namespace }}
7+
{{- with .Values.deploymentAnnotations }}
8+
annotations:
9+
{{- toYaml . | nindent 4 }}
10+
{{- end }}
11+
labels:
12+
{{- include "bazel-remote.labels" . | nindent 4 }}
13+
spec:
14+
selector:
15+
matchLabels:
16+
{{- include "bazel-remote.selectorLabels" . | nindent 6 }}
17+
template:
18+
{{- include "bazel-remote.pod" . | nindent 4 }}
19+
{{- with .Values.updateStrategy }}
20+
updateStrategy:
21+
{{- toYaml . | nindent 4 }}
22+
{{- end }}
23+
{{- end }}

charts/bazel-remote/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ spec:
1717
{{- include "bazel-remote.selectorLabels" . | nindent 6 }}
1818
template:
1919
{{- include "bazel-remote.pod" . | nindent 4 }}
20+
{{- with .Values.updateStrategy }}
21+
strategy:
22+
{{- toYaml . | nindent 4 }}
23+
{{- end }}
2024
{{- end }}

charts/bazel-remote/templates/statefulset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ spec:
2222
volumeClaimTemplates:
2323
{{- toYaml . | nindent 4 }}
2424
{{- end }}
25+
{{- with .Values.updateStrategy }}
26+
updateStrategy:
27+
{{- toYaml . | nindent 4 }}
28+
{{- end }}
2529
{{- end }}

charts/bazel-remote/values.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# kind -- resource type to operate bazel-remote, can be StatefulSet or Deployment
1+
# kind -- resource type to operate bazel-remote, can be StatefulSet, Deployment or DaemonSet
22
kind: Deployment
33

44
# replicaCount -- number of replicas for bazel-remote deployment.
@@ -143,3 +143,10 @@ conf: |-
143143
access_log_level: none
144144
port: 8080
145145
grpc_port: 9092
146+
147+
# updateStrategy -- configure automated rolling updates for pods
148+
updateStrategy: {}
149+
# rollingUpdate:
150+
# maxSurge: 0
151+
# maxUnavailable: 25%
152+
# type: RollingUpdate

0 commit comments

Comments
 (0)