From 7af7e6128a32146c52838e7db17506a32a000dae Mon Sep 17 00:00:00 2001 From: Clive Jevons Date: Fri, 27 Sep 2024 18:22:34 +0200 Subject: [PATCH] Make basic-health image configurable (#3622) * Make basic-health image configurable in order to be able to pull all images from a private registry, we need to have the basic-health image configurable * comment out basicHealth.fullImageName in values.yaml and use default in template instead --------- Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com> Co-authored-by: Chip Zoller Co-authored-by: Thomas Nguyen --- cost-analyzer/templates/tests/basic-health.yaml | 6 +++--- cost-analyzer/values.yaml | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cost-analyzer/templates/tests/basic-health.yaml b/cost-analyzer/templates/tests/basic-health.yaml index e092b54fd..d75705491 100644 --- a/cost-analyzer/templates/tests/basic-health.yaml +++ b/cost-analyzer/templates/tests/basic-health.yaml @@ -22,11 +22,11 @@ spec: fsGroup: 2000 containers: - name: test-kubecost - image: alpine/k8s:1.26.9 + image: {{ (.Values.basicHealth).fullImageName | default "alpine/k8s:1.26.9" }} securityContext: privileged: false capabilities: - drop: + drop: - ALL allowPrivilegeEscalation: false readOnlyRootFilesystem: true @@ -42,7 +42,7 @@ spec: if [ "$code" -eq 200 ]; then echo "Got Kubecost working configuration. Successful." exit 0 - else + else echo "Failed to fetch Kubecost configuration. Response was $response" exit 1 fi diff --git a/cost-analyzer/values.yaml b/cost-analyzer/values.yaml index 17c4101ce..86dd747f3 100644 --- a/cost-analyzer/values.yaml +++ b/cost-analyzer/values.yaml @@ -3558,3 +3558,7 @@ extraObjects: [] # host: kubecost.kubecost.svc.cluster.local # port: # number: 80 + +# -- Optional override for the image used for the basic health test container +# basicHealth: +# fullImageName: alpine/k8s:1.26.9