canonical / k8s-snap

Canonical Kubernetes is an opinionated and CNCF conformant Kubernetes operated by Snaps and Charms, which come together to bring simplified operations and an enhanced security posture on any infrastructure.
GNU General Public License v3.0
20 stars 6 forks source link

Sync Calico CNI images from upstream #506

Closed mateoflorido closed 2 weeks ago

mateoflorido commented 2 weeks ago

Overview

Sync Calico CNI images from upstream to the ghcr.io registry.

Rationale

We have encountered that we hit the rate limits of DockerHub. This pull request mirrors the images we are using in Calico to ghcr.io, allowing the k8s snap to pull them from there instead of DockerHub.

Testing

Events:
  Type     Reason     Age   From               Message
  ----     ------     ----  ----               -------
  Normal   Scheduled  21s   default-scheduler  Successfully assigned calico-system/calico-node-ps4zh to kcp-1
  Normal   Pulled     22s   kubelet            Container image "ghcr.io/canonical/k8s-snap/calico/pod2daemon-flexvol:v3.28.0" already present on machine
  Normal   Created    22s   kubelet            Created container flexvol-driver
  Normal   Started    22s   kubelet            Started container flexvol-driver
  Normal   Pulling    21s   kubelet            Pulling image "ghcr.io/canonical/k8s-snap/calico/cni:v3.28.0"
  Normal   Pulled     15s   kubelet            Successfully pulled image "ghcr.io/canonical/k8s-snap/calico/cni:v3.28.0" in 5.746s (5.746s including waiting). Image size: 94536228 bytes.
  Normal   Created    15s   kubelet            Created container install-cni
  Normal   Started    15s   kubelet            Started container install-cni
  Normal   Pulling    14s   kubelet            Pulling image "ghcr.io/canonical/k8s-snap/calico/node:v3.28.0"
  Normal   Pulled     7s    kubelet            Successfully pulled image "ghcr.io/canonical/k8s-snap/calico/node:v3.28.0" in 7.202s (7.202s including waiting). Image size: 115239232 bytes.
  Normal   Created    7s    kubelet            Created container calico-node
  Normal   Started    7s    kubelet            Started container calico-node
  Warning  Unhealthy  6s    kubelet            Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/bird/bird.ctl: connect: no such file or directory
  Warning  Unhealthy  5s    kubelet            Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/calico/bird.ctl: connect: connection refused
mateoflorido commented 2 weeks ago

Also needs

https://github.com/canonical/k8s-snap/blob/2e29d066681c32ccc97392ba3ecef8d771454d86/src/k8s/pkg/k8sd/features/calico/register.go#L13-L36

I have checked and all the images are already in the upstream-images.yaml file. Is there anything else you would like to sync from upstream?