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