Markdown Converter
Agent skill for markdown-converter
CRI-O is an OCI-based implementation of the Kubernetes Container Runtime
Sign in to like and favorite skills
CRI-O is an OCI-based implementation of the Kubernetes Container Runtime Interface (CRI). It provides a lightweight, production-ready container runtime specifically designed for Kubernetes.
Key Facts:
go.mod for version requirement)maininternal/version/version.godependencies.yaml and
internal/version/version.goProject Scope:
Git Workflow:
-s (signed-off-by) - all commits are DCO compliantgit commit --amend -sgit push --force-with-leaseGitHub Templates:
.github/ISSUE_TEMPLATE/: bug-report, failing-test,
org_member, reviewer).github/PULL_REQUEST_TEMPLATE.md: /kind label, what/why,
fixes, release notes)Documentation:
.md source files (not generated)dependencies.yaml when changing tool versions; verify with
make verify-dependencies/cmd/crio/ - Main daemon entry point /internal/ - Internal packages (~28 packages) ├── config/ - Configuration (seccomp, nri, apparmor, rdt, etc.) ├── lib/ - Core container/sandbox management ├── oci/ - OCI runtime interface ├── storage/ - Image and storage layer └── ... - See ls internal/ for complete list /pkg/ - Public API packages (annotations, config, types) /server/ - CRI gRPC server implementation /test/ - Integration tests (BATS framework) /docs/ - Documentation and man pages /hack/ - Build and development scripts /contrib/ - Systemd units, CNI configs, metrics exporter /pinns/ - Pin namespace utility (C program)
Key Files:
go.mod - Go version and dependenciesMakefile - Build system (see make help)dependencies.yaml - Critical version tracking for all toolsinternal/version/version.go - Version constants# Build (avoid pkg-config dependency with openpgp tag) make BUILDTAGS="containers_image_openpgp containers_image_ostree_stub" \ all test-binaries # Test make testunit # Unit tests (Ginkgo) sudo make localintegration # Integration tests (BATS) sudo -E ./test/test_runner.sh version.bats # Single test sudo -E ./test/test_runner.sh ctr.bats -f 'pattern' # Filter
Key Makefile Targets:
make help for full list
make / make all - Build binaries and docsmake testunit / make localintegration - Run testsmake lint - Run golangci-lint (required before PR)make prettier / make verify-prettier - Format/verify markdown, YAML,
JSON (required before PR)make verify-mdtoc - Verify TOC in markdown filesmake mockgen - Regenerate mocksmake verify-dependencies - Verify dependencies.yamlBuild Variables:
BUILDTAGS, DEBUG=1, PREFIX (default: /usr/local)
Unit Tests (Ginkgo):
*_test.go files, run with make testunit, coverage
in build/coverage/
Integration Tests (BATS):
test/*.bats files, run with
sudo -E ./test/test_runner.sh [file.bats] [-f 'pattern']
Mocks: Regenerate with
make mockgen, located in test/mocks/*/,
committed to git
Files:
/etc/crio/crio.conf (main), /etc/crio/crio.conf.d/*.conf
(drop-ins), /etc/containers/{registries.conf,policy.json,storage.conf}
Generate/Validate:
./bin/crio config [--validate]
Paths: Socket
/var/run/crio/crio.sock, Storage
/var/lib/containers/storage, CNI /etc/cni/net.d/, Hooks
/usr/share/containers/oci/hooks.d
Code Style: Interface-based design, dependency injection, context.Context propagation, fmt.Errorf with %w, logrus with fields, comment on "why" not "what"
File Names:
*_{linux,freebsd}.go (platform), *_test.go (unit),
*.bats (integration), *.md (docs/man pages)
Adding a Feature:
dependencies.yaml if changing toolsmake lint && make prettier && make verify-mdtoc/kind, what/why, fixes, release notesLogs: Set
log_level = "debug" in config (levels: fatal, panic, error,
warn, info, debug, trace)
CLI:
crio [config|status info|status containers|version|wipe|check]
Signals: SIGINT/TERM (shutdown), SIGUSR1 (goroutine dump), SIGUSR2 (GC), SIGHUP (reload hooks)
HTTP API:
curl --unix-socket /var/run/crio/crio.sock \ http://localhost/{info,config,containers/:id}
BUILDTAGS="containers_image_openpgp containers_image_ostree_stub"version.bats not
test/version.bats)sudo -E ./test/test_runner.shgit commit -s.md source, not generated filesmake verify-dependencies after updatesmake lint && make prettier && make verify-mdtoc before pushingLifecycle: Parse config → Create socket (0660) → Init tracing → gRPC+HTTP servers (cmux) → Register CRI services → Write version files → GC storage → Start monitors/hooks → Serve → Graceful shutdown
Stack: OCI runtimes (runc/crun/kata), container-libs (storage/image), CNI, conmon/conmon-rs, gRPC/HTTP/D-Bus, OpenTelemetry
.github/workflows/ci-operator/jobs/cri-o/cri-o/cri-o-cri-o-main-presubmits.yamlci-operator/jobs/cri-o/cri-o/cri-o-cri-o-main-periodics.yamlinstall.mdtutorial.mdcri.md (important for image handling)CONTRIBUTING.mdGOVERNANCE.mdroadmap.mddocs/*.md-s flaggit push --force-with-lease.github/ISSUE_TEMPLATE/) when creating
issues.github/PULL_REQUEST_TEMPLATE.md) when
creating PRsmake verify-dependencies after updating versions.md source files, not generated outputcontainers_image_openpgp to avoid pkg-configsudo -E ./test/test_runner.shmake lint && make prettier && make verify-mdtocdependencies.yaml for current versions (not this file)go.mod, Makefile,
dependencies.yaml)