Browse Source

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

Zuul 1 month ago
parent
commit
671c079f03

+ 6
- 1
mini-mirror/templates/bin/_helm_test.sh.tpl View File

@@ -16,11 +16,16 @@ See the License for the specific language governing permissions and
16 16
 limitations under the License.
17 17
 */}}
18 18
 
19
+{{- $envAll := . -}}
20
+
19 21
 set -xe
20 22
 
21 23
 rm /etc/apt/sources.list
22 24
 tee /etc/apt/sources.list << EOF
23
-deb [ allow-insecure=yes ] http://${MINI_MIRROR_ENDPOINT} squeeze main
25
+{{- $components := include "helm-toolkit.utils.joinListWithSpace" .Values.conf.test.components -}}
26
+{{ range .Values.conf.test.dists }}
27
+deb [ allow-insecure=yes ] {{ tuple "api" "public" "api" $envAll | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }} {{ . }} {{ $components -}}
28
+{{ end }}
24 29
 EOF
25 30
 
26 31
 apt-get update

+ 0
- 2
mini-mirror/templates/pod-helm-test.yaml View File

@@ -39,8 +39,6 @@ spec:
39 39
       env:
40 40
         - name: NO_PROXY
41 41
           value: 127.0.0.1,.svc.cluster.local
42
-        - name: MINI_MIRROR_ENDPOINT
43
-          value: {{ tuple "api" "public" $envAll | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
44 42
       volumeMounts:
45 43
         - name: mini-mirror-bin
46 44
           mountPath: /tmp/helm-test.sh

+ 7
- 0
mini-mirror/values.yaml View File

@@ -167,3 +167,10 @@ conf:
167 167
         autoindex on;
168 168
       }
169 169
     }
170
+  test:
171
+    # NOTE(drewwalters96): Used by the mini-mirror Helm test; should be valid
172
+    # dists and components contained in the mini-mirror image.
173
+    dists:
174
+      - squeeze
175
+    components:
176
+      - main

Loading…
Cancel
Save