Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete sync-images scripts #818

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .github/workflows/sync-images.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions build-scripts/hack/sync-images.sh

This file was deleted.

31 changes: 0 additions & 31 deletions build-scripts/hack/sync-images.yaml

This file was deleted.

29 changes: 17 additions & 12 deletions docs/src/snap/howto/install/offline.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ add a dummy default route on the `eth0` interface using the following command:
ip route add default dev eth0
```

```{note}
```{note}
Ensure that `eth0` is the name of the default network interface used for
pod-to-pod communication.
```

The dummy gateway will only be used by the Kubernetes services to
know which interface to use, actual connectivity to the internet is not
The dummy gateway will only be used by the Kubernetes services to
know which interface to use, actual connectivity to the internet is not
required. Ensure that the dummy gateway rule survives a node reboot.

#### Ensure proxy access
Expand All @@ -94,7 +94,7 @@ For {{product}}, it is also necessary to fetch the images used
by its features (network, DNS, etc.) as well as any images that are
needed to run specific workloads.

```{note}
```{note}
The image options are presented in the order of increasing complexity
of implementation.
It may be helpful to combine these options for different scenarios.
Expand Down Expand Up @@ -167,12 +167,18 @@ any upstream registries (e.g. `docker.io`) and the private mirror.
##### Load images with regsync

We recommend using [regsync][regsync] to copy images from the upstream registry
to your private registry. Refer to the [sync-images.yaml][sync-images-yaml]
file that contains the configuration for syncing images from the upstream
registry to the private registry. Using the output from `k8s list-images`
update the images in the [sync-images.yaml][sync-images-yaml] file if
necessary. Update the file with the appropriate mirror, and specify a mirror
for ghcr.io that points to the registry.
to your private registry.
For that, create a `sync-images.yaml` file that maps the output from
`k8s list-images` to the private registry mirror and specify a mirror for
ghcr.io that points to the registry.

```
sync:
- source: ghcr.io/canonical/k8s-snap/pause:3.10
target: '{{ env "MIRROR" }}/canonical/k8s-snap/pause:3.10'
type: image
...
```

After creating the `sync-images.yaml` file, use [regsync][regsync] to sync the
images. Assuming your registry mirror is at http://10.10.10.10:5050, run:
Expand Down Expand Up @@ -264,7 +270,7 @@ capabilities = ["pull", "resolve"]
HTTPS requires the additionally specification of the registry CA certificate.
Copy the certificate to
`/var/snap/k8s/common/etc/containerd/hosts.d/ghcr.io/ca.crt`.
Then add the configuration in
Then add the configuration in
`/var/snap/k8s/common/etc/containerd/hosts.d/ghcr.io/hosts.toml`:

```
Expand Down Expand Up @@ -300,7 +306,6 @@ After a while, confirm that all the cluster nodes show up in the output of the

[Core20]: https://canonical.com/blog/ubuntu-core-20-secures-linux-for-iot
[proxy]: ../networking/proxy.md
[sync-images-yaml]: https://github.com/canonical/k8s-snap/blob/main/build-scripts/hack/sync-images.yaml
[regsync]: https://github.com/regclient/regclient/blob/main/docs/regsync.md
[regctl]: https://github.com/regclient/regclient/blob/main/docs/regctl.md
[regctl.sh]: https://github.com/canonical/k8s-snap/blob/main/src/k8s/tools/regctl.sh
Expand Down
Loading