Skip to content

Commit

Permalink
feat: add talos-vmtoolsd extension
Browse files Browse the repository at this point in the history
Add talos-vmtoolsd as an official extension

Signed-off-by: Eddie Garcia <[email protected]>
  • Loading branch information
JinxCappa committed Apr 2, 2024
1 parent 9d4f24f commit d8139b6
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
- realtek-firmware
- stargz-snapshotter
- tailscale
- talos-vmtoolsd
- thunderbolt
- usb-modem-drivers
- util-linux-tools
Expand Down Expand Up @@ -58,9 +59,9 @@ spec:
---
kind: common.Build
spec:
ignoredPaths:
- "internal/extensions/image-digests"
- "internal/extensions/descriptions.yaml"
ignoredPaths:
- "internal/extensions/image-digests"
- "internal/extensions/descriptions.yaml"
---
kind: auto.CustomSteps
spec:
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ TARGETS += qlogic-firmware
TARGETS += realtek-firmware
TARGETS += stargz-snapshotter
TARGETS += tailscale
TARGETS += talos-vmtoolsd
TARGETS += thunderbolt
TARGETS += usb-modem-drivers
TARGETS += util-linux-tools
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ cosign verify --certificate-identity-regexp '@siderolabs\.com$' --certificate-oi
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------ |
| [qemu-guest-agent](guest-agents/qemu-guest-agent/) | [ghcr.io/siderolabs/qemu-guest-agent](https://github.com/siderolabs/talos-extensions/pkgs/container/qemu-guest-agent) | [QEMU Guest Agent](https://wiki.qemu.org/Features/GuestAgent) | `upstream version` |
| [xe-guest-utilities](guest-agents/xe-guest-utilities/) | [ghcr.io/siderolabs/xe-guest-utilities](https://github.com/siderolabs/talos-extensions/pkgs/container/xe-guest-utilities) | [xe-guest-utilities](https://github.com/xenserver/xe-guest-utilitiest) | `upstream version` |
| [talos-vmtoolsd](guest-agents/talos-vmtoolsd/) | [ghcr.io/siderolabs/talos-vmtoolsd](https://github.com/siderolabs/talos-extensions/pkgs/container/talos-vmtoolsd) | [talos-vmtoolsd](https://github.com/siderolabs/talos-vmtoolsd) | `upstream version` |

### NVIDIA GPU

Expand Down
11 changes: 11 additions & 0 deletions guest-agents/talos-vmtoolsd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# talos-vmtoolsd

Adds talos-vmtoolsd as a system extension.

## Installation

See [Installing Extensions](https://github.com/siderolabs/extensions#installing-extensions).

## Configuration

This extension requires no configuration.
10 changes: 10 additions & 0 deletions guest-agents/talos-vmtoolsd/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: talos-vmtoolsd
version: "$VERSION"
author: Brandon Nason
description: |
This system extension provides talos-vmtoolsd
compatibility:
talos:
version: ">= v1.4.0"
44 changes: 44 additions & 0 deletions guest-agents/talos-vmtoolsd/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: talos-vmtoolsd
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
steps:
- env:
GOPATH: /go
CGO_ENABLED: 0
GOARCH: amd64
GOOS: linux
- sources:
- url: https://github.com/siderolabs/talos-vmtoolsd/archive/refs/tags/{{ .TALOS_VMTOOLSD_VERSION }}.tar.gz
sha256: 9bc28bf5c6e5a3741764358130d9cec5fa8fdbd22bf71175050ac77ed79b2bf0
sha512: 9f6a19d9f569023cec25e2c5293af0879c596d4706f11f3e86fd128d1c27fe52613e868237401b98398fd4f8ba250ed5051c559f9f24afb5c0a84453c6691e2f
destination: talos-vmtoolsd.tar.gz
prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- |
mkdir -p ${GOPATH}/src/github.com/siderolabs/talos-vmtoolsd
tar -xzvf talos-vmtoolsd.tar.gz --strip-components=1 -C ${GOPATH}/src/github.com/siderolabs/talos-vmtoolsd
build:
- |
export PATH=${PATH}:${TOOLCHAIN}/go/bin
cd ${GOPATH}/src/github.com/siderolabs/talos-vmtoolsd
go test -v ./... && \
go vet ./... && \
go build -ldflags="-s -w" -trimpath -o talos-vmtoolsd ./cmd/talos-vmtoolsd
install:
- |
mkdir -p /rootfs/usr/local/lib/containers/talos-vmtoolsd/
cd ${GOPATH}/src/github.com/siderolabs/talos-vmtoolsd
cp talos-vmtoolsd /rootfs/usr/local/lib/containers/talos-vmtoolsd/
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /
- from: /pkg/talos-vmtoolsd.yaml
to: /rootfs/usr/local/etc/containers/
18 changes: 18 additions & 0 deletions guest-agents/talos-vmtoolsd/talos-vmtoolsd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: talos-vmtoolsd
container:
entrypoint: ./talos-vmtoolsd
args:
- --use-machined
mounts:
- source: /system/run/machined/machine.sock
destination: /system/run/machined/machine.sock
type: bind
options:
- rshared
- rbind
- rw
depends:
- path: /system/run/machined/machine.sock
- network:
- addresses
restart: always
1 change: 1 addition & 0 deletions guest-agents/talos-vmtoolsd/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION: "{{ .TALOS_VMTOOLSD_VERSION }}"
2 changes: 2 additions & 0 deletions guest-agents/vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ GLIB_VERSION: 2.80.0
PCRE2_VERSION: 10.42
# renovate: datasource=git-tags depName=https://gitlab.com/xen-project/xen-guest-agent.git
XEN_GUEST_AGENT_VERSION: 0.4.0
# renovate: datasource=github-releases extractVersion=^(?<version>.*)$ depName=siderolabs/talos-vmtoolsd
TALOS_VMTOOLSD_VERSION: 0.5.0

0 comments on commit d8139b6

Please sign in to comment.