From cb75b0c3dadf0c3392a0c4200f713ba07b24a6b4 Mon Sep 17 00:00:00 2001 From: Davis Alexander L Date: Fri, 9 Feb 2024 11:37:01 -0600 Subject: [PATCH 1/4] fix(vector): add minReadySeconds to StatefulSet and Deployment specs --- charts/vector/README.md | 2 +- charts/vector/templates/deployment.yaml | 1 + charts/vector/templates/statefulset.yaml | 1 + charts/vector/values.yaml | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/vector/README.md b/charts/vector/README.md index 74f68056..266f5492 100644 --- a/charts/vector/README.md +++ b/charts/vector/README.md @@ -164,7 +164,7 @@ helm install --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. | diff --git a/charts/vector/templates/deployment.yaml b/charts/vector/templates/deployment.yaml index 3154f3c4..20a39ff8 100644 --- a/charts/vector/templates/deployment.yaml +++ b/charts/vector/templates/deployment.yaml @@ -14,6 +14,7 @@ spec: selector: matchLabels: {{- include "vector.selectorLabels" . | nindent 6 }} + minReadySeconds: {{ .Values.minReadySeconds }} {{- with .Values.updateStrategy }} strategy: {{- toYaml . | nindent 4 }} diff --git a/charts/vector/templates/statefulset.yaml b/charts/vector/templates/statefulset.yaml index 1f870f90..03c3fabb 100644 --- a/charts/vector/templates/statefulset.yaml +++ b/charts/vector/templates/statefulset.yaml @@ -15,6 +15,7 @@ spec: selector: matchLabels: {{- include "vector.selectorLabels" . | nindent 6 }} + minReadySeconds: {{ .Values.minReadySeconds }} {{- with .Values.updateStrategy }} updateStrategy: {{- toYaml . | nindent 4 }} diff --git a/charts/vector/values.yaml b/charts/vector/values.yaml index 7f315592..45cfb0da 100644 --- a/charts/vector/values.yaml +++ b/charts/vector/values.yaml @@ -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 From 386a06fffebe71457cba1b5f91898085cf3bb01a Mon Sep 17 00:00:00 2001 From: Davis Alexander L Date: Tue, 13 Feb 2024 16:39:01 -0600 Subject: [PATCH 2/4] fix: minReadySeconds not supported by statefulsets prior to kube v1.22 --- charts/vector/templates/statefulset.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/vector/templates/statefulset.yaml b/charts/vector/templates/statefulset.yaml index 03c3fabb..b6690c08 100644 --- a/charts/vector/templates/statefulset.yaml +++ b/charts/vector/templates/statefulset.yaml @@ -15,7 +15,9 @@ spec: selector: matchLabels: {{- include "vector.selectorLabels" . | nindent 6 }} + {{- if (semverCompare ">=1.22" .Capabilities.KubeVersion.Version) }} minReadySeconds: {{ .Values.minReadySeconds }} + {{- end }} {{- with .Values.updateStrategy }} updateStrategy: {{- toYaml . | nindent 4 }} From 3a960ccfe0c44321b84dc9a4ef7637c81fb6b44e Mon Sep 17 00:00:00 2001 From: Alexander Davis <10692149+alexanderldavis@users.noreply.github.com> Date: Thu, 15 Feb 2024 11:40:40 -0600 Subject: [PATCH 3/4] feat: use GitVersion instead of Version --- charts/vector/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/vector/templates/statefulset.yaml b/charts/vector/templates/statefulset.yaml index b6690c08..4b57a860 100644 --- a/charts/vector/templates/statefulset.yaml +++ b/charts/vector/templates/statefulset.yaml @@ -15,7 +15,7 @@ spec: selector: matchLabels: {{- include "vector.selectorLabels" . | nindent 6 }} - {{- if (semverCompare ">=1.22" .Capabilities.KubeVersion.Version) }} + {{- if semverCompare ">=1.22" .Capabilities.KubeVersion.GitVersion }} minReadySeconds: {{ .Values.minReadySeconds }} {{- end }} {{- with .Values.updateStrategy }} From 968882f77f43fe35a34db0ad544efe853e9c3bbf Mon Sep 17 00:00:00 2001 From: Alexander Davis <10692149+alexanderldavis@users.noreply.github.com> Date: Thu, 15 Feb 2024 11:42:55 -0600 Subject: [PATCH 4/4] fix: update semvercompare comparison to ">=1.22-0" --- charts/vector/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/vector/templates/statefulset.yaml b/charts/vector/templates/statefulset.yaml index 4b57a860..35863c86 100644 --- a/charts/vector/templates/statefulset.yaml +++ b/charts/vector/templates/statefulset.yaml @@ -15,7 +15,7 @@ spec: selector: matchLabels: {{- include "vector.selectorLabels" . | nindent 6 }} - {{- if semverCompare ">=1.22" .Capabilities.KubeVersion.GitVersion }} + {{- if semverCompare ">=1.22-0" .Capabilities.KubeVersion.GitVersion }} minReadySeconds: {{ .Values.minReadySeconds }} {{- end }} {{- with .Values.updateStrategy }}