-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathv1.26.nix
17306 lines (15207 loc) · 949 KB
/
v1.26.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# This file was generated with kubenix k8s generator, do not edit
{ lib, options, config, ... }:
with lib;
let
hasAttrNotNull = attr: set: hasAttr attr set && !isNull set.${attr};
attrsToList = values:
if values != null
then
sort
(a: b:
if (hasAttrNotNull "_priority" a && hasAttrNotNull "_priority" b)
then a._priority < b._priority
else false
)
(mapAttrsToList (n: v: v) values)
else
values;
getDefaults = resource: group: version: kind:
catAttrs "default" (filter
(default:
(default.resource == null || default.resource == resource) &&
(default.group == null || default.group == group) &&
(default.version == null || default.version == version) &&
(default.kind == null || default.kind == kind)
)
config.defaults);
types = lib.types // rec {
str = mkOptionType {
name = "str";
description = "string";
check = isString;
merge = mergeEqualOption;
};
# Either value of type `finalType` or `coercedType`, the latter is
# converted to `finalType` using `coerceFunc`.
coercedTo = coercedType: coerceFunc: finalType:
mkOptionType rec {
name = "coercedTo";
description = "${finalType.description} or ${coercedType.description}";
check = x: finalType.check x || coercedType.check x;
merge = loc: defs:
let
coerceVal = val:
if finalType.check val then val
else
let
coerced = coerceFunc val;
in
assert finalType.check coerced; coerced;
in
finalType.merge loc (map (def: def // { value = coerceVal def.value; }) defs);
getSubOptions = finalType.getSubOptions;
getSubModules = finalType.getSubModules;
substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m);
typeMerge = t1: t2: null;
functor = (defaultFunctor name) // { wrapped = finalType; };
};
};
mkOptionDefault = mkOverride 1001;
mergeValuesByKey = attrMergeKey: listMergeKeys: values:
listToAttrs (imap0
(i: value: nameValuePair
(
if hasAttr attrMergeKey value
then
if isAttrs value.${attrMergeKey}
then toString value.${attrMergeKey}.content
else (toString value.${attrMergeKey})
else
# generate merge key for list elements if it's not present
"__kubenix_list_merge_key_" + (concatStringsSep "" (map
(key:
if isAttrs value.${key}
then toString value.${key}.content
else (toString value.${key})
)
listMergeKeys))
)
(value // { _priority = i; }))
values);
submoduleOf = ref: types.submodule ({ name, ... }: {
options = definitions."${ref}".options or { };
config = definitions."${ref}".config or { };
});
submoduleWithMergeOf = ref: mergeKey: types.submodule ({ name, ... }:
let
convertName = name:
if definitions."${ref}".options.${mergeKey}.type == types.int
then toInt name
else name;
in
{
options = definitions."${ref}".options // {
# position in original array
_priority = mkOption { type = types.nullOr types.int; default = null; };
};
config = definitions."${ref}".config // {
${mergeKey} = mkOverride 1002 (
# use name as mergeKey only if it is not coming from mergeValuesByKey
if (!hasPrefix "__kubenix_list_merge_key_" name)
then convertName name
else null
);
};
});
submoduleForDefinition = ref: resource: kind: group: version:
let
apiVersion = if group == "core" then version else "${group}/${version}";
in
types.submodule ({ name, ... }: {
imports = getDefaults resource group version kind;
options = definitions."${ref}".options;
config = mkMerge [
definitions."${ref}".config
{
kind = mkOptionDefault kind;
apiVersion = mkOptionDefault apiVersion;
# metdata.name cannot use option default, due deep config
metadata.name = mkOptionDefault name;
}
];
});
coerceAttrsOfSubmodulesToListByKey = ref: attrMergeKey: listMergeKeys: (types.coercedTo
(types.listOf (submoduleOf ref))
(mergeValuesByKey attrMergeKey listMergeKeys)
(types.attrsOf (submoduleWithMergeOf ref attrMergeKey))
);
definitions = {
"io.k8s.api.admissionregistration.v1.MutatingWebhook" = {
options = {
"admissionReviewVersions" = mkOption {
description = "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. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.";
type = (types.listOf types.str);
};
"clientConfig" = mkOption {
description = "ClientConfig defines how to communicate with the hook. Required";
type = (submoduleOf "io.k8s.api.admissionregistration.v1.WebhookClientConfig");
};
"failurePolicy" = mkOption {
description = "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.";
type = (types.nullOr types.str);
};
"matchPolicy" = mkOption {
description = "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Equivalent\"";
type = (types.nullOr types.str);
};
"name" = mkOption {
description = "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.";
type = types.str;
};
"namespaceSelector" = mkOption {
description = "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, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"));
};
"objectSelector" = mkOption {
description = "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 object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"));
};
"reinvocationPolicy" = mkOption {
description = "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".";
type = (types.nullOr types.str);
};
"rules" = mkOption {
description = "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.";
type = (types.nullOr (types.listOf (submoduleOf "io.k8s.api.admissionregistration.v1.RuleWithOperations")));
};
"sideEffects" = mkOption {
description = "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.";
type = types.str;
};
"timeoutSeconds" = mkOption {
description = "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.";
type = (types.nullOr types.int);
};
};
config = {
"failurePolicy" = mkOverride 1002 null;
"matchPolicy" = mkOverride 1002 null;
"namespaceSelector" = mkOverride 1002 null;
"objectSelector" = mkOverride 1002 null;
"reinvocationPolicy" = mkOverride 1002 null;
"rules" = mkOverride 1002 null;
"timeoutSeconds" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"));
};
"webhooks" = mkOption {
description = "Webhooks is a list of webhooks and the affected resources and operations.";
type = (types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.admissionregistration.v1.MutatingWebhook" "name" [ ]));
apply = attrsToList;
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
"webhooks" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"items" = mkOption {
description = "List of MutatingWebhookConfiguration.";
type = (types.listOf (submoduleOf "io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration"));
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"));
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1.RuleWithOperations" = {
options = {
"apiGroups" = mkOption {
description = "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.";
type = (types.nullOr (types.listOf types.str));
};
"apiVersions" = mkOption {
description = "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.";
type = (types.nullOr (types.listOf types.str));
};
"operations" = mkOption {
description = "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.";
type = (types.nullOr (types.listOf types.str));
};
"resources" = mkOption {
description = "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.";
type = (types.nullOr (types.listOf types.str));
};
"scope" = mkOption {
description = "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".";
type = (types.nullOr types.str);
};
};
config = {
"apiGroups" = mkOverride 1002 null;
"apiVersions" = mkOverride 1002 null;
"operations" = mkOverride 1002 null;
"resources" = mkOverride 1002 null;
"scope" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1.ServiceReference" = {
options = {
"name" = mkOption {
description = "`name` is the name of the service. Required";
type = types.str;
};
"namespace" = mkOption {
description = "`namespace` is the namespace of the service. Required";
type = types.str;
};
"path" = mkOption {
description = "`path` is an optional URL path which will be sent in any request to this service.";
type = (types.nullOr types.str);
};
"port" = mkOption {
description = "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).";
type = (types.nullOr types.int);
};
};
config = {
"path" = mkOverride 1002 null;
"port" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1.ValidatingWebhook" = {
options = {
"admissionReviewVersions" = mkOption {
description = "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. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.";
type = (types.listOf types.str);
};
"clientConfig" = mkOption {
description = "ClientConfig defines how to communicate with the hook. Required";
type = (submoduleOf "io.k8s.api.admissionregistration.v1.WebhookClientConfig");
};
"failurePolicy" = mkOption {
description = "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.";
type = (types.nullOr types.str);
};
"matchPolicy" = mkOption {
description = "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Equivalent\"";
type = (types.nullOr types.str);
};
"name" = mkOption {
description = "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.";
type = types.str;
};
"namespaceSelector" = mkOption {
description = "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, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"));
};
"objectSelector" = mkOption {
description = "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 object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"));
};
"rules" = mkOption {
description = "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.";
type = (types.nullOr (types.listOf (submoduleOf "io.k8s.api.admissionregistration.v1.RuleWithOperations")));
};
"sideEffects" = mkOption {
description = "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.";
type = types.str;
};
"timeoutSeconds" = mkOption {
description = "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.";
type = (types.nullOr types.int);
};
};
config = {
"failurePolicy" = mkOverride 1002 null;
"matchPolicy" = mkOverride 1002 null;
"namespaceSelector" = mkOverride 1002 null;
"objectSelector" = mkOverride 1002 null;
"rules" = mkOverride 1002 null;
"timeoutSeconds" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"));
};
"webhooks" = mkOption {
description = "Webhooks is a list of webhooks and the affected resources and operations.";
type = (types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.admissionregistration.v1.ValidatingWebhook" "name" [ ]));
apply = attrsToList;
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
"webhooks" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"items" = mkOption {
description = "List of ValidatingWebhookConfiguration.";
type = (types.listOf (submoduleOf "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration"));
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"));
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1.WebhookClientConfig" = {
options = {
"caBundle" = mkOption {
description = "`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.";
type = (types.nullOr types.str);
};
"service" = mkOption {
description = "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.";
type = (types.nullOr (submoduleOf "io.k8s.api.admissionregistration.v1.ServiceReference"));
};
"url" = mkOption {
description = "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.";
type = (types.nullOr types.str);
};
};
config = {
"caBundle" = mkOverride 1002 null;
"service" = mkOverride 1002 null;
"url" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1alpha1.MatchResources" = {
options = {
"excludeResourceRules" = mkOption {
description = "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)";
type = (types.nullOr (types.listOf (submoduleOf "io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations")));
};
"matchPolicy" = mkOption {
description = "matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.\n\nDefaults to \"Equivalent\"";
type = (types.nullOr types.str);
};
"namespaceSelector" = mkOption {
description = "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, it never skips the policy.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the policy on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"));
};
"objectSelector" = mkOption {
description = "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 object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"));
};
"resourceRules" = mkOption {
description = "ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.";
type = (types.nullOr (types.listOf (submoduleOf "io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations")));
};
};
config = {
"excludeResourceRules" = mkOverride 1002 null;
"matchPolicy" = mkOverride 1002 null;
"namespaceSelector" = mkOverride 1002 null;
"objectSelector" = mkOverride 1002 null;
"resourceRules" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations" = {
options = {
"apiGroups" = mkOption {
description = "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.";
type = (types.nullOr (types.listOf types.str));
};
"apiVersions" = mkOption {
description = "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.";
type = (types.nullOr (types.listOf types.str));
};
"operations" = mkOption {
description = "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.";
type = (types.nullOr (types.listOf types.str));
};
"resourceNames" = mkOption {
description = "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.";
type = (types.nullOr (types.listOf types.str));
};
"resources" = mkOption {
description = "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.";
type = (types.nullOr (types.listOf types.str));
};
"scope" = mkOption {
description = "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".";
type = (types.nullOr types.str);
};
};
config = {
"apiGroups" = mkOverride 1002 null;
"apiVersions" = mkOverride 1002 null;
"operations" = mkOverride 1002 null;
"resourceNames" = mkOverride 1002 null;
"resources" = mkOverride 1002 null;
"scope" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1alpha1.ParamKind" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.";
type = (types.nullOr types.str);
};
"kind" = mkOption {
description = "Kind is the API kind the resources belong to. Required.";
type = (types.nullOr types.str);
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1alpha1.ParamRef" = {
options = {
"name" = mkOption {
description = "Name of the resource being referenced.";
type = (types.nullOr types.str);
};
"namespace" = mkOption {
description = "Namespace of the referenced resource. Should be empty for the cluster-scoped resources";
type = (types.nullOr types.str);
};
};
config = {
"name" = mkOverride 1002 null;
"namespace" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"));
};
"spec" = mkOption {
description = "Specification of the desired behavior of the ValidatingAdmissionPolicy.";
type = (types.nullOr (submoduleOf "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec"));
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
"spec" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"));
};
"spec" = mkOption {
description = "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.";
type = (types.nullOr (submoduleOf "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec"));
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
"spec" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"items" = mkOption {
description = "List of PolicyBinding.";
type = (types.nullOr (types.listOf (submoduleOf "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding")));
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"));
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"items" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec" = {
options = {
"matchResources" = mkOption {
description = "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. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.";
type = (types.nullOr (submoduleOf "io.k8s.api.admissionregistration.v1alpha1.MatchResources"));
};
"paramRef" = mkOption {
description = "ParamRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. 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.";
type = (types.nullOr (submoduleOf "io.k8s.api.admissionregistration.v1alpha1.ParamRef"));
};
"policyName" = mkOption {
description = "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.";
type = (types.nullOr types.str);
};
};
config = {
"matchResources" = mkOverride 1002 null;
"paramRef" = mkOverride 1002 null;
"policyName" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"items" = mkOption {
description = "List of ValidatingAdmissionPolicy.";
type = (types.nullOr (types.listOf (submoduleOf "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy")));
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"));
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"items" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec" = {
options = {
"failurePolicy" = mkOption {
description = "FailurePolicy defines how to handle failures for the admission policy. Failures can occur from invalid or mis-configured policy definitions or bindings. A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource. Allowed values are Ignore or Fail. Defaults to Fail.";
type = (types.nullOr types.str);
};
"matchConstraints" = mkOption {
description = "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.";
type = (types.nullOr (submoduleOf "io.k8s.api.admissionregistration.v1alpha1.MatchResources"));
};
"paramKind" = mkOption {
description = "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.";
type = (types.nullOr (submoduleOf "io.k8s.api.admissionregistration.v1alpha1.ParamKind"));
};
"validations" = mkOption {
description = "Validations contain CEL expressions which is used to apply the validation. A minimum of one validation is required for a policy definition. Required.";
type = (types.listOf (submoduleOf "io.k8s.api.admissionregistration.v1alpha1.Validation"));
};
};
config = {
"failurePolicy" = mkOverride 1002 null;
"matchConstraints" = mkOverride 1002 null;
"paramKind" = mkOverride 1002 null;
};
};
"io.k8s.api.admissionregistration.v1alpha1.Validation" = {
options = {
"expression" = mkOption {
description = "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 Admission request/response, organized into CEL variables as well as some other useful variables:\n\n'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 admission 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.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired.";
type = types.str;
};
"message" = mkOption {
description = "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\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\".";
type = (types.nullOr types.str);
};
"reason" = mkOption {
description = "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. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client.";
type = (types.nullOr types.str);
};
};
config = {
"message" = mkOverride 1002 null;
"reason" = mkOverride 1002 null;
};
};
"io.k8s.api.apiserverinternal.v1alpha1.ServerStorageVersion" = {
options = {
"apiServerID" = mkOption {
description = "The ID of the reporting API server.";
type = (types.nullOr types.str);
};
"decodableVersions" = mkOption {
description = "The API server can decode objects encoded in these versions. The encodingVersion must be included in the decodableVersions.";
type = (types.nullOr (types.listOf types.str));
};
"encodingVersion" = mkOption {
description = "The API server encodes the object to this version when persisting it in the backend (e.g., etcd).";
type = (types.nullOr types.str);
};
};
config = {
"apiServerID" = mkOverride 1002 null;
"decodableVersions" = mkOverride 1002 null;
"encodingVersion" = mkOverride 1002 null;
};
};
"io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "The name is <group>.<resource>.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"));
};
"spec" = mkOption {
description = "Spec is an empty spec. It is here to comply with Kubernetes API style.";
type = (submoduleOf "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionSpec");
};
"status" = mkOption {
description = "API server instances report the version they can decode and the version they encode objects to when persisting objects in the backend.";
type = (submoduleOf "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionStatus");
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
};
};
"io.k8s.api.apiserverinternal.v1alpha1.StorageVersionCondition" = {
options = {
"lastTransitionTime" = mkOption {
description = "Last time the condition transitioned from one status to another.";
type = (types.nullOr types.str);
};
"message" = mkOption {
description = "A human readable message indicating details about the transition.";
type = (types.nullOr types.str);
};
"observedGeneration" = mkOption {
description = "If set, this represents the .metadata.generation that the condition was set based upon.";
type = (types.nullOr types.int);
};
"reason" = mkOption {
description = "The reason for the condition's last transition.";
type = types.str;
};
"status" = mkOption {
description = "Status of the condition, one of True, False, Unknown.";
type = types.str;
};
"type" = mkOption {
description = "Type of the condition.";
type = types.str;
};
};
config = {
"lastTransitionTime" = mkOverride 1002 null;
"message" = mkOverride 1002 null;
"observedGeneration" = mkOverride 1002 null;
};
};
"io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"items" = mkOption {
description = "Items holds a list of StorageVersion";
type = (types.listOf (submoduleOf "io.k8s.api.apiserverinternal.v1alpha1.StorageVersion"));
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"));
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
};
};
"io.k8s.api.apiserverinternal.v1alpha1.StorageVersionSpec" = { };
"io.k8s.api.apiserverinternal.v1alpha1.StorageVersionStatus" = {
options = {
"commonEncodingVersion" = mkOption {
description = "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. API servers should finish updating its storageVersionStatus entry before serving write operations, so that this field will be in sync with the reality.";
type = (types.nullOr types.str);
};
"conditions" = mkOption {
description = "The latest available observations of the storageVersion's state.";
type = (types.nullOr (types.listOf (submoduleOf "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionCondition")));
};
"storageVersions" = mkOption {
description = "The reported versions per API server instance.";
type = (types.nullOr (types.listOf (submoduleOf "io.k8s.api.apiserverinternal.v1alpha1.ServerStorageVersion")));
};
};
config = {
"commonEncodingVersion" = mkOverride 1002 null;
"conditions" = mkOverride 1002 null;
"storageVersions" = mkOverride 1002 null;
};
};
"io.k8s.api.apps.v1.ControllerRevision" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"data" = mkOption {
description = "Data is the serialized representation of the state.";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.runtime.RawExtension"));
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"));
};
"revision" = mkOption {
description = "Revision indicates the revision of the state represented by Data.";
type = types.int;
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"data" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
};
};
"io.k8s.api.apps.v1.ControllerRevisionList" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);
};
"items" = mkOption {
description = "Items is the list of ControllerRevisions";
type = (types.listOf (submoduleOf "io.k8s.api.apps.v1.ControllerRevision"));
};
"kind" = mkOption {
description = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds";
type = (types.nullOr types.str);
};
"metadata" = mkOption {
description = "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata";
type = (types.nullOr (submoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"));
};
};
config = {
"apiVersion" = mkOverride 1002 null;
"kind" = mkOverride 1002 null;
"metadata" = mkOverride 1002 null;
};
};
"io.k8s.api.apps.v1.DaemonSet" = {
options = {
"apiVersion" = mkOption {
description = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources";
type = (types.nullOr types.str);