-
Notifications
You must be signed in to change notification settings - Fork 159
/
Copy pathprepull.yaml
41 lines (41 loc) · 1.8 KB
/
prepull.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: prepull-test-containers
spec:
selector:
matchLabels:
prepull-test-images: e2e
template:
metadata:
labels:
prepull-test-images: e2e
spec:
nodeSelector:
kubernetes.io/os: windows
# To see containers that are known to be used in e2e tests, run this
# command against the build-log.txt output from a test run:
# grep -v 'Node Info: &Node' build-log.txt \
# | grep -ho -E 'e2eteam/([[:alnum:]_-]+):([[:alnum:]./_-]+)' \
# | sort | uniq
# NOTE: this command captures only a subset of the test containers,
# unfortunately; not all test containers will have their names printed in
# the test output. Running the command against the output from multiple
# test runs is also recommended. Filtering out the 'Node Info' lines
# avoids capturing containers that are only found in the test log
# *because* we prepulled them. Overall this command may be useful for
# detecting newly-used test containers but there's not a great way to
# prune unused containers from this manifest right now.
#
# Examining initImageConfigs() in https://github.com/kubernetes/kubernetes/blob/master/test/utils/image/manifest.go may also help, but many of the containers listed there are only used for Linux tests.
#
# DaemonSets do not support a RestartPolicy other than 'Always', so we
# run ping in each container to keep it alive so that kubernetes does not
# continually restart the containers while we're prepulling.
containers:
- image: registry.k8s.io/e2e-test-images/agnhost:2.36
name: agnhost-236
resources:
requests:
cpu: 1m
command: ['cmd.exe', '/c', 'ping -n 1800 127.0.0.1 >NUL']