-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add flag -use-machined for Talos system extension
Flag '-use-machined' switches from using the TALOS_CONFIG_PATH and TALOS_HOST, to the Talos constants.MachineSocketPath at /system/run/machined/machine.sock. This is in support of creating a Talos system extension docker image to run talos-vmtoolsd as early in the boot process as possible. Thanks to @flyik for the code inspiration.
- Loading branch information
Brandon Nason
committed
Apr 7, 2023
1 parent
997a962
commit 9babe86
Showing
9 changed files
with
180 additions
and
35 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,21 @@ | ||
REGISTRY ?= ghcr.io | ||
USERNAME ?= mologie | ||
SHA ?= $(shell git describe --match=none --always --abbrev=8 --dirty) | ||
TAG ?= $(shell git describe --tag --always --dirty --match v[0-9]\*) | ||
ABBREV_TAG ?= $(shell git describe --tag --always --match v[0-9]\* --abbrev=0 ) | ||
TAG_SUFFIX ?= | ||
SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct) | ||
IMAGE_REGISTRY ?= $(REGISTRY) | ||
IMAGE_NAME = talos-vmtoolsd | ||
IMAGE_TAG ?= $(TAG)$(TAG_SUFFIX) | ||
BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD) | ||
REGISTRY_AND_USERNAME := $(IMAGE_REGISTRY)/$(USERNAME) | ||
|
||
talos-vmtoolsd: | ||
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o $@ ./cmd/$@ | ||
|
||
.PHONY: talos-vmtoolsd | ||
docker-build: | ||
docker build . -t $(REGISTRY_AND_USERNAME)/${IMAGE_NAME}:$(IMAGE_TAG) | ||
docker build . -t $(REGISTRY_AND_USERNAME)/${IMAGE_NAME}-system-extension:$(IMAGE_TAG) -f ./system-extension/Dockerfile | ||
|
||
.PHONY: talos-vmtoolsd docker-build |
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
Oops, something went wrong.