Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Add readinessProbe to helm values #1524

Merged
merged 1 commit into from
Aug 3, 2022
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
61 changes: 31 additions & 30 deletions deploy/helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,33 +112,34 @@ helm install --name my-release -f myvalues.yaml .

## Configuration

| Parameter | Description | Default |
|---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|
| `image` | The image (with tag) to pull | `timescale/promscale` |
| `imagePullPolicy` | The image pull policy | `IfNotPresent` |
| `replicaCount` | Number of pods for the connector | `1` |
| `upgradeStrategy` | Promscale deployment upgrade strategy, By default set to `Recreate` as during Promscale upgrade we expect no Promscale to be connected to TimescaleDB | `Recreate` |
| `resources` | Requests and limits for each of the pods | `{}` |
| `nodeSelector` | Node labels to use for scheduling | `{}` |
| `tolerations` | Tolerations to use for scheduling | `[]` |
| `affinity` | PodAffinity and PodAntiAffinity settings | `{}` |
| `extraArgs` | Additional promscale CLI arguments | `[]` |
| `extraEnv` | Additional promscale environment variables | `[]` |
| `extraEnvFrom` | Additional promscale environment variables originating from e.g. secrets or configmaps | `[]` |
| `annotations` | Annotations added to promscale Deployment | `{}` |
| `podAnnotations` | Annotations added to promscale Pods | `{}` |
| `connection.uri` | DB uri string used for database connection. When not empty it takes priority over other settings in `connection` map. | `""` |
| `connection.user` | Username to connect to TimescaleDB with | `postgres` |
| `connection.password` | The DB password for user specified in `connection.user` | `""` |
| `connection.host` | Hostname of timescaledb instance | `db.timescaledb.svc.cluster.local` |
| `connection.port` | Port the db listens to | `5432` |
| `connection.dbName` | Database name in TimescaleDB to connect to | `timescale` |
| `connection.sslMode` | SSL mode for connection | `require` |
| `config` | Promscale configuration options. Full list of options is available at [docs/configuration.md](https://github.com/timescale/promscale/blob/master/docs/configuration.md) | `` |
| `service.type` | Type of Service to be used | `ClusterIP` |
| `service.annotations` | Annotations to set to the Service | `{}` |
| `service.prometheus.enabled` | Expose prometheus remote_write port in the Service object to allow sending prometheus data to promscale. | `true` |
| `service.prometheus.port` | Port the connector Service accepts prometheus remote_write connections on | `9201` |
| `service.openTelemetry.port` | Port the connector Service will accept otlp connections on | `9202` |
| `service.openTelemetry.enabled` | Expose OpenTelemetry port in the Service object to allow sending OTel data to promscale. | `true` |
| `serviceMonitor.enabled` | Enable creation of serviceMonitor object used by prometheus-operator. Setting this to false enables prometheus annotation-based scraping. | `false` |
| Parameter | Description | Default |
|---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| `image` | The image (with tag) to pull | `timescale/promscale` |
| `imagePullPolicy` | The image pull policy | `IfNotPresent` |
| `replicaCount` | Number of pods for the connector | `1` |
| `upgradeStrategy` | Promscale deployment upgrade strategy, By default set to `Recreate` as during Promscale upgrade we expect no Promscale to be connected to TimescaleDB | `Recreate` |
| `resources` | Requests and limits for each of the pods | `{}` |
| `readinessProbe` | Readiness probe for promscale connector containers | see [values.yaml](./values.yaml) |
| `nodeSelector` | Node labels to use for scheduling | `{}` |
| `tolerations` | Tolerations to use for scheduling | `[]` |
| `affinity` | PodAffinity and PodAntiAffinity settings | `{}` |
| `extraArgs` | Additional promscale CLI arguments | `[]` |
| `extraEnv` | Additional promscale environment variables | `[]` |
| `extraEnvFrom` | Additional promscale environment variables originating from e.g. secrets or configmaps | `[]` |
| `annotations` | Annotations added to promscale Deployment | `{}` |
| `podAnnotations` | Annotations added to promscale Pods | `{}` |
| `connection.uri` | DB uri string used for database connection. When not empty it takes priority over other settings in `connection` map. | `""` |
| `connection.user` | Username to connect to TimescaleDB with | `postgres` |
| `connection.password` | The DB password for user specified in `connection.user` | `""` |
| `connection.host` | Hostname of timescaledb instance | `db.timescaledb.svc.cluster.local` |
| `connection.port` | Port the db listens to | `5432` |
| `connection.dbName` | Database name in TimescaleDB to connect to | `timescale` |
| `connection.sslMode` | SSL mode for connection | `require` |
| `config` | Promscale configuration options. Full list of options is available at [docs/configuration.md](https://github.com/timescale/promscale/blob/master/docs/configuration.md) | `` |
| `service.type` | Type of Service to be used | `ClusterIP` |
| `service.annotations` | Annotations to set to the Service | `{}` |
| `service.prometheus.enabled` | Expose prometheus remote_write port in the Service object to allow sending prometheus data to promscale. | `true` |
| `service.prometheus.port` | Port the connector Service accepts prometheus remote_write connections on | `9201` |
| `service.openTelemetry.port` | Port the connector Service will accept otlp connections on | `9202` |
| `service.openTelemetry.enabled` | Expose OpenTelemetry port in the Service object to allow sending OTel data to promscale. | `true` |
| `serviceMonitor.enabled` | Enable creation of serviceMonitor object used by prometheus-operator. Setting this to false enables prometheus annotation-based scraping. | `false` |
8 changes: 1 addition & 7 deletions deploy/helm-chart/templates/deployment-promscale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,7 @@ spec:
- containerPort: 9202
name: otel-port
readinessProbe:
httpGet:
path: /healthz
port: metrics-port
scheme: HTTP
failureThreshold: 3
timeoutSeconds: 15
periodSeconds: 15
{{- toYaml .Values.readinessProbe | nindent 12 }}
volumeMounts:
- name: configs
mountPath: /etc/promscale/
Expand Down
19 changes: 19 additions & 0 deletions deploy/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,25 @@ service:
# set your own limits
resources: {}

# set a custom readiness probe e.g. when basic auth is enabled
# readinessProbe:
# httpGet: null
# exec:
# command:
# - sh
# - -c
# - |-
# status_code=$(wget --server-response "http://${PROMSCALE_WEB_AUTH_USERNAME}:${PROMSCALE_WEB_AUTH_PASSWORD}@localhost:9201/healthz" 2>&1 | awk '/^ HTTP/{print $2}');
# if [[ "${status_code}" == "200" ]]; then exit 0; else exit 1; fi
readinessProbe:
httpGet:
path: /healthz
port: metrics-port
scheme: HTTP
failureThreshold: 3
timeoutSeconds: 15
periodSeconds: 15

# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
nodeSelector: {}

Expand Down
4 changes: 2 additions & 2 deletions deploy/static/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ spec:
- containerPort: 9202
name: otel-port
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: metrics-port
scheme: HTTP
failureThreshold: 3
timeoutSeconds: 15
periodSeconds: 15
timeoutSeconds: 15
volumeMounts:
- name: configs
mountPath: /etc/promscale/
Expand Down