pulumi-kubernetes 4.10.0a1710288589__py3-none-any.whl → 4.20.0a1736823142__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-kubernetes might be problematic. Click here for more details.
- pulumi_kubernetes/__init__.py +123 -3
- pulumi_kubernetes/_inputs.py +63 -6
- pulumi_kubernetes/_utilities.py +41 -5
- pulumi_kubernetes/admissionregistration/v1/MutatingWebhookConfiguration.py +11 -6
- pulumi_kubernetes/admissionregistration/v1/MutatingWebhookConfigurationList.py +11 -6
- pulumi_kubernetes/admissionregistration/v1/MutatingWebhookConfigurationPatch.py +11 -6
- pulumi_kubernetes/admissionregistration/v1/ValidatingAdmissionPolicy.py +226 -0
- pulumi_kubernetes/admissionregistration/v1/ValidatingAdmissionPolicyBinding.py +224 -0
- pulumi_kubernetes/admissionregistration/v1/ValidatingAdmissionPolicyBindingList.py +215 -0
- pulumi_kubernetes/admissionregistration/v1/ValidatingAdmissionPolicyBindingPatch.py +236 -0
- pulumi_kubernetes/admissionregistration/v1/ValidatingAdmissionPolicyList.py +215 -0
- pulumi_kubernetes/admissionregistration/v1/ValidatingAdmissionPolicyPatch.py +238 -0
- pulumi_kubernetes/admissionregistration/v1/ValidatingWebhookConfiguration.py +11 -6
- pulumi_kubernetes/admissionregistration/v1/ValidatingWebhookConfigurationList.py +11 -6
- pulumi_kubernetes/admissionregistration/v1/ValidatingWebhookConfigurationPatch.py +11 -6
- pulumi_kubernetes/admissionregistration/v1/__init__.py +6 -0
- pulumi_kubernetes/admissionregistration/v1/_inputs.py +4571 -939
- pulumi_kubernetes/admissionregistration/v1/outputs.py +2880 -470
- pulumi_kubernetes/admissionregistration/v1alpha1/MutatingAdmissionPolicy.py +214 -0
- pulumi_kubernetes/admissionregistration/v1alpha1/MutatingAdmissionPolicyBinding.py +222 -0
- pulumi_kubernetes/admissionregistration/v1alpha1/MutatingAdmissionPolicyBindingList.py +215 -0
- pulumi_kubernetes/admissionregistration/v1alpha1/MutatingAdmissionPolicyBindingPatch.py +234 -0
- pulumi_kubernetes/admissionregistration/v1alpha1/MutatingAdmissionPolicyList.py +215 -0
- pulumi_kubernetes/admissionregistration/v1alpha1/MutatingAdmissionPolicyPatch.py +226 -0
- pulumi_kubernetes/admissionregistration/v1alpha1/ValidatingAdmissionPolicy.py +12 -7
- pulumi_kubernetes/admissionregistration/v1alpha1/ValidatingAdmissionPolicyBinding.py +12 -15
- pulumi_kubernetes/admissionregistration/v1alpha1/ValidatingAdmissionPolicyBindingList.py +29 -23
- pulumi_kubernetes/admissionregistration/v1alpha1/ValidatingAdmissionPolicyBindingPatch.py +12 -15
- pulumi_kubernetes/admissionregistration/v1alpha1/ValidatingAdmissionPolicyList.py +29 -23
- pulumi_kubernetes/admissionregistration/v1alpha1/ValidatingAdmissionPolicyPatch.py +12 -7
- pulumi_kubernetes/admissionregistration/v1alpha1/__init__.py +6 -0
- pulumi_kubernetes/admissionregistration/v1alpha1/_inputs.py +2514 -141
- pulumi_kubernetes/admissionregistration/v1alpha1/outputs.py +1370 -246
- pulumi_kubernetes/admissionregistration/v1beta1/MutatingWebhookConfiguration.py +11 -6
- pulumi_kubernetes/admissionregistration/v1beta1/MutatingWebhookConfigurationList.py +11 -6
- pulumi_kubernetes/admissionregistration/v1beta1/MutatingWebhookConfigurationPatch.py +11 -6
- pulumi_kubernetes/admissionregistration/v1beta1/ValidatingAdmissionPolicy.py +12 -7
- pulumi_kubernetes/admissionregistration/v1beta1/ValidatingAdmissionPolicyBinding.py +12 -7
- pulumi_kubernetes/admissionregistration/v1beta1/ValidatingAdmissionPolicyBindingList.py +29 -23
- pulumi_kubernetes/admissionregistration/v1beta1/ValidatingAdmissionPolicyBindingPatch.py +12 -7
- pulumi_kubernetes/admissionregistration/v1beta1/ValidatingAdmissionPolicyList.py +29 -23
- pulumi_kubernetes/admissionregistration/v1beta1/ValidatingAdmissionPolicyPatch.py +12 -7
- pulumi_kubernetes/admissionregistration/v1beta1/ValidatingWebhookConfiguration.py +11 -6
- pulumi_kubernetes/admissionregistration/v1beta1/ValidatingWebhookConfigurationList.py +11 -6
- pulumi_kubernetes/admissionregistration/v1beta1/ValidatingWebhookConfigurationPatch.py +11 -6
- pulumi_kubernetes/admissionregistration/v1beta1/_inputs.py +1522 -42
- pulumi_kubernetes/admissionregistration/v1beta1/outputs.py +9 -4
- pulumi_kubernetes/apiextensions/v1/CustomResourceDefinition.py +11 -6
- pulumi_kubernetes/apiextensions/v1/CustomResourceDefinitionList.py +11 -6
- pulumi_kubernetes/apiextensions/v1/CustomResourceDefinitionPatch.py +11 -6
- pulumi_kubernetes/apiextensions/v1/_inputs.py +1175 -12
- pulumi_kubernetes/apiextensions/v1/outputs.py +122 -8
- pulumi_kubernetes/apiextensions/v1beta1/CustomResourceDefinition.py +10 -5
- pulumi_kubernetes/apiextensions/v1beta1/CustomResourceDefinitionList.py +10 -5
- pulumi_kubernetes/apiextensions/v1beta1/CustomResourceDefinitionPatch.py +10 -5
- pulumi_kubernetes/apiextensions/v1beta1/_inputs.py +903 -6
- pulumi_kubernetes/apiextensions/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/apiregistration/v1/APIService.py +11 -6
- pulumi_kubernetes/apiregistration/v1/APIServiceList.py +11 -6
- pulumi_kubernetes/apiregistration/v1/APIServicePatch.py +11 -6
- pulumi_kubernetes/apiregistration/v1/_inputs.py +194 -0
- pulumi_kubernetes/apiregistration/v1/outputs.py +5 -0
- pulumi_kubernetes/apiregistration/v1beta1/APIService.py +10 -5
- pulumi_kubernetes/apiregistration/v1beta1/APIServiceList.py +9 -4
- pulumi_kubernetes/apiregistration/v1beta1/APIServicePatch.py +10 -5
- pulumi_kubernetes/apiregistration/v1beta1/_inputs.py +191 -0
- pulumi_kubernetes/apiregistration/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/apps/v1/ControllerRevision.py +8 -3
- pulumi_kubernetes/apps/v1/ControllerRevisionList.py +11 -6
- pulumi_kubernetes/apps/v1/ControllerRevisionPatch.py +8 -3
- pulumi_kubernetes/apps/v1/DaemonSet.py +11 -6
- pulumi_kubernetes/apps/v1/DaemonSetList.py +11 -6
- pulumi_kubernetes/apps/v1/DaemonSetPatch.py +11 -6
- pulumi_kubernetes/apps/v1/Deployment.py +11 -6
- pulumi_kubernetes/apps/v1/DeploymentList.py +11 -6
- pulumi_kubernetes/apps/v1/DeploymentPatch.py +11 -6
- pulumi_kubernetes/apps/v1/ReplicaSet.py +11 -6
- pulumi_kubernetes/apps/v1/ReplicaSetList.py +11 -6
- pulumi_kubernetes/apps/v1/ReplicaSetPatch.py +11 -6
- pulumi_kubernetes/apps/v1/StatefulSet.py +11 -6
- pulumi_kubernetes/apps/v1/StatefulSetList.py +11 -6
- pulumi_kubernetes/apps/v1/StatefulSetPatch.py +11 -6
- pulumi_kubernetes/apps/v1/_inputs.py +1057 -8
- pulumi_kubernetes/apps/v1/outputs.py +13 -8
- pulumi_kubernetes/apps/v1beta1/ControllerRevision.py +8 -3
- pulumi_kubernetes/apps/v1beta1/ControllerRevisionList.py +11 -6
- pulumi_kubernetes/apps/v1beta1/ControllerRevisionPatch.py +8 -3
- pulumi_kubernetes/apps/v1beta1/Deployment.py +11 -6
- pulumi_kubernetes/apps/v1beta1/DeploymentList.py +11 -6
- pulumi_kubernetes/apps/v1beta1/DeploymentPatch.py +11 -6
- pulumi_kubernetes/apps/v1beta1/StatefulSet.py +10 -5
- pulumi_kubernetes/apps/v1beta1/StatefulSetList.py +9 -4
- pulumi_kubernetes/apps/v1beta1/StatefulSetPatch.py +10 -5
- pulumi_kubernetes/apps/v1beta1/_inputs.py +603 -0
- pulumi_kubernetes/apps/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/apps/v1beta2/ControllerRevision.py +8 -3
- pulumi_kubernetes/apps/v1beta2/ControllerRevisionList.py +11 -6
- pulumi_kubernetes/apps/v1beta2/ControllerRevisionPatch.py +8 -3
- pulumi_kubernetes/apps/v1beta2/DaemonSet.py +11 -6
- pulumi_kubernetes/apps/v1beta2/DaemonSetList.py +11 -6
- pulumi_kubernetes/apps/v1beta2/DaemonSetPatch.py +11 -6
- pulumi_kubernetes/apps/v1beta2/Deployment.py +11 -6
- pulumi_kubernetes/apps/v1beta2/DeploymentList.py +11 -6
- pulumi_kubernetes/apps/v1beta2/DeploymentPatch.py +11 -6
- pulumi_kubernetes/apps/v1beta2/ReplicaSet.py +11 -6
- pulumi_kubernetes/apps/v1beta2/ReplicaSetList.py +11 -6
- pulumi_kubernetes/apps/v1beta2/ReplicaSetPatch.py +11 -6
- pulumi_kubernetes/apps/v1beta2/StatefulSet.py +10 -5
- pulumi_kubernetes/apps/v1beta2/StatefulSetList.py +9 -4
- pulumi_kubernetes/apps/v1beta2/StatefulSetPatch.py +10 -5
- pulumi_kubernetes/apps/v1beta2/_inputs.py +935 -0
- pulumi_kubernetes/apps/v1beta2/outputs.py +5 -0
- pulumi_kubernetes/auditregistration/v1alpha1/AuditSink.py +10 -5
- pulumi_kubernetes/auditregistration/v1alpha1/AuditSinkList.py +10 -5
- pulumi_kubernetes/auditregistration/v1alpha1/AuditSinkPatch.py +10 -5
- pulumi_kubernetes/auditregistration/v1alpha1/_inputs.py +281 -0
- pulumi_kubernetes/auditregistration/v1alpha1/outputs.py +5 -0
- pulumi_kubernetes/autoscaling/v1/HorizontalPodAutoscaler.py +11 -6
- pulumi_kubernetes/autoscaling/v1/HorizontalPodAutoscalerList.py +11 -6
- pulumi_kubernetes/autoscaling/v1/HorizontalPodAutoscalerPatch.py +11 -6
- pulumi_kubernetes/autoscaling/v1/_inputs.py +157 -0
- pulumi_kubernetes/autoscaling/v1/outputs.py +5 -0
- pulumi_kubernetes/autoscaling/v2/HorizontalPodAutoscaler.py +11 -6
- pulumi_kubernetes/autoscaling/v2/HorizontalPodAutoscalerList.py +11 -6
- pulumi_kubernetes/autoscaling/v2/HorizontalPodAutoscalerPatch.py +11 -6
- pulumi_kubernetes/autoscaling/v2/_inputs.py +815 -10
- pulumi_kubernetes/autoscaling/v2/outputs.py +17 -12
- pulumi_kubernetes/autoscaling/v2beta1/HorizontalPodAutoscaler.py +11 -6
- pulumi_kubernetes/autoscaling/v2beta1/HorizontalPodAutoscalerList.py +11 -6
- pulumi_kubernetes/autoscaling/v2beta1/HorizontalPodAutoscalerPatch.py +11 -6
- pulumi_kubernetes/autoscaling/v2beta1/_inputs.py +652 -0
- pulumi_kubernetes/autoscaling/v2beta1/outputs.py +5 -0
- pulumi_kubernetes/autoscaling/v2beta2/HorizontalPodAutoscaler.py +11 -6
- pulumi_kubernetes/autoscaling/v2beta2/HorizontalPodAutoscalerList.py +11 -6
- pulumi_kubernetes/autoscaling/v2beta2/HorizontalPodAutoscalerPatch.py +11 -6
- pulumi_kubernetes/autoscaling/v2beta2/_inputs.py +796 -0
- pulumi_kubernetes/autoscaling/v2beta2/outputs.py +5 -0
- pulumi_kubernetes/batch/v1/CronJob.py +11 -6
- pulumi_kubernetes/batch/v1/CronJobList.py +11 -6
- pulumi_kubernetes/batch/v1/CronJobPatch.py +11 -6
- pulumi_kubernetes/batch/v1/Job.py +11 -6
- pulumi_kubernetes/batch/v1/JobList.py +11 -6
- pulumi_kubernetes/batch/v1/JobPatch.py +11 -6
- pulumi_kubernetes/batch/v1/_inputs.py +1070 -85
- pulumi_kubernetes/batch/v1/outputs.py +298 -40
- pulumi_kubernetes/batch/v1beta1/CronJob.py +11 -6
- pulumi_kubernetes/batch/v1beta1/CronJobList.py +11 -6
- pulumi_kubernetes/batch/v1beta1/CronJobPatch.py +11 -6
- pulumi_kubernetes/batch/v1beta1/_inputs.py +161 -0
- pulumi_kubernetes/batch/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/batch/v2alpha1/CronJob.py +11 -6
- pulumi_kubernetes/batch/v2alpha1/CronJobList.py +11 -6
- pulumi_kubernetes/batch/v2alpha1/CronJobPatch.py +11 -6
- pulumi_kubernetes/batch/v2alpha1/_inputs.py +161 -0
- pulumi_kubernetes/batch/v2alpha1/outputs.py +5 -0
- pulumi_kubernetes/certificates/v1/CertificateSigningRequest.py +10 -5
- pulumi_kubernetes/certificates/v1/CertificateSigningRequestList.py +10 -5
- pulumi_kubernetes/certificates/v1/CertificateSigningRequestPatch.py +10 -5
- pulumi_kubernetes/certificates/v1/_inputs.py +290 -0
- pulumi_kubernetes/certificates/v1/outputs.py +5 -0
- pulumi_kubernetes/certificates/v1alpha1/ClusterTrustBundle.py +11 -6
- pulumi_kubernetes/certificates/v1alpha1/ClusterTrustBundleList.py +11 -6
- pulumi_kubernetes/certificates/v1alpha1/ClusterTrustBundlePatch.py +11 -6
- pulumi_kubernetes/certificates/v1alpha1/_inputs.py +94 -0
- pulumi_kubernetes/certificates/v1alpha1/outputs.py +5 -0
- pulumi_kubernetes/certificates/v1beta1/CertificateSigningRequest.py +10 -5
- pulumi_kubernetes/certificates/v1beta1/CertificateSigningRequestList.py +9 -4
- pulumi_kubernetes/certificates/v1beta1/CertificateSigningRequestPatch.py +10 -5
- pulumi_kubernetes/certificates/v1beta1/_inputs.py +165 -0
- pulumi_kubernetes/certificates/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/coordination/__init__.py +6 -0
- pulumi_kubernetes/coordination/v1/Lease.py +11 -6
- pulumi_kubernetes/coordination/v1/LeaseList.py +11 -6
- pulumi_kubernetes/coordination/v1/LeasePatch.py +11 -6
- pulumi_kubernetes/coordination/v1/_inputs.py +180 -10
- pulumi_kubernetes/coordination/v1/outputs.py +67 -10
- pulumi_kubernetes/coordination/v1alpha1/LeaseCandidate.py +216 -0
- pulumi_kubernetes/coordination/v1alpha1/LeaseCandidateList.py +215 -0
- pulumi_kubernetes/coordination/v1alpha1/LeaseCandidatePatch.py +228 -0
- pulumi_kubernetes/coordination/v1alpha1/__init__.py +12 -0
- pulumi_kubernetes/coordination/v1alpha1/_inputs.py +418 -0
- pulumi_kubernetes/coordination/v1alpha1/outputs.py +334 -0
- pulumi_kubernetes/coordination/v1alpha2/LeaseCandidate.py +216 -0
- pulumi_kubernetes/coordination/v1alpha2/LeaseCandidateList.py +215 -0
- pulumi_kubernetes/coordination/v1alpha2/LeaseCandidatePatch.py +228 -0
- pulumi_kubernetes/coordination/v1alpha2/__init__.py +12 -0
- pulumi_kubernetes/coordination/v1alpha2/_inputs.py +393 -0
- pulumi_kubernetes/coordination/v1alpha2/outputs.py +313 -0
- pulumi_kubernetes/coordination/v1beta1/Lease.py +11 -6
- pulumi_kubernetes/coordination/v1beta1/LeaseList.py +11 -6
- pulumi_kubernetes/coordination/v1beta1/LeasePatch.py +11 -6
- pulumi_kubernetes/coordination/v1beta1/_inputs.py +90 -0
- pulumi_kubernetes/coordination/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/core/v1/Binding.py +13 -8
- pulumi_kubernetes/core/v1/BindingPatch.py +13 -8
- pulumi_kubernetes/core/v1/ConfigMap.py +8 -3
- pulumi_kubernetes/core/v1/ConfigMapList.py +11 -6
- pulumi_kubernetes/core/v1/ConfigMapPatch.py +8 -3
- pulumi_kubernetes/core/v1/Endpoints.py +11 -6
- pulumi_kubernetes/core/v1/EndpointsList.py +11 -6
- pulumi_kubernetes/core/v1/EndpointsPatch.py +11 -6
- pulumi_kubernetes/core/v1/Event.py +20 -15
- pulumi_kubernetes/core/v1/EventList.py +11 -6
- pulumi_kubernetes/core/v1/EventPatch.py +20 -15
- pulumi_kubernetes/core/v1/LimitRange.py +11 -6
- pulumi_kubernetes/core/v1/LimitRangeList.py +11 -6
- pulumi_kubernetes/core/v1/LimitRangePatch.py +11 -6
- pulumi_kubernetes/core/v1/Namespace.py +11 -6
- pulumi_kubernetes/core/v1/NamespaceList.py +11 -6
- pulumi_kubernetes/core/v1/NamespacePatch.py +11 -6
- pulumi_kubernetes/core/v1/Node.py +11 -6
- pulumi_kubernetes/core/v1/NodeList.py +11 -6
- pulumi_kubernetes/core/v1/NodePatch.py +11 -6
- pulumi_kubernetes/core/v1/PersistentVolume.py +11 -6
- pulumi_kubernetes/core/v1/PersistentVolumeClaim.py +11 -6
- pulumi_kubernetes/core/v1/PersistentVolumeClaimList.py +11 -6
- pulumi_kubernetes/core/v1/PersistentVolumeClaimPatch.py +11 -6
- pulumi_kubernetes/core/v1/PersistentVolumeList.py +11 -6
- pulumi_kubernetes/core/v1/PersistentVolumePatch.py +11 -6
- pulumi_kubernetes/core/v1/Pod.py +11 -6
- pulumi_kubernetes/core/v1/PodList.py +11 -6
- pulumi_kubernetes/core/v1/PodPatch.py +11 -6
- pulumi_kubernetes/core/v1/PodTemplate.py +11 -6
- pulumi_kubernetes/core/v1/PodTemplateList.py +11 -6
- pulumi_kubernetes/core/v1/PodTemplatePatch.py +11 -6
- pulumi_kubernetes/core/v1/ReplicationController.py +11 -6
- pulumi_kubernetes/core/v1/ReplicationControllerList.py +11 -6
- pulumi_kubernetes/core/v1/ReplicationControllerPatch.py +11 -6
- pulumi_kubernetes/core/v1/ResourceQuota.py +11 -6
- pulumi_kubernetes/core/v1/ResourceQuotaList.py +11 -6
- pulumi_kubernetes/core/v1/ResourceQuotaPatch.py +11 -6
- pulumi_kubernetes/core/v1/Secret.py +8 -3
- pulumi_kubernetes/core/v1/SecretList.py +11 -6
- pulumi_kubernetes/core/v1/SecretPatch.py +8 -3
- pulumi_kubernetes/core/v1/Service.py +17 -28
- pulumi_kubernetes/core/v1/ServiceAccount.py +17 -12
- pulumi_kubernetes/core/v1/ServiceAccountList.py +11 -6
- pulumi_kubernetes/core/v1/ServiceAccountPatch.py +17 -12
- pulumi_kubernetes/core/v1/ServiceList.py +11 -6
- pulumi_kubernetes/core/v1/ServicePatch.py +17 -28
- pulumi_kubernetes/core/v1/_inputs.py +11760 -756
- pulumi_kubernetes/core/v1/outputs.py +2131 -448
- pulumi_kubernetes/discovery/v1/EndpointSlice.py +14 -9
- pulumi_kubernetes/discovery/v1/EndpointSliceList.py +11 -6
- pulumi_kubernetes/discovery/v1/EndpointSlicePatch.py +14 -9
- pulumi_kubernetes/discovery/v1/_inputs.py +284 -0
- pulumi_kubernetes/discovery/v1/outputs.py +5 -0
- pulumi_kubernetes/discovery/v1beta1/EndpointSlice.py +14 -9
- pulumi_kubernetes/discovery/v1beta1/EndpointSliceList.py +11 -6
- pulumi_kubernetes/discovery/v1beta1/EndpointSlicePatch.py +14 -9
- pulumi_kubernetes/discovery/v1beta1/_inputs.py +210 -0
- pulumi_kubernetes/discovery/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/events/v1/Event.py +20 -15
- pulumi_kubernetes/events/v1/EventList.py +11 -6
- pulumi_kubernetes/events/v1/EventPatch.py +20 -15
- pulumi_kubernetes/events/v1/_inputs.py +118 -0
- pulumi_kubernetes/events/v1/outputs.py +5 -0
- pulumi_kubernetes/events/v1beta1/Event.py +19 -14
- pulumi_kubernetes/events/v1beta1/EventList.py +11 -6
- pulumi_kubernetes/events/v1beta1/EventPatch.py +19 -14
- pulumi_kubernetes/events/v1beta1/_inputs.py +123 -0
- pulumi_kubernetes/events/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/extensions/v1beta1/DaemonSet.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/DaemonSetList.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/DaemonSetPatch.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/Deployment.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/DeploymentList.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/DeploymentPatch.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/Ingress.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/IngressList.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/IngressPatch.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/NetworkPolicy.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/NetworkPolicyList.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/NetworkPolicyPatch.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/PodSecurityPolicy.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/PodSecurityPolicyList.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/PodSecurityPolicyPatch.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/ReplicaSet.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/ReplicaSetList.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/ReplicaSetPatch.py +11 -6
- pulumi_kubernetes/extensions/v1beta1/_inputs.py +1884 -26
- pulumi_kubernetes/extensions/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/flowcontrol/v1/FlowSchema.py +11 -6
- pulumi_kubernetes/flowcontrol/v1/FlowSchemaList.py +11 -6
- pulumi_kubernetes/flowcontrol/v1/FlowSchemaPatch.py +11 -6
- pulumi_kubernetes/flowcontrol/v1/PriorityLevelConfiguration.py +11 -6
- pulumi_kubernetes/flowcontrol/v1/PriorityLevelConfigurationList.py +11 -6
- pulumi_kubernetes/flowcontrol/v1/PriorityLevelConfigurationPatch.py +11 -6
- pulumi_kubernetes/flowcontrol/v1/_inputs.py +779 -0
- pulumi_kubernetes/flowcontrol/v1/outputs.py +5 -0
- pulumi_kubernetes/flowcontrol/v1alpha1/FlowSchema.py +11 -6
- pulumi_kubernetes/flowcontrol/v1alpha1/FlowSchemaList.py +11 -6
- pulumi_kubernetes/flowcontrol/v1alpha1/FlowSchemaPatch.py +11 -6
- pulumi_kubernetes/flowcontrol/v1alpha1/PriorityLevelConfiguration.py +11 -6
- pulumi_kubernetes/flowcontrol/v1alpha1/PriorityLevelConfigurationList.py +11 -6
- pulumi_kubernetes/flowcontrol/v1alpha1/PriorityLevelConfigurationPatch.py +11 -6
- pulumi_kubernetes/flowcontrol/v1alpha1/_inputs.py +671 -0
- pulumi_kubernetes/flowcontrol/v1alpha1/outputs.py +5 -0
- pulumi_kubernetes/flowcontrol/v1beta1/FlowSchema.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta1/FlowSchemaList.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta1/FlowSchemaPatch.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta1/PriorityLevelConfiguration.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta1/PriorityLevelConfigurationList.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta1/PriorityLevelConfigurationPatch.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta1/_inputs.py +671 -0
- pulumi_kubernetes/flowcontrol/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/flowcontrol/v1beta2/FlowSchema.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta2/FlowSchemaList.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta2/FlowSchemaPatch.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta2/PriorityLevelConfiguration.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta2/PriorityLevelConfigurationList.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta2/PriorityLevelConfigurationPatch.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta2/_inputs.py +771 -0
- pulumi_kubernetes/flowcontrol/v1beta2/outputs.py +5 -0
- pulumi_kubernetes/flowcontrol/v1beta3/FlowSchema.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta3/FlowSchemaList.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta3/FlowSchemaPatch.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta3/PriorityLevelConfiguration.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta3/PriorityLevelConfigurationList.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta3/PriorityLevelConfigurationPatch.py +11 -6
- pulumi_kubernetes/flowcontrol/v1beta3/_inputs.py +779 -8
- pulumi_kubernetes/flowcontrol/v1beta3/outputs.py +13 -8
- pulumi_kubernetes/helm/__init__.py +3 -0
- pulumi_kubernetes/helm/v3/Release.py +8 -3
- pulumi_kubernetes/helm/v3/_inputs.py +42 -2
- pulumi_kubernetes/helm/v3/outputs.py +7 -2
- pulumi_kubernetes/helm/v4/Chart.py +721 -0
- pulumi_kubernetes/helm/v4/__init__.py +9 -0
- pulumi_kubernetes/helm/v4/_inputs.py +216 -0
- pulumi_kubernetes/kustomize/__init__.py +8 -0
- pulumi_kubernetes/kustomize/v2/Directory.py +219 -0
- pulumi_kubernetes/kustomize/v2/__init__.py +8 -0
- pulumi_kubernetes/meta/v1/Status.py +11 -6
- pulumi_kubernetes/meta/v1/StatusPatch.py +11 -6
- pulumi_kubernetes/meta/v1/_inputs.py +596 -0
- pulumi_kubernetes/meta/v1/outputs.py +5 -0
- pulumi_kubernetes/networking/v1/Ingress.py +11 -6
- pulumi_kubernetes/networking/v1/IngressClass.py +11 -6
- pulumi_kubernetes/networking/v1/IngressClassList.py +11 -6
- pulumi_kubernetes/networking/v1/IngressClassPatch.py +11 -6
- pulumi_kubernetes/networking/v1/IngressList.py +11 -6
- pulumi_kubernetes/networking/v1/IngressPatch.py +11 -6
- pulumi_kubernetes/networking/v1/NetworkPolicy.py +11 -6
- pulumi_kubernetes/networking/v1/NetworkPolicyList.py +11 -6
- pulumi_kubernetes/networking/v1/NetworkPolicyPatch.py +11 -6
- pulumi_kubernetes/networking/v1/_inputs.py +840 -0
- pulumi_kubernetes/networking/v1/outputs.py +5 -0
- pulumi_kubernetes/networking/v1alpha1/ClusterCIDR.py +11 -6
- pulumi_kubernetes/networking/v1alpha1/ClusterCIDRList.py +11 -6
- pulumi_kubernetes/networking/v1alpha1/ClusterCIDRPatch.py +11 -6
- pulumi_kubernetes/networking/v1alpha1/IPAddress.py +13 -6
- pulumi_kubernetes/networking/v1alpha1/IPAddressList.py +11 -6
- pulumi_kubernetes/networking/v1alpha1/IPAddressPatch.py +13 -6
- pulumi_kubernetes/networking/v1alpha1/ServiceCIDR.py +13 -6
- pulumi_kubernetes/networking/v1alpha1/ServiceCIDRList.py +11 -6
- pulumi_kubernetes/networking/v1alpha1/ServiceCIDRPatch.py +13 -6
- pulumi_kubernetes/networking/v1alpha1/_inputs.py +293 -37
- pulumi_kubernetes/networking/v1alpha1/outputs.py +26 -24
- pulumi_kubernetes/networking/v1beta1/IPAddress.py +216 -0
- pulumi_kubernetes/networking/v1beta1/IPAddressList.py +215 -0
- pulumi_kubernetes/networking/v1beta1/IPAddressPatch.py +228 -0
- pulumi_kubernetes/networking/v1beta1/Ingress.py +11 -6
- pulumi_kubernetes/networking/v1beta1/IngressClass.py +11 -6
- pulumi_kubernetes/networking/v1beta1/IngressClassList.py +11 -6
- pulumi_kubernetes/networking/v1beta1/IngressClassPatch.py +11 -6
- pulumi_kubernetes/networking/v1beta1/IngressList.py +11 -6
- pulumi_kubernetes/networking/v1beta1/IngressPatch.py +11 -6
- pulumi_kubernetes/networking/v1beta1/ServiceCIDR.py +226 -0
- pulumi_kubernetes/networking/v1beta1/ServiceCIDRList.py +215 -0
- pulumi_kubernetes/networking/v1beta1/ServiceCIDRPatch.py +238 -0
- pulumi_kubernetes/networking/v1beta1/__init__.py +6 -0
- pulumi_kubernetes/networking/v1beta1/_inputs.py +984 -11
- pulumi_kubernetes/networking/v1beta1/outputs.py +466 -0
- pulumi_kubernetes/node/v1/RuntimeClass.py +14 -9
- pulumi_kubernetes/node/v1/RuntimeClassList.py +11 -6
- pulumi_kubernetes/node/v1/RuntimeClassPatch.py +14 -9
- pulumi_kubernetes/node/v1/_inputs.py +101 -0
- pulumi_kubernetes/node/v1/outputs.py +5 -0
- pulumi_kubernetes/node/v1alpha1/RuntimeClass.py +11 -6
- pulumi_kubernetes/node/v1alpha1/RuntimeClassList.py +11 -6
- pulumi_kubernetes/node/v1alpha1/RuntimeClassPatch.py +11 -6
- pulumi_kubernetes/node/v1alpha1/_inputs.py +134 -0
- pulumi_kubernetes/node/v1alpha1/outputs.py +5 -0
- pulumi_kubernetes/node/v1beta1/RuntimeClass.py +14 -9
- pulumi_kubernetes/node/v1beta1/RuntimeClassList.py +11 -6
- pulumi_kubernetes/node/v1beta1/RuntimeClassPatch.py +14 -9
- pulumi_kubernetes/node/v1beta1/_inputs.py +100 -0
- pulumi_kubernetes/node/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/policy/v1/PodDisruptionBudget.py +11 -6
- pulumi_kubernetes/policy/v1/PodDisruptionBudgetList.py +11 -6
- pulumi_kubernetes/policy/v1/PodDisruptionBudgetPatch.py +11 -6
- pulumi_kubernetes/policy/v1/_inputs.py +151 -0
- pulumi_kubernetes/policy/v1/outputs.py +5 -0
- pulumi_kubernetes/policy/v1beta1/PodDisruptionBudget.py +10 -5
- pulumi_kubernetes/policy/v1beta1/PodDisruptionBudgetList.py +9 -4
- pulumi_kubernetes/policy/v1beta1/PodDisruptionBudgetPatch.py +10 -5
- pulumi_kubernetes/policy/v1beta1/PodSecurityPolicy.py +11 -6
- pulumi_kubernetes/policy/v1beta1/PodSecurityPolicyList.py +11 -6
- pulumi_kubernetes/policy/v1beta1/PodSecurityPolicyPatch.py +11 -6
- pulumi_kubernetes/policy/v1beta1/_inputs.py +713 -0
- pulumi_kubernetes/policy/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/provider.py +82 -6
- pulumi_kubernetes/pulumi-plugin.json +2 -1
- pulumi_kubernetes/rbac/v1/ClusterRole.py +14 -9
- pulumi_kubernetes/rbac/v1/ClusterRoleBinding.py +14 -9
- pulumi_kubernetes/rbac/v1/ClusterRoleBindingList.py +11 -6
- pulumi_kubernetes/rbac/v1/ClusterRoleBindingPatch.py +14 -9
- pulumi_kubernetes/rbac/v1/ClusterRoleList.py +11 -6
- pulumi_kubernetes/rbac/v1/ClusterRolePatch.py +14 -9
- pulumi_kubernetes/rbac/v1/Role.py +11 -6
- pulumi_kubernetes/rbac/v1/RoleBinding.py +14 -9
- pulumi_kubernetes/rbac/v1/RoleBindingList.py +11 -6
- pulumi_kubernetes/rbac/v1/RoleBindingPatch.py +14 -9
- pulumi_kubernetes/rbac/v1/RoleList.py +11 -6
- pulumi_kubernetes/rbac/v1/RolePatch.py +11 -6
- pulumi_kubernetes/rbac/v1/_inputs.py +295 -0
- pulumi_kubernetes/rbac/v1/outputs.py +5 -0
- pulumi_kubernetes/rbac/v1alpha1/ClusterRole.py +14 -9
- pulumi_kubernetes/rbac/v1alpha1/ClusterRoleBinding.py +14 -9
- pulumi_kubernetes/rbac/v1alpha1/ClusterRoleBindingList.py +11 -6
- pulumi_kubernetes/rbac/v1alpha1/ClusterRoleBindingPatch.py +14 -9
- pulumi_kubernetes/rbac/v1alpha1/ClusterRoleList.py +11 -6
- pulumi_kubernetes/rbac/v1alpha1/ClusterRolePatch.py +14 -9
- pulumi_kubernetes/rbac/v1alpha1/Role.py +11 -6
- pulumi_kubernetes/rbac/v1alpha1/RoleBinding.py +14 -9
- pulumi_kubernetes/rbac/v1alpha1/RoleBindingList.py +11 -6
- pulumi_kubernetes/rbac/v1alpha1/RoleBindingPatch.py +14 -9
- pulumi_kubernetes/rbac/v1alpha1/RoleList.py +11 -6
- pulumi_kubernetes/rbac/v1alpha1/RolePatch.py +11 -6
- pulumi_kubernetes/rbac/v1alpha1/_inputs.py +295 -0
- pulumi_kubernetes/rbac/v1alpha1/outputs.py +5 -0
- pulumi_kubernetes/rbac/v1beta1/ClusterRole.py +14 -9
- pulumi_kubernetes/rbac/v1beta1/ClusterRoleBinding.py +14 -9
- pulumi_kubernetes/rbac/v1beta1/ClusterRoleBindingList.py +11 -6
- pulumi_kubernetes/rbac/v1beta1/ClusterRoleBindingPatch.py +14 -9
- pulumi_kubernetes/rbac/v1beta1/ClusterRoleList.py +11 -6
- pulumi_kubernetes/rbac/v1beta1/ClusterRolePatch.py +14 -9
- pulumi_kubernetes/rbac/v1beta1/Role.py +11 -6
- pulumi_kubernetes/rbac/v1beta1/RoleBinding.py +14 -9
- pulumi_kubernetes/rbac/v1beta1/RoleBindingList.py +11 -6
- pulumi_kubernetes/rbac/v1beta1/RoleBindingPatch.py +14 -9
- pulumi_kubernetes/rbac/v1beta1/RoleList.py +11 -6
- pulumi_kubernetes/rbac/v1beta1/RolePatch.py +11 -6
- pulumi_kubernetes/rbac/v1beta1/_inputs.py +295 -0
- pulumi_kubernetes/rbac/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/resource/__init__.py +6 -0
- pulumi_kubernetes/resource/v1alpha1/PodScheduling.py +11 -6
- pulumi_kubernetes/resource/v1alpha1/PodSchedulingList.py +11 -6
- pulumi_kubernetes/resource/v1alpha1/PodSchedulingPatch.py +11 -6
- pulumi_kubernetes/resource/v1alpha1/ResourceClaim.py +12 -7
- pulumi_kubernetes/resource/v1alpha1/ResourceClaimList.py +11 -6
- pulumi_kubernetes/resource/v1alpha1/ResourceClaimPatch.py +12 -7
- pulumi_kubernetes/resource/v1alpha1/ResourceClaimTemplate.py +12 -7
- pulumi_kubernetes/resource/v1alpha1/ResourceClaimTemplateList.py +11 -6
- pulumi_kubernetes/resource/v1alpha1/ResourceClaimTemplatePatch.py +12 -7
- pulumi_kubernetes/resource/v1alpha1/ResourceClass.py +14 -9
- pulumi_kubernetes/resource/v1alpha1/ResourceClassList.py +11 -6
- pulumi_kubernetes/resource/v1alpha1/ResourceClassPatch.py +14 -9
- pulumi_kubernetes/resource/v1alpha1/_inputs.py +458 -0
- pulumi_kubernetes/resource/v1alpha1/outputs.py +5 -0
- pulumi_kubernetes/resource/v1alpha2/PodSchedulingContext.py +13 -6
- pulumi_kubernetes/resource/v1alpha2/PodSchedulingContextList.py +11 -6
- pulumi_kubernetes/resource/v1alpha2/PodSchedulingContextPatch.py +13 -6
- pulumi_kubernetes/resource/v1alpha2/ResourceClaim.py +12 -7
- pulumi_kubernetes/resource/v1alpha2/ResourceClaimList.py +11 -6
- pulumi_kubernetes/resource/v1alpha2/ResourceClaimParameters.py +280 -0
- pulumi_kubernetes/resource/v1alpha2/ResourceClaimParametersList.py +215 -0
- pulumi_kubernetes/resource/v1alpha2/ResourceClaimParametersPatch.py +292 -0
- pulumi_kubernetes/resource/v1alpha2/ResourceClaimPatch.py +12 -7
- pulumi_kubernetes/resource/v1alpha2/ResourceClaimTemplate.py +12 -7
- pulumi_kubernetes/resource/v1alpha2/ResourceClaimTemplateList.py +11 -6
- pulumi_kubernetes/resource/v1alpha2/ResourceClaimTemplatePatch.py +12 -7
- pulumi_kubernetes/resource/v1alpha2/ResourceClass.py +43 -9
- pulumi_kubernetes/resource/v1alpha2/ResourceClassList.py +11 -6
- pulumi_kubernetes/resource/v1alpha2/ResourceClassParameters.py +272 -0
- pulumi_kubernetes/resource/v1alpha2/ResourceClassParametersList.py +215 -0
- pulumi_kubernetes/resource/v1alpha2/ResourceClassParametersPatch.py +284 -0
- pulumi_kubernetes/resource/v1alpha2/ResourceClassPatch.py +43 -9
- pulumi_kubernetes/resource/v1alpha2/ResourceSlice.py +283 -0
- pulumi_kubernetes/resource/v1alpha2/ResourceSliceList.py +215 -0
- pulumi_kubernetes/resource/v1alpha2/ResourceSlicePatch.py +294 -0
- pulumi_kubernetes/resource/v1alpha2/__init__.py +9 -0
- pulumi_kubernetes/resource/v1alpha2/_inputs.py +3177 -634
- pulumi_kubernetes/resource/v1alpha2/outputs.py +2628 -880
- pulumi_kubernetes/resource/v1alpha3/DeviceClass.py +238 -0
- pulumi_kubernetes/resource/v1alpha3/DeviceClassList.py +216 -0
- pulumi_kubernetes/resource/v1alpha3/DeviceClassPatch.py +249 -0
- pulumi_kubernetes/resource/v1alpha3/PodSchedulingContext.py +231 -0
- pulumi_kubernetes/resource/v1alpha3/PodSchedulingContextList.py +215 -0
- pulumi_kubernetes/resource/v1alpha3/PodSchedulingContextPatch.py +242 -0
- pulumi_kubernetes/resource/v1alpha3/ResourceClaim.py +232 -0
- pulumi_kubernetes/resource/v1alpha3/ResourceClaimList.py +216 -0
- pulumi_kubernetes/resource/v1alpha3/ResourceClaimPatch.py +243 -0
- pulumi_kubernetes/resource/v1alpha3/ResourceClaimTemplate.py +229 -0
- pulumi_kubernetes/resource/v1alpha3/ResourceClaimTemplateList.py +215 -0
- pulumi_kubernetes/resource/v1alpha3/ResourceClaimTemplatePatch.py +240 -0
- pulumi_kubernetes/resource/v1alpha3/ResourceSlice.py +246 -0
- pulumi_kubernetes/resource/v1alpha3/ResourceSliceList.py +245 -0
- pulumi_kubernetes/resource/v1alpha3/ResourceSlicePatch.py +257 -0
- pulumi_kubernetes/resource/v1alpha3/__init__.py +24 -0
- pulumi_kubernetes/resource/v1alpha3/_inputs.py +4372 -0
- pulumi_kubernetes/resource/v1alpha3/outputs.py +3914 -0
- pulumi_kubernetes/resource/v1beta1/DeviceClass.py +237 -0
- pulumi_kubernetes/resource/v1beta1/DeviceClassList.py +215 -0
- pulumi_kubernetes/resource/v1beta1/DeviceClassPatch.py +248 -0
- pulumi_kubernetes/resource/v1beta1/ResourceClaim.py +232 -0
- pulumi_kubernetes/resource/v1beta1/ResourceClaimList.py +216 -0
- pulumi_kubernetes/resource/v1beta1/ResourceClaimPatch.py +243 -0
- pulumi_kubernetes/resource/v1beta1/ResourceClaimTemplate.py +229 -0
- pulumi_kubernetes/resource/v1beta1/ResourceClaimTemplateList.py +215 -0
- pulumi_kubernetes/resource/v1beta1/ResourceClaimTemplatePatch.py +240 -0
- pulumi_kubernetes/resource/v1beta1/ResourceSlice.py +246 -0
- pulumi_kubernetes/resource/v1beta1/ResourceSliceList.py +216 -0
- pulumi_kubernetes/resource/v1beta1/ResourceSlicePatch.py +257 -0
- pulumi_kubernetes/resource/v1beta1/__init__.py +21 -0
- pulumi_kubernetes/resource/v1beta1/_inputs.py +3867 -0
- pulumi_kubernetes/resource/v1beta1/outputs.py +3334 -0
- pulumi_kubernetes/scheduling/v1/PriorityClass.py +8 -3
- pulumi_kubernetes/scheduling/v1/PriorityClassList.py +11 -6
- pulumi_kubernetes/scheduling/v1/PriorityClassPatch.py +8 -3
- pulumi_kubernetes/scheduling/v1/_inputs.py +44 -0
- pulumi_kubernetes/scheduling/v1/outputs.py +5 -0
- pulumi_kubernetes/scheduling/v1alpha1/PriorityClass.py +8 -3
- pulumi_kubernetes/scheduling/v1alpha1/PriorityClassList.py +11 -6
- pulumi_kubernetes/scheduling/v1alpha1/PriorityClassPatch.py +8 -3
- pulumi_kubernetes/scheduling/v1alpha1/_inputs.py +44 -0
- pulumi_kubernetes/scheduling/v1alpha1/outputs.py +5 -0
- pulumi_kubernetes/scheduling/v1beta1/PriorityClass.py +8 -3
- pulumi_kubernetes/scheduling/v1beta1/PriorityClassList.py +11 -6
- pulumi_kubernetes/scheduling/v1beta1/PriorityClassPatch.py +8 -3
- pulumi_kubernetes/scheduling/v1beta1/_inputs.py +44 -0
- pulumi_kubernetes/scheduling/v1beta1/outputs.py +5 -0
- pulumi_kubernetes/settings/v1alpha1/PodPreset.py +9 -4
- pulumi_kubernetes/settings/v1alpha1/PodPresetList.py +11 -6
- pulumi_kubernetes/settings/v1alpha1/PodPresetPatch.py +9 -4
- pulumi_kubernetes/settings/v1alpha1/_inputs.py +84 -0
- pulumi_kubernetes/settings/v1alpha1/outputs.py +5 -0
- pulumi_kubernetes/storage/v1/CSIDriver.py +11 -6
- pulumi_kubernetes/storage/v1/CSIDriverList.py +11 -6
- pulumi_kubernetes/storage/v1/CSIDriverPatch.py +11 -6
- pulumi_kubernetes/storage/v1/CSINode.py +11 -6
- pulumi_kubernetes/storage/v1/CSINodeList.py +11 -6
- pulumi_kubernetes/storage/v1/CSINodePatch.py +11 -6
- pulumi_kubernetes/storage/v1/CSIStorageCapacity.py +11 -6
- pulumi_kubernetes/storage/v1/CSIStorageCapacityList.py +11 -6
- pulumi_kubernetes/storage/v1/CSIStorageCapacityPatch.py +11 -6
- pulumi_kubernetes/storage/v1/StorageClass.py +11 -6
- pulumi_kubernetes/storage/v1/StorageClassList.py +11 -6
- pulumi_kubernetes/storage/v1/StorageClassPatch.py +11 -6
- pulumi_kubernetes/storage/v1/VolumeAttachment.py +11 -6
- pulumi_kubernetes/storage/v1/VolumeAttachmentList.py +11 -6
- pulumi_kubernetes/storage/v1/VolumeAttachmentPatch.py +11 -6
- pulumi_kubernetes/storage/v1/_inputs.py +624 -10
- pulumi_kubernetes/storage/v1/outputs.py +17 -12
- pulumi_kubernetes/storage/v1alpha1/VolumeAttachment.py +11 -6
- pulumi_kubernetes/storage/v1alpha1/VolumeAttachmentList.py +11 -6
- pulumi_kubernetes/storage/v1alpha1/VolumeAttachmentPatch.py +11 -6
- pulumi_kubernetes/storage/v1alpha1/VolumeAttributesClass.py +10 -3
- pulumi_kubernetes/storage/v1alpha1/VolumeAttributesClassList.py +11 -6
- pulumi_kubernetes/storage/v1alpha1/VolumeAttributesClassPatch.py +10 -3
- pulumi_kubernetes/storage/v1alpha1/_inputs.py +187 -0
- pulumi_kubernetes/storage/v1alpha1/outputs.py +5 -0
- pulumi_kubernetes/storage/v1beta1/CSIDriver.py +11 -6
- pulumi_kubernetes/storage/v1beta1/CSIDriverList.py +11 -6
- pulumi_kubernetes/storage/v1beta1/CSIDriverPatch.py +11 -6
- pulumi_kubernetes/storage/v1beta1/CSINode.py +11 -6
- pulumi_kubernetes/storage/v1beta1/CSINodeList.py +11 -6
- pulumi_kubernetes/storage/v1beta1/CSINodePatch.py +11 -6
- pulumi_kubernetes/storage/v1beta1/CSIStorageCapacity.py +11 -6
- pulumi_kubernetes/storage/v1beta1/CSIStorageCapacityList.py +11 -6
- pulumi_kubernetes/storage/v1beta1/CSIStorageCapacityPatch.py +11 -6
- pulumi_kubernetes/storage/v1beta1/StorageClass.py +11 -6
- pulumi_kubernetes/storage/v1beta1/StorageClassList.py +11 -6
- pulumi_kubernetes/storage/v1beta1/StorageClassPatch.py +11 -6
- pulumi_kubernetes/storage/v1beta1/VolumeAttachment.py +11 -6
- pulumi_kubernetes/storage/v1beta1/VolumeAttachmentList.py +11 -6
- pulumi_kubernetes/storage/v1beta1/VolumeAttachmentPatch.py +11 -6
- pulumi_kubernetes/storage/v1beta1/VolumeAttributesClass.py +252 -0
- pulumi_kubernetes/storage/v1beta1/VolumeAttributesClassList.py +215 -0
- pulumi_kubernetes/storage/v1beta1/VolumeAttributesClassPatch.py +263 -0
- pulumi_kubernetes/storage/v1beta1/__init__.py +3 -0
- pulumi_kubernetes/storage/v1beta1/_inputs.py +689 -0
- pulumi_kubernetes/storage/v1beta1/outputs.py +99 -0
- pulumi_kubernetes/storagemigration/__init__.py +14 -0
- pulumi_kubernetes/storagemigration/v1alpha1/StorageVersionMigration.py +224 -0
- pulumi_kubernetes/storagemigration/v1alpha1/StorageVersionMigrationList.py +215 -0
- pulumi_kubernetes/storagemigration/v1alpha1/StorageVersionMigrationPatch.py +236 -0
- pulumi_kubernetes/storagemigration/v1alpha1/__init__.py +12 -0
- pulumi_kubernetes/storagemigration/v1alpha1/_inputs.py +585 -0
- pulumi_kubernetes/storagemigration/v1alpha1/outputs.py +593 -0
- pulumi_kubernetes/yaml/v2/ConfigFile.py +81 -4
- pulumi_kubernetes/yaml/v2/ConfigGroup.py +123 -42
- pulumi_kubernetes/yaml/yaml.py +264 -0
- {pulumi_kubernetes-4.10.0a1710288589.dist-info → pulumi_kubernetes-4.20.0a1736823142.dist-info}/METADATA +8 -7
- pulumi_kubernetes-4.20.0a1736823142.dist-info/RECORD +679 -0
- {pulumi_kubernetes-4.10.0a1710288589.dist-info → pulumi_kubernetes-4.20.0a1736823142.dist-info}/WHEEL +1 -1
- pulumi_kubernetes-4.10.0a1710288589.dist-info/RECORD +0 -592
- {pulumi_kubernetes-4.10.0a1710288589.dist-info → pulumi_kubernetes-4.20.0a1736823142.dist-info}/top_level.txt +0 -0
|
@@ -4,30 +4,305 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from ... import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
from ... import meta as _meta
|
|
13
18
|
|
|
14
19
|
__all__ = [
|
|
20
|
+
'AuditAnnotation',
|
|
21
|
+
'AuditAnnotationPatch',
|
|
22
|
+
'ExpressionWarning',
|
|
23
|
+
'ExpressionWarningPatch',
|
|
15
24
|
'MatchCondition',
|
|
16
25
|
'MatchConditionPatch',
|
|
26
|
+
'MatchResources',
|
|
27
|
+
'MatchResourcesPatch',
|
|
17
28
|
'MutatingWebhook',
|
|
18
29
|
'MutatingWebhookConfiguration',
|
|
19
30
|
'MutatingWebhookPatch',
|
|
31
|
+
'NamedRuleWithOperations',
|
|
32
|
+
'NamedRuleWithOperationsPatch',
|
|
33
|
+
'ParamKind',
|
|
34
|
+
'ParamKindPatch',
|
|
35
|
+
'ParamRef',
|
|
36
|
+
'ParamRefPatch',
|
|
20
37
|
'RuleWithOperations',
|
|
21
38
|
'RuleWithOperationsPatch',
|
|
22
39
|
'ServiceReference',
|
|
23
40
|
'ServiceReferencePatch',
|
|
41
|
+
'TypeChecking',
|
|
42
|
+
'TypeCheckingPatch',
|
|
43
|
+
'ValidatingAdmissionPolicy',
|
|
44
|
+
'ValidatingAdmissionPolicyBinding',
|
|
45
|
+
'ValidatingAdmissionPolicyBindingSpec',
|
|
46
|
+
'ValidatingAdmissionPolicyBindingSpecPatch',
|
|
47
|
+
'ValidatingAdmissionPolicySpec',
|
|
48
|
+
'ValidatingAdmissionPolicySpecPatch',
|
|
49
|
+
'ValidatingAdmissionPolicyStatus',
|
|
50
|
+
'ValidatingAdmissionPolicyStatusPatch',
|
|
24
51
|
'ValidatingWebhook',
|
|
25
52
|
'ValidatingWebhookConfiguration',
|
|
26
53
|
'ValidatingWebhookPatch',
|
|
54
|
+
'Validation',
|
|
55
|
+
'ValidationPatch',
|
|
56
|
+
'Variable',
|
|
57
|
+
'VariablePatch',
|
|
27
58
|
'WebhookClientConfig',
|
|
28
59
|
'WebhookClientConfigPatch',
|
|
29
60
|
]
|
|
30
61
|
|
|
62
|
+
@pulumi.output_type
|
|
63
|
+
class AuditAnnotation(dict):
|
|
64
|
+
"""
|
|
65
|
+
AuditAnnotation describes how to produce an audit annotation for an API request.
|
|
66
|
+
"""
|
|
67
|
+
@staticmethod
|
|
68
|
+
def __key_warning(key: str):
|
|
69
|
+
suggest = None
|
|
70
|
+
if key == "valueExpression":
|
|
71
|
+
suggest = "value_expression"
|
|
72
|
+
|
|
73
|
+
if suggest:
|
|
74
|
+
pulumi.log.warn(f"Key '{key}' not found in AuditAnnotation. Access the value via the '{suggest}' property getter instead.")
|
|
75
|
+
|
|
76
|
+
def __getitem__(self, key: str) -> Any:
|
|
77
|
+
AuditAnnotation.__key_warning(key)
|
|
78
|
+
return super().__getitem__(key)
|
|
79
|
+
|
|
80
|
+
def get(self, key: str, default = None) -> Any:
|
|
81
|
+
AuditAnnotation.__key_warning(key)
|
|
82
|
+
return super().get(key, default)
|
|
83
|
+
|
|
84
|
+
def __init__(__self__, *,
|
|
85
|
+
key: str,
|
|
86
|
+
value_expression: str):
|
|
87
|
+
"""
|
|
88
|
+
AuditAnnotation describes how to produce an audit annotation for an API request.
|
|
89
|
+
:param str key: key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.
|
|
90
|
+
|
|
91
|
+
The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: "{ValidatingAdmissionPolicy name}/{key}".
|
|
92
|
+
|
|
93
|
+
If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.
|
|
94
|
+
|
|
95
|
+
Required.
|
|
96
|
+
:param str value_expression: valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.
|
|
97
|
+
|
|
98
|
+
If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.
|
|
99
|
+
|
|
100
|
+
Required.
|
|
101
|
+
"""
|
|
102
|
+
pulumi.set(__self__, "key", key)
|
|
103
|
+
pulumi.set(__self__, "value_expression", value_expression)
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
@pulumi.getter
|
|
107
|
+
def key(self) -> str:
|
|
108
|
+
"""
|
|
109
|
+
key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.
|
|
110
|
+
|
|
111
|
+
The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: "{ValidatingAdmissionPolicy name}/{key}".
|
|
112
|
+
|
|
113
|
+
If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.
|
|
114
|
+
|
|
115
|
+
Required.
|
|
116
|
+
"""
|
|
117
|
+
return pulumi.get(self, "key")
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
@pulumi.getter(name="valueExpression")
|
|
121
|
+
def value_expression(self) -> str:
|
|
122
|
+
"""
|
|
123
|
+
valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.
|
|
124
|
+
|
|
125
|
+
If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.
|
|
126
|
+
|
|
127
|
+
Required.
|
|
128
|
+
"""
|
|
129
|
+
return pulumi.get(self, "value_expression")
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
@pulumi.output_type
|
|
133
|
+
class AuditAnnotationPatch(dict):
|
|
134
|
+
"""
|
|
135
|
+
AuditAnnotation describes how to produce an audit annotation for an API request.
|
|
136
|
+
"""
|
|
137
|
+
@staticmethod
|
|
138
|
+
def __key_warning(key: str):
|
|
139
|
+
suggest = None
|
|
140
|
+
if key == "valueExpression":
|
|
141
|
+
suggest = "value_expression"
|
|
142
|
+
|
|
143
|
+
if suggest:
|
|
144
|
+
pulumi.log.warn(f"Key '{key}' not found in AuditAnnotationPatch. Access the value via the '{suggest}' property getter instead.")
|
|
145
|
+
|
|
146
|
+
def __getitem__(self, key: str) -> Any:
|
|
147
|
+
AuditAnnotationPatch.__key_warning(key)
|
|
148
|
+
return super().__getitem__(key)
|
|
149
|
+
|
|
150
|
+
def get(self, key: str, default = None) -> Any:
|
|
151
|
+
AuditAnnotationPatch.__key_warning(key)
|
|
152
|
+
return super().get(key, default)
|
|
153
|
+
|
|
154
|
+
def __init__(__self__, *,
|
|
155
|
+
key: Optional[str] = None,
|
|
156
|
+
value_expression: Optional[str] = None):
|
|
157
|
+
"""
|
|
158
|
+
AuditAnnotation describes how to produce an audit annotation for an API request.
|
|
159
|
+
:param str key: key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.
|
|
160
|
+
|
|
161
|
+
The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: "{ValidatingAdmissionPolicy name}/{key}".
|
|
162
|
+
|
|
163
|
+
If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.
|
|
164
|
+
|
|
165
|
+
Required.
|
|
166
|
+
:param str value_expression: valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.
|
|
167
|
+
|
|
168
|
+
If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.
|
|
169
|
+
|
|
170
|
+
Required.
|
|
171
|
+
"""
|
|
172
|
+
if key is not None:
|
|
173
|
+
pulumi.set(__self__, "key", key)
|
|
174
|
+
if value_expression is not None:
|
|
175
|
+
pulumi.set(__self__, "value_expression", value_expression)
|
|
176
|
+
|
|
177
|
+
@property
|
|
178
|
+
@pulumi.getter
|
|
179
|
+
def key(self) -> Optional[str]:
|
|
180
|
+
"""
|
|
181
|
+
key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.
|
|
182
|
+
|
|
183
|
+
The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: "{ValidatingAdmissionPolicy name}/{key}".
|
|
184
|
+
|
|
185
|
+
If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.
|
|
186
|
+
|
|
187
|
+
Required.
|
|
188
|
+
"""
|
|
189
|
+
return pulumi.get(self, "key")
|
|
190
|
+
|
|
191
|
+
@property
|
|
192
|
+
@pulumi.getter(name="valueExpression")
|
|
193
|
+
def value_expression(self) -> Optional[str]:
|
|
194
|
+
"""
|
|
195
|
+
valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.
|
|
196
|
+
|
|
197
|
+
If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.
|
|
198
|
+
|
|
199
|
+
Required.
|
|
200
|
+
"""
|
|
201
|
+
return pulumi.get(self, "value_expression")
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
@pulumi.output_type
|
|
205
|
+
class ExpressionWarning(dict):
|
|
206
|
+
"""
|
|
207
|
+
ExpressionWarning is a warning information that targets a specific expression.
|
|
208
|
+
"""
|
|
209
|
+
@staticmethod
|
|
210
|
+
def __key_warning(key: str):
|
|
211
|
+
suggest = None
|
|
212
|
+
if key == "fieldRef":
|
|
213
|
+
suggest = "field_ref"
|
|
214
|
+
|
|
215
|
+
if suggest:
|
|
216
|
+
pulumi.log.warn(f"Key '{key}' not found in ExpressionWarning. Access the value via the '{suggest}' property getter instead.")
|
|
217
|
+
|
|
218
|
+
def __getitem__(self, key: str) -> Any:
|
|
219
|
+
ExpressionWarning.__key_warning(key)
|
|
220
|
+
return super().__getitem__(key)
|
|
221
|
+
|
|
222
|
+
def get(self, key: str, default = None) -> Any:
|
|
223
|
+
ExpressionWarning.__key_warning(key)
|
|
224
|
+
return super().get(key, default)
|
|
225
|
+
|
|
226
|
+
def __init__(__self__, *,
|
|
227
|
+
field_ref: str,
|
|
228
|
+
warning: str):
|
|
229
|
+
"""
|
|
230
|
+
ExpressionWarning is a warning information that targets a specific expression.
|
|
231
|
+
:param str field_ref: The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is "spec.validations[0].expression"
|
|
232
|
+
:param str warning: The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.
|
|
233
|
+
"""
|
|
234
|
+
pulumi.set(__self__, "field_ref", field_ref)
|
|
235
|
+
pulumi.set(__self__, "warning", warning)
|
|
236
|
+
|
|
237
|
+
@property
|
|
238
|
+
@pulumi.getter(name="fieldRef")
|
|
239
|
+
def field_ref(self) -> str:
|
|
240
|
+
"""
|
|
241
|
+
The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is "spec.validations[0].expression"
|
|
242
|
+
"""
|
|
243
|
+
return pulumi.get(self, "field_ref")
|
|
244
|
+
|
|
245
|
+
@property
|
|
246
|
+
@pulumi.getter
|
|
247
|
+
def warning(self) -> str:
|
|
248
|
+
"""
|
|
249
|
+
The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.
|
|
250
|
+
"""
|
|
251
|
+
return pulumi.get(self, "warning")
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
@pulumi.output_type
|
|
255
|
+
class ExpressionWarningPatch(dict):
|
|
256
|
+
"""
|
|
257
|
+
ExpressionWarning is a warning information that targets a specific expression.
|
|
258
|
+
"""
|
|
259
|
+
@staticmethod
|
|
260
|
+
def __key_warning(key: str):
|
|
261
|
+
suggest = None
|
|
262
|
+
if key == "fieldRef":
|
|
263
|
+
suggest = "field_ref"
|
|
264
|
+
|
|
265
|
+
if suggest:
|
|
266
|
+
pulumi.log.warn(f"Key '{key}' not found in ExpressionWarningPatch. Access the value via the '{suggest}' property getter instead.")
|
|
267
|
+
|
|
268
|
+
def __getitem__(self, key: str) -> Any:
|
|
269
|
+
ExpressionWarningPatch.__key_warning(key)
|
|
270
|
+
return super().__getitem__(key)
|
|
271
|
+
|
|
272
|
+
def get(self, key: str, default = None) -> Any:
|
|
273
|
+
ExpressionWarningPatch.__key_warning(key)
|
|
274
|
+
return super().get(key, default)
|
|
275
|
+
|
|
276
|
+
def __init__(__self__, *,
|
|
277
|
+
field_ref: Optional[str] = None,
|
|
278
|
+
warning: Optional[str] = None):
|
|
279
|
+
"""
|
|
280
|
+
ExpressionWarning is a warning information that targets a specific expression.
|
|
281
|
+
:param str field_ref: The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is "spec.validations[0].expression"
|
|
282
|
+
:param str warning: The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.
|
|
283
|
+
"""
|
|
284
|
+
if field_ref is not None:
|
|
285
|
+
pulumi.set(__self__, "field_ref", field_ref)
|
|
286
|
+
if warning is not None:
|
|
287
|
+
pulumi.set(__self__, "warning", warning)
|
|
288
|
+
|
|
289
|
+
@property
|
|
290
|
+
@pulumi.getter(name="fieldRef")
|
|
291
|
+
def field_ref(self) -> Optional[str]:
|
|
292
|
+
"""
|
|
293
|
+
The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is "spec.validations[0].expression"
|
|
294
|
+
"""
|
|
295
|
+
return pulumi.get(self, "field_ref")
|
|
296
|
+
|
|
297
|
+
@property
|
|
298
|
+
@pulumi.getter
|
|
299
|
+
def warning(self) -> Optional[str]:
|
|
300
|
+
"""
|
|
301
|
+
The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.
|
|
302
|
+
"""
|
|
303
|
+
return pulumi.get(self, "warning")
|
|
304
|
+
|
|
305
|
+
|
|
31
306
|
@pulumi.output_type
|
|
32
307
|
class MatchCondition(dict):
|
|
33
308
|
"""
|
|
@@ -137,83 +412,52 @@ class MatchConditionPatch(dict):
|
|
|
137
412
|
|
|
138
413
|
|
|
139
414
|
@pulumi.output_type
|
|
140
|
-
class
|
|
415
|
+
class MatchResources(dict):
|
|
141
416
|
"""
|
|
142
|
-
|
|
417
|
+
MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
|
143
418
|
"""
|
|
144
419
|
@staticmethod
|
|
145
420
|
def __key_warning(key: str):
|
|
146
421
|
suggest = None
|
|
147
|
-
if key == "
|
|
148
|
-
suggest = "
|
|
149
|
-
elif key == "clientConfig":
|
|
150
|
-
suggest = "client_config"
|
|
151
|
-
elif key == "sideEffects":
|
|
152
|
-
suggest = "side_effects"
|
|
153
|
-
elif key == "failurePolicy":
|
|
154
|
-
suggest = "failure_policy"
|
|
155
|
-
elif key == "matchConditions":
|
|
156
|
-
suggest = "match_conditions"
|
|
422
|
+
if key == "excludeResourceRules":
|
|
423
|
+
suggest = "exclude_resource_rules"
|
|
157
424
|
elif key == "matchPolicy":
|
|
158
425
|
suggest = "match_policy"
|
|
159
426
|
elif key == "namespaceSelector":
|
|
160
427
|
suggest = "namespace_selector"
|
|
161
428
|
elif key == "objectSelector":
|
|
162
429
|
suggest = "object_selector"
|
|
163
|
-
elif key == "
|
|
164
|
-
suggest = "
|
|
165
|
-
elif key == "timeoutSeconds":
|
|
166
|
-
suggest = "timeout_seconds"
|
|
430
|
+
elif key == "resourceRules":
|
|
431
|
+
suggest = "resource_rules"
|
|
167
432
|
|
|
168
433
|
if suggest:
|
|
169
|
-
pulumi.log.warn(f"Key '{key}' not found in
|
|
434
|
+
pulumi.log.warn(f"Key '{key}' not found in MatchResources. Access the value via the '{suggest}' property getter instead.")
|
|
170
435
|
|
|
171
436
|
def __getitem__(self, key: str) -> Any:
|
|
172
|
-
|
|
437
|
+
MatchResources.__key_warning(key)
|
|
173
438
|
return super().__getitem__(key)
|
|
174
439
|
|
|
175
440
|
def get(self, key: str, default = None) -> Any:
|
|
176
|
-
|
|
441
|
+
MatchResources.__key_warning(key)
|
|
177
442
|
return super().get(key, default)
|
|
178
443
|
|
|
179
444
|
def __init__(__self__, *,
|
|
180
|
-
|
|
181
|
-
client_config: 'outputs.WebhookClientConfig',
|
|
182
|
-
name: str,
|
|
183
|
-
side_effects: str,
|
|
184
|
-
failure_policy: Optional[str] = None,
|
|
185
|
-
match_conditions: Optional[Sequence['outputs.MatchCondition']] = None,
|
|
445
|
+
exclude_resource_rules: Optional[Sequence['outputs.NamedRuleWithOperations']] = None,
|
|
186
446
|
match_policy: Optional[str] = None,
|
|
187
447
|
namespace_selector: Optional['_meta.v1.outputs.LabelSelector'] = None,
|
|
188
448
|
object_selector: Optional['_meta.v1.outputs.LabelSelector'] = None,
|
|
189
|
-
|
|
190
|
-
rules: Optional[Sequence['outputs.RuleWithOperations']] = None,
|
|
191
|
-
timeout_seconds: Optional[int] = None):
|
|
449
|
+
resource_rules: Optional[Sequence['outputs.NamedRuleWithOperations']] = None):
|
|
192
450
|
"""
|
|
193
|
-
|
|
194
|
-
:param Sequence[
|
|
195
|
-
:param
|
|
196
|
-
:param str name: 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.
|
|
197
|
-
:param str side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
|
|
198
|
-
:param str failure_policy: FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
|
|
199
|
-
:param Sequence['MatchConditionArgs'] match_conditions: MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
|
|
200
|
-
|
|
201
|
-
The exact matching logic is (in order):
|
|
202
|
-
1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.
|
|
203
|
-
2. If ALL matchConditions evaluate to TRUE, the webhook is called.
|
|
204
|
-
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
205
|
-
- If failurePolicy=Fail, reject the request
|
|
206
|
-
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
|
207
|
-
|
|
208
|
-
This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
|
|
209
|
-
:param str match_policy: matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
|
|
451
|
+
MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
|
452
|
+
:param Sequence['NamedRuleWithOperationsArgs'] exclude_resource_rules: 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)
|
|
453
|
+
:param str match_policy: matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
|
|
210
454
|
|
|
211
|
-
- 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
|
|
455
|
+
- 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.
|
|
212
456
|
|
|
213
|
-
- 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
|
|
457
|
+
- 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.
|
|
214
458
|
|
|
215
459
|
Defaults to "Equivalent"
|
|
216
|
-
:param '_meta.v1.LabelSelectorArgs' namespace_selector: NamespaceSelector decides whether to run the
|
|
460
|
+
:param '_meta.v1.LabelSelectorArgs' namespace_selector: 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.
|
|
217
461
|
|
|
218
462
|
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": {
|
|
219
463
|
"matchExpressions": [
|
|
@@ -228,7 +472,7 @@ class MutatingWebhook(dict):
|
|
|
228
472
|
]
|
|
229
473
|
}
|
|
230
474
|
|
|
231
|
-
If instead you want to only run the
|
|
475
|
+
If 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": {
|
|
232
476
|
"matchExpressions": [
|
|
233
477
|
{
|
|
234
478
|
"key": "environment",
|
|
@@ -244,114 +488,47 @@ class MutatingWebhook(dict):
|
|
|
244
488
|
See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
|
|
245
489
|
|
|
246
490
|
Default to the empty LabelSelector, which matches everything.
|
|
247
|
-
:param '_meta.v1.LabelSelectorArgs' object_selector: ObjectSelector decides whether to run the
|
|
248
|
-
:param
|
|
249
|
-
|
|
250
|
-
Never: the webhook will not be called more than once in a single admission evaluation.
|
|
251
|
-
|
|
252
|
-
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.
|
|
253
|
-
|
|
254
|
-
Defaults to "Never".
|
|
255
|
-
:param Sequence['RuleWithOperationsArgs'] rules: 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.
|
|
256
|
-
:param int timeout_seconds: 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.
|
|
491
|
+
:param '_meta.v1.LabelSelectorArgs' object_selector: 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.
|
|
492
|
+
:param Sequence['NamedRuleWithOperationsArgs'] resource_rules: ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.
|
|
257
493
|
"""
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
pulumi.set(__self__, "name", name)
|
|
261
|
-
pulumi.set(__self__, "side_effects", side_effects)
|
|
262
|
-
if failure_policy is not None:
|
|
263
|
-
pulumi.set(__self__, "failure_policy", failure_policy)
|
|
264
|
-
if match_conditions is not None:
|
|
265
|
-
pulumi.set(__self__, "match_conditions", match_conditions)
|
|
494
|
+
if exclude_resource_rules is not None:
|
|
495
|
+
pulumi.set(__self__, "exclude_resource_rules", exclude_resource_rules)
|
|
266
496
|
if match_policy is not None:
|
|
267
497
|
pulumi.set(__self__, "match_policy", match_policy)
|
|
268
498
|
if namespace_selector is not None:
|
|
269
499
|
pulumi.set(__self__, "namespace_selector", namespace_selector)
|
|
270
500
|
if object_selector is not None:
|
|
271
501
|
pulumi.set(__self__, "object_selector", object_selector)
|
|
272
|
-
if
|
|
273
|
-
pulumi.set(__self__, "
|
|
274
|
-
if rules is not None:
|
|
275
|
-
pulumi.set(__self__, "rules", rules)
|
|
276
|
-
if timeout_seconds is not None:
|
|
277
|
-
pulumi.set(__self__, "timeout_seconds", timeout_seconds)
|
|
502
|
+
if resource_rules is not None:
|
|
503
|
+
pulumi.set(__self__, "resource_rules", resource_rules)
|
|
278
504
|
|
|
279
505
|
@property
|
|
280
|
-
@pulumi.getter(name="
|
|
281
|
-
def
|
|
506
|
+
@pulumi.getter(name="excludeResourceRules")
|
|
507
|
+
def exclude_resource_rules(self) -> Optional[Sequence['outputs.NamedRuleWithOperations']]:
|
|
282
508
|
"""
|
|
283
|
-
|
|
509
|
+
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)
|
|
284
510
|
"""
|
|
285
|
-
return pulumi.get(self, "
|
|
511
|
+
return pulumi.get(self, "exclude_resource_rules")
|
|
286
512
|
|
|
287
513
|
@property
|
|
288
|
-
@pulumi.getter(name="
|
|
289
|
-
def
|
|
290
|
-
"""
|
|
291
|
-
ClientConfig defines how to communicate with the hook. Required
|
|
514
|
+
@pulumi.getter(name="matchPolicy")
|
|
515
|
+
def match_policy(self) -> Optional[str]:
|
|
292
516
|
"""
|
|
293
|
-
|
|
517
|
+
matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
|
|
294
518
|
|
|
295
|
-
|
|
296
|
-
@pulumi.getter
|
|
297
|
-
def name(self) -> str:
|
|
298
|
-
"""
|
|
299
|
-
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.
|
|
300
|
-
"""
|
|
301
|
-
return pulumi.get(self, "name")
|
|
519
|
+
- 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.
|
|
302
520
|
|
|
303
|
-
|
|
304
|
-
@pulumi.getter(name="sideEffects")
|
|
305
|
-
def side_effects(self) -> str:
|
|
306
|
-
"""
|
|
307
|
-
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.
|
|
308
|
-
"""
|
|
309
|
-
return pulumi.get(self, "side_effects")
|
|
521
|
+
- 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.
|
|
310
522
|
|
|
311
|
-
|
|
312
|
-
@pulumi.getter(name="failurePolicy")
|
|
313
|
-
def failure_policy(self) -> Optional[str]:
|
|
314
|
-
"""
|
|
315
|
-
FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
|
|
523
|
+
Defaults to "Equivalent"
|
|
316
524
|
"""
|
|
317
|
-
return pulumi.get(self, "
|
|
525
|
+
return pulumi.get(self, "match_policy")
|
|
318
526
|
|
|
319
527
|
@property
|
|
320
|
-
@pulumi.getter(name="
|
|
321
|
-
def
|
|
528
|
+
@pulumi.getter(name="namespaceSelector")
|
|
529
|
+
def namespace_selector(self) -> Optional['_meta.v1.outputs.LabelSelector']:
|
|
322
530
|
"""
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
The exact matching logic is (in order):
|
|
326
|
-
1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.
|
|
327
|
-
2. If ALL matchConditions evaluate to TRUE, the webhook is called.
|
|
328
|
-
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
329
|
-
- If failurePolicy=Fail, reject the request
|
|
330
|
-
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
|
331
|
-
|
|
332
|
-
This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
|
|
333
|
-
"""
|
|
334
|
-
return pulumi.get(self, "match_conditions")
|
|
335
|
-
|
|
336
|
-
@property
|
|
337
|
-
@pulumi.getter(name="matchPolicy")
|
|
338
|
-
def match_policy(self) -> Optional[str]:
|
|
339
|
-
"""
|
|
340
|
-
matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
|
|
341
|
-
|
|
342
|
-
- 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.
|
|
343
|
-
|
|
344
|
-
- 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.
|
|
345
|
-
|
|
346
|
-
Defaults to "Equivalent"
|
|
347
|
-
"""
|
|
348
|
-
return pulumi.get(self, "match_policy")
|
|
349
|
-
|
|
350
|
-
@property
|
|
351
|
-
@pulumi.getter(name="namespaceSelector")
|
|
352
|
-
def namespace_selector(self) -> Optional['_meta.v1.outputs.LabelSelector']:
|
|
353
|
-
"""
|
|
354
|
-
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.
|
|
531
|
+
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.
|
|
355
532
|
|
|
356
533
|
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": {
|
|
357
534
|
"matchExpressions": [
|
|
@@ -366,7 +543,7 @@ class MutatingWebhook(dict):
|
|
|
366
543
|
]
|
|
367
544
|
}
|
|
368
545
|
|
|
369
|
-
If instead you want to only run the
|
|
546
|
+
If 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": {
|
|
370
547
|
"matchExpressions": [
|
|
371
548
|
{
|
|
372
549
|
"key": "environment",
|
|
@@ -389,119 +566,189 @@ class MutatingWebhook(dict):
|
|
|
389
566
|
@pulumi.getter(name="objectSelector")
|
|
390
567
|
def object_selector(self) -> Optional['_meta.v1.outputs.LabelSelector']:
|
|
391
568
|
"""
|
|
392
|
-
ObjectSelector decides whether to run the
|
|
569
|
+
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.
|
|
393
570
|
"""
|
|
394
571
|
return pulumi.get(self, "object_selector")
|
|
395
572
|
|
|
396
573
|
@property
|
|
397
|
-
@pulumi.getter(name="
|
|
398
|
-
def
|
|
399
|
-
"""
|
|
400
|
-
reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".
|
|
401
|
-
|
|
402
|
-
Never: the webhook will not be called more than once in a single admission evaluation.
|
|
403
|
-
|
|
404
|
-
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.
|
|
405
|
-
|
|
406
|
-
Defaults to "Never".
|
|
407
|
-
"""
|
|
408
|
-
return pulumi.get(self, "reinvocation_policy")
|
|
409
|
-
|
|
410
|
-
@property
|
|
411
|
-
@pulumi.getter
|
|
412
|
-
def rules(self) -> Optional[Sequence['outputs.RuleWithOperations']]:
|
|
413
|
-
"""
|
|
414
|
-
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.
|
|
415
|
-
"""
|
|
416
|
-
return pulumi.get(self, "rules")
|
|
417
|
-
|
|
418
|
-
@property
|
|
419
|
-
@pulumi.getter(name="timeoutSeconds")
|
|
420
|
-
def timeout_seconds(self) -> Optional[int]:
|
|
574
|
+
@pulumi.getter(name="resourceRules")
|
|
575
|
+
def resource_rules(self) -> Optional[Sequence['outputs.NamedRuleWithOperations']]:
|
|
421
576
|
"""
|
|
422
|
-
|
|
577
|
+
ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.
|
|
423
578
|
"""
|
|
424
|
-
return pulumi.get(self, "
|
|
579
|
+
return pulumi.get(self, "resource_rules")
|
|
425
580
|
|
|
426
581
|
|
|
427
582
|
@pulumi.output_type
|
|
428
|
-
class
|
|
583
|
+
class MatchResourcesPatch(dict):
|
|
429
584
|
"""
|
|
430
|
-
|
|
585
|
+
MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
|
431
586
|
"""
|
|
432
587
|
@staticmethod
|
|
433
588
|
def __key_warning(key: str):
|
|
434
589
|
suggest = None
|
|
435
|
-
if key == "
|
|
436
|
-
suggest = "
|
|
590
|
+
if key == "excludeResourceRules":
|
|
591
|
+
suggest = "exclude_resource_rules"
|
|
592
|
+
elif key == "matchPolicy":
|
|
593
|
+
suggest = "match_policy"
|
|
594
|
+
elif key == "namespaceSelector":
|
|
595
|
+
suggest = "namespace_selector"
|
|
596
|
+
elif key == "objectSelector":
|
|
597
|
+
suggest = "object_selector"
|
|
598
|
+
elif key == "resourceRules":
|
|
599
|
+
suggest = "resource_rules"
|
|
437
600
|
|
|
438
601
|
if suggest:
|
|
439
|
-
pulumi.log.warn(f"Key '{key}' not found in
|
|
602
|
+
pulumi.log.warn(f"Key '{key}' not found in MatchResourcesPatch. Access the value via the '{suggest}' property getter instead.")
|
|
440
603
|
|
|
441
604
|
def __getitem__(self, key: str) -> Any:
|
|
442
|
-
|
|
605
|
+
MatchResourcesPatch.__key_warning(key)
|
|
443
606
|
return super().__getitem__(key)
|
|
444
607
|
|
|
445
608
|
def get(self, key: str, default = None) -> Any:
|
|
446
|
-
|
|
609
|
+
MatchResourcesPatch.__key_warning(key)
|
|
447
610
|
return super().get(key, default)
|
|
448
611
|
|
|
449
612
|
def __init__(__self__, *,
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
613
|
+
exclude_resource_rules: Optional[Sequence['outputs.NamedRuleWithOperationsPatch']] = None,
|
|
614
|
+
match_policy: Optional[str] = None,
|
|
615
|
+
namespace_selector: Optional['_meta.v1.outputs.LabelSelectorPatch'] = None,
|
|
616
|
+
object_selector: Optional['_meta.v1.outputs.LabelSelectorPatch'] = None,
|
|
617
|
+
resource_rules: Optional[Sequence['outputs.NamedRuleWithOperationsPatch']] = None):
|
|
454
618
|
"""
|
|
455
|
-
|
|
456
|
-
:param
|
|
457
|
-
:param str
|
|
458
|
-
|
|
459
|
-
|
|
619
|
+
MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
|
620
|
+
:param Sequence['NamedRuleWithOperationsPatchArgs'] exclude_resource_rules: 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)
|
|
621
|
+
:param str match_policy: matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
|
|
622
|
+
|
|
623
|
+
- 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.
|
|
624
|
+
|
|
625
|
+
- 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.
|
|
626
|
+
|
|
627
|
+
Defaults to "Equivalent"
|
|
628
|
+
:param '_meta.v1.LabelSelectorPatchArgs' namespace_selector: 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.
|
|
629
|
+
|
|
630
|
+
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": {
|
|
631
|
+
"matchExpressions": [
|
|
632
|
+
{
|
|
633
|
+
"key": "runlevel",
|
|
634
|
+
"operator": "NotIn",
|
|
635
|
+
"values": [
|
|
636
|
+
"0",
|
|
637
|
+
"1"
|
|
638
|
+
]
|
|
639
|
+
}
|
|
640
|
+
]
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
If 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": {
|
|
644
|
+
"matchExpressions": [
|
|
645
|
+
{
|
|
646
|
+
"key": "environment",
|
|
647
|
+
"operator": "In",
|
|
648
|
+
"values": [
|
|
649
|
+
"prod",
|
|
650
|
+
"staging"
|
|
651
|
+
]
|
|
652
|
+
}
|
|
653
|
+
]
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
|
|
657
|
+
|
|
658
|
+
Default to the empty LabelSelector, which matches everything.
|
|
659
|
+
:param '_meta.v1.LabelSelectorPatchArgs' object_selector: 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.
|
|
660
|
+
:param Sequence['NamedRuleWithOperationsPatchArgs'] resource_rules: ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.
|
|
460
661
|
"""
|
|
461
|
-
if
|
|
462
|
-
pulumi.set(__self__, "
|
|
463
|
-
if
|
|
464
|
-
pulumi.set(__self__, "
|
|
465
|
-
if
|
|
466
|
-
pulumi.set(__self__, "
|
|
467
|
-
if
|
|
468
|
-
pulumi.set(__self__, "
|
|
662
|
+
if exclude_resource_rules is not None:
|
|
663
|
+
pulumi.set(__self__, "exclude_resource_rules", exclude_resource_rules)
|
|
664
|
+
if match_policy is not None:
|
|
665
|
+
pulumi.set(__self__, "match_policy", match_policy)
|
|
666
|
+
if namespace_selector is not None:
|
|
667
|
+
pulumi.set(__self__, "namespace_selector", namespace_selector)
|
|
668
|
+
if object_selector is not None:
|
|
669
|
+
pulumi.set(__self__, "object_selector", object_selector)
|
|
670
|
+
if resource_rules is not None:
|
|
671
|
+
pulumi.set(__self__, "resource_rules", resource_rules)
|
|
469
672
|
|
|
470
673
|
@property
|
|
471
|
-
@pulumi.getter(name="
|
|
472
|
-
def
|
|
674
|
+
@pulumi.getter(name="excludeResourceRules")
|
|
675
|
+
def exclude_resource_rules(self) -> Optional[Sequence['outputs.NamedRuleWithOperationsPatch']]:
|
|
473
676
|
"""
|
|
474
|
-
|
|
677
|
+
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)
|
|
475
678
|
"""
|
|
476
|
-
return pulumi.get(self, "
|
|
679
|
+
return pulumi.get(self, "exclude_resource_rules")
|
|
477
680
|
|
|
478
681
|
@property
|
|
479
|
-
@pulumi.getter
|
|
480
|
-
def
|
|
682
|
+
@pulumi.getter(name="matchPolicy")
|
|
683
|
+
def match_policy(self) -> Optional[str]:
|
|
481
684
|
"""
|
|
482
|
-
|
|
685
|
+
matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
|
|
686
|
+
|
|
687
|
+
- 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.
|
|
688
|
+
|
|
689
|
+
- 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.
|
|
690
|
+
|
|
691
|
+
Defaults to "Equivalent"
|
|
483
692
|
"""
|
|
484
|
-
return pulumi.get(self, "
|
|
693
|
+
return pulumi.get(self, "match_policy")
|
|
485
694
|
|
|
486
695
|
@property
|
|
487
|
-
@pulumi.getter
|
|
488
|
-
def
|
|
696
|
+
@pulumi.getter(name="namespaceSelector")
|
|
697
|
+
def namespace_selector(self) -> Optional['_meta.v1.outputs.LabelSelectorPatch']:
|
|
489
698
|
"""
|
|
490
|
-
|
|
699
|
+
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.
|
|
700
|
+
|
|
701
|
+
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": {
|
|
702
|
+
"matchExpressions": [
|
|
703
|
+
{
|
|
704
|
+
"key": "runlevel",
|
|
705
|
+
"operator": "NotIn",
|
|
706
|
+
"values": [
|
|
707
|
+
"0",
|
|
708
|
+
"1"
|
|
709
|
+
]
|
|
710
|
+
}
|
|
711
|
+
]
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
If 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": {
|
|
715
|
+
"matchExpressions": [
|
|
716
|
+
{
|
|
717
|
+
"key": "environment",
|
|
718
|
+
"operator": "In",
|
|
719
|
+
"values": [
|
|
720
|
+
"prod",
|
|
721
|
+
"staging"
|
|
722
|
+
]
|
|
723
|
+
}
|
|
724
|
+
]
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
|
|
728
|
+
|
|
729
|
+
Default to the empty LabelSelector, which matches everything.
|
|
491
730
|
"""
|
|
492
|
-
return pulumi.get(self, "
|
|
731
|
+
return pulumi.get(self, "namespace_selector")
|
|
493
732
|
|
|
494
733
|
@property
|
|
495
|
-
@pulumi.getter
|
|
496
|
-
def
|
|
734
|
+
@pulumi.getter(name="objectSelector")
|
|
735
|
+
def object_selector(self) -> Optional['_meta.v1.outputs.LabelSelectorPatch']:
|
|
497
736
|
"""
|
|
498
|
-
|
|
737
|
+
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.
|
|
499
738
|
"""
|
|
500
|
-
return pulumi.get(self, "
|
|
739
|
+
return pulumi.get(self, "object_selector")
|
|
740
|
+
|
|
741
|
+
@property
|
|
742
|
+
@pulumi.getter(name="resourceRules")
|
|
743
|
+
def resource_rules(self) -> Optional[Sequence['outputs.NamedRuleWithOperationsPatch']]:
|
|
744
|
+
"""
|
|
745
|
+
ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.
|
|
746
|
+
"""
|
|
747
|
+
return pulumi.get(self, "resource_rules")
|
|
501
748
|
|
|
502
749
|
|
|
503
750
|
@pulumi.output_type
|
|
504
|
-
class
|
|
751
|
+
class MutatingWebhook(dict):
|
|
505
752
|
"""
|
|
506
753
|
MutatingWebhook describes an admission webhook and the resources and operations it applies to.
|
|
507
754
|
"""
|
|
@@ -512,6 +759,8 @@ class MutatingWebhookPatch(dict):
|
|
|
512
759
|
suggest = "admission_review_versions"
|
|
513
760
|
elif key == "clientConfig":
|
|
514
761
|
suggest = "client_config"
|
|
762
|
+
elif key == "sideEffects":
|
|
763
|
+
suggest = "side_effects"
|
|
515
764
|
elif key == "failurePolicy":
|
|
516
765
|
suggest = "failure_policy"
|
|
517
766
|
elif key == "matchConditions":
|
|
@@ -524,41 +773,41 @@ class MutatingWebhookPatch(dict):
|
|
|
524
773
|
suggest = "object_selector"
|
|
525
774
|
elif key == "reinvocationPolicy":
|
|
526
775
|
suggest = "reinvocation_policy"
|
|
527
|
-
elif key == "sideEffects":
|
|
528
|
-
suggest = "side_effects"
|
|
529
776
|
elif key == "timeoutSeconds":
|
|
530
777
|
suggest = "timeout_seconds"
|
|
531
778
|
|
|
532
779
|
if suggest:
|
|
533
|
-
pulumi.log.warn(f"Key '{key}' not found in
|
|
780
|
+
pulumi.log.warn(f"Key '{key}' not found in MutatingWebhook. Access the value via the '{suggest}' property getter instead.")
|
|
534
781
|
|
|
535
782
|
def __getitem__(self, key: str) -> Any:
|
|
536
|
-
|
|
783
|
+
MutatingWebhook.__key_warning(key)
|
|
537
784
|
return super().__getitem__(key)
|
|
538
785
|
|
|
539
786
|
def get(self, key: str, default = None) -> Any:
|
|
540
|
-
|
|
787
|
+
MutatingWebhook.__key_warning(key)
|
|
541
788
|
return super().get(key, default)
|
|
542
789
|
|
|
543
790
|
def __init__(__self__, *,
|
|
544
|
-
admission_review_versions:
|
|
545
|
-
client_config:
|
|
791
|
+
admission_review_versions: Sequence[str],
|
|
792
|
+
client_config: 'outputs.WebhookClientConfig',
|
|
793
|
+
name: str,
|
|
794
|
+
side_effects: str,
|
|
546
795
|
failure_policy: Optional[str] = None,
|
|
547
|
-
match_conditions: Optional[Sequence['outputs.
|
|
796
|
+
match_conditions: Optional[Sequence['outputs.MatchCondition']] = None,
|
|
548
797
|
match_policy: Optional[str] = None,
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
object_selector: Optional['_meta.v1.outputs.LabelSelectorPatch'] = None,
|
|
798
|
+
namespace_selector: Optional['_meta.v1.outputs.LabelSelector'] = None,
|
|
799
|
+
object_selector: Optional['_meta.v1.outputs.LabelSelector'] = None,
|
|
552
800
|
reinvocation_policy: Optional[str] = None,
|
|
553
|
-
rules: Optional[Sequence['outputs.
|
|
554
|
-
side_effects: Optional[str] = None,
|
|
801
|
+
rules: Optional[Sequence['outputs.RuleWithOperations']] = None,
|
|
555
802
|
timeout_seconds: Optional[int] = None):
|
|
556
803
|
"""
|
|
557
804
|
MutatingWebhook describes an admission webhook and the resources and operations it applies to.
|
|
558
805
|
:param Sequence[str] admission_review_versions: 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.
|
|
559
|
-
:param '
|
|
806
|
+
:param 'WebhookClientConfigArgs' client_config: ClientConfig defines how to communicate with the hook. Required
|
|
807
|
+
:param str name: 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.
|
|
808
|
+
:param str side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
|
|
560
809
|
:param str failure_policy: FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
|
|
561
|
-
:param Sequence['
|
|
810
|
+
:param Sequence['MatchConditionArgs'] match_conditions: MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
|
|
562
811
|
|
|
563
812
|
The exact matching logic is (in order):
|
|
564
813
|
1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.
|
|
@@ -566,8 +815,6 @@ class MutatingWebhookPatch(dict):
|
|
|
566
815
|
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
567
816
|
- If failurePolicy=Fail, reject the request
|
|
568
817
|
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
|
569
|
-
|
|
570
|
-
This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
|
|
571
818
|
:param str match_policy: matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
|
|
572
819
|
|
|
573
820
|
- 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.
|
|
@@ -575,8 +822,7 @@ class MutatingWebhookPatch(dict):
|
|
|
575
822
|
- 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.
|
|
576
823
|
|
|
577
824
|
Defaults to "Equivalent"
|
|
578
|
-
:param
|
|
579
|
-
:param '_meta.v1.LabelSelectorPatchArgs' namespace_selector: 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.
|
|
825
|
+
:param '_meta.v1.LabelSelectorArgs' namespace_selector: 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.
|
|
580
826
|
|
|
581
827
|
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": {
|
|
582
828
|
"matchExpressions": [
|
|
@@ -607,7 +853,7 @@ class MutatingWebhookPatch(dict):
|
|
|
607
853
|
See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
|
|
608
854
|
|
|
609
855
|
Default to the empty LabelSelector, which matches everything.
|
|
610
|
-
:param '_meta.v1.
|
|
856
|
+
:param '_meta.v1.LabelSelectorArgs' object_selector: 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.
|
|
611
857
|
:param str reinvocation_policy: reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".
|
|
612
858
|
|
|
613
859
|
Never: the webhook will not be called more than once in a single admission evaluation.
|
|
@@ -615,22 +861,19 @@ class MutatingWebhookPatch(dict):
|
|
|
615
861
|
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.
|
|
616
862
|
|
|
617
863
|
Defaults to "Never".
|
|
618
|
-
:param Sequence['
|
|
619
|
-
:param str side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
|
|
864
|
+
:param Sequence['RuleWithOperationsArgs'] rules: 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.
|
|
620
865
|
:param int timeout_seconds: 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.
|
|
621
866
|
"""
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
867
|
+
pulumi.set(__self__, "admission_review_versions", admission_review_versions)
|
|
868
|
+
pulumi.set(__self__, "client_config", client_config)
|
|
869
|
+
pulumi.set(__self__, "name", name)
|
|
870
|
+
pulumi.set(__self__, "side_effects", side_effects)
|
|
626
871
|
if failure_policy is not None:
|
|
627
872
|
pulumi.set(__self__, "failure_policy", failure_policy)
|
|
628
873
|
if match_conditions is not None:
|
|
629
874
|
pulumi.set(__self__, "match_conditions", match_conditions)
|
|
630
875
|
if match_policy is not None:
|
|
631
876
|
pulumi.set(__self__, "match_policy", match_policy)
|
|
632
|
-
if name is not None:
|
|
633
|
-
pulumi.set(__self__, "name", name)
|
|
634
877
|
if namespace_selector is not None:
|
|
635
878
|
pulumi.set(__self__, "namespace_selector", namespace_selector)
|
|
636
879
|
if object_selector is not None:
|
|
@@ -639,14 +882,12 @@ class MutatingWebhookPatch(dict):
|
|
|
639
882
|
pulumi.set(__self__, "reinvocation_policy", reinvocation_policy)
|
|
640
883
|
if rules is not None:
|
|
641
884
|
pulumi.set(__self__, "rules", rules)
|
|
642
|
-
if side_effects is not None:
|
|
643
|
-
pulumi.set(__self__, "side_effects", side_effects)
|
|
644
885
|
if timeout_seconds is not None:
|
|
645
886
|
pulumi.set(__self__, "timeout_seconds", timeout_seconds)
|
|
646
887
|
|
|
647
888
|
@property
|
|
648
889
|
@pulumi.getter(name="admissionReviewVersions")
|
|
649
|
-
def admission_review_versions(self) ->
|
|
890
|
+
def admission_review_versions(self) -> Sequence[str]:
|
|
650
891
|
"""
|
|
651
892
|
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.
|
|
652
893
|
"""
|
|
@@ -654,23 +895,39 @@ class MutatingWebhookPatch(dict):
|
|
|
654
895
|
|
|
655
896
|
@property
|
|
656
897
|
@pulumi.getter(name="clientConfig")
|
|
657
|
-
def client_config(self) ->
|
|
898
|
+
def client_config(self) -> 'outputs.WebhookClientConfig':
|
|
658
899
|
"""
|
|
659
900
|
ClientConfig defines how to communicate with the hook. Required
|
|
660
901
|
"""
|
|
661
902
|
return pulumi.get(self, "client_config")
|
|
662
903
|
|
|
663
904
|
@property
|
|
664
|
-
@pulumi.getter
|
|
665
|
-
def
|
|
905
|
+
@pulumi.getter
|
|
906
|
+
def name(self) -> str:
|
|
666
907
|
"""
|
|
667
|
-
|
|
908
|
+
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.
|
|
668
909
|
"""
|
|
669
|
-
return pulumi.get(self, "
|
|
910
|
+
return pulumi.get(self, "name")
|
|
911
|
+
|
|
912
|
+
@property
|
|
913
|
+
@pulumi.getter(name="sideEffects")
|
|
914
|
+
def side_effects(self) -> str:
|
|
915
|
+
"""
|
|
916
|
+
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.
|
|
917
|
+
"""
|
|
918
|
+
return pulumi.get(self, "side_effects")
|
|
919
|
+
|
|
920
|
+
@property
|
|
921
|
+
@pulumi.getter(name="failurePolicy")
|
|
922
|
+
def failure_policy(self) -> Optional[str]:
|
|
923
|
+
"""
|
|
924
|
+
FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
|
|
925
|
+
"""
|
|
926
|
+
return pulumi.get(self, "failure_policy")
|
|
670
927
|
|
|
671
928
|
@property
|
|
672
929
|
@pulumi.getter(name="matchConditions")
|
|
673
|
-
def match_conditions(self) -> Optional[Sequence['outputs.
|
|
930
|
+
def match_conditions(self) -> Optional[Sequence['outputs.MatchCondition']]:
|
|
674
931
|
"""
|
|
675
932
|
MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
|
|
676
933
|
|
|
@@ -680,8 +937,6 @@ class MutatingWebhookPatch(dict):
|
|
|
680
937
|
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
681
938
|
- If failurePolicy=Fail, reject the request
|
|
682
939
|
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
|
683
|
-
|
|
684
|
-
This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
|
|
685
940
|
"""
|
|
686
941
|
return pulumi.get(self, "match_conditions")
|
|
687
942
|
|
|
@@ -699,17 +954,9 @@ class MutatingWebhookPatch(dict):
|
|
|
699
954
|
"""
|
|
700
955
|
return pulumi.get(self, "match_policy")
|
|
701
956
|
|
|
702
|
-
@property
|
|
703
|
-
@pulumi.getter
|
|
704
|
-
def name(self) -> Optional[str]:
|
|
705
|
-
"""
|
|
706
|
-
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.
|
|
707
|
-
"""
|
|
708
|
-
return pulumi.get(self, "name")
|
|
709
|
-
|
|
710
957
|
@property
|
|
711
958
|
@pulumi.getter(name="namespaceSelector")
|
|
712
|
-
def namespace_selector(self) -> Optional['_meta.v1.outputs.
|
|
959
|
+
def namespace_selector(self) -> Optional['_meta.v1.outputs.LabelSelector']:
|
|
713
960
|
"""
|
|
714
961
|
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.
|
|
715
962
|
|
|
@@ -747,7 +994,7 @@ class MutatingWebhookPatch(dict):
|
|
|
747
994
|
|
|
748
995
|
@property
|
|
749
996
|
@pulumi.getter(name="objectSelector")
|
|
750
|
-
def object_selector(self) -> Optional['_meta.v1.outputs.
|
|
997
|
+
def object_selector(self) -> Optional['_meta.v1.outputs.LabelSelector']:
|
|
751
998
|
"""
|
|
752
999
|
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.
|
|
753
1000
|
"""
|
|
@@ -769,20 +1016,12 @@ class MutatingWebhookPatch(dict):
|
|
|
769
1016
|
|
|
770
1017
|
@property
|
|
771
1018
|
@pulumi.getter
|
|
772
|
-
def rules(self) -> Optional[Sequence['outputs.
|
|
1019
|
+
def rules(self) -> Optional[Sequence['outputs.RuleWithOperations']]:
|
|
773
1020
|
"""
|
|
774
1021
|
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.
|
|
775
1022
|
"""
|
|
776
1023
|
return pulumi.get(self, "rules")
|
|
777
1024
|
|
|
778
|
-
@property
|
|
779
|
-
@pulumi.getter(name="sideEffects")
|
|
780
|
-
def side_effects(self) -> Optional[str]:
|
|
781
|
-
"""
|
|
782
|
-
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.
|
|
783
|
-
"""
|
|
784
|
-
return pulumi.get(self, "side_effects")
|
|
785
|
-
|
|
786
1025
|
@property
|
|
787
1026
|
@pulumi.getter(name="timeoutSeconds")
|
|
788
1027
|
def timeout_seconds(self) -> Optional[int]:
|
|
@@ -793,323 +1032,2183 @@ class MutatingWebhookPatch(dict):
|
|
|
793
1032
|
|
|
794
1033
|
|
|
795
1034
|
@pulumi.output_type
|
|
796
|
-
class
|
|
1035
|
+
class MutatingWebhookConfiguration(dict):
|
|
797
1036
|
"""
|
|
798
|
-
|
|
1037
|
+
MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
|
|
799
1038
|
"""
|
|
800
1039
|
@staticmethod
|
|
801
1040
|
def __key_warning(key: str):
|
|
802
1041
|
suggest = None
|
|
803
|
-
if key == "
|
|
804
|
-
suggest = "
|
|
805
|
-
elif key == "apiVersions":
|
|
806
|
-
suggest = "api_versions"
|
|
1042
|
+
if key == "apiVersion":
|
|
1043
|
+
suggest = "api_version"
|
|
807
1044
|
|
|
808
1045
|
if suggest:
|
|
809
|
-
pulumi.log.warn(f"Key '{key}' not found in
|
|
1046
|
+
pulumi.log.warn(f"Key '{key}' not found in MutatingWebhookConfiguration. Access the value via the '{suggest}' property getter instead.")
|
|
810
1047
|
|
|
811
1048
|
def __getitem__(self, key: str) -> Any:
|
|
812
|
-
|
|
1049
|
+
MutatingWebhookConfiguration.__key_warning(key)
|
|
813
1050
|
return super().__getitem__(key)
|
|
814
1051
|
|
|
815
1052
|
def get(self, key: str, default = None) -> Any:
|
|
816
|
-
|
|
1053
|
+
MutatingWebhookConfiguration.__key_warning(key)
|
|
817
1054
|
return super().get(key, default)
|
|
818
1055
|
|
|
819
1056
|
def __init__(__self__, *,
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
scope: Optional[str] = None):
|
|
825
|
-
"""
|
|
826
|
-
RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
|
|
827
|
-
:param Sequence[str] api_groups: APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
|
|
828
|
-
:param Sequence[str] api_versions: APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
|
|
829
|
-
:param Sequence[str] operations: 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.
|
|
830
|
-
:param Sequence[str] resources: Resources is a list of resources this rule applies to.
|
|
831
|
-
|
|
832
|
-
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.
|
|
833
|
-
|
|
834
|
-
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
|
|
835
|
-
|
|
836
|
-
Depending on the enclosing object, subresources might not be allowed. Required.
|
|
837
|
-
:param str scope: 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 "*".
|
|
838
|
-
"""
|
|
839
|
-
if api_groups is not None:
|
|
840
|
-
pulumi.set(__self__, "api_groups", api_groups)
|
|
841
|
-
if api_versions is not None:
|
|
842
|
-
pulumi.set(__self__, "api_versions", api_versions)
|
|
843
|
-
if operations is not None:
|
|
844
|
-
pulumi.set(__self__, "operations", operations)
|
|
845
|
-
if resources is not None:
|
|
846
|
-
pulumi.set(__self__, "resources", resources)
|
|
847
|
-
if scope is not None:
|
|
848
|
-
pulumi.set(__self__, "scope", scope)
|
|
849
|
-
|
|
850
|
-
@property
|
|
851
|
-
@pulumi.getter(name="apiGroups")
|
|
852
|
-
def api_groups(self) -> Optional[Sequence[str]]:
|
|
1057
|
+
api_version: Optional[str] = None,
|
|
1058
|
+
kind: Optional[str] = None,
|
|
1059
|
+
metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None,
|
|
1060
|
+
webhooks: Optional[Sequence['outputs.MutatingWebhook']] = None):
|
|
853
1061
|
"""
|
|
854
|
-
|
|
1062
|
+
MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
|
|
1063
|
+
:param str api_version: 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
|
|
1064
|
+
:param str kind: 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
|
|
1065
|
+
:param '_meta.v1.ObjectMetaArgs' metadata: Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
|
1066
|
+
:param Sequence['MutatingWebhookArgs'] webhooks: Webhooks is a list of webhooks and the affected resources and operations.
|
|
855
1067
|
"""
|
|
856
|
-
|
|
1068
|
+
if api_version is not None:
|
|
1069
|
+
pulumi.set(__self__, "api_version", 'admissionregistration.k8s.io/v1')
|
|
1070
|
+
if kind is not None:
|
|
1071
|
+
pulumi.set(__self__, "kind", 'MutatingWebhookConfiguration')
|
|
1072
|
+
if metadata is not None:
|
|
1073
|
+
pulumi.set(__self__, "metadata", metadata)
|
|
1074
|
+
if webhooks is not None:
|
|
1075
|
+
pulumi.set(__self__, "webhooks", webhooks)
|
|
857
1076
|
|
|
858
1077
|
@property
|
|
859
|
-
@pulumi.getter(name="
|
|
860
|
-
def
|
|
1078
|
+
@pulumi.getter(name="apiVersion")
|
|
1079
|
+
def api_version(self) -> Optional[str]:
|
|
861
1080
|
"""
|
|
862
|
-
|
|
1081
|
+
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
|
|
863
1082
|
"""
|
|
864
|
-
return pulumi.get(self, "
|
|
1083
|
+
return pulumi.get(self, "api_version")
|
|
865
1084
|
|
|
866
1085
|
@property
|
|
867
1086
|
@pulumi.getter
|
|
868
|
-
def
|
|
1087
|
+
def kind(self) -> Optional[str]:
|
|
869
1088
|
"""
|
|
870
|
-
|
|
1089
|
+
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
|
|
871
1090
|
"""
|
|
872
|
-
return pulumi.get(self, "
|
|
1091
|
+
return pulumi.get(self, "kind")
|
|
873
1092
|
|
|
874
1093
|
@property
|
|
875
1094
|
@pulumi.getter
|
|
876
|
-
def
|
|
1095
|
+
def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']:
|
|
877
1096
|
"""
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
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.
|
|
881
|
-
|
|
882
|
-
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
|
|
883
|
-
|
|
884
|
-
Depending on the enclosing object, subresources might not be allowed. Required.
|
|
1097
|
+
Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
|
885
1098
|
"""
|
|
886
|
-
return pulumi.get(self, "
|
|
1099
|
+
return pulumi.get(self, "metadata")
|
|
887
1100
|
|
|
888
1101
|
@property
|
|
889
1102
|
@pulumi.getter
|
|
890
|
-
def
|
|
1103
|
+
def webhooks(self) -> Optional[Sequence['outputs.MutatingWebhook']]:
|
|
891
1104
|
"""
|
|
892
|
-
|
|
1105
|
+
Webhooks is a list of webhooks and the affected resources and operations.
|
|
893
1106
|
"""
|
|
894
|
-
return pulumi.get(self, "
|
|
1107
|
+
return pulumi.get(self, "webhooks")
|
|
895
1108
|
|
|
896
1109
|
|
|
897
1110
|
@pulumi.output_type
|
|
898
|
-
class
|
|
1111
|
+
class MutatingWebhookPatch(dict):
|
|
899
1112
|
"""
|
|
900
|
-
|
|
1113
|
+
MutatingWebhook describes an admission webhook and the resources and operations it applies to.
|
|
901
1114
|
"""
|
|
902
1115
|
@staticmethod
|
|
903
1116
|
def __key_warning(key: str):
|
|
904
1117
|
suggest = None
|
|
905
|
-
if key == "
|
|
906
|
-
suggest = "
|
|
907
|
-
elif key == "
|
|
908
|
-
suggest = "
|
|
1118
|
+
if key == "admissionReviewVersions":
|
|
1119
|
+
suggest = "admission_review_versions"
|
|
1120
|
+
elif key == "clientConfig":
|
|
1121
|
+
suggest = "client_config"
|
|
1122
|
+
elif key == "failurePolicy":
|
|
1123
|
+
suggest = "failure_policy"
|
|
1124
|
+
elif key == "matchConditions":
|
|
1125
|
+
suggest = "match_conditions"
|
|
1126
|
+
elif key == "matchPolicy":
|
|
1127
|
+
suggest = "match_policy"
|
|
1128
|
+
elif key == "namespaceSelector":
|
|
1129
|
+
suggest = "namespace_selector"
|
|
1130
|
+
elif key == "objectSelector":
|
|
1131
|
+
suggest = "object_selector"
|
|
1132
|
+
elif key == "reinvocationPolicy":
|
|
1133
|
+
suggest = "reinvocation_policy"
|
|
1134
|
+
elif key == "sideEffects":
|
|
1135
|
+
suggest = "side_effects"
|
|
1136
|
+
elif key == "timeoutSeconds":
|
|
1137
|
+
suggest = "timeout_seconds"
|
|
909
1138
|
|
|
910
1139
|
if suggest:
|
|
911
|
-
pulumi.log.warn(f"Key '{key}' not found in
|
|
1140
|
+
pulumi.log.warn(f"Key '{key}' not found in MutatingWebhookPatch. Access the value via the '{suggest}' property getter instead.")
|
|
912
1141
|
|
|
913
1142
|
def __getitem__(self, key: str) -> Any:
|
|
914
|
-
|
|
1143
|
+
MutatingWebhookPatch.__key_warning(key)
|
|
915
1144
|
return super().__getitem__(key)
|
|
916
1145
|
|
|
917
1146
|
def get(self, key: str, default = None) -> Any:
|
|
918
|
-
|
|
1147
|
+
MutatingWebhookPatch.__key_warning(key)
|
|
919
1148
|
return super().get(key, default)
|
|
920
1149
|
|
|
921
1150
|
def __init__(__self__, *,
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
1151
|
+
admission_review_versions: Optional[Sequence[str]] = None,
|
|
1152
|
+
client_config: Optional['outputs.WebhookClientConfigPatch'] = None,
|
|
1153
|
+
failure_policy: Optional[str] = None,
|
|
1154
|
+
match_conditions: Optional[Sequence['outputs.MatchConditionPatch']] = None,
|
|
1155
|
+
match_policy: Optional[str] = None,
|
|
1156
|
+
name: Optional[str] = None,
|
|
1157
|
+
namespace_selector: Optional['_meta.v1.outputs.LabelSelectorPatch'] = None,
|
|
1158
|
+
object_selector: Optional['_meta.v1.outputs.LabelSelectorPatch'] = None,
|
|
1159
|
+
reinvocation_policy: Optional[str] = None,
|
|
1160
|
+
rules: Optional[Sequence['outputs.RuleWithOperationsPatch']] = None,
|
|
1161
|
+
side_effects: Optional[str] = None,
|
|
1162
|
+
timeout_seconds: Optional[int] = None):
|
|
927
1163
|
"""
|
|
928
|
-
|
|
929
|
-
:param Sequence[str]
|
|
930
|
-
:param
|
|
931
|
-
:param
|
|
932
|
-
:param Sequence[
|
|
1164
|
+
MutatingWebhook describes an admission webhook and the resources and operations it applies to.
|
|
1165
|
+
:param Sequence[str] admission_review_versions: 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.
|
|
1166
|
+
:param 'WebhookClientConfigPatchArgs' client_config: ClientConfig defines how to communicate with the hook. Required
|
|
1167
|
+
:param str failure_policy: FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
|
|
1168
|
+
:param Sequence['MatchConditionPatchArgs'] match_conditions: MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
|
|
933
1169
|
|
|
934
|
-
|
|
1170
|
+
The exact matching logic is (in order):
|
|
1171
|
+
1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.
|
|
1172
|
+
2. If ALL matchConditions evaluate to TRUE, the webhook is called.
|
|
1173
|
+
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
1174
|
+
- If failurePolicy=Fail, reject the request
|
|
1175
|
+
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
|
1176
|
+
:param str match_policy: matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
|
|
935
1177
|
|
|
936
|
-
|
|
1178
|
+
- 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.
|
|
937
1179
|
|
|
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
|
-
|
|
1180
|
+
- 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.
|
|
1181
|
+
|
|
1182
|
+
Defaults to "Equivalent"
|
|
1183
|
+
:param str name: 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.
|
|
1184
|
+
:param '_meta.v1.LabelSelectorPatchArgs' namespace_selector: 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.
|
|
1185
|
+
|
|
1186
|
+
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": {
|
|
1187
|
+
"matchExpressions": [
|
|
1188
|
+
{
|
|
1189
|
+
"key": "runlevel",
|
|
1190
|
+
"operator": "NotIn",
|
|
1191
|
+
"values": [
|
|
1192
|
+
"0",
|
|
1193
|
+
"1"
|
|
1194
|
+
]
|
|
1195
|
+
}
|
|
1196
|
+
]
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
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": {
|
|
1200
|
+
"matchExpressions": [
|
|
1201
|
+
{
|
|
1202
|
+
"key": "environment",
|
|
1203
|
+
"operator": "In",
|
|
1204
|
+
"values": [
|
|
1205
|
+
"prod",
|
|
1206
|
+
"staging"
|
|
1207
|
+
]
|
|
1208
|
+
}
|
|
1209
|
+
]
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
|
|
1213
|
+
|
|
1214
|
+
Default to the empty LabelSelector, which matches everything.
|
|
1215
|
+
:param '_meta.v1.LabelSelectorPatchArgs' object_selector: 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.
|
|
1216
|
+
:param str reinvocation_policy: reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".
|
|
1217
|
+
|
|
1218
|
+
Never: the webhook will not be called more than once in a single admission evaluation.
|
|
1219
|
+
|
|
1220
|
+
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.
|
|
1221
|
+
|
|
1222
|
+
Defaults to "Never".
|
|
1223
|
+
:param Sequence['RuleWithOperationsPatchArgs'] rules: 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.
|
|
1224
|
+
:param str side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
|
|
1225
|
+
:param int timeout_seconds: 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.
|
|
1226
|
+
"""
|
|
1227
|
+
if admission_review_versions is not None:
|
|
1228
|
+
pulumi.set(__self__, "admission_review_versions", admission_review_versions)
|
|
1229
|
+
if client_config is not None:
|
|
1230
|
+
pulumi.set(__self__, "client_config", client_config)
|
|
1231
|
+
if failure_policy is not None:
|
|
1232
|
+
pulumi.set(__self__, "failure_policy", failure_policy)
|
|
1233
|
+
if match_conditions is not None:
|
|
1234
|
+
pulumi.set(__self__, "match_conditions", match_conditions)
|
|
1235
|
+
if match_policy is not None:
|
|
1236
|
+
pulumi.set(__self__, "match_policy", match_policy)
|
|
1237
|
+
if name is not None:
|
|
1238
|
+
pulumi.set(__self__, "name", name)
|
|
1239
|
+
if namespace_selector is not None:
|
|
1240
|
+
pulumi.set(__self__, "namespace_selector", namespace_selector)
|
|
1241
|
+
if object_selector is not None:
|
|
1242
|
+
pulumi.set(__self__, "object_selector", object_selector)
|
|
1243
|
+
if reinvocation_policy is not None:
|
|
1244
|
+
pulumi.set(__self__, "reinvocation_policy", reinvocation_policy)
|
|
1245
|
+
if rules is not None:
|
|
1246
|
+
pulumi.set(__self__, "rules", rules)
|
|
1247
|
+
if side_effects is not None:
|
|
1248
|
+
pulumi.set(__self__, "side_effects", side_effects)
|
|
1249
|
+
if timeout_seconds is not None:
|
|
1250
|
+
pulumi.set(__self__, "timeout_seconds", timeout_seconds)
|
|
1251
|
+
|
|
1252
|
+
@property
|
|
1253
|
+
@pulumi.getter(name="admissionReviewVersions")
|
|
1254
|
+
def admission_review_versions(self) -> Optional[Sequence[str]]:
|
|
1255
|
+
"""
|
|
1256
|
+
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.
|
|
1257
|
+
"""
|
|
1258
|
+
return pulumi.get(self, "admission_review_versions")
|
|
1259
|
+
|
|
1260
|
+
@property
|
|
1261
|
+
@pulumi.getter(name="clientConfig")
|
|
1262
|
+
def client_config(self) -> Optional['outputs.WebhookClientConfigPatch']:
|
|
1263
|
+
"""
|
|
1264
|
+
ClientConfig defines how to communicate with the hook. Required
|
|
1265
|
+
"""
|
|
1266
|
+
return pulumi.get(self, "client_config")
|
|
1267
|
+
|
|
1268
|
+
@property
|
|
1269
|
+
@pulumi.getter(name="failurePolicy")
|
|
1270
|
+
def failure_policy(self) -> Optional[str]:
|
|
1271
|
+
"""
|
|
1272
|
+
FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
|
|
1273
|
+
"""
|
|
1274
|
+
return pulumi.get(self, "failure_policy")
|
|
1275
|
+
|
|
1276
|
+
@property
|
|
1277
|
+
@pulumi.getter(name="matchConditions")
|
|
1278
|
+
def match_conditions(self) -> Optional[Sequence['outputs.MatchConditionPatch']]:
|
|
1279
|
+
"""
|
|
1280
|
+
MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
|
|
1281
|
+
|
|
1282
|
+
The exact matching logic is (in order):
|
|
1283
|
+
1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.
|
|
1284
|
+
2. If ALL matchConditions evaluate to TRUE, the webhook is called.
|
|
1285
|
+
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
1286
|
+
- If failurePolicy=Fail, reject the request
|
|
1287
|
+
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
|
1288
|
+
"""
|
|
1289
|
+
return pulumi.get(self, "match_conditions")
|
|
1290
|
+
|
|
1291
|
+
@property
|
|
1292
|
+
@pulumi.getter(name="matchPolicy")
|
|
1293
|
+
def match_policy(self) -> Optional[str]:
|
|
1294
|
+
"""
|
|
1295
|
+
matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
|
|
1296
|
+
|
|
1297
|
+
- 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.
|
|
1298
|
+
|
|
1299
|
+
- 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.
|
|
1300
|
+
|
|
1301
|
+
Defaults to "Equivalent"
|
|
1302
|
+
"""
|
|
1303
|
+
return pulumi.get(self, "match_policy")
|
|
1304
|
+
|
|
1305
|
+
@property
|
|
1306
|
+
@pulumi.getter
|
|
1307
|
+
def name(self) -> Optional[str]:
|
|
1308
|
+
"""
|
|
1309
|
+
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.
|
|
1310
|
+
"""
|
|
1311
|
+
return pulumi.get(self, "name")
|
|
1312
|
+
|
|
1313
|
+
@property
|
|
1314
|
+
@pulumi.getter(name="namespaceSelector")
|
|
1315
|
+
def namespace_selector(self) -> Optional['_meta.v1.outputs.LabelSelectorPatch']:
|
|
1316
|
+
"""
|
|
1317
|
+
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.
|
|
1318
|
+
|
|
1319
|
+
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": {
|
|
1320
|
+
"matchExpressions": [
|
|
1321
|
+
{
|
|
1322
|
+
"key": "runlevel",
|
|
1323
|
+
"operator": "NotIn",
|
|
1324
|
+
"values": [
|
|
1325
|
+
"0",
|
|
1326
|
+
"1"
|
|
1327
|
+
]
|
|
1328
|
+
}
|
|
1329
|
+
]
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
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": {
|
|
1333
|
+
"matchExpressions": [
|
|
1334
|
+
{
|
|
1335
|
+
"key": "environment",
|
|
1336
|
+
"operator": "In",
|
|
1337
|
+
"values": [
|
|
1338
|
+
"prod",
|
|
1339
|
+
"staging"
|
|
1340
|
+
]
|
|
1341
|
+
}
|
|
1342
|
+
]
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
|
|
1346
|
+
|
|
1347
|
+
Default to the empty LabelSelector, which matches everything.
|
|
1348
|
+
"""
|
|
1349
|
+
return pulumi.get(self, "namespace_selector")
|
|
1350
|
+
|
|
1351
|
+
@property
|
|
1352
|
+
@pulumi.getter(name="objectSelector")
|
|
1353
|
+
def object_selector(self) -> Optional['_meta.v1.outputs.LabelSelectorPatch']:
|
|
1354
|
+
"""
|
|
1355
|
+
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.
|
|
1356
|
+
"""
|
|
1357
|
+
return pulumi.get(self, "object_selector")
|
|
1358
|
+
|
|
1359
|
+
@property
|
|
1360
|
+
@pulumi.getter(name="reinvocationPolicy")
|
|
1361
|
+
def reinvocation_policy(self) -> Optional[str]:
|
|
1362
|
+
"""
|
|
1363
|
+
reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".
|
|
1364
|
+
|
|
1365
|
+
Never: the webhook will not be called more than once in a single admission evaluation.
|
|
1366
|
+
|
|
1367
|
+
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.
|
|
1368
|
+
|
|
1369
|
+
Defaults to "Never".
|
|
1370
|
+
"""
|
|
1371
|
+
return pulumi.get(self, "reinvocation_policy")
|
|
1372
|
+
|
|
1373
|
+
@property
|
|
1374
|
+
@pulumi.getter
|
|
1375
|
+
def rules(self) -> Optional[Sequence['outputs.RuleWithOperationsPatch']]:
|
|
1376
|
+
"""
|
|
1377
|
+
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.
|
|
1378
|
+
"""
|
|
1379
|
+
return pulumi.get(self, "rules")
|
|
1380
|
+
|
|
1381
|
+
@property
|
|
1382
|
+
@pulumi.getter(name="sideEffects")
|
|
1383
|
+
def side_effects(self) -> Optional[str]:
|
|
1384
|
+
"""
|
|
1385
|
+
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.
|
|
1386
|
+
"""
|
|
1387
|
+
return pulumi.get(self, "side_effects")
|
|
1388
|
+
|
|
1389
|
+
@property
|
|
1390
|
+
@pulumi.getter(name="timeoutSeconds")
|
|
1391
|
+
def timeout_seconds(self) -> Optional[int]:
|
|
1392
|
+
"""
|
|
1393
|
+
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.
|
|
1394
|
+
"""
|
|
1395
|
+
return pulumi.get(self, "timeout_seconds")
|
|
1396
|
+
|
|
1397
|
+
|
|
1398
|
+
@pulumi.output_type
|
|
1399
|
+
class NamedRuleWithOperations(dict):
|
|
1400
|
+
"""
|
|
1401
|
+
NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
|
|
1402
|
+
"""
|
|
1403
|
+
@staticmethod
|
|
1404
|
+
def __key_warning(key: str):
|
|
1405
|
+
suggest = None
|
|
1406
|
+
if key == "apiGroups":
|
|
1407
|
+
suggest = "api_groups"
|
|
1408
|
+
elif key == "apiVersions":
|
|
1409
|
+
suggest = "api_versions"
|
|
1410
|
+
elif key == "resourceNames":
|
|
1411
|
+
suggest = "resource_names"
|
|
1412
|
+
|
|
1413
|
+
if suggest:
|
|
1414
|
+
pulumi.log.warn(f"Key '{key}' not found in NamedRuleWithOperations. Access the value via the '{suggest}' property getter instead.")
|
|
1415
|
+
|
|
1416
|
+
def __getitem__(self, key: str) -> Any:
|
|
1417
|
+
NamedRuleWithOperations.__key_warning(key)
|
|
1418
|
+
return super().__getitem__(key)
|
|
1419
|
+
|
|
1420
|
+
def get(self, key: str, default = None) -> Any:
|
|
1421
|
+
NamedRuleWithOperations.__key_warning(key)
|
|
1422
|
+
return super().get(key, default)
|
|
1423
|
+
|
|
1424
|
+
def __init__(__self__, *,
|
|
1425
|
+
api_groups: Optional[Sequence[str]] = None,
|
|
1426
|
+
api_versions: Optional[Sequence[str]] = None,
|
|
1427
|
+
operations: Optional[Sequence[str]] = None,
|
|
1428
|
+
resource_names: Optional[Sequence[str]] = None,
|
|
1429
|
+
resources: Optional[Sequence[str]] = None,
|
|
1430
|
+
scope: Optional[str] = None):
|
|
1431
|
+
"""
|
|
1432
|
+
NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
|
|
1433
|
+
:param Sequence[str] api_groups: APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
|
|
1434
|
+
:param Sequence[str] api_versions: APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
|
|
1435
|
+
:param Sequence[str] operations: 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.
|
|
1436
|
+
:param Sequence[str] resource_names: ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
|
1437
|
+
:param Sequence[str] resources: Resources is a list of resources this rule applies to.
|
|
1438
|
+
|
|
1439
|
+
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.
|
|
1440
|
+
|
|
1441
|
+
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
|
|
1442
|
+
|
|
1443
|
+
Depending on the enclosing object, subresources might not be allowed. Required.
|
|
1444
|
+
:param str scope: 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 "*".
|
|
1445
|
+
"""
|
|
1446
|
+
if api_groups is not None:
|
|
1447
|
+
pulumi.set(__self__, "api_groups", api_groups)
|
|
1448
|
+
if api_versions is not None:
|
|
1449
|
+
pulumi.set(__self__, "api_versions", api_versions)
|
|
1450
|
+
if operations is not None:
|
|
1451
|
+
pulumi.set(__self__, "operations", operations)
|
|
1452
|
+
if resource_names is not None:
|
|
1453
|
+
pulumi.set(__self__, "resource_names", resource_names)
|
|
1454
|
+
if resources is not None:
|
|
1455
|
+
pulumi.set(__self__, "resources", resources)
|
|
1456
|
+
if scope is not None:
|
|
1457
|
+
pulumi.set(__self__, "scope", scope)
|
|
1458
|
+
|
|
1459
|
+
@property
|
|
1460
|
+
@pulumi.getter(name="apiGroups")
|
|
1461
|
+
def api_groups(self) -> Optional[Sequence[str]]:
|
|
1462
|
+
"""
|
|
1463
|
+
APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
|
|
1464
|
+
"""
|
|
1465
|
+
return pulumi.get(self, "api_groups")
|
|
1466
|
+
|
|
1467
|
+
@property
|
|
1468
|
+
@pulumi.getter(name="apiVersions")
|
|
1469
|
+
def api_versions(self) -> Optional[Sequence[str]]:
|
|
1470
|
+
"""
|
|
1471
|
+
APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
|
|
1472
|
+
"""
|
|
1473
|
+
return pulumi.get(self, "api_versions")
|
|
1474
|
+
|
|
1475
|
+
@property
|
|
1476
|
+
@pulumi.getter
|
|
1477
|
+
def operations(self) -> Optional[Sequence[str]]:
|
|
1478
|
+
"""
|
|
1479
|
+
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.
|
|
1480
|
+
"""
|
|
1481
|
+
return pulumi.get(self, "operations")
|
|
1482
|
+
|
|
1483
|
+
@property
|
|
1484
|
+
@pulumi.getter(name="resourceNames")
|
|
1485
|
+
def resource_names(self) -> Optional[Sequence[str]]:
|
|
1486
|
+
"""
|
|
1487
|
+
ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
|
1488
|
+
"""
|
|
1489
|
+
return pulumi.get(self, "resource_names")
|
|
1490
|
+
|
|
1491
|
+
@property
|
|
1492
|
+
@pulumi.getter
|
|
1493
|
+
def resources(self) -> Optional[Sequence[str]]:
|
|
1494
|
+
"""
|
|
1495
|
+
Resources is a list of resources this rule applies to.
|
|
1496
|
+
|
|
1497
|
+
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.
|
|
1498
|
+
|
|
1499
|
+
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
|
|
1500
|
+
|
|
1501
|
+
Depending on the enclosing object, subresources might not be allowed. Required.
|
|
1502
|
+
"""
|
|
1503
|
+
return pulumi.get(self, "resources")
|
|
1504
|
+
|
|
1505
|
+
@property
|
|
1506
|
+
@pulumi.getter
|
|
1507
|
+
def scope(self) -> Optional[str]:
|
|
1508
|
+
"""
|
|
1509
|
+
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 "*".
|
|
1510
|
+
"""
|
|
1511
|
+
return pulumi.get(self, "scope")
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
@pulumi.output_type
|
|
1515
|
+
class NamedRuleWithOperationsPatch(dict):
|
|
1516
|
+
"""
|
|
1517
|
+
NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
|
|
1518
|
+
"""
|
|
1519
|
+
@staticmethod
|
|
1520
|
+
def __key_warning(key: str):
|
|
1521
|
+
suggest = None
|
|
1522
|
+
if key == "apiGroups":
|
|
1523
|
+
suggest = "api_groups"
|
|
1524
|
+
elif key == "apiVersions":
|
|
1525
|
+
suggest = "api_versions"
|
|
1526
|
+
elif key == "resourceNames":
|
|
1527
|
+
suggest = "resource_names"
|
|
1528
|
+
|
|
1529
|
+
if suggest:
|
|
1530
|
+
pulumi.log.warn(f"Key '{key}' not found in NamedRuleWithOperationsPatch. Access the value via the '{suggest}' property getter instead.")
|
|
1531
|
+
|
|
1532
|
+
def __getitem__(self, key: str) -> Any:
|
|
1533
|
+
NamedRuleWithOperationsPatch.__key_warning(key)
|
|
1534
|
+
return super().__getitem__(key)
|
|
1535
|
+
|
|
1536
|
+
def get(self, key: str, default = None) -> Any:
|
|
1537
|
+
NamedRuleWithOperationsPatch.__key_warning(key)
|
|
1538
|
+
return super().get(key, default)
|
|
1539
|
+
|
|
1540
|
+
def __init__(__self__, *,
|
|
1541
|
+
api_groups: Optional[Sequence[str]] = None,
|
|
1542
|
+
api_versions: Optional[Sequence[str]] = None,
|
|
1543
|
+
operations: Optional[Sequence[str]] = None,
|
|
1544
|
+
resource_names: Optional[Sequence[str]] = None,
|
|
1545
|
+
resources: Optional[Sequence[str]] = None,
|
|
1546
|
+
scope: Optional[str] = None):
|
|
1547
|
+
"""
|
|
1548
|
+
NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
|
|
1549
|
+
:param Sequence[str] api_groups: APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
|
|
1550
|
+
:param Sequence[str] api_versions: APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
|
|
1551
|
+
:param Sequence[str] operations: 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.
|
|
1552
|
+
:param Sequence[str] resource_names: ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
|
1553
|
+
:param Sequence[str] resources: Resources is a list of resources this rule applies to.
|
|
1554
|
+
|
|
1555
|
+
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.
|
|
1556
|
+
|
|
1557
|
+
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
|
|
1558
|
+
|
|
1559
|
+
Depending on the enclosing object, subresources might not be allowed. Required.
|
|
1560
|
+
:param str scope: 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 "*".
|
|
1561
|
+
"""
|
|
1562
|
+
if api_groups is not None:
|
|
1563
|
+
pulumi.set(__self__, "api_groups", api_groups)
|
|
1564
|
+
if api_versions is not None:
|
|
1565
|
+
pulumi.set(__self__, "api_versions", api_versions)
|
|
1566
|
+
if operations is not None:
|
|
1567
|
+
pulumi.set(__self__, "operations", operations)
|
|
1568
|
+
if resource_names is not None:
|
|
1569
|
+
pulumi.set(__self__, "resource_names", resource_names)
|
|
1570
|
+
if resources is not None:
|
|
1571
|
+
pulumi.set(__self__, "resources", resources)
|
|
1572
|
+
if scope is not None:
|
|
1573
|
+
pulumi.set(__self__, "scope", scope)
|
|
1574
|
+
|
|
1575
|
+
@property
|
|
1576
|
+
@pulumi.getter(name="apiGroups")
|
|
1577
|
+
def api_groups(self) -> Optional[Sequence[str]]:
|
|
1578
|
+
"""
|
|
1579
|
+
APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
|
|
1580
|
+
"""
|
|
1581
|
+
return pulumi.get(self, "api_groups")
|
|
1582
|
+
|
|
1583
|
+
@property
|
|
1584
|
+
@pulumi.getter(name="apiVersions")
|
|
1585
|
+
def api_versions(self) -> Optional[Sequence[str]]:
|
|
1586
|
+
"""
|
|
1587
|
+
APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
|
|
1588
|
+
"""
|
|
1589
|
+
return pulumi.get(self, "api_versions")
|
|
1590
|
+
|
|
1591
|
+
@property
|
|
1592
|
+
@pulumi.getter
|
|
1593
|
+
def operations(self) -> Optional[Sequence[str]]:
|
|
1594
|
+
"""
|
|
1595
|
+
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.
|
|
1596
|
+
"""
|
|
1597
|
+
return pulumi.get(self, "operations")
|
|
1598
|
+
|
|
1599
|
+
@property
|
|
1600
|
+
@pulumi.getter(name="resourceNames")
|
|
1601
|
+
def resource_names(self) -> Optional[Sequence[str]]:
|
|
1602
|
+
"""
|
|
1603
|
+
ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
|
1604
|
+
"""
|
|
1605
|
+
return pulumi.get(self, "resource_names")
|
|
1606
|
+
|
|
1607
|
+
@property
|
|
1608
|
+
@pulumi.getter
|
|
1609
|
+
def resources(self) -> Optional[Sequence[str]]:
|
|
1610
|
+
"""
|
|
1611
|
+
Resources is a list of resources this rule applies to.
|
|
1612
|
+
|
|
1613
|
+
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.
|
|
1614
|
+
|
|
1615
|
+
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
|
|
1616
|
+
|
|
1617
|
+
Depending on the enclosing object, subresources might not be allowed. Required.
|
|
1618
|
+
"""
|
|
1619
|
+
return pulumi.get(self, "resources")
|
|
1620
|
+
|
|
1621
|
+
@property
|
|
1622
|
+
@pulumi.getter
|
|
1623
|
+
def scope(self) -> Optional[str]:
|
|
1624
|
+
"""
|
|
1625
|
+
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 "*".
|
|
1626
|
+
"""
|
|
1627
|
+
return pulumi.get(self, "scope")
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
@pulumi.output_type
|
|
1631
|
+
class ParamKind(dict):
|
|
1632
|
+
"""
|
|
1633
|
+
ParamKind is a tuple of Group Kind and Version.
|
|
1634
|
+
"""
|
|
1635
|
+
@staticmethod
|
|
1636
|
+
def __key_warning(key: str):
|
|
1637
|
+
suggest = None
|
|
1638
|
+
if key == "apiVersion":
|
|
1639
|
+
suggest = "api_version"
|
|
1640
|
+
|
|
1641
|
+
if suggest:
|
|
1642
|
+
pulumi.log.warn(f"Key '{key}' not found in ParamKind. Access the value via the '{suggest}' property getter instead.")
|
|
1643
|
+
|
|
1644
|
+
def __getitem__(self, key: str) -> Any:
|
|
1645
|
+
ParamKind.__key_warning(key)
|
|
1646
|
+
return super().__getitem__(key)
|
|
1647
|
+
|
|
1648
|
+
def get(self, key: str, default = None) -> Any:
|
|
1649
|
+
ParamKind.__key_warning(key)
|
|
1650
|
+
return super().get(key, default)
|
|
1651
|
+
|
|
1652
|
+
def __init__(__self__, *,
|
|
1653
|
+
api_version: Optional[str] = None,
|
|
1654
|
+
kind: Optional[str] = None):
|
|
1655
|
+
"""
|
|
1656
|
+
ParamKind is a tuple of Group Kind and Version.
|
|
1657
|
+
:param str api_version: APIVersion is the API group version the resources belong to. In format of "group/version". Required.
|
|
1658
|
+
:param str kind: Kind is the API kind the resources belong to. Required.
|
|
1659
|
+
"""
|
|
1660
|
+
if api_version is not None:
|
|
1661
|
+
pulumi.set(__self__, "api_version", api_version)
|
|
1662
|
+
if kind is not None:
|
|
1663
|
+
pulumi.set(__self__, "kind", kind)
|
|
1664
|
+
|
|
1665
|
+
@property
|
|
1666
|
+
@pulumi.getter(name="apiVersion")
|
|
1667
|
+
def api_version(self) -> Optional[str]:
|
|
1668
|
+
"""
|
|
1669
|
+
APIVersion is the API group version the resources belong to. In format of "group/version". Required.
|
|
1670
|
+
"""
|
|
1671
|
+
return pulumi.get(self, "api_version")
|
|
1672
|
+
|
|
1673
|
+
@property
|
|
1674
|
+
@pulumi.getter
|
|
1675
|
+
def kind(self) -> Optional[str]:
|
|
1676
|
+
"""
|
|
1677
|
+
Kind is the API kind the resources belong to. Required.
|
|
1678
|
+
"""
|
|
1679
|
+
return pulumi.get(self, "kind")
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
@pulumi.output_type
|
|
1683
|
+
class ParamKindPatch(dict):
|
|
1684
|
+
"""
|
|
1685
|
+
ParamKind is a tuple of Group Kind and Version.
|
|
1686
|
+
"""
|
|
1687
|
+
@staticmethod
|
|
1688
|
+
def __key_warning(key: str):
|
|
1689
|
+
suggest = None
|
|
1690
|
+
if key == "apiVersion":
|
|
1691
|
+
suggest = "api_version"
|
|
1692
|
+
|
|
1693
|
+
if suggest:
|
|
1694
|
+
pulumi.log.warn(f"Key '{key}' not found in ParamKindPatch. Access the value via the '{suggest}' property getter instead.")
|
|
1695
|
+
|
|
1696
|
+
def __getitem__(self, key: str) -> Any:
|
|
1697
|
+
ParamKindPatch.__key_warning(key)
|
|
1698
|
+
return super().__getitem__(key)
|
|
1699
|
+
|
|
1700
|
+
def get(self, key: str, default = None) -> Any:
|
|
1701
|
+
ParamKindPatch.__key_warning(key)
|
|
1702
|
+
return super().get(key, default)
|
|
1703
|
+
|
|
1704
|
+
def __init__(__self__, *,
|
|
1705
|
+
api_version: Optional[str] = None,
|
|
1706
|
+
kind: Optional[str] = None):
|
|
1707
|
+
"""
|
|
1708
|
+
ParamKind is a tuple of Group Kind and Version.
|
|
1709
|
+
:param str api_version: APIVersion is the API group version the resources belong to. In format of "group/version". Required.
|
|
1710
|
+
:param str kind: Kind is the API kind the resources belong to. Required.
|
|
1711
|
+
"""
|
|
1712
|
+
if api_version is not None:
|
|
1713
|
+
pulumi.set(__self__, "api_version", api_version)
|
|
1714
|
+
if kind is not None:
|
|
1715
|
+
pulumi.set(__self__, "kind", kind)
|
|
1716
|
+
|
|
1717
|
+
@property
|
|
1718
|
+
@pulumi.getter(name="apiVersion")
|
|
1719
|
+
def api_version(self) -> Optional[str]:
|
|
1720
|
+
"""
|
|
1721
|
+
APIVersion is the API group version the resources belong to. In format of "group/version". Required.
|
|
1722
|
+
"""
|
|
1723
|
+
return pulumi.get(self, "api_version")
|
|
1724
|
+
|
|
1725
|
+
@property
|
|
1726
|
+
@pulumi.getter
|
|
1727
|
+
def kind(self) -> Optional[str]:
|
|
1728
|
+
"""
|
|
1729
|
+
Kind is the API kind the resources belong to. Required.
|
|
1730
|
+
"""
|
|
1731
|
+
return pulumi.get(self, "kind")
|
|
1732
|
+
|
|
1733
|
+
|
|
1734
|
+
@pulumi.output_type
|
|
1735
|
+
class ParamRef(dict):
|
|
1736
|
+
"""
|
|
1737
|
+
ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
|
|
1738
|
+
"""
|
|
1739
|
+
@staticmethod
|
|
1740
|
+
def __key_warning(key: str):
|
|
1741
|
+
suggest = None
|
|
1742
|
+
if key == "parameterNotFoundAction":
|
|
1743
|
+
suggest = "parameter_not_found_action"
|
|
1744
|
+
|
|
1745
|
+
if suggest:
|
|
1746
|
+
pulumi.log.warn(f"Key '{key}' not found in ParamRef. Access the value via the '{suggest}' property getter instead.")
|
|
1747
|
+
|
|
1748
|
+
def __getitem__(self, key: str) -> Any:
|
|
1749
|
+
ParamRef.__key_warning(key)
|
|
1750
|
+
return super().__getitem__(key)
|
|
1751
|
+
|
|
1752
|
+
def get(self, key: str, default = None) -> Any:
|
|
1753
|
+
ParamRef.__key_warning(key)
|
|
1754
|
+
return super().get(key, default)
|
|
1755
|
+
|
|
1756
|
+
def __init__(__self__, *,
|
|
1757
|
+
name: Optional[str] = None,
|
|
1758
|
+
namespace: Optional[str] = None,
|
|
1759
|
+
parameter_not_found_action: Optional[str] = None,
|
|
1760
|
+
selector: Optional['_meta.v1.outputs.LabelSelector'] = None):
|
|
1761
|
+
"""
|
|
1762
|
+
ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
|
|
1763
|
+
:param str name: name is the name of the resource being referenced.
|
|
1764
|
+
|
|
1765
|
+
One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.
|
|
1766
|
+
|
|
1767
|
+
A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped.
|
|
1768
|
+
:param str namespace: namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.
|
|
1769
|
+
|
|
1770
|
+
A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.
|
|
1771
|
+
|
|
1772
|
+
- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.
|
|
1773
|
+
|
|
1774
|
+
- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.
|
|
1775
|
+
:param str parameter_not_found_action: `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.
|
|
1776
|
+
|
|
1777
|
+
Allowed values are `Allow` or `Deny`
|
|
1778
|
+
|
|
1779
|
+
Required
|
|
1780
|
+
:param '_meta.v1.LabelSelectorArgs' selector: selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.
|
|
1781
|
+
|
|
1782
|
+
If multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.
|
|
1783
|
+
|
|
1784
|
+
One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.
|
|
1785
|
+
"""
|
|
1786
|
+
if name is not None:
|
|
1787
|
+
pulumi.set(__self__, "name", name)
|
|
1788
|
+
if namespace is not None:
|
|
1789
|
+
pulumi.set(__self__, "namespace", namespace)
|
|
1790
|
+
if parameter_not_found_action is not None:
|
|
1791
|
+
pulumi.set(__self__, "parameter_not_found_action", parameter_not_found_action)
|
|
1792
|
+
if selector is not None:
|
|
1793
|
+
pulumi.set(__self__, "selector", selector)
|
|
1794
|
+
|
|
1795
|
+
@property
|
|
1796
|
+
@pulumi.getter
|
|
1797
|
+
def name(self) -> Optional[str]:
|
|
1798
|
+
"""
|
|
1799
|
+
name is the name of the resource being referenced.
|
|
1800
|
+
|
|
1801
|
+
One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.
|
|
1802
|
+
|
|
1803
|
+
A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped.
|
|
1804
|
+
"""
|
|
1805
|
+
return pulumi.get(self, "name")
|
|
1806
|
+
|
|
1807
|
+
@property
|
|
1808
|
+
@pulumi.getter
|
|
1809
|
+
def namespace(self) -> Optional[str]:
|
|
1810
|
+
"""
|
|
1811
|
+
namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.
|
|
1812
|
+
|
|
1813
|
+
A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.
|
|
1814
|
+
|
|
1815
|
+
- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.
|
|
1816
|
+
|
|
1817
|
+
- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.
|
|
1818
|
+
"""
|
|
1819
|
+
return pulumi.get(self, "namespace")
|
|
1820
|
+
|
|
1821
|
+
@property
|
|
1822
|
+
@pulumi.getter(name="parameterNotFoundAction")
|
|
1823
|
+
def parameter_not_found_action(self) -> Optional[str]:
|
|
1824
|
+
"""
|
|
1825
|
+
`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.
|
|
1826
|
+
|
|
1827
|
+
Allowed values are `Allow` or `Deny`
|
|
1828
|
+
|
|
1829
|
+
Required
|
|
1830
|
+
"""
|
|
1831
|
+
return pulumi.get(self, "parameter_not_found_action")
|
|
1832
|
+
|
|
1833
|
+
@property
|
|
1834
|
+
@pulumi.getter
|
|
1835
|
+
def selector(self) -> Optional['_meta.v1.outputs.LabelSelector']:
|
|
1836
|
+
"""
|
|
1837
|
+
selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.
|
|
1838
|
+
|
|
1839
|
+
If multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.
|
|
1840
|
+
|
|
1841
|
+
One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.
|
|
1842
|
+
"""
|
|
1843
|
+
return pulumi.get(self, "selector")
|
|
1844
|
+
|
|
1845
|
+
|
|
1846
|
+
@pulumi.output_type
|
|
1847
|
+
class ParamRefPatch(dict):
|
|
1848
|
+
"""
|
|
1849
|
+
ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
|
|
1850
|
+
"""
|
|
1851
|
+
@staticmethod
|
|
1852
|
+
def __key_warning(key: str):
|
|
1853
|
+
suggest = None
|
|
1854
|
+
if key == "parameterNotFoundAction":
|
|
1855
|
+
suggest = "parameter_not_found_action"
|
|
1856
|
+
|
|
1857
|
+
if suggest:
|
|
1858
|
+
pulumi.log.warn(f"Key '{key}' not found in ParamRefPatch. Access the value via the '{suggest}' property getter instead.")
|
|
1859
|
+
|
|
1860
|
+
def __getitem__(self, key: str) -> Any:
|
|
1861
|
+
ParamRefPatch.__key_warning(key)
|
|
1862
|
+
return super().__getitem__(key)
|
|
1863
|
+
|
|
1864
|
+
def get(self, key: str, default = None) -> Any:
|
|
1865
|
+
ParamRefPatch.__key_warning(key)
|
|
1866
|
+
return super().get(key, default)
|
|
1867
|
+
|
|
1868
|
+
def __init__(__self__, *,
|
|
1869
|
+
name: Optional[str] = None,
|
|
1870
|
+
namespace: Optional[str] = None,
|
|
1871
|
+
parameter_not_found_action: Optional[str] = None,
|
|
1872
|
+
selector: Optional['_meta.v1.outputs.LabelSelectorPatch'] = None):
|
|
1873
|
+
"""
|
|
1874
|
+
ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
|
|
1875
|
+
:param str name: name is the name of the resource being referenced.
|
|
1876
|
+
|
|
1877
|
+
One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.
|
|
1878
|
+
|
|
1879
|
+
A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped.
|
|
1880
|
+
:param str namespace: namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.
|
|
1881
|
+
|
|
1882
|
+
A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.
|
|
1883
|
+
|
|
1884
|
+
- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.
|
|
1885
|
+
|
|
1886
|
+
- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.
|
|
1887
|
+
:param str parameter_not_found_action: `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.
|
|
1888
|
+
|
|
1889
|
+
Allowed values are `Allow` or `Deny`
|
|
1890
|
+
|
|
1891
|
+
Required
|
|
1892
|
+
:param '_meta.v1.LabelSelectorPatchArgs' selector: selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.
|
|
1893
|
+
|
|
1894
|
+
If multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.
|
|
1895
|
+
|
|
1896
|
+
One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.
|
|
1897
|
+
"""
|
|
1898
|
+
if name is not None:
|
|
1899
|
+
pulumi.set(__self__, "name", name)
|
|
1900
|
+
if namespace is not None:
|
|
1901
|
+
pulumi.set(__self__, "namespace", namespace)
|
|
1902
|
+
if parameter_not_found_action is not None:
|
|
1903
|
+
pulumi.set(__self__, "parameter_not_found_action", parameter_not_found_action)
|
|
1904
|
+
if selector is not None:
|
|
1905
|
+
pulumi.set(__self__, "selector", selector)
|
|
1906
|
+
|
|
1907
|
+
@property
|
|
1908
|
+
@pulumi.getter
|
|
1909
|
+
def name(self) -> Optional[str]:
|
|
1910
|
+
"""
|
|
1911
|
+
name is the name of the resource being referenced.
|
|
1912
|
+
|
|
1913
|
+
One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.
|
|
1914
|
+
|
|
1915
|
+
A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped.
|
|
1916
|
+
"""
|
|
1917
|
+
return pulumi.get(self, "name")
|
|
1918
|
+
|
|
1919
|
+
@property
|
|
1920
|
+
@pulumi.getter
|
|
1921
|
+
def namespace(self) -> Optional[str]:
|
|
1922
|
+
"""
|
|
1923
|
+
namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.
|
|
1924
|
+
|
|
1925
|
+
A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.
|
|
1926
|
+
|
|
1927
|
+
- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.
|
|
1928
|
+
|
|
1929
|
+
- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.
|
|
1930
|
+
"""
|
|
1931
|
+
return pulumi.get(self, "namespace")
|
|
1932
|
+
|
|
1933
|
+
@property
|
|
1934
|
+
@pulumi.getter(name="parameterNotFoundAction")
|
|
1935
|
+
def parameter_not_found_action(self) -> Optional[str]:
|
|
1936
|
+
"""
|
|
1937
|
+
`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.
|
|
1938
|
+
|
|
1939
|
+
Allowed values are `Allow` or `Deny`
|
|
1940
|
+
|
|
1941
|
+
Required
|
|
1942
|
+
"""
|
|
1943
|
+
return pulumi.get(self, "parameter_not_found_action")
|
|
1944
|
+
|
|
1945
|
+
@property
|
|
1946
|
+
@pulumi.getter
|
|
1947
|
+
def selector(self) -> Optional['_meta.v1.outputs.LabelSelectorPatch']:
|
|
1948
|
+
"""
|
|
1949
|
+
selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.
|
|
1950
|
+
|
|
1951
|
+
If multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.
|
|
1952
|
+
|
|
1953
|
+
One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.
|
|
1954
|
+
"""
|
|
1955
|
+
return pulumi.get(self, "selector")
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
@pulumi.output_type
|
|
1959
|
+
class RuleWithOperations(dict):
|
|
1960
|
+
"""
|
|
1961
|
+
RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
|
|
1962
|
+
"""
|
|
1963
|
+
@staticmethod
|
|
1964
|
+
def __key_warning(key: str):
|
|
1965
|
+
suggest = None
|
|
1966
|
+
if key == "apiGroups":
|
|
1967
|
+
suggest = "api_groups"
|
|
1968
|
+
elif key == "apiVersions":
|
|
1969
|
+
suggest = "api_versions"
|
|
1970
|
+
|
|
1971
|
+
if suggest:
|
|
1972
|
+
pulumi.log.warn(f"Key '{key}' not found in RuleWithOperations. Access the value via the '{suggest}' property getter instead.")
|
|
1973
|
+
|
|
1974
|
+
def __getitem__(self, key: str) -> Any:
|
|
1975
|
+
RuleWithOperations.__key_warning(key)
|
|
1976
|
+
return super().__getitem__(key)
|
|
1977
|
+
|
|
1978
|
+
def get(self, key: str, default = None) -> Any:
|
|
1979
|
+
RuleWithOperations.__key_warning(key)
|
|
1980
|
+
return super().get(key, default)
|
|
1981
|
+
|
|
1982
|
+
def __init__(__self__, *,
|
|
1983
|
+
api_groups: Optional[Sequence[str]] = None,
|
|
1984
|
+
api_versions: Optional[Sequence[str]] = None,
|
|
1985
|
+
operations: Optional[Sequence[str]] = None,
|
|
1986
|
+
resources: Optional[Sequence[str]] = None,
|
|
1987
|
+
scope: Optional[str] = None):
|
|
1988
|
+
"""
|
|
1989
|
+
RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
|
|
1990
|
+
:param Sequence[str] api_groups: APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
|
|
1991
|
+
:param Sequence[str] api_versions: APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
|
|
1992
|
+
:param Sequence[str] operations: 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.
|
|
1993
|
+
:param Sequence[str] resources: Resources is a list of resources this rule applies to.
|
|
1994
|
+
|
|
1995
|
+
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.
|
|
1996
|
+
|
|
1997
|
+
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
|
|
1998
|
+
|
|
1999
|
+
Depending on the enclosing object, subresources might not be allowed. Required.
|
|
2000
|
+
:param str scope: 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 "*".
|
|
2001
|
+
"""
|
|
2002
|
+
if api_groups is not None:
|
|
2003
|
+
pulumi.set(__self__, "api_groups", api_groups)
|
|
2004
|
+
if api_versions is not None:
|
|
2005
|
+
pulumi.set(__self__, "api_versions", api_versions)
|
|
2006
|
+
if operations is not None:
|
|
2007
|
+
pulumi.set(__self__, "operations", operations)
|
|
2008
|
+
if resources is not None:
|
|
2009
|
+
pulumi.set(__self__, "resources", resources)
|
|
2010
|
+
if scope is not None:
|
|
2011
|
+
pulumi.set(__self__, "scope", scope)
|
|
2012
|
+
|
|
2013
|
+
@property
|
|
2014
|
+
@pulumi.getter(name="apiGroups")
|
|
2015
|
+
def api_groups(self) -> Optional[Sequence[str]]:
|
|
2016
|
+
"""
|
|
2017
|
+
APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
|
|
2018
|
+
"""
|
|
2019
|
+
return pulumi.get(self, "api_groups")
|
|
2020
|
+
|
|
2021
|
+
@property
|
|
2022
|
+
@pulumi.getter(name="apiVersions")
|
|
2023
|
+
def api_versions(self) -> Optional[Sequence[str]]:
|
|
2024
|
+
"""
|
|
2025
|
+
APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
|
|
2026
|
+
"""
|
|
2027
|
+
return pulumi.get(self, "api_versions")
|
|
2028
|
+
|
|
2029
|
+
@property
|
|
2030
|
+
@pulumi.getter
|
|
2031
|
+
def operations(self) -> Optional[Sequence[str]]:
|
|
2032
|
+
"""
|
|
2033
|
+
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.
|
|
2034
|
+
"""
|
|
2035
|
+
return pulumi.get(self, "operations")
|
|
2036
|
+
|
|
2037
|
+
@property
|
|
2038
|
+
@pulumi.getter
|
|
2039
|
+
def resources(self) -> Optional[Sequence[str]]:
|
|
2040
|
+
"""
|
|
2041
|
+
Resources is a list of resources this rule applies to.
|
|
2042
|
+
|
|
2043
|
+
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.
|
|
2044
|
+
|
|
2045
|
+
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
|
|
2046
|
+
|
|
2047
|
+
Depending on the enclosing object, subresources might not be allowed. Required.
|
|
2048
|
+
"""
|
|
2049
|
+
return pulumi.get(self, "resources")
|
|
2050
|
+
|
|
2051
|
+
@property
|
|
2052
|
+
@pulumi.getter
|
|
2053
|
+
def scope(self) -> Optional[str]:
|
|
2054
|
+
"""
|
|
2055
|
+
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 "*".
|
|
2056
|
+
"""
|
|
2057
|
+
return pulumi.get(self, "scope")
|
|
2058
|
+
|
|
2059
|
+
|
|
2060
|
+
@pulumi.output_type
|
|
2061
|
+
class RuleWithOperationsPatch(dict):
|
|
2062
|
+
"""
|
|
2063
|
+
RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
|
|
2064
|
+
"""
|
|
2065
|
+
@staticmethod
|
|
2066
|
+
def __key_warning(key: str):
|
|
2067
|
+
suggest = None
|
|
2068
|
+
if key == "apiGroups":
|
|
2069
|
+
suggest = "api_groups"
|
|
2070
|
+
elif key == "apiVersions":
|
|
2071
|
+
suggest = "api_versions"
|
|
2072
|
+
|
|
2073
|
+
if suggest:
|
|
2074
|
+
pulumi.log.warn(f"Key '{key}' not found in RuleWithOperationsPatch. Access the value via the '{suggest}' property getter instead.")
|
|
2075
|
+
|
|
2076
|
+
def __getitem__(self, key: str) -> Any:
|
|
2077
|
+
RuleWithOperationsPatch.__key_warning(key)
|
|
2078
|
+
return super().__getitem__(key)
|
|
2079
|
+
|
|
2080
|
+
def get(self, key: str, default = None) -> Any:
|
|
2081
|
+
RuleWithOperationsPatch.__key_warning(key)
|
|
2082
|
+
return super().get(key, default)
|
|
2083
|
+
|
|
2084
|
+
def __init__(__self__, *,
|
|
2085
|
+
api_groups: Optional[Sequence[str]] = None,
|
|
2086
|
+
api_versions: Optional[Sequence[str]] = None,
|
|
2087
|
+
operations: Optional[Sequence[str]] = None,
|
|
2088
|
+
resources: Optional[Sequence[str]] = None,
|
|
2089
|
+
scope: Optional[str] = None):
|
|
2090
|
+
"""
|
|
2091
|
+
RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
|
|
2092
|
+
:param Sequence[str] api_groups: APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
|
|
2093
|
+
:param Sequence[str] api_versions: APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
|
|
2094
|
+
:param Sequence[str] operations: 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.
|
|
2095
|
+
:param Sequence[str] resources: Resources is a list of resources this rule applies to.
|
|
2096
|
+
|
|
2097
|
+
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.
|
|
2098
|
+
|
|
2099
|
+
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
|
|
2100
|
+
|
|
2101
|
+
Depending on the enclosing object, subresources might not be allowed. Required.
|
|
2102
|
+
:param str scope: 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 "*".
|
|
2103
|
+
"""
|
|
2104
|
+
if api_groups is not None:
|
|
2105
|
+
pulumi.set(__self__, "api_groups", api_groups)
|
|
2106
|
+
if api_versions is not None:
|
|
2107
|
+
pulumi.set(__self__, "api_versions", api_versions)
|
|
2108
|
+
if operations is not None:
|
|
2109
|
+
pulumi.set(__self__, "operations", operations)
|
|
2110
|
+
if resources is not None:
|
|
2111
|
+
pulumi.set(__self__, "resources", resources)
|
|
2112
|
+
if scope is not None:
|
|
2113
|
+
pulumi.set(__self__, "scope", scope)
|
|
2114
|
+
|
|
2115
|
+
@property
|
|
2116
|
+
@pulumi.getter(name="apiGroups")
|
|
2117
|
+
def api_groups(self) -> Optional[Sequence[str]]:
|
|
2118
|
+
"""
|
|
2119
|
+
APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.
|
|
2120
|
+
"""
|
|
2121
|
+
return pulumi.get(self, "api_groups")
|
|
2122
|
+
|
|
2123
|
+
@property
|
|
2124
|
+
@pulumi.getter(name="apiVersions")
|
|
2125
|
+
def api_versions(self) -> Optional[Sequence[str]]:
|
|
2126
|
+
"""
|
|
2127
|
+
APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.
|
|
2128
|
+
"""
|
|
2129
|
+
return pulumi.get(self, "api_versions")
|
|
2130
|
+
|
|
2131
|
+
@property
|
|
2132
|
+
@pulumi.getter
|
|
2133
|
+
def operations(self) -> Optional[Sequence[str]]:
|
|
2134
|
+
"""
|
|
2135
|
+
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.
|
|
2136
|
+
"""
|
|
2137
|
+
return pulumi.get(self, "operations")
|
|
2138
|
+
|
|
2139
|
+
@property
|
|
2140
|
+
@pulumi.getter
|
|
2141
|
+
def resources(self) -> Optional[Sequence[str]]:
|
|
2142
|
+
"""
|
|
2143
|
+
Resources is a list of resources this rule applies to.
|
|
2144
|
+
|
|
2145
|
+
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.
|
|
2146
|
+
|
|
2147
|
+
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
|
|
2148
|
+
|
|
2149
|
+
Depending on the enclosing object, subresources might not be allowed. Required.
|
|
2150
|
+
"""
|
|
2151
|
+
return pulumi.get(self, "resources")
|
|
2152
|
+
|
|
2153
|
+
@property
|
|
2154
|
+
@pulumi.getter
|
|
2155
|
+
def scope(self) -> Optional[str]:
|
|
2156
|
+
"""
|
|
2157
|
+
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 "*".
|
|
2158
|
+
"""
|
|
2159
|
+
return pulumi.get(self, "scope")
|
|
2160
|
+
|
|
2161
|
+
|
|
2162
|
+
@pulumi.output_type
|
|
2163
|
+
class ServiceReference(dict):
|
|
2164
|
+
"""
|
|
2165
|
+
ServiceReference holds a reference to Service.legacy.k8s.io
|
|
2166
|
+
"""
|
|
2167
|
+
def __init__(__self__, *,
|
|
2168
|
+
name: str,
|
|
2169
|
+
namespace: str,
|
|
2170
|
+
path: Optional[str] = None,
|
|
2171
|
+
port: Optional[int] = None):
|
|
2172
|
+
"""
|
|
2173
|
+
ServiceReference holds a reference to Service.legacy.k8s.io
|
|
2174
|
+
:param str name: `name` is the name of the service. Required
|
|
2175
|
+
:param str namespace: `namespace` is the namespace of the service. Required
|
|
2176
|
+
:param str path: `path` is an optional URL path which will be sent in any request to this service.
|
|
2177
|
+
:param int port: 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).
|
|
2178
|
+
"""
|
|
2179
|
+
pulumi.set(__self__, "name", name)
|
|
2180
|
+
pulumi.set(__self__, "namespace", namespace)
|
|
2181
|
+
if path is not None:
|
|
2182
|
+
pulumi.set(__self__, "path", path)
|
|
2183
|
+
if port is not None:
|
|
2184
|
+
pulumi.set(__self__, "port", port)
|
|
2185
|
+
|
|
2186
|
+
@property
|
|
2187
|
+
@pulumi.getter
|
|
2188
|
+
def name(self) -> str:
|
|
2189
|
+
"""
|
|
2190
|
+
`name` is the name of the service. Required
|
|
2191
|
+
"""
|
|
2192
|
+
return pulumi.get(self, "name")
|
|
2193
|
+
|
|
2194
|
+
@property
|
|
2195
|
+
@pulumi.getter
|
|
2196
|
+
def namespace(self) -> str:
|
|
2197
|
+
"""
|
|
2198
|
+
`namespace` is the namespace of the service. Required
|
|
2199
|
+
"""
|
|
2200
|
+
return pulumi.get(self, "namespace")
|
|
2201
|
+
|
|
2202
|
+
@property
|
|
2203
|
+
@pulumi.getter
|
|
2204
|
+
def path(self) -> Optional[str]:
|
|
2205
|
+
"""
|
|
2206
|
+
`path` is an optional URL path which will be sent in any request to this service.
|
|
2207
|
+
"""
|
|
2208
|
+
return pulumi.get(self, "path")
|
|
2209
|
+
|
|
2210
|
+
@property
|
|
2211
|
+
@pulumi.getter
|
|
2212
|
+
def port(self) -> Optional[int]:
|
|
2213
|
+
"""
|
|
2214
|
+
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).
|
|
2215
|
+
"""
|
|
2216
|
+
return pulumi.get(self, "port")
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
@pulumi.output_type
|
|
2220
|
+
class ServiceReferencePatch(dict):
|
|
2221
|
+
"""
|
|
2222
|
+
ServiceReference holds a reference to Service.legacy.k8s.io
|
|
2223
|
+
"""
|
|
2224
|
+
def __init__(__self__, *,
|
|
2225
|
+
name: Optional[str] = None,
|
|
2226
|
+
namespace: Optional[str] = None,
|
|
2227
|
+
path: Optional[str] = None,
|
|
2228
|
+
port: Optional[int] = None):
|
|
2229
|
+
"""
|
|
2230
|
+
ServiceReference holds a reference to Service.legacy.k8s.io
|
|
2231
|
+
:param str name: `name` is the name of the service. Required
|
|
2232
|
+
:param str namespace: `namespace` is the namespace of the service. Required
|
|
2233
|
+
:param str path: `path` is an optional URL path which will be sent in any request to this service.
|
|
2234
|
+
:param int port: 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).
|
|
2235
|
+
"""
|
|
2236
|
+
if name is not None:
|
|
2237
|
+
pulumi.set(__self__, "name", name)
|
|
2238
|
+
if namespace is not None:
|
|
2239
|
+
pulumi.set(__self__, "namespace", namespace)
|
|
2240
|
+
if path is not None:
|
|
2241
|
+
pulumi.set(__self__, "path", path)
|
|
2242
|
+
if port is not None:
|
|
2243
|
+
pulumi.set(__self__, "port", port)
|
|
2244
|
+
|
|
2245
|
+
@property
|
|
2246
|
+
@pulumi.getter
|
|
2247
|
+
def name(self) -> Optional[str]:
|
|
2248
|
+
"""
|
|
2249
|
+
`name` is the name of the service. Required
|
|
2250
|
+
"""
|
|
2251
|
+
return pulumi.get(self, "name")
|
|
2252
|
+
|
|
2253
|
+
@property
|
|
2254
|
+
@pulumi.getter
|
|
2255
|
+
def namespace(self) -> Optional[str]:
|
|
2256
|
+
"""
|
|
2257
|
+
`namespace` is the namespace of the service. Required
|
|
2258
|
+
"""
|
|
2259
|
+
return pulumi.get(self, "namespace")
|
|
2260
|
+
|
|
2261
|
+
@property
|
|
2262
|
+
@pulumi.getter
|
|
2263
|
+
def path(self) -> Optional[str]:
|
|
2264
|
+
"""
|
|
2265
|
+
`path` is an optional URL path which will be sent in any request to this service.
|
|
2266
|
+
"""
|
|
2267
|
+
return pulumi.get(self, "path")
|
|
2268
|
+
|
|
2269
|
+
@property
|
|
2270
|
+
@pulumi.getter
|
|
2271
|
+
def port(self) -> Optional[int]:
|
|
2272
|
+
"""
|
|
2273
|
+
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).
|
|
2274
|
+
"""
|
|
2275
|
+
return pulumi.get(self, "port")
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
@pulumi.output_type
|
|
2279
|
+
class TypeChecking(dict):
|
|
2280
|
+
"""
|
|
2281
|
+
TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy
|
|
2282
|
+
"""
|
|
2283
|
+
@staticmethod
|
|
2284
|
+
def __key_warning(key: str):
|
|
2285
|
+
suggest = None
|
|
2286
|
+
if key == "expressionWarnings":
|
|
2287
|
+
suggest = "expression_warnings"
|
|
2288
|
+
|
|
2289
|
+
if suggest:
|
|
2290
|
+
pulumi.log.warn(f"Key '{key}' not found in TypeChecking. Access the value via the '{suggest}' property getter instead.")
|
|
2291
|
+
|
|
2292
|
+
def __getitem__(self, key: str) -> Any:
|
|
2293
|
+
TypeChecking.__key_warning(key)
|
|
2294
|
+
return super().__getitem__(key)
|
|
2295
|
+
|
|
2296
|
+
def get(self, key: str, default = None) -> Any:
|
|
2297
|
+
TypeChecking.__key_warning(key)
|
|
2298
|
+
return super().get(key, default)
|
|
2299
|
+
|
|
2300
|
+
def __init__(__self__, *,
|
|
2301
|
+
expression_warnings: Optional[Sequence['outputs.ExpressionWarning']] = None):
|
|
2302
|
+
"""
|
|
2303
|
+
TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy
|
|
2304
|
+
:param Sequence['ExpressionWarningArgs'] expression_warnings: The type checking warnings for each expression.
|
|
2305
|
+
"""
|
|
2306
|
+
if expression_warnings is not None:
|
|
2307
|
+
pulumi.set(__self__, "expression_warnings", expression_warnings)
|
|
2308
|
+
|
|
2309
|
+
@property
|
|
2310
|
+
@pulumi.getter(name="expressionWarnings")
|
|
2311
|
+
def expression_warnings(self) -> Optional[Sequence['outputs.ExpressionWarning']]:
|
|
2312
|
+
"""
|
|
2313
|
+
The type checking warnings for each expression.
|
|
2314
|
+
"""
|
|
2315
|
+
return pulumi.get(self, "expression_warnings")
|
|
2316
|
+
|
|
2317
|
+
|
|
2318
|
+
@pulumi.output_type
|
|
2319
|
+
class TypeCheckingPatch(dict):
|
|
2320
|
+
"""
|
|
2321
|
+
TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy
|
|
2322
|
+
"""
|
|
2323
|
+
@staticmethod
|
|
2324
|
+
def __key_warning(key: str):
|
|
2325
|
+
suggest = None
|
|
2326
|
+
if key == "expressionWarnings":
|
|
2327
|
+
suggest = "expression_warnings"
|
|
2328
|
+
|
|
2329
|
+
if suggest:
|
|
2330
|
+
pulumi.log.warn(f"Key '{key}' not found in TypeCheckingPatch. Access the value via the '{suggest}' property getter instead.")
|
|
2331
|
+
|
|
2332
|
+
def __getitem__(self, key: str) -> Any:
|
|
2333
|
+
TypeCheckingPatch.__key_warning(key)
|
|
2334
|
+
return super().__getitem__(key)
|
|
2335
|
+
|
|
2336
|
+
def get(self, key: str, default = None) -> Any:
|
|
2337
|
+
TypeCheckingPatch.__key_warning(key)
|
|
2338
|
+
return super().get(key, default)
|
|
2339
|
+
|
|
2340
|
+
def __init__(__self__, *,
|
|
2341
|
+
expression_warnings: Optional[Sequence['outputs.ExpressionWarningPatch']] = None):
|
|
2342
|
+
"""
|
|
2343
|
+
TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy
|
|
2344
|
+
:param Sequence['ExpressionWarningPatchArgs'] expression_warnings: The type checking warnings for each expression.
|
|
2345
|
+
"""
|
|
2346
|
+
if expression_warnings is not None:
|
|
2347
|
+
pulumi.set(__self__, "expression_warnings", expression_warnings)
|
|
2348
|
+
|
|
2349
|
+
@property
|
|
2350
|
+
@pulumi.getter(name="expressionWarnings")
|
|
2351
|
+
def expression_warnings(self) -> Optional[Sequence['outputs.ExpressionWarningPatch']]:
|
|
2352
|
+
"""
|
|
2353
|
+
The type checking warnings for each expression.
|
|
2354
|
+
"""
|
|
2355
|
+
return pulumi.get(self, "expression_warnings")
|
|
2356
|
+
|
|
2357
|
+
|
|
2358
|
+
@pulumi.output_type
|
|
2359
|
+
class ValidatingAdmissionPolicy(dict):
|
|
2360
|
+
"""
|
|
2361
|
+
ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
|
|
2362
|
+
"""
|
|
2363
|
+
@staticmethod
|
|
2364
|
+
def __key_warning(key: str):
|
|
2365
|
+
suggest = None
|
|
2366
|
+
if key == "apiVersion":
|
|
2367
|
+
suggest = "api_version"
|
|
2368
|
+
|
|
2369
|
+
if suggest:
|
|
2370
|
+
pulumi.log.warn(f"Key '{key}' not found in ValidatingAdmissionPolicy. Access the value via the '{suggest}' property getter instead.")
|
|
2371
|
+
|
|
2372
|
+
def __getitem__(self, key: str) -> Any:
|
|
2373
|
+
ValidatingAdmissionPolicy.__key_warning(key)
|
|
2374
|
+
return super().__getitem__(key)
|
|
2375
|
+
|
|
2376
|
+
def get(self, key: str, default = None) -> Any:
|
|
2377
|
+
ValidatingAdmissionPolicy.__key_warning(key)
|
|
2378
|
+
return super().get(key, default)
|
|
2379
|
+
|
|
2380
|
+
def __init__(__self__, *,
|
|
2381
|
+
api_version: Optional[str] = None,
|
|
2382
|
+
kind: Optional[str] = None,
|
|
2383
|
+
metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None,
|
|
2384
|
+
spec: Optional['outputs.ValidatingAdmissionPolicySpec'] = None,
|
|
2385
|
+
status: Optional['outputs.ValidatingAdmissionPolicyStatus'] = None):
|
|
2386
|
+
"""
|
|
2387
|
+
ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
|
|
2388
|
+
:param str api_version: 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
|
|
2389
|
+
:param str kind: 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
|
|
2390
|
+
:param '_meta.v1.ObjectMetaArgs' metadata: Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
|
2391
|
+
:param 'ValidatingAdmissionPolicySpecArgs' spec: Specification of the desired behavior of the ValidatingAdmissionPolicy.
|
|
2392
|
+
:param 'ValidatingAdmissionPolicyStatusArgs' status: The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only.
|
|
2393
|
+
"""
|
|
2394
|
+
if api_version is not None:
|
|
2395
|
+
pulumi.set(__self__, "api_version", 'admissionregistration.k8s.io/v1')
|
|
2396
|
+
if kind is not None:
|
|
2397
|
+
pulumi.set(__self__, "kind", 'ValidatingAdmissionPolicy')
|
|
2398
|
+
if metadata is not None:
|
|
2399
|
+
pulumi.set(__self__, "metadata", metadata)
|
|
2400
|
+
if spec is not None:
|
|
2401
|
+
pulumi.set(__self__, "spec", spec)
|
|
2402
|
+
if status is not None:
|
|
2403
|
+
pulumi.set(__self__, "status", status)
|
|
2404
|
+
|
|
2405
|
+
@property
|
|
2406
|
+
@pulumi.getter(name="apiVersion")
|
|
2407
|
+
def api_version(self) -> Optional[str]:
|
|
2408
|
+
"""
|
|
2409
|
+
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
|
|
2410
|
+
"""
|
|
2411
|
+
return pulumi.get(self, "api_version")
|
|
2412
|
+
|
|
2413
|
+
@property
|
|
2414
|
+
@pulumi.getter
|
|
2415
|
+
def kind(self) -> Optional[str]:
|
|
2416
|
+
"""
|
|
2417
|
+
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
|
|
2418
|
+
"""
|
|
2419
|
+
return pulumi.get(self, "kind")
|
|
2420
|
+
|
|
2421
|
+
@property
|
|
2422
|
+
@pulumi.getter
|
|
2423
|
+
def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']:
|
|
2424
|
+
"""
|
|
2425
|
+
Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
|
2426
|
+
"""
|
|
2427
|
+
return pulumi.get(self, "metadata")
|
|
2428
|
+
|
|
2429
|
+
@property
|
|
2430
|
+
@pulumi.getter
|
|
2431
|
+
def spec(self) -> Optional['outputs.ValidatingAdmissionPolicySpec']:
|
|
2432
|
+
"""
|
|
2433
|
+
Specification of the desired behavior of the ValidatingAdmissionPolicy.
|
|
2434
|
+
"""
|
|
2435
|
+
return pulumi.get(self, "spec")
|
|
2436
|
+
|
|
2437
|
+
@property
|
|
2438
|
+
@pulumi.getter
|
|
2439
|
+
def status(self) -> Optional['outputs.ValidatingAdmissionPolicyStatus']:
|
|
2440
|
+
"""
|
|
2441
|
+
The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only.
|
|
2442
|
+
"""
|
|
2443
|
+
return pulumi.get(self, "status")
|
|
2444
|
+
|
|
2445
|
+
|
|
2446
|
+
@pulumi.output_type
|
|
2447
|
+
class ValidatingAdmissionPolicyBinding(dict):
|
|
2448
|
+
"""
|
|
2449
|
+
ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.
|
|
2450
|
+
|
|
2451
|
+
For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.
|
|
2452
|
+
|
|
2453
|
+
The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
|
|
2454
|
+
"""
|
|
2455
|
+
@staticmethod
|
|
2456
|
+
def __key_warning(key: str):
|
|
2457
|
+
suggest = None
|
|
2458
|
+
if key == "apiVersion":
|
|
2459
|
+
suggest = "api_version"
|
|
2460
|
+
|
|
2461
|
+
if suggest:
|
|
2462
|
+
pulumi.log.warn(f"Key '{key}' not found in ValidatingAdmissionPolicyBinding. Access the value via the '{suggest}' property getter instead.")
|
|
2463
|
+
|
|
2464
|
+
def __getitem__(self, key: str) -> Any:
|
|
2465
|
+
ValidatingAdmissionPolicyBinding.__key_warning(key)
|
|
2466
|
+
return super().__getitem__(key)
|
|
2467
|
+
|
|
2468
|
+
def get(self, key: str, default = None) -> Any:
|
|
2469
|
+
ValidatingAdmissionPolicyBinding.__key_warning(key)
|
|
2470
|
+
return super().get(key, default)
|
|
2471
|
+
|
|
2472
|
+
def __init__(__self__, *,
|
|
2473
|
+
api_version: Optional[str] = None,
|
|
2474
|
+
kind: Optional[str] = None,
|
|
2475
|
+
metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None,
|
|
2476
|
+
spec: Optional['outputs.ValidatingAdmissionPolicyBindingSpec'] = None):
|
|
2477
|
+
"""
|
|
2478
|
+
ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.
|
|
2479
|
+
|
|
2480
|
+
For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.
|
|
2481
|
+
|
|
2482
|
+
The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
|
|
2483
|
+
:param str api_version: 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
|
|
2484
|
+
:param str kind: 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
|
|
2485
|
+
:param '_meta.v1.ObjectMetaArgs' metadata: Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
|
2486
|
+
:param 'ValidatingAdmissionPolicyBindingSpecArgs' spec: Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
|
|
2487
|
+
"""
|
|
2488
|
+
if api_version is not None:
|
|
2489
|
+
pulumi.set(__self__, "api_version", 'admissionregistration.k8s.io/v1')
|
|
2490
|
+
if kind is not None:
|
|
2491
|
+
pulumi.set(__self__, "kind", 'ValidatingAdmissionPolicyBinding')
|
|
2492
|
+
if metadata is not None:
|
|
2493
|
+
pulumi.set(__self__, "metadata", metadata)
|
|
2494
|
+
if spec is not None:
|
|
2495
|
+
pulumi.set(__self__, "spec", spec)
|
|
2496
|
+
|
|
2497
|
+
@property
|
|
2498
|
+
@pulumi.getter(name="apiVersion")
|
|
2499
|
+
def api_version(self) -> Optional[str]:
|
|
2500
|
+
"""
|
|
2501
|
+
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
|
|
2502
|
+
"""
|
|
2503
|
+
return pulumi.get(self, "api_version")
|
|
2504
|
+
|
|
2505
|
+
@property
|
|
2506
|
+
@pulumi.getter
|
|
2507
|
+
def kind(self) -> Optional[str]:
|
|
2508
|
+
"""
|
|
2509
|
+
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
|
|
2510
|
+
"""
|
|
2511
|
+
return pulumi.get(self, "kind")
|
|
2512
|
+
|
|
2513
|
+
@property
|
|
2514
|
+
@pulumi.getter
|
|
2515
|
+
def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']:
|
|
2516
|
+
"""
|
|
2517
|
+
Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
|
2518
|
+
"""
|
|
2519
|
+
return pulumi.get(self, "metadata")
|
|
2520
|
+
|
|
2521
|
+
@property
|
|
2522
|
+
@pulumi.getter
|
|
2523
|
+
def spec(self) -> Optional['outputs.ValidatingAdmissionPolicyBindingSpec']:
|
|
2524
|
+
"""
|
|
2525
|
+
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
|
|
2526
|
+
"""
|
|
2527
|
+
return pulumi.get(self, "spec")
|
|
2528
|
+
|
|
2529
|
+
|
|
2530
|
+
@pulumi.output_type
|
|
2531
|
+
class ValidatingAdmissionPolicyBindingSpec(dict):
|
|
2532
|
+
"""
|
|
2533
|
+
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
|
|
2534
|
+
"""
|
|
2535
|
+
@staticmethod
|
|
2536
|
+
def __key_warning(key: str):
|
|
2537
|
+
suggest = None
|
|
2538
|
+
if key == "matchResources":
|
|
2539
|
+
suggest = "match_resources"
|
|
2540
|
+
elif key == "paramRef":
|
|
2541
|
+
suggest = "param_ref"
|
|
2542
|
+
elif key == "policyName":
|
|
2543
|
+
suggest = "policy_name"
|
|
2544
|
+
elif key == "validationActions":
|
|
2545
|
+
suggest = "validation_actions"
|
|
2546
|
+
|
|
2547
|
+
if suggest:
|
|
2548
|
+
pulumi.log.warn(f"Key '{key}' not found in ValidatingAdmissionPolicyBindingSpec. Access the value via the '{suggest}' property getter instead.")
|
|
2549
|
+
|
|
2550
|
+
def __getitem__(self, key: str) -> Any:
|
|
2551
|
+
ValidatingAdmissionPolicyBindingSpec.__key_warning(key)
|
|
2552
|
+
return super().__getitem__(key)
|
|
981
2553
|
|
|
982
|
-
|
|
2554
|
+
def get(self, key: str, default = None) -> Any:
|
|
2555
|
+
ValidatingAdmissionPolicyBindingSpec.__key_warning(key)
|
|
2556
|
+
return super().get(key, default)
|
|
983
2557
|
|
|
984
|
-
|
|
2558
|
+
def __init__(__self__, *,
|
|
2559
|
+
match_resources: Optional['outputs.MatchResources'] = None,
|
|
2560
|
+
param_ref: Optional['outputs.ParamRef'] = None,
|
|
2561
|
+
policy_name: Optional[str] = None,
|
|
2562
|
+
validation_actions: Optional[Sequence[str]] = None):
|
|
2563
|
+
"""
|
|
2564
|
+
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
|
|
2565
|
+
:param 'MatchResourcesArgs' match_resources: 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.
|
|
2566
|
+
:param 'ParamRefArgs' param_ref: 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. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
|
|
2567
|
+
:param str policy_name: 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.
|
|
2568
|
+
:param Sequence[str] validation_actions: validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.
|
|
2569
|
+
|
|
2570
|
+
Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.
|
|
2571
|
+
|
|
2572
|
+
validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.
|
|
2573
|
+
|
|
2574
|
+
The supported actions values are:
|
|
2575
|
+
|
|
2576
|
+
"Deny" specifies that a validation failure results in a denied request.
|
|
2577
|
+
|
|
2578
|
+
"Warn" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.
|
|
2579
|
+
|
|
2580
|
+
"Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{\\"message\\": \\"Invalid value\\", {\\"policy\\": \\"policy.example.com\\", {\\"binding\\": \\"policybinding.example.com\\", {\\"expressionIndex\\": \\"1\\", {\\"validationActions\\": [\\"Audit\\"]}]"`
|
|
2581
|
+
|
|
2582
|
+
Clients should expect to handle additional values by ignoring any values not recognized.
|
|
2583
|
+
|
|
2584
|
+
"Deny" and "Warn" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.
|
|
2585
|
+
|
|
2586
|
+
Required.
|
|
2587
|
+
"""
|
|
2588
|
+
if match_resources is not None:
|
|
2589
|
+
pulumi.set(__self__, "match_resources", match_resources)
|
|
2590
|
+
if param_ref is not None:
|
|
2591
|
+
pulumi.set(__self__, "param_ref", param_ref)
|
|
2592
|
+
if policy_name is not None:
|
|
2593
|
+
pulumi.set(__self__, "policy_name", policy_name)
|
|
2594
|
+
if validation_actions is not None:
|
|
2595
|
+
pulumi.set(__self__, "validation_actions", validation_actions)
|
|
985
2596
|
|
|
986
|
-
|
|
2597
|
+
@property
|
|
2598
|
+
@pulumi.getter(name="matchResources")
|
|
2599
|
+
def match_resources(self) -> Optional['outputs.MatchResources']:
|
|
987
2600
|
"""
|
|
988
|
-
|
|
2601
|
+
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.
|
|
2602
|
+
"""
|
|
2603
|
+
return pulumi.get(self, "match_resources")
|
|
2604
|
+
|
|
2605
|
+
@property
|
|
2606
|
+
@pulumi.getter(name="paramRef")
|
|
2607
|
+
def param_ref(self) -> Optional['outputs.ParamRef']:
|
|
2608
|
+
"""
|
|
2609
|
+
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. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
|
|
2610
|
+
"""
|
|
2611
|
+
return pulumi.get(self, "param_ref")
|
|
2612
|
+
|
|
2613
|
+
@property
|
|
2614
|
+
@pulumi.getter(name="policyName")
|
|
2615
|
+
def policy_name(self) -> Optional[str]:
|
|
2616
|
+
"""
|
|
2617
|
+
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.
|
|
2618
|
+
"""
|
|
2619
|
+
return pulumi.get(self, "policy_name")
|
|
2620
|
+
|
|
2621
|
+
@property
|
|
2622
|
+
@pulumi.getter(name="validationActions")
|
|
2623
|
+
def validation_actions(self) -> Optional[Sequence[str]]:
|
|
2624
|
+
"""
|
|
2625
|
+
validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.
|
|
2626
|
+
|
|
2627
|
+
Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.
|
|
2628
|
+
|
|
2629
|
+
validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.
|
|
2630
|
+
|
|
2631
|
+
The supported actions values are:
|
|
2632
|
+
|
|
2633
|
+
"Deny" specifies that a validation failure results in a denied request.
|
|
2634
|
+
|
|
2635
|
+
"Warn" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.
|
|
2636
|
+
|
|
2637
|
+
"Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{\\"message\\": \\"Invalid value\\", {\\"policy\\": \\"policy.example.com\\", {\\"binding\\": \\"policybinding.example.com\\", {\\"expressionIndex\\": \\"1\\", {\\"validationActions\\": [\\"Audit\\"]}]"`
|
|
2638
|
+
|
|
2639
|
+
Clients should expect to handle additional values by ignoring any values not recognized.
|
|
2640
|
+
|
|
2641
|
+
"Deny" and "Warn" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.
|
|
2642
|
+
|
|
2643
|
+
Required.
|
|
2644
|
+
"""
|
|
2645
|
+
return pulumi.get(self, "validation_actions")
|
|
2646
|
+
|
|
2647
|
+
|
|
2648
|
+
@pulumi.output_type
|
|
2649
|
+
class ValidatingAdmissionPolicyBindingSpecPatch(dict):
|
|
2650
|
+
"""
|
|
2651
|
+
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
|
|
2652
|
+
"""
|
|
2653
|
+
@staticmethod
|
|
2654
|
+
def __key_warning(key: str):
|
|
2655
|
+
suggest = None
|
|
2656
|
+
if key == "matchResources":
|
|
2657
|
+
suggest = "match_resources"
|
|
2658
|
+
elif key == "paramRef":
|
|
2659
|
+
suggest = "param_ref"
|
|
2660
|
+
elif key == "policyName":
|
|
2661
|
+
suggest = "policy_name"
|
|
2662
|
+
elif key == "validationActions":
|
|
2663
|
+
suggest = "validation_actions"
|
|
2664
|
+
|
|
2665
|
+
if suggest:
|
|
2666
|
+
pulumi.log.warn(f"Key '{key}' not found in ValidatingAdmissionPolicyBindingSpecPatch. Access the value via the '{suggest}' property getter instead.")
|
|
2667
|
+
|
|
2668
|
+
def __getitem__(self, key: str) -> Any:
|
|
2669
|
+
ValidatingAdmissionPolicyBindingSpecPatch.__key_warning(key)
|
|
2670
|
+
return super().__getitem__(key)
|
|
2671
|
+
|
|
2672
|
+
def get(self, key: str, default = None) -> Any:
|
|
2673
|
+
ValidatingAdmissionPolicyBindingSpecPatch.__key_warning(key)
|
|
2674
|
+
return super().get(key, default)
|
|
2675
|
+
|
|
2676
|
+
def __init__(__self__, *,
|
|
2677
|
+
match_resources: Optional['outputs.MatchResourcesPatch'] = None,
|
|
2678
|
+
param_ref: Optional['outputs.ParamRefPatch'] = None,
|
|
2679
|
+
policy_name: Optional[str] = None,
|
|
2680
|
+
validation_actions: Optional[Sequence[str]] = None):
|
|
2681
|
+
"""
|
|
2682
|
+
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
|
|
2683
|
+
:param 'MatchResourcesPatchArgs' match_resources: 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.
|
|
2684
|
+
:param 'ParamRefPatchArgs' param_ref: 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. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
|
|
2685
|
+
:param str policy_name: 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.
|
|
2686
|
+
:param Sequence[str] validation_actions: validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.
|
|
2687
|
+
|
|
2688
|
+
Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.
|
|
2689
|
+
|
|
2690
|
+
validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.
|
|
2691
|
+
|
|
2692
|
+
The supported actions values are:
|
|
2693
|
+
|
|
2694
|
+
"Deny" specifies that a validation failure results in a denied request.
|
|
2695
|
+
|
|
2696
|
+
"Warn" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.
|
|
2697
|
+
|
|
2698
|
+
"Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{\\"message\\": \\"Invalid value\\", {\\"policy\\": \\"policy.example.com\\", {\\"binding\\": \\"policybinding.example.com\\", {\\"expressionIndex\\": \\"1\\", {\\"validationActions\\": [\\"Audit\\"]}]"`
|
|
2699
|
+
|
|
2700
|
+
Clients should expect to handle additional values by ignoring any values not recognized.
|
|
2701
|
+
|
|
2702
|
+
"Deny" and "Warn" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.
|
|
2703
|
+
|
|
2704
|
+
Required.
|
|
2705
|
+
"""
|
|
2706
|
+
if match_resources is not None:
|
|
2707
|
+
pulumi.set(__self__, "match_resources", match_resources)
|
|
2708
|
+
if param_ref is not None:
|
|
2709
|
+
pulumi.set(__self__, "param_ref", param_ref)
|
|
2710
|
+
if policy_name is not None:
|
|
2711
|
+
pulumi.set(__self__, "policy_name", policy_name)
|
|
2712
|
+
if validation_actions is not None:
|
|
2713
|
+
pulumi.set(__self__, "validation_actions", validation_actions)
|
|
2714
|
+
|
|
2715
|
+
@property
|
|
2716
|
+
@pulumi.getter(name="matchResources")
|
|
2717
|
+
def match_resources(self) -> Optional['outputs.MatchResourcesPatch']:
|
|
2718
|
+
"""
|
|
2719
|
+
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.
|
|
2720
|
+
"""
|
|
2721
|
+
return pulumi.get(self, "match_resources")
|
|
2722
|
+
|
|
2723
|
+
@property
|
|
2724
|
+
@pulumi.getter(name="paramRef")
|
|
2725
|
+
def param_ref(self) -> Optional['outputs.ParamRefPatch']:
|
|
2726
|
+
"""
|
|
2727
|
+
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. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
|
|
2728
|
+
"""
|
|
2729
|
+
return pulumi.get(self, "param_ref")
|
|
2730
|
+
|
|
2731
|
+
@property
|
|
2732
|
+
@pulumi.getter(name="policyName")
|
|
2733
|
+
def policy_name(self) -> Optional[str]:
|
|
2734
|
+
"""
|
|
2735
|
+
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.
|
|
2736
|
+
"""
|
|
2737
|
+
return pulumi.get(self, "policy_name")
|
|
2738
|
+
|
|
2739
|
+
@property
|
|
2740
|
+
@pulumi.getter(name="validationActions")
|
|
2741
|
+
def validation_actions(self) -> Optional[Sequence[str]]:
|
|
2742
|
+
"""
|
|
2743
|
+
validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.
|
|
2744
|
+
|
|
2745
|
+
Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.
|
|
2746
|
+
|
|
2747
|
+
validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.
|
|
2748
|
+
|
|
2749
|
+
The supported actions values are:
|
|
2750
|
+
|
|
2751
|
+
"Deny" specifies that a validation failure results in a denied request.
|
|
2752
|
+
|
|
2753
|
+
"Warn" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.
|
|
2754
|
+
|
|
2755
|
+
"Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{\\"message\\": \\"Invalid value\\", {\\"policy\\": \\"policy.example.com\\", {\\"binding\\": \\"policybinding.example.com\\", {\\"expressionIndex\\": \\"1\\", {\\"validationActions\\": [\\"Audit\\"]}]"`
|
|
2756
|
+
|
|
2757
|
+
Clients should expect to handle additional values by ignoring any values not recognized.
|
|
2758
|
+
|
|
2759
|
+
"Deny" and "Warn" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.
|
|
2760
|
+
|
|
2761
|
+
Required.
|
|
2762
|
+
"""
|
|
2763
|
+
return pulumi.get(self, "validation_actions")
|
|
2764
|
+
|
|
2765
|
+
|
|
2766
|
+
@pulumi.output_type
|
|
2767
|
+
class ValidatingAdmissionPolicySpec(dict):
|
|
2768
|
+
"""
|
|
2769
|
+
ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
|
|
2770
|
+
"""
|
|
2771
|
+
@staticmethod
|
|
2772
|
+
def __key_warning(key: str):
|
|
2773
|
+
suggest = None
|
|
2774
|
+
if key == "auditAnnotations":
|
|
2775
|
+
suggest = "audit_annotations"
|
|
2776
|
+
elif key == "failurePolicy":
|
|
2777
|
+
suggest = "failure_policy"
|
|
2778
|
+
elif key == "matchConditions":
|
|
2779
|
+
suggest = "match_conditions"
|
|
2780
|
+
elif key == "matchConstraints":
|
|
2781
|
+
suggest = "match_constraints"
|
|
2782
|
+
elif key == "paramKind":
|
|
2783
|
+
suggest = "param_kind"
|
|
2784
|
+
|
|
2785
|
+
if suggest:
|
|
2786
|
+
pulumi.log.warn(f"Key '{key}' not found in ValidatingAdmissionPolicySpec. Access the value via the '{suggest}' property getter instead.")
|
|
2787
|
+
|
|
2788
|
+
def __getitem__(self, key: str) -> Any:
|
|
2789
|
+
ValidatingAdmissionPolicySpec.__key_warning(key)
|
|
2790
|
+
return super().__getitem__(key)
|
|
2791
|
+
|
|
2792
|
+
def get(self, key: str, default = None) -> Any:
|
|
2793
|
+
ValidatingAdmissionPolicySpec.__key_warning(key)
|
|
2794
|
+
return super().get(key, default)
|
|
2795
|
+
|
|
2796
|
+
def __init__(__self__, *,
|
|
2797
|
+
audit_annotations: Optional[Sequence['outputs.AuditAnnotation']] = None,
|
|
2798
|
+
failure_policy: Optional[str] = None,
|
|
2799
|
+
match_conditions: Optional[Sequence['outputs.MatchCondition']] = None,
|
|
2800
|
+
match_constraints: Optional['outputs.MatchResources'] = None,
|
|
2801
|
+
param_kind: Optional['outputs.ParamKind'] = None,
|
|
2802
|
+
validations: Optional[Sequence['outputs.Validation']] = None,
|
|
2803
|
+
variables: Optional[Sequence['outputs.Variable']] = None):
|
|
2804
|
+
"""
|
|
2805
|
+
ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
|
|
2806
|
+
:param Sequence['AuditAnnotationArgs'] audit_annotations: auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
|
|
2807
|
+
:param str failure_policy: failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.
|
|
2808
|
+
|
|
2809
|
+
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.
|
|
2810
|
+
|
|
2811
|
+
failurePolicy does not define how validations that evaluate to false are handled.
|
|
2812
|
+
|
|
2813
|
+
When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.
|
|
2814
|
+
|
|
2815
|
+
Allowed values are Ignore or Fail. Defaults to Fail.
|
|
2816
|
+
:param Sequence['MatchConditionArgs'] match_conditions: MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
|
|
2817
|
+
|
|
2818
|
+
If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
|
|
2819
|
+
|
|
2820
|
+
The exact matching logic is (in order):
|
|
2821
|
+
1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
|
|
2822
|
+
2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
|
|
2823
|
+
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
2824
|
+
- If failurePolicy=Fail, reject the request
|
|
2825
|
+
- If failurePolicy=Ignore, the policy is skipped
|
|
2826
|
+
:param 'MatchResourcesArgs' match_constraints: 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.
|
|
2827
|
+
:param 'ParamKindArgs' param_kind: 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.
|
|
2828
|
+
:param Sequence['ValidationArgs'] validations: Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
|
|
2829
|
+
:param Sequence['VariableArgs'] variables: Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.
|
|
2830
|
+
|
|
2831
|
+
The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.
|
|
2832
|
+
"""
|
|
2833
|
+
if audit_annotations is not None:
|
|
2834
|
+
pulumi.set(__self__, "audit_annotations", audit_annotations)
|
|
2835
|
+
if failure_policy is not None:
|
|
2836
|
+
pulumi.set(__self__, "failure_policy", failure_policy)
|
|
2837
|
+
if match_conditions is not None:
|
|
2838
|
+
pulumi.set(__self__, "match_conditions", match_conditions)
|
|
2839
|
+
if match_constraints is not None:
|
|
2840
|
+
pulumi.set(__self__, "match_constraints", match_constraints)
|
|
2841
|
+
if param_kind is not None:
|
|
2842
|
+
pulumi.set(__self__, "param_kind", param_kind)
|
|
2843
|
+
if validations is not None:
|
|
2844
|
+
pulumi.set(__self__, "validations", validations)
|
|
2845
|
+
if variables is not None:
|
|
2846
|
+
pulumi.set(__self__, "variables", variables)
|
|
2847
|
+
|
|
2848
|
+
@property
|
|
2849
|
+
@pulumi.getter(name="auditAnnotations")
|
|
2850
|
+
def audit_annotations(self) -> Optional[Sequence['outputs.AuditAnnotation']]:
|
|
2851
|
+
"""
|
|
2852
|
+
auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
|
|
2853
|
+
"""
|
|
2854
|
+
return pulumi.get(self, "audit_annotations")
|
|
2855
|
+
|
|
2856
|
+
@property
|
|
2857
|
+
@pulumi.getter(name="failurePolicy")
|
|
2858
|
+
def failure_policy(self) -> Optional[str]:
|
|
2859
|
+
"""
|
|
2860
|
+
failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.
|
|
2861
|
+
|
|
2862
|
+
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.
|
|
2863
|
+
|
|
2864
|
+
failurePolicy does not define how validations that evaluate to false are handled.
|
|
2865
|
+
|
|
2866
|
+
When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.
|
|
2867
|
+
|
|
2868
|
+
Allowed values are Ignore or Fail. Defaults to Fail.
|
|
2869
|
+
"""
|
|
2870
|
+
return pulumi.get(self, "failure_policy")
|
|
2871
|
+
|
|
2872
|
+
@property
|
|
2873
|
+
@pulumi.getter(name="matchConditions")
|
|
2874
|
+
def match_conditions(self) -> Optional[Sequence['outputs.MatchCondition']]:
|
|
2875
|
+
"""
|
|
2876
|
+
MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
|
|
2877
|
+
|
|
2878
|
+
If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
|
|
2879
|
+
|
|
2880
|
+
The exact matching logic is (in order):
|
|
2881
|
+
1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
|
|
2882
|
+
2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
|
|
2883
|
+
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
2884
|
+
- If failurePolicy=Fail, reject the request
|
|
2885
|
+
- If failurePolicy=Ignore, the policy is skipped
|
|
2886
|
+
"""
|
|
2887
|
+
return pulumi.get(self, "match_conditions")
|
|
2888
|
+
|
|
2889
|
+
@property
|
|
2890
|
+
@pulumi.getter(name="matchConstraints")
|
|
2891
|
+
def match_constraints(self) -> Optional['outputs.MatchResources']:
|
|
2892
|
+
"""
|
|
2893
|
+
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.
|
|
2894
|
+
"""
|
|
2895
|
+
return pulumi.get(self, "match_constraints")
|
|
2896
|
+
|
|
2897
|
+
@property
|
|
2898
|
+
@pulumi.getter(name="paramKind")
|
|
2899
|
+
def param_kind(self) -> Optional['outputs.ParamKind']:
|
|
2900
|
+
"""
|
|
2901
|
+
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.
|
|
2902
|
+
"""
|
|
2903
|
+
return pulumi.get(self, "param_kind")
|
|
989
2904
|
|
|
990
2905
|
@property
|
|
991
2906
|
@pulumi.getter
|
|
992
|
-
def
|
|
2907
|
+
def validations(self) -> Optional[Sequence['outputs.Validation']]:
|
|
993
2908
|
"""
|
|
994
|
-
|
|
2909
|
+
Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
|
|
995
2910
|
"""
|
|
996
|
-
return pulumi.get(self, "
|
|
2911
|
+
return pulumi.get(self, "validations")
|
|
2912
|
+
|
|
2913
|
+
@property
|
|
2914
|
+
@pulumi.getter
|
|
2915
|
+
def variables(self) -> Optional[Sequence['outputs.Variable']]:
|
|
2916
|
+
"""
|
|
2917
|
+
Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.
|
|
2918
|
+
|
|
2919
|
+
The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.
|
|
2920
|
+
"""
|
|
2921
|
+
return pulumi.get(self, "variables")
|
|
997
2922
|
|
|
998
2923
|
|
|
999
2924
|
@pulumi.output_type
|
|
1000
|
-
class
|
|
2925
|
+
class ValidatingAdmissionPolicySpecPatch(dict):
|
|
1001
2926
|
"""
|
|
1002
|
-
|
|
2927
|
+
ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
|
|
1003
2928
|
"""
|
|
2929
|
+
@staticmethod
|
|
2930
|
+
def __key_warning(key: str):
|
|
2931
|
+
suggest = None
|
|
2932
|
+
if key == "auditAnnotations":
|
|
2933
|
+
suggest = "audit_annotations"
|
|
2934
|
+
elif key == "failurePolicy":
|
|
2935
|
+
suggest = "failure_policy"
|
|
2936
|
+
elif key == "matchConditions":
|
|
2937
|
+
suggest = "match_conditions"
|
|
2938
|
+
elif key == "matchConstraints":
|
|
2939
|
+
suggest = "match_constraints"
|
|
2940
|
+
elif key == "paramKind":
|
|
2941
|
+
suggest = "param_kind"
|
|
2942
|
+
|
|
2943
|
+
if suggest:
|
|
2944
|
+
pulumi.log.warn(f"Key '{key}' not found in ValidatingAdmissionPolicySpecPatch. Access the value via the '{suggest}' property getter instead.")
|
|
2945
|
+
|
|
2946
|
+
def __getitem__(self, key: str) -> Any:
|
|
2947
|
+
ValidatingAdmissionPolicySpecPatch.__key_warning(key)
|
|
2948
|
+
return super().__getitem__(key)
|
|
2949
|
+
|
|
2950
|
+
def get(self, key: str, default = None) -> Any:
|
|
2951
|
+
ValidatingAdmissionPolicySpecPatch.__key_warning(key)
|
|
2952
|
+
return super().get(key, default)
|
|
2953
|
+
|
|
1004
2954
|
def __init__(__self__, *,
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
2955
|
+
audit_annotations: Optional[Sequence['outputs.AuditAnnotationPatch']] = None,
|
|
2956
|
+
failure_policy: Optional[str] = None,
|
|
2957
|
+
match_conditions: Optional[Sequence['outputs.MatchConditionPatch']] = None,
|
|
2958
|
+
match_constraints: Optional['outputs.MatchResourcesPatch'] = None,
|
|
2959
|
+
param_kind: Optional['outputs.ParamKindPatch'] = None,
|
|
2960
|
+
validations: Optional[Sequence['outputs.ValidationPatch']] = None,
|
|
2961
|
+
variables: Optional[Sequence['outputs.VariablePatch']] = None):
|
|
2962
|
+
"""
|
|
2963
|
+
ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
|
|
2964
|
+
:param Sequence['AuditAnnotationPatchArgs'] audit_annotations: auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
|
|
2965
|
+
:param str failure_policy: failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.
|
|
2966
|
+
|
|
2967
|
+
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.
|
|
2968
|
+
|
|
2969
|
+
failurePolicy does not define how validations that evaluate to false are handled.
|
|
2970
|
+
|
|
2971
|
+
When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.
|
|
2972
|
+
|
|
2973
|
+
Allowed values are Ignore or Fail. Defaults to Fail.
|
|
2974
|
+
:param Sequence['MatchConditionPatchArgs'] match_conditions: MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
|
|
2975
|
+
|
|
2976
|
+
If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
|
|
2977
|
+
|
|
2978
|
+
The exact matching logic is (in order):
|
|
2979
|
+
1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
|
|
2980
|
+
2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
|
|
2981
|
+
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
2982
|
+
- If failurePolicy=Fail, reject the request
|
|
2983
|
+
- If failurePolicy=Ignore, the policy is skipped
|
|
2984
|
+
:param 'MatchResourcesPatchArgs' match_constraints: 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.
|
|
2985
|
+
:param 'ParamKindPatchArgs' param_kind: 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.
|
|
2986
|
+
:param Sequence['ValidationPatchArgs'] validations: Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
|
|
2987
|
+
:param Sequence['VariablePatchArgs'] variables: Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.
|
|
2988
|
+
|
|
2989
|
+
The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.
|
|
1009
2990
|
"""
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
2991
|
+
if audit_annotations is not None:
|
|
2992
|
+
pulumi.set(__self__, "audit_annotations", audit_annotations)
|
|
2993
|
+
if failure_policy is not None:
|
|
2994
|
+
pulumi.set(__self__, "failure_policy", failure_policy)
|
|
2995
|
+
if match_conditions is not None:
|
|
2996
|
+
pulumi.set(__self__, "match_conditions", match_conditions)
|
|
2997
|
+
if match_constraints is not None:
|
|
2998
|
+
pulumi.set(__self__, "match_constraints", match_constraints)
|
|
2999
|
+
if param_kind is not None:
|
|
3000
|
+
pulumi.set(__self__, "param_kind", param_kind)
|
|
3001
|
+
if validations is not None:
|
|
3002
|
+
pulumi.set(__self__, "validations", validations)
|
|
3003
|
+
if variables is not None:
|
|
3004
|
+
pulumi.set(__self__, "variables", variables)
|
|
3005
|
+
|
|
3006
|
+
@property
|
|
3007
|
+
@pulumi.getter(name="auditAnnotations")
|
|
3008
|
+
def audit_annotations(self) -> Optional[Sequence['outputs.AuditAnnotationPatch']]:
|
|
1015
3009
|
"""
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
3010
|
+
auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
|
|
3011
|
+
"""
|
|
3012
|
+
return pulumi.get(self, "audit_annotations")
|
|
3013
|
+
|
|
3014
|
+
@property
|
|
3015
|
+
@pulumi.getter(name="failurePolicy")
|
|
3016
|
+
def failure_policy(self) -> Optional[str]:
|
|
3017
|
+
"""
|
|
3018
|
+
failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.
|
|
3019
|
+
|
|
3020
|
+
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.
|
|
3021
|
+
|
|
3022
|
+
failurePolicy does not define how validations that evaluate to false are handled.
|
|
3023
|
+
|
|
3024
|
+
When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.
|
|
3025
|
+
|
|
3026
|
+
Allowed values are Ignore or Fail. Defaults to Fail.
|
|
3027
|
+
"""
|
|
3028
|
+
return pulumi.get(self, "failure_policy")
|
|
3029
|
+
|
|
3030
|
+
@property
|
|
3031
|
+
@pulumi.getter(name="matchConditions")
|
|
3032
|
+
def match_conditions(self) -> Optional[Sequence['outputs.MatchConditionPatch']]:
|
|
3033
|
+
"""
|
|
3034
|
+
MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
|
|
3035
|
+
|
|
3036
|
+
If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
|
|
3037
|
+
|
|
3038
|
+
The exact matching logic is (in order):
|
|
3039
|
+
1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
|
|
3040
|
+
2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
|
|
3041
|
+
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
3042
|
+
- If failurePolicy=Fail, reject the request
|
|
3043
|
+
- If failurePolicy=Ignore, the policy is skipped
|
|
3044
|
+
"""
|
|
3045
|
+
return pulumi.get(self, "match_conditions")
|
|
1022
3046
|
|
|
1023
3047
|
@property
|
|
1024
|
-
@pulumi.getter
|
|
1025
|
-
def
|
|
3048
|
+
@pulumi.getter(name="matchConstraints")
|
|
3049
|
+
def match_constraints(self) -> Optional['outputs.MatchResourcesPatch']:
|
|
1026
3050
|
"""
|
|
1027
|
-
|
|
3051
|
+
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.
|
|
1028
3052
|
"""
|
|
1029
|
-
return pulumi.get(self, "
|
|
3053
|
+
return pulumi.get(self, "match_constraints")
|
|
1030
3054
|
|
|
1031
3055
|
@property
|
|
1032
|
-
@pulumi.getter
|
|
1033
|
-
def
|
|
3056
|
+
@pulumi.getter(name="paramKind")
|
|
3057
|
+
def param_kind(self) -> Optional['outputs.ParamKindPatch']:
|
|
1034
3058
|
"""
|
|
1035
|
-
|
|
3059
|
+
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.
|
|
1036
3060
|
"""
|
|
1037
|
-
return pulumi.get(self, "
|
|
3061
|
+
return pulumi.get(self, "param_kind")
|
|
1038
3062
|
|
|
1039
3063
|
@property
|
|
1040
3064
|
@pulumi.getter
|
|
1041
|
-
def
|
|
3065
|
+
def validations(self) -> Optional[Sequence['outputs.ValidationPatch']]:
|
|
1042
3066
|
"""
|
|
1043
|
-
|
|
3067
|
+
Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
|
|
1044
3068
|
"""
|
|
1045
|
-
return pulumi.get(self, "
|
|
3069
|
+
return pulumi.get(self, "validations")
|
|
1046
3070
|
|
|
1047
3071
|
@property
|
|
1048
3072
|
@pulumi.getter
|
|
1049
|
-
def
|
|
3073
|
+
def variables(self) -> Optional[Sequence['outputs.VariablePatch']]:
|
|
1050
3074
|
"""
|
|
1051
|
-
|
|
3075
|
+
Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.
|
|
3076
|
+
|
|
3077
|
+
The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.
|
|
1052
3078
|
"""
|
|
1053
|
-
return pulumi.get(self, "
|
|
3079
|
+
return pulumi.get(self, "variables")
|
|
1054
3080
|
|
|
1055
3081
|
|
|
1056
3082
|
@pulumi.output_type
|
|
1057
|
-
class
|
|
3083
|
+
class ValidatingAdmissionPolicyStatus(dict):
|
|
1058
3084
|
"""
|
|
1059
|
-
|
|
3085
|
+
ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.
|
|
1060
3086
|
"""
|
|
3087
|
+
@staticmethod
|
|
3088
|
+
def __key_warning(key: str):
|
|
3089
|
+
suggest = None
|
|
3090
|
+
if key == "observedGeneration":
|
|
3091
|
+
suggest = "observed_generation"
|
|
3092
|
+
elif key == "typeChecking":
|
|
3093
|
+
suggest = "type_checking"
|
|
3094
|
+
|
|
3095
|
+
if suggest:
|
|
3096
|
+
pulumi.log.warn(f"Key '{key}' not found in ValidatingAdmissionPolicyStatus. Access the value via the '{suggest}' property getter instead.")
|
|
3097
|
+
|
|
3098
|
+
def __getitem__(self, key: str) -> Any:
|
|
3099
|
+
ValidatingAdmissionPolicyStatus.__key_warning(key)
|
|
3100
|
+
return super().__getitem__(key)
|
|
3101
|
+
|
|
3102
|
+
def get(self, key: str, default = None) -> Any:
|
|
3103
|
+
ValidatingAdmissionPolicyStatus.__key_warning(key)
|
|
3104
|
+
return super().get(key, default)
|
|
3105
|
+
|
|
1061
3106
|
def __init__(__self__, *,
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
3107
|
+
conditions: Optional[Sequence['_meta.v1.outputs.Condition']] = None,
|
|
3108
|
+
observed_generation: Optional[int] = None,
|
|
3109
|
+
type_checking: Optional['outputs.TypeChecking'] = None):
|
|
3110
|
+
"""
|
|
3111
|
+
ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.
|
|
3112
|
+
:param Sequence['_meta.v1.ConditionArgs'] conditions: The conditions represent the latest available observations of a policy's current state.
|
|
3113
|
+
:param int observed_generation: The generation observed by the controller.
|
|
3114
|
+
:param 'TypeCheckingArgs' type_checking: The results of type checking for each expression. Presence of this field indicates the completion of the type checking.
|
|
3115
|
+
"""
|
|
3116
|
+
if conditions is not None:
|
|
3117
|
+
pulumi.set(__self__, "conditions", conditions)
|
|
3118
|
+
if observed_generation is not None:
|
|
3119
|
+
pulumi.set(__self__, "observed_generation", observed_generation)
|
|
3120
|
+
if type_checking is not None:
|
|
3121
|
+
pulumi.set(__self__, "type_checking", type_checking)
|
|
3122
|
+
|
|
3123
|
+
@property
|
|
3124
|
+
@pulumi.getter
|
|
3125
|
+
def conditions(self) -> Optional[Sequence['_meta.v1.outputs.Condition']]:
|
|
1066
3126
|
"""
|
|
1067
|
-
|
|
1068
|
-
:param str name: `name` is the name of the service. Required
|
|
1069
|
-
:param str namespace: `namespace` is the namespace of the service. Required
|
|
1070
|
-
:param str path: `path` is an optional URL path which will be sent in any request to this service.
|
|
1071
|
-
:param int port: 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).
|
|
3127
|
+
The conditions represent the latest available observations of a policy's current state.
|
|
1072
3128
|
"""
|
|
1073
|
-
|
|
1074
|
-
pulumi.set(__self__, "name", name)
|
|
1075
|
-
if namespace is not None:
|
|
1076
|
-
pulumi.set(__self__, "namespace", namespace)
|
|
1077
|
-
if path is not None:
|
|
1078
|
-
pulumi.set(__self__, "path", path)
|
|
1079
|
-
if port is not None:
|
|
1080
|
-
pulumi.set(__self__, "port", port)
|
|
3129
|
+
return pulumi.get(self, "conditions")
|
|
1081
3130
|
|
|
1082
3131
|
@property
|
|
1083
|
-
@pulumi.getter
|
|
1084
|
-
def
|
|
3132
|
+
@pulumi.getter(name="observedGeneration")
|
|
3133
|
+
def observed_generation(self) -> Optional[int]:
|
|
1085
3134
|
"""
|
|
1086
|
-
|
|
3135
|
+
The generation observed by the controller.
|
|
1087
3136
|
"""
|
|
1088
|
-
return pulumi.get(self, "
|
|
3137
|
+
return pulumi.get(self, "observed_generation")
|
|
1089
3138
|
|
|
1090
3139
|
@property
|
|
1091
|
-
@pulumi.getter
|
|
1092
|
-
def
|
|
3140
|
+
@pulumi.getter(name="typeChecking")
|
|
3141
|
+
def type_checking(self) -> Optional['outputs.TypeChecking']:
|
|
1093
3142
|
"""
|
|
1094
|
-
|
|
3143
|
+
The results of type checking for each expression. Presence of this field indicates the completion of the type checking.
|
|
1095
3144
|
"""
|
|
1096
|
-
return pulumi.get(self, "
|
|
3145
|
+
return pulumi.get(self, "type_checking")
|
|
3146
|
+
|
|
3147
|
+
|
|
3148
|
+
@pulumi.output_type
|
|
3149
|
+
class ValidatingAdmissionPolicyStatusPatch(dict):
|
|
3150
|
+
"""
|
|
3151
|
+
ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.
|
|
3152
|
+
"""
|
|
3153
|
+
@staticmethod
|
|
3154
|
+
def __key_warning(key: str):
|
|
3155
|
+
suggest = None
|
|
3156
|
+
if key == "observedGeneration":
|
|
3157
|
+
suggest = "observed_generation"
|
|
3158
|
+
elif key == "typeChecking":
|
|
3159
|
+
suggest = "type_checking"
|
|
3160
|
+
|
|
3161
|
+
if suggest:
|
|
3162
|
+
pulumi.log.warn(f"Key '{key}' not found in ValidatingAdmissionPolicyStatusPatch. Access the value via the '{suggest}' property getter instead.")
|
|
3163
|
+
|
|
3164
|
+
def __getitem__(self, key: str) -> Any:
|
|
3165
|
+
ValidatingAdmissionPolicyStatusPatch.__key_warning(key)
|
|
3166
|
+
return super().__getitem__(key)
|
|
3167
|
+
|
|
3168
|
+
def get(self, key: str, default = None) -> Any:
|
|
3169
|
+
ValidatingAdmissionPolicyStatusPatch.__key_warning(key)
|
|
3170
|
+
return super().get(key, default)
|
|
3171
|
+
|
|
3172
|
+
def __init__(__self__, *,
|
|
3173
|
+
conditions: Optional[Sequence['_meta.v1.outputs.ConditionPatch']] = None,
|
|
3174
|
+
observed_generation: Optional[int] = None,
|
|
3175
|
+
type_checking: Optional['outputs.TypeCheckingPatch'] = None):
|
|
3176
|
+
"""
|
|
3177
|
+
ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.
|
|
3178
|
+
:param Sequence['_meta.v1.ConditionPatchArgs'] conditions: The conditions represent the latest available observations of a policy's current state.
|
|
3179
|
+
:param int observed_generation: The generation observed by the controller.
|
|
3180
|
+
:param 'TypeCheckingPatchArgs' type_checking: The results of type checking for each expression. Presence of this field indicates the completion of the type checking.
|
|
3181
|
+
"""
|
|
3182
|
+
if conditions is not None:
|
|
3183
|
+
pulumi.set(__self__, "conditions", conditions)
|
|
3184
|
+
if observed_generation is not None:
|
|
3185
|
+
pulumi.set(__self__, "observed_generation", observed_generation)
|
|
3186
|
+
if type_checking is not None:
|
|
3187
|
+
pulumi.set(__self__, "type_checking", type_checking)
|
|
1097
3188
|
|
|
1098
3189
|
@property
|
|
1099
3190
|
@pulumi.getter
|
|
1100
|
-
def
|
|
3191
|
+
def conditions(self) -> Optional[Sequence['_meta.v1.outputs.ConditionPatch']]:
|
|
1101
3192
|
"""
|
|
1102
|
-
|
|
3193
|
+
The conditions represent the latest available observations of a policy's current state.
|
|
1103
3194
|
"""
|
|
1104
|
-
return pulumi.get(self, "
|
|
3195
|
+
return pulumi.get(self, "conditions")
|
|
1105
3196
|
|
|
1106
3197
|
@property
|
|
1107
|
-
@pulumi.getter
|
|
1108
|
-
def
|
|
3198
|
+
@pulumi.getter(name="observedGeneration")
|
|
3199
|
+
def observed_generation(self) -> Optional[int]:
|
|
1109
3200
|
"""
|
|
1110
|
-
|
|
3201
|
+
The generation observed by the controller.
|
|
1111
3202
|
"""
|
|
1112
|
-
return pulumi.get(self, "
|
|
3203
|
+
return pulumi.get(self, "observed_generation")
|
|
3204
|
+
|
|
3205
|
+
@property
|
|
3206
|
+
@pulumi.getter(name="typeChecking")
|
|
3207
|
+
def type_checking(self) -> Optional['outputs.TypeCheckingPatch']:
|
|
3208
|
+
"""
|
|
3209
|
+
The results of type checking for each expression. Presence of this field indicates the completion of the type checking.
|
|
3210
|
+
"""
|
|
3211
|
+
return pulumi.get(self, "type_checking")
|
|
1113
3212
|
|
|
1114
3213
|
|
|
1115
3214
|
@pulumi.output_type
|
|
@@ -1177,8 +3276,6 @@ class ValidatingWebhook(dict):
|
|
|
1177
3276
|
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
1178
3277
|
- If failurePolicy=Fail, reject the request
|
|
1179
3278
|
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
|
1180
|
-
|
|
1181
|
-
This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
|
|
1182
3279
|
:param str match_policy: matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
|
|
1183
3280
|
|
|
1184
3281
|
- 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.
|
|
@@ -1292,8 +3389,6 @@ class ValidatingWebhook(dict):
|
|
|
1292
3389
|
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
1293
3390
|
- If failurePolicy=Fail, reject the request
|
|
1294
3391
|
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
|
1295
|
-
|
|
1296
|
-
This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
|
|
1297
3392
|
"""
|
|
1298
3393
|
return pulumi.get(self, "match_conditions")
|
|
1299
3394
|
|
|
@@ -1513,8 +3608,6 @@ class ValidatingWebhookPatch(dict):
|
|
|
1513
3608
|
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
1514
3609
|
- If failurePolicy=Fail, reject the request
|
|
1515
3610
|
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
|
1516
|
-
|
|
1517
|
-
This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
|
|
1518
3611
|
:param str match_policy: matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent".
|
|
1519
3612
|
|
|
1520
3613
|
- 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.
|
|
@@ -1618,8 +3711,6 @@ class ValidatingWebhookPatch(dict):
|
|
|
1618
3711
|
3. If any matchCondition evaluates to an error (but none are FALSE):
|
|
1619
3712
|
- If failurePolicy=Fail, reject the request
|
|
1620
3713
|
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
|
1621
|
-
|
|
1622
|
-
This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
|
|
1623
3714
|
"""
|
|
1624
3715
|
return pulumi.get(self, "match_conditions")
|
|
1625
3716
|
|
|
@@ -1716,6 +3807,325 @@ class ValidatingWebhookPatch(dict):
|
|
|
1716
3807
|
return pulumi.get(self, "timeout_seconds")
|
|
1717
3808
|
|
|
1718
3809
|
|
|
3810
|
+
@pulumi.output_type
|
|
3811
|
+
class Validation(dict):
|
|
3812
|
+
"""
|
|
3813
|
+
Validation specifies the CEL expression which is used to apply the validation.
|
|
3814
|
+
"""
|
|
3815
|
+
@staticmethod
|
|
3816
|
+
def __key_warning(key: str):
|
|
3817
|
+
suggest = None
|
|
3818
|
+
if key == "messageExpression":
|
|
3819
|
+
suggest = "message_expression"
|
|
3820
|
+
|
|
3821
|
+
if suggest:
|
|
3822
|
+
pulumi.log.warn(f"Key '{key}' not found in Validation. Access the value via the '{suggest}' property getter instead.")
|
|
3823
|
+
|
|
3824
|
+
def __getitem__(self, key: str) -> Any:
|
|
3825
|
+
Validation.__key_warning(key)
|
|
3826
|
+
return super().__getitem__(key)
|
|
3827
|
+
|
|
3828
|
+
def get(self, key: str, default = None) -> Any:
|
|
3829
|
+
Validation.__key_warning(key)
|
|
3830
|
+
return super().get(key, default)
|
|
3831
|
+
|
|
3832
|
+
def __init__(__self__, *,
|
|
3833
|
+
expression: str,
|
|
3834
|
+
message: Optional[str] = None,
|
|
3835
|
+
message_expression: Optional[str] = None,
|
|
3836
|
+
reason: Optional[str] = None):
|
|
3837
|
+
"""
|
|
3838
|
+
Validation specifies the CEL expression which is used to apply the validation.
|
|
3839
|
+
:param str expression: Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
|
|
3840
|
+
|
|
3841
|
+
- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
|
|
3842
|
+
For example, a variable named 'foo' can be accessed as 'variables.foo'.
|
|
3843
|
+
- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
|
|
3844
|
+
See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
|
|
3845
|
+
- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
|
|
3846
|
+
request resource.
|
|
3847
|
+
|
|
3848
|
+
The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.
|
|
3849
|
+
|
|
3850
|
+
Only 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:
|
|
3851
|
+
"true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if",
|
|
3852
|
+
"import", "let", "loop", "package", "namespace", "return".
|
|
3853
|
+
Examples:
|
|
3854
|
+
- Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"}
|
|
3855
|
+
- Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"}
|
|
3856
|
+
- Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"}
|
|
3857
|
+
|
|
3858
|
+
Equality 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:
|
|
3859
|
+
- 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and
|
|
3860
|
+
non-intersecting elements in `Y` are appended, retaining their partial order.
|
|
3861
|
+
- 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values
|
|
3862
|
+
are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with
|
|
3863
|
+
non-intersecting keys are appended, retaining their partial order.
|
|
3864
|
+
Required.
|
|
3865
|
+
:param str message: 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}".
|
|
3866
|
+
:param str message_expression: messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: "object.x must be less than max ("+string(params.max)+")"
|
|
3867
|
+
:param str reason: 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.
|
|
3868
|
+
"""
|
|
3869
|
+
pulumi.set(__self__, "expression", expression)
|
|
3870
|
+
if message is not None:
|
|
3871
|
+
pulumi.set(__self__, "message", message)
|
|
3872
|
+
if message_expression is not None:
|
|
3873
|
+
pulumi.set(__self__, "message_expression", message_expression)
|
|
3874
|
+
if reason is not None:
|
|
3875
|
+
pulumi.set(__self__, "reason", reason)
|
|
3876
|
+
|
|
3877
|
+
@property
|
|
3878
|
+
@pulumi.getter
|
|
3879
|
+
def expression(self) -> str:
|
|
3880
|
+
"""
|
|
3881
|
+
Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
|
|
3882
|
+
|
|
3883
|
+
- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
|
|
3884
|
+
For example, a variable named 'foo' can be accessed as 'variables.foo'.
|
|
3885
|
+
- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
|
|
3886
|
+
See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
|
|
3887
|
+
- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
|
|
3888
|
+
request resource.
|
|
3889
|
+
|
|
3890
|
+
The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.
|
|
3891
|
+
|
|
3892
|
+
Only 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:
|
|
3893
|
+
"true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if",
|
|
3894
|
+
"import", "let", "loop", "package", "namespace", "return".
|
|
3895
|
+
Examples:
|
|
3896
|
+
- Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"}
|
|
3897
|
+
- Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"}
|
|
3898
|
+
- Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"}
|
|
3899
|
+
|
|
3900
|
+
Equality 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:
|
|
3901
|
+
- 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and
|
|
3902
|
+
non-intersecting elements in `Y` are appended, retaining their partial order.
|
|
3903
|
+
- 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values
|
|
3904
|
+
are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with
|
|
3905
|
+
non-intersecting keys are appended, retaining their partial order.
|
|
3906
|
+
Required.
|
|
3907
|
+
"""
|
|
3908
|
+
return pulumi.get(self, "expression")
|
|
3909
|
+
|
|
3910
|
+
@property
|
|
3911
|
+
@pulumi.getter
|
|
3912
|
+
def message(self) -> Optional[str]:
|
|
3913
|
+
"""
|
|
3914
|
+
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}".
|
|
3915
|
+
"""
|
|
3916
|
+
return pulumi.get(self, "message")
|
|
3917
|
+
|
|
3918
|
+
@property
|
|
3919
|
+
@pulumi.getter(name="messageExpression")
|
|
3920
|
+
def message_expression(self) -> Optional[str]:
|
|
3921
|
+
"""
|
|
3922
|
+
messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: "object.x must be less than max ("+string(params.max)+")"
|
|
3923
|
+
"""
|
|
3924
|
+
return pulumi.get(self, "message_expression")
|
|
3925
|
+
|
|
3926
|
+
@property
|
|
3927
|
+
@pulumi.getter
|
|
3928
|
+
def reason(self) -> Optional[str]:
|
|
3929
|
+
"""
|
|
3930
|
+
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.
|
|
3931
|
+
"""
|
|
3932
|
+
return pulumi.get(self, "reason")
|
|
3933
|
+
|
|
3934
|
+
|
|
3935
|
+
@pulumi.output_type
|
|
3936
|
+
class ValidationPatch(dict):
|
|
3937
|
+
"""
|
|
3938
|
+
Validation specifies the CEL expression which is used to apply the validation.
|
|
3939
|
+
"""
|
|
3940
|
+
@staticmethod
|
|
3941
|
+
def __key_warning(key: str):
|
|
3942
|
+
suggest = None
|
|
3943
|
+
if key == "messageExpression":
|
|
3944
|
+
suggest = "message_expression"
|
|
3945
|
+
|
|
3946
|
+
if suggest:
|
|
3947
|
+
pulumi.log.warn(f"Key '{key}' not found in ValidationPatch. Access the value via the '{suggest}' property getter instead.")
|
|
3948
|
+
|
|
3949
|
+
def __getitem__(self, key: str) -> Any:
|
|
3950
|
+
ValidationPatch.__key_warning(key)
|
|
3951
|
+
return super().__getitem__(key)
|
|
3952
|
+
|
|
3953
|
+
def get(self, key: str, default = None) -> Any:
|
|
3954
|
+
ValidationPatch.__key_warning(key)
|
|
3955
|
+
return super().get(key, default)
|
|
3956
|
+
|
|
3957
|
+
def __init__(__self__, *,
|
|
3958
|
+
expression: Optional[str] = None,
|
|
3959
|
+
message: Optional[str] = None,
|
|
3960
|
+
message_expression: Optional[str] = None,
|
|
3961
|
+
reason: Optional[str] = None):
|
|
3962
|
+
"""
|
|
3963
|
+
Validation specifies the CEL expression which is used to apply the validation.
|
|
3964
|
+
:param str expression: Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
|
|
3965
|
+
|
|
3966
|
+
- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
|
|
3967
|
+
For example, a variable named 'foo' can be accessed as 'variables.foo'.
|
|
3968
|
+
- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
|
|
3969
|
+
See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
|
|
3970
|
+
- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
|
|
3971
|
+
request resource.
|
|
3972
|
+
|
|
3973
|
+
The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.
|
|
3974
|
+
|
|
3975
|
+
Only 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:
|
|
3976
|
+
"true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if",
|
|
3977
|
+
"import", "let", "loop", "package", "namespace", "return".
|
|
3978
|
+
Examples:
|
|
3979
|
+
- Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"}
|
|
3980
|
+
- Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"}
|
|
3981
|
+
- Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"}
|
|
3982
|
+
|
|
3983
|
+
Equality 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:
|
|
3984
|
+
- 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and
|
|
3985
|
+
non-intersecting elements in `Y` are appended, retaining their partial order.
|
|
3986
|
+
- 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values
|
|
3987
|
+
are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with
|
|
3988
|
+
non-intersecting keys are appended, retaining their partial order.
|
|
3989
|
+
Required.
|
|
3990
|
+
:param str message: 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}".
|
|
3991
|
+
:param str message_expression: messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: "object.x must be less than max ("+string(params.max)+")"
|
|
3992
|
+
:param str reason: 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.
|
|
3993
|
+
"""
|
|
3994
|
+
if expression is not None:
|
|
3995
|
+
pulumi.set(__self__, "expression", expression)
|
|
3996
|
+
if message is not None:
|
|
3997
|
+
pulumi.set(__self__, "message", message)
|
|
3998
|
+
if message_expression is not None:
|
|
3999
|
+
pulumi.set(__self__, "message_expression", message_expression)
|
|
4000
|
+
if reason is not None:
|
|
4001
|
+
pulumi.set(__self__, "reason", reason)
|
|
4002
|
+
|
|
4003
|
+
@property
|
|
4004
|
+
@pulumi.getter
|
|
4005
|
+
def expression(self) -> Optional[str]:
|
|
4006
|
+
"""
|
|
4007
|
+
Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
|
|
4008
|
+
|
|
4009
|
+
- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
|
|
4010
|
+
For example, a variable named 'foo' can be accessed as 'variables.foo'.
|
|
4011
|
+
- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
|
|
4012
|
+
See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
|
|
4013
|
+
- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
|
|
4014
|
+
request resource.
|
|
4015
|
+
|
|
4016
|
+
The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.
|
|
4017
|
+
|
|
4018
|
+
Only 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:
|
|
4019
|
+
"true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if",
|
|
4020
|
+
"import", "let", "loop", "package", "namespace", "return".
|
|
4021
|
+
Examples:
|
|
4022
|
+
- Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"}
|
|
4023
|
+
- Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"}
|
|
4024
|
+
- Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"}
|
|
4025
|
+
|
|
4026
|
+
Equality 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:
|
|
4027
|
+
- 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and
|
|
4028
|
+
non-intersecting elements in `Y` are appended, retaining their partial order.
|
|
4029
|
+
- 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values
|
|
4030
|
+
are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with
|
|
4031
|
+
non-intersecting keys are appended, retaining their partial order.
|
|
4032
|
+
Required.
|
|
4033
|
+
"""
|
|
4034
|
+
return pulumi.get(self, "expression")
|
|
4035
|
+
|
|
4036
|
+
@property
|
|
4037
|
+
@pulumi.getter
|
|
4038
|
+
def message(self) -> Optional[str]:
|
|
4039
|
+
"""
|
|
4040
|
+
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}".
|
|
4041
|
+
"""
|
|
4042
|
+
return pulumi.get(self, "message")
|
|
4043
|
+
|
|
4044
|
+
@property
|
|
4045
|
+
@pulumi.getter(name="messageExpression")
|
|
4046
|
+
def message_expression(self) -> Optional[str]:
|
|
4047
|
+
"""
|
|
4048
|
+
messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: "object.x must be less than max ("+string(params.max)+")"
|
|
4049
|
+
"""
|
|
4050
|
+
return pulumi.get(self, "message_expression")
|
|
4051
|
+
|
|
4052
|
+
@property
|
|
4053
|
+
@pulumi.getter
|
|
4054
|
+
def reason(self) -> Optional[str]:
|
|
4055
|
+
"""
|
|
4056
|
+
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.
|
|
4057
|
+
"""
|
|
4058
|
+
return pulumi.get(self, "reason")
|
|
4059
|
+
|
|
4060
|
+
|
|
4061
|
+
@pulumi.output_type
|
|
4062
|
+
class Variable(dict):
|
|
4063
|
+
"""
|
|
4064
|
+
Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
|
|
4065
|
+
"""
|
|
4066
|
+
def __init__(__self__, *,
|
|
4067
|
+
expression: str,
|
|
4068
|
+
name: str):
|
|
4069
|
+
"""
|
|
4070
|
+
Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
|
|
4071
|
+
:param str expression: Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
|
|
4072
|
+
:param str name: Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is "foo", the variable will be available as `variables.foo`
|
|
4073
|
+
"""
|
|
4074
|
+
pulumi.set(__self__, "expression", expression)
|
|
4075
|
+
pulumi.set(__self__, "name", name)
|
|
4076
|
+
|
|
4077
|
+
@property
|
|
4078
|
+
@pulumi.getter
|
|
4079
|
+
def expression(self) -> str:
|
|
4080
|
+
"""
|
|
4081
|
+
Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
|
|
4082
|
+
"""
|
|
4083
|
+
return pulumi.get(self, "expression")
|
|
4084
|
+
|
|
4085
|
+
@property
|
|
4086
|
+
@pulumi.getter
|
|
4087
|
+
def name(self) -> str:
|
|
4088
|
+
"""
|
|
4089
|
+
Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is "foo", the variable will be available as `variables.foo`
|
|
4090
|
+
"""
|
|
4091
|
+
return pulumi.get(self, "name")
|
|
4092
|
+
|
|
4093
|
+
|
|
4094
|
+
@pulumi.output_type
|
|
4095
|
+
class VariablePatch(dict):
|
|
4096
|
+
"""
|
|
4097
|
+
Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
|
|
4098
|
+
"""
|
|
4099
|
+
def __init__(__self__, *,
|
|
4100
|
+
expression: Optional[str] = None,
|
|
4101
|
+
name: Optional[str] = None):
|
|
4102
|
+
"""
|
|
4103
|
+
Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
|
|
4104
|
+
:param str expression: Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
|
|
4105
|
+
:param str name: Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is "foo", the variable will be available as `variables.foo`
|
|
4106
|
+
"""
|
|
4107
|
+
if expression is not None:
|
|
4108
|
+
pulumi.set(__self__, "expression", expression)
|
|
4109
|
+
if name is not None:
|
|
4110
|
+
pulumi.set(__self__, "name", name)
|
|
4111
|
+
|
|
4112
|
+
@property
|
|
4113
|
+
@pulumi.getter
|
|
4114
|
+
def expression(self) -> Optional[str]:
|
|
4115
|
+
"""
|
|
4116
|
+
Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
|
|
4117
|
+
"""
|
|
4118
|
+
return pulumi.get(self, "expression")
|
|
4119
|
+
|
|
4120
|
+
@property
|
|
4121
|
+
@pulumi.getter
|
|
4122
|
+
def name(self) -> Optional[str]:
|
|
4123
|
+
"""
|
|
4124
|
+
Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is "foo", the variable will be available as `variables.foo`
|
|
4125
|
+
"""
|
|
4126
|
+
return pulumi.get(self, "name")
|
|
4127
|
+
|
|
4128
|
+
|
|
1719
4129
|
@pulumi.output_type
|
|
1720
4130
|
class WebhookClientConfig(dict):
|
|
1721
4131
|
"""
|