Skip to content

Commit a1e4519

Browse files
committed
Merge containerd config script into k3s install script
1 parent 7d3a0b5 commit a1e4519

3 files changed

Lines changed: 23 additions & 29 deletions

File tree

infra/fridge/isolated-cluster/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def patch_namespace(name: str, pss: PodSecurityStandard) -> NamespacePatch:
222222
pulumi.log.warn(
223223
"Container runtime configuration is only applied on AKS. "
224224
"For Dawn AI and local K3s deployments, please ensure containerd is configured manually. "
225-
"A script to configure containerd when using K3s is available in the `scripts` folder."
225+
"If you deployed K3s using the scripts in infra/k3s, containerd should already be configured correctly."
226226
)
227227

228228
# Pulumi stack outputs

infra/fridge/scripts/k3s_containerd_config.sh

Lines changed: 0 additions & 28 deletions
This file was deleted.

infra/k3s/install.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@
55
# to allow Cilium to handle all these
66
echo 'Installing K3s...'
77

8+
# Configure containerd for private registry before K3s installation
9+
echo 'Configuring containerd registry settings...'
10+
HARBOR_HOSTNAME="${1:-harbor.fridge.internal}" # Use argument or default
11+
12+
sudo mkdir -p /etc/rancher/k3s
13+
sudo tee /etc/rancher/k3s/registries.yaml > /dev/null <<EOF
14+
mirrors:
15+
docker.io:
16+
endpoint:
17+
- https://$HARBOR_HOSTNAME/v2/proxy-docker.io
18+
quay.io:
19+
endpoint:
20+
- https://$HARBOR_HOSTNAME/v2/proxy-quay.io
21+
ghcr.io:
22+
endpoint:
23+
- https://$HARBOR_HOSTNAME/v2/proxy-ghcr.io
24+
configs:
25+
$HARBOR_HOSTNAME:
26+
tls:
27+
insecure_skip_verify: true
28+
EOF
29+
830
curl -sfL https://get.k3s.io | sh -s - \
931
--flannel-backend none \
1032
--disable-network-policy \

0 commit comments

Comments
 (0)