Skip to content

Commit

Permalink
fix(vector): add minReadySeconds to StatefulSet and Deployment specs (#…
Browse files Browse the repository at this point in the history
…367)

* fix(vector): add minReadySeconds to StatefulSet and Deployment specs

* fix: minReadySeconds not supported by statefulsets prior to kube v1.22

* feat: use GitVersion instead of Version

* fix: update semvercompare comparison to ">=1.22-0"

---------

Co-authored-by: Davis Alexander L <[email protected]>
  • Loading branch information
alexanderldavis and Davis Alexander L authored Feb 15, 2024
1 parent ef5481d commit b9e67eb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/vector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ helm install --name <RELEASE_NAME> \
| lifecycle | object | `{}` | Set lifecycle hooks for Vector containers. |
| livenessProbe | object | `{}` | Override default liveness probe settings. If customConfig is used, requires customConfig.api.enabled to be set to true. |
| logLevel | string | `"info"` | |
| minReadySeconds | int | `0` | Specify the minimum number of seconds a newly spun up DaemonSet pod should wait to pass healthchecks before it is considered available. |
| minReadySeconds | int | `0` | Specify the minimum number of seconds a newly spun up pod should wait to pass healthchecks before it is considered available. |
| nameOverride | string | `""` | Override the name of resources. |
| nodeSelector | object | `{}` | Configure a [nodeSelector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) for Vector Pods. |
| persistence.accessModes | list | `["ReadWriteOnce"]` | Specifies the accessModes for PersistentVolumeClaims. Valid for the "Aggregator" role. |
Expand Down
1 change: 1 addition & 0 deletions charts/vector/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
selector:
matchLabels:
{{- include "vector.selectorLabels" . | nindent 6 }}
minReadySeconds: {{ .Values.minReadySeconds }}
{{- with .Values.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/vector/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ spec:
selector:
matchLabels:
{{- include "vector.selectorLabels" . | nindent 6 }}
{{- if semverCompare ">=1.22-0" .Capabilities.KubeVersion.GitVersion }}
minReadySeconds: {{ .Values.minReadySeconds }}
{{- end }}
{{- with .Values.updateStrategy }}
updateStrategy:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/vector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ lifecycle: {}
# - "10"


# minReadySeconds -- Specify the minimum number of seconds a newly spun up DaemonSet pod should wait to
# minReadySeconds -- Specify the minimum number of seconds a newly spun up pod should wait to
# pass healthchecks before it is considered available.
minReadySeconds: 0

Expand Down

0 comments on commit b9e67eb

Please sign in to comment.