Skip to content

Commit

Permalink
Add toleration to all DaemonSets (#23)
Browse files Browse the repository at this point in the history
* Add toleration to all DaemonSets

By default, add a blanket toleration to the filebeat and metricbeat
DaemonSets, with the opertion to remove the toleration and accept
all taints (for backward compatibility).

* Update filebeat/values.yaml

Co-authored-by: Miri <[email protected]>

* Update metricbeat/README.md

Co-authored-by: Miri <[email protected]>

* Update filebeat/README.md

Co-authored-by: Miri <[email protected]>

* Update metricbeat/values.yaml

Co-authored-by: Miri <[email protected]>

* Update docs

* Bumped charts versions, added changelog

Co-authored-by: Miri <[email protected]>
Co-authored-by: mirii1994 <[email protected]>
  • Loading branch information
3 people authored Dec 6, 2020
1 parent 7b38c5f commit 32d507d
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion filebeat/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
name: logzio-k8s-logs
description: A Helm chart for shipping k8s logs to logz.io via Filebeat.
version: 0.0.1
version: 0.0.2
appVersion: 7.8.1
3 changes: 3 additions & 0 deletions filebeat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ Give your logs some time to get from your system to ours, and then open [Logz.io
| `daemonset.fieldsUnderRoot` | If this option is set to true, the custom fields are stored as top-level fields in the output document instead of being grouped under a `fields` sub-dictionary. | `"true"` |
| `daemonset.securityContext` | Configurable [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for Filebeat DaemonSet pod execution environment. | See [values.yaml](https://github.com/logzio/logzio-helm/blob/master/filebeat/values.yaml) |
| `daemonset.resources` | Allows you to set the resources for Filebeat Daemonset. | See [values.yaml](https://github.com/logzio/logzio-helm/blob/master/filebeat/values.yaml) |
| `daemonset.tolerations` | Set [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for all DaemonSet pods. | `{}` |
| `daemonset.volumes` | Templatable string of additional `volumes` to be passed to the DaemonSet. | See [values.yaml](https://github.com/logzio/logzio-helm/blob/master/filebeat/values.yaml) |
| `daemonset.volumeMounts` | Templatable string of additional `volumeMounts` to be passed to the DaemonSet. | See [values.yaml](https://github.com/logzio/logzio-helm/blob/master/filebeat/values.yaml) |
| `secrets.logzioShippingToken`| Secret with your [logzio shipping token](https://app.logz.io/#/dashboard/settings/general). | `""` |
Expand All @@ -172,5 +173,7 @@ helm uninstall --namespace=kube-system logzio-k8s-logs


## Change log
- **0.0.2**:
- Added option to set tolerations for daemonset (Thanks [jlewis42lines](https://github.com/jlewis42lines)!).
- **0.0.1**:
- Initial release.
4 changes: 4 additions & 0 deletions filebeat/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ spec:
readOnly: {{ .readOnly }}
subPath: {{ .subPath }}
{{- end }}
{{- if .Values.daemonset.tolerations }}
tolerations:
{{ toYaml .Values.daemonset.tolerations | indent 6 }}
{{- end }}
volumes:
- name: varlibdockercontainers
hostPath:
Expand Down
3 changes: 2 additions & 1 deletion filebeat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ daemonset:
requests:
cpu: 100m
memory: 100Mi
tolerations: {}
volumes:
- name: cert
configMap:
Expand All @@ -165,4 +166,4 @@ daemonset:
secrets:
logzioShippingToken: ""
logzioRegion: " "
clusterName: ""
clusterName: ""
2 changes: 1 addition & 1 deletion metricbeat/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
name: logzio-k8s-metrics
description: A Helm chart for shipping k8s metrics to logzio.io
version: 0.0.5
version: 0.0.6
appVersion: 7.9.1
5 changes: 4 additions & 1 deletion metricbeat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ Give your metrics some time to get from your system to ours, and then open [Logz
| `daemonset.resources` | Allows you to set the resources for Metricbeat Deployment. | See [values.yaml](https://github.com/logzio/logzio-helm/blob/master/metricbeat/values.yaml). |
| `daemonset.secretMounts` | Allows you to easily mount a secret as a file inside the DaemonSet. Useful for mounting certificates and other secrets. | See [values.yaml](https://github.com/logzio/logzio-helm/blob/master/metricbeat/values.yaml). |
| `daemonset.sslVerificationMode` | Set the ssl verification mode for Metricbeat | `"none"` |
| `daemonset.tolerations` | Set [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for all DaemonSet pods. | `{}` |
| `deployment.leanConfig` | When set to `true`, sets the Deployment's Metricbeat modules to the minimal configuration required to populate Logz.io's dashboards. | See [values.yaml](https://github.com/logzio/logzio-helm/blob/master/metricbeat/values.yaml). |
| `deployment.extraVolumeMounts` | Templatable string of additional volumeMounts to be passed to the Deployment. | See [values.yaml](https://github.com/logzio/logzio-helm/blob/master/metricbeat/values.yaml). |
| `deployment.extraVolumes` | Templatable string of additional `volumes` to be passed to the Deployment. | See [values.yaml](https://github.com/logzio/logzio-helm/blob/master/metricbeat/values.yaml). |
Expand Down Expand Up @@ -233,8 +234,10 @@ helm uninstall --namespace=kube-system logzio-k8s-metrics
## Change log
- **0.0.6**:
- Added option to set tolerations for daemonset (Thanks [jlewis42lines](https://github.com/jlewis42lines)!).
- **0.0.5**:
- Mangage Logz.io metrics related secrets in helm
- Mangage Logz.io metrics related secrets in helm.
- **0.0.4**:
- Support lean configuration for modules in Deployment and Daemonset to match build-in dashboards in Logz.io.
- Support custom configuration for modules in Deployment and Daemonset.
Expand Down
4 changes: 4 additions & 0 deletions metricbeat/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ spec:
{{- if .Values.extraVolumeMounts | default .Values.daemonset.extraVolumeMounts }}
{{ toYaml ( .Values.extraVolumeMounts | default .Values.daemonset.extraVolumeMounts ) | indent 8 }}
{{- end }}
{{- if .Values.daemonset.tolerations }}
tolerations:
{{ toYaml .Values.daemonset.tolerations | indent 6 }}
{{- end }}
volumes:
{{- range .Values.secretMounts | default .Values.daemonset.secretMounts }}
- name: {{ .name }}
Expand Down
1 change: 1 addition & 0 deletions metricbeat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ daemonset:
requests:
cpu: 100m
memory: 100Mi
tolerations: {}
secretMounts:
- name: cert
secretName: logzio-cert
Expand Down

0 comments on commit 32d507d

Please sign in to comment.