generated.proto 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. /*
  2. Copyright The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // This file was autogenerated by go-to-protobuf. Do not edit it manually!
  14. syntax = "proto2";
  15. package k8s.io.api.admissionregistration.v1;
  16. import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
  17. import "k8s.io/apimachinery/pkg/runtime/generated.proto";
  18. import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
  19. // Package-wide variables from generator "generated".
  20. option go_package = "k8s.io/api/admissionregistration/v1";
  21. // MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
  22. message MatchCondition {
  23. // Name is an identifier for this match condition, used for strategic merging of MatchConditions,
  24. // as well as providing an identifier for logging purposes. A good name should be descriptive of
  25. // the associated expression.
  26. // Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and
  27. // must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or
  28. // '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an
  29. // optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')
  30. //
  31. // Required.
  32. optional string name = 1;
  33. // Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
  34. // CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
  35. //
  36. // 'object' - The object from the incoming request. The value is null for DELETE requests.
  37. // 'oldObject' - The existing object. The value is null for CREATE requests.
  38. // 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).
  39. // 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
  40. // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
  41. // 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
  42. // request resource.
  43. // Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
  44. //
  45. // Required.
  46. optional string expression = 2;
  47. }
  48. // MutatingWebhook describes an admission webhook and the resources and operations it applies to.
  49. message MutatingWebhook {
  50. // The name of the admission webhook.
  51. // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
  52. // "imagepolicy" is the name of the webhook, and kubernetes.io is the name
  53. // of the organization.
  54. // Required.
  55. optional string name = 1;
  56. // ClientConfig defines how to communicate with the hook.
  57. // Required
  58. optional WebhookClientConfig clientConfig = 2;
  59. // Rules describes what operations on what resources/subresources the webhook cares about.
  60. // The webhook cares about an operation if it matches _any_ Rule.
  61. // However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
  62. // from putting the cluster in a state which cannot be recovered from without completely
  63. // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
  64. // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
  65. repeated RuleWithOperations rules = 3;
  66. // FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
  67. // allowed values are Ignore or Fail. Defaults to Fail.
  68. // +optional
  69. optional string failurePolicy = 4;
  70. // matchPolicy defines how the "rules" list is used to match incoming requests.
  71. // Allowed values are "Exact" or "Equivalent".
  72. //
  73. // - Exact: match a request only if it exactly matches a specified rule.
  74. // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
  75. // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
  76. // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.
  77. //
  78. // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version.
  79. // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
  80. // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
  81. // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.
  82. //
  83. // Defaults to "Equivalent"
  84. // +optional
  85. optional string matchPolicy = 9;
  86. // NamespaceSelector decides whether to run the webhook on an object based
  87. // on whether the namespace for that object matches the selector. If the
  88. // object itself is a namespace, the matching is performed on
  89. // object.metadata.labels. If the object is another cluster scoped resource,
  90. // it never skips the webhook.
  91. //
  92. // For example, to run the webhook on any objects whose namespace is not
  93. // associated with "runlevel" of "0" or "1"; you will set the selector as
  94. // follows:
  95. // "namespaceSelector": {
  96. // "matchExpressions": [
  97. // {
  98. // "key": "runlevel",
  99. // "operator": "NotIn",
  100. // "values": [
  101. // "0",
  102. // "1"
  103. // ]
  104. // }
  105. // ]
  106. // }
  107. //
  108. // If instead you want to only run the webhook on any objects whose
  109. // namespace is associated with the "environment" of "prod" or "staging";
  110. // you will set the selector as follows:
  111. // "namespaceSelector": {
  112. // "matchExpressions": [
  113. // {
  114. // "key": "environment",
  115. // "operator": "In",
  116. // "values": [
  117. // "prod",
  118. // "staging"
  119. // ]
  120. // }
  121. // ]
  122. // }
  123. //
  124. // See
  125. // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  126. // for more examples of label selectors.
  127. //
  128. // Default to the empty LabelSelector, which matches everything.
  129. // +optional
  130. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 5;
  131. // ObjectSelector decides whether to run the webhook based on if the
  132. // object has matching labels. objectSelector is evaluated against both
  133. // the oldObject and newObject that would be sent to the webhook, and
  134. // is considered to match if either object matches the selector. A null
  135. // object (oldObject in the case of create, or newObject in the case of
  136. // delete) or an object that cannot have labels (like a
  137. // DeploymentRollback or a PodProxyOptions object) is not considered to
  138. // match.
  139. // Use the object selector only if the webhook is opt-in, because end
  140. // users may skip the admission webhook by setting the labels.
  141. // Default to the empty LabelSelector, which matches everything.
  142. // +optional
  143. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector objectSelector = 11;
  144. // SideEffects states whether this webhook has side effects.
  145. // Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown).
  146. // Webhooks with side effects MUST implement a reconciliation system, since a request may be
  147. // rejected by a future step in the admission chain and the side effects therefore need to be undone.
  148. // Requests with the dryRun attribute will be auto-rejected if they match a webhook with
  149. // sideEffects == Unknown or Some.
  150. optional string sideEffects = 6;
  151. // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
  152. // the webhook call will be ignored or the API call will fail based on the
  153. // failure policy.
  154. // The timeout value must be between 1 and 30 seconds.
  155. // Default to 10 seconds.
  156. // +optional
  157. optional int32 timeoutSeconds = 7;
  158. // AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
  159. // versions the Webhook expects. API server will try to use first version in
  160. // the list which it supports. If none of the versions specified in this list
  161. // supported by API server, validation will fail for this object.
  162. // If a persisted webhook configuration specifies allowed versions and does not
  163. // include any versions known to the API Server, calls to the webhook will fail
  164. // and be subject to the failure policy.
  165. repeated string admissionReviewVersions = 8;
  166. // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation.
  167. // Allowed values are "Never" and "IfNeeded".
  168. //
  169. // Never: the webhook will not be called more than once in a single admission evaluation.
  170. //
  171. // IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation
  172. // if the object being admitted is modified by other admission plugins after the initial webhook call.
  173. // Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted.
  174. // Note:
  175. // * the number of additional invocations is not guaranteed to be exactly one.
  176. // * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again.
  177. // * webhooks that use this option may be reordered to minimize the number of additional invocations.
  178. // * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.
  179. //
  180. // Defaults to "Never".
  181. // +optional
  182. optional string reinvocationPolicy = 10;
  183. // MatchConditions is a list of conditions that must be met for a request to be sent to this
  184. // webhook. Match conditions filter requests that have already been matched by the rules,
  185. // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
  186. // There are a maximum of 64 match conditions allowed.
  187. //
  188. // The exact matching logic is (in order):
  189. // 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.
  190. // 2. If ALL matchConditions evaluate to TRUE, the webhook is called.
  191. // 3. If any matchCondition evaluates to an error (but none are FALSE):
  192. // - If failurePolicy=Fail, reject the request
  193. // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped
  194. //
  195. // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
  196. //
  197. // +patchMergeKey=name
  198. // +patchStrategy=merge
  199. // +listType=map
  200. // +listMapKey=name
  201. // +featureGate=AdmissionWebhookMatchConditions
  202. // +optional
  203. repeated MatchCondition matchConditions = 12;
  204. }
  205. // MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
  206. message MutatingWebhookConfiguration {
  207. // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
  208. // +optional
  209. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  210. // Webhooks is a list of webhooks and the affected resources and operations.
  211. // +optional
  212. // +patchMergeKey=name
  213. // +patchStrategy=merge
  214. repeated MutatingWebhook Webhooks = 2;
  215. }
  216. // MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
  217. message MutatingWebhookConfigurationList {
  218. // Standard list metadata.
  219. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  220. // +optional
  221. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  222. // List of MutatingWebhookConfiguration.
  223. repeated MutatingWebhookConfiguration items = 2;
  224. }
  225. // Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
  226. // to make sure that all the tuple expansions are valid.
  227. message Rule {
  228. // APIGroups is the API groups the resources belong to. '*' is all groups.
  229. // If '*' is present, the length of the slice must be one.
  230. // Required.
  231. // +listType=atomic
  232. repeated string apiGroups = 1;
  233. // APIVersions is the API versions the resources belong to. '*' is all versions.
  234. // If '*' is present, the length of the slice must be one.
  235. // Required.
  236. // +listType=atomic
  237. repeated string apiVersions = 2;
  238. // Resources is a list of resources this rule applies to.
  239. //
  240. // For example:
  241. // 'pods' means pods.
  242. // 'pods/log' means the log subresource of pods.
  243. // '*' means all resources, but not subresources.
  244. // 'pods/*' means all subresources of pods.
  245. // '*/scale' means all scale subresources.
  246. // '*/*' means all resources and their subresources.
  247. //
  248. // If wildcard is present, the validation rule will ensure resources do not
  249. // overlap with each other.
  250. //
  251. // Depending on the enclosing object, subresources might not be allowed.
  252. // Required.
  253. // +listType=atomic
  254. repeated string resources = 3;
  255. // scope specifies the scope of this rule.
  256. // Valid values are "Cluster", "Namespaced", and "*"
  257. // "Cluster" means that only cluster-scoped resources will match this rule.
  258. // Namespace API objects are cluster-scoped.
  259. // "Namespaced" means that only namespaced resources will match this rule.
  260. // "*" means that there are no scope restrictions.
  261. // Subresources match the scope of their parent resource.
  262. // Default is "*".
  263. //
  264. // +optional
  265. optional string scope = 4;
  266. }
  267. // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
  268. // sure that all the tuple expansions are valid.
  269. message RuleWithOperations {
  270. // Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or *
  271. // for all of those operations and any future admission operations that are added.
  272. // If '*' is present, the length of the slice must be one.
  273. // Required.
  274. // +listType=atomic
  275. repeated string operations = 1;
  276. // Rule is embedded, it describes other criteria of the rule, like
  277. // APIGroups, APIVersions, Resources, etc.
  278. optional Rule rule = 2;
  279. }
  280. // ServiceReference holds a reference to Service.legacy.k8s.io
  281. message ServiceReference {
  282. // `namespace` is the namespace of the service.
  283. // Required
  284. optional string namespace = 1;
  285. // `name` is the name of the service.
  286. // Required
  287. optional string name = 2;
  288. // `path` is an optional URL path which will be sent in any request to
  289. // this service.
  290. // +optional
  291. optional string path = 3;
  292. // If specified, the port on the service that hosting webhook.
  293. // Default to 443 for backward compatibility.
  294. // `port` should be a valid port number (1-65535, inclusive).
  295. // +optional
  296. optional int32 port = 4;
  297. }
  298. // ValidatingWebhook describes an admission webhook and the resources and operations it applies to.
  299. message ValidatingWebhook {
  300. // The name of the admission webhook.
  301. // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
  302. // "imagepolicy" is the name of the webhook, and kubernetes.io is the name
  303. // of the organization.
  304. // Required.
  305. optional string name = 1;
  306. // ClientConfig defines how to communicate with the hook.
  307. // Required
  308. optional WebhookClientConfig clientConfig = 2;
  309. // Rules describes what operations on what resources/subresources the webhook cares about.
  310. // The webhook cares about an operation if it matches _any_ Rule.
  311. // However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
  312. // from putting the cluster in a state which cannot be recovered from without completely
  313. // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
  314. // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
  315. repeated RuleWithOperations rules = 3;
  316. // FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
  317. // allowed values are Ignore or Fail. Defaults to Fail.
  318. // +optional
  319. optional string failurePolicy = 4;
  320. // matchPolicy defines how the "rules" list is used to match incoming requests.
  321. // Allowed values are "Exact" or "Equivalent".
  322. //
  323. // - Exact: match a request only if it exactly matches a specified rule.
  324. // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
  325. // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
  326. // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.
  327. //
  328. // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version.
  329. // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
  330. // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
  331. // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.
  332. //
  333. // Defaults to "Equivalent"
  334. // +optional
  335. optional string matchPolicy = 9;
  336. // NamespaceSelector decides whether to run the webhook on an object based
  337. // on whether the namespace for that object matches the selector. If the
  338. // object itself is a namespace, the matching is performed on
  339. // object.metadata.labels. If the object is another cluster scoped resource,
  340. // it never skips the webhook.
  341. //
  342. // For example, to run the webhook on any objects whose namespace is not
  343. // associated with "runlevel" of "0" or "1"; you will set the selector as
  344. // follows:
  345. // "namespaceSelector": {
  346. // "matchExpressions": [
  347. // {
  348. // "key": "runlevel",
  349. // "operator": "NotIn",
  350. // "values": [
  351. // "0",
  352. // "1"
  353. // ]
  354. // }
  355. // ]
  356. // }
  357. //
  358. // If instead you want to only run the webhook on any objects whose
  359. // namespace is associated with the "environment" of "prod" or "staging";
  360. // you will set the selector as follows:
  361. // "namespaceSelector": {
  362. // "matchExpressions": [
  363. // {
  364. // "key": "environment",
  365. // "operator": "In",
  366. // "values": [
  367. // "prod",
  368. // "staging"
  369. // ]
  370. // }
  371. // ]
  372. // }
  373. //
  374. // See
  375. // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
  376. // for more examples of label selectors.
  377. //
  378. // Default to the empty LabelSelector, which matches everything.
  379. // +optional
  380. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 5;
  381. // ObjectSelector decides whether to run the webhook based on if the
  382. // object has matching labels. objectSelector is evaluated against both
  383. // the oldObject and newObject that would be sent to the webhook, and
  384. // is considered to match if either object matches the selector. A null
  385. // object (oldObject in the case of create, or newObject in the case of
  386. // delete) or an object that cannot have labels (like a
  387. // DeploymentRollback or a PodProxyOptions object) is not considered to
  388. // match.
  389. // Use the object selector only if the webhook is opt-in, because end
  390. // users may skip the admission webhook by setting the labels.
  391. // Default to the empty LabelSelector, which matches everything.
  392. // +optional
  393. optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector objectSelector = 10;
  394. // SideEffects states whether this webhook has side effects.
  395. // Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown).
  396. // Webhooks with side effects MUST implement a reconciliation system, since a request may be
  397. // rejected by a future step in the admission chain and the side effects therefore need to be undone.
  398. // Requests with the dryRun attribute will be auto-rejected if they match a webhook with
  399. // sideEffects == Unknown or Some.
  400. optional string sideEffects = 6;
  401. // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
  402. // the webhook call will be ignored or the API call will fail based on the
  403. // failure policy.
  404. // The timeout value must be between 1 and 30 seconds.
  405. // Default to 10 seconds.
  406. // +optional
  407. optional int32 timeoutSeconds = 7;
  408. // AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
  409. // versions the Webhook expects. API server will try to use first version in
  410. // the list which it supports. If none of the versions specified in this list
  411. // supported by API server, validation will fail for this object.
  412. // If a persisted webhook configuration specifies allowed versions and does not
  413. // include any versions known to the API Server, calls to the webhook will fail
  414. // and be subject to the failure policy.
  415. repeated string admissionReviewVersions = 8;
  416. // MatchConditions is a list of conditions that must be met for a request to be sent to this
  417. // webhook. Match conditions filter requests that have already been matched by the rules,
  418. // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
  419. // There are a maximum of 64 match conditions allowed.
  420. //
  421. // The exact matching logic is (in order):
  422. // 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.
  423. // 2. If ALL matchConditions evaluate to TRUE, the webhook is called.
  424. // 3. If any matchCondition evaluates to an error (but none are FALSE):
  425. // - If failurePolicy=Fail, reject the request
  426. // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped
  427. //
  428. // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
  429. //
  430. // +patchMergeKey=name
  431. // +patchStrategy=merge
  432. // +listType=map
  433. // +listMapKey=name
  434. // +featureGate=AdmissionWebhookMatchConditions
  435. // +optional
  436. repeated MatchCondition matchConditions = 11;
  437. }
  438. // ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
  439. message ValidatingWebhookConfiguration {
  440. // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
  441. // +optional
  442. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  443. // Webhooks is a list of webhooks and the affected resources and operations.
  444. // +optional
  445. // +patchMergeKey=name
  446. // +patchStrategy=merge
  447. repeated ValidatingWebhook Webhooks = 2;
  448. }
  449. // ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
  450. message ValidatingWebhookConfigurationList {
  451. // Standard list metadata.
  452. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  453. // +optional
  454. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  455. // List of ValidatingWebhookConfiguration.
  456. repeated ValidatingWebhookConfiguration items = 2;
  457. }
  458. // WebhookClientConfig contains the information to make a TLS
  459. // connection with the webhook
  460. message WebhookClientConfig {
  461. // `url` gives the location of the webhook, in standard URL form
  462. // (`scheme://host:port/path`). Exactly one of `url` or `service`
  463. // must be specified.
  464. //
  465. // The `host` should not refer to a service running in the cluster; use
  466. // the `service` field instead. The host might be resolved via external
  467. // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve
  468. // in-cluster DNS as that would be a layering violation). `host` may
  469. // also be an IP address.
  470. //
  471. // Please note that using `localhost` or `127.0.0.1` as a `host` is
  472. // risky unless you take great care to run this webhook on all hosts
  473. // which run an apiserver which might need to make calls to this
  474. // webhook. Such installs are likely to be non-portable, i.e., not easy
  475. // to turn up in a new cluster.
  476. //
  477. // The scheme must be "https"; the URL must begin with "https://".
  478. //
  479. // A path is optional, and if present may be any string permissible in
  480. // a URL. You may use the path to pass an arbitrary string to the
  481. // webhook, for example, a cluster identifier.
  482. //
  483. // Attempting to use a user or basic auth e.g. "user:password@" is not
  484. // allowed. Fragments ("#...") and query parameters ("?...") are not
  485. // allowed, either.
  486. //
  487. // +optional
  488. optional string url = 3;
  489. // `service` is a reference to the service for this webhook. Either
  490. // `service` or `url` must be specified.
  491. //
  492. // If the webhook is running within the cluster, then you should use `service`.
  493. //
  494. // +optional
  495. optional ServiceReference service = 1;
  496. // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
  497. // If unspecified, system trust roots on the apiserver are used.
  498. // +optional
  499. optional bytes caBundle = 2;
  500. }