siderolabs / image-factory

A service to generate Talos boot assets
Mozilla Public License 2.0
60 stars 16 forks source link

[feat] Add an endpoint to generate patch from schematic #150

Closed TMaYaD closed 4 weeks ago

TMaYaD commented 4 weeks ago

Currently this can be done on the client machine using a script to post the schematic to get an id and then using sed to generate

machine:
  install:
    image: factory.talos.dev/installer/<id>:v1.7.6

It works but not elegant.

Having an end point that returns the patch directly would simplify the ops to

curl -X POST --data-binary @schematics.yaml https://factory.talos.dev/schematics-patch -o installer.patch.yaml

talosctl gen config \
  --with-secrets secrets.yaml \
  --config-patch @installer.patch.yaml \
  --config-patch @my-other-patches.patch.yaml \
  talos https://10.10.10.6:6443
smira commented 4 weeks ago

talosctl gen config supports --install-image directly, not need to generate a patch this way.

TMaYaD commented 3 weeks ago

FWIW it still needs an additional step of converting {"id":"d9ff89777e246792e7642abd3220a616afb4e49822382e4213a2e528ab826fe5"} to factory.talos.dev/installer/d9ff89777e246792e7642abd3220a616afb4e49822382e4213a2e528ab826fe5

easier than 3 lines, but not very elegant.