You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,6 +150,28 @@ You can apply the GitOps playground to
150
150
* or almost any k8s cluster.
151
151
Note that if you want to deploy Jenkins inside the cluster, you either need Docker as container runtime or set Jenkins up to run its build on an agent that provides Docker.
152
152
153
+
For the local cluster, you can avoid hitting DockerHub's rate limiting by using a mirror via the `--docker-io-registry-mirror` parameter.
Copy file name to clipboardExpand all lines: scripts/init-cluster.sh
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,19 @@ function createCluster() {
77
77
# Disable traefik (we roll our own ingress-controller)
78
78
'--k3s-arg=--disable=traefik@server:0'
79
79
)
80
+
81
+
REGISTRIES=""
82
+
if [[ -n"$DOCKER_IO_REGISTRY_MIRROR" ]];then
83
+
REGISTRIES=$(cat <<EOF
84
+
registries:
85
+
config: |
86
+
mirrors:
87
+
docker.io:
88
+
endpoint:
89
+
- "$DOCKER_IO_REGISTRY_MIRROR"
90
+
EOF
91
+
)
92
+
fi
80
93
81
94
if [[ ${BIND_LOCALHOST}=='true' ]];then
82
95
K3D_ARGS+=(
@@ -114,7 +127,7 @@ function createCluster() {
114
127
)
115
128
fi
116
129
117
-
if [ -n"$BIND_PORTS" ];then
130
+
if [[-n"$BIND_PORTS"]];then
118
131
IFS=","
119
132
read -ra portBindings <<<"$BIND_PORTS"
120
133
unset IFS
@@ -134,6 +147,7 @@ function createCluster() {
134
147
kind: Simple
135
148
kubeAPI:
136
149
hostIP: "127.0.0.1"
150
+
$REGISTRIES
137
151
EOF
138
152
139
153
@@ -173,6 +187,8 @@ function printParameters() {
173
187
echo" | --bind-ingress-port=INT >> Bind the ingress controller to this localhost port. Defaults to 80. Set to - to disable."
174
188
echo" | --bind-registry-port=INT >> Specify a custom port for the container registry to bind to localhost port. Only use this when port 30000 is blocked and --bind-localhost=true. Defaults to 30000 (default used by the playground)."
175
189
echo" | --bind-portBindings=STRING >> A comma separated list of additional port bindings like 443:443,9090:9090. Ignored when --bind-localhost."
190
+
191
+
echo" | --docker-io-registry-mirror=STRING >> the hostname of a registry that mirrors DockerHub. Useful when encountering rate limits"
176
192
echo
177
193
echo" -x | --trace >> Debug + Show each command executed (set -x)"
178
194
}
@@ -221,6 +237,7 @@ readParameters() {
221
237
# Use default port for playground registry, because no parameter is required when applying
0 commit comments