diff --git a/changelog/content/experimental/unreleased.md b/changelog/content/experimental/unreleased.md index 1d49ec920..d202096e8 100644 --- a/changelog/content/experimental/unreleased.md +++ b/changelog/content/experimental/unreleased.md @@ -26,6 +26,7 @@ version: - {{% tag added %}} New validation rule to ensure declarative or dynamic discovery for metrics to scrape are configured - {{% tag added %}} New System API endpoint giving runtime information ([docs](https://promitor.io/operations/#system) | [#1208](https://github.com/tomkerkhove/promitor/issues/1208)) +- {{% tag added %}} Provide capability to tweak liveness/readines probes in Helm charts ([#1350](https://github.com/tomkerkhove/promitor/issues/1350)) - {{% tag changed %}} Show Promitor version during startup - {{% tag changed %}} Provide capability to scrape all queues in Azure Service Bus, instead of having to declare the queue name. ([#529](https://github.com/tomkerkhove/promitor/issues/529)). diff --git a/charts/promitor-agent-resource-discovery/README.md b/charts/promitor-agent-resource-discovery/README.md index e280dd095..647450e95 100644 --- a/charts/promitor-agent-resource-discovery/README.md +++ b/charts/promitor-agent-resource-discovery/README.md @@ -76,6 +76,12 @@ their default values. | `rbac.serviceAccount.create` | Create service account resource | `true` | | `rbac.serviceAccount.name` | Service account name to use if create is false. If create is true, a name is generated using the fullname template | `promitor-resource-discovery` | | `rbac.serviceAccount.annotations` | Service account annotations| `{}` | +| `health.readiness.enabled` | Indication if readiness probes should be used | `true` | | +| `health.readiness.delay` | Amount of seconds to wait before probing the container to verify if it's ready | `5` | | +| `health.readiness.interval` | Amount of seconds to wait before probing the container again to verify if it's ready after the last attempt | `5` | | +| `health.liveness.enabled` | Indication if liveness probes should be used | `true` | | +| `health.liveness.delay` | Amount of seconds to wait before probing the container to verify if it's still alive | `5` | | +| `health.liveness.interval` | Amount of seconds to wait before probing the container again to verify if it's still alive after the last attempt | `30` | | | `resources` | Pod resource requests & limits | `{}` | | `secrets.createSecret` | Indication if you want to bring your own secret level of logging | `true` | | | `secrets.appKeySecret` | Name of the secret for Azure AD identity secret | `azure-app-key` | diff --git a/charts/promitor-agent-resource-discovery/templates/deployment.yaml b/charts/promitor-agent-resource-discovery/templates/deployment.yaml index c1730a41c..32fc51c35 100644 --- a/charts/promitor-agent-resource-discovery/templates/deployment.yaml +++ b/charts/promitor-agent-resource-discovery/templates/deployment.yaml @@ -55,14 +55,22 @@ spec: volumeMounts: - name: config-volume-{{ template "promitor-agent-resource-discovery.name" . }} mountPath: /config/ + {{- if .Values.health.liveness.enabled }} livenessProbe: httpGet: path: /api/v1/health port: http + initialDelaySeconds: {{ .Values.health.liveness.delay }} + periodSeconds: {{ .Values.health.liveness.interval }} + {{- end }} + {{- if .Values.health.readiness.enabled }} readinessProbe: httpGet: path: /api/v1/health port: http + initialDelaySeconds: {{ .Values.health.readiness.delay }} + periodSeconds: {{ .Values.health.readiness.interval }} + {{- end }} volumes: - name: config-volume-{{ template "promitor-agent-resource-discovery.name" . }} configMap: diff --git a/charts/promitor-agent-resource-discovery/values.yaml b/charts/promitor-agent-resource-discovery/values.yaml index dd0032dc6..b551cb023 100644 --- a/charts/promitor-agent-resource-discovery/values.yaml +++ b/charts/promitor-agent-resource-discovery/values.yaml @@ -65,6 +65,16 @@ service: dnsPrefix: enabled: false +health: + readiness: + enabled: true + delay: 5 + interval: 5 + liveness: + enabled: true + delay: 5 + interval: 30 + resources: {} # limits: # cpu: 100m diff --git a/charts/promitor-agent-scraper/README.md b/charts/promitor-agent-scraper/README.md index 184e423b6..26b788cc5 100644 --- a/charts/promitor-agent-scraper/README.md +++ b/charts/promitor-agent-scraper/README.md @@ -94,6 +94,12 @@ their default values. | `rbac.serviceAccount.create` | Create service account resource | `true` | | `rbac.serviceAccount.name` | Service account name to use if create is false. If create is true, a name is generated using the fullname template | `promitor-scraper` | | `rbac.serviceAccount.annotations` | Service account annotations| `{}` | +| `health.readiness.enabled` | Indication if readiness probes should be used | `true` | | +| `health.readiness.delay` | Amount of seconds to wait before probing the container to verify if it's ready | `5` | | +| `health.readiness.interval` | Amount of seconds to wait before probing the container again to verify if it's ready after the last attempt | `5` | | +| `health.liveness.enabled` | Indication if liveness probes should be used | `true` | | +| `health.liveness.delay` | Amount of seconds to wait before probing the container to verify if it's still alive | `5` | | +| `health.liveness.interval` | Amount of seconds to wait before probing the container again to verify if it's still alive after the last attempt | `30` | | | `resources` | Pod resource requests & limits | `{}` | | `secrets.createSecret` | Indication if you want to bring your own secret level of logging | `true` | | `secrets.appIdSecret` | Name of the secret for Azure AD identity id | `azure-app-id` | diff --git a/charts/promitor-agent-scraper/templates/deployment.yaml b/charts/promitor-agent-scraper/templates/deployment.yaml index c448862d8..1e3b68116 100644 --- a/charts/promitor-agent-scraper/templates/deployment.yaml +++ b/charts/promitor-agent-scraper/templates/deployment.yaml @@ -65,14 +65,22 @@ spec: volumeMounts: - name: config-volume-{{ template "promitor-agent-scraper.name" . }} mountPath: /config/ + {{- if .Values.health.liveness.enabled }} livenessProbe: httpGet: path: /api/v1/health port: http + initialDelaySeconds: {{ .Values.health.liveness.delay }} + periodSeconds: {{ .Values.health.liveness.interval }} + {{- end }} + {{- if .Values.health.readiness.enabled }} readinessProbe: httpGet: path: /api/v1/health port: http + initialDelaySeconds: {{ .Values.health.readiness.delay }} + periodSeconds: {{ .Values.health.readiness.interval }} + {{- end }} volumes: - name: config-volume-{{ template "promitor-agent-scraper.name" . }} configMap: diff --git a/charts/promitor-agent-scraper/values.yaml b/charts/promitor-agent-scraper/values.yaml index 9b27cbc38..a891876db 100644 --- a/charts/promitor-agent-scraper/values.yaml +++ b/charts/promitor-agent-scraper/values.yaml @@ -88,6 +88,16 @@ service: dnsPrefix: enabled: false +health: + readiness: + enabled: true + delay: 5 + interval: 5 + liveness: + enabled: true + delay: 5 + interval: 30 + resources: {} # limits: # cpu: 100m