k8s

package module
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: Apache-2.0 Imports: 47 Imported by: 0

README

api

Schema of the external API types that are served by the Kubernetes API server.

Purpose

This library is the canonical location of the Kubernetes API definition. Most likely interaction with this repository is as a dependency of client-go.

It is published separately to avoid diamond dependency problems for users who depend on more than one of k8s.io/client-go, k8s.io/apimachinery, k8s.io/apiserver...

We recommend using the go types in this repo. You may serialize them directly to JSON.

If you want to store or interact with proto-formatted Kubernetes API objects, we recommend using the "official" serialization stack in k8s.io/apimachinery. Directly serializing these types to proto will not result in data that matches the wire format or is compatible with other kubernetes ecosystem tools. The reason is that the wire format includes a magic prefix and an envelope proto. Please see: https://kubernetes.io/docs/reference/using-api/api-concepts/#protobuf-encoding

For the same reason, we do not recommend embedding these proto objects within your own proto definitions. It is better to store Kubernetes objects as byte arrays, in the wire format, which is self-describing. This permits you to use either JSON or binary (proto) wire formats without code changes. It will be difficult for you to operate on both Custom Resources and built-in types otherwise.

Compatibility

Branches track Kubernetes branches and are compatible with that repo.

Where does it come from?

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

Things you should NOT do

  1. https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/api is synced to k8s.io/api. All changes must be made in the former. The latter is read-only.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToScheme added in v1.21.0

func AddToScheme(scheme *runtime.Scheme) error

func Equal added in v1.21.0

func Equal[T comparable](a, b *T) bool

func Ref added in v1.21.0

func Ref[T any](t T) *T

Ref returns a pointer to the given value.

func Value added in v1.21.0

func Value[T any](t *T, def ...T) (v T)

Value returns the value of the given pointer, or the default value if the pointer is nil.

Types

This section is empty.

Directories

Path Synopsis
admission
v1
admissionregistration
v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
v1beta1
Package v1beta1 is the v1beta1 version of the API.
Package v1beta1 is the v1beta1 version of the API.
apiserverinternal
v1alpha1
Package v1alpha1 contains the v1alpha1 version of the API used by the apiservers themselves.
Package v1alpha1 contains the v1alpha1 version of the API used by the apiservers themselves.
apps
v1
authentication
v1
authorization
v1
autoscaling
v1
batch
v1
certificates
v1
coordination
v1
core
v1
Package v1 is the v1 version of the core API.
Package v1 is the v1 version of the core API.
discovery
v1
dns module
events
v1
extensions
flowcontrol
v1alpha1
Package v1alpha1 holds api types of version v1alpha1 for group "flowcontrol.apiserver.k8s.io".
Package v1alpha1 holds api types of version v1alpha1 for group "flowcontrol.apiserver.k8s.io".
v1beta1
Package v1beta1 holds api types of version v1alpha1 for group "flowcontrol.apiserver.k8s.io".
Package v1beta1 holds api types of version v1alpha1 for group "flowcontrol.apiserver.k8s.io".
imagepolicy
lb module
networking
v1
node
v1
policy
v1
Package policy is for any kind of policy object.
Package policy is for any kind of policy object.
v1beta1
Package policy is for any kind of policy object.
Package policy is for any kind of policy object.
rbac
v1
scheduling
v1
storage
v1

Jump to

Keyboard shortcuts

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