diff --git a/mini-mirror/templates/bin/_helm_test.sh.tpl b/mini-mirror/templates/bin/_helm_test.sh.tpl index b4b89b58..4c20bc51 100644 --- a/mini-mirror/templates/bin/_helm_test.sh.tpl +++ b/mini-mirror/templates/bin/_helm_test.sh.tpl @@ -16,11 +16,16 @@ See the License for the specific language governing permissions and limitations under the License. */}} +{{- $envAll := . -}} + set -xe rm /etc/apt/sources.list tee /etc/apt/sources.list << EOF -deb [ allow-insecure=yes ] http://${MINI_MIRROR_ENDPOINT} squeeze main +{{- $components := include "helm-toolkit.utils.joinListWithSpace" .Values.conf.test.components -}} +{{ range .Values.conf.test.dists }} +deb [ allow-insecure=yes ] {{ tuple "api" "public" "api" $envAll | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }} {{ . }} {{ $components -}} +{{ end }} EOF apt-get update diff --git a/mini-mirror/templates/pod-helm-test.yaml b/mini-mirror/templates/pod-helm-test.yaml index 9be26793..af1676a3 100644 --- a/mini-mirror/templates/pod-helm-test.yaml +++ b/mini-mirror/templates/pod-helm-test.yaml @@ -39,8 +39,6 @@ spec: env: - name: NO_PROXY value: 127.0.0.1,.svc.cluster.local - - name: MINI_MIRROR_ENDPOINT - value: {{ tuple "api" "public" $envAll | include "helm-toolkit.endpoints.endpoint_host_lookup" }} volumeMounts: - name: mini-mirror-bin mountPath: /tmp/helm-test.sh diff --git a/mini-mirror/values.yaml b/mini-mirror/values.yaml index ef1265a2..cea3a732 100644 --- a/mini-mirror/values.yaml +++ b/mini-mirror/values.yaml @@ -167,3 +167,10 @@ conf: autoindex on; } } + test: + # NOTE(drewwalters96): Used by the mini-mirror Helm test; should be valid + # dists and components contained in the mini-mirror image. + dists: + - squeeze + components: + - main