blob: 89feb40103e6943cfc7a828b0111042b21432428 [file] [log] [blame]
Scott Bakere7144bc2019-10-01 14:16:47 -07001/*
2Copyright 2014 The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17// Package runtime includes helper functions for working with API objects
18// that follow the kubernetes API object conventions, which are:
19//
20// 0. Your API objects have a common metadata struct member, TypeMeta.
21//
22// 1. Your code refers to an internal set of API objects.
23//
24// 2. In a separate package, you have an external set of API objects.
25//
26// 3. The external set is considered to be versioned, and no breaking
27// changes are ever made to it (fields may be added but not changed
28// or removed).
29//
30// 4. As your api evolves, you'll make an additional versioned package
31// with every major change.
32//
33// 5. Versioned packages have conversion functions which convert to
34// and from the internal version.
35//
36// 6. You'll continue to support older versions according to your
37// deprecation policy, and you can easily provide a program/library
38// to update old versions into new versions because of 5.
39//
40// 7. All of your serializations and deserializations are handled in a
41// centralized place.
42//
43// Package runtime provides a conversion helper to make 5 easy, and the
44// Encode/Decode/DecodeInto trio to accomplish 7. You can also register
45// additional "codecs" which use a version of your choice. It's
46// recommended that you register your types with runtime in your
47// package's init function.
48//
49// As a bonus, a few common types useful from all api objects and versions
50// are provided in types.go.
51package runtime // import "k8s.io/apimachinery/pkg/runtime"