From a6118e5378f818f7b2cfb136b4b5ad67bde2beca Mon Sep 17 00:00:00 2001 From: Ben Apprederisse Date: Fri, 17 Apr 2026 15:16:16 -0700 Subject: [PATCH] feat(chart): support extraContainers, volumes, and volumeMounts Allow injecting sidecar containers and volumes via Helm values. Used by the EOL override sidecar (nginx serving patched endoflife.date JSON files for products with pending upstream PRs). Co-authored-by: Amp Amp-Thread-ID: https://ampcode.com/threads/T-019d98f0-cc82-75bf-b664-e3a63eef6ee9 --- charts/version-guard/Chart.yaml | 4 +- .../version-guard/templates/deployment.yaml | 11 ++++ charts/version-guard/values.yaml | 50 +++++++++++++++++++ 3 files changed, 63 insertions(+), 2 deletions(-) diff --git a/charts/version-guard/Chart.yaml b/charts/version-guard/Chart.yaml index b50a56c..57897e8 100644 --- a/charts/version-guard/Chart.yaml +++ b/charts/version-guard/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: version-guard description: Cloud infrastructure version drift and EOL detection type: application -version: 0.2.0 -appVersion: "0.1.0" +version: 0.3.0 +appVersion: "0.3.0" maintainers: - name: bakayolo url: https://github.com/bakayolo diff --git a/charts/version-guard/templates/deployment.yaml b/charts/version-guard/templates/deployment.yaml index a470ccf..8faf40d 100644 --- a/charts/version-guard/templates/deployment.yaml +++ b/charts/version-guard/templates/deployment.yaml @@ -57,3 +57,14 @@ spec: periodSeconds: 10 resources: {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.extraContainers }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/version-guard/values.yaml b/charts/version-guard/values.yaml index 03ee37f..50f6db4 100644 --- a/charts/version-guard/values.yaml +++ b/charts/version-guard/values.yaml @@ -28,3 +28,53 @@ resources: limits: cpu: 1000m memory: 512Mi + +# Additional volume mounts for the main container +volumeMounts: [] + +# Additional volumes for the pod +volumes: [] + +# Additional sidecar containers (e.g., EOL override proxy) +# Example: nginx sidecar serving patched endoflife.date JSON for products +# with pending upstream PRs (aurora-mysql, opensearch 3.3/3.5): +# +# extraContainers: +# - name: eol-override +# image: nginxinc/nginx-unprivileged:alpine +# ports: +# - containerPort: 8082 +# volumeMounts: +# - name: eol-config +# mountPath: /etc/nginx/conf.d/default.conf +# subPath: nginx.conf +# readOnly: true +# - name: eol-data +# mountPath: /data/api +# readOnly: true +# resources: +# requests: +# cpu: 10m +# memory: 16Mi +# limits: +# memory: 32Mi +# +# volumes: +# - name: eol-config +# configMap: +# name: eol-override +# items: +# - key: nginx.conf +# path: nginx.conf +# - name: eol-data +# configMap: +# name: eol-override +# items: +# - key: amazon-aurora-mysql.json +# path: amazon-aurora-mysql.json +# - key: amazon-opensearch.json +# path: amazon-opensearch.json +# +# Then set EOL_BASE_URL=http://127.0.0.1:8082/api in env to use the sidecar. +# Note: use 127.0.0.1 (not localhost) to avoid IPv6 resolution issues. +extraContainers: []