-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Improve maintainability of the vertical-pod-autoscaler chart by extracting repeated probe configurations into _helpers.tpl
.
Background
Following the code review of PR #250, the vertical-pod-autoscaler chart has repeated probe configurations across all three components (recommender, updater, admission-controller). Each component uses similar liveness and readiness probe structures.
Proposed Changes
-
Create template helpers in
_helpers.tpl
for:- Common liveness probe configuration
- Common readiness probe configuration
- Allow customization through values while maintaining DRY principles
-
Update all component templates to use the new helpers:
charts/vertical-pod-autoscaler/templates/recommender.yaml
charts/vertical-pod-autoscaler/templates/updater.yaml
charts/vertical-pod-autoscaler/templates/admission-controller.yaml
Benefits
- Reduces code duplication
- Easier maintenance when updating probe configurations
- Consistent probe behavior across all VPA components
- Follows Helm best practices for template organization
Example Helper Structure
{{- define "vertical-pod-autoscaler.livenessProbe" -}}
httpGet:
path: /health-check
port: metrics
scheme: HTTP
failureThreshold: {{ .Values.livenessProbe.failureThreshold | default 6 }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds | default 5 }}
successThreshold: {{ .Values.livenessProbe.successThreshold | default 1 }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 3 }}
{{- end }}
Labels
- enhancement
- vertical-pod-autoscaler
- maintainability
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request