-
Notifications
You must be signed in to change notification settings - Fork 14
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
Showing
9 changed files
with
289 additions
and
94 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,12 +1,23 @@ | ||
# For development only. | ||
# This Makefile is not being used by Dockerfile or GitHub actions. | ||
|
||
REGISTRY ?= ghcr.io | ||
USERNAME ?= sidereolabs | ||
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: | ||
go build -ldflags="-s -w" -trimpath -o $@ ./cmd/$@ | ||
|
||
docker-build: | ||
docker buildx build . --tag talos-vmtoolsd:$(SHA) --file Dockerfile | ||
docker buildx build . --tag $(REGISTRY_AND_USERNAME)/${IMAGE_NAME}:$(IMAGE_TAG) --file Dockerfile | ||
|
||
docker-build-extension: | ||
docker buildx build . --tag $(REGISTRY_AND_USERNAME)/${IMAGE_NAME}-system-extension:$(IMAGE_TAG) --file system-extension/Dockerfile | ||
|
||
.PHONY: talos-vmtoolsd docker-build | ||
.PHONY: talos-vmtoolsd docker-build docker-build-extension |
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.