cocoon-common

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2026 License: MIT

README

cocoon-common

Shared Go packages for cocoonstack services.

Overview

  • meta -- shared annotation keys, label keys, toleration keys, and VM naming rules
  • k8s -- Kubernetes client config bootstrap with the standard kubeconfig fallback chain
  • log -- common log setup for cocoonstack binaries using projecteru2/core/log

This repository exists to keep cross-project contracts in one place instead of re-exporting them from cocoon-operator. cocoon-webhook, glance, vk-cocoon, and cocoon-operator all consume the same package set directly.

Packages

meta

Use meta for:

  • Cocoon annotation and label constants
  • stable VM naming helpers
  • slot extraction and role inference
  • toolbox connection type detection
k8s

Use k8s.LoadConfig() to resolve cluster configuration from:

  1. KUBECONFIG
  2. ~/.kube/config
  3. in-cluster config
log

Use log.Setup(ctx, envVar) to initialize the shared logger from an environment variable, defaulting to info.

Development

make build
make test
make lint
make fmt
make help
Project Role
cocoon-operator CocoonSet and Hibernation controllers
cocoon-webhook Admission webhook for sticky scheduling
glance Browser dashboard for Cocoon VMs
vk-cocoon Virtual kubelet provider

License

MIT

Directories

Path Synopsis
Package log provides a shared log initialization function for cocoonstack projects.
Package log provides a shared log initialization function for cocoonstack projects.
Package meta defines shared metadata keys and naming rules used across Cocoon controllers, webhooks, dashboards, and providers.
Package meta defines shared metadata keys and naming rules used across Cocoon controllers, webhooks, dashboards, and providers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL