Skip to content

Priority of autoconfigured mirrors #765

@thejoeejoee

Description

@thejoeejoee

Spegel version

v0.0.30

Kubernetes distribution

custom kubeadm

Kubernetes version

1.31.5

CNI

cilium

Describe the bug

Currently, the configuration init container configures the order of mirrors as following:

- --mirror-targets
- http://$(NODE_IP):{{ .Values.service.registry.hostPort }}
- http://$(NODE_IP):{{ .Values.service.registry.nodePort }}

which leads to expected order in hosts.toml (order of hosts matters here):

server = 'internal'

[host.'http://10.245.0.49:30020']
capabilities = ['pull', 'resolve']

[host.'http://10.245.0.49:30021']
capabilities = ['pull', 'resolve'

What is the reasoning behind this order?

In my perception, using the NodePort as first mirror would be more meaningful,
since it's the responsibility of local Spegel to do the lookup for an image/blob.

Using the HostPort service as the first mirror introduces the unnecessary network hop
even if the local spegel is able to resolve the image via p2p.

Also, the infrastrusture schema doesn't correspond to the order, schema is showing that 30020 is local Spegel instance, which is not true, it's balanced HostPort.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions