README

apimachinery

Scheme, typing, encoding, decoding, and conversion packages for Kubernetes and Kubernetes-like API objects.

Purpose

This library is a shared dependency for servers and clients to work with Kubernetes API infrastructure without direct type dependencies. Its first consumers are k8s.io/kubernetes, k8s.io/client-go, and k8s.io/apiserver.

Compatibility

There are NO compatibility guarantees for this repository. It is in direct support of Kubernetes, so branches will track Kubernetes and be compatible with that repo. As we more cleanly separate the layers, we will review the compatibility guarantee.

Where does it come from?

apimachinery is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery. Code changes are made in that location, merged into k8s.io/kubernetes and later synced here.

Things you should NOT do

  1. Add API types to this repo. This is for the machinery, not for the types.
  2. Directly modify any files under pkg in this repo. Those are driven from k8s.io/kubernetes/staging/src/k8s.io/apimachinery.
  3. Expect compatibility. This repo is direct support of Kubernetes and the API isn't yet stable enough for API guarantees.
Expand ▾ Collapse ▴

Directories

Path Synopsis
pkg/api/apitesting
pkg/api/apitesting/fuzzer
pkg/api/apitesting/naming
pkg/api/apitesting/roundtrip
pkg/api/equality
pkg/api/errors Package errors provides detailed error types for api field validation.
pkg/api/meta Package meta provides functions for retrieving API metadata from objects belonging to the Kubernetes API TODO: move everything in this file to pkg/api/rest
pkg/api/meta/table
pkg/api/meta/testrestmapper
pkg/api/resource
pkg/api/validation Package validation contains generic api type validation functions.
pkg/api/validation/path
pkg/apis/meta/fuzzer
pkg/apis/meta/internalversion
pkg/apis/meta/internalversion/scheme
pkg/apis/meta/internalversion/validation
pkg/apis/meta/v1 Package v1 contains API types that are common to all versions.
pkg/apis/meta/v1/unstructured
pkg/apis/meta/v1/unstructured/unstructuredscheme
pkg/apis/meta/v1/validation
pkg/apis/meta/v1beta1 package v1beta1 is alpha objects from meta that will be introduced.
pkg/apis/meta/v1beta1/validation
pkg/apis/testapigroup +k8s:deepcopy-gen=package +groupName=testapigroup.apimachinery.k8s.io package testapigroup contains an testapigroup API used to demonstrate how to create api groups.
pkg/apis/testapigroup/fuzzer
pkg/apis/testapigroup/install Package install installs the certificates API group, making it available as an option to all of the API encoding/decoding machinery.
pkg/apis/testapigroup/v1
pkg/conversion Package conversion provides go object versioning.
pkg/conversion/queryparams Package queryparams provides conversion from versioned runtime objects to URL query values
pkg/fields Package fields implements a simple field system, parsing and matching selectors with sets of fields.
pkg/labels Package labels implements a simple label system, parsing and matching selectors with sets of labels.
pkg/runtime Package runtime defines conversions between generic types and structs to map query strings to struct objects.
pkg/runtime/schema
pkg/runtime/serializer
pkg/runtime/serializer/json
pkg/runtime/serializer/protobuf Package protobuf provides a Kubernetes serializer for the protobuf format.
pkg/runtime/serializer/recognizer
pkg/runtime/serializer/streaming Package streaming implements encoder and decoder for streams of runtime.Objects over io.Writer/Readers.
pkg/runtime/serializer/versioning
pkg/runtime/serializer/yaml
pkg/runtime/testing
pkg/selection
pkg/test
pkg/types Package types implements various generic types used throughout kubernetes.
pkg/util/cache
pkg/util/clock
pkg/util/diff
pkg/util/duration
pkg/util/errors Package errors implements various utility functions and types around errors.
pkg/util/framer Package framer implements simple frame decoding techniques for an io.ReadCloser
pkg/util/httpstream Package httpstream adds multiplexed streaming support to HTTP requests and responses via connection upgrades.
pkg/util/httpstream/spdy
pkg/util/intstr
pkg/util/json
pkg/util/jsonmergepatch
pkg/util/mergepatch
pkg/util/naming
pkg/util/net
pkg/util/proxy Package proxy provides transport and upgrade support for proxies.
pkg/util/rand Package rand provides utilities related to randomization.
pkg/util/remotecommand
pkg/util/runtime
pkg/util/sets Package sets has auto-generated set types.
pkg/util/sets/types Package types just provides input types to the set generator.
pkg/util/strategicpatch
pkg/util/strategicpatch/testing
pkg/util/uuid
pkg/util/validation
pkg/util/validation/field
pkg/util/version Package version provides utilities for version number comparisons
pkg/util/wait Package wait provides tools for polling or listening for changes to a condition.
pkg/util/waitgroup Package waitgroup implements SafeWaitGroup wrap of sync.WaitGroup.
pkg/util/yaml
pkg/version Package version supplies the type for version information collected at build time.
pkg/watch Package watch contains a generic watchable interface, and a fake for testing code that uses the watch interface.
third_party/forked/golang/json Package json is forked from the Go standard library to enable us to find the field of a struct that a given JSON key maps to.
third_party/forked/golang/netutil
third_party/forked/golang/reflect Package reflect is a fork of go's standard library reflection package, which allows for deep equal with equality functions defined.