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

Provide capability to tweak liveness/readines probes #1352

Merged
merged 5 commits into from
Nov 17, 2020
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/content/experimental/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand Down
6 changes: 6 additions & 0 deletions charts/promitor-agent-resource-discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions charts/promitor-agent-resource-discovery/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions charts/promitor-agent-scraper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
8 changes: 8 additions & 0 deletions charts/promitor-agent-scraper/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions charts/promitor-agent-scraper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down