Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store: make the liveness probe timeout configurable #286

Merged
merged 3 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel

- [#263](https://github.com/thanos-io/kube-thanos/pull/263) Add support for stateless Rulers.
- [#271](https://github.com/thanos-io/kube-thanos/pull/271) Add annotation support for ServiceAccount.
- [#286](https://github.com/thanos-io/kube-thanos/pull/286) Store: make the liveness probe timeout configurable.

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ spec:
port: 10902
scheme: HTTP
periodSeconds: 30
timeoutSeconds: 1
name: thanos-store
ports:
- containerPort: 10901
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ spec:
port: 10902
scheme: HTTP
periodSeconds: 30
timeoutSeconds: 1
name: thanos-store
ports:
- containerPort: 10901
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ spec:
port: 10902
scheme: HTTP
periodSeconds: 30
timeoutSeconds: 1
name: thanos-store
ports:
- containerPort: 10901
Expand Down
1 change: 1 addition & 0 deletions examples/all/manifests/thanos-store-statefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ spec:
port: 10902
scheme: HTTP
periodSeconds: 30
timeoutSeconds: 1
name: thanos-store
ports:
- containerPort: 10901
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
grpc: 10901,
http: 10902,
},
livenessProbe: {
timeoutSeconds: 1,
failureThreshold: 8,
periodSeconds: 30,
},
tracing: {},
minTime: '',
maxTime: '',
Expand Down
15 changes: 10 additions & 5 deletions jsonnet/kube-thanos/kube-thanos-store.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,16 @@ function(params) {
{ name: 'tls-secret', mountPath: ts.config.objectStorageConfig.tlsSecretMountPath },
] else []
),
livenessProbe: { failureThreshold: 8, periodSeconds: 30, httpGet: {
scheme: 'HTTP',
port: ts.config.ports.http,
path: '/-/healthy',
} },
livenessProbe: {
failureThreshold: ts.config.livenessProbe.failureThreshold,
periodSeconds: ts.config.livenessProbe.periodSeconds,
timeoutSeconds: ts.config.livenessProbe.timeoutSeconds,
httpGet: {
scheme: 'HTTP',
port: ts.config.ports.http,
path: '/-/healthy',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Umm, maybe we can just make the whole livenessProbe configurable and use ts.config. livenessProbe? In case we want to expose other fields in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was torn between making only exactly what I need configurable vs making the whole thing configurable. As a poorly configured liveness probe can cause substantial problems I refrained from making it completely configurable.

I could make the failureThreshold and periodSeconds configurable in addition to the timeoutSeconds. What do you think, @yeya24?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel it is fine to expose the field completely. Since we leave the defaults here so users can take their own risk to change to what they need.
But exposing failureThreshold, periodSeconds and timeoutSeconds is also a way to go. Let's expose these fields for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done it in 449e423. 👍

},
readinessProbe: { failureThreshold: 20, periodSeconds: 5, httpGet: {
scheme: 'HTTP',
port: ts.config.ports.http,
Expand Down
1 change: 1 addition & 0 deletions manifests/thanos-store-statefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ spec:
port: 10902
scheme: HTTP
periodSeconds: 30
timeoutSeconds: 1
name: thanos-store
ports:
- containerPort: 10901
Expand Down