Skip to content

Omni : problem to use an OnPrem image-factory #711

Closed
@flpajany

Description

@flpajany

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I have installed an image-factory (v0.5.0) in a docker running on my machine where omni OnPrem is running too.
Here is the command I execute :

docker run \
-d \
--net=host \
--cap-add=NET_ADMIN \
--device /dev/net/tun \
--name omni \
--restart unless-stopped \
-v /root/omni/etcd:/_out/etcd \
-v /root/omni/tls.crt:/tls.crt \
-v /root/omni/tls.key:/tls.key \
-v /root/omni/omni.asc:/omni.asc \
-v /root/omni/descriptor.xml:/saml-descriptor \
-v /root/omni/certs:/etc/ssl/certs \
siderolabs/omni:v0.42.3 \
--account-id=$(cat /root/omni/omni-account-uuid) \
--name=onprem-omni \
--enable-break-glass-configs \
--private-key-source=file:///omni.asc \
--event-sink-port=8091 \
--cert=/tls.crt \
--key=/tls.key \
--machine-api-cert=/tls.crt \
--machine-api-key=/tls.key \
--bind-addr=0.0.0.0:443 \
--machine-api-bind-addr=0.0.0.0:8090 \
--k8s-proxy-bind-addr=0.0.0.0:8100 \
--advertised-api-url=https://omni-test.<mydomaine>/ \
--siderolink-api-advertised-url=https://omni-test.<mydomaine>:8090/ \
--siderolink-wireguard-advertised-addr=10.144.18.178:50180 \
--advertised-kubernetes-proxy-url=https://omni-test.<mydomaine>:8100/ \
--auth-saml-enabled=true \
--talos-installer-registry=<mylocal registry>:5005/siderolabs/installer \
--image-factory-pxe-address=https://factory-talos-test.<mydomaine>/ \
--image-factory-address=https://factory-talos-test.<mydomaine>/ \
--auth-saml-metadata=/saml-descriptor

But when I launch an upgrade for a machine, in the logs, I found this line :

[talos] task upgrade (1/1): performing upgrade via "factory.talos.dev/installer/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba:v1.7.7"

It is trying to download the installer from the official factory and not my own.

Asking for help.

Thanks,
Regards

Expected Behavior

I wish to find this line when my machine lauched a talos upgrade :

[talos] task upgrade (1/1): performing upgrade via "factory-talos-test.<mydomaine>/installer/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba:v1.7.7"

Steps To Reproduce

  1. Running a local factory (onPrem)
  2. Launching omni with option --image-factory-address= (onPrem too)

What browsers are you seeing the problem on?

Chrome

Anything else?

I hacked omni code to make it works with standalone machine (in maintenance mode) by doing this :
But to let you know, I make it works by customizing and recompiling omni. factory.talos.dev is hardcoded inside de truescript part :

diff --git a/frontend/src/methods/machine.ts b/frontend/src/methods/machine.ts
index b57084c..c2ffc91 100644
--- a/frontend/src/methods/machine.ts
+++ b/frontend/src/methods/machine.ts
@@ -148,8 +148,8 @@ const copyUserLabels = (src: Resource, dst: Resource) => {

export const updateTalosMaintenance = async (machine: string, talosVersion: string, schematic?: string) => {
const image = schematic ?
- `factory.talos.dev/installer/${schematic}:v${talosVersion}` :
- `ghcr.io/siderolabs/installer:v${talosVersion}`;
+ `factory-talos-test.<mydomaine>/installer/${schematic}:v${talosVersion}` :
+ `app01-lvn-re.phys.rece:5005/siderolabs/installer:v${talosVersion}`;

await MachineService.Upgrade({image}, withRuntime(Runtime.Talos), withContext({
nodes: [machine]

But unfortunely, it is not working for nodes inside a configured cluster : it is still trying to contact factory.talos.dev.

And this time, I can not find any mention of factory.talos.dev in any code (except for tests)...

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