-
Notifications
You must be signed in to change notification settings - Fork 113
/
pulumiTypes.go
1507 lines (1280 loc) · 96.7 KB
/
pulumiTypes.go
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
// *** WARNING: this file was generated by pulumigen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// MutatingWebhook describes an admission webhook and the resources and operations it applies to.
type MutatingWebhook struct {
// 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.
AdmissionReviewVersions []string `pulumi:"admissionReviewVersions"`
// ClientConfig defines how to communicate with the hook. Required
ClientConfig WebhookClientConfig `pulumi:"clientConfig"`
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
FailurePolicy *string `pulumi:"failurePolicy"`
// matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
//
// - 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.
//
// - 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.
//
// Defaults to "Equivalent"
MatchPolicy *string `pulumi:"matchPolicy"`
// 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 `pulumi:"name"`
// 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.
//
// For 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": {
// "matchExpressions": [
// {
// "key": "runlevel",
// "operator": "NotIn",
// "values": [
// "0",
// "1"
// ]
// }
// ]
// }
//
// If 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": {
// "matchExpressions": [
// {
// "key": "environment",
// "operator": "In",
// "values": [
// "prod",
// "staging"
// ]
// }
// ]
// }
//
// See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
//
// Default to the empty LabelSelector, which matches everything.
NamespaceSelector *metav1.LabelSelector `pulumi:"namespaceSelector"`
// 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.
ObjectSelector *metav1.LabelSelector `pulumi:"objectSelector"`
// reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".
//
// Never: the webhook will not be called more than once in a single admission evaluation.
//
// IfNeeded: 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.
//
// Defaults to "Never".
ReinvocationPolicy *string `pulumi:"reinvocationPolicy"`
// 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 []RuleWithOperations `pulumi:"rules"`
// 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 string `pulumi:"sideEffects"`
// 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 *int `pulumi:"timeoutSeconds"`
}
// MutatingWebhookInput is an input type that accepts MutatingWebhookArgs and MutatingWebhookOutput values.
// You can construct a concrete instance of `MutatingWebhookInput` via:
//
// MutatingWebhookArgs{...}
type MutatingWebhookInput interface {
pulumi.Input
ToMutatingWebhookOutput() MutatingWebhookOutput
ToMutatingWebhookOutputWithContext(context.Context) MutatingWebhookOutput
}
// MutatingWebhook describes an admission webhook and the resources and operations it applies to.
type MutatingWebhookArgs struct {
// 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.
AdmissionReviewVersions pulumi.StringArrayInput `pulumi:"admissionReviewVersions"`
// ClientConfig defines how to communicate with the hook. Required
ClientConfig WebhookClientConfigInput `pulumi:"clientConfig"`
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
FailurePolicy pulumi.StringPtrInput `pulumi:"failurePolicy"`
// matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
//
// - 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.
//
// - 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.
//
// Defaults to "Equivalent"
MatchPolicy pulumi.StringPtrInput `pulumi:"matchPolicy"`
// 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 pulumi.StringInput `pulumi:"name"`
// 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.
//
// For 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": {
// "matchExpressions": [
// {
// "key": "runlevel",
// "operator": "NotIn",
// "values": [
// "0",
// "1"
// ]
// }
// ]
// }
//
// If 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": {
// "matchExpressions": [
// {
// "key": "environment",
// "operator": "In",
// "values": [
// "prod",
// "staging"
// ]
// }
// ]
// }
//
// See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
//
// Default to the empty LabelSelector, which matches everything.
NamespaceSelector metav1.LabelSelectorPtrInput `pulumi:"namespaceSelector"`
// 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.
ObjectSelector metav1.LabelSelectorPtrInput `pulumi:"objectSelector"`
// reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".
//
// Never: the webhook will not be called more than once in a single admission evaluation.
//
// IfNeeded: 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.
//
// Defaults to "Never".
ReinvocationPolicy pulumi.StringPtrInput `pulumi:"reinvocationPolicy"`
// 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 RuleWithOperationsArrayInput `pulumi:"rules"`
// 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 pulumi.StringInput `pulumi:"sideEffects"`
// 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 pulumi.IntPtrInput `pulumi:"timeoutSeconds"`
}
func (MutatingWebhookArgs) ElementType() reflect.Type {
return reflect.TypeOf((*MutatingWebhook)(nil)).Elem()
}
func (i MutatingWebhookArgs) ToMutatingWebhookOutput() MutatingWebhookOutput {
return i.ToMutatingWebhookOutputWithContext(context.Background())
}
func (i MutatingWebhookArgs) ToMutatingWebhookOutputWithContext(ctx context.Context) MutatingWebhookOutput {
return pulumi.ToOutputWithContext(ctx, i).(MutatingWebhookOutput)
}
// MutatingWebhookArrayInput is an input type that accepts MutatingWebhookArray and MutatingWebhookArrayOutput values.
// You can construct a concrete instance of `MutatingWebhookArrayInput` via:
//
// MutatingWebhookArray{ MutatingWebhookArgs{...} }
type MutatingWebhookArrayInput interface {
pulumi.Input
ToMutatingWebhookArrayOutput() MutatingWebhookArrayOutput
ToMutatingWebhookArrayOutputWithContext(context.Context) MutatingWebhookArrayOutput
}
type MutatingWebhookArray []MutatingWebhookInput
func (MutatingWebhookArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]MutatingWebhook)(nil)).Elem()
}
func (i MutatingWebhookArray) ToMutatingWebhookArrayOutput() MutatingWebhookArrayOutput {
return i.ToMutatingWebhookArrayOutputWithContext(context.Background())
}
func (i MutatingWebhookArray) ToMutatingWebhookArrayOutputWithContext(ctx context.Context) MutatingWebhookArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MutatingWebhookArrayOutput)
}
// MutatingWebhook describes an admission webhook and the resources and operations it applies to.
type MutatingWebhookOutput struct{ *pulumi.OutputState }
func (MutatingWebhookOutput) ElementType() reflect.Type {
return reflect.TypeOf((*MutatingWebhook)(nil)).Elem()
}
func (o MutatingWebhookOutput) ToMutatingWebhookOutput() MutatingWebhookOutput {
return o
}
func (o MutatingWebhookOutput) ToMutatingWebhookOutputWithContext(ctx context.Context) MutatingWebhookOutput {
return o
}
// 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.
func (o MutatingWebhookOutput) AdmissionReviewVersions() pulumi.StringArrayOutput {
return o.ApplyT(func(v MutatingWebhook) []string { return v.AdmissionReviewVersions }).(pulumi.StringArrayOutput)
}
// ClientConfig defines how to communicate with the hook. Required
func (o MutatingWebhookOutput) ClientConfig() WebhookClientConfigOutput {
return o.ApplyT(func(v MutatingWebhook) WebhookClientConfig { return v.ClientConfig }).(WebhookClientConfigOutput)
}
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
func (o MutatingWebhookOutput) FailurePolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v MutatingWebhook) *string { return v.FailurePolicy }).(pulumi.StringPtrOutput)
}
// matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
//
// - 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.
//
// - 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.
//
// Defaults to "Equivalent"
func (o MutatingWebhookOutput) MatchPolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v MutatingWebhook) *string { return v.MatchPolicy }).(pulumi.StringPtrOutput)
}
// 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.
func (o MutatingWebhookOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v MutatingWebhook) string { return v.Name }).(pulumi.StringOutput)
}
// 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.
//
// For 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": {
// "matchExpressions": [
// {
// "key": "runlevel",
// "operator": "NotIn",
// "values": [
// "0",
// "1"
// ]
// }
// ]
// }
//
// If 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": {
// "matchExpressions": [
// {
// "key": "environment",
// "operator": "In",
// "values": [
// "prod",
// "staging"
// ]
// }
// ]
// }
//
// See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
//
// Default to the empty LabelSelector, which matches everything.
func (o MutatingWebhookOutput) NamespaceSelector() metav1.LabelSelectorPtrOutput {
return o.ApplyT(func(v MutatingWebhook) *metav1.LabelSelector { return v.NamespaceSelector }).(metav1.LabelSelectorPtrOutput)
}
// 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.
func (o MutatingWebhookOutput) ObjectSelector() metav1.LabelSelectorPtrOutput {
return o.ApplyT(func(v MutatingWebhook) *metav1.LabelSelector { return v.ObjectSelector }).(metav1.LabelSelectorPtrOutput)
}
// reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".
//
// Never: the webhook will not be called more than once in a single admission evaluation.
//
// IfNeeded: 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.
//
// Defaults to "Never".
func (o MutatingWebhookOutput) ReinvocationPolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v MutatingWebhook) *string { return v.ReinvocationPolicy }).(pulumi.StringPtrOutput)
}
// 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.
func (o MutatingWebhookOutput) Rules() RuleWithOperationsArrayOutput {
return o.ApplyT(func(v MutatingWebhook) []RuleWithOperations { return v.Rules }).(RuleWithOperationsArrayOutput)
}
// 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.
func (o MutatingWebhookOutput) SideEffects() pulumi.StringOutput {
return o.ApplyT(func(v MutatingWebhook) string { return v.SideEffects }).(pulumi.StringOutput)
}
// 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.
func (o MutatingWebhookOutput) TimeoutSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v MutatingWebhook) *int { return v.TimeoutSeconds }).(pulumi.IntPtrOutput)
}
type MutatingWebhookArrayOutput struct{ *pulumi.OutputState }
func (MutatingWebhookArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]MutatingWebhook)(nil)).Elem()
}
func (o MutatingWebhookArrayOutput) ToMutatingWebhookArrayOutput() MutatingWebhookArrayOutput {
return o
}
func (o MutatingWebhookArrayOutput) ToMutatingWebhookArrayOutputWithContext(ctx context.Context) MutatingWebhookArrayOutput {
return o
}
func (o MutatingWebhookArrayOutput) Index(i pulumi.IntInput) MutatingWebhookOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) MutatingWebhook {
return vs[0].([]MutatingWebhook)[vs[1].(int)]
}).(MutatingWebhookOutput)
}
// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
type MutatingWebhookConfigurationType struct {
// 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
ApiVersion *string `pulumi:"apiVersion"`
// 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
Kind *string `pulumi:"kind"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Metadata *metav1.ObjectMeta `pulumi:"metadata"`
// Webhooks is a list of webhooks and the affected resources and operations.
Webhooks []MutatingWebhook `pulumi:"webhooks"`
}
// MutatingWebhookConfigurationTypeInput is an input type that accepts MutatingWebhookConfigurationTypeArgs and MutatingWebhookConfigurationTypeOutput values.
// You can construct a concrete instance of `MutatingWebhookConfigurationTypeInput` via:
//
// MutatingWebhookConfigurationTypeArgs{...}
type MutatingWebhookConfigurationTypeInput interface {
pulumi.Input
ToMutatingWebhookConfigurationTypeOutput() MutatingWebhookConfigurationTypeOutput
ToMutatingWebhookConfigurationTypeOutputWithContext(context.Context) MutatingWebhookConfigurationTypeOutput
}
// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
type MutatingWebhookConfigurationTypeArgs struct {
// 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
ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"`
// 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
Kind pulumi.StringPtrInput `pulumi:"kind"`
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"`
// Webhooks is a list of webhooks and the affected resources and operations.
Webhooks MutatingWebhookArrayInput `pulumi:"webhooks"`
}
func (MutatingWebhookConfigurationTypeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*MutatingWebhookConfigurationType)(nil)).Elem()
}
func (i MutatingWebhookConfigurationTypeArgs) ToMutatingWebhookConfigurationTypeOutput() MutatingWebhookConfigurationTypeOutput {
return i.ToMutatingWebhookConfigurationTypeOutputWithContext(context.Background())
}
func (i MutatingWebhookConfigurationTypeArgs) ToMutatingWebhookConfigurationTypeOutputWithContext(ctx context.Context) MutatingWebhookConfigurationTypeOutput {
return pulumi.ToOutputWithContext(ctx, i).(MutatingWebhookConfigurationTypeOutput)
}
// MutatingWebhookConfigurationTypeArrayInput is an input type that accepts MutatingWebhookConfigurationTypeArray and MutatingWebhookConfigurationTypeArrayOutput values.
// You can construct a concrete instance of `MutatingWebhookConfigurationTypeArrayInput` via:
//
// MutatingWebhookConfigurationTypeArray{ MutatingWebhookConfigurationTypeArgs{...} }
type MutatingWebhookConfigurationTypeArrayInput interface {
pulumi.Input
ToMutatingWebhookConfigurationTypeArrayOutput() MutatingWebhookConfigurationTypeArrayOutput
ToMutatingWebhookConfigurationTypeArrayOutputWithContext(context.Context) MutatingWebhookConfigurationTypeArrayOutput
}
type MutatingWebhookConfigurationTypeArray []MutatingWebhookConfigurationTypeInput
func (MutatingWebhookConfigurationTypeArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]MutatingWebhookConfigurationType)(nil)).Elem()
}
func (i MutatingWebhookConfigurationTypeArray) ToMutatingWebhookConfigurationTypeArrayOutput() MutatingWebhookConfigurationTypeArrayOutput {
return i.ToMutatingWebhookConfigurationTypeArrayOutputWithContext(context.Background())
}
func (i MutatingWebhookConfigurationTypeArray) ToMutatingWebhookConfigurationTypeArrayOutputWithContext(ctx context.Context) MutatingWebhookConfigurationTypeArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MutatingWebhookConfigurationTypeArrayOutput)
}
// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
type MutatingWebhookConfigurationTypeOutput struct{ *pulumi.OutputState }
func (MutatingWebhookConfigurationTypeOutput) ElementType() reflect.Type {
return reflect.TypeOf((*MutatingWebhookConfigurationType)(nil)).Elem()
}
func (o MutatingWebhookConfigurationTypeOutput) ToMutatingWebhookConfigurationTypeOutput() MutatingWebhookConfigurationTypeOutput {
return o
}
func (o MutatingWebhookConfigurationTypeOutput) ToMutatingWebhookConfigurationTypeOutputWithContext(ctx context.Context) MutatingWebhookConfigurationTypeOutput {
return o
}
// 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
func (o MutatingWebhookConfigurationTypeOutput) ApiVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v MutatingWebhookConfigurationType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput)
}
// 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
func (o MutatingWebhookConfigurationTypeOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v MutatingWebhookConfigurationType) *string { return v.Kind }).(pulumi.StringPtrOutput)
}
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
func (o MutatingWebhookConfigurationTypeOutput) Metadata() metav1.ObjectMetaPtrOutput {
return o.ApplyT(func(v MutatingWebhookConfigurationType) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput)
}
// Webhooks is a list of webhooks and the affected resources and operations.
func (o MutatingWebhookConfigurationTypeOutput) Webhooks() MutatingWebhookArrayOutput {
return o.ApplyT(func(v MutatingWebhookConfigurationType) []MutatingWebhook { return v.Webhooks }).(MutatingWebhookArrayOutput)
}
type MutatingWebhookConfigurationTypeArrayOutput struct{ *pulumi.OutputState }
func (MutatingWebhookConfigurationTypeArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]MutatingWebhookConfigurationType)(nil)).Elem()
}
func (o MutatingWebhookConfigurationTypeArrayOutput) ToMutatingWebhookConfigurationTypeArrayOutput() MutatingWebhookConfigurationTypeArrayOutput {
return o
}
func (o MutatingWebhookConfigurationTypeArrayOutput) ToMutatingWebhookConfigurationTypeArrayOutputWithContext(ctx context.Context) MutatingWebhookConfigurationTypeArrayOutput {
return o
}
func (o MutatingWebhookConfigurationTypeArrayOutput) Index(i pulumi.IntInput) MutatingWebhookConfigurationTypeOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) MutatingWebhookConfigurationType {
return vs[0].([]MutatingWebhookConfigurationType)[vs[1].(int)]
}).(MutatingWebhookConfigurationTypeOutput)
}
// MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
type MutatingWebhookConfigurationListType struct {
// 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
ApiVersion *string `pulumi:"apiVersion"`
// List of MutatingWebhookConfiguration.
Items []MutatingWebhookConfigurationType `pulumi:"items"`
// 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
Kind *string `pulumi:"kind"`
// Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Metadata *metav1.ListMeta `pulumi:"metadata"`
}
// MutatingWebhookConfigurationListTypeInput is an input type that accepts MutatingWebhookConfigurationListTypeArgs and MutatingWebhookConfigurationListTypeOutput values.
// You can construct a concrete instance of `MutatingWebhookConfigurationListTypeInput` via:
//
// MutatingWebhookConfigurationListTypeArgs{...}
type MutatingWebhookConfigurationListTypeInput interface {
pulumi.Input
ToMutatingWebhookConfigurationListTypeOutput() MutatingWebhookConfigurationListTypeOutput
ToMutatingWebhookConfigurationListTypeOutputWithContext(context.Context) MutatingWebhookConfigurationListTypeOutput
}
// MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
type MutatingWebhookConfigurationListTypeArgs struct {
// 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
ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"`
// List of MutatingWebhookConfiguration.
Items MutatingWebhookConfigurationTypeArrayInput `pulumi:"items"`
// 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
Kind pulumi.StringPtrInput `pulumi:"kind"`
// Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Metadata metav1.ListMetaPtrInput `pulumi:"metadata"`
}
func (MutatingWebhookConfigurationListTypeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*MutatingWebhookConfigurationListType)(nil)).Elem()
}
func (i MutatingWebhookConfigurationListTypeArgs) ToMutatingWebhookConfigurationListTypeOutput() MutatingWebhookConfigurationListTypeOutput {
return i.ToMutatingWebhookConfigurationListTypeOutputWithContext(context.Background())
}
func (i MutatingWebhookConfigurationListTypeArgs) ToMutatingWebhookConfigurationListTypeOutputWithContext(ctx context.Context) MutatingWebhookConfigurationListTypeOutput {
return pulumi.ToOutputWithContext(ctx, i).(MutatingWebhookConfigurationListTypeOutput)
}
// MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
type MutatingWebhookConfigurationListTypeOutput struct{ *pulumi.OutputState }
func (MutatingWebhookConfigurationListTypeOutput) ElementType() reflect.Type {
return reflect.TypeOf((*MutatingWebhookConfigurationListType)(nil)).Elem()
}
func (o MutatingWebhookConfigurationListTypeOutput) ToMutatingWebhookConfigurationListTypeOutput() MutatingWebhookConfigurationListTypeOutput {
return o
}
func (o MutatingWebhookConfigurationListTypeOutput) ToMutatingWebhookConfigurationListTypeOutputWithContext(ctx context.Context) MutatingWebhookConfigurationListTypeOutput {
return o
}
// 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
func (o MutatingWebhookConfigurationListTypeOutput) ApiVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v MutatingWebhookConfigurationListType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput)
}
// List of MutatingWebhookConfiguration.
func (o MutatingWebhookConfigurationListTypeOutput) Items() MutatingWebhookConfigurationTypeArrayOutput {
return o.ApplyT(func(v MutatingWebhookConfigurationListType) []MutatingWebhookConfigurationType { return v.Items }).(MutatingWebhookConfigurationTypeArrayOutput)
}
// 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
func (o MutatingWebhookConfigurationListTypeOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v MutatingWebhookConfigurationListType) *string { return v.Kind }).(pulumi.StringPtrOutput)
}
// Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
func (o MutatingWebhookConfigurationListTypeOutput) Metadata() metav1.ListMetaPtrOutput {
return o.ApplyT(func(v MutatingWebhookConfigurationListType) *metav1.ListMeta { return v.Metadata }).(metav1.ListMetaPtrOutput)
}
// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
type RuleWithOperations struct {
// 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 `pulumi:"apiGroups"`
// 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 `pulumi:"apiVersions"`
// 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 []string `pulumi:"operations"`
// Resources is a list of resources this rule applies to.
//
// For 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.
//
// If wildcard is present, the validation rule will ensure resources do not overlap with each other.
//
// Depending on the enclosing object, subresources might not be allowed. Required.
Resources []string `pulumi:"resources"`
// 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 "*".
Scope *string `pulumi:"scope"`
}
// RuleWithOperationsInput is an input type that accepts RuleWithOperationsArgs and RuleWithOperationsOutput values.
// You can construct a concrete instance of `RuleWithOperationsInput` via:
//
// RuleWithOperationsArgs{...}
type RuleWithOperationsInput interface {
pulumi.Input
ToRuleWithOperationsOutput() RuleWithOperationsOutput
ToRuleWithOperationsOutputWithContext(context.Context) RuleWithOperationsOutput
}
// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
type RuleWithOperationsArgs struct {
// 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 pulumi.StringArrayInput `pulumi:"apiGroups"`
// 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 pulumi.StringArrayInput `pulumi:"apiVersions"`
// 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 pulumi.StringArrayInput `pulumi:"operations"`
// Resources is a list of resources this rule applies to.
//
// For 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.
//
// If wildcard is present, the validation rule will ensure resources do not overlap with each other.
//
// Depending on the enclosing object, subresources might not be allowed. Required.
Resources pulumi.StringArrayInput `pulumi:"resources"`
// 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 "*".
Scope pulumi.StringPtrInput `pulumi:"scope"`
}
func (RuleWithOperationsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*RuleWithOperations)(nil)).Elem()
}
func (i RuleWithOperationsArgs) ToRuleWithOperationsOutput() RuleWithOperationsOutput {
return i.ToRuleWithOperationsOutputWithContext(context.Background())
}
func (i RuleWithOperationsArgs) ToRuleWithOperationsOutputWithContext(ctx context.Context) RuleWithOperationsOutput {
return pulumi.ToOutputWithContext(ctx, i).(RuleWithOperationsOutput)
}
// RuleWithOperationsArrayInput is an input type that accepts RuleWithOperationsArray and RuleWithOperationsArrayOutput values.
// You can construct a concrete instance of `RuleWithOperationsArrayInput` via:
//
// RuleWithOperationsArray{ RuleWithOperationsArgs{...} }
type RuleWithOperationsArrayInput interface {
pulumi.Input
ToRuleWithOperationsArrayOutput() RuleWithOperationsArrayOutput
ToRuleWithOperationsArrayOutputWithContext(context.Context) RuleWithOperationsArrayOutput
}
type RuleWithOperationsArray []RuleWithOperationsInput
func (RuleWithOperationsArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]RuleWithOperations)(nil)).Elem()
}
func (i RuleWithOperationsArray) ToRuleWithOperationsArrayOutput() RuleWithOperationsArrayOutput {
return i.ToRuleWithOperationsArrayOutputWithContext(context.Background())
}
func (i RuleWithOperationsArray) ToRuleWithOperationsArrayOutputWithContext(ctx context.Context) RuleWithOperationsArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RuleWithOperationsArrayOutput)
}
// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
type RuleWithOperationsOutput struct{ *pulumi.OutputState }
func (RuleWithOperationsOutput) ElementType() reflect.Type {
return reflect.TypeOf((*RuleWithOperations)(nil)).Elem()
}
func (o RuleWithOperationsOutput) ToRuleWithOperationsOutput() RuleWithOperationsOutput {
return o
}
func (o RuleWithOperationsOutput) ToRuleWithOperationsOutputWithContext(ctx context.Context) RuleWithOperationsOutput {
return o
}
// APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
func (o RuleWithOperationsOutput) ApiGroups() pulumi.StringArrayOutput {
return o.ApplyT(func(v RuleWithOperations) []string { return v.ApiGroups }).(pulumi.StringArrayOutput)
}
// APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
func (o RuleWithOperationsOutput) ApiVersions() pulumi.StringArrayOutput {
return o.ApplyT(func(v RuleWithOperations) []string { return v.ApiVersions }).(pulumi.StringArrayOutput)
}
// 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.
func (o RuleWithOperationsOutput) Operations() pulumi.StringArrayOutput {
return o.ApplyT(func(v RuleWithOperations) []string { return v.Operations }).(pulumi.StringArrayOutput)
}
// Resources is a list of resources this rule applies to.
//
// For 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.
//
// If wildcard is present, the validation rule will ensure resources do not overlap with each other.
//
// Depending on the enclosing object, subresources might not be allowed. Required.
func (o RuleWithOperationsOutput) Resources() pulumi.StringArrayOutput {
return o.ApplyT(func(v RuleWithOperations) []string { return v.Resources }).(pulumi.StringArrayOutput)
}
// 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 "*".
func (o RuleWithOperationsOutput) Scope() pulumi.StringPtrOutput {
return o.ApplyT(func(v RuleWithOperations) *string { return v.Scope }).(pulumi.StringPtrOutput)
}
type RuleWithOperationsArrayOutput struct{ *pulumi.OutputState }
func (RuleWithOperationsArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]RuleWithOperations)(nil)).Elem()
}
func (o RuleWithOperationsArrayOutput) ToRuleWithOperationsArrayOutput() RuleWithOperationsArrayOutput {
return o
}
func (o RuleWithOperationsArrayOutput) ToRuleWithOperationsArrayOutputWithContext(ctx context.Context) RuleWithOperationsArrayOutput {
return o
}
func (o RuleWithOperationsArrayOutput) Index(i pulumi.IntInput) RuleWithOperationsOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) RuleWithOperations {
return vs[0].([]RuleWithOperations)[vs[1].(int)]
}).(RuleWithOperationsOutput)
}
// ServiceReference holds a reference to Service.legacy.k8s.io
type ServiceReference struct {
// `name` is the name of the service. Required
Name string `pulumi:"name"`
// `namespace` is the namespace of the service. Required
Namespace string `pulumi:"namespace"`
// `path` is an optional URL path which will be sent in any request to this service.
Path *string `pulumi:"path"`
// 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).
Port *int `pulumi:"port"`
}
// ServiceReferenceInput is an input type that accepts ServiceReferenceArgs and ServiceReferenceOutput values.
// You can construct a concrete instance of `ServiceReferenceInput` via:
//
// ServiceReferenceArgs{...}
type ServiceReferenceInput interface {
pulumi.Input
ToServiceReferenceOutput() ServiceReferenceOutput
ToServiceReferenceOutputWithContext(context.Context) ServiceReferenceOutput
}
// ServiceReference holds a reference to Service.legacy.k8s.io
type ServiceReferenceArgs struct {
// `name` is the name of the service. Required
Name pulumi.StringInput `pulumi:"name"`
// `namespace` is the namespace of the service. Required
Namespace pulumi.StringInput `pulumi:"namespace"`
// `path` is an optional URL path which will be sent in any request to this service.
Path pulumi.StringPtrInput `pulumi:"path"`
// 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).
Port pulumi.IntPtrInput `pulumi:"port"`
}
func (ServiceReferenceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceReference)(nil)).Elem()
}
func (i ServiceReferenceArgs) ToServiceReferenceOutput() ServiceReferenceOutput {
return i.ToServiceReferenceOutputWithContext(context.Background())
}
func (i ServiceReferenceArgs) ToServiceReferenceOutputWithContext(ctx context.Context) ServiceReferenceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceReferenceOutput)
}
func (i ServiceReferenceArgs) ToServiceReferencePtrOutput() ServiceReferencePtrOutput {
return i.ToServiceReferencePtrOutputWithContext(context.Background())
}
func (i ServiceReferenceArgs) ToServiceReferencePtrOutputWithContext(ctx context.Context) ServiceReferencePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceReferenceOutput).ToServiceReferencePtrOutputWithContext(ctx)
}
// ServiceReferencePtrInput is an input type that accepts ServiceReferenceArgs, ServiceReferencePtr and ServiceReferencePtrOutput values.
// You can construct a concrete instance of `ServiceReferencePtrInput` via:
//
// ServiceReferenceArgs{...}
//
// or:
//
// nil
type ServiceReferencePtrInput interface {
pulumi.Input
ToServiceReferencePtrOutput() ServiceReferencePtrOutput
ToServiceReferencePtrOutputWithContext(context.Context) ServiceReferencePtrOutput
}
type serviceReferencePtrType ServiceReferenceArgs
func ServiceReferencePtr(v *ServiceReferenceArgs) ServiceReferencePtrInput {
return (*serviceReferencePtrType)(v)
}
func (*serviceReferencePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceReference)(nil)).Elem()
}
func (i *serviceReferencePtrType) ToServiceReferencePtrOutput() ServiceReferencePtrOutput {
return i.ToServiceReferencePtrOutputWithContext(context.Background())
}
func (i *serviceReferencePtrType) ToServiceReferencePtrOutputWithContext(ctx context.Context) ServiceReferencePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceReferencePtrOutput)
}
// ServiceReference holds a reference to Service.legacy.k8s.io
type ServiceReferenceOutput struct{ *pulumi.OutputState }
func (ServiceReferenceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceReference)(nil)).Elem()
}
func (o ServiceReferenceOutput) ToServiceReferenceOutput() ServiceReferenceOutput {
return o
}
func (o ServiceReferenceOutput) ToServiceReferenceOutputWithContext(ctx context.Context) ServiceReferenceOutput {
return o
}
func (o ServiceReferenceOutput) ToServiceReferencePtrOutput() ServiceReferencePtrOutput {
return o.ToServiceReferencePtrOutputWithContext(context.Background())
}
func (o ServiceReferenceOutput) ToServiceReferencePtrOutputWithContext(ctx context.Context) ServiceReferencePtrOutput {
return o.ApplyT(func(v ServiceReference) *ServiceReference {
return &v
}).(ServiceReferencePtrOutput)
}
// `name` is the name of the service. Required
func (o ServiceReferenceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v ServiceReference) string { return v.Name }).(pulumi.StringOutput)
}
// `namespace` is the namespace of the service. Required
func (o ServiceReferenceOutput) Namespace() pulumi.StringOutput {
return o.ApplyT(func(v ServiceReference) string { return v.Namespace }).(pulumi.StringOutput)
}
// `path` is an optional URL path which will be sent in any request to this service.
func (o ServiceReferenceOutput) Path() pulumi.StringPtrOutput {
return o.ApplyT(func(v ServiceReference) *string { return v.Path }).(pulumi.StringPtrOutput)
}
// 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).
func (o ServiceReferenceOutput) Port() pulumi.IntPtrOutput {
return o.ApplyT(func(v ServiceReference) *int { return v.Port }).(pulumi.IntPtrOutput)
}
type ServiceReferencePtrOutput struct{ *pulumi.OutputState }
func (ServiceReferencePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceReference)(nil)).Elem()
}
func (o ServiceReferencePtrOutput) ToServiceReferencePtrOutput() ServiceReferencePtrOutput {
return o
}
func (o ServiceReferencePtrOutput) ToServiceReferencePtrOutputWithContext(ctx context.Context) ServiceReferencePtrOutput {
return o
}
func (o ServiceReferencePtrOutput) Elem() ServiceReferenceOutput {
return o.ApplyT(func(v *ServiceReference) ServiceReference { return *v }).(ServiceReferenceOutput)
}
// `name` is the name of the service. Required
func (o ServiceReferencePtrOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceReference) *string {
if v == nil {
return nil
}
return &v.Name
}).(pulumi.StringPtrOutput)
}
// `namespace` is the namespace of the service. Required
func (o ServiceReferencePtrOutput) Namespace() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceReference) *string {
if v == nil {
return nil
}
return &v.Namespace
}).(pulumi.StringPtrOutput)
}
// `path` is an optional URL path which will be sent in any request to this service.
func (o ServiceReferencePtrOutput) Path() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceReference) *string {
if v == nil {
return nil
}
return v.Path
}).(pulumi.StringPtrOutput)
}
// 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).
func (o ServiceReferencePtrOutput) Port() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ServiceReference) *int {
if v == nil {
return nil
}
return v.Port
}).(pulumi.IntPtrOutput)
}
// ValidatingWebhook describes an admission webhook and the resources and operations it applies to.
type ValidatingWebhook struct {
// 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.
AdmissionReviewVersions []string `pulumi:"admissionReviewVersions"`
// ClientConfig defines how to communicate with the hook. Required
ClientConfig WebhookClientConfig `pulumi:"clientConfig"`
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
FailurePolicy *string `pulumi:"failurePolicy"`
// matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
//
// - 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.
//
// - 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.
//
// Defaults to "Equivalent"
MatchPolicy *string `pulumi:"matchPolicy"`
// 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 `pulumi:"name"`
// 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.
//
// For 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": {
// "matchExpressions": [
// {
// "key": "runlevel",
// "operator": "NotIn",
// "values": [
// "0",
// "1"
// ]
// }
// ]
// }
//
// If 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": {
// "matchExpressions": [
// {
// "key": "environment",
// "operator": "In",
// "values": [
// "prod",
// "staging"
// ]
// }
// ]
// }
//
// See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors.
//
// Default to the empty LabelSelector, which matches everything.
NamespaceSelector *metav1.LabelSelector `pulumi:"namespaceSelector"`
// 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.
ObjectSelector *metav1.LabelSelector `pulumi:"objectSelector"`
// 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 []RuleWithOperations `pulumi:"rules"`
// 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 string `pulumi:"sideEffects"`
// 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 *int `pulumi:"timeoutSeconds"`
}
// ValidatingWebhookInput is an input type that accepts ValidatingWebhookArgs and ValidatingWebhookOutput values.
// You can construct a concrete instance of `ValidatingWebhookInput` via:
//
// ValidatingWebhookArgs{...}
type ValidatingWebhookInput interface {
pulumi.Input
ToValidatingWebhookOutput() ValidatingWebhookOutput
ToValidatingWebhookOutputWithContext(context.Context) ValidatingWebhookOutput
}
// ValidatingWebhook describes an admission webhook and the resources and operations it applies to.
type ValidatingWebhookArgs struct {
// 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.
AdmissionReviewVersions pulumi.StringArrayInput `pulumi:"admissionReviewVersions"`
// ClientConfig defines how to communicate with the hook. Required
ClientConfig WebhookClientConfigInput `pulumi:"clientConfig"`
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
FailurePolicy pulumi.StringPtrInput `pulumi:"failurePolicy"`
// matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
//
// - 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.
//
// - 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.
//
// Defaults to "Equivalent"
MatchPolicy pulumi.StringPtrInput `pulumi:"matchPolicy"`
// 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 pulumi.StringInput `pulumi:"name"`
// 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.
//
// For 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": {
// "matchExpressions": [
// {
// "key": "runlevel",
// "operator": "NotIn",
// "values": [
// "0",
// "1"
// ]
// }
// ]
// }
//
// If 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": {
// "matchExpressions": [
// {
// "key": "environment",
// "operator": "In",
// "values": [
// "prod",
// "staging"
// ]
// }
// ]
// }
//