-
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.
fix: report guest uptime to the host (#22)
It appears that the host needs to know the guest's uptime information to determine if a soft reboot was successful. Additionally, the uptime needs to be reported in response to the capabilities request. This commit includes the results of `make rekres`. Signed-off-by: Robin Elfrink <[email protected]>
- Loading branch information
1 parent
fce1dc5
commit e8050cd
Showing
7 changed files
with
123 additions
and
84 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,6 +1,6 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-03-28T13:52:01Z by kres latest. | ||
# Generated on 2024-07-30T11:32:20Z by kres faf91e3. | ||
|
||
name: default | ||
concurrency: | ||
|
@@ -29,26 +29,43 @@ jobs: | |
- self-hosted | ||
- generic | ||
if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/')) | ||
services: | ||
buildkitd: | ||
image: moby/buildkit:v0.13.1 | ||
options: --privileged | ||
ports: | ||
- 1234:1234 | ||
volumes: | ||
- /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit | ||
- /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml | ||
steps: | ||
- name: gather-system-info | ||
id: system-info | ||
uses: kenchan0130/[email protected] | ||
continue-on-error: true | ||
- name: print-system-info | ||
run: | | ||
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024)) | ||
OUTPUTS=( | ||
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}" | ||
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}" | ||
"Hostname: ${{ steps.system-info.outputs.hostname }}" | ||
"NodeName: ${NODE_NAME}" | ||
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}" | ||
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}" | ||
"Name: ${{ steps.system-info.outputs.name }}" | ||
"Platform: ${{ steps.system-info.outputs.platform }}" | ||
"Release: ${{ steps.system-info.outputs.release }}" | ||
"Total memory: ${MEMORY_GB} GB" | ||
) | ||
for OUTPUT in "${OUTPUTS[@]}";do | ||
echo "${OUTPUT}" | ||
done | ||
continue-on-error: true | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Unshallow | ||
run: | | ||
git fetch --prune --unshallow | ||
- name: Set up Docker Buildx | ||
id: setup-buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver: remote | ||
endpoint: tcp://127.0.0.1:1234 | ||
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234 | ||
timeout-minutes: 10 | ||
- name: base | ||
run: | | ||
|
@@ -82,16 +99,17 @@ jobs: | |
run: | | ||
make image-talos-vmtoolsd | ||
- name: push-talos-vmtoolsd-latest | ||
if: github.event_name != 'pull_request' | ||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | ||
env: | ||
PUSH: "true" | ||
run: | | ||
make image-talos-vmtoolsd TAG=latest | ||
make image-talos-vmtoolsd IMAGE_TAG=latest | ||
- name: Generate Checksums | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
sha256sum _out/talos-vmtoolsd-* > _out/sha256sum.txt | ||
sha512sum _out/talos-vmtoolsd-* > _out/sha512sum.txt | ||
cd _out | ||
sha256sum talos-vmtoolsd-* > sha256sum.txt | ||
sha512sum talos-vmtoolsd-* > sha512sum.txt | ||
- name: release-notes | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
|
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# syntax = docker/dockerfile-upstream:1.7.0-labs | ||
# syntax = docker/dockerfile-upstream:1.9.0-labs | ||
|
||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2024-04-01T09:12:09Z by kres latest. | ||
# Generated on 2024-07-30T11:32:20Z by kres faf91e3. | ||
|
||
ARG TOOLCHAIN | ||
|
||
|
@@ -12,28 +12,27 @@ COPY manifest.yaml / | |
COPY talos-vmtoolsd.yaml /rootfs/usr/local/etc/containers/talos-vmtoolsd.yaml | ||
|
||
# runs markdownlint | ||
FROM docker.io/node:21.7.1-alpine3.19 AS lint-markdown | ||
FROM docker.io/oven/bun:1.1.20-alpine AS lint-markdown | ||
WORKDIR /src | ||
RUN npm i -g [email protected] | ||
RUN npm i [email protected] | ||
RUN bun i [email protected] [email protected] | ||
COPY .markdownlint.json . | ||
COPY ./README.md ./README.md | ||
RUN markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js . | ||
RUN bunx markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js . | ||
|
||
# base toolchain image | ||
FROM ${TOOLCHAIN} AS toolchain | ||
FROM --platform=${BUILDPLATFORM} ${TOOLCHAIN} AS toolchain | ||
RUN apk --update --no-cache add bash curl build-base protoc protobuf-dev | ||
|
||
# build tools | ||
FROM --platform=${BUILDPLATFORM} toolchain AS tools | ||
ENV GO111MODULE on | ||
ENV GO111MODULE=on | ||
ARG CGO_ENABLED | ||
ENV CGO_ENABLED ${CGO_ENABLED} | ||
ENV CGO_ENABLED=${CGO_ENABLED} | ||
ARG GOTOOLCHAIN | ||
ENV GOTOOLCHAIN ${GOTOOLCHAIN} | ||
ENV GOTOOLCHAIN=${GOTOOLCHAIN} | ||
ARG GOEXPERIMENT | ||
ENV GOEXPERIMENT ${GOEXPERIMENT} | ||
ENV GOPATH /go | ||
ENV GOEXPERIMENT=${GOEXPERIMENT} | ||
ENV GOPATH=/go | ||
ARG DEEPCOPY_VERSION | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \ | ||
&& mv /go/bin/deep-copy /bin/deep-copy | ||
|
@@ -42,9 +41,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g | |
&& mv /go/bin/golangci-lint /bin/golangci-lint | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \ | ||
&& mv /go/bin/govulncheck /bin/govulncheck | ||
ARG GOIMPORTS_VERSION | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/tools/cmd/goimports@${GOIMPORTS_VERSION} \ | ||
&& mv /go/bin/goimports /bin/goimports | ||
ARG GOFUMPT_VERSION | ||
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \ | ||
&& mv /go/bin/gofumpt /bin/gofumpt | ||
|
@@ -73,15 +69,11 @@ RUN mkdir -p internal/version/data && \ | |
FROM base AS lint-gofumpt | ||
RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'gofumpt -w .':\n${FILES}"; exit 1) | ||
|
||
# runs goimports | ||
FROM base AS lint-goimports | ||
RUN FILES="$(goimports -l -local github.com/siderolabs/talos-vmtoolsd/ .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/siderolabs/talos-vmtoolsd/ .':\n${FILES}"; exit 1) | ||
|
||
# runs golangci-lint | ||
FROM base AS lint-golangci-lint | ||
WORKDIR /src | ||
COPY .golangci.yml . | ||
ENV GOGC 50 | ||
ENV GOGC=50 | ||
RUN golangci-lint config verify --config .golangci.yml | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint --mount=type=cache,target=/go/pkg golangci-lint run --config .golangci.yml | ||
|
||
|
@@ -139,6 +131,6 @@ FROM scratch AS image-talos-vmtoolsd | |
ARG TARGETARCH | ||
COPY --from=talos-vmtoolsd talos-vmtoolsd-linux-${TARGETARCH} /rootfs/usr/local/lib/containers/talos-vmtoolsd/talos-vmtoolsd | ||
COPY --from=extension / / | ||
LABEL org.opencontainers.image.source https://github.com/siderolabs/talos-vmtoolsd | ||
LABEL org.opencontainers.image.source=https://github.com/siderolabs/talos-vmtoolsd | ||
ENTRYPOINT ["/rootfs/usr/local/lib/containers/talos-vmtoolsd/talos-vmtoolsd"] | ||
|
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.