Skip to content

Commit 03d96c4

Browse files
authored
Allow RollingUpdate params to be configured (splunk#770)
1 parent 78e58f3 commit 03d96c4

File tree

5 files changed

+82
-10
lines changed

5 files changed

+82
-10
lines changed

helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-logging/templates/daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ metadata:
1414
spec:
1515
updateStrategy:
1616
type: RollingUpdate
17+
{{- if .Values.rollingUpdate }}
18+
rollingUpdate:
19+
{{ toYaml .Values.rollingUpdate | indent 6 }}
20+
{{- end }}
1721
selector:
1822
matchLabels:
1923
app: {{ template "splunk-kubernetes-logging.name" . }}

helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-logging/values.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ splunk:
7878
# NOTE: The content of the certificate itself should be used here, not the file path.
7979
# The certificate will be stored as a secret in kubernetes.
8080
# Make sure you are providing the certificate as multiline string (use `|-`)
81-
# Example:
81+
# Example:
8282
# caFile: |-
8383
# -----BEGIN CERTIFICATE-----
8484
# ...
@@ -93,7 +93,7 @@ splunk:
9393
# The file will be stored as a secret in kubernetes.
9494
caFile:
9595
# Indicates if 4xx errors should consume chunk. If set to true, plugin will not retry sending chunk to splunk when 4xx error occurs. (Default: true)
96-
consume_chunk_on_4xx_errors:
96+
consume_chunk_on_4xx_errors:
9797
# Configurations for Ingest API
9898
ingest_api:
9999
# serviceClientIdentifier is a string, the client identifier is used to make requests to the ingest API with authorization.
@@ -468,6 +468,22 @@ customFilters: {}
468468
# WARNING: The fields being used here must be available inside the fluentd record.
469469
indexFields: []
470470

471+
# Configure DaemonSet .spec.updateStrategy.rollingUpdate params if you want to speed up
472+
# rolling out a new version. By default only one pod after another is replaced when
473+
# upgrading.
474+
#
475+
# Example: replace 5 pods in parallel
476+
#
477+
# ```
478+
# rollingUpdate:
479+
# maxUnavailable: 5
480+
# ```
481+
#
482+
# See https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/
483+
# or `kubectl explain daemonset.spec.updateStrategy.rollingUpdate` for
484+
# documentation of available keys.
485+
rollingUpdate:
486+
471487
# Global configurations
472488
# These configurations will be used if the corresponding local configurations are not set.
473489
# For example, if `global.logLevel` is set and `logLevel` is not set, `global.logLevel` will be used; if `logLevel` is set, it will be used regardless `global.logLevel` is set or not.

helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/templates/daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ metadata:
1515
spec:
1616
updateStrategy:
1717
type: RollingUpdate
18+
{{- if .Values.rollingUpdate }}
19+
rollingUpdate:
20+
{{ toYaml .Values.rollingUpdate | indent 6 }}
21+
{{- end }}
1822
selector:
1923
matchLabels:
2024
name: {{ template "splunk-kubernetes-metrics.fullname" . }}

helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/values.yaml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ splunk:
6363
# NOTE: The content of the certificate itself should be used here, not the file path.
6464
# The certificate will be stored as a secret in kubernetes.
6565
# Make sure you are providing the certificate as multiline string (use `|-`)
66-
# Example:
66+
# Example:
6767
# caFile: |-
6868
# -----BEGIN CERTIFICATE-----
6969
# ...
@@ -78,7 +78,7 @@ splunk:
7878
# The file will be stored as a secret in kubernetes.
7979
caFile:
8080
# Indicates if 4xx errors should consume chunk. If set to true, plugin will not retry sending chunk to splunk when 4xx error occurs. (Default: true)
81-
consume_chunk_on_4xx_errors:
81+
consume_chunk_on_4xx_errors:
8282

8383
# Create or use existing secret if name is empty default name is used
8484
secret:
@@ -122,10 +122,10 @@ environmentVar:
122122
environmentVarAgg:
123123

124124
# Pod annotations for metrics daemonset
125-
podAnnotations:
125+
podAnnotations:
126126

127127
# Pod annotations for metrics aggregator pod
128-
podAnnotationsAgg:
128+
podAnnotationsAgg:
129129

130130
# Extra labels for metrics daemonset, pods
131131
extraLabels:
@@ -192,10 +192,10 @@ tolerations:
192192
aggregatorTolerations: {}
193193

194194
# Defines priorityClassName to assign a priority class to metrics (daemonset) pods.
195-
priorityClassName:
195+
priorityClassName:
196196

197197
# Defines priorityClassName to assign a priority class to metrics aggregetor (deployment) pods.
198-
priorityClassNameAgg:
198+
priorityClassNameAgg:
199199

200200
# Defines node affinity to restrict pod deployment.
201201
affinity: {}
@@ -215,7 +215,7 @@ kubernetes:
215215
insecureSSL: false
216216
# Path to the CA file.
217217
# Make sure you are providing the certificate as multiline string (use `|-`)
218-
# Example:
218+
# Example:
219219
# caFile: |-
220220
# -----BEGIN CERTIFICATE-----
221221
# ...
@@ -295,9 +295,25 @@ customFilters: {}
295295
# body: |
296296
# <record>
297297
# cluster_name "my_awesome_cluster"
298-
# </record>
298+
# </record>
299299
customFiltersAggr: {}
300300

301+
# Configure DaemonSet .spec.updateStrategy.rollingUpdate params if you want to speed up
302+
# rolling out a new version. By default only one pod after another is replaced when
303+
# upgrading.
304+
#
305+
# Example: replace 5 pods in parallel
306+
#
307+
# ```
308+
# rollingUpdate:
309+
# maxUnavailable: 5
310+
# ```
311+
#
312+
# See https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/
313+
# or `kubectl explain daemonset.spec.updateStrategy.rollingUpdate` for
314+
# documentation of available keys.
315+
rollingUpdate:
316+
301317
# Global configurations
302318
# These configurations will be used if the corresponding local configurations are not set.
303319
# For example, if `global.logLevel` is set and `logLevel` is not set, `global.logLevel` will be used; if `logLevel` is set, it will be used regardless `global.logLevel` is set or not.

helm-chart/splunk-connect-for-kubernetes/values.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,22 @@ splunk-kubernetes-logging:
547547
# WARNING: The fields being used here must be available inside the fluentd record.
548548
indexFields: []
549549

550+
# Configure DaemonSet .spec.updateStrategy.rollingUpdate params if you want to speed up
551+
# rolling out a new version. By default only one pod after another is replaced when
552+
# upgrading.
553+
#
554+
# Example: replace 5 pods in parallel
555+
#
556+
# ```
557+
# rollingUpdate:
558+
# maxUnavailable: 5
559+
# ```
560+
#
561+
# See https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/
562+
# or `kubectl explain daemonset.spec.updateStrategy.rollingUpdate` for
563+
# documentation of available keys.
564+
rollingUpdate:
565+
550566
## Enabling splunk-kubernetes-objects will install the `splunk-kubernetes-objects` chart to a kubernetes
551567
## cluster to collect kubernetes objects in the cluster to a Splunk indexer/indexer cluster.
552568
splunk-kubernetes-objects:
@@ -1164,3 +1180,19 @@ splunk-kubernetes-metrics:
11641180
# cluster_name "my_awesome_cluster"
11651181
# </record>
11661182
customFiltersAggr: {}
1183+
1184+
# Configure DaemonSet .spec.updateStrategy.rollingUpdate params if you want to speed up
1185+
# rolling out a new version. By default only one pod after another is replaced when
1186+
# upgrading.
1187+
#
1188+
# Example: replace 5 pods in parallel
1189+
#
1190+
# ```
1191+
# rollingUpdate:
1192+
# maxUnavailable: 5
1193+
# ```
1194+
#
1195+
# See https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/
1196+
# or `kubectl explain daemonset.spec.updateStrategy.rollingUpdate` for
1197+
# documentation of available keys.
1198+
rollingUpdate:

0 commit comments

Comments
 (0)