Merge "mini-mirror: Use templated values for Helm test"

This commit is contained in:
Zuul 2019-03-15 05:48:02 +00:00 committed by Gerrit Code Review
commit 671c079f03
3 changed files with 13 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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