The system-default-registry
Setting default value comes from CATTLE_BASE_REGISTRY
env.
In the r/r
chart we provide a field systemDefaultRegistry
which sets the CATTLE_SYSTEM_DEFAULT_REGISTRY
value - this is the auto cattle Env for the setting.
This can be found used in 2 domains - first where it is set and used is cattle-cluster-agent-bootstrap
deployment.
In the cluster agent template we see the Env set to a ClusterRegistry
value.
This is further traced to GeneratePrivateRegistryEncodedDockerConfig
which ultimately fetches the registry from GetPrivateRegistry(cluster)
.
Which finally we find uses the logic of: a) if private registry set on cluster return that, or b) fetch and return SystemDefaultRegistry
as URL.
The second place it is used is found within the Rancher agent hot path.
The main.go
for the agent and various Rancher run methods will utilize this at startup.
Ultimately it is stored into ClusterRegistry
on the Agents rancher.Options
- this is then used by the system chart installer used on downstreams.