mirror of
https://github.com/kubernetes/client-go.git
synced 2026-05-15 19:53:50 +00:00
Compare commits
355 Commits
v0.35.0-al
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9dfd0befa6 | ||
|
|
06945f2b0e | ||
|
|
a16e1bb854 | ||
|
|
ef5f95859e | ||
|
|
14ef437cc6 | ||
|
|
f49c3b763f | ||
|
|
11948c1336 | ||
|
|
63b2f68438 | ||
|
|
ca52b81a29 | ||
|
|
c2ce71e1e5 | ||
|
|
0582d760ec | ||
|
|
0a31f6e5eb | ||
|
|
24705f39ff | ||
|
|
f2e82a9540 | ||
|
|
d7e05a3637 | ||
|
|
818cfeb954 | ||
|
|
535f2d0806 | ||
|
|
14ae5b45e1 | ||
|
|
e7adb43e4b | ||
|
|
47b7dd6ca6 | ||
|
|
b46a0c233f | ||
|
|
98a97d3bea | ||
|
|
224d0b9220 | ||
|
|
f854ec26d2 | ||
|
|
d0e1111cfa | ||
|
|
fbda1bea62 | ||
|
|
34c8061b60 | ||
|
|
cb70ef072c | ||
|
|
9c68566d66 | ||
|
|
768b463699 | ||
|
|
236db84a02 | ||
|
|
5834c79c33 | ||
|
|
1f2893e611 | ||
|
|
ab9883c3cd | ||
|
|
e584095d82 | ||
|
|
fd78cbf903 | ||
|
|
af852a6051 | ||
|
|
d59f4e8465 | ||
|
|
54edeb4bfe | ||
|
|
3273f3d7b7 | ||
|
|
9dcacd934a | ||
|
|
f596361399 | ||
|
|
3c8a6967ba | ||
|
|
6e6322efd1 | ||
|
|
53b6fdc0a0 | ||
|
|
b5cc94ef3b | ||
|
|
6fd7c180ef | ||
|
|
1f6e0f4541 | ||
|
|
df2d882697 | ||
|
|
71d7d2af1e | ||
|
|
4eece5291a | ||
|
|
3d35c51207 | ||
|
|
0434117726 | ||
|
|
ba785be0ac | ||
|
|
4a9c8783a9 | ||
|
|
0131054016 | ||
|
|
9b29e67df1 | ||
|
|
4c2ee9a3e2 | ||
|
|
2fb6b9cac0 | ||
|
|
b2267f3d75 | ||
|
|
382d307f87 | ||
|
|
6c21384776 | ||
|
|
69d2e66589 | ||
|
|
bb93391625 | ||
|
|
828813ca69 | ||
|
|
27bd9ce449 | ||
|
|
15a9dffb52 | ||
|
|
ea7a7e7cf9 | ||
|
|
61a40f5111 | ||
|
|
39f55294aa | ||
|
|
c73e37f377 | ||
|
|
9dc763689d | ||
|
|
c07c271a94 | ||
|
|
2517e8773a | ||
|
|
3505da0deb | ||
|
|
97ac09639d | ||
|
|
9cdd63fee2 | ||
|
|
32a3ac47cf | ||
|
|
e807f52104 | ||
|
|
a179e3b9fb | ||
|
|
4bf554630d | ||
|
|
2e882c6ea6 | ||
|
|
6f2c112d22 | ||
|
|
2f31bfec5d | ||
|
|
88da827ca3 | ||
|
|
c826020ed9 | ||
|
|
c3a1049f7e | ||
|
|
989fb5d38c | ||
|
|
294ecb1d8c | ||
|
|
c7f8506da0 | ||
|
|
78536fe27c | ||
|
|
06163fb266 | ||
|
|
388997a877 | ||
|
|
a72ad3ccbc | ||
|
|
9f41e94324 | ||
|
|
d91024383a | ||
|
|
aae801378e | ||
|
|
3e4de9e6b4 | ||
|
|
e45d8623ff | ||
|
|
187c42c884 | ||
|
|
2dd466fcfe | ||
|
|
486be0fbf9 | ||
|
|
e243a98fa8 | ||
|
|
f6c2d7ca65 | ||
|
|
55e741a004 | ||
|
|
27966b2574 | ||
|
|
8776b282cc | ||
|
|
9926c67348 | ||
|
|
c86837f7ed | ||
|
|
2f21ae3478 | ||
|
|
b59431fbc5 | ||
|
|
54ee8fecae | ||
|
|
f037d681ac | ||
|
|
99791c7452 | ||
|
|
1f07d6645b | ||
|
|
efbad1b7ed | ||
|
|
73f4fa85e7 | ||
|
|
f66040b9dc | ||
|
|
b840391f92 | ||
|
|
1349319d7c | ||
|
|
8a32b4087c | ||
|
|
764b57d771 | ||
|
|
f1d9ba91c7 | ||
|
|
62f2159da2 | ||
|
|
00e45797cb | ||
|
|
e8eab37058 | ||
|
|
efc4692504 | ||
|
|
648a945fad | ||
|
|
6b803d4e11 | ||
|
|
f6cd0c0583 | ||
|
|
67f0d98034 | ||
|
|
100af76fc5 | ||
|
|
97646e5606 | ||
|
|
103162f118 | ||
|
|
78fb6ed2e1 | ||
|
|
59f55827e6 | ||
|
|
70ab833f66 | ||
|
|
1d4002e88b | ||
|
|
a63d33951d | ||
|
|
8304d788bb | ||
|
|
7b594c4c71 | ||
|
|
d6503fcc3e | ||
|
|
80c1d965be | ||
|
|
f5fc1e5f67 | ||
|
|
e924e3f2c5 | ||
|
|
2ca150601d | ||
|
|
e334b2d6e7 | ||
|
|
6cda0df027 | ||
|
|
fd1b7118fd | ||
|
|
ca54862893 | ||
|
|
7aaede7872 | ||
|
|
2c400a844a | ||
|
|
9f57ca57bd | ||
|
|
0efa7daafd | ||
|
|
82ed9ba53e | ||
|
|
07f99e4437 | ||
|
|
b8c6b3c159 | ||
|
|
decb8c0791 | ||
|
|
18a54f0a40 | ||
|
|
b5668cea26 | ||
|
|
3721aecc15 | ||
|
|
139a95c065 | ||
|
|
d883e606da | ||
|
|
1f85fd1a13 | ||
|
|
ff8083eb1d | ||
|
|
e70bc766e0 | ||
|
|
b37e79caad | ||
|
|
6a81dca7e6 | ||
|
|
333a3455d5 | ||
|
|
1ee3eb7041 | ||
|
|
8fcd3c218f | ||
|
|
c6e2e47b31 | ||
|
|
c02524f944 | ||
|
|
aac099e7c2 | ||
|
|
67ce519612 | ||
|
|
12b64ed22e | ||
|
|
5fee0e4466 | ||
|
|
117e93e87c | ||
|
|
c148db9511 | ||
|
|
aa31c74d1f | ||
|
|
4ba33933bd | ||
|
|
88493c6cb6 | ||
|
|
c752307a85 | ||
|
|
65608ffa8e | ||
|
|
f651faf894 | ||
|
|
ada74e06af | ||
|
|
50ef81ad18 | ||
|
|
f3637bd93c | ||
|
|
072a1958db | ||
|
|
2d68c1db51 | ||
|
|
a48da785a9 | ||
|
|
67189d0e25 | ||
|
|
ef73fc0205 | ||
|
|
2d1d3a8458 | ||
|
|
146146cf95 | ||
|
|
b0c7207279 | ||
|
|
5b20bd05fc | ||
|
|
3590eb7f48 | ||
|
|
889b95a769 | ||
|
|
0c949f1da7 | ||
|
|
cb71398117 | ||
|
|
c5e14be254 | ||
|
|
36db2c5c73 | ||
|
|
511abf454d | ||
|
|
98fd4cc5ca | ||
|
|
51d0341059 | ||
|
|
ff70f47ee2 | ||
|
|
914300b800 | ||
|
|
f5283a4822 | ||
|
|
9cbf88a315 | ||
|
|
1a68af1383 | ||
|
|
95129d1f2f | ||
|
|
518241d079 | ||
|
|
2f59c18c8b | ||
|
|
24e4401379 | ||
|
|
14e71d2850 | ||
|
|
aad3a6de89 | ||
|
|
0a8284b969 | ||
|
|
06f647297d | ||
|
|
2cb222485f | ||
|
|
14f3889b62 | ||
|
|
759b00eb22 | ||
|
|
4678a135e1 | ||
|
|
c38fc0fb1f | ||
|
|
f3701130c2 | ||
|
|
548663c679 | ||
|
|
bb190d443d | ||
|
|
70ee41c382 | ||
|
|
d8ad3ab106 | ||
|
|
179e2aab49 | ||
|
|
0b06cf5bf0 | ||
|
|
934ba1dfa5 | ||
|
|
07c57c562d | ||
|
|
42c6ae81ab | ||
|
|
811a272277 | ||
|
|
2e32132ba0 | ||
|
|
52d9854c37 | ||
|
|
2f784525d5 | ||
|
|
736bd66226 | ||
|
|
7761b3a081 | ||
|
|
65de5216f1 | ||
|
|
c9ded7e60b | ||
|
|
0728b482e1 | ||
|
|
58e70dff3d | ||
|
|
d9d16a9e17 | ||
|
|
af9dcc3651 | ||
|
|
aa82641b9d | ||
|
|
687c6c1315 | ||
|
|
1078d9cd6f | ||
|
|
85ab7843a2 | ||
|
|
f36ae1f45e | ||
|
|
e07f72a3ec | ||
|
|
66d2ca7fea | ||
|
|
ba82880ed7 | ||
|
|
8e36d0d305 | ||
|
|
a01f268c3e | ||
|
|
f0e0dbdb4b | ||
|
|
8f891d54a2 | ||
|
|
d008946b23 | ||
|
|
1aef261f0a | ||
|
|
ca2dee6d05 | ||
|
|
b960c92ed7 | ||
|
|
0d964cc386 | ||
|
|
7d2828a105 | ||
|
|
8dc82bbe31 | ||
|
|
a296bd743c | ||
|
|
6a962375ad | ||
|
|
453ad29ccd | ||
|
|
4e4a2b723a | ||
|
|
97256a6495 | ||
|
|
46360b527e | ||
|
|
715440da15 | ||
|
|
521671e60d | ||
|
|
a361bc1602 | ||
|
|
4fa8366691 | ||
|
|
3878a6464b | ||
|
|
9cee84c27c | ||
|
|
45e0decafa | ||
|
|
990057bc99 | ||
|
|
7bb07cbe8e | ||
|
|
f6ec69ec64 | ||
|
|
5223424e9f | ||
|
|
bd70455c5c | ||
|
|
d416af4df4 | ||
|
|
9e310140a3 | ||
|
|
3980f079a7 | ||
|
|
5020b674f8 | ||
|
|
6ce2c0f8c3 | ||
|
|
5c322d3acd | ||
|
|
aa76619c41 | ||
|
|
99c4257e63 | ||
|
|
cb5e00dc36 | ||
|
|
09ccc185ed | ||
|
|
0e6fc04326 | ||
|
|
c529a209c2 | ||
|
|
9b2717cec1 | ||
|
|
6a14de8219 | ||
|
|
b36e6498c1 | ||
|
|
823f3a75f4 | ||
|
|
092b2fb360 | ||
|
|
d0f0666dd2 | ||
|
|
7d09f53b04 | ||
|
|
5aa3ca7f2a | ||
|
|
afcd76c2c0 | ||
|
|
50efa83a3d | ||
|
|
205531f8d5 | ||
|
|
773743c372 | ||
|
|
15b762b95c | ||
|
|
1463bcbba2 | ||
|
|
c94930065a | ||
|
|
d5cd2dd65f | ||
|
|
6f5c1adc65 | ||
|
|
4f9edc15a7 | ||
|
|
504fb21b89 | ||
|
|
47df0318fc | ||
|
|
efdec3e7ce | ||
|
|
083e82ae0c | ||
|
|
a90a9150bc | ||
|
|
7198405576 | ||
|
|
47c3af08fa | ||
|
|
928c08fb07 | ||
|
|
63b5f59425 | ||
|
|
c207d22130 | ||
|
|
d9e3e97bc8 | ||
|
|
7aa71710ca | ||
|
|
cd96252d84 | ||
|
|
342dcaf481 | ||
|
|
91dcaf4e5c | ||
|
|
5ac9ec00af | ||
|
|
42503cca34 | ||
|
|
f8b7fe98c4 | ||
|
|
75128a8d3d | ||
|
|
4953849642 | ||
|
|
715199a180 | ||
|
|
dc0763eaa2 | ||
|
|
9c67f4c479 | ||
|
|
0ca6027179 | ||
|
|
83eab51fe2 | ||
|
|
562096cc40 | ||
|
|
1244da43b1 | ||
|
|
15ed51a4ca | ||
|
|
fdc4054b9d | ||
|
|
59300dbe2a | ||
|
|
400c0a2602 | ||
|
|
b821346005 | ||
|
|
d55310b9f9 | ||
|
|
3db82856dc | ||
|
|
5da30e54b3 | ||
|
|
09da9b25fa | ||
|
|
ecaf85d034 | ||
|
|
24500c1c50 | ||
|
|
e01401eb86 | ||
|
|
e3793792ba | ||
|
|
8101e94f49 | ||
|
|
d7581d0654 |
2
OWNERS
2
OWNERS
@@ -9,6 +9,7 @@ approvers:
|
||||
- sttts
|
||||
- yliaog
|
||||
- jpbetz
|
||||
- enj
|
||||
reviewers:
|
||||
- aojea
|
||||
- apelisse
|
||||
@@ -22,6 +23,7 @@ reviewers:
|
||||
- yliaog
|
||||
- jpbetz
|
||||
- jefftree
|
||||
- enj
|
||||
labels:
|
||||
- sig/api-machinery
|
||||
emeritus_approvers:
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ApplyConfigurationApplyConfiguration represents a declarative configuration of the ApplyConfiguration type for use
|
||||
// with apply.
|
||||
//
|
||||
// ApplyConfiguration defines the desired configuration values of an object.
|
||||
type ApplyConfigurationApplyConfiguration struct {
|
||||
// expression will be evaluated by CEL to create an apply configuration.
|
||||
// ref: https://github.com/google/cel-spec
|
||||
//
|
||||
// Apply configurations are declared in CEL using object initialization. For example, this CEL expression
|
||||
// returns an apply configuration to set a single field:
|
||||
//
|
||||
// Object{
|
||||
// spec: Object.spec{
|
||||
// serviceAccountName: "example"
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of
|
||||
// values not included in the apply configuration.
|
||||
//
|
||||
// CEL expressions have access to the object types needed to create apply configurations:
|
||||
//
|
||||
// - 'Object' - CEL type of the resource object.
|
||||
// - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec')
|
||||
// - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers')
|
||||
//
|
||||
// CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:
|
||||
//
|
||||
// - 'object' - The object from the incoming request. The value is null for DELETE requests.
|
||||
// - 'oldObject' - The existing object. The value is null for CREATE requests.
|
||||
// - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).
|
||||
// - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.
|
||||
// - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.
|
||||
// - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
|
||||
// For example, a variable named 'foo' can be accessed as 'variables.foo'.
|
||||
// - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
|
||||
// See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
|
||||
// - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
|
||||
// request resource.
|
||||
//
|
||||
// The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the
|
||||
// object. No other metadata properties are accessible.
|
||||
//
|
||||
// Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
|
||||
// Required.
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
}
|
||||
|
||||
// ApplyConfigurationApplyConfiguration constructs a declarative configuration of the ApplyConfiguration type for use with
|
||||
// apply.
|
||||
func ApplyConfiguration() *ApplyConfigurationApplyConfiguration {
|
||||
return &ApplyConfigurationApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithExpression sets the Expression field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Expression field is set to the value of the last call.
|
||||
func (b *ApplyConfigurationApplyConfiguration) WithExpression(value string) *ApplyConfigurationApplyConfiguration {
|
||||
b.Expression = &value
|
||||
return b
|
||||
}
|
||||
@@ -23,11 +23,11 @@ package v1
|
||||
//
|
||||
// ExpressionWarning is a warning information that targets a specific expression.
|
||||
type ExpressionWarningApplyConfiguration struct {
|
||||
// The path to the field that refers the expression.
|
||||
// fieldRef is the path to the field that refers to the expression.
|
||||
// For example, the reference to the expression of the first item of
|
||||
// validations is "spec.validations[0].expression"
|
||||
FieldRef *string `json:"fieldRef,omitempty"`
|
||||
// The content of type checking information in a human-readable form.
|
||||
// warning contains the content of type checking information in a human-readable form.
|
||||
// Each line of the warning contains the type that the expression is checked
|
||||
// against, followed by the type check error from the compiler.
|
||||
Warning *string `json:"warning,omitempty"`
|
||||
|
||||
105
applyconfigurations/admissionregistration/v1/jsonpatch.go
Normal file
105
applyconfigurations/admissionregistration/v1/jsonpatch.go
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// JSONPatchApplyConfiguration represents a declarative configuration of the JSONPatch type for use
|
||||
// with apply.
|
||||
//
|
||||
// JSONPatch defines a JSON Patch.
|
||||
type JSONPatchApplyConfiguration struct {
|
||||
// expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/).
|
||||
// ref: https://github.com/google/cel-spec
|
||||
//
|
||||
// expression must return an array of JSONPatch values.
|
||||
//
|
||||
// For example, this CEL expression returns a JSON patch to conditionally modify a value:
|
||||
//
|
||||
// [
|
||||
// JSONPatch{op: "test", path: "/spec/example", value: "Red"},
|
||||
// JSONPatch{op: "replace", path: "/spec/example", value: "Green"}
|
||||
// ]
|
||||
//
|
||||
// To define an object for the patch value, use Object types. For example:
|
||||
//
|
||||
// [
|
||||
// JSONPatch{
|
||||
// op: "add",
|
||||
// path: "/spec/selector",
|
||||
// value: Object.spec.selector{matchLabels: {"environment": "test"}}
|
||||
// }
|
||||
// ]
|
||||
//
|
||||
// To use strings containing '/' and '~' as JSONPatch path keys, use "jsonpatch.escapeKey". For example:
|
||||
//
|
||||
// [
|
||||
// JSONPatch{
|
||||
// op: "add",
|
||||
// path: "/metadata/labels/" + jsonpatch.escapeKey("example.com/environment"),
|
||||
// value: "test"
|
||||
// },
|
||||
// ]
|
||||
//
|
||||
// CEL expressions have access to the types needed to create JSON patches and objects:
|
||||
//
|
||||
// - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'.
|
||||
// See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string,
|
||||
// integer, array, map or object. If set, the 'path' and 'from' fields must be set to a
|
||||
// [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL
|
||||
// function may be used to escape path keys containing '/' and '~'.
|
||||
// - 'Object' - CEL type of the resource object.
|
||||
// - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec')
|
||||
// - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers')
|
||||
//
|
||||
// CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:
|
||||
//
|
||||
// - 'object' - The object from the incoming request. The value is null for DELETE requests.
|
||||
// - 'oldObject' - The existing object. The value is null for CREATE requests.
|
||||
// - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).
|
||||
// - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.
|
||||
// - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.
|
||||
// - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
|
||||
// For example, a variable named 'foo' can be accessed as 'variables.foo'.
|
||||
// - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
|
||||
// See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
|
||||
// - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
|
||||
// request resource.
|
||||
//
|
||||
// CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries)
|
||||
// as well as:
|
||||
//
|
||||
// - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively).
|
||||
//
|
||||
// Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
|
||||
// Required.
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
}
|
||||
|
||||
// JSONPatchApplyConfiguration constructs a declarative configuration of the JSONPatch type for use with
|
||||
// apply.
|
||||
func JSONPatch() *JSONPatchApplyConfiguration {
|
||||
return &JSONPatchApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithExpression sets the Expression field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Expression field is set to the value of the last call.
|
||||
func (b *JSONPatchApplyConfiguration) WithExpression(value string) *JSONPatchApplyConfiguration {
|
||||
b.Expression = &value
|
||||
return b
|
||||
}
|
||||
@@ -23,7 +23,7 @@ package v1
|
||||
//
|
||||
// MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
|
||||
type MatchConditionApplyConfiguration struct {
|
||||
// Name is an identifier for this match condition, used for strategic merging of MatchConditions,
|
||||
// name is an identifier for this match condition, used for strategic merging of MatchConditions,
|
||||
// as well as providing an identifier for logging purposes. A good name should be descriptive of
|
||||
// the associated expression.
|
||||
// Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and
|
||||
@@ -33,7 +33,7 @@ type MatchConditionApplyConfiguration struct {
|
||||
//
|
||||
// Required.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
|
||||
// expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
|
||||
// CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
|
||||
//
|
||||
// 'object' - The object from the incoming request. The value is null for DELETE requests.
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
// on whether it meets the match criteria.
|
||||
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
||||
type MatchResourcesApplyConfiguration struct {
|
||||
// NamespaceSelector decides whether to run the admission control policy on an object based
|
||||
// namespaceSelector decides whether to run the admission control policy on an object based
|
||||
// on whether the namespace for that object matches the selector. If the
|
||||
// object itself is a namespace, the matching is performed on
|
||||
// object.metadata.labels. If the object is another cluster scoped resource,
|
||||
@@ -74,7 +74,7 @@ type MatchResourcesApplyConfiguration struct {
|
||||
//
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
|
||||
// ObjectSelector decides whether to run the validation based on if the
|
||||
// objectSelector decides whether to run the validation based on if the
|
||||
// object has matching labels. objectSelector is evaluated against both
|
||||
// the oldObject and newObject that would be sent to the cel validation, and
|
||||
// is considered to match if either object matches the selector. A null
|
||||
@@ -86,10 +86,10 @@ type MatchResourcesApplyConfiguration struct {
|
||||
// users may skip the admission webhook by setting the labels.
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
|
||||
// ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
|
||||
// resourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
|
||||
// The policy cares about an operation if it matches _any_ Rule.
|
||||
ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"`
|
||||
// ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
|
||||
// excludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
|
||||
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
||||
ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"`
|
||||
// matchPolicy defines how the "MatchResources" list is used to match incoming requests.
|
||||
|
||||
@@ -0,0 +1,274 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
|
||||
apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// MutatingAdmissionPolicyApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicy type for use
|
||||
// with apply.
|
||||
//
|
||||
// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.
|
||||
type MutatingAdmissionPolicyApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// spec defines the desired behavior of the MutatingAdmissionPolicy.
|
||||
Spec *MutatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// MutatingAdmissionPolicy constructs a declarative configuration of the MutatingAdmissionPolicy type for use with
|
||||
// apply.
|
||||
func MutatingAdmissionPolicy(name string) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b := &MutatingAdmissionPolicyApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithKind("MutatingAdmissionPolicy")
|
||||
b.WithAPIVersion("admissionregistration.k8s.io/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractMutatingAdmissionPolicyFrom extracts the applied configuration owned by fieldManager from
|
||||
// mutatingAdmissionPolicy for the specified subresource. Pass an empty string for subresource to extract
|
||||
// the main resource. Common subresources include "status", "scale", etc.
|
||||
// mutatingAdmissionPolicy must be a unmodified MutatingAdmissionPolicy API object that was retrieved from the Kubernetes API.
|
||||
// ExtractMutatingAdmissionPolicyFrom provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
func ExtractMutatingAdmissionPolicyFrom(mutatingAdmissionPolicy *admissionregistrationv1.MutatingAdmissionPolicy, fieldManager string, subresource string) (*MutatingAdmissionPolicyApplyConfiguration, error) {
|
||||
b := &MutatingAdmissionPolicyApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(mutatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1.MutatingAdmissionPolicy"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(mutatingAdmissionPolicy.Name)
|
||||
|
||||
b.WithKind("MutatingAdmissionPolicy")
|
||||
b.WithAPIVersion("admissionregistration.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// ExtractMutatingAdmissionPolicy extracts the applied configuration owned by fieldManager from
|
||||
// mutatingAdmissionPolicy. If no managedFields are found in mutatingAdmissionPolicy for fieldManager, a
|
||||
// MutatingAdmissionPolicyApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// mutatingAdmissionPolicy must be a unmodified MutatingAdmissionPolicy API object that was retrieved from the Kubernetes API.
|
||||
// ExtractMutatingAdmissionPolicy provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
func ExtractMutatingAdmissionPolicy(mutatingAdmissionPolicy *admissionregistrationv1.MutatingAdmissionPolicy, fieldManager string) (*MutatingAdmissionPolicyApplyConfiguration, error) {
|
||||
return ExtractMutatingAdmissionPolicyFrom(mutatingAdmissionPolicy, fieldManager, "")
|
||||
}
|
||||
|
||||
func (b MutatingAdmissionPolicyApplyConfiguration) IsApplyConfiguration() {}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithKind(value string) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithAPIVersion(value string) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithName(value string) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithGenerateName(value string) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithNamespace(value string) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithUID(value types.UID) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithResourceVersion(value string) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithGeneration(value int64) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithLabels(entries map[string]string) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithFinalizers(values ...string) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) WithSpec(value *MutatingAdmissionPolicySpecApplyConfiguration) *MutatingAdmissionPolicyApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// GetKind retrieves the value of the Kind field in the declarative configuration.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) GetKind() *string {
|
||||
return b.TypeMetaApplyConfiguration.Kind
|
||||
}
|
||||
|
||||
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) GetAPIVersion() *string {
|
||||
return b.TypeMetaApplyConfiguration.APIVersion
|
||||
}
|
||||
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Name
|
||||
}
|
||||
|
||||
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
|
||||
func (b *MutatingAdmissionPolicyApplyConfiguration) GetNamespace() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Namespace
|
||||
}
|
||||
@@ -0,0 +1,284 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
|
||||
apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// MutatingAdmissionPolicyBindingApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicyBinding type for use
|
||||
// with apply.
|
||||
//
|
||||
// MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources.
|
||||
// MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators
|
||||
// configure policies for clusters.
|
||||
//
|
||||
// For a given admission request, each binding will cause its policy to be
|
||||
// evaluated N times, where N is 1 for policies/bindings that don't use
|
||||
// params, otherwise N is the number of parameters selected by the binding.
|
||||
// Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).
|
||||
//
|
||||
// Adding/removing policies, bindings, or params can not affect whether a
|
||||
// given (policy, binding, param) combination is within its own CEL budget.
|
||||
type MutatingAdmissionPolicyBindingApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// spec defines the desired behavior of the MutatingAdmissionPolicyBinding.
|
||||
Spec *MutatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// MutatingAdmissionPolicyBinding constructs a declarative configuration of the MutatingAdmissionPolicyBinding type for use with
|
||||
// apply.
|
||||
func MutatingAdmissionPolicyBinding(name string) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b := &MutatingAdmissionPolicyBindingApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithKind("MutatingAdmissionPolicyBinding")
|
||||
b.WithAPIVersion("admissionregistration.k8s.io/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractMutatingAdmissionPolicyBindingFrom extracts the applied configuration owned by fieldManager from
|
||||
// mutatingAdmissionPolicyBinding for the specified subresource. Pass an empty string for subresource to extract
|
||||
// the main resource. Common subresources include "status", "scale", etc.
|
||||
// mutatingAdmissionPolicyBinding must be a unmodified MutatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API.
|
||||
// ExtractMutatingAdmissionPolicyBindingFrom provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
func ExtractMutatingAdmissionPolicyBindingFrom(mutatingAdmissionPolicyBinding *admissionregistrationv1.MutatingAdmissionPolicyBinding, fieldManager string, subresource string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) {
|
||||
b := &MutatingAdmissionPolicyBindingApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(mutatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1.MutatingAdmissionPolicyBinding"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(mutatingAdmissionPolicyBinding.Name)
|
||||
|
||||
b.WithKind("MutatingAdmissionPolicyBinding")
|
||||
b.WithAPIVersion("admissionregistration.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// ExtractMutatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from
|
||||
// mutatingAdmissionPolicyBinding. If no managedFields are found in mutatingAdmissionPolicyBinding for fieldManager, a
|
||||
// MutatingAdmissionPolicyBindingApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// mutatingAdmissionPolicyBinding must be a unmodified MutatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API.
|
||||
// ExtractMutatingAdmissionPolicyBinding provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
func ExtractMutatingAdmissionPolicyBinding(mutatingAdmissionPolicyBinding *admissionregistrationv1.MutatingAdmissionPolicyBinding, fieldManager string) (*MutatingAdmissionPolicyBindingApplyConfiguration, error) {
|
||||
return ExtractMutatingAdmissionPolicyBindingFrom(mutatingAdmissionPolicyBinding, fieldManager, "")
|
||||
}
|
||||
|
||||
func (b MutatingAdmissionPolicyBindingApplyConfiguration) IsApplyConfiguration() {}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithKind(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithName(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithNamespace(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithUID(value types.UID) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion(value string) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithGeneration(value int64) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithLabels(entries map[string]string) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations(entries map[string]string) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers(values ...string) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) WithSpec(value *MutatingAdmissionPolicyBindingSpecApplyConfiguration) *MutatingAdmissionPolicyBindingApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// GetKind retrieves the value of the Kind field in the declarative configuration.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetKind() *string {
|
||||
return b.TypeMetaApplyConfiguration.Kind
|
||||
}
|
||||
|
||||
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetAPIVersion() *string {
|
||||
return b.TypeMetaApplyConfiguration.APIVersion
|
||||
}
|
||||
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Name
|
||||
}
|
||||
|
||||
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
|
||||
func (b *MutatingAdmissionPolicyBindingApplyConfiguration) GetNamespace() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Namespace
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// MutatingAdmissionPolicyBindingSpecApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicyBindingSpec type for use
|
||||
// with apply.
|
||||
//
|
||||
// MutatingAdmissionPolicyBindingSpec defines the specification of the MutatingAdmissionPolicyBinding.
|
||||
type MutatingAdmissionPolicyBindingSpecApplyConfiguration struct {
|
||||
// policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to.
|
||||
// If the referenced resource does not exist, this binding is considered invalid and will be ignored
|
||||
// Required.
|
||||
PolicyName *string `json:"policyName,omitempty"`
|
||||
// paramRef specifies the parameter resource used to configure the admission control policy.
|
||||
// It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy.
|
||||
// If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied.
|
||||
// If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
|
||||
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
|
||||
// matchResources limits what resources match this binding and may be mutated by it.
|
||||
// Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and
|
||||
// matchConditions before the resource may be mutated.
|
||||
// When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints
|
||||
// and matchConditions must match for the resource to be mutated.
|
||||
// Additionally, matchResources.resourceRules are optional and do not constraint matching when unset.
|
||||
// Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required.
|
||||
// The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched.
|
||||
// '*' matches CREATE, UPDATE and CONNECT.
|
||||
MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"`
|
||||
}
|
||||
|
||||
// MutatingAdmissionPolicyBindingSpecApplyConfiguration constructs a declarative configuration of the MutatingAdmissionPolicyBindingSpec type for use with
|
||||
// apply.
|
||||
func MutatingAdmissionPolicyBindingSpec() *MutatingAdmissionPolicyBindingSpecApplyConfiguration {
|
||||
return &MutatingAdmissionPolicyBindingSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPolicyName sets the PolicyName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PolicyName field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *MutatingAdmissionPolicyBindingSpecApplyConfiguration {
|
||||
b.PolicyName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithParamRef sets the ParamRef field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ParamRef field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *MutatingAdmissionPolicyBindingSpecApplyConfiguration {
|
||||
b.ParamRef = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMatchResources sets the MatchResources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MatchResources field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *MutatingAdmissionPolicyBindingSpecApplyConfiguration {
|
||||
b.MatchResources = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
|
||||
)
|
||||
|
||||
// MutatingAdmissionPolicySpecApplyConfiguration represents a declarative configuration of the MutatingAdmissionPolicySpec type for use
|
||||
// with apply.
|
||||
//
|
||||
// MutatingAdmissionPolicySpec defines the desired behavior of the admission policy.
|
||||
type MutatingAdmissionPolicySpecApplyConfiguration struct {
|
||||
// paramKind specifies the kind of resources used to parameterize this policy.
|
||||
// If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions.
|
||||
// If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied.
|
||||
// If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.
|
||||
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
|
||||
// matchConstraints specifies what resources this policy is designed to validate.
|
||||
// The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints.
|
||||
// However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API
|
||||
// MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding.
|
||||
// The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched.
|
||||
// '*' matches CREATE, UPDATE and CONNECT.
|
||||
// Required.
|
||||
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
|
||||
// variables contain definitions of variables that can be used in composition of other expressions.
|
||||
// Each variable is defined as a named CEL expression.
|
||||
// The variables defined here will be available under `variables` in other expressions of the policy
|
||||
// except matchConditions because matchConditions are evaluated before the rest of the policy.
|
||||
//
|
||||
// The expression of a variable can refer to other variables defined earlier in the list but not those after.
|
||||
// Thus, variables must be sorted by the order of first appearance and acyclic.
|
||||
Variables []VariableApplyConfiguration `json:"variables,omitempty"`
|
||||
// mutations contain operations to perform on matching objects.
|
||||
// mutations may not be empty; a minimum of one mutation is required.
|
||||
// mutations are evaluated in order, and are reinvoked according to
|
||||
// the reinvocationPolicy.
|
||||
// The mutations of a policy are invoked for each binding of this policy
|
||||
// and reinvocation of mutations occurs on a per binding basis.
|
||||
Mutations []MutationApplyConfiguration `json:"mutations,omitempty"`
|
||||
// failurePolicy defines how to handle failures for the admission policy. Failures can
|
||||
// occur from CEL expression parse errors, type check errors, runtime errors and invalid
|
||||
// or mis-configured policy definitions or bindings.
|
||||
//
|
||||
// A policy is invalid if paramKind refers to a non-existent Kind.
|
||||
// A binding is invalid if paramRef.name refers to a non-existent resource.
|
||||
//
|
||||
// failurePolicy does not define how validations that evaluate to false are handled.
|
||||
//
|
||||
// Allowed values are Ignore or Fail. Defaults to Fail.
|
||||
FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"`
|
||||
// matchConditions is a list of conditions that must be met for a request to be validated.
|
||||
// Match conditions filter requests that have already been matched by the matchConstraints.
|
||||
// An empty list of matchConditions matches all requests.
|
||||
// There are a maximum of 64 match conditions allowed.
|
||||
//
|
||||
// If a parameter object is provided, it can be accessed via the `params` handle in the same
|
||||
// manner as validation expressions.
|
||||
//
|
||||
// The exact matching logic is (in order):
|
||||
// 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
|
||||
// 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
|
||||
// 3. If any matchCondition evaluates to an error (but none are FALSE):
|
||||
// - If failurePolicy=Fail, reject the request
|
||||
// - If failurePolicy=Ignore, the policy is skipped
|
||||
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
|
||||
// reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding
|
||||
// as part of a single admission evaluation.
|
||||
// Allowed values are "Never" and "IfNeeded".
|
||||
//
|
||||
// Never: These mutations will not be called more than once per binding in a single admission evaluation.
|
||||
//
|
||||
// IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of
|
||||
// order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only
|
||||
// reinvoked when mutations change the object after this mutation is invoked.
|
||||
// Required.
|
||||
ReinvocationPolicy *admissionregistrationv1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"`
|
||||
}
|
||||
|
||||
// MutatingAdmissionPolicySpecApplyConfiguration constructs a declarative configuration of the MutatingAdmissionPolicySpec type for use with
|
||||
// apply.
|
||||
func MutatingAdmissionPolicySpec() *MutatingAdmissionPolicySpecApplyConfiguration {
|
||||
return &MutatingAdmissionPolicySpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithParamKind sets the ParamKind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ParamKind field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithParamKind(value *ParamKindApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration {
|
||||
b.ParamKind = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMatchConstraints sets the MatchConstraints field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MatchConstraints field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints(value *MatchResourcesApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration {
|
||||
b.MatchConstraints = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVariables adds the given value to the Variables field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Variables field.
|
||||
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithVariables(values ...*VariableApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithVariables")
|
||||
}
|
||||
b.Variables = append(b.Variables, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMutations adds the given value to the Mutations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Mutations field.
|
||||
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMutations(values ...*MutationApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithMutations")
|
||||
}
|
||||
b.Mutations = append(b.Mutations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FailurePolicy field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1.FailurePolicyType) *MutatingAdmissionPolicySpecApplyConfiguration {
|
||||
b.FailurePolicy = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the MatchConditions field.
|
||||
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *MutatingAdmissionPolicySpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithMatchConditions")
|
||||
}
|
||||
b.MatchConditions = append(b.MatchConditions, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReinvocationPolicy sets the ReinvocationPolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ReinvocationPolicy field is set to the value of the last call.
|
||||
func (b *MutatingAdmissionPolicySpecApplyConfiguration) WithReinvocationPolicy(value admissionregistrationv1.ReinvocationPolicyType) *MutatingAdmissionPolicySpecApplyConfiguration {
|
||||
b.ReinvocationPolicy = &value
|
||||
return b
|
||||
}
|
||||
@@ -28,23 +28,23 @@ import (
|
||||
//
|
||||
// MutatingWebhook describes an admission webhook and the resources and operations it applies to.
|
||||
type MutatingWebhookApplyConfiguration struct {
|
||||
// The name of the admission webhook.
|
||||
// name is the name of the admission webhook.
|
||||
// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
|
||||
// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
|
||||
// of the organization.
|
||||
// Required.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// ClientConfig defines how to communicate with the hook.
|
||||
// clientConfig defines how to communicate with the hook.
|
||||
// Required
|
||||
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
|
||||
// Rules describes what operations on what resources/subresources the webhook cares about.
|
||||
// rules describes what operations on what resources/subresources the webhook cares about.
|
||||
// The webhook cares about an operation if it matches _any_ Rule.
|
||||
// However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
|
||||
// from putting the cluster in a state which cannot be recovered from without completely
|
||||
// disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
|
||||
// on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
|
||||
Rules []RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
|
||||
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
|
||||
// failurePolicy defines how unrecognized errors from the admission endpoint are handled -
|
||||
// allowed values are Ignore or Fail. Defaults to Fail.
|
||||
FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"`
|
||||
// matchPolicy defines how the "rules" list is used to match incoming requests.
|
||||
@@ -62,7 +62,7 @@ type MutatingWebhookApplyConfiguration struct {
|
||||
//
|
||||
// Defaults to "Equivalent"
|
||||
MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"`
|
||||
// NamespaceSelector decides whether to run the webhook on an object based
|
||||
// namespaceSelector decides whether to run the webhook on an object based
|
||||
// on whether the namespace for that object matches the selector. If the
|
||||
// object itself is a namespace, the matching is performed on
|
||||
// object.metadata.labels. If the object is another cluster scoped resource,
|
||||
@@ -106,7 +106,7 @@ type MutatingWebhookApplyConfiguration struct {
|
||||
//
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
|
||||
// ObjectSelector decides whether to run the webhook based on if the
|
||||
// objectSelector decides whether to run the webhook based on if the
|
||||
// object has matching labels. objectSelector is evaluated against both
|
||||
// the oldObject and newObject that would be sent to the webhook, and
|
||||
// is considered to match if either object matches the selector. A null
|
||||
@@ -118,20 +118,20 @@ type MutatingWebhookApplyConfiguration struct {
|
||||
// users may skip the admission webhook by setting the labels.
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
|
||||
// SideEffects states whether this webhook has side effects.
|
||||
// sideEffects states whether this webhook has side effects.
|
||||
// Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown).
|
||||
// Webhooks with side effects MUST implement a reconciliation system, since a request may be
|
||||
// rejected by a future step in the admission chain and the side effects therefore need to be undone.
|
||||
// Requests with the dryRun attribute will be auto-rejected if they match a webhook with
|
||||
// sideEffects == Unknown or Some.
|
||||
SideEffects *admissionregistrationv1.SideEffectClass `json:"sideEffects,omitempty"`
|
||||
// TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
|
||||
// timeoutSeconds specifies the timeout for this webhook. After the timeout passes,
|
||||
// the webhook call will be ignored or the API call will fail based on the
|
||||
// failure policy.
|
||||
// The timeout value must be between 1 and 30 seconds.
|
||||
// Default to 10 seconds.
|
||||
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
|
||||
// AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
|
||||
// admissionReviewVersions is an ordered list of preferred `AdmissionReview`
|
||||
// versions the Webhook expects. API server will try to use first version in
|
||||
// the list which it supports. If none of the versions specified in this list
|
||||
// supported by API server, validation will fail for this object.
|
||||
@@ -155,7 +155,7 @@ type MutatingWebhookApplyConfiguration struct {
|
||||
//
|
||||
// Defaults to "Never".
|
||||
ReinvocationPolicy *admissionregistrationv1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"`
|
||||
// MatchConditions is a list of conditions that must be met for a request to be sent to this
|
||||
// matchConditions is a list of conditions that must be met for a request to be sent to this
|
||||
// webhook. Match conditions filter requests that have already been matched by the rules,
|
||||
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
|
||||
// There are a maximum of 64 match conditions allowed.
|
||||
|
||||
@@ -32,10 +32,10 @@ import (
|
||||
//
|
||||
// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
|
||||
type MutatingWebhookConfigurationApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Webhooks is a list of webhooks and the affected resources and operations.
|
||||
// webhooks is a list of webhooks and the affected resources and operations.
|
||||
Webhooks []MutatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
72
applyconfigurations/admissionregistration/v1/mutation.go
Normal file
72
applyconfigurations/admissionregistration/v1/mutation.go
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
|
||||
)
|
||||
|
||||
// MutationApplyConfiguration represents a declarative configuration of the Mutation type for use
|
||||
// with apply.
|
||||
//
|
||||
// Mutation specifies the CEL expression which is used to apply the Mutation.
|
||||
type MutationApplyConfiguration struct {
|
||||
// patchType indicates the patch strategy used.
|
||||
// Allowed values are "ApplyConfiguration" and "JSONPatch".
|
||||
// Required.
|
||||
PatchType *admissionregistrationv1.PatchType `json:"patchType,omitempty"`
|
||||
// applyConfiguration defines the desired configuration values of an object.
|
||||
// The configuration is applied to the admission object using
|
||||
// [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff).
|
||||
// A CEL expression is used to create apply configuration.
|
||||
ApplyConfiguration *ApplyConfigurationApplyConfiguration `json:"applyConfiguration,omitempty"`
|
||||
// jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object.
|
||||
// A CEL expression is used to create the JSON patch.
|
||||
JSONPatch *JSONPatchApplyConfiguration `json:"jsonPatch,omitempty"`
|
||||
}
|
||||
|
||||
// MutationApplyConfiguration constructs a declarative configuration of the Mutation type for use with
|
||||
// apply.
|
||||
func Mutation() *MutationApplyConfiguration {
|
||||
return &MutationApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPatchType sets the PatchType field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PatchType field is set to the value of the last call.
|
||||
func (b *MutationApplyConfiguration) WithPatchType(value admissionregistrationv1.PatchType) *MutationApplyConfiguration {
|
||||
b.PatchType = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithApplyConfiguration sets the ApplyConfiguration field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ApplyConfiguration field is set to the value of the last call.
|
||||
func (b *MutationApplyConfiguration) WithApplyConfiguration(value *ApplyConfigurationApplyConfiguration) *MutationApplyConfiguration {
|
||||
b.ApplyConfiguration = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithJSONPatch sets the JSONPatch field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the JSONPatch field is set to the value of the last call.
|
||||
func (b *MutationApplyConfiguration) WithJSONPatch(value *JSONPatchApplyConfiguration) *MutationApplyConfiguration {
|
||||
b.JSONPatch = value
|
||||
return b
|
||||
}
|
||||
@@ -27,10 +27,10 @@ import (
|
||||
//
|
||||
// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
|
||||
type NamedRuleWithOperationsApplyConfiguration struct {
|
||||
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
||||
// resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
||||
ResourceNames []string `json:"resourceNames,omitempty"`
|
||||
// RuleWithOperations is a tuple of Operations and Resources.
|
||||
RuleWithOperationsApplyConfiguration `json:",inline"`
|
||||
RuleWithOperationsApplyConfiguration `json:""`
|
||||
}
|
||||
|
||||
// NamedRuleWithOperationsApplyConfiguration constructs a declarative configuration of the NamedRuleWithOperations type for use with
|
||||
|
||||
@@ -23,11 +23,11 @@ package v1
|
||||
//
|
||||
// ParamKind is a tuple of Group Kind and Version.
|
||||
type ParamKindApplyConfiguration struct {
|
||||
// APIVersion is the API group version the resources belong to.
|
||||
// apiVersion is the API group version the resources belong to.
|
||||
// In format of "group/version".
|
||||
// Required.
|
||||
APIVersion *string `json:"apiVersion,omitempty"`
|
||||
// Kind is the API kind the resources belong to.
|
||||
// kind is the API kind the resources belong to.
|
||||
// Required.
|
||||
Kind *string `json:"kind,omitempty"`
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ type ParamRefApplyConfiguration struct {
|
||||
// One of `name` or `selector` must be set, but `name` and `selector` are
|
||||
// mutually exclusive properties. If one is set, the other must be unset.
|
||||
Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
|
||||
// `parameterNotFoundAction` controls the behavior of the binding when the resource
|
||||
// parameterNotFoundAction controls the behavior of the binding when the resource
|
||||
// exists, and name or selector is valid, but there are no parameters
|
||||
// matched by the binding. If the value is set to `Allow`, then no
|
||||
// matched parameters will be treated as successful validation by the binding.
|
||||
|
||||
@@ -28,15 +28,15 @@ import (
|
||||
// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
|
||||
// to make sure that all the tuple expansions are valid.
|
||||
type RuleApplyConfiguration struct {
|
||||
// APIGroups is the API groups the resources belong to. '*' is all groups.
|
||||
// apiGroups is the API groups the resources belong to. '*' is all groups.
|
||||
// If '*' is present, the length of the slice must be one.
|
||||
// Required.
|
||||
APIGroups []string `json:"apiGroups,omitempty"`
|
||||
// APIVersions is the API versions the resources belong to. '*' is all versions.
|
||||
// apiVersions is the API versions the resources belong to. '*' is all versions.
|
||||
// If '*' is present, the length of the slice must be one.
|
||||
// Required.
|
||||
APIVersions []string `json:"apiVersions,omitempty"`
|
||||
// Resources is a list of resources this rule applies to.
|
||||
// resources is a list of resources this rule applies to.
|
||||
//
|
||||
// For example:
|
||||
// 'pods' means pods.
|
||||
|
||||
@@ -28,14 +28,14 @@ import (
|
||||
// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
|
||||
// sure that all the tuple expansions are valid.
|
||||
type RuleWithOperationsApplyConfiguration struct {
|
||||
// Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or *
|
||||
// operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or *
|
||||
// for all of those operations and any future admission operations that are added.
|
||||
// If '*' is present, the length of the slice must be one.
|
||||
// Required.
|
||||
Operations []admissionregistrationv1.OperationType `json:"operations,omitempty"`
|
||||
// Rule is embedded, it describes other criteria of the rule, like
|
||||
// APIGroups, APIVersions, Resources, etc.
|
||||
RuleApplyConfiguration `json:",inline"`
|
||||
RuleApplyConfiguration `json:""`
|
||||
}
|
||||
|
||||
// RuleWithOperationsApplyConfiguration constructs a declarative configuration of the RuleWithOperations type for use with
|
||||
|
||||
@@ -23,16 +23,16 @@ package v1
|
||||
//
|
||||
// ServiceReference holds a reference to Service.legacy.k8s.io
|
||||
type ServiceReferenceApplyConfiguration struct {
|
||||
// `namespace` is the namespace of the service.
|
||||
// namespace is the namespace of the service.
|
||||
// Required
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
// `name` is the name of the service.
|
||||
// name is the name of the service.
|
||||
// Required
|
||||
Name *string `json:"name,omitempty"`
|
||||
// `path` is an optional URL path which will be sent in any request to
|
||||
// path is an optional URL path which will be sent in any request to
|
||||
// this service.
|
||||
Path *string `json:"path,omitempty"`
|
||||
// If specified, the port on the service that hosting webhook.
|
||||
// port is the port on the service that hosts the webhook.
|
||||
// Default to 443 for backward compatibility.
|
||||
// `port` should be a valid port number (1-65535, inclusive).
|
||||
Port *int32 `json:"port,omitempty"`
|
||||
|
||||
@@ -24,7 +24,7 @@ package v1
|
||||
// TypeChecking contains results of type checking the expressions in the
|
||||
// ValidatingAdmissionPolicy
|
||||
type TypeCheckingApplyConfiguration struct {
|
||||
// The type checking warnings for each expression.
|
||||
// expressionWarnings contains the type checking warnings for each expression.
|
||||
ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
|
||||
type ValidatingAdmissionPolicyApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the ValidatingAdmissionPolicy.
|
||||
// spec defines the desired behavior of the ValidatingAdmissionPolicy.
|
||||
Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
|
||||
// The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
|
||||
// status represents the current status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
|
||||
// behaves in the expected way.
|
||||
// Populated by the system.
|
||||
// Read-only.
|
||||
|
||||
@@ -42,10 +42,10 @@ import (
|
||||
// Adding/removing policies, bindings, or params can not affect whether a
|
||||
// given (policy, binding, param) combination is within its own CEL budget.
|
||||
type ValidatingAdmissionPolicyBindingApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
|
||||
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
|
||||
Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
|
||||
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
|
||||
// PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
|
||||
// policyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
|
||||
// If the referenced resource does not exist, this binding is considered invalid and will be ignored
|
||||
// Required.
|
||||
PolicyName *string `json:"policyName,omitempty"`
|
||||
@@ -36,7 +36,7 @@ type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
|
||||
// If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied.
|
||||
// If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
|
||||
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
|
||||
// MatchResources declares what resources match this binding and will be validated by it.
|
||||
// matchResources declares what resources match this binding and will be validated by it.
|
||||
// Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this.
|
||||
// If this is unset, all resources matched by the policy are validated by this binding
|
||||
// When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated.
|
||||
|
||||
@@ -27,18 +27,18 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
|
||||
type ValidatingAdmissionPolicySpecApplyConfiguration struct {
|
||||
// ParamKind specifies the kind of resources used to parameterize this policy.
|
||||
// paramKind specifies the kind of resources used to parameterize this policy.
|
||||
// If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions.
|
||||
// If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied.
|
||||
// If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.
|
||||
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
|
||||
// MatchConstraints specifies what resources this policy is designed to validate.
|
||||
// matchConstraints specifies what resources this policy is designed to validate.
|
||||
// The AdmissionPolicy cares about a request if it matches _all_ Constraints.
|
||||
// However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API
|
||||
// ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding.
|
||||
// Required.
|
||||
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
|
||||
// Validations contain CEL expressions which is used to apply the validation.
|
||||
// validations contain CEL expressions which is used to apply the validation.
|
||||
// Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is
|
||||
// required.
|
||||
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
|
||||
@@ -61,7 +61,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
|
||||
// validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is
|
||||
// required.
|
||||
AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"`
|
||||
// MatchConditions is a list of conditions that must be met for a request to be validated.
|
||||
// matchConditions is a list of conditions that must be met for a request to be validated.
|
||||
// Match conditions filter requests that have already been matched by the rules,
|
||||
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
|
||||
// There are a maximum of 64 match conditions allowed.
|
||||
@@ -76,7 +76,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
|
||||
// - If failurePolicy=Fail, reject the request
|
||||
// - If failurePolicy=Ignore, the policy is skipped
|
||||
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
|
||||
// Variables contain definitions of variables that can be used in composition of other expressions.
|
||||
// variables contain definitions of variables that can be used in composition of other expressions.
|
||||
// Each variable is defined as a named CEL expression.
|
||||
// The variables defined here will be available under `variables` in other expressions of the policy
|
||||
// except MatchConditions because MatchConditions are evaluated before the rest of the policy.
|
||||
|
||||
@@ -27,12 +27,12 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.
|
||||
type ValidatingAdmissionPolicyStatusApplyConfiguration struct {
|
||||
// The generation observed by the controller.
|
||||
// observedGeneration is the generation observed by the controller.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
// The results of type checking for each expression.
|
||||
// typeChecking contains the results of type checking for each expression.
|
||||
// Presence of this field indicates the completion of the type checking.
|
||||
TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"`
|
||||
// The conditions represent the latest available observations of a policy's current state.
|
||||
// conditions represent the latest available observations of a policy's current state.
|
||||
Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -28,23 +28,23 @@ import (
|
||||
//
|
||||
// ValidatingWebhook describes an admission webhook and the resources and operations it applies to.
|
||||
type ValidatingWebhookApplyConfiguration struct {
|
||||
// The name of the admission webhook.
|
||||
// name is the name of the admission webhook.
|
||||
// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
|
||||
// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
|
||||
// of the organization.
|
||||
// Required.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// ClientConfig defines how to communicate with the hook.
|
||||
// clientConfig defines how to communicate with the hook.
|
||||
// Required
|
||||
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
|
||||
// Rules describes what operations on what resources/subresources the webhook cares about.
|
||||
// rules describes what operations on what resources/subresources the webhook cares about.
|
||||
// The webhook cares about an operation if it matches _any_ Rule.
|
||||
// However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
|
||||
// from putting the cluster in a state which cannot be recovered from without completely
|
||||
// disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
|
||||
// on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
|
||||
Rules []RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
|
||||
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
|
||||
// failurePolicy defines how unrecognized errors from the admission endpoint are handled -
|
||||
// allowed values are Ignore or Fail. Defaults to Fail.
|
||||
FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"`
|
||||
// matchPolicy defines how the "rules" list is used to match incoming requests.
|
||||
@@ -62,7 +62,7 @@ type ValidatingWebhookApplyConfiguration struct {
|
||||
//
|
||||
// Defaults to "Equivalent"
|
||||
MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"`
|
||||
// NamespaceSelector decides whether to run the webhook on an object based
|
||||
// namespaceSelector decides whether to run the webhook on an object based
|
||||
// on whether the namespace for that object matches the selector. If the
|
||||
// object itself is a namespace, the matching is performed on
|
||||
// object.metadata.labels. If the object is another cluster scoped resource,
|
||||
@@ -106,7 +106,7 @@ type ValidatingWebhookApplyConfiguration struct {
|
||||
//
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
|
||||
// ObjectSelector decides whether to run the webhook based on if the
|
||||
// objectSelector decides whether to run the webhook based on if the
|
||||
// object has matching labels. objectSelector is evaluated against both
|
||||
// the oldObject and newObject that would be sent to the webhook, and
|
||||
// is considered to match if either object matches the selector. A null
|
||||
@@ -118,20 +118,20 @@ type ValidatingWebhookApplyConfiguration struct {
|
||||
// users may skip the admission webhook by setting the labels.
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
|
||||
// SideEffects states whether this webhook has side effects.
|
||||
// sideEffects states whether this webhook has side effects.
|
||||
// Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown).
|
||||
// Webhooks with side effects MUST implement a reconciliation system, since a request may be
|
||||
// rejected by a future step in the admission chain and the side effects therefore need to be undone.
|
||||
// Requests with the dryRun attribute will be auto-rejected if they match a webhook with
|
||||
// sideEffects == Unknown or Some.
|
||||
SideEffects *admissionregistrationv1.SideEffectClass `json:"sideEffects,omitempty"`
|
||||
// TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
|
||||
// timeoutSeconds specifies the timeout for this webhook. After the timeout passes,
|
||||
// the webhook call will be ignored or the API call will fail based on the
|
||||
// failure policy.
|
||||
// The timeout value must be between 1 and 30 seconds.
|
||||
// Default to 10 seconds.
|
||||
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
|
||||
// AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
|
||||
// admissionReviewVersions is an ordered list of preferred `AdmissionReview`
|
||||
// versions the Webhook expects. API server will try to use first version in
|
||||
// the list which it supports. If none of the versions specified in this list
|
||||
// supported by API server, validation will fail for this object.
|
||||
@@ -139,7 +139,7 @@ type ValidatingWebhookApplyConfiguration struct {
|
||||
// include any versions known to the API Server, calls to the webhook will fail
|
||||
// and be subject to the failure policy.
|
||||
AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"`
|
||||
// MatchConditions is a list of conditions that must be met for a request to be sent to this
|
||||
// matchConditions is a list of conditions that must be met for a request to be sent to this
|
||||
// webhook. Match conditions filter requests that have already been matched by the rules,
|
||||
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
|
||||
// There are a maximum of 64 match conditions allowed.
|
||||
|
||||
@@ -32,10 +32,10 @@ import (
|
||||
//
|
||||
// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
|
||||
type ValidatingWebhookConfigurationApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Webhooks is a list of webhooks and the affected resources and operations.
|
||||
// webhooks is a list of webhooks and the affected resources and operations.
|
||||
Webhooks []ValidatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
//
|
||||
// Validation specifies the CEL expression which is used to apply the validation.
|
||||
type ValidationApplyConfiguration struct {
|
||||
// Expression represents the expression which will be evaluated by CEL.
|
||||
// expression represents the expression which will be evaluated by CEL.
|
||||
// ref: https://github.com/google/cel-spec
|
||||
// CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
|
||||
//
|
||||
@@ -69,7 +69,7 @@ type ValidationApplyConfiguration struct {
|
||||
// non-intersecting keys are appended, retaining their partial order.
|
||||
// Required.
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
// Message represents the message displayed when validation fails. The message is required if the Expression contains
|
||||
// message represents the message displayed when validation fails. The message is required if the Expression contains
|
||||
// line breaks. The message must not contain line breaks.
|
||||
// If unset, the message is "failed rule: {Rule}".
|
||||
// e.g. "must be a URL with the host matching spec.host"
|
||||
@@ -77,7 +77,7 @@ type ValidationApplyConfiguration struct {
|
||||
// The message must not contain line breaks.
|
||||
// If unset, the message is "failed Expression: {Expression}".
|
||||
Message *string `json:"message,omitempty"`
|
||||
// Reason represents a machine-readable description of why this validation failed.
|
||||
// reason represents a machine-readable description of why this validation failed.
|
||||
// If this is the first validation in the list to fail, this reason, as well as the
|
||||
// corresponding HTTP response code, are used in the
|
||||
// HTTP response to the client.
|
||||
|
||||
@@ -23,11 +23,11 @@ package v1
|
||||
//
|
||||
// Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
|
||||
type VariableApplyConfiguration struct {
|
||||
// Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
|
||||
// name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
|
||||
// The variable can be accessed in other expressions through `variables`
|
||||
// For example, if name is "foo", the variable will be available as `variables.foo`
|
||||
Name *string `json:"name,omitempty"`
|
||||
// Expression is the expression that will be evaluated as the value of the variable.
|
||||
// expression is the expression that will be evaluated as the value of the variable.
|
||||
// The CEL expression has access to the same identifiers as the CEL expressions in Validation.
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ package v1
|
||||
// WebhookClientConfig contains the information to make a TLS
|
||||
// connection with the webhook
|
||||
type WebhookClientConfigApplyConfiguration struct {
|
||||
// `url` gives the location of the webhook, in standard URL form
|
||||
// url gives the location of the webhook, in standard URL form
|
||||
// (`scheme://host:port/path`). Exactly one of `url` or `service`
|
||||
// must be specified.
|
||||
//
|
||||
@@ -50,12 +50,12 @@ type WebhookClientConfigApplyConfiguration struct {
|
||||
// allowed. Fragments ("#...") and query parameters ("?...") are not
|
||||
// allowed, either.
|
||||
URL *string `json:"url,omitempty"`
|
||||
// `service` is a reference to the service for this webhook. Either
|
||||
// service is a reference to the service for this webhook. Either
|
||||
// `service` or `url` must be specified.
|
||||
//
|
||||
// If the webhook is running within the cluster, then you should use `service`.
|
||||
Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"`
|
||||
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// If unspecified, system trust roots on the apiserver are used.
|
||||
CABundle []byte `json:"caBundle,omitempty"`
|
||||
}
|
||||
|
||||
@@ -23,11 +23,11 @@ package v1alpha1
|
||||
//
|
||||
// ExpressionWarning is a warning information that targets a specific expression.
|
||||
type ExpressionWarningApplyConfiguration struct {
|
||||
// The path to the field that refers the expression.
|
||||
// fieldRef is the path to the field that refers to the expression.
|
||||
// For example, the reference to the expression of the first item of
|
||||
// validations is "spec.validations[0].expression"
|
||||
FieldRef *string `json:"fieldRef,omitempty"`
|
||||
// The content of type checking information in a human-readable form.
|
||||
// warning contains the content of type checking information in a human-readable form.
|
||||
// Each line of the warning contains the type that the expression is checked
|
||||
// against, followed by the type check error from the compiler.
|
||||
Warning *string `json:"warning,omitempty"`
|
||||
|
||||
@@ -21,7 +21,7 @@ package v1alpha1
|
||||
// MatchConditionApplyConfiguration represents a declarative configuration of the MatchCondition type for use
|
||||
// with apply.
|
||||
type MatchConditionApplyConfiguration struct {
|
||||
// Name is an identifier for this match condition, used for strategic merging of MatchConditions,
|
||||
// name is an identifier for this match condition, used for strategic merging of MatchConditions,
|
||||
// as well as providing an identifier for logging purposes. A good name should be descriptive of
|
||||
// the associated expression.
|
||||
// Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and
|
||||
@@ -31,7 +31,7 @@ type MatchConditionApplyConfiguration struct {
|
||||
//
|
||||
// Required.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
|
||||
// expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
|
||||
// CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
|
||||
//
|
||||
// 'object' - The object from the incoming request. The value is null for DELETE requests.
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
// on whether it meets the match criteria.
|
||||
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
||||
type MatchResourcesApplyConfiguration struct {
|
||||
// NamespaceSelector decides whether to run the admission control policy on an object based
|
||||
// namespaceSelector decides whether to run the admission control policy on an object based
|
||||
// on whether the namespace for that object matches the selector. If the
|
||||
// object itself is a namespace, the matching is performed on
|
||||
// object.metadata.labels. If the object is another cluster scoped resource,
|
||||
@@ -74,7 +74,7 @@ type MatchResourcesApplyConfiguration struct {
|
||||
//
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
|
||||
// ObjectSelector decides whether to run the policy based on if the
|
||||
// objectSelector decides whether to run the policy based on if the
|
||||
// object has matching labels. objectSelector is evaluated against both
|
||||
// the oldObject and newObject that would be sent to the policy's expression (CEL), and
|
||||
// is considered to match if either object matches the selector. A null
|
||||
@@ -86,10 +86,10 @@ type MatchResourcesApplyConfiguration struct {
|
||||
// users may skip the admission webhook by setting the labels.
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
|
||||
// ResourceRules describes what operations on what resources/subresources the admission policy matches.
|
||||
// resourceRules describes what operations on what resources/subresources the admission policy matches.
|
||||
// The policy cares about an operation if it matches _any_ Rule.
|
||||
ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"`
|
||||
// ExcludeResourceRules describes what operations on what resources/subresources the policy should not care about.
|
||||
// excludeResourceRules describes what operations on what resources/subresources the policy should not care about.
|
||||
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
||||
ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"`
|
||||
// matchPolicy defines how the "MatchResources" list is used to match incoming requests.
|
||||
|
||||
@@ -32,10 +32,10 @@ import (
|
||||
//
|
||||
// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.
|
||||
type MutatingAdmissionPolicyApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the MutatingAdmissionPolicy.
|
||||
// spec defines the desired behavior of the MutatingAdmissionPolicy.
|
||||
Spec *MutatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -42,10 +42,10 @@ import (
|
||||
// Adding/removing policies, bindings, or params can not affect whether a
|
||||
// given (policy, binding, param) combination is within its own CEL budget.
|
||||
type MutatingAdmissionPolicyBindingApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the MutatingAdmissionPolicyBinding.
|
||||
// spec defines the desired behavior of the MutatingAdmissionPolicyBinding.
|
||||
Spec *MutatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ import (
|
||||
//
|
||||
// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
|
||||
type NamedRuleWithOperationsApplyConfiguration struct {
|
||||
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
||||
// resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
||||
ResourceNames []string `json:"resourceNames,omitempty"`
|
||||
// RuleWithOperations is a tuple of Operations and Resources.
|
||||
v1.RuleWithOperationsApplyConfiguration `json:",inline"`
|
||||
v1.RuleWithOperationsApplyConfiguration `json:""`
|
||||
}
|
||||
|
||||
// NamedRuleWithOperationsApplyConfiguration constructs a declarative configuration of the NamedRuleWithOperations type for use with
|
||||
|
||||
@@ -23,11 +23,11 @@ package v1alpha1
|
||||
//
|
||||
// ParamKind is a tuple of Group Kind and Version.
|
||||
type ParamKindApplyConfiguration struct {
|
||||
// APIVersion is the API group version the resources belong to.
|
||||
// apiVersion is the API group version the resources belong to.
|
||||
// In format of "group/version".
|
||||
// Required.
|
||||
APIVersion *string `json:"apiVersion,omitempty"`
|
||||
// Kind is the API kind the resources belong to.
|
||||
// kind is the API kind the resources belong to.
|
||||
// Required.
|
||||
Kind *string `json:"kind,omitempty"`
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
// ParamRef describes how to locate the params to be used as input to
|
||||
// expressions of rules applied by a policy binding.
|
||||
type ParamRefApplyConfiguration struct {
|
||||
// `name` is the name of the resource being referenced.
|
||||
// name is the name of the resource being referenced.
|
||||
//
|
||||
// `name` and `selector` are mutually exclusive properties. If one is set,
|
||||
// the other must be unset.
|
||||
@@ -58,7 +58,7 @@ type ParamRefApplyConfiguration struct {
|
||||
// One of `name` or `selector` must be set, but `name` and `selector` are
|
||||
// mutually exclusive properties. If one is set, the other must be unset.
|
||||
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
|
||||
// `parameterNotFoundAction` controls the behavior of the binding when the resource
|
||||
// parameterNotFoundAction controls the behavior of the binding when the resource
|
||||
// exists, and name or selector is valid, but there are no parameters
|
||||
// matched by the binding. If the value is set to `Allow`, then no
|
||||
// matched parameters will be treated as successful validation by the binding.
|
||||
|
||||
@@ -24,7 +24,7 @@ package v1alpha1
|
||||
// TypeChecking contains results of type checking the expressions in the
|
||||
// ValidatingAdmissionPolicy
|
||||
type TypeCheckingApplyConfiguration struct {
|
||||
// The type checking warnings for each expression.
|
||||
// expressionWarnings contains the type checking warnings for each expression.
|
||||
ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
|
||||
type ValidatingAdmissionPolicyApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the ValidatingAdmissionPolicy.
|
||||
// spec defines the desired behavior of the ValidatingAdmissionPolicy.
|
||||
Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
|
||||
// The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
|
||||
// status represents the current status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
|
||||
// behaves in the expected way.
|
||||
// Populated by the system.
|
||||
// Read-only.
|
||||
|
||||
@@ -42,10 +42,10 @@ import (
|
||||
// Adding/removing policies, bindings, or params can not affect whether a
|
||||
// given (policy, binding, param) combination is within its own CEL budget.
|
||||
type ValidatingAdmissionPolicyBindingApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
|
||||
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
|
||||
Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
|
||||
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
|
||||
// PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
|
||||
// policyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
|
||||
// If the referenced resource does not exist, this binding is considered invalid and will be ignored
|
||||
// Required.
|
||||
PolicyName *string `json:"policyName,omitempty"`
|
||||
@@ -36,7 +36,7 @@ type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
|
||||
// If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied.
|
||||
// If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
|
||||
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
|
||||
// MatchResources declares what resources match this binding and will be validated by it.
|
||||
// matchResources declares what resources match this binding and will be validated by it.
|
||||
// Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this.
|
||||
// If this is unset, all resources matched by the policy are validated by this binding
|
||||
// When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated.
|
||||
|
||||
@@ -27,18 +27,18 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
|
||||
type ValidatingAdmissionPolicySpecApplyConfiguration struct {
|
||||
// ParamKind specifies the kind of resources used to parameterize this policy.
|
||||
// paramKind specifies the kind of resources used to parameterize this policy.
|
||||
// If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions.
|
||||
// If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied.
|
||||
// If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.
|
||||
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
|
||||
// MatchConstraints specifies what resources this policy is designed to validate.
|
||||
// matchConstraints specifies what resources this policy is designed to validate.
|
||||
// The AdmissionPolicy cares about a request if it matches _all_ Constraints.
|
||||
// However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API
|
||||
// ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding.
|
||||
// Required.
|
||||
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
|
||||
// Validations contain CEL expressions which is used to apply the validation.
|
||||
// validations contain CEL expressions which is used to apply the validation.
|
||||
// Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is
|
||||
// required.
|
||||
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
|
||||
@@ -61,7 +61,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
|
||||
// validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is
|
||||
// required.
|
||||
AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"`
|
||||
// MatchConditions is a list of conditions that must be met for a request to be validated.
|
||||
// matchConditions is a list of conditions that must be met for a request to be validated.
|
||||
// Match conditions filter requests that have already been matched by the rules,
|
||||
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
|
||||
// There are a maximum of 64 match conditions allowed.
|
||||
@@ -76,7 +76,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
|
||||
// - If failurePolicy=Fail, reject the request
|
||||
// - If failurePolicy=Ignore, the policy is skipped
|
||||
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
|
||||
// Variables contain definitions of variables that can be used in composition of other expressions.
|
||||
// variables contain definitions of variables that can be used in composition of other expressions.
|
||||
// Each variable is defined as a named CEL expression.
|
||||
// The variables defined here will be available under `variables` in other expressions of the policy
|
||||
// except MatchConditions because MatchConditions are evaluated before the rest of the policy.
|
||||
|
||||
@@ -27,12 +27,12 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy.
|
||||
type ValidatingAdmissionPolicyStatusApplyConfiguration struct {
|
||||
// The generation observed by the controller.
|
||||
// observedGeneration is the generation observed by the controller.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
// The results of type checking for each expression.
|
||||
// typeChecking contains the results of type checking for each expression.
|
||||
// Presence of this field indicates the completion of the type checking.
|
||||
TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"`
|
||||
// The conditions represent the latest available observations of a policy's current state.
|
||||
// conditions represent the latest available observations of a policy's current state.
|
||||
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
//
|
||||
// Validation specifies the CEL expression which is used to apply the validation.
|
||||
type ValidationApplyConfiguration struct {
|
||||
// Expression represents the expression which will be evaluated by CEL.
|
||||
// expression represents the expression which will be evaluated by CEL.
|
||||
// ref: https://github.com/google/cel-spec
|
||||
// CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
|
||||
//
|
||||
@@ -69,7 +69,7 @@ type ValidationApplyConfiguration struct {
|
||||
// non-intersecting keys are appended, retaining their partial order.
|
||||
// Required.
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
// Message represents the message displayed when validation fails. The message is required if the Expression contains
|
||||
// message represents the message displayed when validation fails. The message is required if the Expression contains
|
||||
// line breaks. The message must not contain line breaks.
|
||||
// If unset, the message is "failed rule: {Rule}".
|
||||
// e.g. "must be a URL with the host matching spec.host"
|
||||
@@ -77,7 +77,7 @@ type ValidationApplyConfiguration struct {
|
||||
// The message must not contain line breaks.
|
||||
// If unset, the message is "failed Expression: {Expression}".
|
||||
Message *string `json:"message,omitempty"`
|
||||
// Reason represents a machine-readable description of why this validation failed.
|
||||
// reason represents a machine-readable description of why this validation failed.
|
||||
// If this is the first validation in the list to fail, this reason, as well as the
|
||||
// corresponding HTTP response code, are used in the
|
||||
// HTTP response to the client.
|
||||
|
||||
@@ -23,11 +23,11 @@ package v1alpha1
|
||||
//
|
||||
// Variable is the definition of a variable that is used for composition.
|
||||
type VariableApplyConfiguration struct {
|
||||
// Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
|
||||
// name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
|
||||
// The variable can be accessed in other expressions through `variables`
|
||||
// For example, if name is "foo", the variable will be available as `variables.foo`
|
||||
Name *string `json:"name,omitempty"`
|
||||
// Expression is the expression that will be evaluated as the value of the variable.
|
||||
// expression is the expression that will be evaluated as the value of the variable.
|
||||
// The CEL expression has access to the same identifiers as the CEL expressions in Validation.
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
}
|
||||
|
||||
@@ -23,11 +23,11 @@ package v1beta1
|
||||
//
|
||||
// ExpressionWarning is a warning information that targets a specific expression.
|
||||
type ExpressionWarningApplyConfiguration struct {
|
||||
// The path to the field that refers the expression.
|
||||
// fieldRef is the path to the field that refers to the expression.
|
||||
// For example, the reference to the expression of the first item of
|
||||
// validations is "spec.validations[0].expression"
|
||||
FieldRef *string `json:"fieldRef,omitempty"`
|
||||
// The content of type checking information in a human-readable form.
|
||||
// warning contains the content of type checking information in a human-readable form.
|
||||
// Each line of the warning contains the type that the expression is checked
|
||||
// against, followed by the type check error from the compiler.
|
||||
Warning *string `json:"warning,omitempty"`
|
||||
|
||||
@@ -23,7 +23,7 @@ package v1beta1
|
||||
//
|
||||
// MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook.
|
||||
type MatchConditionApplyConfiguration struct {
|
||||
// Name is an identifier for this match condition, used for strategic merging of MatchConditions,
|
||||
// name is an identifier for this match condition, used for strategic merging of MatchConditions,
|
||||
// as well as providing an identifier for logging purposes. A good name should be descriptive of
|
||||
// the associated expression.
|
||||
// Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and
|
||||
@@ -33,7 +33,7 @@ type MatchConditionApplyConfiguration struct {
|
||||
//
|
||||
// Required.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
|
||||
// expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
|
||||
// CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
|
||||
//
|
||||
// 'object' - The object from the incoming request. The value is null for DELETE requests.
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
// on whether it meets the match criteria.
|
||||
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
||||
type MatchResourcesApplyConfiguration struct {
|
||||
// NamespaceSelector decides whether to run the admission control policy on an object based
|
||||
// namespaceSelector decides whether to run the admission control policy on an object based
|
||||
// on whether the namespace for that object matches the selector. If the
|
||||
// object itself is a namespace, the matching is performed on
|
||||
// object.metadata.labels. If the object is another cluster scoped resource,
|
||||
@@ -74,7 +74,7 @@ type MatchResourcesApplyConfiguration struct {
|
||||
//
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
|
||||
// ObjectSelector decides whether to run the validation based on if the
|
||||
// objectSelector decides whether to run the validation based on if the
|
||||
// object has matching labels. objectSelector is evaluated against both
|
||||
// the oldObject and newObject that would be sent to the cel validation, and
|
||||
// is considered to match if either object matches the selector. A null
|
||||
@@ -86,10 +86,10 @@ type MatchResourcesApplyConfiguration struct {
|
||||
// users may skip the admission webhook by setting the labels.
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
|
||||
// ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
|
||||
// resourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
|
||||
// The policy cares about an operation if it matches _any_ Rule.
|
||||
ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"`
|
||||
// ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
|
||||
// excludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
|
||||
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
||||
ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"`
|
||||
// matchPolicy defines how the "MatchResources" list is used to match incoming requests.
|
||||
|
||||
@@ -32,10 +32,10 @@ import (
|
||||
//
|
||||
// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.
|
||||
type MutatingAdmissionPolicyApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the MutatingAdmissionPolicy.
|
||||
// spec defines the desired behavior of the MutatingAdmissionPolicy.
|
||||
Spec *MutatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -42,10 +42,10 @@ import (
|
||||
// Adding/removing policies, bindings, or params can not affect whether a
|
||||
// given (policy, binding, param) combination is within its own CEL budget.
|
||||
type MutatingAdmissionPolicyBindingApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the MutatingAdmissionPolicyBinding.
|
||||
// spec defines the desired behavior of the MutatingAdmissionPolicyBinding.
|
||||
Spec *MutatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -30,23 +30,23 @@ import (
|
||||
//
|
||||
// MutatingWebhook describes an admission webhook and the resources and operations it applies to.
|
||||
type MutatingWebhookApplyConfiguration struct {
|
||||
// The name of the admission webhook.
|
||||
// name is the name of the admission webhook.
|
||||
// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
|
||||
// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
|
||||
// of the organization.
|
||||
// Required.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// ClientConfig defines how to communicate with the hook.
|
||||
// clientConfig defines how to communicate with the hook.
|
||||
// Required
|
||||
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
|
||||
// Rules describes what operations on what resources/subresources the webhook cares about.
|
||||
// rules describes what operations on what resources/subresources the webhook cares about.
|
||||
// The webhook cares about an operation if it matches _any_ Rule.
|
||||
// However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
|
||||
// from putting the cluster in a state which cannot be recovered from without completely
|
||||
// disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
|
||||
// on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
|
||||
Rules []v1.RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
|
||||
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
|
||||
// failurePolicy defines how unrecognized errors from the admission endpoint are handled -
|
||||
// allowed values are Ignore or Fail. Defaults to Ignore.
|
||||
FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"`
|
||||
// matchPolicy defines how the "rules" list is used to match incoming requests.
|
||||
@@ -64,7 +64,7 @@ type MutatingWebhookApplyConfiguration struct {
|
||||
//
|
||||
// Defaults to "Exact"
|
||||
MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"`
|
||||
// NamespaceSelector decides whether to run the webhook on an object based
|
||||
// namespaceSelector decides whether to run the webhook on an object based
|
||||
// on whether the namespace for that object matches the selector. If the
|
||||
// object itself is a namespace, the matching is performed on
|
||||
// object.metadata.labels. If the object is another cluster scoped resource,
|
||||
@@ -108,7 +108,7 @@ type MutatingWebhookApplyConfiguration struct {
|
||||
//
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
|
||||
// ObjectSelector decides whether to run the webhook based on if the
|
||||
// objectSelector decides whether to run the webhook based on if the
|
||||
// object has matching labels. objectSelector is evaluated against both
|
||||
// the oldObject and newObject that would be sent to the webhook, and
|
||||
// is considered to match if either object matches the selector. A null
|
||||
@@ -120,20 +120,20 @@ type MutatingWebhookApplyConfiguration struct {
|
||||
// users may skip the admission webhook by setting the labels.
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
|
||||
// SideEffects states whether this webhook has side effects.
|
||||
// sideEffects states whether this webhook has side effects.
|
||||
// Acceptable values are: Unknown, None, Some, NoneOnDryRun
|
||||
// Webhooks with side effects MUST implement a reconciliation system, since a request may be
|
||||
// rejected by a future step in the admission chain and the side effects therefore need to be undone.
|
||||
// Requests with the dryRun attribute will be auto-rejected if they match a webhook with
|
||||
// sideEffects == Unknown or Some. Defaults to Unknown.
|
||||
SideEffects *admissionregistrationv1beta1.SideEffectClass `json:"sideEffects,omitempty"`
|
||||
// TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
|
||||
// timeoutSeconds specifies the timeout for this webhook. After the timeout passes,
|
||||
// the webhook call will be ignored or the API call will fail based on the
|
||||
// failure policy.
|
||||
// The timeout value must be between 1 and 30 seconds.
|
||||
// Default to 30 seconds.
|
||||
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
|
||||
// AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
|
||||
// admissionReviewVersions is an ordered list of preferred `AdmissionReview`
|
||||
// versions the Webhook expects. API server will try to use first version in
|
||||
// the list which it supports. If none of the versions specified in this list
|
||||
// supported by API server, validation will fail for this object.
|
||||
@@ -158,7 +158,7 @@ type MutatingWebhookApplyConfiguration struct {
|
||||
//
|
||||
// Defaults to "Never".
|
||||
ReinvocationPolicy *admissionregistrationv1.ReinvocationPolicyType `json:"reinvocationPolicy,omitempty"`
|
||||
// MatchConditions is a list of conditions that must be met for a request to be sent to this
|
||||
// matchConditions is a list of conditions that must be met for a request to be sent to this
|
||||
// webhook. Match conditions filter requests that have already been matched by the rules,
|
||||
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
|
||||
// There are a maximum of 64 match conditions allowed.
|
||||
|
||||
@@ -33,10 +33,10 @@ import (
|
||||
// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
|
||||
// Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead.
|
||||
type MutatingWebhookConfigurationApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Webhooks is a list of webhooks and the affected resources and operations.
|
||||
// webhooks is a list of webhooks and the affected resources and operations.
|
||||
Webhooks []MutatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ import (
|
||||
//
|
||||
// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
|
||||
type NamedRuleWithOperationsApplyConfiguration struct {
|
||||
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
||||
// resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
||||
ResourceNames []string `json:"resourceNames,omitempty"`
|
||||
// RuleWithOperations is a tuple of Operations and Resources.
|
||||
v1.RuleWithOperationsApplyConfiguration `json:",inline"`
|
||||
v1.RuleWithOperationsApplyConfiguration `json:""`
|
||||
}
|
||||
|
||||
// NamedRuleWithOperationsApplyConfiguration constructs a declarative configuration of the NamedRuleWithOperations type for use with
|
||||
|
||||
@@ -23,11 +23,11 @@ package v1beta1
|
||||
//
|
||||
// ParamKind is a tuple of Group Kind and Version.
|
||||
type ParamKindApplyConfiguration struct {
|
||||
// APIVersion is the API group version the resources belong to.
|
||||
// apiVersion is the API group version the resources belong to.
|
||||
// In format of "group/version".
|
||||
// Required.
|
||||
APIVersion *string `json:"apiVersion,omitempty"`
|
||||
// Kind is the API kind the resources belong to.
|
||||
// kind is the API kind the resources belong to.
|
||||
// Required.
|
||||
Kind *string `json:"kind,omitempty"`
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ type ParamRefApplyConfiguration struct {
|
||||
// One of `name` or `selector` must be set, but `name` and `selector` are
|
||||
// mutually exclusive properties. If one is set, the other must be unset.
|
||||
Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
|
||||
// `parameterNotFoundAction` controls the behavior of the binding when the resource
|
||||
// parameterNotFoundAction controls the behavior of the binding when the resource
|
||||
// exists, and name or selector is valid, but there are no parameters
|
||||
// matched by the binding. If the value is set to `Allow`, then no
|
||||
// matched parameters will be treated as successful validation by the binding.
|
||||
|
||||
@@ -23,18 +23,18 @@ package v1beta1
|
||||
//
|
||||
// ServiceReference holds a reference to Service.legacy.k8s.io
|
||||
type ServiceReferenceApplyConfiguration struct {
|
||||
// `namespace` is the namespace of the service.
|
||||
// namespace is the namespace of the service.
|
||||
// Required
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
// `name` is the name of the service.
|
||||
// name is the name of the service.
|
||||
// Required
|
||||
Name *string `json:"name,omitempty"`
|
||||
// `path` is an optional URL path which will be sent in any request to
|
||||
// path is an optional URL path which will be sent in any request to
|
||||
// this service.
|
||||
Path *string `json:"path,omitempty"`
|
||||
// If specified, the port on the service that hosting webhook.
|
||||
// port is the port on the service that hosts the webhook.
|
||||
// Default to 443 for backward compatibility.
|
||||
// `port` should be a valid port number (1-65535, inclusive).
|
||||
// port should be a valid port number (1-65535, inclusive).
|
||||
Port *int32 `json:"port,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ package v1beta1
|
||||
// TypeChecking contains results of type checking the expressions in the
|
||||
// ValidatingAdmissionPolicy
|
||||
type TypeCheckingApplyConfiguration struct {
|
||||
// The type checking warnings for each expression.
|
||||
// expressionWarnings contains the type checking warnings for each expression.
|
||||
ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
|
||||
type ValidatingAdmissionPolicyApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the ValidatingAdmissionPolicy.
|
||||
// spec defines the desired behavior of the ValidatingAdmissionPolicy.
|
||||
Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"`
|
||||
// The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
|
||||
// status represents the current status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
|
||||
// behaves in the expected way.
|
||||
// Populated by the system.
|
||||
// Read-only.
|
||||
|
||||
@@ -42,10 +42,10 @@ import (
|
||||
// Adding/removing policies, bindings, or params can not affect whether a
|
||||
// given (policy, binding, param) combination is within its own CEL budget.
|
||||
type ValidatingAdmissionPolicyBindingApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
|
||||
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
|
||||
Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
|
||||
type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
|
||||
// PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
|
||||
// policyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
|
||||
// If the referenced resource does not exist, this binding is considered invalid and will be ignored
|
||||
// Required.
|
||||
PolicyName *string `json:"policyName,omitempty"`
|
||||
@@ -36,7 +36,7 @@ type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
|
||||
// If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied.
|
||||
// If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
|
||||
ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"`
|
||||
// MatchResources declares what resources match this binding and will be validated by it.
|
||||
// matchResources declares what resources match this binding and will be validated by it.
|
||||
// Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this.
|
||||
// If this is unset, all resources matched by the policy are validated by this binding
|
||||
// When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated.
|
||||
|
||||
@@ -27,18 +27,18 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
|
||||
type ValidatingAdmissionPolicySpecApplyConfiguration struct {
|
||||
// ParamKind specifies the kind of resources used to parameterize this policy.
|
||||
// paramKind specifies the kind of resources used to parameterize this policy.
|
||||
// If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions.
|
||||
// If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied.
|
||||
// If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.
|
||||
ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"`
|
||||
// MatchConstraints specifies what resources this policy is designed to validate.
|
||||
// matchConstraints specifies what resources this policy is designed to validate.
|
||||
// The AdmissionPolicy cares about a request if it matches _all_ Constraints.
|
||||
// However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API
|
||||
// ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding.
|
||||
// Required.
|
||||
MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"`
|
||||
// Validations contain CEL expressions which is used to apply the validation.
|
||||
// validations contain CEL expressions which is used to apply the validation.
|
||||
// Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is
|
||||
// required.
|
||||
Validations []ValidationApplyConfiguration `json:"validations,omitempty"`
|
||||
@@ -61,7 +61,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
|
||||
// validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is
|
||||
// required.
|
||||
AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"`
|
||||
// MatchConditions is a list of conditions that must be met for a request to be validated.
|
||||
// matchConditions is a list of conditions that must be met for a request to be validated.
|
||||
// Match conditions filter requests that have already been matched by the rules,
|
||||
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
|
||||
// There are a maximum of 64 match conditions allowed.
|
||||
@@ -76,7 +76,7 @@ type ValidatingAdmissionPolicySpecApplyConfiguration struct {
|
||||
// - If failurePolicy=Fail, reject the request
|
||||
// - If failurePolicy=Ignore, the policy is skipped
|
||||
MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"`
|
||||
// Variables contain definitions of variables that can be used in composition of other expressions.
|
||||
// variables contain definitions of variables that can be used in composition of other expressions.
|
||||
// Each variable is defined as a named CEL expression.
|
||||
// The variables defined here will be available under `variables` in other expressions of the policy
|
||||
// except MatchConditions because MatchConditions are evaluated before the rest of the policy.
|
||||
|
||||
@@ -27,12 +27,12 @@ import (
|
||||
//
|
||||
// ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.
|
||||
type ValidatingAdmissionPolicyStatusApplyConfiguration struct {
|
||||
// The generation observed by the controller.
|
||||
// observedGeneration is the generation observed by the controller.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
// The results of type checking for each expression.
|
||||
// typeChecking contains the results of type checking for each expression.
|
||||
// Presence of this field indicates the completion of the type checking.
|
||||
TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"`
|
||||
// The conditions represent the latest available observations of a policy's current state.
|
||||
// conditions represent the latest available observations of a policy's current state.
|
||||
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -29,23 +29,23 @@ import (
|
||||
//
|
||||
// ValidatingWebhook describes an admission webhook and the resources and operations it applies to.
|
||||
type ValidatingWebhookApplyConfiguration struct {
|
||||
// The name of the admission webhook.
|
||||
// name is the name of the admission webhook.
|
||||
// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
|
||||
// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
|
||||
// of the organization.
|
||||
// Required.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// ClientConfig defines how to communicate with the hook.
|
||||
// clientConfig defines how to communicate with the hook.
|
||||
// Required
|
||||
ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"`
|
||||
// Rules describes what operations on what resources/subresources the webhook cares about.
|
||||
// rules describes what operations on what resources/subresources the webhook cares about.
|
||||
// The webhook cares about an operation if it matches _any_ Rule.
|
||||
// However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
|
||||
// from putting the cluster in a state which cannot be recovered from without completely
|
||||
// disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
|
||||
// on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
|
||||
Rules []v1.RuleWithOperationsApplyConfiguration `json:"rules,omitempty"`
|
||||
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
|
||||
// failurePolicy defines how unrecognized errors from the admission endpoint are handled -
|
||||
// allowed values are Ignore or Fail. Defaults to Ignore.
|
||||
FailurePolicy *admissionregistrationv1beta1.FailurePolicyType `json:"failurePolicy,omitempty"`
|
||||
// matchPolicy defines how the "rules" list is used to match incoming requests.
|
||||
@@ -63,7 +63,7 @@ type ValidatingWebhookApplyConfiguration struct {
|
||||
//
|
||||
// Defaults to "Exact"
|
||||
MatchPolicy *admissionregistrationv1beta1.MatchPolicyType `json:"matchPolicy,omitempty"`
|
||||
// NamespaceSelector decides whether to run the webhook on an object based
|
||||
// namespaceSelector decides whether to run the webhook on an object based
|
||||
// on whether the namespace for that object matches the selector. If the
|
||||
// object itself is a namespace, the matching is performed on
|
||||
// object.metadata.labels. If the object is another cluster scoped resource,
|
||||
@@ -107,7 +107,7 @@ type ValidatingWebhookApplyConfiguration struct {
|
||||
//
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"`
|
||||
// ObjectSelector decides whether to run the webhook based on if the
|
||||
// objectSelector decides whether to run the webhook based on if the
|
||||
// object has matching labels. objectSelector is evaluated against both
|
||||
// the oldObject and newObject that would be sent to the webhook, and
|
||||
// is considered to match if either object matches the selector. A null
|
||||
@@ -119,20 +119,20 @@ type ValidatingWebhookApplyConfiguration struct {
|
||||
// users may skip the admission webhook by setting the labels.
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
ObjectSelector *metav1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"`
|
||||
// SideEffects states whether this webhook has side effects.
|
||||
// sideEffects states whether this webhook has side effects.
|
||||
// Acceptable values are: Unknown, None, Some, NoneOnDryRun
|
||||
// Webhooks with side effects MUST implement a reconciliation system, since a request may be
|
||||
// rejected by a future step in the admission chain and the side effects therefore need to be undone.
|
||||
// Requests with the dryRun attribute will be auto-rejected if they match a webhook with
|
||||
// sideEffects == Unknown or Some. Defaults to Unknown.
|
||||
SideEffects *admissionregistrationv1beta1.SideEffectClass `json:"sideEffects,omitempty"`
|
||||
// TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
|
||||
// timeoutSeconds specifies the timeout for this webhook. After the timeout passes,
|
||||
// the webhook call will be ignored or the API call will fail based on the
|
||||
// failure policy.
|
||||
// The timeout value must be between 1 and 30 seconds.
|
||||
// Default to 30 seconds.
|
||||
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
|
||||
// AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
|
||||
// admissionReviewVersions is an ordered list of preferred `AdmissionReview`
|
||||
// versions the Webhook expects. API server will try to use first version in
|
||||
// the list which it supports. If none of the versions specified in this list
|
||||
// supported by API server, validation will fail for this object.
|
||||
@@ -141,7 +141,7 @@ type ValidatingWebhookApplyConfiguration struct {
|
||||
// and be subject to the failure policy.
|
||||
// Default to `['v1beta1']`.
|
||||
AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty"`
|
||||
// MatchConditions is a list of conditions that must be met for a request to be sent to this
|
||||
// matchConditions is a list of conditions that must be met for a request to be sent to this
|
||||
// webhook. Match conditions filter requests that have already been matched by the rules,
|
||||
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
|
||||
// There are a maximum of 64 match conditions allowed.
|
||||
|
||||
@@ -33,10 +33,10 @@ import (
|
||||
// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
|
||||
// Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead.
|
||||
type ValidatingWebhookConfigurationApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Webhooks is a list of webhooks and the affected resources and operations.
|
||||
// webhooks is a list of webhooks and the affected resources and operations.
|
||||
Webhooks []ValidatingWebhookApplyConfiguration `json:"webhooks,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
//
|
||||
// Validation specifies the CEL expression which is used to apply the validation.
|
||||
type ValidationApplyConfiguration struct {
|
||||
// Expression represents the expression which will be evaluated by CEL.
|
||||
// expression represents the expression which will be evaluated by CEL.
|
||||
// ref: https://github.com/google/cel-spec
|
||||
// CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
|
||||
//
|
||||
@@ -69,7 +69,7 @@ type ValidationApplyConfiguration struct {
|
||||
// non-intersecting keys are appended, retaining their partial order.
|
||||
// Required.
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
// Message represents the message displayed when validation fails. The message is required if the Expression contains
|
||||
// message represents the message displayed when validation fails. The message is required if the Expression contains
|
||||
// line breaks. The message must not contain line breaks.
|
||||
// If unset, the message is "failed rule: {Rule}".
|
||||
// e.g. "must be a URL with the host matching spec.host"
|
||||
@@ -77,7 +77,7 @@ type ValidationApplyConfiguration struct {
|
||||
// The message must not contain line breaks.
|
||||
// If unset, the message is "failed Expression: {Expression}".
|
||||
Message *string `json:"message,omitempty"`
|
||||
// Reason represents a machine-readable description of why this validation failed.
|
||||
// reason represents a machine-readable description of why this validation failed.
|
||||
// If this is the first validation in the list to fail, this reason, as well as the
|
||||
// corresponding HTTP response code, are used in the
|
||||
// HTTP response to the client.
|
||||
|
||||
@@ -23,11 +23,11 @@ package v1beta1
|
||||
//
|
||||
// Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
|
||||
type VariableApplyConfiguration struct {
|
||||
// Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
|
||||
// name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
|
||||
// The variable can be accessed in other expressions through `variables`
|
||||
// For example, if name is "foo", the variable will be available as `variables.foo`
|
||||
Name *string `json:"name,omitempty"`
|
||||
// Expression is the expression that will be evaluated as the value of the variable.
|
||||
// expression is the expression that will be evaluated as the value of the variable.
|
||||
// The CEL expression has access to the same identifiers as the CEL expressions in Validation.
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ package v1beta1
|
||||
// WebhookClientConfig contains the information to make a TLS
|
||||
// connection with the webhook
|
||||
type WebhookClientConfigApplyConfiguration struct {
|
||||
// `url` gives the location of the webhook, in standard URL form
|
||||
// url gives the location of the webhook, in standard URL form
|
||||
// (`scheme://host:port/path`). Exactly one of `url` or `service`
|
||||
// must be specified.
|
||||
//
|
||||
@@ -50,12 +50,12 @@ type WebhookClientConfigApplyConfiguration struct {
|
||||
// allowed. Fragments ("#...") and query parameters ("?...") are not
|
||||
// allowed, either.
|
||||
URL *string `json:"url,omitempty"`
|
||||
// `service` is a reference to the service for this webhook. Either
|
||||
// service is a reference to the service for this webhook. Either
|
||||
// `service` or `url` must be specified.
|
||||
//
|
||||
// If the webhook is running within the cluster, then you should use `service`.
|
||||
Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"`
|
||||
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// If unspecified, system trust roots on the apiserver are used.
|
||||
CABundle []byte `json:"caBundle,omitempty"`
|
||||
}
|
||||
|
||||
@@ -24,15 +24,16 @@ package v1alpha1
|
||||
// An API server instance reports the version it can decode and the version it
|
||||
// encodes objects to when persisting objects in the backend.
|
||||
type ServerStorageVersionApplyConfiguration struct {
|
||||
// The ID of the reporting API server.
|
||||
// apiServerID is the ID of the reporting API server.
|
||||
APIServerID *string `json:"apiServerID,omitempty"`
|
||||
// The API server encodes the object to this version when persisting it in
|
||||
// encodingVersion the API server encodes the object to when persisting it in
|
||||
// the backend (e.g., etcd).
|
||||
EncodingVersion *string `json:"encodingVersion,omitempty"`
|
||||
// decodableVersions are the encoding versions the API server can handle to decode.
|
||||
// The API server can decode objects encoded in these versions.
|
||||
// The encodingVersion must be included in the decodableVersions.
|
||||
DecodableVersions []string `json:"decodableVersions,omitempty"`
|
||||
// The API server can serve these versions.
|
||||
// servedVersions lists all versions the API server can serve.
|
||||
// DecodableVersions must include all ServedVersions.
|
||||
ServedVersions []string `json:"servedVersions,omitempty"`
|
||||
}
|
||||
|
||||
@@ -32,12 +32,13 @@ import (
|
||||
//
|
||||
// Storage version of a specific resource.
|
||||
type StorageVersionApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata.
|
||||
// The name is <group>.<resource>.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Spec is an empty spec. It is here to comply with Kubernetes API style.
|
||||
// spec is an empty spec. It is here to comply with Kubernetes API style.
|
||||
Spec *apiserverinternalv1alpha1.StorageVersionSpec `json:"spec,omitempty"`
|
||||
// API server instances report the version they can decode and the version they
|
||||
// status on the version the API server instance can decode from and
|
||||
// encode objects to when persisting objects in the backend.
|
||||
Status *StorageVersionStatusApplyConfiguration `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
@@ -28,17 +28,17 @@ import (
|
||||
//
|
||||
// Describes the state of the storageVersion at a certain point.
|
||||
type StorageVersionConditionApplyConfiguration struct {
|
||||
// Type of the condition.
|
||||
// type of the condition.
|
||||
Type *apiserverinternalv1alpha1.StorageVersionConditionType `json:"type,omitempty"`
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
// status of the condition, one of True, False, Unknown.
|
||||
Status *apiserverinternalv1alpha1.ConditionStatus `json:"status,omitempty"`
|
||||
// If set, this represents the .metadata.generation that the condition was set based upon.
|
||||
// observedGeneration represents the .metadata.generation that the condition was set based upon, if field is set.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
// Last time the condition transitioned from one status to another.
|
||||
// lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"`
|
||||
// The reason for the condition's last transition.
|
||||
// reason for the condition's last transition.
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
// A human readable message indicating details about the transition.
|
||||
// message is a human readable string indicating details about the transition.
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -24,14 +24,15 @@ package v1alpha1
|
||||
// API server instances report the versions they can decode and the version they
|
||||
// encode objects to when persisting objects in the backend.
|
||||
type StorageVersionStatusApplyConfiguration struct {
|
||||
// The reported versions per API server instance.
|
||||
// storageVersions lists the reported versions per API server instance.
|
||||
StorageVersions []ServerStorageVersionApplyConfiguration `json:"storageVersions,omitempty"`
|
||||
// If all API server instances agree on the same encoding storage version,
|
||||
// then this field is set to that version. Otherwise this field is left empty.
|
||||
// commonEncodingVersion is set to an encoding storage version if all API server
|
||||
// instances share that same version. If they don't share one storage version, this
|
||||
// field is left empty.
|
||||
// API servers should finish updating its storageVersionStatus entry before
|
||||
// serving write operations, so that this field will be in sync with the reality.
|
||||
CommonEncodingVersion *string `json:"commonEncodingVersion,omitempty"`
|
||||
// The latest available observations of the storageVersion's state.
|
||||
// conditions lists the latest available observations of the storageVersion's state.
|
||||
Conditions []StorageVersionConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ import (
|
||||
// it may be subject to name and representation changes in future releases, and clients should not
|
||||
// depend on its stability. It is primarily for internal use by controllers.
|
||||
type ControllerRevisionApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
|
||||
@@ -32,7 +32,7 @@ import (
|
||||
//
|
||||
// DaemonSet represents the configuration of a daemon set.
|
||||
type DaemonSetApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
|
||||
@@ -32,7 +32,7 @@ import (
|
||||
//
|
||||
// Deployment enables declarative updates for Pods and ReplicaSets.
|
||||
type DeploymentApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
|
||||
@@ -40,7 +40,7 @@ type DeploymentStatusApplyConfiguration struct {
|
||||
// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
|
||||
// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// Represents the latest available observations of a deployment's current state.
|
||||
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
|
||||
@@ -32,7 +32,7 @@ import (
|
||||
//
|
||||
// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
|
||||
type ReplicaSetApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// If the Labels of a ReplicaSet are empty, they are defaulted to
|
||||
// be the same as the Pod(s) that the ReplicaSet manages.
|
||||
// Standard object's metadata.
|
||||
|
||||
@@ -35,7 +35,7 @@ type ReplicaSetStatusApplyConfiguration struct {
|
||||
// The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp
|
||||
// and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
|
||||
@@ -38,7 +38,7 @@ import (
|
||||
// The StatefulSet guarantees that a given network identity will always
|
||||
// map to the same storage identity.
|
||||
type StatefulSetApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
|
||||
@@ -43,7 +43,7 @@ import (
|
||||
// it may be subject to name and representation changes in future releases, and clients should not
|
||||
// depend on its stability. It is primarily for internal use by controllers.
|
||||
type ControllerRevisionApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
|
||||
@@ -34,7 +34,7 @@ import (
|
||||
// more information.
|
||||
// Deployment enables declarative updates for Pods and ReplicaSets.
|
||||
type DeploymentApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the Deployment.
|
||||
|
||||
@@ -40,7 +40,7 @@ type DeploymentStatusApplyConfiguration struct {
|
||||
// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
|
||||
// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// Represents the latest available observations of a deployment's current state.
|
||||
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
|
||||
@@ -40,7 +40,7 @@ import (
|
||||
// The StatefulSet guarantees that a given network identity will always
|
||||
// map to the same storage identity.
|
||||
type StatefulSetApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Spec defines the desired identities of pods in this set.
|
||||
Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
|
||||
@@ -43,7 +43,7 @@ import (
|
||||
// it may be subject to name and representation changes in future releases, and clients should not
|
||||
// depend on its stability. It is primarily for internal use by controllers.
|
||||
type ControllerRevisionApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
|
||||
@@ -34,7 +34,7 @@ import (
|
||||
// more information.
|
||||
// DaemonSet represents the configuration of a daemon set.
|
||||
type DaemonSetApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
|
||||
@@ -34,7 +34,7 @@ import (
|
||||
// more information.
|
||||
// Deployment enables declarative updates for Pods and ReplicaSets.
|
||||
type DeploymentApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Specification of the desired behavior of the Deployment.
|
||||
|
||||
@@ -40,7 +40,7 @@ type DeploymentStatusApplyConfiguration struct {
|
||||
// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
|
||||
// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// Represents the latest available observations of a deployment's current state.
|
||||
Conditions []DeploymentConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
|
||||
@@ -34,7 +34,7 @@ import (
|
||||
// more information.
|
||||
// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
|
||||
type ReplicaSetApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// If the Labels of a ReplicaSet are empty, they are defaulted to
|
||||
// be the same as the Pod(s) that the ReplicaSet manages.
|
||||
// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
|
||||
@@ -35,7 +35,7 @@ type ReplicaSetStatusApplyConfiguration struct {
|
||||
// The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp
|
||||
// and have not yet reached the Failed or Succeeded .status.phase.
|
||||
//
|
||||
// This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.
|
||||
// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
|
||||
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"`
|
||||
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
//
|
||||
// Scale represents a scaling request for a resource.
|
||||
type ScaleApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||
|
||||
@@ -40,7 +40,7 @@ import (
|
||||
// The StatefulSet guarantees that a given network identity will always
|
||||
// map to the same storage identity.
|
||||
type StatefulSetApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// Spec defines the desired identities of pods in this set.
|
||||
Spec *StatefulSetSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
|
||||
@@ -32,7 +32,7 @@ import (
|
||||
//
|
||||
// configuration of a horizontal pod autoscaler.
|
||||
type HorizontalPodAutoscalerApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
//
|
||||
// Scale represents a scaling request for a resource.
|
||||
type ScaleApplyConfiguration struct {
|
||||
metav1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
metav1.TypeMetaApplyConfiguration `json:""`
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
// spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||
|
||||
@@ -34,7 +34,7 @@ import (
|
||||
// autoscaler, which automatically manages the replica count of any resource
|
||||
// implementing the scale subresource based on the metrics specified.
|
||||
type HorizontalPodAutoscalerApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
v1.TypeMetaApplyConfiguration `json:""`
|
||||
// metadata is the standard object metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// ContainerResourceMetricSourceApplyConfiguration represents a declarative configuration of the ContainerResourceMetricSource type for use
|
||||
// with apply.
|
||||
//
|
||||
// ContainerResourceMetricSource indicates how to scale on a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). The values will be averaged
|
||||
// together before being compared to the target. Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source. Only one "target" type
|
||||
// should be set.
|
||||
type ContainerResourceMetricSourceApplyConfiguration struct {
|
||||
// name is the name of the resource in question.
|
||||
Name *v1.ResourceName `json:"name,omitempty"`
|
||||
// targetAverageUtilization is the target value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods.
|
||||
TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty"`
|
||||
// targetAverageValue is the target value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"`
|
||||
// container is the name of the container in the pods of the scaling target
|
||||
Container *string `json:"container,omitempty"`
|
||||
}
|
||||
|
||||
// ContainerResourceMetricSourceApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricSource type for use with
|
||||
// apply.
|
||||
func ContainerResourceMetricSource() *ContainerResourceMetricSourceApplyConfiguration {
|
||||
return &ContainerResourceMetricSourceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *ContainerResourceMetricSourceApplyConfiguration) WithName(value v1.ResourceName) *ContainerResourceMetricSourceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetAverageUtilization sets the TargetAverageUtilization field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetAverageUtilization field is set to the value of the last call.
|
||||
func (b *ContainerResourceMetricSourceApplyConfiguration) WithTargetAverageUtilization(value int32) *ContainerResourceMetricSourceApplyConfiguration {
|
||||
b.TargetAverageUtilization = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetAverageValue sets the TargetAverageValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetAverageValue field is set to the value of the last call.
|
||||
func (b *ContainerResourceMetricSourceApplyConfiguration) WithTargetAverageValue(value resource.Quantity) *ContainerResourceMetricSourceApplyConfiguration {
|
||||
b.TargetAverageValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithContainer sets the Container field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Container field is set to the value of the last call.
|
||||
func (b *ContainerResourceMetricSourceApplyConfiguration) WithContainer(value string) *ContainerResourceMetricSourceApplyConfiguration {
|
||||
b.Container = &value
|
||||
return b
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// ContainerResourceMetricStatusApplyConfiguration represents a declarative configuration of the ContainerResourceMetricStatus type for use
|
||||
// with apply.
|
||||
//
|
||||
// ContainerResourceMetricStatus indicates the current value of a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing a single container in each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source.
|
||||
type ContainerResourceMetricStatusApplyConfiguration struct {
|
||||
// name is the name of the resource in question.
|
||||
Name *v1.ResourceName `json:"name,omitempty"`
|
||||
// currentAverageUtilization is the current value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods. It will only be
|
||||
// present if `targetAverageValue` was set in the corresponding metric
|
||||
// specification.
|
||||
CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty"`
|
||||
// currentAverageValue is the current value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
// It will always be set, regardless of the corresponding metric specification.
|
||||
CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"`
|
||||
// container is the name of the container in the pods of the scaling target
|
||||
Container *string `json:"container,omitempty"`
|
||||
}
|
||||
|
||||
// ContainerResourceMetricStatusApplyConfiguration constructs a declarative configuration of the ContainerResourceMetricStatus type for use with
|
||||
// apply.
|
||||
func ContainerResourceMetricStatus() *ContainerResourceMetricStatusApplyConfiguration {
|
||||
return &ContainerResourceMetricStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *ContainerResourceMetricStatusApplyConfiguration) WithName(value v1.ResourceName) *ContainerResourceMetricStatusApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCurrentAverageUtilization sets the CurrentAverageUtilization field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CurrentAverageUtilization field is set to the value of the last call.
|
||||
func (b *ContainerResourceMetricStatusApplyConfiguration) WithCurrentAverageUtilization(value int32) *ContainerResourceMetricStatusApplyConfiguration {
|
||||
b.CurrentAverageUtilization = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCurrentAverageValue sets the CurrentAverageValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CurrentAverageValue field is set to the value of the last call.
|
||||
func (b *ContainerResourceMetricStatusApplyConfiguration) WithCurrentAverageValue(value resource.Quantity) *ContainerResourceMetricStatusApplyConfiguration {
|
||||
b.CurrentAverageValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithContainer sets the Container field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Container field is set to the value of the last call.
|
||||
func (b *ContainerResourceMetricStatusApplyConfiguration) WithContainer(value string) *ContainerResourceMetricStatusApplyConfiguration {
|
||||
b.Container = &value
|
||||
return b
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v2beta1
|
||||
|
||||
// CrossVersionObjectReferenceApplyConfiguration represents a declarative configuration of the CrossVersionObjectReference type for use
|
||||
// with apply.
|
||||
//
|
||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||
type CrossVersionObjectReferenceApplyConfiguration struct {
|
||||
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
Kind *string `json:"kind,omitempty"`
|
||||
// Name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
Name *string `json:"name,omitempty"`
|
||||
// API version of the referent
|
||||
APIVersion *string `json:"apiVersion,omitempty"`
|
||||
}
|
||||
|
||||
// CrossVersionObjectReferenceApplyConfiguration constructs a declarative configuration of the CrossVersionObjectReference type for use with
|
||||
// apply.
|
||||
func CrossVersionObjectReference() *CrossVersionObjectReferenceApplyConfiguration {
|
||||
return &CrossVersionObjectReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *CrossVersionObjectReferenceApplyConfiguration) WithKind(value string) *CrossVersionObjectReferenceApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *CrossVersionObjectReferenceApplyConfiguration) WithName(value string) *CrossVersionObjectReferenceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *CrossVersionObjectReferenceApplyConfiguration) WithAPIVersion(value string) *CrossVersionObjectReferenceApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// ExternalMetricSourceApplyConfiguration represents a declarative configuration of the ExternalMetricSource type for use
|
||||
// with apply.
|
||||
//
|
||||
// ExternalMetricSource indicates how to scale on a metric not associated with
|
||||
// any Kubernetes object (for example length of queue in cloud
|
||||
// messaging service, or QPS from loadbalancer running outside of cluster).
|
||||
// Exactly one "target" type should be set.
|
||||
type ExternalMetricSourceApplyConfiguration struct {
|
||||
// metricName is the name of the metric in question.
|
||||
MetricName *string `json:"metricName,omitempty"`
|
||||
// metricSelector is used to identify a specific time series
|
||||
// within a given metric.
|
||||
MetricSelector *v1.LabelSelectorApplyConfiguration `json:"metricSelector,omitempty"`
|
||||
// targetValue is the target value of the metric (as a quantity).
|
||||
// Mutually exclusive with TargetAverageValue.
|
||||
TargetValue *resource.Quantity `json:"targetValue,omitempty"`
|
||||
// targetAverageValue is the target per-pod value of global metric (as a quantity).
|
||||
// Mutually exclusive with TargetValue.
|
||||
TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty"`
|
||||
}
|
||||
|
||||
// ExternalMetricSourceApplyConfiguration constructs a declarative configuration of the ExternalMetricSource type for use with
|
||||
// apply.
|
||||
func ExternalMetricSource() *ExternalMetricSourceApplyConfiguration {
|
||||
return &ExternalMetricSourceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithMetricName sets the MetricName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MetricName field is set to the value of the last call.
|
||||
func (b *ExternalMetricSourceApplyConfiguration) WithMetricName(value string) *ExternalMetricSourceApplyConfiguration {
|
||||
b.MetricName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMetricSelector sets the MetricSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MetricSelector field is set to the value of the last call.
|
||||
func (b *ExternalMetricSourceApplyConfiguration) WithMetricSelector(value *v1.LabelSelectorApplyConfiguration) *ExternalMetricSourceApplyConfiguration {
|
||||
b.MetricSelector = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetValue sets the TargetValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetValue field is set to the value of the last call.
|
||||
func (b *ExternalMetricSourceApplyConfiguration) WithTargetValue(value resource.Quantity) *ExternalMetricSourceApplyConfiguration {
|
||||
b.TargetValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetAverageValue sets the TargetAverageValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetAverageValue field is set to the value of the last call.
|
||||
func (b *ExternalMetricSourceApplyConfiguration) WithTargetAverageValue(value resource.Quantity) *ExternalMetricSourceApplyConfiguration {
|
||||
b.TargetAverageValue = &value
|
||||
return b
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// ExternalMetricStatusApplyConfiguration represents a declarative configuration of the ExternalMetricStatus type for use
|
||||
// with apply.
|
||||
//
|
||||
// ExternalMetricStatus indicates the current value of a global metric
|
||||
// not associated with any Kubernetes object.
|
||||
type ExternalMetricStatusApplyConfiguration struct {
|
||||
// metricName is the name of a metric used for autoscaling in
|
||||
// metric system.
|
||||
MetricName *string `json:"metricName,omitempty"`
|
||||
// metricSelector is used to identify a specific time series
|
||||
// within a given metric.
|
||||
MetricSelector *v1.LabelSelectorApplyConfiguration `json:"metricSelector,omitempty"`
|
||||
// currentValue is the current value of the metric (as a quantity)
|
||||
CurrentValue *resource.Quantity `json:"currentValue,omitempty"`
|
||||
// currentAverageValue is the current value of metric averaged over autoscaled pods.
|
||||
CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"`
|
||||
}
|
||||
|
||||
// ExternalMetricStatusApplyConfiguration constructs a declarative configuration of the ExternalMetricStatus type for use with
|
||||
// apply.
|
||||
func ExternalMetricStatus() *ExternalMetricStatusApplyConfiguration {
|
||||
return &ExternalMetricStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithMetricName sets the MetricName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MetricName field is set to the value of the last call.
|
||||
func (b *ExternalMetricStatusApplyConfiguration) WithMetricName(value string) *ExternalMetricStatusApplyConfiguration {
|
||||
b.MetricName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMetricSelector sets the MetricSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MetricSelector field is set to the value of the last call.
|
||||
func (b *ExternalMetricStatusApplyConfiguration) WithMetricSelector(value *v1.LabelSelectorApplyConfiguration) *ExternalMetricStatusApplyConfiguration {
|
||||
b.MetricSelector = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCurrentValue sets the CurrentValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CurrentValue field is set to the value of the last call.
|
||||
func (b *ExternalMetricStatusApplyConfiguration) WithCurrentValue(value resource.Quantity) *ExternalMetricStatusApplyConfiguration {
|
||||
b.CurrentValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCurrentAverageValue sets the CurrentAverageValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CurrentAverageValue field is set to the value of the last call.
|
||||
func (b *ExternalMetricStatusApplyConfiguration) WithCurrentAverageValue(value resource.Quantity) *ExternalMetricStatusApplyConfiguration {
|
||||
b.CurrentAverageValue = &value
|
||||
return b
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalerConditionApplyConfiguration represents a declarative configuration of the HorizontalPodAutoscalerCondition type for use
|
||||
// with apply.
|
||||
//
|
||||
// HorizontalPodAutoscalerCondition describes the state of
|
||||
// a HorizontalPodAutoscaler at a certain point.
|
||||
type HorizontalPodAutoscalerConditionApplyConfiguration struct {
|
||||
// type describes the current condition
|
||||
Type *autoscalingv2beta1.HorizontalPodAutoscalerConditionType `json:"type,omitempty"`
|
||||
// status is the status of the condition (True, False, Unknown)
|
||||
Status *v1.ConditionStatus `json:"status,omitempty"`
|
||||
// lastTransitionTime is the last time the condition transitioned from
|
||||
// one status to another
|
||||
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
|
||||
// reason is the reason for the condition's last transition.
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
// message is a human-readable explanation containing details about
|
||||
// the transition
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerConditionApplyConfiguration constructs a declarative configuration of the HorizontalPodAutoscalerCondition type for use with
|
||||
// apply.
|
||||
func HorizontalPodAutoscalerCondition() *HorizontalPodAutoscalerConditionApplyConfiguration {
|
||||
return &HorizontalPodAutoscalerConditionApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithType(value autoscalingv2beta1.HorizontalPodAutoscalerConditionType) *HorizontalPodAutoscalerConditionApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStatus sets the Status field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Status field is set to the value of the last call.
|
||||
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *HorizontalPodAutoscalerConditionApplyConfiguration {
|
||||
b.Status = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LastTransitionTime field is set to the value of the last call.
|
||||
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *HorizontalPodAutoscalerConditionApplyConfiguration {
|
||||
b.LastTransitionTime = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReason sets the Reason field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Reason field is set to the value of the last call.
|
||||
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithReason(value string) *HorizontalPodAutoscalerConditionApplyConfiguration {
|
||||
b.Reason = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMessage sets the Message field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Message field is set to the value of the last call.
|
||||
func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithMessage(value string) *HorizontalPodAutoscalerConditionApplyConfiguration {
|
||||
b.Message = &value
|
||||
return b
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user