Add package/files to hmirror
What is hmirror?
hmirror is an internal mirror for APT repositories (and related artifacts), for example:
apt.kubernetes.ioarchive.ubuntu.comdeveloper.download.nvidia.comdownload.docker.comdownload.opensuse.orgk8s-io.apt.hmirror.irmirror.aardsoft.finvidia.github.iopkgs.k8s.ioprod-cdn.packages.k8s.io
Where is the data stored?
The mirror data is stored on a PVC:
- cluster:
hamravesh-c12 - namespace:
hamravesh-mirror - pvc:
mirror-data
This PVC is mounted into the syncer-aux-* pod. Inside that pod, you can see the PVC contents here:
- Path:
/var/spool/apt-mirror/skel
How to add/update a package/file
If you need to add new content (or fix/update an existing file), you can push files directly to the PVC (via the syncer-aux-* pod).
1) Find the syncer pod
kubectl -n hamravesh-mirror get pods | grep syncer-aux
2) (Optional) Exec and verify the target path
kubectl -n hamravesh-mirror exec -it <syncer-aux-pod> -- bash
ls -la /var/spool/apt-mirror/skel
3) Copy the file into the PVC (example: update Release.gpg for OpenSUSE)
If you have the correct Release.gpg on your local machine, copy it to the desired location in the PVC:
kubectl -n hamravesh-mirror cp \
Release.gpg \
syncer-aux-6dc59cc864-dtjfz:/var/spool/apt-mirror/mirror/download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.28/xUbuntu_22.04/Release.gpg
After this, the file is updated in the mirror data.