mini-mirror: Use templated values for Helm test
Currently, the mini-mirror Helm test uses pre-defined components and distributions, making it ineffective for custom built-images. This commit uses templating to retrieve the appropriate service address, distributions, and components when rendering the Helm test. Change-Id: Idd7771756da1da96c1ad9ae14b2fdc6b6bb9debb
This commit is contained in:
parent
036e4b0c69
commit
237cb76f18
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue