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

Make Liveness/Readiness Probe timeouts configurable for PgBouncer Exporter #29752

Merged
merged 2 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 6 additions & 4 deletions chart/templates/pgbouncer/pgbouncer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,17 @@ spec:
command:
- pgbouncer_exporter
- health
initialDelaySeconds: 10
periodSeconds: 10
initialDelaySeconds: {{ .Values.pgbouncer.metricsExporterSidecar.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.pgbouncer.metricsExporterSidecar.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.pgbouncer.metricsExporterSidecar.livenessProbe.timeoutSeconds }}
readinessProbe:
exec:
command:
- pgbouncer_exporter
- health
initialDelaySeconds: 10
periodSeconds: 10
initialDelaySeconds: {{ .Values.pgbouncer.metricsExporterSidecar.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.pgbouncer.metricsExporterSidecar.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.pgbouncer.metricsExporterSidecar.readinessProbe.timeoutSeconds }}
volumes:
- name: pgbouncer-config
secret:
Expand Down
50 changes: 50 additions & 0 deletions chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4588,6 +4588,56 @@
"verify-full"
],
"default": "disable"
},
"livenessProbe": {
"description": "LivenessProbe configurations for ``metricsExporterSidecar``",
"type": "object",
"additionalProperties": false,
"properties": {
"initialDelaySeconds": {
"description": "Metrics Exporter liveness probe initial delay",
"format": "int32",
"type": "integer",
"default": 10
},
"periodSeconds": {
"description": "Metrics Exporter liveness probe frequency",
"format": "int32",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does helm honor these formats? We don't have them for anything else, and the one instance of it for periodSeconds in the upstream k8s schema has this as int64.

I'd be inclined to just remove all the formats you are adding here, unless you are sure helm actually checks them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed it again and pretty agree that it's quite extra to be here. Removed format fields, thank you!

"type": "integer",
"default": 10
},
"timeoutSeconds": {
"description": "Metrics Exporter liveness probe command timeout",
"format": "int32",
"type": "integer",
"default": 1
}
}
},
"readinessProbe": {
"description": "ReadinessProbe configurations for ``metricsExporterSidecar``",
"type": "object",
"additionalProperties": false,
"properties": {
"initialDelaySeconds": {
"description": "Metrics Exporter readiness probe initial delay",
"format": "int32",
"type": "integer",
"default": 10
},
"periodSeconds": {
"description": "Metrics Exporter readiness probe frequency",
"format": "int32",
"type": "integer",
"default": 10
},
"timeoutSeconds": {
"description": "Metrics Exporter readiness probe command timeout",
"format": "int32",
"type": "integer",
"default": 1
}
}
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,16 @@ pgbouncer:
# memory: 128Mi
sslmode: "disable"

livenessProbe:
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 1

readinessProbe:
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 1

# Configuration for the redis provisioned by the chart
redis:
enabled: true
Expand Down