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

Exporter add healthiness and readiness probes #92

Merged
merged 6 commits into from
Mar 6, 2024
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
2 changes: 1 addition & 1 deletion Makefile.devel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ docs:
$(Q) echo "$$HELP_DOCS"
else
docs: ## Document the charts
@docker run --rm --volume "$(shell pwd):/helm-docs" -u $(shell id -u) jnorwood/helm-docs:v1.12.0
@docker run --rm --volume "$(shell pwd):/helm-docs" -u $(shell id -u) jnorwood/helm-docs:v1.13.1
endif
2 changes: 1 addition & 1 deletion charts/ocean-kubernetes-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ Kubernetes: `>=1.20.0-0`
| updateStrategy | object | `{}` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
4 changes: 2 additions & 2 deletions charts/ocean-metric-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: ocean-metric-exporter
description: A Helm chart for Ocean Metric Exporter
type: application
version: 1.0.6
appVersion: 1.0.3
version: 1.0.7
appVersion: 1.0.4
home: https://github.com/spotinst/charts/tree/main/charts/ocean-metric-exporter
icon: https://docs.spot.io/_media/images/spot_mark.png
sources:
Expand Down
16 changes: 14 additions & 2 deletions charts/ocean-metric-exporter/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ocean-metric-exporter

![Version: 1.0.6](https://img.shields.io/badge/Version-1.0.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.3](https://img.shields.io/badge/AppVersion-1.0.3-informational?style=flat-square)
![Version: 1.0.7](https://img.shields.io/badge/Version-1.0.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.4](https://img.shields.io/badge/AppVersion-1.0.4-informational?style=flat-square)

A Helm chart for Ocean Metric Exporter.

Expand Down Expand Up @@ -48,10 +48,22 @@ helm install my-release spot/ocean-metric-exporter
| oceanController.secretName | Optional | `"spotinst-kubernetes-cluster-controller"` | Secret name. |
| podAnnotations | Optional | `{}` | Pod annotations. Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ |
| podEnvVariables | Optional | `[]` | Additional environment variables for the exporter container. |
| probes.enabled | Bool | `true` | Whether to include both liveness and readiness probe, if this is set to true it will ignore the nested enabled booleans. |
| probes.liveness.enabled | Bool | `false` | Whether to include liveness probe, this will be ignored if probes.enabled was set to true. |
| probes.liveness.failureThreshold | Integer | `3` | Liveness probe failure threshold. |
| probes.liveness.initialDelaySeconds | Integer | `15` | Liveness probe initial delay. |
| probes.liveness.periodSeconds | Integer | `10` | Liveness probe period. |
| probes.liveness.timeoutSeconds | Integer | `1` | Liveness probe timeout. |
| probes.readiness.enabled | Bool | `false` | Whether to include readiness probe, this will be ignored if probes.enabled was set to true. |
| probes.readiness.failureThreshold | Integer | `3` | Readiness probe failure threshold. |
| probes.readiness.initialDelaySeconds | Integer | `15` | Readiness probe initial delay. |
| probes.readiness.periodSeconds | Integer | `10` | Readiness probe period. |
| probes.readiness.successThreshold | Integer | `1` | Readiness probe success threshold. |
| probes.readiness.timeoutSeconds | Integer | `1` | Readiness probe timeout. |
| replicaCount | Optional | `1` | Replicas. Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#replicas |
| resources | Optional | `{"limits":{"cpu":"500m","memory":"500Mi"},"requests":{"cpu":"100m","memory":"50Mi"}}` | Resource requests and limits. Ref: http://kubernetes.io/docs/user-guide/compute-resources/ |
| service.create | Optional | `true` | Controls whether a service should be created. |
| tolerations | Optional | `[{"key":"node-role.kubernetes.io/master","operator":"Exists"},{"key":"node-role.kubernetes.io/control-plane","operator":"Exists"}]` | Tolerations for nodes that have taints on them. Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
26 changes: 26 additions & 0 deletions charts/ocean-metric-exporter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,29 @@ Container command.
{{- printf "[ \"java\", \"-Dspring.profiles.active=prod,default\", \"-jar\", \"/app/app.jar\" ]" -}}
{{- end }}

{{/*
probes.
*/}}
{{- define "ocean-metric-exporter.probes" -}}
{{- if or .Values.probes.liveness.enabled .Values.probes.enabled }}
livenessProbe:
httpGet:
path: /health/liveness
port: exporter
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
{{- end}}
{{- if or .Values.probes.readiness.enabled .Values.probes.enabled }}
readinessProbe:
httpGet:
path: /health/readiness
port: exporter
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
successThreshold: {{ .Values.probes.readiness.successThreshold }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
{{- end}}
{{- end }}
1 change: 1 addition & 0 deletions charts/ocean-metric-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ spec:
- --deny-labels={{ join "," .Values.metricsConfiguration.denyLabels }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- include "ocean-metric-exporter.probes" . | nindent 8 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
33 changes: 33 additions & 0 deletions charts/ocean-metric-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,39 @@ service:
# -- (Optional) Controls whether a service should be created.
create: true

# Probes configuration
probes:
# -- (Bool) Whether to include both liveness and readiness probe, if this is set to true it will ignore the nested enabled booleans.
enabled: true

# Liveness probe configuration.
liveness:
# -- (Bool) Whether to include liveness probe, this will be ignored if probes.enabled was set to true.
enabled: false
# -- (Integer) Liveness probe initial delay.
initialDelaySeconds: 15
# -- (Integer) Liveness probe period.
periodSeconds: 10
# -- (Integer) Liveness probe failure threshold.
failureThreshold: 3
# -- (Integer) Liveness probe timeout.
timeoutSeconds: 1

# Readiness probe configuration.
readiness:
# -- (Bool) Whether to include readiness probe, this will be ignored if probes.enabled was set to true.
enabled: false
# -- (Integer) Readiness probe initial delay.
initialDelaySeconds: 15
# -- (Integer) Readiness probe period.
periodSeconds: 10
# -- (Integer) Readiness probe failure threshold.
failureThreshold: 3
# -- (Integer) Readiness probe success threshold.
successThreshold: 1
# -- (Integer) Readiness probe timeout.
timeoutSeconds: 1

# -- (Optional) Exporter Metrics Configurations
metricsConfiguration:
# -- (Array[string]) List of Categories to enable - if empty will get no metrics. Additional possible values can be found here: https://docs.spot.io/ocean/tools-and-integrations/prometheus/scrape?id=categories
Expand Down
2 changes: 1 addition & 1 deletion charts/ocean-network-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ helm install my-release spot/ocean-network-client
| tolerations | Optional | `[{"operator":"Exists"}]` | Tolerations - Enable pods to run an all nodes in cluster Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
Loading