-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the new metal agent extension to run Talos in metal agent mode. Related to siderolabs/talos#9501. Signed-off-by: Utku Ozdemir <[email protected]>
- Loading branch information
1 parent
966aaed
commit e2a26c0
Showing
9 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# metal-agent | ||
|
||
Adds [talos-metal-agent](https://github.com/siderolabs/talos-metal-agent) as a system extension. | ||
|
||
## Installation | ||
|
||
See [Installing Extensions](https://github.com/siderolabs/extensions#installing-extensions). | ||
|
||
## Configuration | ||
|
||
This extension requires no configuration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: v1alpha1 | ||
metadata: | ||
name: metal-agent | ||
version: "$VERSION" | ||
author: Sidero Labs | ||
description: | | ||
This system extension provides talos-metal-agent | ||
compatibility: | ||
talos: | ||
version: ">= 1.9.0-alpha.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: metal-agent | ||
container: | ||
entrypoint: ./talos-metal-agent | ||
args: [] | ||
mounts: | ||
- source: /system/run/machined/machine.sock | ||
destination: /system/run/machined/machine.sock | ||
type: bind | ||
options: | ||
- rshared | ||
- rbind | ||
- source: /dev | ||
destination: /dev | ||
type: bind | ||
options: | ||
- rshared | ||
- rbind | ||
- rw | ||
depends: | ||
- path: /system/run/machined/machine.sock | ||
- network: | ||
- addresses | ||
restart: always | ||
logToConsole: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: metal-agent | ||
variant: scratch | ||
dependencies: | ||
- stage: base | ||
|
||
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/fhs:{{ .BUILD_ARG_PKGS }}" | ||
from: / | ||
to: /rootfs/usr/local/lib/containers/metal-agent | ||
|
||
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/ca-certificates:{{ .BUILD_ARG_PKGS }}" | ||
from: / | ||
to: /rootfs/usr/local/lib/containers/metal-agent | ||
|
||
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/openssl:{{ .BUILD_ARG_PKGS }}" | ||
from: / | ||
to: /rootfs/usr/local/lib/containers/metal-agent | ||
|
||
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/musl:{{ .BUILD_ARG_PKGS }}" | ||
from: / | ||
to: /rootfs/usr/local/lib/containers/metal-agent | ||
|
||
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/ipmitool:{{ .BUILD_ARG_PKGS }}" | ||
from: / | ||
to: /rootfs/usr/local/lib/containers/metal-agent | ||
|
||
- image: "{{ .IMAGE_PREFIX }}/talos-metal-agent:{{ .VERSION }}" | ||
from: / | ||
to: /rootfs/usr/local/lib/containers/metal-agent | ||
steps: | ||
- prepare: | ||
- | | ||
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml | ||
install: | ||
- | | ||
mkdir -p /rootfs/usr/local/etc/containers | ||
cp /pkg/metal-agent.yaml /rootfs/usr/local/etc/containers/ | ||
- | | ||
touch /rootfs/usr/local/etc/is-metal-agent | ||
test: | ||
- | | ||
mkdir -p /extensions-validator-rootfs | ||
cp -r /rootfs/ /extensions-validator-rootfs/rootfs | ||
cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml | ||
/extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}" | ||
finalize: | ||
- from: /rootfs | ||
to: /rootfs | ||
- from: /pkg/manifest.yaml | ||
to: / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VERSION: "{{ .TALOS_METAL_AGENT_VERSION }}" | ||
IMAGE_PREFIX: ghcr.io/siderolabs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters