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

Commit c1eeb82

Browse files
Add preserveConnectionSecret value to allow to disable the preservation of the connection user and password on a helm upgrade
1 parent 6e0be57 commit c1eeb82

File tree

4 files changed

+53
-39
lines changed

4 files changed

+53
-39
lines changed

deploy/helm-chart/README.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -112,33 +112,34 @@ helm install --name my-release -f myvalues.yaml .
112112

113113
## Configuration
114114

115-
| Parameter | Description | Default |
116-
|---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|
117-
| `image` | The image (with tag) to pull | `timescale/promscale` |
118-
| `imagePullPolicy` | The image pull policy | `IfNotPresent` |
119-
| `replicaCount` | Number of pods for the connector | `1` |
120-
| `upgradeStrategy` | Promscale deployment upgrade strategy, By default set to `Recreate` as during Promscale upgrade we expect no Promscale to be connected to TimescaleDB | `Recreate` |
121-
| `resources` | Requests and limits for each of the pods | `{}` |
122-
| `nodeSelector` | Node labels to use for scheduling | `{}` |
123-
| `tolerations` | Tolerations to use for scheduling | `[]` |
124-
| `affinity` | PodAffinity and PodAntiAffinity settings | `{}` |
125-
| `extraArgs` | Additional promscale CLI arguments | `[]` |
126-
| `extraEnv` | Additional promscale environment variables | `[]` |
127-
| `extraEnvFrom` | Additional promscale environment variables originating from e.g. secrets or configmaps | `[]` |
128-
| `annotations` | Annotations added to promscale Deployment | `{}` |
129-
| `podAnnotations` | Annotations added to promscale Pods | `{}` |
130-
| `connection.uri` | DB uri string used for database connection. When not empty it takes priority over other settings in `connection` map. | `""` |
131-
| `connection.user` | Username to connect to TimescaleDB with | `postgres` |
132-
| `connection.password` | The DB password for user specified in `connection.user` | `""` |
133-
| `connection.host` | Hostname of timescaledb instance | `db.timescaledb.svc.cluster.local` |
134-
| `connection.port` | Port the db listens to | `5432` |
135-
| `connection.dbName` | Database name in TimescaleDB to connect to | `timescale` |
136-
| `connection.sslMode` | SSL mode for connection | `require` |
137-
| `config` | Promscale configuration options. Full list of options is available at [docs/configuration.md](https://github.com/timescale/promscale/blob/master/docs/configuration.md) | `` |
138-
| `service.type` | Type of Service to be used | `ClusterIP` |
139-
| `service.annotations` | Annotations to set to the Service | `{}` |
140-
| `service.prometheus.enabled` | Expose prometheus remote_write port in the Service object to allow sending prometheus data to promscale. | `true` |
141-
| `service.prometheus.port` | Port the connector Service accepts prometheus remote_write connections on | `9201` |
142-
| `service.openTelemetry.port` | Port the connector Service will accept otlp connections on | `9202` |
143-
| `service.openTelemetry.enabled` | Expose OpenTelemetry port in the Service object to allow sending OTel data to promscale. | `true` |
144-
| `serviceMonitor.enabled` | Enable creation of serviceMonitor object used by prometheus-operator. Setting this to false enables prometheus annotation-based scraping. | `false` |
115+
| Parameter | Description | Default |
116+
|---------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
117+
| `image` | The image (with tag) to pull | `timescale/promscale` |
118+
| `imagePullPolicy` | The image pull policy | `IfNotPresent` |
119+
| `replicaCount` | Number of pods for the connector | `1` |
120+
| `upgradeStrategy` | Promscale deployment upgrade strategy, By default set to `Recreate` as during Promscale upgrade we expect no Promscale to be connected to TimescaleDB | `Recreate` |
121+
| `resources` | Requests and limits for each of the pods | `{}` |
122+
| `readinessProbe` | Readiness probe for promscale connector containers | see [values.yaml](./values.yaml) |
123+
| `nodeSelector` | Node labels to use for scheduling | `{}` |
124+
| `tolerations` | Tolerations to use for scheduling | `[]` |
125+
| `affinity` | PodAffinity and PodAntiAffinity settings | `{}` |
126+
| `extraArgs` | Additional promscale CLI arguments | `[]` |
127+
| `extraEnv` | Additional promscale environment variables | `[]` |
128+
| `extraEnvFrom` | Additional promscale environment variables originating from e.g. secrets or configmaps | `[]` |
129+
| `annotations` | Annotations added to promscale Deployment | `{}` |
130+
| `podAnnotations` | Annotations added to promscale Pods | `{}` |
131+
| `connection.uri` | DB uri string used for database connection. When not empty it takes priority over other settings in `connection` map. | `""` |
132+
| `connection.user` | Username to connect to TimescaleDB with | `postgres` |
133+
| `connection.password` | The DB password for user specified in `connection.user` | `""` |
134+
| `connection.host` | Hostname of timescaledb instance | `db.timescaledb.svc.cluster.local` |
135+
| `connection.port` | Port the db listens to | `5432` |
136+
| `connection.dbName` | Database name in TimescaleDB to connect to | `timescale` |
137+
| `connection.sslMode` | SSL mode for connection | `require` |
138+
| `config` | Promscale configuration options. Full list of options is available at [docs/configuration.md](https://github.com/timescale/promscale/blob/master/docs/configuration.md) | `` |
139+
| `service.type` | Type of Service to be used | `ClusterIP` |
140+
| `service.annotations` | Annotations to set to the Service | `{}` |
141+
| `service.prometheus.enabled` | Expose prometheus remote_write port in the Service object to allow sending prometheus data to promscale. | `true` |
142+
| `service.prometheus.port` | Port the connector Service accepts prometheus remote_write connections on | `9201` |
143+
| `service.openTelemetry.port` | Port the connector Service will accept otlp connections on | `9202` |
144+
| `service.openTelemetry.enabled` | Expose OpenTelemetry port in the Service object to allow sending OTel data to promscale. | `true` |
145+
| `serviceMonitor.enabled` | Enable creation of serviceMonitor object used by prometheus-operator. Setting this to false enables prometheus annotation-based scraping. | `false` |

deploy/helm-chart/templates/deployment-promscale.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,7 @@ spec:
6969
- containerPort: 9202
7070
name: otel-port
7171
readinessProbe:
72-
httpGet:
73-
path: /healthz
74-
port: metrics-port
75-
scheme: HTTP
76-
failureThreshold: 3
77-
timeoutSeconds: 15
78-
periodSeconds: 15
72+
{{- toYaml .Values.readinessProbe | nindent 12 }}
7973
volumeMounts:
8074
- name: configs
8175
mountPath: /etc/promscale/

deploy/helm-chart/values.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,25 @@ service:
103103
# set your own limits
104104
resources: {}
105105

106+
# set a custom readiness probe e.g. when basic auth is enabled
107+
# readinessProbe:
108+
# httpGet: null
109+
# exec:
110+
# command:
111+
# - sh
112+
# - -c
113+
# - |-
114+
# status_code=$(wget --server-response "http://${PROMSCALE_WEB_AUTH_USERNAME}:${PROMSCALE_WEB_AUTH_PASSWORD}@localhost:9201/healthz" 2>&1 | awk '/^ HTTP/{print $2}');
115+
# if [[ "${status_code}" == "200" ]]; then exit 0; else exit 1; fi
116+
readinessProbe:
117+
httpGet:
118+
path: /healthz
119+
port: metrics-port
120+
scheme: HTTP
121+
failureThreshold: 3
122+
timeoutSeconds: 15
123+
periodSeconds: 15
124+
106125
# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
107126
nodeSelector: {}
108127

deploy/static/deploy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ spec:
125125
- containerPort: 9202
126126
name: otel-port
127127
readinessProbe:
128+
failureThreshold: 3
128129
httpGet:
129130
path: /healthz
130131
port: metrics-port
131132
scheme: HTTP
132-
failureThreshold: 3
133-
timeoutSeconds: 15
134133
periodSeconds: 15
134+
timeoutSeconds: 15
135135
volumeMounts:
136136
- name: configs
137137
mountPath: /etc/promscale/

0 commit comments

Comments
 (0)