cue.dev/x/k8s.io@v0.8.0

api/apiserverinternal/v1alpha1/schema.cue raw

  1package v1alpha1
  2
  3import "cue.dev/x/k8s.io/apimachinery/pkg/apis/meta/v1"
  4
  5// An API server instance reports the version it can decode and
  6// the version it encodes objects to when persisting objects in
  7// the backend.
  8#ServerStorageVersion: {
  9	// apiServerID is the ID of the reporting API server.
 10	"apiServerID"!: string
 11
 12	// decodableVersions are the encoding versions the API server can
 13	// handle to decode. The API server can decode objects encoded in
 14	// these versions. The encodingVersion must be included in the
 15	// decodableVersions.
 16	"decodableVersions"!: [...string]
 17
 18	// encodingVersion the API server encodes the object to when
 19	// persisting it in the backend (e.g., etcd).
 20	"encodingVersion"!: string
 21
 22	// servedVersions lists all versions the API server can serve.
 23	// DecodableVersions must include all ServedVersions.
 24	"servedVersions"?: [...string]
 25}
 26
 27// Storage version of a specific resource.
 28#StorageVersion: {
 29	// APIVersion defines the versioned schema of this representation
 30	// of an object. Servers should convert recognized schemas to the
 31	// latest internal value, and may reject unrecognized values.
 32	// More info:
 33	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 34	"apiVersion": "internal.apiserver.k8s.io/v1alpha1"
 35
 36	// Kind is a string value representing the REST resource this
 37	// object represents. Servers may infer this from the endpoint
 38	// the client submits requests to. Cannot be updated. In
 39	// CamelCase. More info:
 40	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 41	"kind": "StorageVersion"
 42
 43	// metadata is the standard object metadata. The name is
 44	// <group>.<resource>.
 45	"metadata"!: v1.#ObjectMeta
 46
 47	// spec is an empty spec. It is here to comply with Kubernetes API
 48	// style.
 49	"spec"?: #StorageVersionSpec
 50
 51	// status on the version the API server instance can decode from
 52	// and encode objects to when persisting objects in the backend.
 53	"status"?: #StorageVersionStatus
 54}
 55
 56// Describes the state of the storageVersion at a certain point.
 57#StorageVersionCondition: {
 58	// lastTransitionTime is the last time the condition transitioned
 59	// from one status to another.
 60	"lastTransitionTime"?: v1.#Time
 61
 62	// message is a human readable string indicating details about the
 63	// transition.
 64	"message"!: string
 65
 66	// observedGeneration represents the .metadata.generation that the
 67	// condition was set based upon, if field is set.
 68	"observedGeneration"?: int64 & int
 69
 70	// reason for the condition's last transition.
 71	"reason"!: string
 72
 73	// status of the condition, one of True, False, Unknown.
 74	"status"!: string
 75
 76	// type of the condition.
 77	"type"!: string
 78}
 79
 80// A list of StorageVersions.
 81#StorageVersionList: {
 82	// APIVersion defines the versioned schema of this representation
 83	// of an object. Servers should convert recognized schemas to the
 84	// latest internal value, and may reject unrecognized values.
 85	// More info:
 86	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 87	"apiVersion": "internal.apiserver.k8s.io/v1alpha1"
 88
 89	// Items holds a list of StorageVersion
 90	"items"!: [...#StorageVersion]
 91
 92	// Kind is a string value representing the REST resource this
 93	// object represents. Servers may infer this from the endpoint
 94	// the client submits requests to. Cannot be updated. In
 95	// CamelCase. More info:
 96	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 97	"kind": "StorageVersionList"
 98
 99	// Standard list metadata. More info:
100	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
101	"metadata"?: v1.#ListMeta
102}
103
104// StorageVersionSpec is an empty spec.
105#StorageVersionSpec: {}
106
107// API server instances report the versions they can decode and
108// the version they encode objects to when persisting objects in
109// the backend.
110#StorageVersionStatus: {
111	// commonEncodingVersion is set to an encoding storage version if
112	// all API server instances share that same version. If they
113	// don't share one storage version, this field is left empty. API
114	// servers should finish updating its storageVersionStatus entry
115	// before serving write operations, so that this field will be in
116	// sync with the reality.
117	"commonEncodingVersion"?: string
118
119	// conditions lists the latest available observations of the
120	// storageVersion's state.
121	"conditions"?: [...#StorageVersionCondition]
122
123	// storageVersions lists the reported versions per API server
124	// instance.
125	"storageVersions"?: [...#ServerStorageVersion]
126}