Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1196 commits
Select commit Hold shift + click to select a range
8953b04
Information should be logged on increased verbosity only
iwankgb Jul 28, 2023
2f9ab2e
manager: require higher verbosity level for container info misses
hhromic Oct 10, 2023
5638b0a
build(deps): bump golang.org/x/net from 0.10.0 to 0.17.0 in /cmd
dependabot[bot] Oct 11, 2023
4dcb908
fix: variable naming
ls-2018 Apr 17, 2023
81b16be
add ignored device
Rouzip Mar 19, 2023
bf2a7fe
Adjust the log level of Initialize Plugins
yangjunmyfm192085 Aug 7, 2023
9a30197
container: skip checking for files in non-existent directories.
filippog Oct 10, 2023
d19df4f
Merge pull request #3410 from filippog/get-spec-stat-optimization
iwankgb Oct 29, 2023
2129e1c
Avoid using container/podman in manager.go
dims Oct 31, 2023
db33cc7
add cadvisor and crio upstream changes
kannon92 Sep 13, 2023
86b5eb8
build(deps): bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /cmd
dependabot[bot] Dec 18, 2023
db3c917
Merge pull request #3395 from kannon92/crio-split-disk
iwankgb Dec 21, 2023
04006e5
Merge pull request #3438 from google/dependabot/go_modules/cmd/golang…
iwankgb Dec 30, 2023
a07a947
upgrade actions/checkout and actions/setup-go and actions/upload-arti…
nnnkkk7 Jan 3, 2024
786dbcf
Merge pull request #3443 from nnnkkk7/upgrade-github-actions
iwankgb Jan 13, 2024
b407dcd
reduce_logs_for_kubelet_use_crio
dsxing Jan 18, 2024
13df731
Remove mentions of accelerator from the docs
bobrik Jan 19, 2024
27f1e92
Merge pull request #3458 from bobrik/ivan/no-accelerator
iwankgb Jan 21, 2024
42bb3d1
Merge pull request #3457 from dsxing/reduce_logs_for_kubelet_use_crio
iwankgb Jan 26, 2024
2c1026e
Add note about WebUI auth
bobbypage Jan 30, 2024
35dd21c
Merge pull request #3463 from bobbypage/webui_note
bobbypage Jan 30, 2024
8a9bce5
Remove section about canary image
discapes Feb 24, 2024
51d8705
Merge pull request #3472 from discapes/patch-1
bobbypage Feb 26, 2024
a2b1f51
Bump golang to 1.22
bobbypage Feb 26, 2024
e04a4ea
Bump to bullseye
bobbypage Feb 26, 2024
00724be
Merge pull request #3474 from bobbypage/bump-golang-122
bobbypage Feb 26, 2024
33a6c42
Bump runc to v1.1.12
bobbypage Feb 26, 2024
2aa0394
Update docker
bobbypage Feb 26, 2024
f1ea5f5
Bump grpc
bobbypage Feb 26, 2024
dc8abd3
Bump golang.org/x/net
bobbypage Feb 26, 2024
0fd186c
Merge pull request #3477 from bobbypage/bump-deps-feb-2024
bobbypage Feb 26, 2024
853629c
fix type of C.malloc in cgo
cwangVT Feb 27, 2024
67edf96
fix type of C.malloc in cgo
cwangVT Feb 27, 2024
3b9c146
Ugrade base image to 1.22 and alpine 3.18
cwangVT Feb 27, 2024
a09d865
Disable libipmctl in build
bobbypage Feb 29, 2024
483a3b3
Merge pull request #3483 from bobbypage/fix-make-release
bobbypage Feb 29, 2024
f896582
Remove s390x support
bobbypage Mar 2, 2024
591c814
Merge pull request #3485 from bobbypage/remove-s390x
bobbypage Mar 2, 2024
06f176d
build docker - add --provenance=false flag
bobbypage Mar 2, 2024
570d8a7
Merge pull request #3487 from bobbypage/build-fix
bobbypage Mar 2, 2024
fd630d5
fix broken link to docker document
mghahari Mar 12, 2024
07c7639
build(deps): bump google.golang.org/protobuf in /cmd
dependabot[bot] Mar 13, 2024
fb2bef8
Remove non-existent psi_avg and psi_total from the docs
bobrik Mar 18, 2024
69c1236
build(deps): bump github.com/docker/docker in /cmd
dependabot[bot] Mar 20, 2024
c671890
chore: fix some typos in comments
worrycare Mar 26, 2024
04a5e0e
Update version number in README.md quick start example
narbux Mar 27, 2024
1b6fe97
Merge pull request #3509 from worrycare/master
iwankgb Mar 31, 2024
8b3abae
Merge pull request #3510 from narbux/master
iwankgb Mar 31, 2024
dbc3218
Merge pull request #3504 from google/dependabot/go_modules/cmd/github…
iwankgb Mar 31, 2024
865453d
build(deps): bump github.com/docker/docker
dependabot[bot] Mar 20, 2024
b39a80c
Replacing deprecated property
iwankgb Mar 31, 2024
9e6e411
Merge pull request #3505 from google/dependabot/go_modules/github.com…
iwankgb Mar 31, 2024
4f010fd
Merge pull request #3499 from google/dependabot/go_modules/cmd/google…
iwankgb Mar 31, 2024
c7d1cd5
build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0
dependabot[bot] Mar 31, 2024
2f31c8b
Merge pull request #3498 from google/dependabot/go_modules/google.gol…
iwankgb Mar 31, 2024
4350ea0
Merge pull request #3480 from cwangVT/fix-make-release
iwankgb Apr 1, 2024
1182a63
Merge pull request #3501 from bobrik/ivan/no-psi
iwankgb Apr 1, 2024
54dff2b
Merge pull request #3496 from mojighahar/patch-1
iwankgb Apr 1, 2024
52368c7
feat: add metrics for total_active_file and total_inactive_file memory
Apr 24, 2024
34f50e5
sysfs: trim spaces in device hidden check
clwluvw Apr 24, 2024
5c344ec
Using bookworm images
iwankgb Jun 15, 2024
793d259
libipmctl4 -> libipmctl5
iwankgb Jun 15, 2024
39fbc44
Using Ubuntu 22.04 (bookworm-based) to run unit tests
iwankgb Jun 15, 2024
333c040
Update dependencies to latest
dims Jun 19, 2024
03cd8d7
switch to newer packages for docker
dims Jun 19, 2024
ca6468b
Merge pull request #3540 from iwankgb/bookworm
bobbypage Jun 21, 2024
973f268
doc: fix TCPRcvCollapsed comment
0x0034 Jun 21, 2024
c42160e
Merge pull request #3542 from dims/update-dependencies-to-latest
iwankgb Jun 22, 2024
3bc5bd5
Revert to docker/docker 26.1.4
skitt Jun 24, 2024
31529ff
Add s390/s390x CPU topology
madeelibm Mar 21, 2024
bd65768
Add s390/s390x CPU topology test
madeelibm Jun 11, 2024
105d066
Merge pull request #3516 from madeelibm/s390x-topology
iwankgb Jun 27, 2024
7ea3a90
Merge pull request #3553 from skitt/revert-docker
iwankgb Jun 28, 2024
89f779d
Merge pull request #3550 from 0x0034/doc/fixTCPRcvCollapsedComment
iwankgb Jun 28, 2024
00ef9db
Add s390x support again as thin-provisioning-tools package is now ava…
madeelibm Apr 23, 2024
db6c09c
CI: update busybox image to fix CI
zhangguanzhang Jul 3, 2024
f302fe1
Expose Podman version info
riyad Jul 5, 2024
4905144
Improve error handling when determining Podman (API) version
riyad Jun 30, 2024
f46992f
Merge pull request #3552 from riyad/add-podman-version-info
iwankgb Jul 6, 2024
3864d7f
Merge pull request #3521 from madeelibm/enable-s390x
iwankgb Jul 6, 2024
fe54aa3
Merge pull request #3445 from jrcichra/non_evictable_set
iwankgb Jul 6, 2024
d4fadee
Migrate to AWS Go SDK v2
skitt Nov 22, 2022
36b209e
feat: export cpu uninterruptible metric as load.d
Jun 26, 2024
80e7063
fix test
Jun 26, 2024
f163691
Merge pull request #3555 from j4ckstraw/add-load-d-metrics
iwankgb Jul 8, 2024
2133709
Fix kubelet stuck issue due to hung fs #125298
pragvija Jun 17, 2024
b46650d
Avoiding nil pointer in podmanFactory.CanHandleAndAccept()
iwankgb Jul 6, 2024
8271607
build(deps): bump the go_modules group across 2 directories with 1 up…
dependabot[bot] Jul 9, 2024
b1cd2b9
Merge pull request #3201 from skitt/aws-sdk-v2
iwankgb Jul 11, 2024
07b4075
Merge pull request #3541 from pragvija/master
iwankgb Jul 11, 2024
7c7032b
Merge pull request #3564 from google/dependabot/go_modules/go_modules…
iwankgb Jul 11, 2024
3152233
use containerd/api module instead of third_party
akhilerm May 4, 2024
ad3cbfc
fix gogo/protobuf -> google.golang.org/protobuf
akhilerm May 4, 2024
a3c5683
use Marshal funcs from containerd and fix typeurl
akhilerm May 4, 2024
eca9e05
replace errdefs pkg with containerd/errdefs
akhilerm May 6, 2024
1de4dcb
remove anypb import aliasing
akhilerm Jun 29, 2024
47bd5bf
Update containerd/containerd/api to v1.7.19
akhilerm Jun 29, 2024
6fe1eb0
sort based on goimports
akhilerm Jul 9, 2024
c73fbd8
update typeurl to v2.2.0
akhilerm Jul 11, 2024
ca820b6
Revert "reduce_logs_for_kubelet_use_crio"
uablrek Jul 11, 2024
c9375fe
Merge pull request #3526 from akhilerm/test-containerd-api-module
iwankgb Jul 11, 2024
256737f
Merge pull request #3565 from uablrek/revert-crio-systemd
iwankgb Jul 13, 2024
bc7a83a
nil check .ContainerJSONBase in the podman inspect response
char8 Jul 17, 2024
c15f44e
Merge pull request #3566 from char8/char8/fix-podman-inspect-crash
iwankgb Aug 7, 2024
96c346e
Merge pull request #3522 from clwluvw/hidden-device
iwankgb Oct 4, 2024
472517b
Avoid linting in Prow CI jobs
dims Oct 18, 2024
50fab77
Drop unused setNetworkStats
dims Oct 18, 2024
9764cdc
Merge pull request #3608 from dims/avoid-linting-in-prow-ci-jobs
cwangVT Oct 25, 2024
255cff7
Merge pull request #3609 from dims/drop-unused-setNetworkStats
cwangVT Oct 25, 2024
e69179a
bump containerd related deps: api v1.8.0; errdefs v1.0.0; ttrpc v1.2.6
pacoxu Nov 6, 2024
be773c0
fix golang-ci lint of meatada get with context
pacoxu Dec 16, 2024
5d56ee8
chore: Update Prometheus libraries
SuperQ Jan 18, 2025
074df23
resctrl: fix staticcheck warnings
kolyshkin Oct 25, 2024
5def8b2
container/libcontainer: fix errcheck warning
kolyshkin Oct 25, 2024
e5e0066
cmd/internal/storage/bigquery/client: fix govet warning
kolyshkin Oct 25, 2024
2531201
utils/cpuload/netlink: fix errcheck warnings
kolyshkin Oct 26, 2024
8ee0b22
Makefile: fix golangci-lint install issues
kolyshkin Oct 25, 2024
7ab90ed
ci: bump golangci-lint to v1.61.0
kolyshkin Oct 26, 2024
affc839
build/check_errorf.sh: rm
kolyshkin Oct 26, 2024
4b7cd49
build/integration-in-docker.sh: don't pass arguments to run_test
kolyshkin Oct 26, 2024
5b64902
deps: bump runc to v1.2.4
kolyshkin Jan 23, 2025
b621e78
Replace runc with dqminh/runc for psi support
dqminh Mar 22, 2022
d3fefb9
Expose PSI stats in libcontainer handler
dqminh Mar 22, 2022
6b23ac7
Expose PSI metrics with prometheus
dqminh Mar 22, 2022
103b4be
Add pressure stall information metrics
xinau Jan 26, 2025
94a027c
Add minor improvements to PSI metrics
xinau Jan 26, 2025
e238b08
Use 1e6/9 instead of time for conversion
xinau Jan 26, 2025
20e5af2
Expose PSI metric for CPU full
xinau Jan 27, 2025
5bd422f
Merge pull request #3649 from xinau/xinau/add-psi-metrics
cwangVT Feb 20, 2025
c12dff2
Switch to opencontainers/cgroups repository
dims Feb 28, 2025
d448bc1
Bump from 1.22 to 1.24 golang
dims Feb 28, 2025
0bf663a
Merge pull request #3664 from dims/switch-to-opencontainers-cgroups-r…
cwangVT Mar 4, 2025
8a7da69
Bump to newer opencontainers/image-spec @ v1.1.1
dims Mar 4, 2025
b518a3d
Merge pull request #3666 from dims/bump-to-newer-opencontainers/image…
bobbypage Mar 4, 2025
0b675de
Make resctrl optional/pluggable
dims Mar 4, 2025
8d4c507
fix potential hang on containerd client.LoadContainer
lianghao208 Mar 12, 2025
f6e31a3
Merge pull request #3672 from lianghao208/client-timeout
cwangVT Mar 14, 2025
4b2771f
Bump dependencies to latest
dims Jun 2, 2025
962aef2
Remove usage of deprecated API
dims Jun 2, 2025
f6e42d8
row.Err does not exist anymore
dims Jun 2, 2025
dcbb1f2
fix: fix call Errorf with wrong err
alingse Apr 4, 2025
09f7fba
Fixed possible data race
iwankgb Dec 20, 2024
85d18c6
Use built-in error wrapping instead of pkg/errors (#3689)
skitt Jun 5, 2025
159a7b2
Let us try to use ghcr.io for container images (#3699)
dims Jun 16, 2025
1dd17f0
Add a GH action to create release binaries
dims Jun 16, 2025
0fe6599
use qemu/docker to build arch specific binaries
dims Jun 16, 2025
5adb1c3
add -buildvcs=false to GH action
dims Jun 16, 2025
7eda190
fix(3643) add containerd-snapshotter support
dillon-giacoppo Jun 29, 2025
e748491
Update README.md Docker image reference
eneiss Oct 13, 2025
99fb2a3
Rebase to alpine 3.22, install thin-provisioning-tools from main repo
aptalca Jun 18, 2025
f786603
feat: Update docker container handler to include health status in stats
mateuszdrab May 28, 2024
e7cc79f
add health status tests
mateuszdrab Jan 2, 2025
8d16d26
fix: update dependencies to address security vulnerabilities
dims Dec 2, 2025
67e640d
ci: update Go version to 1.25 in GitHub Actions workflows
dims Dec 2, 2025
4b231e6
fix: handle nil Health state in docker container handler
dims Dec 2, 2025
22fcbb6
chore: update cAdvisor image registry and version in DaemonSet
kahirokunn Sep 18, 2025
e77d032
ci: update Ubuntu version to 24.04 in GitHub Actions workflows
dims Dec 3, 2025
026e791
fix: persist containerd client error to prevent nil pointer dereference
dims Dec 3, 2025
6c3b26a
ci: add diagnostic logging for docker/containerd debugging
dims Dec 3, 2025
29fb78b
refactor: remove Mesos container support
dims Dec 3, 2025
0cbb7e7
fix: use Docker-embedded containerd socket in integration tests
dims Dec 3, 2025
9ad7b85
chore: re-enable golangci-lint checks and fix violations
dims Dec 3, 2025
4b788c6
container/docker: GetStats: prevent nil-pointer
thaJeztah Dec 4, 2025
29ce0a5
manager: use atomic.Int64 for container timestamps
dgrisonnet Dec 3, 2025
a2119b8
manager: reduce lock scope in getSubcontainers
dgrisonnet Dec 3, 2025
20e39fc
manager: replace containersLock with sync.Map
dgrisonnet Dec 3, 2025
16a1230
manager: add contention benchmarks for sync.Map vs RWMutex
dgrisonnet Dec 3, 2025
fd4eb37
manager: introduce typed wrappers to eliminate type assertions
dgrisonnet Dec 4, 2025
558703b
container/podman: fix `zfsFilesystem` and `zfsParent` being swapped.
thaJeztah Dec 4, 2025
627928e
devicemapper: use atomic.Value for lock-free cache reads
dgrisonnet Dec 3, 2025
317a38e
cache/memory: replace lock with sync.Map for container cache
dgrisonnet Dec 3, 2025
387e703
zfs: use atomic.Value for lock-free cache reads
dgrisonnet Dec 3, 2025
692ca30
Fix docker health state
thielepaul Dec 4, 2025
a310a2c
use v20250702-52f5173c3a instead of latest for gcr.io/k8s-staging-te…
thielepaul Dec 5, 2025
3eb5b56
use consistent aliases and re-group imports
thaJeztah Dec 4, 2025
835e76e
container/docker: GetSpec(): fix unhandled errors
thaJeztah Dec 4, 2025
2bd605d
container/(docker|podman) use more generic names
thaJeztah Dec 4, 2025
e7e722c
container/podman: containerhandler: use pointer-receiver
thaJeztah Dec 4, 2025
f044f88
container/(docker|podman): rename var that shadowed import
thaJeztah Dec 4, 2025
d3730df
container/(docker|podman): align code
thaJeztah Dec 4, 2025
b21c1a1
container/docker: inline some vars
thaJeztah Dec 4, 2025
fba17be
disable CGO for fully static binaries
corporate-gadfly Dec 6, 2025
1d8c127
close stale PRs and Issues
dims Dec 9, 2025
8304937
refactor(container): Migrate to std lib context package
Rahul-Lashkari Dec 6, 2025
882f37c
add workflow_dispatch to stale github action
dims Dec 9, 2025
958b9e0
plugin factory: remove useless RegisterPlugin log output
pohly Dec 10, 2025
12bcd66
feat(summary): add count in percentiles
sambhav-jain-16 Sep 16, 2025
1949a00
machine: use unix.ByteSliceToString
tklauser Dec 10, 2025
306df94
machine: use unix.Uname instead of exec'ing uname -s
tklauser Dec 10, 2025
7409324
feat: add LoadTaskProcess api in containerd client
sambhav-jain-16 Aug 20, 2025
e83bda0
feat: add exit code in container deletion events
sambhav-jain-16 Dec 10, 2025
ed6d3b7
feat: add CRI-O integration tests
dims Dec 13, 2025
1e4adf8
test: add additional CRI-O integration tests
dims Dec 13, 2025
aa2c0c0
refactor: remove duplicate tests from api package and add missing CRI…
dims Dec 13, 2025
a1160cf
fix: update golang.org/x/crypto to v0.45.0 to fix security vulnerabil…
dims Dec 13, 2025
5d993f4
container/(docker|podman): rewrite obtaining IP-address
thaJeztah Dec 4, 2025
2cd15f1
Upgrade GitHub Actions to latest versions
salmanmkc Dec 16, 2025
d3d20e8
Upgrade GitHub Actions for Node 24 compatibility
salmanmkc Dec 16, 2025
30bca0d
feat: add fs io cost metrics
sambhav-jain-16 Dec 12, 2025
19a4038
go.mod: github.com/docker/go-connections v0.6.0
thaJeztah Dec 4, 2025
28ecaa9
fs: introduce pluggable filesystem architecture
dims Dec 17, 2025
947b271
apply build tags liberally
dims Dec 18, 2025
cca9bd3
Replace godirwalk with os.ReadDir from standard library
dims Dec 18, 2025
e4d5281
add cpu burst metrics
sambhav-jain-16 Dec 12, 2025
f5bec37
manager: fix race condition in Stop() using sync.Once
dims Dec 19, 2025
539ac2e
Expose s390x CPU Topology to Prometheus
madeelibm Oct 21, 2024
da35254
docs: replace references to docker registry `gcr.io` with `ghcr.io`
luckv Dec 24, 2025
e054fca
Fix for issue #3772
benji2k2 Dec 17, 2025
cc34eee
Update factory.go
benji2k2 Dec 17, 2025
e8a6bd6
Update factory.go
benji2k2 Dec 17, 2025
94c3a66
Update factory.go
benji2k2 Dec 17, 2025
f282c43
Update container/docker/factory.go
benji2k2 Dec 18, 2025
4810e82
fix formatting
sambhav-jain-16 Dec 19, 2025
25b5adf
add std in summary
sambhav-jain-16 Dec 17, 2025
df9709e
Add entrypoint wrapper to preserve -logtostderr flag
dylandacosta8 Dec 14, 2025
a2939e7
Fix healthcheck to respect custom port flag
dylandacosta8 Dec 14, 2025
36ce899
Add EXPOSE 8080 to document default port
dylandacosta8 Dec 14, 2025
7f1ae52
Added cadvisor boilerplate header to deploy/healthcheck.sh
dylandacosta8 Dec 16, 2025
d3b5bdb
Added cadvisor boilerplate header to deploy/entrypoint.sh
dylandacosta8 Dec 16, 2025
bd6b078
Update copyright year in entrypoint.sh
dylandacosta8 Dec 16, 2025
8235739
Update copyright year in healthcheck.sh
dylandacosta8 Dec 16, 2025
954497f
update README
SirSobhan0 Jan 7, 2026
cb7b871
Update containerd, docker, moby, and opencontainers dependencies
dims Jan 14, 2026
b20bcf1
docker: migrate to github.com/moby/moby modules
thaJeztah Dec 4, 2025
ea0f88a
Update entrypoint.sh
benji2k2 Jan 15, 2026
2d5bbad
Update healthcheck.sh
benji2k2 Jan 15, 2026
7cbdee9
docker: fix nil pointer dereference when GraphDriver is nil
dims Jan 16, 2026
4344f86
integration: add more Docker container handler tests
dims Jan 16, 2026
1b3e95c
integration: add containerd container handler tests
dims Jan 16, 2026
cd83a52
integration: add Prometheus metrics endpoint tests
dims Jan 16, 2026
dc19c7e
feat: support podman volatile containers
savely-krasovsky May 10, 2025
83b03e1
Fix early return when containers.json does not exist.
sirno Sep 9, 2025
566cb63
Relay `os.ErrNotExists` when both `containers.json` and `volatile-con…
sirno Jan 16, 2026
e6bec44
proposed roadmap for cAdvisor
SergeyKanzhelev Jan 22, 2026
01b350f
Update docs/roadmap.md
SergeyKanzhelev Jan 23, 2026
f1cb8ce
remove log message when you can't read productName
kannon92 Feb 17, 2026
c4bc8f6
Refactor Github Action per b/485167538
benknutson-google Feb 18, 2026
95ed8cd
fix crio deadlock in getting crio sandbox containers
olyazavr Feb 11, 2026
f407c8f
remove unused
olyazavr Feb 23, 2026
74dda38
check cgroup driver from info endpoint
olyazavr Feb 23, 2026
711f2be
Fix start/creation time metrics in docker, podman and containerd
ultinous-akos Mar 5, 2026
6bd8f1d
deps: bump github.com/containerd/ttrpc v1.2.8
thaJeztah Apr 10, 2026
e1ccfa9
deps: github.com/moby/moby/client v0.4.0, moby/api v1.54.1
thaJeztah Apr 10, 2026
c66ec64
update k8s-staging-test-infra image in integ tests
sambhav-jain-16 Apr 13, 2026
e010e8f
fix(test/integration): fix TestDockerContainerSpec
sambhav-jain-16 Apr 14, 2026
36630c3
feat(manager): add constraint data in OOM events
sambhav-jain-16 Apr 1, 2026
b5f55c0
test(integration): add integration test for oom constraint
sambhav-jain-16 Apr 2, 2026
c8138ce
add initial splay and max jitter factors
sambhav-jain-16 Mar 17, 2026
d45869d
fix: add v-prefixed GHCR image tags for consistency with GitHub Releases
hwan515 Mar 26, 2026
cfb5115
build(deps): bump the go_modules group across 2 directories with 1 up…
dependabot[bot] Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
73 changes: 73 additions & 0 deletions .github/workflows/publish-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Publish Container Image

on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to build and publish'
required: true
type: string

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Free disk space
run: |
echo "Disk space before cleanup:"
df -h
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
sudo docker builder prune -a -f
echo "Disk space after cleanup:"
df -h

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern=v{{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ github.event_name != 'workflow_dispatch' && github.ref == format('refs/tags/{0}', github.ref_name) }}
type=raw,value=${{ github.event.inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' }}
type=sha,prefix=,suffix=-${{ github.sha }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./deploy/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
112 changes: 112 additions & 0 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Release Binaries

on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to build and publish'
required: true
type: string

jobs:
build-linux-binaries:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
fetch-depth: 0 # Fetch all history for proper versioning

- name: Set up Docker
uses: docker/setup-buildx-action@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64

- name: Set VERSION environment variable
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "VERSION=${INPUTS_TAG}" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
env:
INPUTS_TAG: ${{ inputs.tag }}

- name: Build Linux ${{ matrix.arch }} binary
env:
GOARCH: ${{ matrix.arch }}
OUTPUT_NAME_WITH_ARCH: "true"
VERSION: ${{ env.VERSION }}
run: |
# Create a Docker container with the appropriate architecture
docker run --rm -v ${PWD}:/go/src/github.com/google/cadvisor \
--platform linux/${{ matrix.arch }} \
golang:1.25 \
/bin/bash -c "cd /go/src/github.com/google/cadvisor && GOARCH=${{ matrix.arch }} OUTPUT_NAME_WITH_ARCH=true VERSION=${VERSION} GO_FLAGS='-buildvcs=false -tags=netgo' GO_CGO_ENABLED=0 ./build/build.sh"

- name: Generate SHA256 checksums
run: |
cd _output
# List all files in the output directory
ls -la
# Generate SHA256 checksums for all binaries
find . -name "cadvisor*" -type f -not -name "*.sha256" -exec sh -c 'sha256sum "$1" > "$1.sha256"' _ {} \;

- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
name: cadvisor-linux-${{ matrix.arch }}
path: |
_output/cadvisor*
retention-days: 1

create-release:
needs: build-linux-binaries
runs-on: ubuntu-latest
permissions:
contents: write # Needed for creating GitHub releases
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}

- name: Set VERSION environment variable
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "VERSION=${INPUTS_TAG}" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
env:
INPUTS_TAG: ${{ inputs.tag }}

- name: Download all artifacts
uses: actions/download-artifact@v7
with:
path: artifacts

- name: Display structure of downloaded files
run: ls -R artifacts

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.VERSION }}
name: cAdvisor ${{ env.VERSION }}
draft: false
prerelease: ${{ contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta') || contains(env.VERSION, 'rc') }}
generate_release_notes: true
files: |
artifacts/**/*
30 changes: 30 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Stale issues and pull requests

on:
schedule:
- cron: "21 4 * * *"
workflow_dispatch:

jobs:
stale:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest

steps:
- uses: actions/stale@v10
with:
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. This issue will be closed in 30 days unless new comments are made or the stale label is removed. To skip these checks, apply the "lifecycle/frozen" label.'
stale-pr-message: 'This PR is stale because it has been open 90 days with no activity. This PR will be closed in 30 days unless new comments are made or the stale label is removed. To skip these checks, apply the "lifecycle/frozen" label.'
stale-issue-label: 'lifecycle/stale'
stale-pr-label: 'lifecycle/stale'
exempt-issue-labels: 'lifecycle/frozen'
exempt-pr-labels: 'lifecycle/frozen'
days-before-stale: 90
close-issue-message: 'This issue was automatically closed due to inactivity.'
close-pr-message: 'This pull request was automatically closed due to inactivity.'
days-before-issue-close: 30
days-before-pr-close: 30
remove-stale-when-updated: true
operations-per-run: 300
94 changes: 94 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go-versions: ['1.25']
platform: [ubuntu-24.04]
environment-variables: [build/config/plain.sh, build/config/libpfm4.sh, build/config/libipmctl.sh]
runs-on: ${{ matrix.platform }}
timeout-minutes: 30
steps:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-versions }}
check-latest: true
- name: Checkout code
uses: actions/checkout@v6
- name: Run presubmit checks
run: |
source ${{ matrix.environment-variables }}
if [[ "${BUILD_PACKAGES}" != "" ]]; then sudo apt-get update; sudo apt-get install ${BUILD_PACKAGES}; fi
make -e presubmit
- name: Run tests
env:
GOLANG_VERSION: ${{ matrix.go-versions }}
run: |
source ${{ matrix.environment-variables }}
make test
test-integration:
strategy:
matrix:
include:
# bookworm: all environment configs
- go-versions: '1.25'
platform: ubuntu-24.04
environment-variables: build/config/plain.sh
debian-version: bookworm
- go-versions: '1.25'
platform: ubuntu-24.04
environment-variables: build/config/libpfm4.sh
debian-version: bookworm
- go-versions: '1.25'
platform: ubuntu-24.04
environment-variables: build/config/libipmctl.sh
debian-version: bookworm
# trixie: only plain config
- go-versions: '1.25'
platform: ubuntu-24.04
environment-variables: build/config/plain.sh
debian-version: trixie
runs-on: ${{ matrix.platform }}
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Run integration tests
env:
GOLANG_VERSION: ${{ matrix.go-versions }}
DEBIAN_VERSION: ${{ matrix.debian-version }}
run: |
set -ex
source ${{ matrix.environment-variables }}
make docker-test-integration
- name: Upload cAdvisor log file
uses: actions/upload-artifact@v6
if: failure()
with:
name: cadvisor-${{ matrix.debian-version }}.log
path: ${{ github.workspace }}/go/src/github.com/google/cadvisor/cadvisor.log
test-integration-crio:
strategy:
matrix:
go-versions: ['1.25']
platform: [ubuntu-24.04]
runs-on: ${{ matrix.platform }}
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Run CRI-O integration tests
env:
GOLANG_VERSION: ${{ matrix.go-versions }}
run: |
set -ex
source build/config/crio.sh
make docker-test-integration-crio
- name: Upload cAdvisor log file
uses: actions/upload-artifact@v6
if: failure()
with:
name: cadvisor-crio.log
path: ${{ github.workspace }}/go/src/github.com/google/cadvisor/cadvisor.log
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
cadvisor
/release
.vscode
_output/

# Log files
*.log

# Go test binaries
*.test

# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA
.idea/
*.iml
*.swp
62 changes: 62 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
version: "2"

run:
timeout: 5m

linters:
default: none
enable:
- govet
- errcheck
- staticcheck
- unused
- ineffassign
settings:
govet:
disable:
- fieldalignment # too noisy, requires significant refactoring
errcheck:
exclude-functions:
- (io.Closer).Close
- (net.Conn).Close
- (*os.File).Close
- (net/http.ResponseWriter).Write
- os.Remove
- os.RemoveAll
- os.Setenv
- fmt.Fprint
- fmt.Fprintf
- fmt.Fprintln
- syscall.Close
staticcheck:
checks:
- "all"
- "-ST1000" # package comments - too noisy for existing codebase
- "-ST1003" # naming conventions (e.g., CrioId vs CrioID) - would break public API
- "-ST1020" # comment format on exported methods - too many to fix
- "-ST1021" # comment format on exported types - too many to fix
- "-ST1022" # comment format on exported consts - too many to fix
- "-QF*" # disable quickfix suggestions
exclusions:
rules:
# Exclude errcheck in test files for cleaner test code
- linters:
- errcheck
path: "_test\\.go$"
# Exclude errcheck for Close() calls on any type
- linters:
- errcheck
text: "Error return value of .*.Close.* is not checked"
# Exclude govet printf check false positives
- linters:
- govet
text: "printf: non-constant format string"

formatters:
enable:
- gofmt
- goimports

issues:
max-issues-per-linter: 0
max-same-issues: 0
Loading