1package v1
2
3import "cue.dev/x/k8s.io/apimachinery/pkg/apis/meta/v1"
4
5// APIService represents a server for a particular GroupVersion. Name must be "version.group".
6#APIService: {
7 // APIVersion defines the versioned schema of this representation of an object.
8 // Servers should convert recognized schemas to the latest internal value, and
9 // may reject unrecognized values. More info:
10 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
11 "apiVersion": "apiregistration.k8s.io/v1"
12
13 // Kind is a string value representing the REST resource this object represents.
14 // Servers may infer this from the endpoint the client submits requests to.
15 // Cannot be updated. In CamelCase. More info:
16 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
17 "kind": "APIService"
18
19 // Standard object's metadata. More info:
20 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
21 "metadata"?: v1.#ObjectMeta
22
23 // Spec contains information for locating and communicating with a server
24 "spec"?: #APIServiceSpec
25
26 // Status contains derived information about an API server
27 "status"?: #APIServiceStatus
28}
29
30// APIServiceCondition describes the state of an APIService at a particular point
31#APIServiceCondition: {
32 // Last time the condition transitioned from one status to another.
33 "lastTransitionTime"?: v1.#Time
34
35 // Human-readable message indicating details about last transition.
36 "message"?: string
37
38 // Unique, one-word, CamelCase reason for the condition's last transition.
39 "reason"?: string
40
41 // Status is the status of the condition. Can be True, False, Unknown.
42 "status"!: string
43
44 // Type is the type of the condition.
45 "type"!: string
46}
47
48// APIServiceList is a list of APIService objects.
49#APIServiceList: {
50 // APIVersion defines the versioned schema of this representation of an object.
51 // Servers should convert recognized schemas to the latest internal value, and
52 // may reject unrecognized values. More info:
53 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
54 "apiVersion": "apiregistration.k8s.io/v1"
55
56 // Items is the list of APIService
57 "items"!: [...#APIService]
58
59 // Kind is a string value representing the REST resource this object represents.
60 // Servers may infer this from the endpoint the client submits requests to.
61 // Cannot be updated. In CamelCase. More info:
62 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
63 "kind": "APIServiceList"
64
65 // Standard list metadata More info:
66 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
67 "metadata"?: v1.#ListMeta
68}
69
70// APIServiceSpec contains information for locating and communicating with a
71// server. Only https is supported, though you are able to disable certificate
72// verification.
73#APIServiceSpec: {
74 // CABundle is a PEM encoded CA bundle which will be used to validate an API
75 // server's serving certificate. If unspecified, system trust roots on the
76 // apiserver are used.
77 "caBundle"?: string
78
79 // Group is the API group name this server hosts
80 "group"?: string
81
82 // GroupPriorityMinimum is the priority this group should have at least. Higher
83 // priority means that the group is preferred by clients over lower priority
84 // ones. Note that other versions of this group might specify even higher
85 // GroupPriorityMinimum values such that the whole group gets a higher
86 // priority. The primary sort is based on GroupPriorityMinimum, ordered highest
87 // number to lowest (20 before 10). The secondary sort is based on the
88 // alphabetical comparison of the name of the object. (v1.bar before v1.foo)
89 // We'd recommend something like: *.k8s.io (except extensions) at 18000 and
90 // PaaSes (OpenShift, Deis) are recommended to be in the 2000s
91 "groupPriorityMinimum"!: int32 & int
92
93 // InsecureSkipTLSVerify disables TLS certificate verification when
94 // communicating with this server. This is strongly discouraged. You should use
95 // the CABundle instead.
96 "insecureSkipTLSVerify"?: bool
97
98 // Service is a reference to the service for this API server. It must
99 // communicate on port 443. If the Service is nil, that means the handling for
100 // the API groupversion is handled locally on this server. The call will simply
101 // delegate to the normal handler chain to be fulfilled.
102 "service"?: #ServiceReference
103
104 // Version is the API version this server hosts. For example, "v1"
105 "version"?: string
106
107 // VersionPriority controls the ordering of this API version inside of its
108 // group. Must be greater than zero. The primary sort is based on
109 // VersionPriority, ordered highest to lowest (20 before 10). Since it's inside
110 // of a group, the number can be small, probably in the 10s. In case of equal
111 // version priorities, the version string will be used to compute the order
112 // inside a group. If the version string is "kube-like", it will sort above non
113 // "kube-like" version strings, which are ordered lexicographically.
114 // "Kube-like" versions start with a "v", then are followed by a number (the
115 // major version), then optionally the string "alpha" or "beta" and another
116 // number (the minor version). These are sorted first by GA > beta > alpha
117 // (where GA is a version with no suffix such as beta or alpha), and then by
118 // comparing major version, then minor version. An example sorted list of
119 // versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2,
120 // foo1, foo10.
121 "versionPriority"!: int32 & int
122}
123
124// APIServiceStatus contains derived information about an API server
125#APIServiceStatus: {
126 // Current service state of apiService.
127 "conditions"?: [...#APIServiceCondition]
128}
129
130// ServiceReference holds a reference to Service.legacy.k8s.io
131#ServiceReference: {
132 // Name is the name of the service
133 "name"?: string
134
135 // Namespace is the namespace of the service
136 "namespace"?: string
137
138 // If specified, the port on the service that hosting webhook. Default to 443
139 // for backward compatibility. `port` should be a valid port number (1-65535,
140 // inclusive).
141 "port"?: int32 & int
142}