Skip to content

Commit

Permalink
Merge pull request #42 from cluangmanee/chatchai/feat/bazel-remote-ds
Browse files Browse the repository at this point in the history
feat(bazel-remote): support DaemonSet and updateStrategy
  • Loading branch information
slamdev committed Jun 11, 2023
2 parents 1659070 + 71d9625 commit 4db6ba1
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/bazel-remote/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: bazel-remote
description: |-
Helm chart to deploy [bazel-remote](https://github.com/buchgr/bazel-remote).
type: application
version: 0.0.4
appVersion: v2.3.8
version: 0.0.5
appVersion: v2.4.1
home: https://github.com/slamdev/helm-charts/tree/master/charts/bazel-remote
icon: https://bazel.build/images/bazel-icon.svg
maintainers:
Expand Down
3 changes: 2 additions & 1 deletion charts/bazel-remote/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Helm chart to deploy [bazel-remote](https://github.com/buchgr/bazel-remote).
| image.repository | string | `"buchgr/bazel-remote-cache"` | image repository |
| image.tag | string | `""` | image tag (chart's appVersion value will be used if not set) |
| imagePullSecrets | list | `[]` | image pull secret for private images |
| kind | string | `"Deployment"` | resource type to operate bazel-remote, can be StatefulSet or Deployment |
| kind | string | `"Deployment"` | resource type to operate bazel-remote, can be StatefulSet, Deployment or DaemonSet |
| livenessProbe.httpGet.path | string | `"/status"` | path for liveness probe |
| livenessProbe.httpGet.port | string | `"http"` | port for liveness probe |
| nameOverride | string | `""` | override name of the chart |
Expand All @@ -48,6 +48,7 @@ Helm chart to deploy [bazel-remote](https://github.com/buchgr/bazel-remote).
| startupProbe.httpGet.path | string | `"/status"` | |
| startupProbe.httpGet.port | string | `"http"` | |
| tolerations | list | `[]` | tolerations for scheduler pod assignment |
| updateStrategy | object | `{}` | configure automated rolling updates for pods |
| volumeClaimTemplates | list | `[]` | volume claim templates; used only when 'kind: StatefulSet' |
| volumeMounts | list | `[]` | additional volume mounts |
| volumes | list | `[]` | additional volumes |
23 changes: 23 additions & 0 deletions charts/bazel-remote/templates/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if eq .Values.kind "DaemonSet" }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "bazel-remote.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- with .Values.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "bazel-remote.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "bazel-remote.selectorLabels" . | nindent 6 }}
template:
{{- include "bazel-remote.pod" . | nindent 4 }}
{{- with .Values.updateStrategy }}
updateStrategy:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/bazel-remote/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ spec:
{{- include "bazel-remote.selectorLabels" . | nindent 6 }}
template:
{{- include "bazel-remote.pod" . | nindent 4 }}
{{- with .Values.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/bazel-remote/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ spec:
volumeClaimTemplates:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.updateStrategy }}
updateStrategy:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
9 changes: 8 additions & 1 deletion charts/bazel-remote/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# kind -- resource type to operate bazel-remote, can be StatefulSet or Deployment
# kind -- resource type to operate bazel-remote, can be StatefulSet, Deployment or DaemonSet
kind: Deployment

# replicaCount -- number of replicas for bazel-remote deployment.
Expand Down Expand Up @@ -143,3 +143,10 @@ conf: |-
access_log_level: none
port: 8080
grpc_port: 9092
# updateStrategy -- configure automated rolling updates for pods
updateStrategy: {}
# rollingUpdate:
# maxSurge: 0
# maxUnavailable: 25%
# type: RollingUpdate

0 comments on commit 4db6ba1

Please sign in to comment.