From 80656f072bd237d68e5dc5ab6a2c47532df64611 Mon Sep 17 00:00:00 2001 From: Levi Blackstone Date: Thu, 8 Apr 2021 11:58:57 -0600 Subject: [PATCH] Add support for k8s 1.21 (#1449) --- CHANGELOG.md | 3 + Makefile | 2 +- .../pulumi-resource-kubernetes/schema.json | 2612 ++++++++++++++--- provider/pkg/kinds/deprecated.go | 52 +- provider/pkg/kinds/deprecated_test.go | 8 + provider/pkg/kinds/kinds.go | 5 + .../V1/Inputs/MutatingWebhookArgs.cs | 2 +- .../V1/Inputs/ValidatingWebhookArgs.cs | 2 +- .../V1/Outputs/MutatingWebhook.cs | 2 +- .../V1/Outputs/ValidatingWebhook.cs | 2 +- .../V1Beta1/Inputs/MutatingWebhookArgs.cs | 2 +- .../V1Beta1/Inputs/ValidatingWebhookArgs.cs | 2 +- .../V1Beta1/Outputs/MutatingWebhook.cs | 2 +- .../V1Beta1/Outputs/ValidatingWebhook.cs | 2 +- .../V1/Inputs/RollingUpdateDaemonSetArgs.cs | 8 +- .../Apps/V1/Outputs/RollingUpdateDaemonSet.cs | 12 +- sdk/dotnet/Batch/V1/CronJob.cs | 141 + sdk/dotnet/Batch/V1/CronJobList.cs | 136 + sdk/dotnet/Batch/V1/Inputs/CronJobArgs.cs | 12 + sdk/dotnet/Batch/V1/Inputs/CronJobSpecArgs.cs | 64 + .../Batch/V1/Inputs/CronJobStatusArgs.cs | 46 + sdk/dotnet/Batch/V1/Inputs/JobSpecArgs.cs | 20 +- sdk/dotnet/Batch/V1/Inputs/JobStatusArgs.cs | 10 +- .../Batch/V1/Inputs/JobTemplateSpecArgs.cs | 34 + sdk/dotnet/Batch/V1/Outputs/CronJob.cs | 56 + sdk/dotnet/Batch/V1/Outputs/CronJobSpec.cs | 70 + sdk/dotnet/Batch/V1/Outputs/CronJobStatus.cs | 42 + sdk/dotnet/Batch/V1/Outputs/JobSpec.cs | 22 +- sdk/dotnet/Batch/V1/Outputs/JobStatus.cs | 11 +- .../Batch/V1/Outputs/JobTemplateSpec.cs | 35 + sdk/dotnet/Batch/V1Beta1/CronJob.cs | 1 + .../Batch/V1Beta1/Inputs/CronJobStatusArgs.cs | 6 + .../Batch/V1Beta1/Outputs/CronJobStatus.cs | 9 +- sdk/dotnet/Batch/V2Alpha1/CronJob.cs | 1 + sdk/dotnet/Core/V1/ConfigMap.cs | 4 +- sdk/dotnet/Core/V1/EphemeralContainers.cs | 130 + sdk/dotnet/Core/V1/Inputs/ContainerArgs.cs | 2 +- .../V1/Inputs/EphemeralVolumeSourceArgs.cs | 6 - .../Core/V1/Inputs/PodAffinityTermArgs.cs | 8 +- sdk/dotnet/Core/V1/Inputs/PodSpecArgs.cs | 2 +- sdk/dotnet/Core/V1/Inputs/ProbeArgs.cs | 6 + .../V1/Inputs/ResourceRequirementsArgs.cs | 4 +- sdk/dotnet/Core/V1/Inputs/ServiceSpecArgs.cs | 16 +- sdk/dotnet/Core/V1/Inputs/VolumeArgs.cs | 4 +- sdk/dotnet/Core/V1/LimitRangeList.cs | 4 +- sdk/dotnet/Core/V1/Outputs/ConfigMap.cs | 2 +- sdk/dotnet/Core/V1/Outputs/Container.cs | 2 +- .../Core/V1/Outputs/EphemeralVolumeSource.cs | 10 +- sdk/dotnet/Core/V1/Outputs/PodAffinityTerm.cs | 9 +- sdk/dotnet/Core/V1/Outputs/PodSpec.cs | 2 +- sdk/dotnet/Core/V1/Outputs/Probe.cs | 7 + .../Core/V1/Outputs/ResourceRequirements.cs | 4 +- sdk/dotnet/Core/V1/Outputs/Secret.cs | 4 +- sdk/dotnet/Core/V1/Outputs/ServiceSpec.cs | 18 +- sdk/dotnet/Core/V1/Outputs/Volume.cs | 4 +- sdk/dotnet/Core/V1/Secret.cs | 8 +- sdk/dotnet/Discovery/V1/EndpointSlice.cs | 170 ++ sdk/dotnet/Discovery/V1/EndpointSliceList.cs | 136 + .../Discovery/V1/Inputs/EndpointArgs.cs | 82 + .../V1/Inputs/EndpointConditionsArgs.cs | 40 + .../Discovery/V1/Inputs/EndpointHintsArgs.cs | 34 + .../Discovery/V1/Inputs/EndpointPortArgs.cs | 46 + .../Discovery/V1/Inputs/EndpointSliceArgs.cs | 12 + sdk/dotnet/Discovery/V1/Inputs/ForZoneArgs.cs | 28 + sdk/dotnet/Discovery/V1/Outputs/Endpoint.cs | 77 + .../V1/Outputs/EndpointConditions.cs | 42 + .../Discovery/V1/Outputs/EndpointHints.cs | 27 + .../Discovery/V1/Outputs/EndpointPort.cs | 49 + .../Discovery/V1/Outputs/EndpointSlice.cs | 63 + sdk/dotnet/Discovery/V1/Outputs/ForZone.cs | 27 + sdk/dotnet/Discovery/V1Beta1/EndpointSlice.cs | 4 + .../Discovery/V1Beta1/Inputs/EndpointArgs.cs | 6 + .../V1Beta1/Inputs/EndpointHintsArgs.cs | 34 + .../Discovery/V1Beta1/Inputs/ForZoneArgs.cs | 28 + .../Discovery/V1Beta1/Outputs/Endpoint.cs | 7 + .../V1Beta1/Outputs/EndpointHints.cs | 27 + .../Discovery/V1Beta1/Outputs/ForZone.cs | 27 + sdk/dotnet/Events/V1/Event.cs | 10 +- sdk/dotnet/Events/V1/Outputs/Event.cs | 3 + sdk/dotnet/Events/V1Beta1/Event.cs | 10 +- sdk/dotnet/Events/V1Beta1/Outputs/Event.cs | 3 + .../V1Alpha1/Inputs/FlowSchemaSpecArgs.cs | 2 +- .../V1Alpha1/Outputs/FlowSchemaSpec.cs | 2 +- .../IngressClassParametersReferenceArgs.cs | 52 + .../V1/Inputs/IngressClassSpecArgs.cs | 2 +- .../V1/Inputs/NetworkPolicyPortArgs.cs | 8 +- .../V1/Inputs/NetworkPolicySpecArgs.cs | 2 +- .../IngressClassParametersReference.cs | 56 + .../Networking/V1/Outputs/IngressClassSpec.cs | 4 +- .../V1/Outputs/NetworkPolicyPort.cs | 9 +- .../V1/Outputs/NetworkPolicySpec.cs | 2 +- .../IngressClassParametersReferenceArgs.cs | 52 + .../V1Beta1/Inputs/IngressClassSpecArgs.cs | 2 +- .../IngressClassParametersReference.cs | 56 + .../V1Beta1/Outputs/IngressClassSpec.cs | 4 +- .../V1/Inputs/PodDisruptionBudgetArgs.cs | 12 + .../V1/Inputs/PodDisruptionBudgetSpecArgs.cs | 40 + .../Inputs/PodDisruptionBudgetStatusArgs.cs | 84 + .../Policy/V1/Outputs/PodDisruptionBudget.cs | 56 + .../V1/Outputs/PodDisruptionBudgetSpec.cs | 42 + .../V1/Outputs/PodDisruptionBudgetStatus.cs | 78 + sdk/dotnet/Policy/V1/PodDisruptionBudget.cs | 140 + .../Policy/V1/PodDisruptionBudgetList.cs | 136 + .../Inputs/PodDisruptionBudgetSpecArgs.cs | 2 +- .../Inputs/PodDisruptionBudgetStatusArgs.cs | 20 + .../Outputs/PodDisruptionBudgetSpec.cs | 2 +- .../Outputs/PodDisruptionBudgetStatus.cs | 15 + .../Policy/V1Beta1/PodDisruptionBudget.cs | 4 + .../Policy/V1Beta1/PodSecurityPolicy.cs | 2 +- .../Storage/V1/Inputs/CSIDriverSpecArgs.cs | 18 +- .../V1/Inputs/VolumeAttachmentSourceArgs.cs | 2 +- .../Storage/V1/Outputs/CSIDriverSpec.cs | 18 +- .../V1/Outputs/VolumeAttachmentSource.cs | 2 +- .../Storage/V1Alpha1/CSIStorageCapacity.cs | 194 ++ .../V1Alpha1/CSIStorageCapacityList.cs | 136 + .../V1Alpha1/Inputs/CSIStorageCapacityArgs.cs | 12 + .../V1Alpha1/Outputs/CSIStorageCapacity.cs | 78 + .../Storage/V1Beta1/CSIStorageCapacity.cs | 194 ++ .../Storage/V1Beta1/CSIStorageCapacityList.cs | 136 + .../V1Beta1/Inputs/CSIDriverSpecArgs.cs | 18 +- .../V1Beta1/Inputs/CSIStorageCapacityArgs.cs | 12 + .../Inputs/VolumeAttachmentSourceArgs.cs | 2 +- .../Storage/V1Beta1/Outputs/CSIDriverSpec.cs | 18 +- .../V1Beta1/Outputs/CSIStorageCapacity.cs | 78 + .../V1Beta1/Outputs/VolumeAttachmentSource.cs | 2 +- sdk/dotnet/Yaml/Yaml.cs | 52 + .../admissionregistration/v1/pulumiTypes.go | 12 +- .../v1beta1/pulumiTypes.go | 12 +- sdk/go/kubernetes/apps/v1/pulumiTypes.go | 27 +- sdk/go/kubernetes/batch/v1/cronJob.go | 311 ++ sdk/go/kubernetes/batch/v1/cronJobList.go | 300 ++ sdk/go/kubernetes/batch/v1/init.go | 4 + sdk/go/kubernetes/batch/v1/pulumiTypes.go | 905 +++++- sdk/go/kubernetes/batch/v1beta1/cronJob.go | 3 + .../kubernetes/batch/v1beta1/pulumiTypes.go | 19 + sdk/go/kubernetes/batch/v2alpha1/cronJob.go | 3 + sdk/go/kubernetes/core/v1/configMap.go | 10 +- .../kubernetes/core/v1/ephemeralContainers.go | 295 ++ sdk/go/kubernetes/core/v1/init.go | 2 + sdk/go/kubernetes/core/v1/limitRangeList.go | 10 +- sdk/go/kubernetes/core/v1/pulumiTypes.go | 253 +- sdk/go/kubernetes/core/v1/secret.go | 20 +- .../kubernetes/discovery/v1/endpointSlice.go | 329 +++ .../discovery/v1/endpointSliceList.go | 300 ++ sdk/go/kubernetes/discovery/v1/init.go | 45 + sdk/go/kubernetes/discovery/v1/pulumiTypes.go | 952 ++++++ .../discovery/v1beta1/endpointSlice.go | 6 + .../discovery/v1beta1/pulumiTypes.go | 247 ++ sdk/go/kubernetes/events/v1/event.go | 24 +- sdk/go/kubernetes/events/v1/pulumiTypes.go | 15 +- sdk/go/kubernetes/events/v1beta1/event.go | 24 +- .../kubernetes/events/v1beta1/pulumiTypes.go | 15 +- .../flowcontrol/v1alpha1/pulumiTypes.go | 8 +- .../kubernetes/networking/v1/pulumiTypes.go | 249 +- .../networking/v1beta1/pulumiTypes.go | 226 +- sdk/go/kubernetes/policy/v1/init.go | 45 + .../policy/v1/podDisruptionBudget.go | 308 ++ .../policy/v1/podDisruptionBudgetList.go | 300 ++ sdk/go/kubernetes/policy/v1/pulumiTypes.go | 692 +++++ .../policy/v1beta1/podDisruptionBudget.go | 6 + .../policy/v1beta1/podSecurityPolicy.go | 2 +- .../kubernetes/policy/v1beta1/pulumiTypes.go | 65 +- sdk/go/kubernetes/storage/v1/pulumiTypes.go | 80 +- .../storage/v1alpha1/csistorageCapacity.go | 384 +++ .../v1alpha1/csistorageCapacityList.go | 300 ++ sdk/go/kubernetes/storage/v1alpha1/init.go | 4 + .../storage/v1alpha1/pulumiTypes.go | 287 ++ .../storage/v1beta1/csistorageCapacity.go | 384 +++ .../storage/v1beta1/csistorageCapacityList.go | 300 ++ sdk/go/kubernetes/storage/v1beta1/init.go | 4 + .../kubernetes/storage/v1beta1/pulumiTypes.go | 367 ++- sdk/go/kubernetes/yaml/yaml.go | 49 + sdk/nodejs/batch/v1/cronJob.ts | 111 + sdk/nodejs/batch/v1/cronJobList.ts | 106 + sdk/nodejs/batch/v1/index.ts | 8 + sdk/nodejs/batch/v1beta1/cronJob.ts | 2 +- sdk/nodejs/batch/v2alpha1/cronJob.ts | 2 +- sdk/nodejs/core/v1/configMap.ts | 4 +- sdk/nodejs/core/v1/ephemeralContainers.ts | 100 + sdk/nodejs/core/v1/index.ts | 4 + sdk/nodejs/core/v1/limitRangeList.ts | 4 +- sdk/nodejs/core/v1/secret.ts | 8 +- sdk/nodejs/discovery/index.ts | 2 + sdk/nodejs/discovery/v1/endpointSlice.ts | 131 + sdk/nodejs/discovery/v1/endpointSliceList.ts | 106 + sdk/nodejs/discovery/v1/index.ts | 28 + sdk/nodejs/discovery/v1beta1/endpointSlice.ts | 2 + sdk/nodejs/events/v1/event.ts | 11 +- sdk/nodejs/events/v1beta1/event.ts | 11 +- sdk/nodejs/policy/index.ts | 2 + sdk/nodejs/policy/v1/index.ts | 28 + sdk/nodejs/policy/v1/podDisruptionBudget.ts | 111 + .../policy/v1/podDisruptionBudgetList.ts | 106 + .../policy/v1beta1/podDisruptionBudget.ts | 2 + .../policy/v1beta1/podSecurityPolicy.ts | 2 +- .../storage/v1alpha1/csistorageCapacity.ts | 162 + .../v1alpha1/csistorageCapacityList.ts | 106 + sdk/nodejs/storage/v1alpha1/index.ts | 8 + .../storage/v1beta1/csistorageCapacity.ts | 162 + .../storage/v1beta1/csistorageCapacityList.ts | 106 + sdk/nodejs/storage/v1beta1/index.ts | 8 + sdk/nodejs/tsconfig.json | 13 + sdk/nodejs/types/input.ts | 651 +++- sdk/nodejs/types/output.ts | 647 +++- sdk/nodejs/yaml/yaml.ts | 165 ++ sdk/python/pulumi_kubernetes/_tables.py | 20 + .../admissionregistration/v1/_inputs.py | 8 +- .../admissionregistration/v1/outputs.py | 8 +- .../admissionregistration/v1beta1/_inputs.py | 8 +- .../admissionregistration/v1beta1/outputs.py | 8 +- .../pulumi_kubernetes/apps/v1/_inputs.py | 20 +- .../pulumi_kubernetes/apps/v1/outputs.py | 16 +- .../pulumi_kubernetes/batch/v1/CronJob.py | 137 + .../pulumi_kubernetes/batch/v1/CronJobList.py | 127 + .../pulumi_kubernetes/batch/v1/__init__.py | 8 +- .../pulumi_kubernetes/batch/v1/_inputs.py | 378 ++- .../pulumi_kubernetes/batch/v1/outputs.py | 322 +- .../batch/v1beta1/CronJob.py | 2 +- .../batch/v1beta1/_inputs.py | 18 +- .../batch/v1beta1/outputs.py | 14 +- .../batch/v2alpha1/CronJob.py | 2 +- .../pulumi_kubernetes/core/v1/ConfigMap.py | 4 +- .../core/v1/EphemeralContainers.py | 122 + .../core/v1/LimitRangeList.py | 4 +- .../pulumi_kubernetes/core/v1/Secret.py | 8 +- .../pulumi_kubernetes/core/v1/__init__.py | 3 + .../pulumi_kubernetes/core/v1/_inputs.py | 128 +- .../pulumi_kubernetes/core/v1/outputs.py | 108 +- .../pulumi_kubernetes/discovery/__init__.py | 1 + .../discovery/v1/EndpointSlice.py | 155 + .../discovery/v1/EndpointSliceList.py | 127 + .../discovery/v1/__init__.py | 34 + .../pulumi_kubernetes/discovery/v1/_inputs.py | 433 +++ .../pulumi_kubernetes/discovery/v1/outputs.py | 378 +++ .../discovery/v1beta1/EndpointSlice.py | 2 + .../discovery/v1beta1/_inputs.py | 65 + .../discovery/v1beta1/outputs.py | 65 + .../pulumi_kubernetes/events/v1/Event.py | 8 +- .../pulumi_kubernetes/events/v1/_inputs.py | 27 +- .../pulumi_kubernetes/events/v1/outputs.py | 19 +- .../pulumi_kubernetes/events/v1beta1/Event.py | 8 +- .../events/v1beta1/_inputs.py | 27 +- .../events/v1beta1/outputs.py | 19 +- .../flowcontrol/v1alpha1/_inputs.py | 4 +- .../flowcontrol/v1alpha1/outputs.py | 4 +- .../networking/v1/IngressClass.py | 1 - .../networking/v1/IngressClassList.py | 1 - .../networking/v1/_inputs.py | 119 +- .../networking/v1/outputs.py | 99 +- .../networking/v1beta1/IngressClass.py | 1 - .../networking/v1beta1/IngressClassList.py | 1 - .../networking/v1beta1/_inputs.py | 95 +- .../networking/v1beta1/outputs.py | 79 +- .../pulumi_kubernetes/policy/__init__.py | 1 + .../policy/v1/PodDisruptionBudget.py | 136 + .../policy/v1/PodDisruptionBudgetList.py | 126 + .../pulumi_kubernetes/policy/v1/__init__.py | 34 + .../pulumi_kubernetes/policy/v1/_inputs.py | 293 ++ .../pulumi_kubernetes/policy/v1/outputs.py | 252 ++ .../policy/v1beta1/PodDisruptionBudget.py | 2 + .../policy/v1beta1/PodSecurityPolicy.py | 2 +- .../policy/v1beta1/_inputs.py | 38 +- .../policy/v1beta1/outputs.py | 36 +- .../pulumi_kubernetes/storage/v1/_inputs.py | 40 +- .../pulumi_kubernetes/storage/v1/outputs.py | 40 +- .../storage/v1alpha1/CSIStorageCapacity.py | 186 ++ .../v1alpha1/CSIStorageCapacityList.py | 126 + .../storage/v1alpha1/__init__.py | 8 +- .../storage/v1alpha1/_inputs.py | 144 + .../storage/v1alpha1/outputs.py | 130 + .../storage/v1beta1/CSIStorageCapacity.py | 186 ++ .../storage/v1beta1/CSIStorageCapacityList.py | 126 + .../storage/v1beta1/__init__.py | 6 + .../storage/v1beta1/_inputs.py | 184 +- .../storage/v1beta1/outputs.py | 170 +- sdk/python/pulumi_kubernetes/yaml.py | 66 + 276 files changed, 22154 insertions(+), 1085 deletions(-) create mode 100644 sdk/dotnet/Batch/V1/CronJob.cs create mode 100644 sdk/dotnet/Batch/V1/CronJobList.cs create mode 100644 sdk/dotnet/Batch/V1/Inputs/CronJobArgs.cs create mode 100644 sdk/dotnet/Batch/V1/Inputs/CronJobSpecArgs.cs create mode 100644 sdk/dotnet/Batch/V1/Inputs/CronJobStatusArgs.cs create mode 100644 sdk/dotnet/Batch/V1/Inputs/JobTemplateSpecArgs.cs create mode 100644 sdk/dotnet/Batch/V1/Outputs/CronJob.cs create mode 100644 sdk/dotnet/Batch/V1/Outputs/CronJobSpec.cs create mode 100644 sdk/dotnet/Batch/V1/Outputs/CronJobStatus.cs create mode 100644 sdk/dotnet/Batch/V1/Outputs/JobTemplateSpec.cs create mode 100644 sdk/dotnet/Core/V1/EphemeralContainers.cs create mode 100644 sdk/dotnet/Discovery/V1/EndpointSlice.cs create mode 100644 sdk/dotnet/Discovery/V1/EndpointSliceList.cs create mode 100644 sdk/dotnet/Discovery/V1/Inputs/EndpointArgs.cs create mode 100644 sdk/dotnet/Discovery/V1/Inputs/EndpointConditionsArgs.cs create mode 100644 sdk/dotnet/Discovery/V1/Inputs/EndpointHintsArgs.cs create mode 100644 sdk/dotnet/Discovery/V1/Inputs/EndpointPortArgs.cs create mode 100644 sdk/dotnet/Discovery/V1/Inputs/EndpointSliceArgs.cs create mode 100644 sdk/dotnet/Discovery/V1/Inputs/ForZoneArgs.cs create mode 100644 sdk/dotnet/Discovery/V1/Outputs/Endpoint.cs create mode 100644 sdk/dotnet/Discovery/V1/Outputs/EndpointConditions.cs create mode 100644 sdk/dotnet/Discovery/V1/Outputs/EndpointHints.cs create mode 100644 sdk/dotnet/Discovery/V1/Outputs/EndpointPort.cs create mode 100644 sdk/dotnet/Discovery/V1/Outputs/EndpointSlice.cs create mode 100644 sdk/dotnet/Discovery/V1/Outputs/ForZone.cs create mode 100644 sdk/dotnet/Discovery/V1Beta1/Inputs/EndpointHintsArgs.cs create mode 100644 sdk/dotnet/Discovery/V1Beta1/Inputs/ForZoneArgs.cs create mode 100644 sdk/dotnet/Discovery/V1Beta1/Outputs/EndpointHints.cs create mode 100644 sdk/dotnet/Discovery/V1Beta1/Outputs/ForZone.cs create mode 100644 sdk/dotnet/Networking/V1/Inputs/IngressClassParametersReferenceArgs.cs create mode 100644 sdk/dotnet/Networking/V1/Outputs/IngressClassParametersReference.cs create mode 100644 sdk/dotnet/Networking/V1Beta1/Inputs/IngressClassParametersReferenceArgs.cs create mode 100644 sdk/dotnet/Networking/V1Beta1/Outputs/IngressClassParametersReference.cs create mode 100644 sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetArgs.cs create mode 100644 sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetSpecArgs.cs create mode 100644 sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetStatusArgs.cs create mode 100644 sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudget.cs create mode 100644 sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudgetSpec.cs create mode 100644 sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudgetStatus.cs create mode 100644 sdk/dotnet/Policy/V1/PodDisruptionBudget.cs create mode 100644 sdk/dotnet/Policy/V1/PodDisruptionBudgetList.cs create mode 100644 sdk/dotnet/Storage/V1Alpha1/CSIStorageCapacity.cs create mode 100644 sdk/dotnet/Storage/V1Alpha1/CSIStorageCapacityList.cs create mode 100644 sdk/dotnet/Storage/V1Alpha1/Inputs/CSIStorageCapacityArgs.cs create mode 100644 sdk/dotnet/Storage/V1Alpha1/Outputs/CSIStorageCapacity.cs create mode 100644 sdk/dotnet/Storage/V1Beta1/CSIStorageCapacity.cs create mode 100644 sdk/dotnet/Storage/V1Beta1/CSIStorageCapacityList.cs create mode 100644 sdk/dotnet/Storage/V1Beta1/Inputs/CSIStorageCapacityArgs.cs create mode 100644 sdk/dotnet/Storage/V1Beta1/Outputs/CSIStorageCapacity.cs create mode 100644 sdk/go/kubernetes/batch/v1/cronJob.go create mode 100644 sdk/go/kubernetes/batch/v1/cronJobList.go create mode 100644 sdk/go/kubernetes/core/v1/ephemeralContainers.go create mode 100644 sdk/go/kubernetes/discovery/v1/endpointSlice.go create mode 100644 sdk/go/kubernetes/discovery/v1/endpointSliceList.go create mode 100644 sdk/go/kubernetes/discovery/v1/init.go create mode 100644 sdk/go/kubernetes/discovery/v1/pulumiTypes.go create mode 100644 sdk/go/kubernetes/policy/v1/init.go create mode 100644 sdk/go/kubernetes/policy/v1/podDisruptionBudget.go create mode 100644 sdk/go/kubernetes/policy/v1/podDisruptionBudgetList.go create mode 100644 sdk/go/kubernetes/policy/v1/pulumiTypes.go create mode 100644 sdk/go/kubernetes/storage/v1alpha1/csistorageCapacity.go create mode 100644 sdk/go/kubernetes/storage/v1alpha1/csistorageCapacityList.go create mode 100644 sdk/go/kubernetes/storage/v1beta1/csistorageCapacity.go create mode 100644 sdk/go/kubernetes/storage/v1beta1/csistorageCapacityList.go create mode 100644 sdk/nodejs/batch/v1/cronJob.ts create mode 100644 sdk/nodejs/batch/v1/cronJobList.ts create mode 100644 sdk/nodejs/core/v1/ephemeralContainers.ts create mode 100644 sdk/nodejs/discovery/v1/endpointSlice.ts create mode 100644 sdk/nodejs/discovery/v1/endpointSliceList.ts create mode 100644 sdk/nodejs/discovery/v1/index.ts create mode 100644 sdk/nodejs/policy/v1/index.ts create mode 100644 sdk/nodejs/policy/v1/podDisruptionBudget.ts create mode 100644 sdk/nodejs/policy/v1/podDisruptionBudgetList.ts create mode 100644 sdk/nodejs/storage/v1alpha1/csistorageCapacity.ts create mode 100644 sdk/nodejs/storage/v1alpha1/csistorageCapacityList.ts create mode 100644 sdk/nodejs/storage/v1beta1/csistorageCapacity.ts create mode 100644 sdk/nodejs/storage/v1beta1/csistorageCapacityList.ts create mode 100644 sdk/python/pulumi_kubernetes/batch/v1/CronJob.py create mode 100644 sdk/python/pulumi_kubernetes/batch/v1/CronJobList.py create mode 100644 sdk/python/pulumi_kubernetes/core/v1/EphemeralContainers.py create mode 100644 sdk/python/pulumi_kubernetes/discovery/v1/EndpointSlice.py create mode 100644 sdk/python/pulumi_kubernetes/discovery/v1/EndpointSliceList.py create mode 100644 sdk/python/pulumi_kubernetes/discovery/v1/__init__.py create mode 100644 sdk/python/pulumi_kubernetes/discovery/v1/_inputs.py create mode 100644 sdk/python/pulumi_kubernetes/discovery/v1/outputs.py create mode 100644 sdk/python/pulumi_kubernetes/policy/v1/PodDisruptionBudget.py create mode 100644 sdk/python/pulumi_kubernetes/policy/v1/PodDisruptionBudgetList.py create mode 100644 sdk/python/pulumi_kubernetes/policy/v1/__init__.py create mode 100644 sdk/python/pulumi_kubernetes/policy/v1/_inputs.py create mode 100644 sdk/python/pulumi_kubernetes/policy/v1/outputs.py create mode 100644 sdk/python/pulumi_kubernetes/storage/v1alpha1/CSIStorageCapacity.py create mode 100644 sdk/python/pulumi_kubernetes/storage/v1alpha1/CSIStorageCapacityList.py create mode 100644 sdk/python/pulumi_kubernetes/storage/v1beta1/CSIStorageCapacity.py create mode 100644 sdk/python/pulumi_kubernetes/storage/v1beta1/CSIStorageCapacityList.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 04bf4a94f2..85e4725d9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## HEAD (Unreleased) +## 2.9.0 (April 8, 2021) + +- Add support for k8s v1.21.0. (https://github.com/pulumi/pulumi-kubernetes/pull/1449) - [sdk/go] Fix plugin versioning for invoke calls (https://github.com/pulumi/pulumi-kubernetes/pull/1520) ## 2.8.4 (March 29, 2021) diff --git a/Makefile b/Makefile index d9adcce3cd..7524224869 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ VERSION ?= $(shell pulumictl get version) PROVIDER_PATH := provider/v2 VERSION_PATH := ${PROVIDER_PATH}/pkg/version.Version -KUBE_VERSION ?= v1.20.0 +KUBE_VERSION ?= v1.21.0 SWAGGER_URL ?= https://github.com/kubernetes/kubernetes/raw/${KUBE_VERSION}/api/openapi-spec/swagger.json OPENAPI_DIR := provider/pkg/gen/openapi-specs OPENAPI_FILE := ${OPENAPI_DIR}/swagger-${KUBE_VERSION}.json diff --git a/provider/cmd/pulumi-resource-kubernetes/schema.json b/provider/cmd/pulumi-resource-kubernetes/schema.json index 2875fc5c4c..18c1312d3f 100644 --- a/provider/cmd/pulumi-resource-kubernetes/schema.json +++ b/provider/cmd/pulumi-resource-kubernetes/schema.json @@ -93,7 +93,7 @@ }, "sideEffects": { "type": "string", - "description": "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change 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." + "description": "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some." }, "timeoutSeconds": { "type": "integer", @@ -330,7 +330,7 @@ }, "sideEffects": { "type": "string", - "description": "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change 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." + "description": "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some." }, "timeoutSeconds": { "type": "integer", @@ -512,7 +512,7 @@ }, "sideEffects": { "type": "string", - "description": "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown." + "description": "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown." }, "timeoutSeconds": { "type": "integer", @@ -747,7 +747,7 @@ }, "sideEffects": { "type": "string", - "description": "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown." + "description": "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown." }, "timeoutSeconds": { "type": "integer", @@ -3793,6 +3793,17 @@ "kubernetes:apps/v1:RollingUpdateDaemonSet": { "description": "Spec to control the desired behavior of daemon set rolling update.", "properties": { + "maxSurge": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate." + }, "maxUnavailable": { "oneOf": [ { @@ -3802,13 +3813,14 @@ "type": "string" } ], - "description": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update." + "description": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update." } }, "type": "object", "language": { "nodejs": { "requiredOutputs": [ + "maxSurge", "maxUnavailable" ] } @@ -9507,6 +9519,166 @@ } } }, + "kubernetes:batch/v1:CronJob": { + "description": "CronJob represents the configuration of a single cron job.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "batch/v1" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CronJob" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "spec": { + "$ref": "#/types/kubernetes:batch/v1:CronJobSpec", + "description": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + }, + "status": { + "$ref": "#/types/kubernetes:batch/v1:CronJobStatus", + "description": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "apiVersion", + "kind", + "metadata", + "spec", + "status" + ] + } + } + }, + "kubernetes:batch/v1:CronJobList": { + "description": "CronJobList is a collection of cron jobs.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "batch/v1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:batch/v1:CronJob" + }, + "description": "items is the list of CronJobs." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CronJobList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "type": "object", + "required": [ + "items" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "apiVersion", + "items", + "kind", + "metadata" + ] + } + } + }, + "kubernetes:batch/v1:CronJobSpec": { + "description": "CronJobSpec describes how the job execution will look like and when it will actually run.", + "properties": { + "concurrencyPolicy": { + "type": "string", + "description": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one" + }, + "failedJobsHistoryLimit": { + "type": "integer", + "description": "The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1." + }, + "jobTemplate": { + "$ref": "#/types/kubernetes:batch/v1:JobTemplateSpec", + "description": "Specifies the job that will be created when executing a CronJob." + }, + "schedule": { + "type": "string", + "description": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron." + }, + "startingDeadlineSeconds": { + "type": "integer", + "description": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones." + }, + "successfulJobsHistoryLimit": { + "type": "integer", + "description": "The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3." + }, + "suspend": { + "type": "boolean", + "description": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false." + } + }, + "type": "object", + "required": [ + "jobTemplate", + "schedule" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "concurrencyPolicy", + "failedJobsHistoryLimit", + "jobTemplate", + "schedule", + "startingDeadlineSeconds", + "successfulJobsHistoryLimit", + "suspend" + ] + } + } + }, + "kubernetes:batch/v1:CronJobStatus": { + "description": "CronJobStatus represents the current state of a cron job.", + "properties": { + "active": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:core/v1:ObjectReference" + }, + "description": "A list of pointers to currently running jobs." + }, + "lastScheduleTime": { + "type": "string", + "description": "Information when was the last time the job was successfully scheduled." + }, + "lastSuccessfulTime": { + "type": "string", + "description": "Information when was the last time the job successfully completed." + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "active", + "lastScheduleTime", + "lastSuccessfulTime" + ] + } + } + }, "kubernetes:batch/v1:Job": { "description": "Job represents the configuration of a single job.\n\nThis resource waits until its status is ready before registering success\nfor create/update, and populating output properties from the current state of the resource.\nThe following conditions are used to determine whether the resource creation has\nsucceeded or failed:\n\n1. The Job's '.status.startTime' is set, which indicates that the Job has started running.\n2. The Job's '.status.conditions' has a status of type 'Complete', and a 'status' set\n to 'True'.\n3. The Job's '.status.conditions' do not have a status of type 'Failed', with a\n\t'status' set to 'True'. If this condition is set, we should fail the Job immediately.\n\nIf the Job has not reached a Ready state after 10 minutes, it will\ntime out and mark the resource update as Failed. You can override the default timeout value\nby setting the 'customTimeouts' option on the resource.", "properties": { @@ -9637,12 +9809,16 @@ "properties": { "activeDeadlineSeconds": { "type": "integer", - "description": "Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer" + "description": "Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again." }, "backoffLimit": { "type": "integer", "description": "Specifies the number of retries before marking this job failed. Defaults to 6" }, + "completionMode": { + "type": "string", + "description": "CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5.\n\nThis field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job." + }, "completions": { "type": "integer", "description": "Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" @@ -9659,6 +9835,10 @@ "$ref": "#/types/kubernetes:meta/v1:LabelSelector", "description": "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors" }, + "suspend": { + "type": "boolean", + "description": "Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false." + }, "template": { "$ref": "#/types/kubernetes:core/v1:PodTemplateSpec", "description": "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" @@ -9677,10 +9857,12 @@ "requiredOutputs": [ "activeDeadlineSeconds", "backoffLimit", + "completionMode", "completions", "manualSelector", "parallelism", "selector", + "suspend", "template", "ttlSecondsAfterFinished" ] @@ -9694,6 +9876,10 @@ "type": "integer", "description": "The number of actively running pods." }, + "completedIndexes": { + "type": "string", + "description": "CompletedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\"." + }, "completionTime": { "type": "string", "description": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully." @@ -9703,7 +9889,7 @@ "items": { "$ref": "#/types/kubernetes:batch/v1:JobCondition" }, - "description": "The latest available observations of an object's current state. When a job fails, one of the conditions will have type == \"Failed\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" + "description": "The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" }, "failed": { "type": "integer", @@ -9711,7 +9897,7 @@ }, "startTime": { "type": "string", - "description": "Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC." + "description": "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC." }, "succeeded": { "type": "integer", @@ -9723,6 +9909,7 @@ "nodejs": { "requiredOutputs": [ "active", + "completedIndexes", "completionTime", "conditions", "failed", @@ -9732,6 +9919,28 @@ } } }, + "kubernetes:batch/v1:JobTemplateSpec": { + "description": "JobTemplateSpec describes the data a Job should have when created from a template", + "properties": { + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "spec": { + "$ref": "#/types/kubernetes:batch/v1:JobSpec", + "description": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "metadata", + "spec" + ] + } + } + }, "kubernetes:batch/v1beta1:CronJob": { "description": "CronJob represents the configuration of a single cron job.", "properties": { @@ -9875,6 +10084,10 @@ "lastScheduleTime": { "type": "string", "description": "Information when was the last time the job was successfully scheduled." + }, + "lastSuccessfulTime": { + "type": "string", + "description": "Information when was the last time the job successfully completed." } }, "type": "object", @@ -9882,7 +10095,8 @@ "nodejs": { "requiredOutputs": [ "active", - "lastScheduleTime" + "lastScheduleTime", + "lastSuccessfulTime" ] } } @@ -11416,7 +11630,7 @@ }, "immutable": { "type": "boolean", - "description": "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate." + "description": "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil." }, "kind": { "type": "string", @@ -11705,7 +11919,7 @@ }, "resources": { "$ref": "#/types/kubernetes:core/v1:ResourceRequirements", - "description": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/" + "description": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" }, "securityContext": { "$ref": "#/types/kubernetes:core/v1:SecurityContext", @@ -12585,13 +12799,53 @@ } } }, + "kubernetes:core/v1:EphemeralContainers": { + "description": "A list of ephemeral containers used with the Pod ephemeralcontainers subresource.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "v1" + }, + "ephemeralContainers": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:core/v1:EphemeralContainer" + }, + "description": "A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified.", + "language": { + "csharp": { + "name": "EphemeralContainersValue" + } + } + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "EphemeralContainers" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta" + } + }, + "type": "object", + "required": [ + "ephemeralContainers" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "apiVersion", + "ephemeralContainers", + "kind", + "metadata" + ] + } + } + }, "kubernetes:core/v1:EphemeralVolumeSource": { "description": "Represents an ephemeral volume that is handled by a normal storage driver.", "properties": { - "readOnly": { - "type": "boolean", - "description": "Specifies a read-only configuration for the volume. Defaults to false (read/write)." - }, "volumeClaimTemplate": { "$ref": "#/types/kubernetes:core/v1:PersistentVolumeClaimTemplate", "description": "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `\u003cpod name\u003e-\u003cvolume name\u003e` where `\u003cvolume name\u003e` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil." @@ -12601,7 +12855,6 @@ "language": { "nodejs": { "requiredOutputs": [ - "readOnly", "volumeClaimTemplate" ] } @@ -13565,7 +13818,7 @@ "items": { "$ref": "#/types/kubernetes:core/v1:LimitRange" }, - "description": "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/" + "description": "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" }, "kind": { "type": "string", @@ -15154,12 +15407,16 @@ "$ref": "#/types/kubernetes:meta/v1:LabelSelector", "description": "A label query over a set of resources, in this case pods." }, + "namespaceSelector": { + "$ref": "#/types/kubernetes:meta/v1:LabelSelector", + "description": "A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled." + }, "namespaces": { "type": "array", "items": { "type": "string" }, - "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"" + "description": "namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\"" }, "topologyKey": { "type": "string", @@ -15174,6 +15431,7 @@ "nodejs": { "requiredOutputs": [ "labelSelector", + "namespaceSelector", "namespaces", "topologyKey" ] @@ -15609,7 +15867,7 @@ }, "terminationGracePeriodSeconds": { "type": "integer", - "description": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds." + "description": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds." }, "tolerations": { "type": "array", @@ -15984,6 +16242,10 @@ "$ref": "#/types/kubernetes:core/v1:TCPSocketAction", "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported" }, + "terminationGracePeriodSeconds": { + "type": "integer", + "description": "Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate." + }, "timeoutSeconds": { "type": "integer", "description": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" @@ -16000,6 +16262,7 @@ "periodSeconds", "successThreshold", "tcpSocket", + "terminationGracePeriodSeconds", "timeoutSeconds" ] } @@ -16578,14 +16841,14 @@ "additionalProperties": { "type": "string" }, - "description": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/" + "description": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" }, "requests": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/" + "description": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" } }, "type": "object", @@ -16861,7 +17124,7 @@ }, "immutable": { "type": "boolean", - "description": "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate." + "description": "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil." }, "kind": { "type": "string", @@ -16877,7 +17140,7 @@ "additionalProperties": { "type": "string" }, - "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", + "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.", "secret": true }, "type": { @@ -17424,7 +17687,7 @@ }, "externalName": { "type": "string", - "description": "externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be" + "description": "externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be \"ExternalName\"." }, "externalTrafficPolicy": { "type": "string", @@ -17434,6 +17697,10 @@ "type": "integer", "description": "healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type)." }, + "internalTrafficPolicy": { + "type": "string", + "description": "InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. \"Cluster\" routes internal traffic to a Service to all endpoints. \"Local\" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is \"Cluster\"." + }, "ipFamilies": { "type": "array", "items": { @@ -17449,6 +17716,10 @@ "type": "string", "description": "IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the \"IPv6DualStack\" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName." }, + "loadBalancerClass": { + "type": "string", + "description": "loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type." + }, "loadBalancerIP": { "type": "string", "description": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature." @@ -17491,7 +17762,7 @@ "items": { "type": "string" }, - "description": "topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value \"*\" may be used to mean \"any topology\". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature." + "description": "topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value \"*\" may be used to mean \"any topology\". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version." }, "type": { "oneOf": [ @@ -17516,9 +17787,11 @@ "externalName", "externalTrafficPolicy", "healthCheckNodePort", + "internalTrafficPolicy", "ipFamilies", "ipFamily", "ipFamilyPolicy", + "loadBalancerClass", "loadBalancerIP", "loadBalancerSourceRanges", "ports", @@ -17954,7 +18227,7 @@ }, "ephemeral": { "$ref": "#/types/kubernetes:core/v1:EphemeralVolumeSource", - "description": "Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time." + "description": "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.\n\nThis is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled." }, "fc": { "$ref": "#/types/kubernetes:core/v1:FCVolumeSource", @@ -18287,7 +18560,7 @@ } } }, - "kubernetes:discovery.k8s.io/v1beta1:Endpoint": { + "kubernetes:discovery.k8s.io/v1:Endpoint": { "description": "Endpoint represents a single logical \"backend\" implementing a service.", "properties": { "addresses": { @@ -18298,9 +18571,20 @@ "description": "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100." }, "conditions": { - "$ref": "#/types/kubernetes:discovery.k8s.io/v1beta1:EndpointConditions", + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:EndpointConditions", "description": "conditions contains information about the current status of the endpoint." }, + "deprecatedTopology": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead." + }, + "hints": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:EndpointHints", + "description": "hints contains information associated with how an endpoint should be consumed." + }, "hostname": { "type": "string", "description": "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation." @@ -18313,12 +18597,9 @@ "$ref": "#/types/kubernetes:core/v1:ObjectReference", "description": "targetRef is a reference to a Kubernetes object that represents this endpoint." }, - "topology": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node\n where the endpoint is located. This should match the corresponding\n node label.\n* topology.kubernetes.io/zone: the value indicates the zone where the\n endpoint is located. This should match the corresponding node label.\n* topology.kubernetes.io/region: the value indicates the region where the\n endpoint is located. This should match the corresponding node label.\nThis field is deprecated and will be removed in future api versions." + "zone": { + "type": "string", + "description": "zone is the name of the Zone this endpoint exists in." } }, "type": "object", @@ -18330,15 +18611,17 @@ "requiredOutputs": [ "addresses", "conditions", + "deprecatedTopology", + "hints", "hostname", "nodeName", "targetRef", - "topology" + "zone" ] } } }, - "kubernetes:discovery.k8s.io/v1beta1:EndpointConditions": { + "kubernetes:discovery.k8s.io/v1:EndpointConditions": { "description": "EndpointConditions represents the current condition of an endpoint.", "properties": { "ready": { @@ -18365,6 +18648,275 @@ } } }, + "kubernetes:discovery.k8s.io/v1:EndpointHints": { + "description": "EndpointHints provides hints describing how an endpoint should be consumed.", + "properties": { + "forZones": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:ForZone" + }, + "description": "forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing." + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "forZones" + ] + } + } + }, + "kubernetes:discovery.k8s.io/v1:EndpointPort": { + "description": "EndpointPort represents a Port used by an EndpointSlice", + "properties": { + "appProtocol": { + "type": "string", + "description": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol." + }, + "name": { + "type": "string", + "description": "The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string." + }, + "port": { + "type": "integer", + "description": "The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer." + }, + "protocol": { + "type": "string", + "description": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP." + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "appProtocol", + "name", + "port", + "protocol" + ] + } + } + }, + "kubernetes:discovery.k8s.io/v1:EndpointSlice": { + "description": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.", + "properties": { + "addressType": { + "type": "string", + "description": "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name." + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "discovery.k8s.io/v1" + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:Endpoint" + }, + "description": "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "EndpointSlice" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata." + }, + "ports": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:EndpointPort" + }, + "description": "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports." + } + }, + "type": "object", + "required": [ + "addressType", + "endpoints" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "addressType", + "apiVersion", + "endpoints", + "kind", + "metadata", + "ports" + ] + } + } + }, + "kubernetes:discovery.k8s.io/v1:EndpointSliceList": { + "description": "EndpointSliceList represents a list of endpoint slices", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "discovery.k8s.io/v1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:EndpointSlice" + }, + "description": "List of endpoint slices" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "EndpointSliceList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata." + } + }, + "type": "object", + "required": [ + "items" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "apiVersion", + "items", + "kind", + "metadata" + ] + } + } + }, + "kubernetes:discovery.k8s.io/v1:ForZone": { + "description": "ForZone provides information about which zones should consume this endpoint.", + "properties": { + "name": { + "type": "string", + "description": "name represents the name of the zone." + } + }, + "type": "object", + "required": [ + "name" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "name" + ] + } + } + }, + "kubernetes:discovery.k8s.io/v1beta1:Endpoint": { + "description": "Endpoint represents a single logical \"backend\" implementing a service.", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100." + }, + "conditions": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1beta1:EndpointConditions", + "description": "conditions contains information about the current status of the endpoint." + }, + "hints": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1beta1:EndpointHints", + "description": "hints contains information associated with how an endpoint should be consumed." + }, + "hostname": { + "type": "string", + "description": "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation." + }, + "nodeName": { + "type": "string", + "description": "nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate." + }, + "targetRef": { + "$ref": "#/types/kubernetes:core/v1:ObjectReference", + "description": "targetRef is a reference to a Kubernetes object that represents this endpoint." + }, + "topology": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node\n where the endpoint is located. This should match the corresponding\n node label.\n* topology.kubernetes.io/zone: the value indicates the zone where the\n endpoint is located. This should match the corresponding node label.\n* topology.kubernetes.io/region: the value indicates the region where the\n endpoint is located. This should match the corresponding node label.\nThis field is deprecated and will be removed in future api versions." + } + }, + "type": "object", + "required": [ + "addresses" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "addresses", + "conditions", + "hints", + "hostname", + "nodeName", + "targetRef", + "topology" + ] + } + } + }, + "kubernetes:discovery.k8s.io/v1beta1:EndpointConditions": { + "description": "EndpointConditions represents the current condition of an endpoint.", + "properties": { + "ready": { + "type": "boolean", + "description": "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be \"true\" for terminating endpoints." + }, + "serving": { + "type": "boolean", + "description": "serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate." + }, + "terminating": { + "type": "boolean", + "description": "terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate." + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "ready", + "serving", + "terminating" + ] + } + } + }, + "kubernetes:discovery.k8s.io/v1beta1:EndpointHints": { + "description": "EndpointHints provides hints describing how an endpoint should be consumed.", + "properties": { + "forZones": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1beta1:ForZone" + }, + "description": "forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries." + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "forZones" + ] + } + } + }, "kubernetes:discovery.k8s.io/v1beta1:EndpointPort": { "description": "EndpointPort represents a Port used by an EndpointSlice", "properties": { @@ -18491,6 +19043,26 @@ } } }, + "kubernetes:discovery.k8s.io/v1beta1:ForZone": { + "description": "ForZone provides information about which zones should consume this endpoint.", + "properties": { + "name": { + "type": "string", + "description": "name represents the name of the zone." + } + }, + "type": "object", + "required": [ + "name" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "name" + ] + } + } + }, "kubernetes:events.k8s.io/v1:Event": { "description": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", "properties": { @@ -18529,7 +19101,8 @@ "const": "Event" }, "metadata": { - "$ref": "#/types/kubernetes:meta/v1:ObjectMeta" + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "note": { "type": "string", @@ -18566,8 +19139,7 @@ }, "type": "object", "required": [ - "eventTime", - "metadata" + "eventTime" ], "language": { "nodejs": { @@ -18697,7 +19269,8 @@ "const": "Event" }, "metadata": { - "$ref": "#/types/kubernetes:meta/v1:ObjectMeta" + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "note": { "type": "string", @@ -18734,8 +19307,7 @@ }, "type": "object", "required": [ - "eventTime", - "metadata" + "eventTime" ], "language": { "nodejs": { @@ -20951,7 +21523,7 @@ }, "matchingPrecedence": { "type": "integer", - "description": "`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default." + "description": "`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default." }, "priorityLevelConfiguration": { "$ref": "#/types/kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:PriorityLevelConfigurationReference", @@ -23232,6 +23804,47 @@ } } }, + "kubernetes:networking.k8s.io/v1:IngressClassParametersReference": { + "description": "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", + "properties": { + "apiGroup": { + "type": "string", + "description": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required." + }, + "kind": { + "type": "string", + "description": "Kind is the type of resource being referenced." + }, + "name": { + "type": "string", + "description": "Name is the name of resource being referenced." + }, + "namespace": { + "type": "string", + "description": "Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\"." + }, + "scope": { + "type": "string", + "description": "Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\". Field can be enabled with IngressClassNamespacedParams feature gate." + } + }, + "type": "object", + "required": [ + "kind", + "name" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "apiGroup", + "kind", + "name", + "namespace", + "scope" + ] + } + } + }, "kubernetes:networking.k8s.io/v1:IngressClassSpec": { "description": "IngressClassSpec provides information about the class of an Ingress.", "properties": { @@ -23240,7 +23853,7 @@ "description": "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable." }, "parameters": { - "$ref": "#/types/kubernetes:core/v1:TypedLocalObjectReference", + "$ref": "#/types/kubernetes:networking.k8s.io/v1:IngressClassParametersReference", "description": "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters." } }, @@ -23580,6 +24193,10 @@ "kubernetes:networking.k8s.io/v1:NetworkPolicyPort": { "description": "NetworkPolicyPort describes a port to allow traffic on", "properties": { + "endPort": { + "type": "integer", + "description": "If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate \"NetworkPolicyEndPort\"." + }, "port": { "oneOf": [ { @@ -23589,7 +24206,7 @@ "type": "string" } ], - "description": "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers." + "description": "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." }, "protocol": { "type": "string", @@ -23600,6 +24217,7 @@ "language": { "nodejs": { "requiredOutputs": [ + "endPort", "port", "protocol" ] @@ -23632,7 +24250,7 @@ "items": { "type": "string" }, - "description": "List of rule types that the NetworkPolicy relates to. Valid options are \"Ingress\", \"Egress\", or \"Ingress,Egress\". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8" + "description": "List of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8" } }, "type": "object", @@ -23876,6 +24494,47 @@ } } }, + "kubernetes:networking.k8s.io/v1beta1:IngressClassParametersReference": { + "description": "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", + "properties": { + "apiGroup": { + "type": "string", + "description": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required." + }, + "kind": { + "type": "string", + "description": "Kind is the type of resource being referenced." + }, + "name": { + "type": "string", + "description": "Name is the name of resource being referenced." + }, + "namespace": { + "type": "string", + "description": "Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\"." + }, + "scope": { + "type": "string", + "description": "Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\". Field can be enabled with IngressClassNamespacedParams feature gate." + } + }, + "type": "object", + "required": [ + "kind", + "name" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "apiGroup", + "kind", + "name", + "namespace", + "scope" + ] + } + } + }, "kubernetes:networking.k8s.io/v1beta1:IngressClassSpec": { "description": "IngressClassSpec provides information about the class of an Ingress.", "properties": { @@ -23884,7 +24543,7 @@ "description": "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable." }, "parameters": { - "$ref": "#/types/kubernetes:core/v1:TypedLocalObjectReference", + "$ref": "#/types/kubernetes:networking.k8s.io/v1beta1:IngressClassParametersReference", "description": "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters." } }, @@ -24523,184 +25182,13 @@ } } }, - "kubernetes:policy/v1beta1:AllowedCSIDriver": { - "description": "AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.", - "properties": { - "name": { - "type": "string", - "description": "Name is the registered name of the CSI driver" - } - }, - "type": "object", - "required": [ - "name" - ], - "language": { - "nodejs": { - "requiredOutputs": [ - "name" - ] - } - } - }, - "kubernetes:policy/v1beta1:AllowedFlexVolume": { - "description": "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", - "properties": { - "driver": { - "type": "string", - "description": "driver is the name of the Flexvolume driver." - } - }, - "type": "object", - "required": [ - "driver" - ], - "language": { - "nodejs": { - "requiredOutputs": [ - "driver" - ] - } - } - }, - "kubernetes:policy/v1beta1:AllowedHostPath": { - "description": "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", - "properties": { - "pathPrefix": { - "type": "string", - "description": "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`" - }, - "readOnly": { - "type": "boolean", - "description": "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly." - } - }, - "type": "object", - "language": { - "nodejs": { - "requiredOutputs": [ - "pathPrefix", - "readOnly" - ] - } - } - }, - "kubernetes:policy/v1beta1:Eviction": { - "description": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/\u003cpod name\u003e/evictions.", - "properties": { - "apiVersion": { - "type": "string", - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" - }, - "deleteOptions": { - "$ref": "#/types/kubernetes:meta/v1:DeleteOptions", - "description": "DeleteOptions may be provided" - }, - "kind": { - "type": "string", - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - }, - "metadata": { - "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", - "description": "ObjectMeta describes the pod that is being evicted." - } - }, - "type": "object", - "language": { - "nodejs": { - "requiredOutputs": [ - "apiVersion", - "deleteOptions", - "kind", - "metadata" - ] - } - } - }, - "kubernetes:policy/v1beta1:FSGroupStrategyOptions": { - "description": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", - "properties": { - "ranges": { - "type": "array", - "items": { - "$ref": "#/types/kubernetes:policy/v1beta1:IDRange" - }, - "description": "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs." - }, - "rule": { - "type": "string", - "description": "rule is the strategy that will dictate what FSGroup is used in the SecurityContext." - } - }, - "type": "object", - "language": { - "nodejs": { - "requiredOutputs": [ - "ranges", - "rule" - ] - } - } - }, - "kubernetes:policy/v1beta1:HostPortRange": { - "description": "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", - "properties": { - "max": { - "type": "integer", - "description": "max is the end of the range, inclusive." - }, - "min": { - "type": "integer", - "description": "min is the start of the range, inclusive." - } - }, - "type": "object", - "required": [ - "max", - "min" - ], - "language": { - "nodejs": { - "requiredOutputs": [ - "max", - "min" - ] - } - } - }, - "kubernetes:policy/v1beta1:IDRange": { - "description": "IDRange provides a min/max of an allowed range of IDs.", - "properties": { - "max": { - "type": "integer", - "description": "max is the end of the range, inclusive." - }, - "min": { - "type": "integer", - "description": "min is the start of the range, inclusive." - } - }, - "type": "object", - "required": [ - "max", - "min" - ], - "language": { - "nodejs": { - "requiredOutputs": [ - "max", - "min" - ] - } - } - }, - "kubernetes:policy/v1beta1:PodDisruptionBudget": { + "kubernetes:policy/v1:PodDisruptionBudget": { "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", "properties": { "apiVersion": { "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "const": "policy/v1beta1" + "const": "policy/v1" }, "kind": { "type": "string", @@ -24708,14 +25196,15 @@ "const": "PodDisruptionBudget" }, "metadata": { - "$ref": "#/types/kubernetes:meta/v1:ObjectMeta" + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/types/kubernetes:policy/v1beta1:PodDisruptionBudgetSpec", + "$ref": "#/types/kubernetes:policy/v1:PodDisruptionBudgetSpec", "description": "Specification of the desired behavior of the PodDisruptionBudget." }, "status": { - "$ref": "#/types/kubernetes:policy/v1beta1:PodDisruptionBudgetStatus", + "$ref": "#/types/kubernetes:policy/v1:PodDisruptionBudgetStatus", "description": "Most recently observed status of the PodDisruptionBudget." } }, @@ -24732,19 +25221,20 @@ } } }, - "kubernetes:policy/v1beta1:PodDisruptionBudgetList": { + "kubernetes:policy/v1:PodDisruptionBudgetList": { "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", "properties": { "apiVersion": { "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "const": "policy/v1beta1" + "const": "policy/v1" }, "items": { "type": "array", "items": { - "$ref": "#/types/kubernetes:policy/v1beta1:PodDisruptionBudget" - } + "$ref": "#/types/kubernetes:policy/v1:PodDisruptionBudget" + }, + "description": "Items is a list of PodDisruptionBudgets" }, "kind": { "type": "string", @@ -24752,7 +25242,8 @@ "const": "PodDisruptionBudgetList" }, "metadata": { - "$ref": "#/types/kubernetes:meta/v1:ListMeta" + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "type": "object", @@ -24770,7 +25261,7 @@ } } }, - "kubernetes:policy/v1beta1:PodDisruptionBudgetSpec": { + "kubernetes:policy/v1:PodDisruptionBudgetSpec": { "description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", "properties": { "maxUnavailable": { @@ -24797,7 +25288,354 @@ }, "selector": { "$ref": "#/types/kubernetes:meta/v1:LabelSelector", - "description": "Label query over pods whose evictions are managed by the disruption budget." + "description": "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace." + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "maxUnavailable", + "minAvailable", + "selector" + ] + } + } + }, + "kubernetes:policy/v1:PodDisruptionBudgetStatus": { + "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:meta/v1:Condition" + }, + "description": "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property." + }, + "currentHealthy": { + "type": "integer", + "description": "current number of healthy pods" + }, + "desiredHealthy": { + "type": "integer", + "description": "minimum desired number of healthy pods" + }, + "disruptedPods": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions." + }, + "disruptionsAllowed": { + "type": "integer", + "description": "Number of pod disruptions that are currently allowed." + }, + "expectedPods": { + "type": "integer", + "description": "total number of pods counted by this disruption budget" + }, + "observedGeneration": { + "type": "integer", + "description": "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation." + } + }, + "type": "object", + "required": [ + "currentHealthy", + "desiredHealthy", + "disruptionsAllowed", + "expectedPods" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "conditions", + "currentHealthy", + "desiredHealthy", + "disruptedPods", + "disruptionsAllowed", + "expectedPods", + "observedGeneration" + ] + } + } + }, + "kubernetes:policy/v1beta1:AllowedCSIDriver": { + "description": "AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.", + "properties": { + "name": { + "type": "string", + "description": "Name is the registered name of the CSI driver" + } + }, + "type": "object", + "required": [ + "name" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "name" + ] + } + } + }, + "kubernetes:policy/v1beta1:AllowedFlexVolume": { + "description": "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", + "properties": { + "driver": { + "type": "string", + "description": "driver is the name of the Flexvolume driver." + } + }, + "type": "object", + "required": [ + "driver" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "driver" + ] + } + } + }, + "kubernetes:policy/v1beta1:AllowedHostPath": { + "description": "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", + "properties": { + "pathPrefix": { + "type": "string", + "description": "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`" + }, + "readOnly": { + "type": "boolean", + "description": "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly." + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "pathPrefix", + "readOnly" + ] + } + } + }, + "kubernetes:policy/v1beta1:Eviction": { + "description": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/\u003cpod name\u003e/evictions.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + }, + "deleteOptions": { + "$ref": "#/types/kubernetes:meta/v1:DeleteOptions", + "description": "DeleteOptions may be provided" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "ObjectMeta describes the pod that is being evicted." + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "apiVersion", + "deleteOptions", + "kind", + "metadata" + ] + } + } + }, + "kubernetes:policy/v1beta1:FSGroupStrategyOptions": { + "description": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", + "properties": { + "ranges": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:policy/v1beta1:IDRange" + }, + "description": "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs." + }, + "rule": { + "type": "string", + "description": "rule is the strategy that will dictate what FSGroup is used in the SecurityContext." + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "ranges", + "rule" + ] + } + } + }, + "kubernetes:policy/v1beta1:HostPortRange": { + "description": "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + "properties": { + "max": { + "type": "integer", + "description": "max is the end of the range, inclusive." + }, + "min": { + "type": "integer", + "description": "min is the start of the range, inclusive." + } + }, + "type": "object", + "required": [ + "max", + "min" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "max", + "min" + ] + } + } + }, + "kubernetes:policy/v1beta1:IDRange": { + "description": "IDRange provides a min/max of an allowed range of IDs.", + "properties": { + "max": { + "type": "integer", + "description": "max is the end of the range, inclusive." + }, + "min": { + "type": "integer", + "description": "min is the start of the range, inclusive." + } + }, + "type": "object", + "required": [ + "max", + "min" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "max", + "min" + ] + } + } + }, + "kubernetes:policy/v1beta1:PodDisruptionBudget": { + "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "policy/v1beta1" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "PodDisruptionBudget" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta" + }, + "spec": { + "$ref": "#/types/kubernetes:policy/v1beta1:PodDisruptionBudgetSpec", + "description": "Specification of the desired behavior of the PodDisruptionBudget." + }, + "status": { + "$ref": "#/types/kubernetes:policy/v1beta1:PodDisruptionBudgetStatus", + "description": "Most recently observed status of the PodDisruptionBudget." + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "apiVersion", + "kind", + "metadata", + "spec", + "status" + ] + } + } + }, + "kubernetes:policy/v1beta1:PodDisruptionBudgetList": { + "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "policy/v1beta1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:policy/v1beta1:PodDisruptionBudget" + } + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "PodDisruptionBudgetList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta" + } + }, + "type": "object", + "required": [ + "items" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "apiVersion", + "items", + "kind", + "metadata" + ] + } + } + }, + "kubernetes:policy/v1beta1:PodDisruptionBudgetSpec": { + "description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", + "properties": { + "maxUnavailable": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\"." + }, + "minAvailable": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\"." + }, + "selector": { + "$ref": "#/types/kubernetes:meta/v1:LabelSelector", + "description": "Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace." } }, "type": "object", @@ -24814,6 +25652,13 @@ "kubernetes:policy/v1beta1:PodDisruptionBudgetStatus": { "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:meta/v1:Condition" + }, + "description": "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property." + }, "currentHealthy": { "type": "integer", "description": "current number of healthy pods" @@ -24852,6 +25697,7 @@ "language": { "nodejs": { "requiredOutputs": [ + "conditions", "currentHealthy", "desiredHealthy", "disruptedPods", @@ -24863,7 +25709,7 @@ } }, "kubernetes:policy/v1beta1:PodSecurityPolicy": { - "description": "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", + "description": "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21.", "properties": { "apiVersion": { "type": "string", @@ -27136,37 +27982,37 @@ "properties": { "attachRequired": { "type": "boolean", - "description": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called." + "description": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable." }, "fsGroupPolicy": { "type": "string", - "description": "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate." + "description": "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.\n\nThis field is immutable." }, "podInfoOnMount": { "type": "boolean", - "description": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" iff the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver." + "description": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable." }, "requiresRepublish": { "type": "boolean", - "description": "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.\n\nThis is an alpha feature and only available when the CSIServiceAccountToken feature is enabled." + "description": "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.\n\nThis is a beta feature and only available when the CSIServiceAccountToken feature is enabled." }, "storageCapacity": { "type": "boolean", - "description": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false." + "description": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field is immutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false." }, "tokenRequests": { "type": "array", "items": { "$ref": "#/types/kubernetes:storage.k8s.io/v1:TokenRequest" }, - "description": "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\u003caudience\u003e\": {\n \"token\": \u003ctoken\u003e,\n \"expirationTimestamp\": \u003cexpiration timestamp in RFC3339\u003e,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.\n\nThis is an alpha feature and only available when the CSIServiceAccountToken feature is enabled." + "description": "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\u003caudience\u003e\": {\n \"token\": \u003ctoken\u003e,\n \"expirationTimestamp\": \u003cexpiration timestamp in RFC3339\u003e,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.\n\nThis is a beta feature and only available when the CSIServiceAccountToken feature is enabled." }, "volumeLifecycleModes": { "type": "array", "items": { "type": "string" }, - "description": "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta." + "description": "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.\n\nThis field is immutable." } }, "type": "object", @@ -27551,7 +28397,7 @@ "properties": { "inlineVolumeSpec": { "$ref": "#/types/kubernetes:core/v1:PersistentVolumeSpec", - "description": "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature." + "description": "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature." }, "persistentVolumeName": { "type": "string", @@ -27677,6 +28523,98 @@ } } }, + "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity": { + "description": "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1alpha1" + }, + "capacity": { + "type": "string", + "description": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSIStorageCapacity" + }, + "maximumVolumeSize": { + "type": "string", + "description": "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim." + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-\u003cuuid\u003e, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "nodeTopology": { + "$ref": "#/types/kubernetes:meta/v1:LabelSelector", + "description": "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable." + }, + "storageClassName": { + "type": "string", + "description": "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable." + } + }, + "type": "object", + "required": [ + "storageClassName" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "apiVersion", + "capacity", + "kind", + "maximumVolumeSize", + "metadata", + "nodeTopology", + "storageClassName" + ] + } + } + }, + "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList": { + "description": "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1alpha1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity" + }, + "description": "Items is the list of CSIStorageCapacity objects." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSIStorageCapacityList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "type": "object", + "required": [ + "items" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "apiVersion", + "items", + "kind", + "metadata" + ] + } + } + }, "kubernetes:storage.k8s.io/v1alpha1:VolumeAttachment": { "description": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", "properties": { @@ -27950,137 +28888,252 @@ } } }, - "kubernetes:storage.k8s.io/v1beta1:CSIDriverSpec": { - "description": "CSIDriverSpec is the specification of a CSIDriver.", + "kubernetes:storage.k8s.io/v1beta1:CSIDriverSpec": { + "description": "CSIDriverSpec is the specification of a CSIDriver.", + "properties": { + "attachRequired": { + "type": "boolean", + "description": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable." + }, + "fsGroupPolicy": { + "type": "string", + "description": "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.\n\nThis field is immutable." + }, + "podInfoOnMount": { + "type": "boolean", + "description": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable." + }, + "requiresRepublish": { + "type": "boolean", + "description": "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.\n\nThis is a beta feature and only available when the CSIServiceAccountToken feature is enabled." + }, + "storageCapacity": { + "type": "boolean", + "description": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field is immutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false." + }, + "tokenRequests": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:TokenRequest" + }, + "description": "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\u003caudience\u003e\": {\n \"token\": \u003ctoken\u003e,\n \"expirationTimestamp\": \u003cexpiration timestamp in RFC3339\u003e,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.\n\nThis is a beta feature and only available when the CSIServiceAccountToken feature is enabled." + }, + "volumeLifecycleModes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.\n\nThis field is immutable." + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "attachRequired", + "fsGroupPolicy", + "podInfoOnMount", + "requiresRepublish", + "storageCapacity", + "tokenRequests", + "volumeLifecycleModes" + ] + } + } + }, + "kubernetes:storage.k8s.io/v1beta1:CSINode": { + "description": "CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1beta1" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSINode" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "metadata.name must be the Kubernetes node name." + }, + "spec": { + "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:CSINodeSpec", + "description": "spec is the specification of CSINode" + } + }, + "type": "object", + "required": [ + "spec" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + } + } + }, + "kubernetes:storage.k8s.io/v1beta1:CSINodeDriver": { + "description": "CSINodeDriver holds information about the specification of one CSI driver installed on a node", + "properties": { + "allocatable": { + "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:VolumeNodeResources", + "description": "allocatable represents the volume resources of a node that are available for scheduling." + }, + "name": { + "type": "string", + "description": "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver." + }, + "nodeID": { + "type": "string", + "description": "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required." + }, + "topologyKeys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology." + } + }, + "type": "object", + "required": [ + "name", + "nodeID" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "allocatable", + "name", + "nodeID", + "topologyKeys" + ] + } + } + }, + "kubernetes:storage.k8s.io/v1beta1:CSINodeList": { + "description": "CSINodeList is a collection of CSINode objects.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1beta1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:CSINode" + }, + "description": "items is the list of CSINode" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSINodeList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "type": "object", + "required": [ + "items" + ], + "language": { + "nodejs": { + "requiredOutputs": [ + "apiVersion", + "items", + "kind", + "metadata" + ] + } + } + }, + "kubernetes:storage.k8s.io/v1beta1:CSINodeSpec": { + "description": "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", "properties": { - "attachRequired": { - "type": "boolean", - "description": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called." - }, - "fsGroupPolicy": { - "type": "string", - "description": "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate." - }, - "podInfoOnMount": { - "type": "boolean", - "description": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" iff the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver." - }, - "requiresRepublish": { - "type": "boolean", - "description": "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.\n\nThis is an alpha feature and only available when the CSIServiceAccountToken feature is enabled." - }, - "storageCapacity": { - "type": "boolean", - "description": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false." - }, - "tokenRequests": { - "type": "array", - "items": { - "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:TokenRequest" - }, - "description": "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\u003caudience\u003e\": {\n \"token\": \u003ctoken\u003e,\n \"expirationTimestamp\": \u003cexpiration timestamp in RFC3339\u003e,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.\n\nThis is an alpha feature and only available when the CSIServiceAccountToken feature is enabled." - }, - "volumeLifecycleModes": { + "drivers": { "type": "array", "items": { - "type": "string" + "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:CSINodeDriver" }, - "description": "VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future." + "description": "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty." } }, "type": "object", + "required": [ + "drivers" + ], "language": { "nodejs": { "requiredOutputs": [ - "attachRequired", - "fsGroupPolicy", - "podInfoOnMount", - "requiresRepublish", - "storageCapacity", - "tokenRequests", - "volumeLifecycleModes" + "drivers" ] } } }, - "kubernetes:storage.k8s.io/v1beta1:CSINode": { - "description": "CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", + "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity": { + "description": "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", "properties": { "apiVersion": { "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "const": "storage.k8s.io/v1beta1" }, + "capacity": { + "type": "string", + "description": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity." + }, "kind": { "type": "string", "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "const": "CSINode" + "const": "CSIStorageCapacity" + }, + "maximumVolumeSize": { + "type": "string", + "description": "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim." }, "metadata": { "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", - "description": "metadata.name must be the Kubernetes node name." + "description": "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-\u003cuuid\u003e, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, - "spec": { - "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:CSINodeSpec", - "description": "spec is the specification of CSINode" + "nodeTopology": { + "$ref": "#/types/kubernetes:meta/v1:LabelSelector", + "description": "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable." + }, + "storageClassName": { + "type": "string", + "description": "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable." } }, "type": "object", "required": [ - "spec" + "storageClassName" ], "language": { "nodejs": { "requiredOutputs": [ "apiVersion", + "capacity", "kind", + "maximumVolumeSize", "metadata", - "spec" - ] - } - } - }, - "kubernetes:storage.k8s.io/v1beta1:CSINodeDriver": { - "description": "CSINodeDriver holds information about the specification of one CSI driver installed on a node", - "properties": { - "allocatable": { - "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:VolumeNodeResources", - "description": "allocatable represents the volume resources of a node that are available for scheduling." - }, - "name": { - "type": "string", - "description": "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver." - }, - "nodeID": { - "type": "string", - "description": "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required." - }, - "topologyKeys": { - "type": "array", - "items": { - "type": "string" - }, - "description": "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology." - } - }, - "type": "object", - "required": [ - "name", - "nodeID" - ], - "language": { - "nodejs": { - "requiredOutputs": [ - "allocatable", - "name", - "nodeID", - "topologyKeys" + "nodeTopology", + "storageClassName" ] } } }, - "kubernetes:storage.k8s.io/v1beta1:CSINodeList": { - "description": "CSINodeList is a collection of CSINode objects.", + "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList": { + "description": "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", "properties": { "apiVersion": { "type": "string", @@ -28090,14 +29143,14 @@ "items": { "type": "array", "items": { - "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:CSINode" + "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity" }, - "description": "items is the list of CSINode" + "description": "Items is the list of CSIStorageCapacity objects." }, "kind": { "type": "string", "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "const": "CSINodeList" + "const": "CSIStorageCapacityList" }, "metadata": { "$ref": "#/types/kubernetes:meta/v1:ListMeta", @@ -28119,29 +29172,6 @@ } } }, - "kubernetes:storage.k8s.io/v1beta1:CSINodeSpec": { - "description": "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", - "properties": { - "drivers": { - "type": "array", - "items": { - "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:CSINodeDriver" - }, - "description": "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty." - } - }, - "type": "object", - "required": [ - "drivers" - ], - "language": { - "nodejs": { - "requiredOutputs": [ - "drivers" - ] - } - } - }, "kubernetes:storage.k8s.io/v1beta1:StorageClass": { "description": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", "properties": { @@ -28370,7 +29400,7 @@ "properties": { "inlineVolumeSpec": { "$ref": "#/types/kubernetes:core/v1:PersistentVolumeSpec", - "description": "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature." + "description": "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature." }, "persistentVolumeName": { "type": "string", @@ -31988,6 +33018,118 @@ "items" ] }, + "kubernetes:batch/v1:CronJob": { + "description": "CronJob represents the configuration of a single cron job.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "batch/v1" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CronJob" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "spec": { + "$ref": "#/types/kubernetes:batch/v1:CronJobSpec", + "description": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + }, + "status": { + "$ref": "#/types/kubernetes:batch/v1:CronJobStatus", + "description": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + } + }, + "type": "object", + "inputProperties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "batch/v1" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CronJob" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "spec": { + "$ref": "#/types/kubernetes:batch/v1:CronJobSpec", + "description": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + } + }, + "aliases": [ + { + "type": "kubernetes:batch/v1beta1:CronJob" + }, + { + "type": "kubernetes:batch/v2alpha1:CronJob" + } + ] + }, + "kubernetes:batch/v1:CronJobList": { + "description": "CronJobList is a collection of cron jobs.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "batch/v1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:batch/v1:CronJob" + }, + "description": "items is the list of CronJobs." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CronJobList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "type": "object", + "required": [ + "items" + ], + "inputProperties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "batch/v1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:batch/v1:CronJob" + }, + "description": "items is the list of CronJobs." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CronJobList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "requiredInputs": [ + "items" + ] + }, "kubernetes:batch/v1:Job": { "description": "Job represents the configuration of a single job.\n\nThis resource waits until its status is ready before registering success\nfor create/update, and populating output properties from the current state of the resource.\nThe following conditions are used to determine whether the resource creation has\nsucceeded or failed:\n\n1. The Job's '.status.startTime' is set, which indicates that the Job has started running.\n2. The Job's '.status.conditions' has a status of type 'Complete', and a 'status' set\n to 'True'.\n3. The Job's '.status.conditions' do not have a status of type 'Failed', with a\n\t'status' set to 'True'. If this condition is set, we should fail the Job immediately.\n\nIf the Job has not reached a Ready state after 10 minutes, it will\ntime out and mark the resource update as Failed. You can override the default timeout value\nby setting the 'customTimeouts' option on the resource.", "properties": { @@ -32140,6 +33282,9 @@ } }, "aliases": [ + { + "type": "kubernetes:batch/v1:CronJob" + }, { "type": "kubernetes:batch/v2alpha1:CronJob" } @@ -32249,6 +33394,9 @@ } }, "aliases": [ + { + "type": "kubernetes:batch/v1:CronJob" + }, { "type": "kubernetes:batch/v1beta1:CronJob" } @@ -32807,7 +33955,7 @@ }, "immutable": { "type": "boolean", - "description": "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate." + "description": "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil." }, "kind": { "type": "string", @@ -32842,7 +33990,7 @@ }, "immutable": { "type": "boolean", - "description": "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate." + "description": "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil." }, "kind": { "type": "string", @@ -33017,6 +34165,70 @@ "items" ] }, + "kubernetes:core/v1:EphemeralContainers": { + "description": "A list of ephemeral containers used with the Pod ephemeralcontainers subresource.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "v1" + }, + "ephemeralContainers": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:core/v1:EphemeralContainer" + }, + "description": "A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified.", + "language": { + "csharp": { + "name": "EphemeralContainersValue" + } + } + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "EphemeralContainers" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta" + } + }, + "type": "object", + "required": [ + "ephemeralContainers" + ], + "inputProperties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "v1" + }, + "ephemeralContainers": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:core/v1:EphemeralContainer" + }, + "description": "A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified.", + "language": { + "csharp": { + "name": "EphemeralContainersValue" + } + } + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "EphemeralContainers" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta" + } + }, + "requiredInputs": [ + "ephemeralContainers" + ] + }, "kubernetes:core/v1:Event": { "description": "Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", "properties": { @@ -33294,7 +34506,7 @@ "items": { "$ref": "#/types/kubernetes:core/v1:LimitRange" }, - "description": "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/" + "description": "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" }, "kind": { "type": "string", @@ -33321,7 +34533,7 @@ "items": { "$ref": "#/types/kubernetes:core/v1:LimitRange" }, - "description": "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/" + "description": "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" }, "kind": { "type": "string", @@ -34183,7 +35395,7 @@ }, "immutable": { "type": "boolean", - "description": "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate." + "description": "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil." }, "kind": { "type": "string", @@ -34199,7 +35411,7 @@ "additionalProperties": { "type": "string" }, - "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", + "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.", "secret": true }, "type": { @@ -34224,7 +35436,7 @@ }, "immutable": { "type": "boolean", - "description": "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate." + "description": "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil." }, "kind": { "type": "string", @@ -34240,7 +35452,7 @@ "additionalProperties": { "type": "string" }, - "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", + "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.", "secret": true }, "type": { @@ -34537,6 +35749,147 @@ "items" ] }, + "kubernetes:discovery.k8s.io/v1:EndpointSlice": { + "description": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.", + "properties": { + "addressType": { + "type": "string", + "description": "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name." + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "discovery.k8s.io/v1" + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:Endpoint" + }, + "description": "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "EndpointSlice" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata." + }, + "ports": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:EndpointPort" + }, + "description": "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports." + } + }, + "type": "object", + "required": [ + "addressType", + "endpoints" + ], + "inputProperties": { + "addressType": { + "type": "string", + "description": "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name." + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "discovery.k8s.io/v1" + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:Endpoint" + }, + "description": "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "EndpointSlice" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata." + }, + "ports": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:EndpointPort" + }, + "description": "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports." + } + }, + "requiredInputs": [ + "addressType", + "endpoints" + ], + "aliases": [ + { + "type": "kubernetes:discovery.k8s.io/v1beta1:EndpointSlice" + } + ] + }, + "kubernetes:discovery.k8s.io/v1:EndpointSliceList": { + "description": "EndpointSliceList represents a list of endpoint slices", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "discovery.k8s.io/v1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:EndpointSlice" + }, + "description": "List of endpoint slices" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "EndpointSliceList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata." + } + }, + "type": "object", + "required": [ + "items" + ], + "inputProperties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "discovery.k8s.io/v1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:discovery.k8s.io/v1:EndpointSlice" + }, + "description": "List of endpoint slices" + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "EndpointSliceList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata." + } + }, + "requiredInputs": [ + "items" + ] + }, "kubernetes:discovery.k8s.io/v1beta1:EndpointSlice": { "description": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.", "properties": { @@ -34615,6 +35968,11 @@ "requiredInputs": [ "addressType", "endpoints" + ], + "aliases": [ + { + "type": "kubernetes:discovery.k8s.io/v1:EndpointSlice" + } ] }, "kubernetes:discovery.k8s.io/v1beta1:EndpointSliceList": { @@ -34711,7 +36069,8 @@ "const": "Event" }, "metadata": { - "$ref": "#/types/kubernetes:meta/v1:ObjectMeta" + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "note": { "type": "string", @@ -34748,8 +36107,7 @@ }, "type": "object", "required": [ - "eventTime", - "metadata" + "eventTime" ], "inputProperties": { "action": { @@ -34787,7 +36145,8 @@ "const": "Event" }, "metadata": { - "$ref": "#/types/kubernetes:meta/v1:ObjectMeta" + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "note": { "type": "string", @@ -34823,8 +36182,7 @@ } }, "requiredInputs": [ - "eventTime", - "metadata" + "eventTime" ], "aliases": [ { @@ -34929,7 +36287,8 @@ "const": "Event" }, "metadata": { - "$ref": "#/types/kubernetes:meta/v1:ObjectMeta" + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "note": { "type": "string", @@ -34966,8 +36325,7 @@ }, "type": "object", "required": [ - "eventTime", - "metadata" + "eventTime" ], "inputProperties": { "action": { @@ -35005,7 +36363,8 @@ "const": "Event" }, "metadata": { - "$ref": "#/types/kubernetes:meta/v1:ObjectMeta" + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "note": { "type": "string", @@ -35041,8 +36400,7 @@ } }, "requiredInputs": [ - "eventTime", - "metadata" + "eventTime" ], "aliases": [ { @@ -37047,12 +38405,142 @@ "apiVersion": { "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "const": "node.k8s.io/v1alpha1" + "const": "node.k8s.io/v1alpha1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:node.k8s.io/v1alpha1:RuntimeClass" + }, + "description": "Items is a list of schema objects." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "RuntimeClassList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "requiredInputs": [ + "items" + ] + }, + "kubernetes:node.k8s.io/v1beta1:RuntimeClass": { + "description": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "node.k8s.io/v1beta1" + }, + "handler": { + "type": "string", + "description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "RuntimeClass" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "overhead": { + "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:Overhead", + "description": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature." + }, + "scheduling": { + "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:Scheduling", + "description": "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes." + } + }, + "type": "object", + "required": [ + "handler" + ], + "inputProperties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "node.k8s.io/v1beta1" + }, + "handler": { + "type": "string", + "description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "RuntimeClass" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "overhead": { + "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:Overhead", + "description": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature." + }, + "scheduling": { + "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:Scheduling", + "description": "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes." + } + }, + "requiredInputs": [ + "handler" + ], + "aliases": [ + { + "type": "kubernetes:node.k8s.io/v1:RuntimeClass" + }, + { + "type": "kubernetes:node.k8s.io/v1alpha1:RuntimeClass" + } + ] + }, + "kubernetes:node.k8s.io/v1beta1:RuntimeClassList": { + "description": "RuntimeClassList is a list of RuntimeClass objects.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "node.k8s.io/v1beta1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:RuntimeClass" + }, + "description": "Items is a list of schema objects." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "RuntimeClassList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "type": "object", + "required": [ + "items" + ], + "inputProperties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "node.k8s.io/v1beta1" }, "items": { "type": "array", "items": { - "$ref": "#/types/kubernetes:node.k8s.io/v1alpha1:RuntimeClass" + "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:RuntimeClass" }, "description": "Items is a list of schema objects." }, @@ -37070,103 +38558,82 @@ "items" ] }, - "kubernetes:node.k8s.io/v1beta1:RuntimeClass": { - "description": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md", + "kubernetes:policy/v1:PodDisruptionBudget": { + "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", "properties": { "apiVersion": { "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "const": "node.k8s.io/v1beta1" - }, - "handler": { - "type": "string", - "description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable." + "const": "policy/v1" }, "kind": { "type": "string", "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "const": "RuntimeClass" + "const": "PodDisruptionBudget" }, "metadata": { "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", - "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, - "overhead": { - "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:Overhead", - "description": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature." + "spec": { + "$ref": "#/types/kubernetes:policy/v1:PodDisruptionBudgetSpec", + "description": "Specification of the desired behavior of the PodDisruptionBudget." }, - "scheduling": { - "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:Scheduling", - "description": "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes." + "status": { + "$ref": "#/types/kubernetes:policy/v1:PodDisruptionBudgetStatus", + "description": "Most recently observed status of the PodDisruptionBudget." } }, "type": "object", - "required": [ - "handler" - ], "inputProperties": { "apiVersion": { "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "const": "node.k8s.io/v1beta1" - }, - "handler": { - "type": "string", - "description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable." + "const": "policy/v1" }, "kind": { "type": "string", "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "const": "RuntimeClass" + "const": "PodDisruptionBudget" }, "metadata": { "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", - "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "overhead": { - "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:Overhead", - "description": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature." + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, - "scheduling": { - "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:Scheduling", - "description": "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes." + "spec": { + "$ref": "#/types/kubernetes:policy/v1:PodDisruptionBudgetSpec", + "description": "Specification of the desired behavior of the PodDisruptionBudget." } }, - "requiredInputs": [ - "handler" - ], "aliases": [ { - "type": "kubernetes:node.k8s.io/v1:RuntimeClass" - }, - { - "type": "kubernetes:node.k8s.io/v1alpha1:RuntimeClass" + "type": "kubernetes:policy/v1beta1:PodDisruptionBudget" } ] }, - "kubernetes:node.k8s.io/v1beta1:RuntimeClassList": { - "description": "RuntimeClassList is a list of RuntimeClass objects.", + "kubernetes:policy/v1:PodDisruptionBudgetList": { + "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", "properties": { "apiVersion": { "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "const": "node.k8s.io/v1beta1" + "const": "policy/v1" }, "items": { "type": "array", "items": { - "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:RuntimeClass" + "$ref": "#/types/kubernetes:policy/v1:PodDisruptionBudget" }, - "description": "Items is a list of schema objects." + "description": "Items is a list of PodDisruptionBudgets" }, "kind": { "type": "string", "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "const": "RuntimeClassList" + "const": "PodDisruptionBudgetList" }, "metadata": { "$ref": "#/types/kubernetes:meta/v1:ListMeta", - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "type": "object", @@ -37177,23 +38644,23 @@ "apiVersion": { "type": "string", "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "const": "node.k8s.io/v1beta1" + "const": "policy/v1" }, "items": { "type": "array", "items": { - "$ref": "#/types/kubernetes:node.k8s.io/v1beta1:RuntimeClass" + "$ref": "#/types/kubernetes:policy/v1:PodDisruptionBudget" }, - "description": "Items is a list of schema objects." + "description": "Items is a list of PodDisruptionBudgets" }, "kind": { "type": "string", "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "const": "RuntimeClassList" + "const": "PodDisruptionBudgetList" }, "metadata": { "$ref": "#/types/kubernetes:meta/v1:ListMeta", - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "requiredInputs": [ @@ -37244,7 +38711,12 @@ "$ref": "#/types/kubernetes:policy/v1beta1:PodDisruptionBudgetSpec", "description": "Specification of the desired behavior of the PodDisruptionBudget." } - } + }, + "aliases": [ + { + "type": "kubernetes:policy/v1:PodDisruptionBudget" + } + ] }, "kubernetes:policy/v1beta1:PodDisruptionBudgetList": { "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", @@ -37299,7 +38771,7 @@ ] }, "kubernetes:policy/v1beta1:PodSecurityPolicy": { - "description": "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", + "description": "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21.", "properties": { "apiVersion": { "type": "string", @@ -39906,6 +41378,141 @@ "items" ] }, + "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity": { + "description": "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1alpha1" + }, + "capacity": { + "type": "string", + "description": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSIStorageCapacity" + }, + "maximumVolumeSize": { + "type": "string", + "description": "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim." + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-\u003cuuid\u003e, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "nodeTopology": { + "$ref": "#/types/kubernetes:meta/v1:LabelSelector", + "description": "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable." + }, + "storageClassName": { + "type": "string", + "description": "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable." + } + }, + "type": "object", + "required": [ + "storageClassName" + ], + "inputProperties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1alpha1" + }, + "capacity": { + "type": "string", + "description": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSIStorageCapacity" + }, + "maximumVolumeSize": { + "type": "string", + "description": "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim." + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-\u003cuuid\u003e, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "nodeTopology": { + "$ref": "#/types/kubernetes:meta/v1:LabelSelector", + "description": "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable." + }, + "storageClassName": { + "type": "string", + "description": "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable." + } + }, + "requiredInputs": [ + "storageClassName" + ], + "aliases": [ + { + "type": "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity" + } + ] + }, + "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList": { + "description": "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1alpha1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity" + }, + "description": "Items is the list of CSIStorageCapacity objects." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSIStorageCapacityList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "type": "object", + "required": [ + "items" + ], + "inputProperties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1alpha1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity" + }, + "description": "Items is the list of CSIStorageCapacity objects." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSIStorageCapacityList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "requiredInputs": [ + "items" + ] + }, "kubernetes:storage.k8s.io/v1alpha1:VolumeAttachment": { "description": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", "properties": { @@ -40247,6 +41854,141 @@ "items" ] }, + "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity": { + "description": "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1beta1" + }, + "capacity": { + "type": "string", + "description": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSIStorageCapacity" + }, + "maximumVolumeSize": { + "type": "string", + "description": "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim." + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-\u003cuuid\u003e, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "nodeTopology": { + "$ref": "#/types/kubernetes:meta/v1:LabelSelector", + "description": "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable." + }, + "storageClassName": { + "type": "string", + "description": "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable." + } + }, + "type": "object", + "required": [ + "storageClassName" + ], + "inputProperties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1beta1" + }, + "capacity": { + "type": "string", + "description": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSIStorageCapacity" + }, + "maximumVolumeSize": { + "type": "string", + "description": "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim." + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ObjectMeta", + "description": "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-\u003cuuid\u003e, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "nodeTopology": { + "$ref": "#/types/kubernetes:meta/v1:LabelSelector", + "description": "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable." + }, + "storageClassName": { + "type": "string", + "description": "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable." + } + }, + "requiredInputs": [ + "storageClassName" + ], + "aliases": [ + { + "type": "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity" + } + ] + }, + "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList": { + "description": "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", + "properties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1beta1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity" + }, + "description": "Items is the list of CSIStorageCapacity objects." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSIStorageCapacityList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "type": "object", + "required": [ + "items" + ], + "inputProperties": { + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "const": "storage.k8s.io/v1beta1" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/types/kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity" + }, + "description": "Items is the list of CSIStorageCapacity objects." + }, + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "const": "CSIStorageCapacityList" + }, + "metadata": { + "$ref": "#/types/kubernetes:meta/v1:ListMeta", + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "requiredInputs": [ + "items" + ] + }, "kubernetes:storage.k8s.io/v1beta1:StorageClass": { "description": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", "properties": { @@ -40573,6 +42315,7 @@ "coordination.k8s.io/v1": "Coordination.V1", "coordination.k8s.io/v1beta1": "Coordination.V1Beta1", "core/v1": "Core.V1", + "discovery.k8s.io/v1": "Discovery.V1", "discovery.k8s.io/v1beta1": "Discovery.V1Beta1", "events.k8s.io/v1": "Events.V1", "events.k8s.io/v1beta1": "Events.V1Beta1", @@ -40586,6 +42329,7 @@ "node.k8s.io/v1alpha1": "Node.V1Alpha1", "node.k8s.io/v1beta1": "Node.V1Beta1", "pkg/version": "Pkg.Version", + "policy/v1": "Policy.V1", "policy/v1beta1": "Policy.V1Beta1", "rbac.authorization.k8s.io/v1": "Rbac.V1", "rbac.authorization.k8s.io/v1alpha1": "Rbac.V1Alpha1", @@ -40633,6 +42377,7 @@ "coordination.k8s.io/v1": "coordination/v1", "coordination.k8s.io/v1beta1": "coordination/v1beta1", "core/v1": "core/v1", + "discovery.k8s.io/v1": "discovery/v1", "discovery.k8s.io/v1beta1": "discovery/v1beta1", "events.k8s.io/v1": "events/v1", "events.k8s.io/v1beta1": "events/v1beta1", @@ -40646,6 +42391,7 @@ "node.k8s.io/v1alpha1": "node/v1alpha1", "node.k8s.io/v1beta1": "node/v1beta1", "pkg/version": "pkg/version", + "policy/v1": "policy/v1", "policy/v1beta1": "policy/v1beta1", "rbac.authorization.k8s.io/v1": "rbac/v1", "rbac.authorization.k8s.io/v1alpha1": "rbac/v1alpha1", @@ -40684,6 +42430,7 @@ "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/coordination/v1": "coordinationv1", "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/coordination/v1beta1": "coordinationv1beta1", "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/core/v1": "corev1", + "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/discovery/v1": "discoveryv1", "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/discovery/v1beta1": "discoveryv1beta1", "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/events/v1": "eventsv1", "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/events/v1beta1": "eventsv1beta1", @@ -40697,6 +42444,7 @@ "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/node/v1alpha1": "nodev1alpha1", "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/node/v1beta1": "nodev1beta1", "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/pkg/version": "pkgversion", + "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/policy/v1": "policyv1", "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/policy/v1beta1": "policyv1beta1", "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/rbac/v1": "rbacv1", "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/rbac/v1alpha1": "rbacv1alpha1", @@ -40753,6 +42501,7 @@ "coordination.k8s.io/v1": "coordination/v1", "coordination.k8s.io/v1beta1": "coordination/v1beta1", "core/v1": "core/v1", + "discovery.k8s.io/v1": "discovery/v1", "discovery.k8s.io/v1beta1": "discovery/v1beta1", "events.k8s.io/v1": "events/v1", "events.k8s.io/v1beta1": "events/v1beta1", @@ -40766,6 +42515,7 @@ "node.k8s.io/v1alpha1": "node/v1alpha1", "node.k8s.io/v1beta1": "node/v1beta1", "pkg/version": "pkg/version", + "policy/v1": "policy/v1", "policy/v1beta1": "policy/v1beta1", "rbac.authorization.k8s.io/v1": "rbac/v1", "rbac.authorization.k8s.io/v1alpha1": "rbac/v1alpha1", @@ -40808,6 +42558,7 @@ "coordination.k8s.io/v1": "coordination/v1", "coordination.k8s.io/v1beta1": "coordination/v1beta1", "core/v1": "core/v1", + "discovery.k8s.io/v1": "discovery/v1", "discovery.k8s.io/v1beta1": "discovery/v1beta1", "events.k8s.io/v1": "events/v1", "events.k8s.io/v1beta1": "events/v1beta1", @@ -40821,6 +42572,7 @@ "node.k8s.io/v1alpha1": "node/v1alpha1", "node.k8s.io/v1beta1": "node/v1beta1", "pkg/version": "pkg/version", + "policy/v1": "policy/v1", "policy/v1beta1": "policy/v1beta1", "rbac.authorization.k8s.io/v1": "rbac/v1", "rbac.authorization.k8s.io/v1alpha1": "rbac/v1alpha1", diff --git a/provider/pkg/kinds/deprecated.go b/provider/pkg/kinds/deprecated.go index 35b40cbb12..1c53005e49 100644 --- a/provider/pkg/kinds/deprecated.go +++ b/provider/pkg/kinds/deprecated.go @@ -65,6 +65,10 @@ import ( // storage/v1beta1/* / 1.19 / _ // https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.19.md#deprecation-1 // +// batch/v2alpha1/CronJob / 1.21 / 1.21 +// discovery/v1beta1/EndpointSlice / 1.21 / 1.25 +// */PodSecurityPolicy / 1.21 / 1.25 +// https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.21.md#deprecation-1 // TODO: Keep updating this list on every release. var v18 = cluster.ServerVersion{Major: 1, Minor: 8} @@ -79,7 +83,9 @@ var v117 = cluster.ServerVersion{Major: 1, Minor: 17} var v118 = cluster.ServerVersion{Major: 1, Minor: 18} var v119 = cluster.ServerVersion{Major: 1, Minor: 19} var v120 = cluster.ServerVersion{Major: 1, Minor: 20} +var v121 = cluster.ServerVersion{Major: 1, Minor: 21} var v122 = cluster.ServerVersion{Major: 1, Minor: 22} +var v125 = cluster.ServerVersion{Major: 1, Minor: 25} func gvkStr(gvk schema.GroupVersionKind) string { return gvk.GroupVersion().String() + "/" + gvk.Kind @@ -147,6 +153,11 @@ func AddedInVersion(gvk *schema.GroupVersionKind) *cluster.ServerVersion { case HorizontalPodAutoscaler, HorizontalPodAutoscalerList: return &v112 } + case BatchV1: + switch k { + case CronJob, CronJobList: + return &v121 + } case CoordinationV1B1: switch k { case Lease, LeaseList: @@ -157,11 +168,21 @@ func AddedInVersion(gvk *schema.GroupVersionKind) *cluster.ServerVersion { case Lease, LeaseList: return &v114 } + case CoreV1: + switch k { + case EphemeralContainers: + return &v121 + } case DiscoveryV1B1: switch k { case EndpointSlice, EndpointSliceList: return &v117 } + case DiscoveryV1: + switch k { + case EndpointSlice, EndpointSliceList: + return &v121 + } case FlowcontrolV1A1: switch k { case FlowSchema, FlowSchemaList, PriorityLevelConfiguration, PriorityLevelConfigurationList: @@ -184,6 +205,11 @@ func AddedInVersion(gvk *schema.GroupVersionKind) *cluster.ServerVersion { case PodSecurityPolicy, PodSecurityPolicyList: return &v110 } + case PolicyV1: + switch k { + case PodDisruptionBudget, PodDisruptionBudgetList: + return &v121 + } case SchedulingV1B1: switch k { case PriorityClass, PriorityClassList: @@ -194,12 +220,19 @@ func AddedInVersion(gvk *schema.GroupVersionKind) *cluster.ServerVersion { case PriorityClass, PriorityClassList: return &v114 } + case StorageV1A1: + switch k { + case CSIStorageCapacity, CSIStorageCapacityList: + return &v121 + } case StorageV1B1: switch k { case VolumeAttachment, VolumeAttachmentList: return &v110 case CSIDriver, CSIDriverList, CSINode, CSINodeList: return &v114 + case CSIStorageCapacity, CSIStorageCapacityList: + return &v121 } case StorageV1: switch k { @@ -232,6 +265,11 @@ func ExistsInVersion(gvk *schema.GroupVersionKind, version *cluster.ServerVersio func RemovedInVersion(gvk schema.GroupVersionKind) *cluster.ServerVersion { gv, k := groupVersion(gvk.GroupVersion().String()), Kind(gvk.Kind) + switch k { + case PodSecurityPolicy, PodSecurityPolicyList: + return &v125 + } + switch gv { case AdmissionregistrationV1B1: return &v122 @@ -241,8 +279,12 @@ func RemovedInVersion(gvk schema.GroupVersionKind) *cluster.ServerVersion { return &v122 case AuthorizationV1B1: return &v122 + case BatchV2A1: + return &v121 case CoordinationV1B1: return &v122 + case DiscoveryV1B1: + return &v125 case ExtensionsV1B1, AppsV1B1, AppsV1B2: if k == Ingress || k == IngressList { return &v120 @@ -290,8 +332,12 @@ func SuggestedAPIVersion(gvk schema.GroupVersionKind) string { return fmt.Sprintf(gvkFmt, AuthorizationV1, k) case AutoscalingV2B1: return fmt.Sprintf(gvkFmt, AutoscalingV1, k) + case BatchV2A1: + return fmt.Sprintf(gvkFmt, BatchV1B1, k) // TODO: update this to batch/v1 at v1.25 case CoordinationV1B1: return fmt.Sprintf(gvkFmt, CoordinationV1, k) + case DiscoveryV1B1: + return fmt.Sprintf(gvkFmt, DiscoveryV1, k) case ExtensionsV1B1: switch k { case DaemonSet, DaemonSetList, Deployment, DeploymentList, ReplicaSet, ReplicaSetList: @@ -325,7 +371,11 @@ func upstreamDocsLink(version cluster.ServerVersion) string { return "https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.17.md#deprecations-and-removals" case v119: return "https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.19.md#deprecation-1" - // TODO: 1.20 + case v120: + return "https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.20.md#deprecation" + case v121: + return "https://git.k8s.io/kubernetes/CHANGELOG/CHANGELOG-1.21.md#deprecation" + // TODO: 1.22 default: return "" } diff --git a/provider/pkg/kinds/deprecated_test.go b/provider/pkg/kinds/deprecated_test.go index d8fd4c7a12..1de26962cf 100644 --- a/provider/pkg/kinds/deprecated_test.go +++ b/provider/pkg/kinds/deprecated_test.go @@ -43,7 +43,9 @@ func TestDeprecatedApiVersion(t *testing.T) { {toGVK(AuthorizationV1B1, SelfSubjectRulesReview), nil, true}, {toGVK(AuthorizationV1B1, SubjectAccessReview), nil, true}, {toGVK(AutoscalingV2B1, HorizontalPodAutoscaler), nil, true}, + {toGVK(BatchV2A1, CronJob), &v121, true}, {toGVK(CoordinationV1B1, Lease), nil, true}, + {toGVK(DiscoveryV1B1, EndpointSlice), &v121, true}, {toGVK(ExtensionsV1B1, DaemonSet), nil, true}, {toGVK(ExtensionsV1B1, Deployment), nil, true}, {toGVK(ExtensionsV1B1, Ingress), nil, true}, @@ -155,7 +157,9 @@ func TestSuggestedApiVersion(t *testing.T) { {toGVK(AuthenticationV1B1, TokenReview), wantStr(AuthenticationV1, TokenReview)}, {toGVK(AuthorizationV1B1, LocalSubjectAccessReview), wantStr(AuthorizationV1, LocalSubjectAccessReview)}, {toGVK(AutoscalingV2B1, HorizontalPodAutoscaler), wantStr(AutoscalingV1, HorizontalPodAutoscaler)}, + {toGVK(BatchV2A1, CronJob), wantStr(BatchV1B1, CronJob)}, {toGVK(CoordinationV1B1, Lease), wantStr(CoordinationV1, Lease)}, + {toGVK(DiscoveryV1B1, EndpointSlice), wantStr(DiscoveryV1, EndpointSlice)}, {toGVK(ExtensionsV1B1, DaemonSet), wantStr(AppsV1, DaemonSet)}, {toGVK(ExtensionsV1B1, Deployment), wantStr(AppsV1, Deployment)}, {toGVK(ExtensionsV1B1, DeploymentList), wantStr(AppsV1, DeploymentList)}, @@ -198,11 +202,15 @@ func TestRemovedInVersion(t *testing.T) { {toGVK(AppsV1B2, Deployment), &v116}, {toGVK(AuthenticationV1B1, TokenReview), &v122}, {toGVK(AuthorizationV1B1, LocalSubjectAccessReview), &v122}, + {toGVK(BatchV2A1, CronJob), &v121}, {toGVK(CoordinationV1B1, Lease), &v122}, + {toGVK(DiscoveryV1B1, EndpointSlice), &v125}, {toGVK(ExtensionsV1B1, Deployment), &v116}, {toGVK(ExtensionsV1B1, DeploymentList), &v116}, {toGVK(ExtensionsV1B1, Ingress), &v120}, {toGVK(ExtensionsV1B1, IngressList), &v120}, + {toGVK(ExtensionsV1B1, PodSecurityPolicy), &v125}, + {toGVK(PolicyV1B1, PodSecurityPolicy), &v125}, {toGVK(RbacV1A1, ClusterRole), &v122}, {toGVK(RbacV1B1, ClusterRole), &v122}, {toGVK(SchedulingV1A1, PriorityClass), &v117}, diff --git a/provider/pkg/kinds/kinds.go b/provider/pkg/kinds/kinds.go index 3f5b3c9208..55cada9c6b 100644 --- a/provider/pkg/kinds/kinds.go +++ b/provider/pkg/kinds/kinds.go @@ -36,6 +36,8 @@ const ( CSIDriverList Kind = "CSIDriverList" CSINode Kind = "CSINode" CSINodeList Kind = "CSINodeList" + CSIStorageCapacity Kind = "CSIStorageCapacity" + CSIStorageCapacityList Kind = "CSIStorageCapacityList" CertificateSigningRequest Kind = "CertificateSigningRequest" CertificateSigningRequestList Kind = "CertificateSigningRequestList" ClusterRole Kind = "ClusterRole" @@ -58,6 +60,7 @@ const ( EndpointSliceList Kind = "EndpointSliceList" Endpoints Kind = "Endpoints" EndpointsList Kind = "EndpointsList" + EphemeralContainers Kind = "EphemeralContainers" Event Kind = "Event" EventList Kind = "EventList" FlowSchema Kind = "FlowSchema" @@ -229,6 +232,7 @@ const ( CoordinationV1 groupVersion = "coordination.k8s.io/v1" CoordinationV1B1 groupVersion = "coordination.k8s.io/v1beta1" CoreV1 groupVersion = "core/v1" + DiscoveryV1 groupVersion = "discovery.k8s.io/v1" DiscoveryV1B1 groupVersion = "discovery.k8s.io/v1beta1" EventsV1 groupVersion = "events.k8s.io/v1" EventsV1B1 groupVersion = "events.k8s.io/v1beta1" @@ -241,6 +245,7 @@ const ( NodeV1 groupVersion = "node.k8s.io/v1" NodeV1A1 groupVersion = "node.k8s.io/v1alpha1" NodeV1B1 groupVersion = "node.k8s.io/v1beta1" + PolicyV1 groupVersion = "policy/v1" PolicyV1B1 groupVersion = "policy/v1beta1" RbacV1 groupVersion = "rbac.authorization.k8s.io/v1" RbacV1A1 groupVersion = "rbac.authorization.k8s.io/v1alpha1" diff --git a/sdk/dotnet/AdmissionRegistration/V1/Inputs/MutatingWebhookArgs.cs b/sdk/dotnet/AdmissionRegistration/V1/Inputs/MutatingWebhookArgs.cs index 0f990f6ace..3773f654b4 100644 --- a/sdk/dotnet/AdmissionRegistration/V1/Inputs/MutatingWebhookArgs.cs +++ b/sdk/dotnet/AdmissionRegistration/V1/Inputs/MutatingWebhookArgs.cs @@ -124,7 +124,7 @@ public InputList - /// 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 change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + /// SideEffects 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. /// [Input("sideEffects", required: true)] public Input SideEffects { get; set; } = null!; diff --git a/sdk/dotnet/AdmissionRegistration/V1/Inputs/ValidatingWebhookArgs.cs b/sdk/dotnet/AdmissionRegistration/V1/Inputs/ValidatingWebhookArgs.cs index eadcb236fd..e6f0f81596 100644 --- a/sdk/dotnet/AdmissionRegistration/V1/Inputs/ValidatingWebhookArgs.cs +++ b/sdk/dotnet/AdmissionRegistration/V1/Inputs/ValidatingWebhookArgs.cs @@ -112,7 +112,7 @@ public InputList - /// 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 change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + /// SideEffects 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. /// [Input("sideEffects", required: true)] public Input SideEffects { get; set; } = null!; diff --git a/sdk/dotnet/AdmissionRegistration/V1/Outputs/MutatingWebhook.cs b/sdk/dotnet/AdmissionRegistration/V1/Outputs/MutatingWebhook.cs index 261f5f28ad..d9670de312 100644 --- a/sdk/dotnet/AdmissionRegistration/V1/Outputs/MutatingWebhook.cs +++ b/sdk/dotnet/AdmissionRegistration/V1/Outputs/MutatingWebhook.cs @@ -92,7 +92,7 @@ public sealed class MutatingWebhook /// public readonly ImmutableArray Rules; /// - /// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + /// SideEffects 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. /// public readonly string SideEffects; /// diff --git a/sdk/dotnet/AdmissionRegistration/V1/Outputs/ValidatingWebhook.cs b/sdk/dotnet/AdmissionRegistration/V1/Outputs/ValidatingWebhook.cs index d8e42282fa..b2bcedfe2a 100644 --- a/sdk/dotnet/AdmissionRegistration/V1/Outputs/ValidatingWebhook.cs +++ b/sdk/dotnet/AdmissionRegistration/V1/Outputs/ValidatingWebhook.cs @@ -82,7 +82,7 @@ public sealed class ValidatingWebhook /// public readonly ImmutableArray Rules; /// - /// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + /// SideEffects 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. /// public readonly string SideEffects; /// diff --git a/sdk/dotnet/AdmissionRegistration/V1Beta1/Inputs/MutatingWebhookArgs.cs b/sdk/dotnet/AdmissionRegistration/V1Beta1/Inputs/MutatingWebhookArgs.cs index 5134a28944..82b127bc64 100644 --- a/sdk/dotnet/AdmissionRegistration/V1Beta1/Inputs/MutatingWebhookArgs.cs +++ b/sdk/dotnet/AdmissionRegistration/V1Beta1/Inputs/MutatingWebhookArgs.cs @@ -124,7 +124,7 @@ public InputList - /// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + /// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. /// [Input("sideEffects")] public Input? SideEffects { get; set; } diff --git a/sdk/dotnet/AdmissionRegistration/V1Beta1/Inputs/ValidatingWebhookArgs.cs b/sdk/dotnet/AdmissionRegistration/V1Beta1/Inputs/ValidatingWebhookArgs.cs index c469b0d551..7bac3d6efc 100644 --- a/sdk/dotnet/AdmissionRegistration/V1Beta1/Inputs/ValidatingWebhookArgs.cs +++ b/sdk/dotnet/AdmissionRegistration/V1Beta1/Inputs/ValidatingWebhookArgs.cs @@ -112,7 +112,7 @@ public InputList - /// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + /// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. /// [Input("sideEffects")] public Input? SideEffects { get; set; } diff --git a/sdk/dotnet/AdmissionRegistration/V1Beta1/Outputs/MutatingWebhook.cs b/sdk/dotnet/AdmissionRegistration/V1Beta1/Outputs/MutatingWebhook.cs index 1935afa91f..39b4c041f9 100644 --- a/sdk/dotnet/AdmissionRegistration/V1Beta1/Outputs/MutatingWebhook.cs +++ b/sdk/dotnet/AdmissionRegistration/V1Beta1/Outputs/MutatingWebhook.cs @@ -92,7 +92,7 @@ public sealed class MutatingWebhook /// public readonly ImmutableArray Rules; /// - /// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + /// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. /// public readonly string SideEffects; /// diff --git a/sdk/dotnet/AdmissionRegistration/V1Beta1/Outputs/ValidatingWebhook.cs b/sdk/dotnet/AdmissionRegistration/V1Beta1/Outputs/ValidatingWebhook.cs index 84ddf3a155..57694baacd 100644 --- a/sdk/dotnet/AdmissionRegistration/V1Beta1/Outputs/ValidatingWebhook.cs +++ b/sdk/dotnet/AdmissionRegistration/V1Beta1/Outputs/ValidatingWebhook.cs @@ -82,7 +82,7 @@ public sealed class ValidatingWebhook /// public readonly ImmutableArray Rules; /// - /// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + /// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. /// public readonly string SideEffects; /// diff --git a/sdk/dotnet/Apps/V1/Inputs/RollingUpdateDaemonSetArgs.cs b/sdk/dotnet/Apps/V1/Inputs/RollingUpdateDaemonSetArgs.cs index 4ca126ae87..f7836470f2 100644 --- a/sdk/dotnet/Apps/V1/Inputs/RollingUpdateDaemonSetArgs.cs +++ b/sdk/dotnet/Apps/V1/Inputs/RollingUpdateDaemonSetArgs.cs @@ -16,7 +16,13 @@ namespace Pulumi.Kubernetes.Types.Inputs.Apps.V1 public class RollingUpdateDaemonSetArgs : Pulumi.ResourceArgs { /// - /// The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + /// The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. + /// + [Input("maxSurge")] + public InputUnion? MaxSurge { get; set; } + + /// + /// The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. /// [Input("maxUnavailable")] public InputUnion? MaxUnavailable { get; set; } diff --git a/sdk/dotnet/Apps/V1/Outputs/RollingUpdateDaemonSet.cs b/sdk/dotnet/Apps/V1/Outputs/RollingUpdateDaemonSet.cs index be0a512d74..9afd111721 100644 --- a/sdk/dotnet/Apps/V1/Outputs/RollingUpdateDaemonSet.cs +++ b/sdk/dotnet/Apps/V1/Outputs/RollingUpdateDaemonSet.cs @@ -14,13 +14,21 @@ namespace Pulumi.Kubernetes.Types.Outputs.Apps.V1 public sealed class RollingUpdateDaemonSet { /// - /// The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + /// The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. + /// + public readonly Union MaxSurge; + /// + /// The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. /// public readonly Union MaxUnavailable; [OutputConstructor] - private RollingUpdateDaemonSet(Union maxUnavailable) + private RollingUpdateDaemonSet( + Union maxSurge, + + Union maxUnavailable) { + MaxSurge = maxSurge; MaxUnavailable = maxUnavailable; } } diff --git a/sdk/dotnet/Batch/V1/CronJob.cs b/sdk/dotnet/Batch/V1/CronJob.cs new file mode 100644 index 0000000000..4a32274b64 --- /dev/null +++ b/sdk/dotnet/Batch/V1/CronJob.cs @@ -0,0 +1,141 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Batch.V1 +{ + /// + /// CronJob represents the configuration of a single cron job. + /// + [KubernetesResourceType("kubernetes:batch/v1:CronJob")] + public partial class CronJob : KubernetesResource + { + /// + /// 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 + /// + [Output("apiVersion")] + public Output ApiVersion { get; private set; } = null!; + + /// + /// 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 + /// + [Output("kind")] + public Output Kind { get; private set; } = null!; + + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Output("metadata")] + public Output Metadata { get; private set; } = null!; + + /// + /// Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + /// + [Output("spec")] + public Output Spec { get; private set; } = null!; + + /// + /// Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + /// + [Output("status")] + public Output Status { get; private set; } = null!; + + + /// + /// Create a CronJob resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public CronJob(string name, Pulumi.Kubernetes.Types.Inputs.Batch.V1.CronJobArgs? args = null, CustomResourceOptions? options = null) + : base("kubernetes:batch/v1:CronJob", name, MakeArgs(args), MakeResourceOptions(options, "")) + { + } + internal CronJob(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:batch/v1:CronJob", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, "")) + { + } + + private CronJob(string name, Input id, CustomResourceOptions? options = null) + : base("kubernetes:batch/v1:CronJob", name, null, MakeResourceOptions(options, id)) + { + } + + private static Pulumi.Kubernetes.Types.Inputs.Batch.V1.CronJobArgs? MakeArgs(Pulumi.Kubernetes.Types.Inputs.Batch.V1.CronJobArgs? args) + { + args ??= new Pulumi.Kubernetes.Types.Inputs.Batch.V1.CronJobArgs(); + args.ApiVersion = "batch/v1"; + args.Kind = "CronJob"; + return args; + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + Aliases = + { + new Pulumi.Alias { Type = "kubernetes:batch/v1beta1:CronJob"}, + new Pulumi.Alias { Type = "kubernetes:batch/v2alpha1:CronJob"}, + }, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing CronJob resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static CronJob Get(string name, Input id, CustomResourceOptions? options = null) + { + return new CronJob(name, id, options); + } + } +} +namespace Pulumi.Kubernetes.Types.Inputs.Batch.V1 +{ + + public class CronJobArgs : Pulumi.ResourceArgs + { + /// + /// 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 + /// + [Input("apiVersion")] + public Input? ApiVersion { get; set; } + + /// + /// 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 + /// + [Input("kind")] + public Input? Kind { get; set; } + + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Input("metadata")] + public Input? Metadata { get; set; } + + /// + /// Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + /// + [Input("spec")] + public Input? Spec { get; set; } + + public CronJobArgs() + { + } + } +} diff --git a/sdk/dotnet/Batch/V1/CronJobList.cs b/sdk/dotnet/Batch/V1/CronJobList.cs new file mode 100644 index 0000000000..fe87e554cd --- /dev/null +++ b/sdk/dotnet/Batch/V1/CronJobList.cs @@ -0,0 +1,136 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Batch.V1 +{ + /// + /// CronJobList is a collection of cron jobs. + /// + [KubernetesResourceType("kubernetes:batch/v1:CronJobList")] + public partial class CronJobList : KubernetesResource + { + /// + /// 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 + /// + [Output("apiVersion")] + public Output ApiVersion { get; private set; } = null!; + + /// + /// items is the list of CronJobs. + /// + [Output("items")] + public Output> Items { get; private set; } = null!; + + /// + /// 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 + /// + [Output("kind")] + public Output Kind { get; private set; } = null!; + + /// + /// Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Output("metadata")] + public Output Metadata { get; private set; } = null!; + + + /// + /// Create a CronJobList resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public CronJobList(string name, Pulumi.Kubernetes.Types.Inputs.Batch.V1.CronJobListArgs? args = null, CustomResourceOptions? options = null) + : base("kubernetes:batch/v1:CronJobList", name, MakeArgs(args), MakeResourceOptions(options, "")) + { + } + internal CronJobList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:batch/v1:CronJobList", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, "")) + { + } + + private CronJobList(string name, Input id, CustomResourceOptions? options = null) + : base("kubernetes:batch/v1:CronJobList", name, null, MakeResourceOptions(options, id)) + { + } + + private static Pulumi.Kubernetes.Types.Inputs.Batch.V1.CronJobListArgs? MakeArgs(Pulumi.Kubernetes.Types.Inputs.Batch.V1.CronJobListArgs? args) + { + args ??= new Pulumi.Kubernetes.Types.Inputs.Batch.V1.CronJobListArgs(); + args.ApiVersion = "batch/v1"; + args.Kind = "CronJobList"; + return args; + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing CronJobList resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static CronJobList Get(string name, Input id, CustomResourceOptions? options = null) + { + return new CronJobList(name, id, options); + } + } +} +namespace Pulumi.Kubernetes.Types.Inputs.Batch.V1 +{ + + public class CronJobListArgs : Pulumi.ResourceArgs + { + /// + /// 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 + /// + [Input("apiVersion")] + public Input? ApiVersion { get; set; } + + [Input("items", required: true)] + private InputList? _items; + + /// + /// items is the list of CronJobs. + /// + public InputList Items + { + get => _items ?? (_items = new InputList()); + set => _items = value; + } + + /// + /// 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 + /// + [Input("kind")] + public Input? Kind { get; set; } + + /// + /// Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Input("metadata")] + public Input? Metadata { get; set; } + + public CronJobListArgs() + { + } + } +} diff --git a/sdk/dotnet/Batch/V1/Inputs/CronJobArgs.cs b/sdk/dotnet/Batch/V1/Inputs/CronJobArgs.cs new file mode 100644 index 0000000000..70ca5a14b4 --- /dev/null +++ b/sdk/dotnet/Batch/V1/Inputs/CronJobArgs.cs @@ -0,0 +1,12 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Batch.V1 +{ +} diff --git a/sdk/dotnet/Batch/V1/Inputs/CronJobSpecArgs.cs b/sdk/dotnet/Batch/V1/Inputs/CronJobSpecArgs.cs new file mode 100644 index 0000000000..bcd3a7e463 --- /dev/null +++ b/sdk/dotnet/Batch/V1/Inputs/CronJobSpecArgs.cs @@ -0,0 +1,64 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Batch.V1 +{ + + /// + /// CronJobSpec describes how the job execution will look like and when it will actually run. + /// + public class CronJobSpecArgs : Pulumi.ResourceArgs + { + /// + /// Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one + /// + [Input("concurrencyPolicy")] + public Input? ConcurrencyPolicy { get; set; } + + /// + /// The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. + /// + [Input("failedJobsHistoryLimit")] + public Input? FailedJobsHistoryLimit { get; set; } + + /// + /// Specifies the job that will be created when executing a CronJob. + /// + [Input("jobTemplate", required: true)] + public Input JobTemplate { get; set; } = null!; + + /// + /// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + /// + [Input("schedule", required: true)] + public Input Schedule { get; set; } = null!; + + /// + /// Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. + /// + [Input("startingDeadlineSeconds")] + public Input? StartingDeadlineSeconds { get; set; } + + /// + /// The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. + /// + [Input("successfulJobsHistoryLimit")] + public Input? SuccessfulJobsHistoryLimit { get; set; } + + /// + /// This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. + /// + [Input("suspend")] + public Input? Suspend { get; set; } + + public CronJobSpecArgs() + { + } + } +} diff --git a/sdk/dotnet/Batch/V1/Inputs/CronJobStatusArgs.cs b/sdk/dotnet/Batch/V1/Inputs/CronJobStatusArgs.cs new file mode 100644 index 0000000000..735dd40a74 --- /dev/null +++ b/sdk/dotnet/Batch/V1/Inputs/CronJobStatusArgs.cs @@ -0,0 +1,46 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Batch.V1 +{ + + /// + /// CronJobStatus represents the current state of a cron job. + /// + public class CronJobStatusArgs : Pulumi.ResourceArgs + { + [Input("active")] + private InputList? _active; + + /// + /// A list of pointers to currently running jobs. + /// + public InputList Active + { + get => _active ?? (_active = new InputList()); + set => _active = value; + } + + /// + /// Information when was the last time the job was successfully scheduled. + /// + [Input("lastScheduleTime")] + public Input? LastScheduleTime { get; set; } + + /// + /// Information when was the last time the job successfully completed. + /// + [Input("lastSuccessfulTime")] + public Input? LastSuccessfulTime { get; set; } + + public CronJobStatusArgs() + { + } + } +} diff --git a/sdk/dotnet/Batch/V1/Inputs/JobSpecArgs.cs b/sdk/dotnet/Batch/V1/Inputs/JobSpecArgs.cs index 2c2568d19a..acf73db84c 100644 --- a/sdk/dotnet/Batch/V1/Inputs/JobSpecArgs.cs +++ b/sdk/dotnet/Batch/V1/Inputs/JobSpecArgs.cs @@ -16,7 +16,7 @@ namespace Pulumi.Kubernetes.Types.Inputs.Batch.V1 public class JobSpecArgs : Pulumi.ResourceArgs { /// - /// Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer + /// Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. /// [Input("activeDeadlineSeconds")] public Input? ActiveDeadlineSeconds { get; set; } @@ -27,6 +27,18 @@ public class JobSpecArgs : Pulumi.ResourceArgs [Input("backoffLimit")] public Input? BackoffLimit { get; set; } + /// + /// CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. + /// + /// `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. + /// + /// `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. + /// + /// This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. + /// + [Input("completionMode")] + public Input? CompletionMode { get; set; } + /// /// Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ /// @@ -51,6 +63,12 @@ public class JobSpecArgs : Pulumi.ResourceArgs [Input("selector")] public Input? Selector { get; set; } + /// + /// Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. + /// + [Input("suspend")] + public Input? Suspend { get; set; } + /// /// Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ /// diff --git a/sdk/dotnet/Batch/V1/Inputs/JobStatusArgs.cs b/sdk/dotnet/Batch/V1/Inputs/JobStatusArgs.cs index ab71c94041..cb24d5f82c 100644 --- a/sdk/dotnet/Batch/V1/Inputs/JobStatusArgs.cs +++ b/sdk/dotnet/Batch/V1/Inputs/JobStatusArgs.cs @@ -21,6 +21,12 @@ public class JobStatusArgs : Pulumi.ResourceArgs [Input("active")] public Input? Active { get; set; } + /// + /// CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". + /// + [Input("completedIndexes")] + public Input? CompletedIndexes { get; set; } + /// /// Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. /// @@ -31,7 +37,7 @@ public class JobStatusArgs : Pulumi.ResourceArgs private InputList? _conditions; /// - /// The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + /// The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ /// public InputList Conditions { @@ -46,7 +52,7 @@ public InputList Condi public Input? Failed { get; set; } /// - /// Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. + /// Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. /// [Input("startTime")] public Input? StartTime { get; set; } diff --git a/sdk/dotnet/Batch/V1/Inputs/JobTemplateSpecArgs.cs b/sdk/dotnet/Batch/V1/Inputs/JobTemplateSpecArgs.cs new file mode 100644 index 0000000000..9fe14bcdca --- /dev/null +++ b/sdk/dotnet/Batch/V1/Inputs/JobTemplateSpecArgs.cs @@ -0,0 +1,34 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Batch.V1 +{ + + /// + /// JobTemplateSpec describes the data a Job should have when created from a template + /// + public class JobTemplateSpecArgs : Pulumi.ResourceArgs + { + /// + /// Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Input("metadata")] + public Input? Metadata { get; set; } + + /// + /// Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + /// + [Input("spec")] + public Input? Spec { get; set; } + + public JobTemplateSpecArgs() + { + } + } +} diff --git a/sdk/dotnet/Batch/V1/Outputs/CronJob.cs b/sdk/dotnet/Batch/V1/Outputs/CronJob.cs new file mode 100644 index 0000000000..b82734c318 --- /dev/null +++ b/sdk/dotnet/Batch/V1/Outputs/CronJob.cs @@ -0,0 +1,56 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Batch.V1 +{ + + [OutputType] + public sealed class CronJob + { + /// + /// 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 + /// + public readonly string ApiVersion; + /// + /// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + /// + public readonly string Kind; + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta Metadata; + /// + /// Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Batch.V1.CronJobSpec Spec; + /// + /// Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Batch.V1.CronJobStatus Status; + + [OutputConstructor] + private CronJob( + string apiVersion, + + string kind, + + Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta metadata, + + Pulumi.Kubernetes.Types.Outputs.Batch.V1.CronJobSpec spec, + + Pulumi.Kubernetes.Types.Outputs.Batch.V1.CronJobStatus status) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + } + } +} diff --git a/sdk/dotnet/Batch/V1/Outputs/CronJobSpec.cs b/sdk/dotnet/Batch/V1/Outputs/CronJobSpec.cs new file mode 100644 index 0000000000..1f883e54c9 --- /dev/null +++ b/sdk/dotnet/Batch/V1/Outputs/CronJobSpec.cs @@ -0,0 +1,70 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Batch.V1 +{ + + [OutputType] + public sealed class CronJobSpec + { + /// + /// Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one + /// + public readonly string ConcurrencyPolicy; + /// + /// The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. + /// + public readonly int FailedJobsHistoryLimit; + /// + /// Specifies the job that will be created when executing a CronJob. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Batch.V1.JobTemplateSpec JobTemplate; + /// + /// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + /// + public readonly string Schedule; + /// + /// Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. + /// + public readonly int StartingDeadlineSeconds; + /// + /// The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. + /// + public readonly int SuccessfulJobsHistoryLimit; + /// + /// This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. + /// + public readonly bool Suspend; + + [OutputConstructor] + private CronJobSpec( + string concurrencyPolicy, + + int failedJobsHistoryLimit, + + Pulumi.Kubernetes.Types.Outputs.Batch.V1.JobTemplateSpec jobTemplate, + + string schedule, + + int startingDeadlineSeconds, + + int successfulJobsHistoryLimit, + + bool suspend) + { + ConcurrencyPolicy = concurrencyPolicy; + FailedJobsHistoryLimit = failedJobsHistoryLimit; + JobTemplate = jobTemplate; + Schedule = schedule; + StartingDeadlineSeconds = startingDeadlineSeconds; + SuccessfulJobsHistoryLimit = successfulJobsHistoryLimit; + Suspend = suspend; + } + } +} diff --git a/sdk/dotnet/Batch/V1/Outputs/CronJobStatus.cs b/sdk/dotnet/Batch/V1/Outputs/CronJobStatus.cs new file mode 100644 index 0000000000..23f99425c8 --- /dev/null +++ b/sdk/dotnet/Batch/V1/Outputs/CronJobStatus.cs @@ -0,0 +1,42 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Batch.V1 +{ + + [OutputType] + public sealed class CronJobStatus + { + /// + /// A list of pointers to currently running jobs. + /// + public readonly ImmutableArray Active; + /// + /// Information when was the last time the job was successfully scheduled. + /// + public readonly string LastScheduleTime; + /// + /// Information when was the last time the job successfully completed. + /// + public readonly string LastSuccessfulTime; + + [OutputConstructor] + private CronJobStatus( + ImmutableArray active, + + string lastScheduleTime, + + string lastSuccessfulTime) + { + Active = active; + LastScheduleTime = lastScheduleTime; + LastSuccessfulTime = lastSuccessfulTime; + } + } +} diff --git a/sdk/dotnet/Batch/V1/Outputs/JobSpec.cs b/sdk/dotnet/Batch/V1/Outputs/JobSpec.cs index c92aeffe23..b6a25fb1e2 100644 --- a/sdk/dotnet/Batch/V1/Outputs/JobSpec.cs +++ b/sdk/dotnet/Batch/V1/Outputs/JobSpec.cs @@ -14,7 +14,7 @@ namespace Pulumi.Kubernetes.Types.Outputs.Batch.V1 public sealed class JobSpec { /// - /// Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer + /// Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. /// public readonly int ActiveDeadlineSeconds; /// @@ -22,6 +22,16 @@ public sealed class JobSpec /// public readonly int BackoffLimit; /// + /// CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. + /// + /// `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. + /// + /// `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. + /// + /// This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. + /// + public readonly string CompletionMode; + /// /// Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ /// public readonly int Completions; @@ -38,6 +48,10 @@ public sealed class JobSpec /// public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector Selector; /// + /// Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. + /// + public readonly bool Suspend; + /// /// Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ /// public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.PodTemplateSpec Template; @@ -52,6 +66,8 @@ public sealed class JobSpec int backoffLimit, + string completionMode, + int completions, bool manualSelector, @@ -60,16 +76,20 @@ public sealed class JobSpec Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector selector, + bool suspend, + Pulumi.Kubernetes.Types.Outputs.Core.V1.PodTemplateSpec template, int ttlSecondsAfterFinished) { ActiveDeadlineSeconds = activeDeadlineSeconds; BackoffLimit = backoffLimit; + CompletionMode = completionMode; Completions = completions; ManualSelector = manualSelector; Parallelism = parallelism; Selector = selector; + Suspend = suspend; Template = template; TtlSecondsAfterFinished = ttlSecondsAfterFinished; } diff --git a/sdk/dotnet/Batch/V1/Outputs/JobStatus.cs b/sdk/dotnet/Batch/V1/Outputs/JobStatus.cs index e7e48f6c53..d03ed74056 100644 --- a/sdk/dotnet/Batch/V1/Outputs/JobStatus.cs +++ b/sdk/dotnet/Batch/V1/Outputs/JobStatus.cs @@ -18,11 +18,15 @@ public sealed class JobStatus /// public readonly int Active; /// + /// CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". + /// + public readonly string CompletedIndexes; + /// /// Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. /// public readonly string CompletionTime; /// - /// The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + /// The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ /// public readonly ImmutableArray Conditions; /// @@ -30,7 +34,7 @@ public sealed class JobStatus /// public readonly int Failed; /// - /// Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. + /// Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. /// public readonly string StartTime; /// @@ -42,6 +46,8 @@ public sealed class JobStatus private JobStatus( int active, + string completedIndexes, + string completionTime, ImmutableArray conditions, @@ -53,6 +59,7 @@ public sealed class JobStatus int succeeded) { Active = active; + CompletedIndexes = completedIndexes; CompletionTime = completionTime; Conditions = conditions; Failed = failed; diff --git a/sdk/dotnet/Batch/V1/Outputs/JobTemplateSpec.cs b/sdk/dotnet/Batch/V1/Outputs/JobTemplateSpec.cs new file mode 100644 index 0000000000..1302d90a50 --- /dev/null +++ b/sdk/dotnet/Batch/V1/Outputs/JobTemplateSpec.cs @@ -0,0 +1,35 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Batch.V1 +{ + + [OutputType] + public sealed class JobTemplateSpec + { + /// + /// Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta Metadata; + /// + /// Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Batch.V1.JobSpec Spec; + + [OutputConstructor] + private JobTemplateSpec( + Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta metadata, + + Pulumi.Kubernetes.Types.Outputs.Batch.V1.JobSpec spec) + { + Metadata = metadata; + Spec = spec; + } + } +} diff --git a/sdk/dotnet/Batch/V1Beta1/CronJob.cs b/sdk/dotnet/Batch/V1Beta1/CronJob.cs index 0967330a09..df4f8cb248 100755 --- a/sdk/dotnet/Batch/V1Beta1/CronJob.cs +++ b/sdk/dotnet/Batch/V1Beta1/CronJob.cs @@ -82,6 +82,7 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? Version = Utilities.Version, Aliases = { + new Pulumi.Alias { Type = "kubernetes:batch/v1:CronJob"}, new Pulumi.Alias { Type = "kubernetes:batch/v2alpha1:CronJob"}, }, }; diff --git a/sdk/dotnet/Batch/V1Beta1/Inputs/CronJobStatusArgs.cs b/sdk/dotnet/Batch/V1Beta1/Inputs/CronJobStatusArgs.cs index fa48b3d356..b4a8672028 100644 --- a/sdk/dotnet/Batch/V1Beta1/Inputs/CronJobStatusArgs.cs +++ b/sdk/dotnet/Batch/V1Beta1/Inputs/CronJobStatusArgs.cs @@ -33,6 +33,12 @@ public InputList Act [Input("lastScheduleTime")] public Input? LastScheduleTime { get; set; } + /// + /// Information when was the last time the job successfully completed. + /// + [Input("lastSuccessfulTime")] + public Input? LastSuccessfulTime { get; set; } + public CronJobStatusArgs() { } diff --git a/sdk/dotnet/Batch/V1Beta1/Outputs/CronJobStatus.cs b/sdk/dotnet/Batch/V1Beta1/Outputs/CronJobStatus.cs index a1e27cbe97..c911fb47a1 100644 --- a/sdk/dotnet/Batch/V1Beta1/Outputs/CronJobStatus.cs +++ b/sdk/dotnet/Batch/V1Beta1/Outputs/CronJobStatus.cs @@ -21,15 +21,22 @@ public sealed class CronJobStatus /// Information when was the last time the job was successfully scheduled. /// public readonly string LastScheduleTime; + /// + /// Information when was the last time the job successfully completed. + /// + public readonly string LastSuccessfulTime; [OutputConstructor] private CronJobStatus( ImmutableArray active, - string lastScheduleTime) + string lastScheduleTime, + + string lastSuccessfulTime) { Active = active; LastScheduleTime = lastScheduleTime; + LastSuccessfulTime = lastSuccessfulTime; } } } diff --git a/sdk/dotnet/Batch/V2Alpha1/CronJob.cs b/sdk/dotnet/Batch/V2Alpha1/CronJob.cs index 77241f3065..a6f09e4e43 100755 --- a/sdk/dotnet/Batch/V2Alpha1/CronJob.cs +++ b/sdk/dotnet/Batch/V2Alpha1/CronJob.cs @@ -82,6 +82,7 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? Version = Utilities.Version, Aliases = { + new Pulumi.Alias { Type = "kubernetes:batch/v1:CronJob"}, new Pulumi.Alias { Type = "kubernetes:batch/v1beta1:CronJob"}, }, }; diff --git a/sdk/dotnet/Core/V1/ConfigMap.cs b/sdk/dotnet/Core/V1/ConfigMap.cs index 99d82c185f..a702c61f9a 100755 --- a/sdk/dotnet/Core/V1/ConfigMap.cs +++ b/sdk/dotnet/Core/V1/ConfigMap.cs @@ -34,7 +34,7 @@ public partial class ConfigMap : KubernetesResource public Output> Data { get; private set; } = null!; /// - /// Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + /// Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. /// [Output("immutable")] public Output Immutable { get; private set; } = null!; @@ -142,7 +142,7 @@ public InputMap Data } /// - /// Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + /// Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. /// [Input("immutable")] public Input? Immutable { get; set; } diff --git a/sdk/dotnet/Core/V1/EphemeralContainers.cs b/sdk/dotnet/Core/V1/EphemeralContainers.cs new file mode 100644 index 0000000000..8d000d434a --- /dev/null +++ b/sdk/dotnet/Core/V1/EphemeralContainers.cs @@ -0,0 +1,130 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Core.V1 +{ + /// + /// A list of ephemeral containers used with the Pod ephemeralcontainers subresource. + /// + [KubernetesResourceType("kubernetes:core/v1:EphemeralContainers")] + public partial class EphemeralContainers : KubernetesResource + { + /// + /// 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 + /// + [Output("apiVersion")] + public Output ApiVersion { get; private set; } = null!; + + /// + /// A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + /// + [Output("ephemeralContainers")] + public Output> EphemeralContainersValue { get; private set; } = null!; + + /// + /// 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 + /// + [Output("kind")] + public Output Kind { get; private set; } = null!; + + [Output("metadata")] + public Output Metadata { get; private set; } = null!; + + + /// + /// Create a EphemeralContainers resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public EphemeralContainers(string name, Pulumi.Kubernetes.Types.Inputs.Core.V1.EphemeralContainersArgs? args = null, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:EphemeralContainers", name, MakeArgs(args), MakeResourceOptions(options, "")) + { + } + internal EphemeralContainers(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:EphemeralContainers", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, "")) + { + } + + private EphemeralContainers(string name, Input id, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:EphemeralContainers", name, null, MakeResourceOptions(options, id)) + { + } + + private static Pulumi.Kubernetes.Types.Inputs.Core.V1.EphemeralContainersArgs? MakeArgs(Pulumi.Kubernetes.Types.Inputs.Core.V1.EphemeralContainersArgs? args) + { + args ??= new Pulumi.Kubernetes.Types.Inputs.Core.V1.EphemeralContainersArgs(); + args.ApiVersion = "v1"; + args.Kind = "EphemeralContainers"; + return args; + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing EphemeralContainers resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static EphemeralContainers Get(string name, Input id, CustomResourceOptions? options = null) + { + return new EphemeralContainers(name, id, options); + } + } +} +namespace Pulumi.Kubernetes.Types.Inputs.Core.V1 +{ + + public class EphemeralContainersArgs : Pulumi.ResourceArgs + { + /// + /// 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 + /// + [Input("apiVersion")] + public Input? ApiVersion { get; set; } + + [Input("ephemeralContainers", required: true)] + private InputList? _ephemeralContainers; + + /// + /// A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + /// + public InputList EphemeralContainersValue + { + get => _ephemeralContainers ?? (_ephemeralContainers = new InputList()); + set => _ephemeralContainers = value; + } + + /// + /// 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 + /// + [Input("kind")] + public Input? Kind { get; set; } + + [Input("metadata")] + public Input? Metadata { get; set; } + + public EphemeralContainersArgs() + { + } + } +} diff --git a/sdk/dotnet/Core/V1/Inputs/ContainerArgs.cs b/sdk/dotnet/Core/V1/Inputs/ContainerArgs.cs index 516508656e..1fab22764e 100644 --- a/sdk/dotnet/Core/V1/Inputs/ContainerArgs.cs +++ b/sdk/dotnet/Core/V1/Inputs/ContainerArgs.cs @@ -112,7 +112,7 @@ public InputList Ports public Input? ReadinessProbe { get; set; } /// - /// Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ /// [Input("resources")] public Input? Resources { get; set; } diff --git a/sdk/dotnet/Core/V1/Inputs/EphemeralVolumeSourceArgs.cs b/sdk/dotnet/Core/V1/Inputs/EphemeralVolumeSourceArgs.cs index 67e4ed21e2..4c0b5702ea 100644 --- a/sdk/dotnet/Core/V1/Inputs/EphemeralVolumeSourceArgs.cs +++ b/sdk/dotnet/Core/V1/Inputs/EphemeralVolumeSourceArgs.cs @@ -15,12 +15,6 @@ namespace Pulumi.Kubernetes.Types.Inputs.Core.V1 /// public class EphemeralVolumeSourceArgs : Pulumi.ResourceArgs { - /// - /// Specifies a read-only configuration for the volume. Defaults to false (read/write). - /// - [Input("readOnly")] - public Input? ReadOnly { get; set; } - /// /// Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `<pod name>-<volume name>` where `<volume name>` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). /// diff --git a/sdk/dotnet/Core/V1/Inputs/PodAffinityTermArgs.cs b/sdk/dotnet/Core/V1/Inputs/PodAffinityTermArgs.cs index ed077554ec..bcab98d189 100644 --- a/sdk/dotnet/Core/V1/Inputs/PodAffinityTermArgs.cs +++ b/sdk/dotnet/Core/V1/Inputs/PodAffinityTermArgs.cs @@ -21,11 +21,17 @@ public class PodAffinityTermArgs : Pulumi.ResourceArgs [Input("labelSelector")] public Input? LabelSelector { get; set; } + /// + /// A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + /// + [Input("namespaceSelector")] + public Input? NamespaceSelector { get; set; } + [Input("namespaces")] private InputList? _namespaces; /// - /// namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" + /// namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" /// public InputList Namespaces { diff --git a/sdk/dotnet/Core/V1/Inputs/PodSpecArgs.cs b/sdk/dotnet/Core/V1/Inputs/PodSpecArgs.cs index 47a383dec9..d07e38990b 100644 --- a/sdk/dotnet/Core/V1/Inputs/PodSpecArgs.cs +++ b/sdk/dotnet/Core/V1/Inputs/PodSpecArgs.cs @@ -250,7 +250,7 @@ public InputList Re public Input? Subdomain { get; set; } /// - /// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + /// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. /// [Input("terminationGracePeriodSeconds")] public Input? TerminationGracePeriodSeconds { get; set; } diff --git a/sdk/dotnet/Core/V1/Inputs/ProbeArgs.cs b/sdk/dotnet/Core/V1/Inputs/ProbeArgs.cs index dbbfcf6884..36f4df9163 100644 --- a/sdk/dotnet/Core/V1/Inputs/ProbeArgs.cs +++ b/sdk/dotnet/Core/V1/Inputs/ProbeArgs.cs @@ -57,6 +57,12 @@ public class ProbeArgs : Pulumi.ResourceArgs [Input("tcpSocket")] public Input? TcpSocket { get; set; } + /// + /// Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. + /// + [Input("terminationGracePeriodSeconds")] + public Input? TerminationGracePeriodSeconds { get; set; } + /// /// Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes /// diff --git a/sdk/dotnet/Core/V1/Inputs/ResourceRequirementsArgs.cs b/sdk/dotnet/Core/V1/Inputs/ResourceRequirementsArgs.cs index 68c4c1ae17..6eb4ecb744 100644 --- a/sdk/dotnet/Core/V1/Inputs/ResourceRequirementsArgs.cs +++ b/sdk/dotnet/Core/V1/Inputs/ResourceRequirementsArgs.cs @@ -19,7 +19,7 @@ public class ResourceRequirementsArgs : Pulumi.ResourceArgs private InputMap? _limits; /// - /// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ /// public InputMap Limits { @@ -31,7 +31,7 @@ public InputMap Limits private InputMap? _requests; /// - /// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ /// public InputMap Requests { diff --git a/sdk/dotnet/Core/V1/Inputs/ServiceSpecArgs.cs b/sdk/dotnet/Core/V1/Inputs/ServiceSpecArgs.cs index 73b35df4b6..3ebc3354ee 100644 --- a/sdk/dotnet/Core/V1/Inputs/ServiceSpecArgs.cs +++ b/sdk/dotnet/Core/V1/Inputs/ServiceSpecArgs.cs @@ -54,7 +54,7 @@ public InputList ExternalIPs } /// - /// externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be + /// externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". /// [Input("externalName")] public Input? ExternalName { get; set; } @@ -71,6 +71,12 @@ public InputList ExternalIPs [Input("healthCheckNodePort")] public Input? HealthCheckNodePort { get; set; } + /// + /// InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". + /// + [Input("internalTrafficPolicy")] + public Input? InternalTrafficPolicy { get; set; } + [Input("ipFamilies")] private InputList? _ipFamilies; @@ -97,6 +103,12 @@ public InputList IpFamilies [Input("ipFamilyPolicy")] public Input? IpFamilyPolicy { get; set; } + /// + /// loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. + /// + [Input("loadBalancerClass")] + public Input? LoadBalancerClass { get; set; } + /// /// Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. /// @@ -161,7 +173,7 @@ public InputMap Selector private InputList? _topologyKeys; /// - /// topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. + /// topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. /// public InputList TopologyKeys { diff --git a/sdk/dotnet/Core/V1/Inputs/VolumeArgs.cs b/sdk/dotnet/Core/V1/Inputs/VolumeArgs.cs index 8521d3691e..1faa886a2b 100644 --- a/sdk/dotnet/Core/V1/Inputs/VolumeArgs.cs +++ b/sdk/dotnet/Core/V1/Inputs/VolumeArgs.cs @@ -70,7 +70,7 @@ public class VolumeArgs : Pulumi.ResourceArgs public Input? EmptyDir { get; set; } /// - /// Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + /// Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. /// /// Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity /// tracking are needed, @@ -84,6 +84,8 @@ public class VolumeArgs : Pulumi.ResourceArgs /// Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. /// /// A pod can use both types of ephemeral volumes and persistent volumes at the same time. + /// + /// This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. /// [Input("ephemeral")] public Input? Ephemeral { get; set; } diff --git a/sdk/dotnet/Core/V1/LimitRangeList.cs b/sdk/dotnet/Core/V1/LimitRangeList.cs index e924c93665..bd6b8a3ea3 100755 --- a/sdk/dotnet/Core/V1/LimitRangeList.cs +++ b/sdk/dotnet/Core/V1/LimitRangeList.cs @@ -22,7 +22,7 @@ public partial class LimitRangeList : KubernetesResource public Output ApiVersion { get; private set; } = null!; /// - /// Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ /// [Output("items")] public Output> Items { get; private set; } = null!; @@ -109,7 +109,7 @@ public class LimitRangeListArgs : Pulumi.ResourceArgs private InputList? _items; /// - /// Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ /// public InputList Items { diff --git a/sdk/dotnet/Core/V1/Outputs/ConfigMap.cs b/sdk/dotnet/Core/V1/Outputs/ConfigMap.cs index 1114de816b..d426183ced 100644 --- a/sdk/dotnet/Core/V1/Outputs/ConfigMap.cs +++ b/sdk/dotnet/Core/V1/Outputs/ConfigMap.cs @@ -26,7 +26,7 @@ public sealed class ConfigMap /// public readonly ImmutableDictionary Data; /// - /// Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + /// Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. /// public readonly bool Immutable; /// diff --git a/sdk/dotnet/Core/V1/Outputs/Container.cs b/sdk/dotnet/Core/V1/Outputs/Container.cs index b80418d622..852171084c 100644 --- a/sdk/dotnet/Core/V1/Outputs/Container.cs +++ b/sdk/dotnet/Core/V1/Outputs/Container.cs @@ -58,7 +58,7 @@ public sealed class Container /// public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.Probe ReadinessProbe; /// - /// Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ /// public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.ResourceRequirements Resources; /// diff --git a/sdk/dotnet/Core/V1/Outputs/EphemeralVolumeSource.cs b/sdk/dotnet/Core/V1/Outputs/EphemeralVolumeSource.cs index c7597acc1d..722a313f61 100644 --- a/sdk/dotnet/Core/V1/Outputs/EphemeralVolumeSource.cs +++ b/sdk/dotnet/Core/V1/Outputs/EphemeralVolumeSource.cs @@ -13,10 +13,6 @@ namespace Pulumi.Kubernetes.Types.Outputs.Core.V1 [OutputType] public sealed class EphemeralVolumeSource { - /// - /// Specifies a read-only configuration for the volume. Defaults to false (read/write). - /// - public readonly bool ReadOnly; /// /// Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `<pod name>-<volume name>` where `<volume name>` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). /// @@ -29,12 +25,8 @@ public sealed class EphemeralVolumeSource public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.PersistentVolumeClaimTemplate VolumeClaimTemplate; [OutputConstructor] - private EphemeralVolumeSource( - bool readOnly, - - Pulumi.Kubernetes.Types.Outputs.Core.V1.PersistentVolumeClaimTemplate volumeClaimTemplate) + private EphemeralVolumeSource(Pulumi.Kubernetes.Types.Outputs.Core.V1.PersistentVolumeClaimTemplate volumeClaimTemplate) { - ReadOnly = readOnly; VolumeClaimTemplate = volumeClaimTemplate; } } diff --git a/sdk/dotnet/Core/V1/Outputs/PodAffinityTerm.cs b/sdk/dotnet/Core/V1/Outputs/PodAffinityTerm.cs index 70aff3e8d8..7aedd15950 100644 --- a/sdk/dotnet/Core/V1/Outputs/PodAffinityTerm.cs +++ b/sdk/dotnet/Core/V1/Outputs/PodAffinityTerm.cs @@ -18,7 +18,11 @@ public sealed class PodAffinityTerm /// public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector LabelSelector; /// - /// namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" + /// A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector NamespaceSelector; + /// + /// namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" /// public readonly ImmutableArray Namespaces; /// @@ -30,11 +34,14 @@ public sealed class PodAffinityTerm private PodAffinityTerm( Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector labelSelector, + Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector namespaceSelector, + ImmutableArray namespaces, string topologyKey) { LabelSelector = labelSelector; + NamespaceSelector = namespaceSelector; Namespaces = namespaces; TopologyKey = topologyKey; } diff --git a/sdk/dotnet/Core/V1/Outputs/PodSpec.cs b/sdk/dotnet/Core/V1/Outputs/PodSpec.cs index 720915cae5..baaf56fbe2 100644 --- a/sdk/dotnet/Core/V1/Outputs/PodSpec.cs +++ b/sdk/dotnet/Core/V1/Outputs/PodSpec.cs @@ -138,7 +138,7 @@ public sealed class PodSpec /// public readonly string Subdomain; /// - /// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + /// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. /// public readonly int TerminationGracePeriodSeconds; /// diff --git a/sdk/dotnet/Core/V1/Outputs/Probe.cs b/sdk/dotnet/Core/V1/Outputs/Probe.cs index 3ea3cdc09e..a2aa102290 100644 --- a/sdk/dotnet/Core/V1/Outputs/Probe.cs +++ b/sdk/dotnet/Core/V1/Outputs/Probe.cs @@ -42,6 +42,10 @@ public sealed class Probe /// public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.TCPSocketAction TcpSocket; /// + /// Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. + /// + public readonly int TerminationGracePeriodSeconds; + /// /// Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes /// public readonly int TimeoutSeconds; @@ -62,6 +66,8 @@ public sealed class Probe Pulumi.Kubernetes.Types.Outputs.Core.V1.TCPSocketAction tcpSocket, + int terminationGracePeriodSeconds, + int timeoutSeconds) { Exec = exec; @@ -71,6 +77,7 @@ public sealed class Probe PeriodSeconds = periodSeconds; SuccessThreshold = successThreshold; TcpSocket = tcpSocket; + TerminationGracePeriodSeconds = terminationGracePeriodSeconds; TimeoutSeconds = timeoutSeconds; } } diff --git a/sdk/dotnet/Core/V1/Outputs/ResourceRequirements.cs b/sdk/dotnet/Core/V1/Outputs/ResourceRequirements.cs index 50e868f012..ff2a9973ba 100644 --- a/sdk/dotnet/Core/V1/Outputs/ResourceRequirements.cs +++ b/sdk/dotnet/Core/V1/Outputs/ResourceRequirements.cs @@ -14,11 +14,11 @@ namespace Pulumi.Kubernetes.Types.Outputs.Core.V1 public sealed class ResourceRequirements { /// - /// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ /// public readonly ImmutableDictionary Limits; /// - /// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ /// public readonly ImmutableDictionary Requests; diff --git a/sdk/dotnet/Core/V1/Outputs/Secret.cs b/sdk/dotnet/Core/V1/Outputs/Secret.cs index 5ab73133fc..57ec38b4c9 100644 --- a/sdk/dotnet/Core/V1/Outputs/Secret.cs +++ b/sdk/dotnet/Core/V1/Outputs/Secret.cs @@ -22,7 +22,7 @@ public sealed class Secret /// public readonly ImmutableDictionary Data; /// - /// Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + /// Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. /// public readonly bool Immutable; /// @@ -34,7 +34,7 @@ public sealed class Secret /// public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta Metadata; /// - /// stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + /// stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. /// public readonly ImmutableDictionary StringData; /// diff --git a/sdk/dotnet/Core/V1/Outputs/ServiceSpec.cs b/sdk/dotnet/Core/V1/Outputs/ServiceSpec.cs index a5f156b803..9484d49b83 100644 --- a/sdk/dotnet/Core/V1/Outputs/ServiceSpec.cs +++ b/sdk/dotnet/Core/V1/Outputs/ServiceSpec.cs @@ -32,7 +32,7 @@ public sealed class ServiceSpec /// public readonly ImmutableArray ExternalIPs; /// - /// externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be + /// externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". /// public readonly string ExternalName; /// @@ -44,6 +44,10 @@ public sealed class ServiceSpec /// public readonly int HealthCheckNodePort; /// + /// InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". + /// + public readonly string InternalTrafficPolicy; + /// /// IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the "IPv6DualStack" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are "IPv4" and "IPv6". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to "headless" services. This field will be wiped when updating a Service to type ExternalName. /// /// This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. @@ -58,6 +62,10 @@ public sealed class ServiceSpec /// public readonly string IpFamilyPolicy; /// + /// loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. + /// + public readonly string LoadBalancerClass; + /// /// Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. /// public readonly string LoadBalancerIP; @@ -86,7 +94,7 @@ public sealed class ServiceSpec /// public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.SessionAffinityConfig SessionAffinityConfig; /// - /// topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. + /// topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. /// public readonly ImmutableArray TopologyKeys; /// @@ -110,12 +118,16 @@ public sealed class ServiceSpec int healthCheckNodePort, + string internalTrafficPolicy, + ImmutableArray ipFamilies, string ipFamily, string ipFamilyPolicy, + string loadBalancerClass, + string loadBalancerIP, ImmutableArray loadBalancerSourceRanges, @@ -141,9 +153,11 @@ public sealed class ServiceSpec ExternalName = externalName; ExternalTrafficPolicy = externalTrafficPolicy; HealthCheckNodePort = healthCheckNodePort; + InternalTrafficPolicy = internalTrafficPolicy; IpFamilies = ipFamilies; IpFamily = ipFamily; IpFamilyPolicy = ipFamilyPolicy; + LoadBalancerClass = loadBalancerClass; LoadBalancerIP = loadBalancerIP; LoadBalancerSourceRanges = loadBalancerSourceRanges; Ports = ports; diff --git a/sdk/dotnet/Core/V1/Outputs/Volume.cs b/sdk/dotnet/Core/V1/Outputs/Volume.cs index c45aec7fbe..209078d4df 100644 --- a/sdk/dotnet/Core/V1/Outputs/Volume.cs +++ b/sdk/dotnet/Core/V1/Outputs/Volume.cs @@ -50,7 +50,7 @@ public sealed class Volume /// public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.EmptyDirVolumeSource EmptyDir; /// - /// Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + /// Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. /// /// Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity /// tracking are needed, @@ -64,6 +64,8 @@ public sealed class Volume /// Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. /// /// A pod can use both types of ephemeral volumes and persistent volumes at the same time. + /// + /// This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. /// public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.EphemeralVolumeSource Ephemeral; /// diff --git a/sdk/dotnet/Core/V1/Secret.cs b/sdk/dotnet/Core/V1/Secret.cs index 5ce9d92a1e..b629d601a6 100755 --- a/sdk/dotnet/Core/V1/Secret.cs +++ b/sdk/dotnet/Core/V1/Secret.cs @@ -38,7 +38,7 @@ public partial class Secret : KubernetesResource public Output> Data { get; private set; } = null!; /// - /// Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + /// Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. /// [Output("immutable")] public Output Immutable { get; private set; } = null!; @@ -56,7 +56,7 @@ public partial class Secret : KubernetesResource public Output Metadata { get; private set; } = null!; /// - /// stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + /// stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. /// [Output("stringData")] public Output> StringData { get; private set; } = null!; @@ -151,7 +151,7 @@ public InputMap Data } /// - /// Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + /// Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. /// [Input("immutable")] public Input? Immutable { get; set; } @@ -172,7 +172,7 @@ public InputMap Data private InputMap? _stringData; /// - /// stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + /// stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. /// public InputMap StringData { diff --git a/sdk/dotnet/Discovery/V1/EndpointSlice.cs b/sdk/dotnet/Discovery/V1/EndpointSlice.cs new file mode 100644 index 0000000000..954b7ab05a --- /dev/null +++ b/sdk/dotnet/Discovery/V1/EndpointSlice.cs @@ -0,0 +1,170 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Discovery.V1 +{ + /// + /// EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. + /// + [KubernetesResourceType("kubernetes:discovery.k8s.io/v1:EndpointSlice")] + public partial class EndpointSlice : KubernetesResource + { + /// + /// addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + /// + [Output("addressType")] + public Output AddressType { get; private set; } = null!; + + /// + /// 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 + /// + [Output("apiVersion")] + public Output ApiVersion { get; private set; } = null!; + + /// + /// endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + /// + [Output("endpoints")] + public Output> Endpoints { get; private set; } = null!; + + /// + /// 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 + /// + [Output("kind")] + public Output Kind { get; private set; } = null!; + + /// + /// Standard object's metadata. + /// + [Output("metadata")] + public Output Metadata { get; private set; } = null!; + + /// + /// ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + /// + [Output("ports")] + public Output> Ports { get; private set; } = null!; + + + /// + /// Create a EndpointSlice resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public EndpointSlice(string name, Pulumi.Kubernetes.Types.Inputs.Discovery.V1.EndpointSliceArgs? args = null, CustomResourceOptions? options = null) + : base("kubernetes:discovery.k8s.io/v1:EndpointSlice", name, MakeArgs(args), MakeResourceOptions(options, "")) + { + } + internal EndpointSlice(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:discovery.k8s.io/v1:EndpointSlice", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, "")) + { + } + + private EndpointSlice(string name, Input id, CustomResourceOptions? options = null) + : base("kubernetes:discovery.k8s.io/v1:EndpointSlice", name, null, MakeResourceOptions(options, id)) + { + } + + private static Pulumi.Kubernetes.Types.Inputs.Discovery.V1.EndpointSliceArgs? MakeArgs(Pulumi.Kubernetes.Types.Inputs.Discovery.V1.EndpointSliceArgs? args) + { + args ??= new Pulumi.Kubernetes.Types.Inputs.Discovery.V1.EndpointSliceArgs(); + args.ApiVersion = "discovery.k8s.io/v1"; + args.Kind = "EndpointSlice"; + return args; + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + Aliases = + { + new Pulumi.Alias { Type = "kubernetes:discovery.k8s.io/v1beta1:EndpointSlice"}, + }, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing EndpointSlice resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static EndpointSlice Get(string name, Input id, CustomResourceOptions? options = null) + { + return new EndpointSlice(name, id, options); + } + } +} +namespace Pulumi.Kubernetes.Types.Inputs.Discovery.V1 +{ + + public class EndpointSliceArgs : Pulumi.ResourceArgs + { + /// + /// addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + /// + [Input("addressType", required: true)] + public Input AddressType { get; set; } = null!; + + /// + /// 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 + /// + [Input("apiVersion")] + public Input? ApiVersion { get; set; } + + [Input("endpoints", required: true)] + private InputList? _endpoints; + + /// + /// endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + /// + public InputList Endpoints + { + get => _endpoints ?? (_endpoints = new InputList()); + set => _endpoints = value; + } + + /// + /// 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 + /// + [Input("kind")] + public Input? Kind { get; set; } + + /// + /// Standard object's metadata. + /// + [Input("metadata")] + public Input? Metadata { get; set; } + + [Input("ports")] + private InputList? _ports; + + /// + /// ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + /// + public InputList Ports + { + get => _ports ?? (_ports = new InputList()); + set => _ports = value; + } + + public EndpointSliceArgs() + { + } + } +} diff --git a/sdk/dotnet/Discovery/V1/EndpointSliceList.cs b/sdk/dotnet/Discovery/V1/EndpointSliceList.cs new file mode 100644 index 0000000000..35e330952a --- /dev/null +++ b/sdk/dotnet/Discovery/V1/EndpointSliceList.cs @@ -0,0 +1,136 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Discovery.V1 +{ + /// + /// EndpointSliceList represents a list of endpoint slices + /// + [KubernetesResourceType("kubernetes:discovery.k8s.io/v1:EndpointSliceList")] + public partial class EndpointSliceList : KubernetesResource + { + /// + /// 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 + /// + [Output("apiVersion")] + public Output ApiVersion { get; private set; } = null!; + + /// + /// List of endpoint slices + /// + [Output("items")] + public Output> Items { get; private set; } = null!; + + /// + /// 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 + /// + [Output("kind")] + public Output Kind { get; private set; } = null!; + + /// + /// Standard list metadata. + /// + [Output("metadata")] + public Output Metadata { get; private set; } = null!; + + + /// + /// Create a EndpointSliceList resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public EndpointSliceList(string name, Pulumi.Kubernetes.Types.Inputs.Discovery.V1.EndpointSliceListArgs? args = null, CustomResourceOptions? options = null) + : base("kubernetes:discovery.k8s.io/v1:EndpointSliceList", name, MakeArgs(args), MakeResourceOptions(options, "")) + { + } + internal EndpointSliceList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:discovery.k8s.io/v1:EndpointSliceList", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, "")) + { + } + + private EndpointSliceList(string name, Input id, CustomResourceOptions? options = null) + : base("kubernetes:discovery.k8s.io/v1:EndpointSliceList", name, null, MakeResourceOptions(options, id)) + { + } + + private static Pulumi.Kubernetes.Types.Inputs.Discovery.V1.EndpointSliceListArgs? MakeArgs(Pulumi.Kubernetes.Types.Inputs.Discovery.V1.EndpointSliceListArgs? args) + { + args ??= new Pulumi.Kubernetes.Types.Inputs.Discovery.V1.EndpointSliceListArgs(); + args.ApiVersion = "discovery.k8s.io/v1"; + args.Kind = "EndpointSliceList"; + return args; + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing EndpointSliceList resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static EndpointSliceList Get(string name, Input id, CustomResourceOptions? options = null) + { + return new EndpointSliceList(name, id, options); + } + } +} +namespace Pulumi.Kubernetes.Types.Inputs.Discovery.V1 +{ + + public class EndpointSliceListArgs : Pulumi.ResourceArgs + { + /// + /// 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 + /// + [Input("apiVersion")] + public Input? ApiVersion { get; set; } + + [Input("items", required: true)] + private InputList? _items; + + /// + /// List of endpoint slices + /// + public InputList Items + { + get => _items ?? (_items = new InputList()); + set => _items = value; + } + + /// + /// 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 + /// + [Input("kind")] + public Input? Kind { get; set; } + + /// + /// Standard list metadata. + /// + [Input("metadata")] + public Input? Metadata { get; set; } + + public EndpointSliceListArgs() + { + } + } +} diff --git a/sdk/dotnet/Discovery/V1/Inputs/EndpointArgs.cs b/sdk/dotnet/Discovery/V1/Inputs/EndpointArgs.cs new file mode 100644 index 0000000000..448731d6d2 --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Inputs/EndpointArgs.cs @@ -0,0 +1,82 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Discovery.V1 +{ + + /// + /// Endpoint represents a single logical "backend" implementing a service. + /// + public class EndpointArgs : Pulumi.ResourceArgs + { + [Input("addresses", required: true)] + private InputList? _addresses; + + /// + /// addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + /// + public InputList Addresses + { + get => _addresses ?? (_addresses = new InputList()); + set => _addresses = value; + } + + /// + /// conditions contains information about the current status of the endpoint. + /// + [Input("conditions")] + public Input? Conditions { get; set; } + + [Input("deprecatedTopology")] + private InputMap? _deprecatedTopology; + + /// + /// deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. + /// + public InputMap DeprecatedTopology + { + get => _deprecatedTopology ?? (_deprecatedTopology = new InputMap()); + set => _deprecatedTopology = value; + } + + /// + /// hints contains information associated with how an endpoint should be consumed. + /// + [Input("hints")] + public Input? Hints { get; set; } + + /// + /// hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + /// + [Input("hostname")] + public Input? Hostname { get; set; } + + /// + /// nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + /// + [Input("nodeName")] + public Input? NodeName { get; set; } + + /// + /// targetRef is a reference to a Kubernetes object that represents this endpoint. + /// + [Input("targetRef")] + public Input? TargetRef { get; set; } + + /// + /// zone is the name of the Zone this endpoint exists in. + /// + [Input("zone")] + public Input? Zone { get; set; } + + public EndpointArgs() + { + } + } +} diff --git a/sdk/dotnet/Discovery/V1/Inputs/EndpointConditionsArgs.cs b/sdk/dotnet/Discovery/V1/Inputs/EndpointConditionsArgs.cs new file mode 100644 index 0000000000..534cf89323 --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Inputs/EndpointConditionsArgs.cs @@ -0,0 +1,40 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Discovery.V1 +{ + + /// + /// EndpointConditions represents the current condition of an endpoint. + /// + public class EndpointConditionsArgs : Pulumi.ResourceArgs + { + /// + /// ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + /// + [Input("ready")] + public Input? Ready { get; set; } + + /// + /// serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + /// + [Input("serving")] + public Input? Serving { get; set; } + + /// + /// terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + /// + [Input("terminating")] + public Input? Terminating { get; set; } + + public EndpointConditionsArgs() + { + } + } +} diff --git a/sdk/dotnet/Discovery/V1/Inputs/EndpointHintsArgs.cs b/sdk/dotnet/Discovery/V1/Inputs/EndpointHintsArgs.cs new file mode 100644 index 0000000000..e08d258666 --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Inputs/EndpointHintsArgs.cs @@ -0,0 +1,34 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Discovery.V1 +{ + + /// + /// EndpointHints provides hints describing how an endpoint should be consumed. + /// + public class EndpointHintsArgs : Pulumi.ResourceArgs + { + [Input("forZones")] + private InputList? _forZones; + + /// + /// forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + /// + public InputList ForZones + { + get => _forZones ?? (_forZones = new InputList()); + set => _forZones = value; + } + + public EndpointHintsArgs() + { + } + } +} diff --git a/sdk/dotnet/Discovery/V1/Inputs/EndpointPortArgs.cs b/sdk/dotnet/Discovery/V1/Inputs/EndpointPortArgs.cs new file mode 100644 index 0000000000..ddd6f0472e --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Inputs/EndpointPortArgs.cs @@ -0,0 +1,46 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Discovery.V1 +{ + + /// + /// EndpointPort represents a Port used by an EndpointSlice + /// + public class EndpointPortArgs : Pulumi.ResourceArgs + { + /// + /// The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + /// + [Input("appProtocol")] + public Input? AppProtocol { get; set; } + + /// + /// The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. + /// + [Input("port")] + public Input? Port { get; set; } + + /// + /// The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. + /// + [Input("protocol")] + public Input? Protocol { get; set; } + + public EndpointPortArgs() + { + } + } +} diff --git a/sdk/dotnet/Discovery/V1/Inputs/EndpointSliceArgs.cs b/sdk/dotnet/Discovery/V1/Inputs/EndpointSliceArgs.cs new file mode 100644 index 0000000000..e4b4e283d8 --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Inputs/EndpointSliceArgs.cs @@ -0,0 +1,12 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Discovery.V1 +{ +} diff --git a/sdk/dotnet/Discovery/V1/Inputs/ForZoneArgs.cs b/sdk/dotnet/Discovery/V1/Inputs/ForZoneArgs.cs new file mode 100644 index 0000000000..00318dd073 --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Inputs/ForZoneArgs.cs @@ -0,0 +1,28 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Discovery.V1 +{ + + /// + /// ForZone provides information about which zones should consume this endpoint. + /// + public class ForZoneArgs : Pulumi.ResourceArgs + { + /// + /// name represents the name of the zone. + /// + [Input("name", required: true)] + public Input Name { get; set; } = null!; + + public ForZoneArgs() + { + } + } +} diff --git a/sdk/dotnet/Discovery/V1/Outputs/Endpoint.cs b/sdk/dotnet/Discovery/V1/Outputs/Endpoint.cs new file mode 100644 index 0000000000..ae6689b0c2 --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Outputs/Endpoint.cs @@ -0,0 +1,77 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Discovery.V1 +{ + + [OutputType] + public sealed class Endpoint + { + /// + /// addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + /// + public readonly ImmutableArray Addresses; + /// + /// conditions contains information about the current status of the endpoint. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Discovery.V1.EndpointConditions Conditions; + /// + /// deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. + /// + public readonly ImmutableDictionary DeprecatedTopology; + /// + /// hints contains information associated with how an endpoint should be consumed. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Discovery.V1.EndpointHints Hints; + /// + /// hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + /// + public readonly string Hostname; + /// + /// nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + /// + public readonly string NodeName; + /// + /// targetRef is a reference to a Kubernetes object that represents this endpoint. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.ObjectReference TargetRef; + /// + /// zone is the name of the Zone this endpoint exists in. + /// + public readonly string Zone; + + [OutputConstructor] + private Endpoint( + ImmutableArray addresses, + + Pulumi.Kubernetes.Types.Outputs.Discovery.V1.EndpointConditions conditions, + + ImmutableDictionary deprecatedTopology, + + Pulumi.Kubernetes.Types.Outputs.Discovery.V1.EndpointHints hints, + + string hostname, + + string nodeName, + + Pulumi.Kubernetes.Types.Outputs.Core.V1.ObjectReference targetRef, + + string zone) + { + Addresses = addresses; + Conditions = conditions; + DeprecatedTopology = deprecatedTopology; + Hints = hints; + Hostname = hostname; + NodeName = nodeName; + TargetRef = targetRef; + Zone = zone; + } + } +} diff --git a/sdk/dotnet/Discovery/V1/Outputs/EndpointConditions.cs b/sdk/dotnet/Discovery/V1/Outputs/EndpointConditions.cs new file mode 100644 index 0000000000..2b42b37ec6 --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Outputs/EndpointConditions.cs @@ -0,0 +1,42 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Discovery.V1 +{ + + [OutputType] + public sealed class EndpointConditions + { + /// + /// ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + /// + public readonly bool Ready; + /// + /// serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + /// + public readonly bool Serving; + /// + /// terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + /// + public readonly bool Terminating; + + [OutputConstructor] + private EndpointConditions( + bool ready, + + bool serving, + + bool terminating) + { + Ready = ready; + Serving = serving; + Terminating = terminating; + } + } +} diff --git a/sdk/dotnet/Discovery/V1/Outputs/EndpointHints.cs b/sdk/dotnet/Discovery/V1/Outputs/EndpointHints.cs new file mode 100644 index 0000000000..23e6117354 --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Outputs/EndpointHints.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Discovery.V1 +{ + + [OutputType] + public sealed class EndpointHints + { + /// + /// forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + /// + public readonly ImmutableArray ForZones; + + [OutputConstructor] + private EndpointHints(ImmutableArray forZones) + { + ForZones = forZones; + } + } +} diff --git a/sdk/dotnet/Discovery/V1/Outputs/EndpointPort.cs b/sdk/dotnet/Discovery/V1/Outputs/EndpointPort.cs new file mode 100644 index 0000000000..59ac7e8121 --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Outputs/EndpointPort.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Discovery.V1 +{ + + [OutputType] + public sealed class EndpointPort + { + /// + /// The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + /// + public readonly string AppProtocol; + /// + /// The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. + /// + public readonly string Name; + /// + /// The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. + /// + public readonly int Port; + /// + /// The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. + /// + public readonly string Protocol; + + [OutputConstructor] + private EndpointPort( + string appProtocol, + + string name, + + int port, + + string protocol) + { + AppProtocol = appProtocol; + Name = name; + Port = port; + Protocol = protocol; + } + } +} diff --git a/sdk/dotnet/Discovery/V1/Outputs/EndpointSlice.cs b/sdk/dotnet/Discovery/V1/Outputs/EndpointSlice.cs new file mode 100644 index 0000000000..0e06f2376e --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Outputs/EndpointSlice.cs @@ -0,0 +1,63 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Discovery.V1 +{ + + [OutputType] + public sealed class EndpointSlice + { + /// + /// addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + /// + public readonly string AddressType; + /// + /// 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 + /// + public readonly string ApiVersion; + /// + /// endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + /// + public readonly ImmutableArray Endpoints; + /// + /// 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 + /// + public readonly string Kind; + /// + /// Standard object's metadata. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta Metadata; + /// + /// ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + /// + public readonly ImmutableArray Ports; + + [OutputConstructor] + private EndpointSlice( + string addressType, + + string apiVersion, + + ImmutableArray endpoints, + + string kind, + + Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta metadata, + + ImmutableArray ports) + { + AddressType = addressType; + ApiVersion = apiVersion; + Endpoints = endpoints; + Kind = kind; + Metadata = metadata; + Ports = ports; + } + } +} diff --git a/sdk/dotnet/Discovery/V1/Outputs/ForZone.cs b/sdk/dotnet/Discovery/V1/Outputs/ForZone.cs new file mode 100644 index 0000000000..cc74f0b4d7 --- /dev/null +++ b/sdk/dotnet/Discovery/V1/Outputs/ForZone.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Discovery.V1 +{ + + [OutputType] + public sealed class ForZone + { + /// + /// name represents the name of the zone. + /// + public readonly string Name; + + [OutputConstructor] + private ForZone(string name) + { + Name = name; + } + } +} diff --git a/sdk/dotnet/Discovery/V1Beta1/EndpointSlice.cs b/sdk/dotnet/Discovery/V1Beta1/EndpointSlice.cs index 5faf63c53b..7196794468 100755 --- a/sdk/dotnet/Discovery/V1Beta1/EndpointSlice.cs +++ b/sdk/dotnet/Discovery/V1Beta1/EndpointSlice.cs @@ -86,6 +86,10 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? var defaultOptions = new CustomResourceOptions { Version = Utilities.Version, + Aliases = + { + new Pulumi.Alias { Type = "kubernetes:discovery.k8s.io/v1:EndpointSlice"}, + }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/Discovery/V1Beta1/Inputs/EndpointArgs.cs b/sdk/dotnet/Discovery/V1Beta1/Inputs/EndpointArgs.cs index 84093514cc..a6810f8465 100644 --- a/sdk/dotnet/Discovery/V1Beta1/Inputs/EndpointArgs.cs +++ b/sdk/dotnet/Discovery/V1Beta1/Inputs/EndpointArgs.cs @@ -33,6 +33,12 @@ public InputList Addresses [Input("conditions")] public Input? Conditions { get; set; } + /// + /// hints contains information associated with how an endpoint should be consumed. + /// + [Input("hints")] + public Input? Hints { get; set; } + /// /// hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. /// diff --git a/sdk/dotnet/Discovery/V1Beta1/Inputs/EndpointHintsArgs.cs b/sdk/dotnet/Discovery/V1Beta1/Inputs/EndpointHintsArgs.cs new file mode 100644 index 0000000000..c95f487ccb --- /dev/null +++ b/sdk/dotnet/Discovery/V1Beta1/Inputs/EndpointHintsArgs.cs @@ -0,0 +1,34 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Discovery.V1Beta1 +{ + + /// + /// EndpointHints provides hints describing how an endpoint should be consumed. + /// + public class EndpointHintsArgs : Pulumi.ResourceArgs + { + [Input("forZones")] + private InputList? _forZones; + + /// + /// forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. + /// + public InputList ForZones + { + get => _forZones ?? (_forZones = new InputList()); + set => _forZones = value; + } + + public EndpointHintsArgs() + { + } + } +} diff --git a/sdk/dotnet/Discovery/V1Beta1/Inputs/ForZoneArgs.cs b/sdk/dotnet/Discovery/V1Beta1/Inputs/ForZoneArgs.cs new file mode 100644 index 0000000000..dba5f7e9aa --- /dev/null +++ b/sdk/dotnet/Discovery/V1Beta1/Inputs/ForZoneArgs.cs @@ -0,0 +1,28 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Discovery.V1Beta1 +{ + + /// + /// ForZone provides information about which zones should consume this endpoint. + /// + public class ForZoneArgs : Pulumi.ResourceArgs + { + /// + /// name represents the name of the zone. + /// + [Input("name", required: true)] + public Input Name { get; set; } = null!; + + public ForZoneArgs() + { + } + } +} diff --git a/sdk/dotnet/Discovery/V1Beta1/Outputs/Endpoint.cs b/sdk/dotnet/Discovery/V1Beta1/Outputs/Endpoint.cs index 4307972410..0144a0b175 100644 --- a/sdk/dotnet/Discovery/V1Beta1/Outputs/Endpoint.cs +++ b/sdk/dotnet/Discovery/V1Beta1/Outputs/Endpoint.cs @@ -22,6 +22,10 @@ public sealed class Endpoint /// public readonly Pulumi.Kubernetes.Types.Outputs.Discovery.V1Beta1.EndpointConditions Conditions; /// + /// hints contains information associated with how an endpoint should be consumed. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Discovery.V1Beta1.EndpointHints Hints; + /// /// hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. /// public readonly string Hostname; @@ -51,6 +55,8 @@ public sealed class Endpoint Pulumi.Kubernetes.Types.Outputs.Discovery.V1Beta1.EndpointConditions conditions, + Pulumi.Kubernetes.Types.Outputs.Discovery.V1Beta1.EndpointHints hints, + string hostname, string nodeName, @@ -61,6 +67,7 @@ public sealed class Endpoint { Addresses = addresses; Conditions = conditions; + Hints = hints; Hostname = hostname; NodeName = nodeName; TargetRef = targetRef; diff --git a/sdk/dotnet/Discovery/V1Beta1/Outputs/EndpointHints.cs b/sdk/dotnet/Discovery/V1Beta1/Outputs/EndpointHints.cs new file mode 100644 index 0000000000..a29d691ba7 --- /dev/null +++ b/sdk/dotnet/Discovery/V1Beta1/Outputs/EndpointHints.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Discovery.V1Beta1 +{ + + [OutputType] + public sealed class EndpointHints + { + /// + /// forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. + /// + public readonly ImmutableArray ForZones; + + [OutputConstructor] + private EndpointHints(ImmutableArray forZones) + { + ForZones = forZones; + } + } +} diff --git a/sdk/dotnet/Discovery/V1Beta1/Outputs/ForZone.cs b/sdk/dotnet/Discovery/V1Beta1/Outputs/ForZone.cs new file mode 100644 index 0000000000..dd6ac12400 --- /dev/null +++ b/sdk/dotnet/Discovery/V1Beta1/Outputs/ForZone.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Discovery.V1Beta1 +{ + + [OutputType] + public sealed class ForZone + { + /// + /// name represents the name of the zone. + /// + public readonly string Name; + + [OutputConstructor] + private ForZone(string name) + { + Name = name; + } + } +} diff --git a/sdk/dotnet/Events/V1/Event.cs b/sdk/dotnet/Events/V1/Event.cs index a73f556030..f86e72af1c 100644 --- a/sdk/dotnet/Events/V1/Event.cs +++ b/sdk/dotnet/Events/V1/Event.cs @@ -63,6 +63,9 @@ public partial class Event : KubernetesResource [Output("kind")] public Output Kind { get; private set; } = null!; + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// [Output("metadata")] public Output Metadata { get; private set; } = null!; @@ -227,8 +230,11 @@ public class EventArgs : Pulumi.ResourceArgs [Input("kind")] public Input? Kind { get; set; } - [Input("metadata", required: true)] - public Input Metadata { get; set; } = null!; + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Input("metadata")] + public Input? Metadata { get; set; } /// /// note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. diff --git a/sdk/dotnet/Events/V1/Outputs/Event.cs b/sdk/dotnet/Events/V1/Outputs/Event.cs index ffe545ff87..126b07952e 100644 --- a/sdk/dotnet/Events/V1/Outputs/Event.cs +++ b/sdk/dotnet/Events/V1/Outputs/Event.cs @@ -45,6 +45,9 @@ public sealed class Event /// 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 /// public readonly string Kind; + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta Metadata; /// /// note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. diff --git a/sdk/dotnet/Events/V1Beta1/Event.cs b/sdk/dotnet/Events/V1Beta1/Event.cs index d19830210f..cd43cde505 100755 --- a/sdk/dotnet/Events/V1Beta1/Event.cs +++ b/sdk/dotnet/Events/V1Beta1/Event.cs @@ -63,6 +63,9 @@ public partial class Event : KubernetesResource [Output("kind")] public Output Kind { get; private set; } = null!; + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// [Output("metadata")] public Output Metadata { get; private set; } = null!; @@ -227,8 +230,11 @@ public class EventArgs : Pulumi.ResourceArgs [Input("kind")] public Input? Kind { get; set; } - [Input("metadata", required: true)] - public Input Metadata { get; set; } = null!; + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Input("metadata")] + public Input? Metadata { get; set; } /// /// note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. diff --git a/sdk/dotnet/Events/V1Beta1/Outputs/Event.cs b/sdk/dotnet/Events/V1Beta1/Outputs/Event.cs index 6b6acae4d5..75593fbbf0 100644 --- a/sdk/dotnet/Events/V1Beta1/Outputs/Event.cs +++ b/sdk/dotnet/Events/V1Beta1/Outputs/Event.cs @@ -45,6 +45,9 @@ public sealed class Event /// 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 /// public readonly string Kind; + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta Metadata; /// /// note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. diff --git a/sdk/dotnet/FlowControl/V1Alpha1/Inputs/FlowSchemaSpecArgs.cs b/sdk/dotnet/FlowControl/V1Alpha1/Inputs/FlowSchemaSpecArgs.cs index 2aba36e39c..05fa9186a6 100644 --- a/sdk/dotnet/FlowControl/V1Alpha1/Inputs/FlowSchemaSpecArgs.cs +++ b/sdk/dotnet/FlowControl/V1Alpha1/Inputs/FlowSchemaSpecArgs.cs @@ -22,7 +22,7 @@ public class FlowSchemaSpecArgs : Pulumi.ResourceArgs public Input? DistinguisherMethod { get; set; } /// - /// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. + /// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. /// [Input("matchingPrecedence")] public Input? MatchingPrecedence { get; set; } diff --git a/sdk/dotnet/FlowControl/V1Alpha1/Outputs/FlowSchemaSpec.cs b/sdk/dotnet/FlowControl/V1Alpha1/Outputs/FlowSchemaSpec.cs index 3be4a4bec3..07815a26f1 100644 --- a/sdk/dotnet/FlowControl/V1Alpha1/Outputs/FlowSchemaSpec.cs +++ b/sdk/dotnet/FlowControl/V1Alpha1/Outputs/FlowSchemaSpec.cs @@ -18,7 +18,7 @@ public sealed class FlowSchemaSpec /// public readonly Pulumi.Kubernetes.Types.Outputs.FlowControl.V1Alpha1.FlowDistinguisherMethod DistinguisherMethod; /// - /// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. + /// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. /// public readonly int MatchingPrecedence; /// diff --git a/sdk/dotnet/Networking/V1/Inputs/IngressClassParametersReferenceArgs.cs b/sdk/dotnet/Networking/V1/Inputs/IngressClassParametersReferenceArgs.cs new file mode 100644 index 0000000000..15439c26a6 --- /dev/null +++ b/sdk/dotnet/Networking/V1/Inputs/IngressClassParametersReferenceArgs.cs @@ -0,0 +1,52 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Networking.V1 +{ + + /// + /// IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + /// + public class IngressClassParametersReferenceArgs : Pulumi.ResourceArgs + { + /// + /// APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + /// + [Input("apiGroup")] + public Input? ApiGroup { get; set; } + + /// + /// Kind is the type of resource being referenced. + /// + [Input("kind", required: true)] + public Input Kind { get; set; } = null!; + + /// + /// Name is the name of resource being referenced. + /// + [Input("name", required: true)] + public Input Name { get; set; } = null!; + + /// + /// Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + /// + [Input("namespace")] + public Input? Namespace { get; set; } + + /// + /// Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + /// + [Input("scope")] + public Input? Scope { get; set; } + + public IngressClassParametersReferenceArgs() + { + } + } +} diff --git a/sdk/dotnet/Networking/V1/Inputs/IngressClassSpecArgs.cs b/sdk/dotnet/Networking/V1/Inputs/IngressClassSpecArgs.cs index e88378f84f..54383184f5 100644 --- a/sdk/dotnet/Networking/V1/Inputs/IngressClassSpecArgs.cs +++ b/sdk/dotnet/Networking/V1/Inputs/IngressClassSpecArgs.cs @@ -25,7 +25,7 @@ public class IngressClassSpecArgs : Pulumi.ResourceArgs /// Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. /// [Input("parameters")] - public Input? Parameters { get; set; } + public Input? Parameters { get; set; } public IngressClassSpecArgs() { diff --git a/sdk/dotnet/Networking/V1/Inputs/NetworkPolicyPortArgs.cs b/sdk/dotnet/Networking/V1/Inputs/NetworkPolicyPortArgs.cs index 0d44b613e1..1f58b9020d 100644 --- a/sdk/dotnet/Networking/V1/Inputs/NetworkPolicyPortArgs.cs +++ b/sdk/dotnet/Networking/V1/Inputs/NetworkPolicyPortArgs.cs @@ -16,7 +16,13 @@ namespace Pulumi.Kubernetes.Types.Inputs.Networking.V1 public class NetworkPolicyPortArgs : Pulumi.ResourceArgs { /// - /// The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + /// If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate "NetworkPolicyEndPort". + /// + [Input("endPort")] + public Input? EndPort { get; set; } + + /// + /// The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. /// [Input("port")] public InputUnion? Port { get; set; } diff --git a/sdk/dotnet/Networking/V1/Inputs/NetworkPolicySpecArgs.cs b/sdk/dotnet/Networking/V1/Inputs/NetworkPolicySpecArgs.cs index 95d835d10a..5fdfbebeea 100644 --- a/sdk/dotnet/Networking/V1/Inputs/NetworkPolicySpecArgs.cs +++ b/sdk/dotnet/Networking/V1/Inputs/NetworkPolicySpecArgs.cs @@ -49,7 +49,7 @@ public InputList? _policyTypes; /// - /// List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + /// List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 /// public InputList PolicyTypes { diff --git a/sdk/dotnet/Networking/V1/Outputs/IngressClassParametersReference.cs b/sdk/dotnet/Networking/V1/Outputs/IngressClassParametersReference.cs new file mode 100644 index 0000000000..439603bc88 --- /dev/null +++ b/sdk/dotnet/Networking/V1/Outputs/IngressClassParametersReference.cs @@ -0,0 +1,56 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Networking.V1 +{ + + [OutputType] + public sealed class IngressClassParametersReference + { + /// + /// APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + /// + public readonly string ApiGroup; + /// + /// Kind is the type of resource being referenced. + /// + public readonly string Kind; + /// + /// Name is the name of resource being referenced. + /// + public readonly string Name; + /// + /// Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + /// + public readonly string Namespace; + /// + /// Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + /// + public readonly string Scope; + + [OutputConstructor] + private IngressClassParametersReference( + string apiGroup, + + string kind, + + string name, + + string @namespace, + + string scope) + { + ApiGroup = apiGroup; + Kind = kind; + Name = name; + Namespace = @namespace; + Scope = scope; + } + } +} diff --git a/sdk/dotnet/Networking/V1/Outputs/IngressClassSpec.cs b/sdk/dotnet/Networking/V1/Outputs/IngressClassSpec.cs index 29bfa6baa7..fb32354558 100644 --- a/sdk/dotnet/Networking/V1/Outputs/IngressClassSpec.cs +++ b/sdk/dotnet/Networking/V1/Outputs/IngressClassSpec.cs @@ -20,13 +20,13 @@ public sealed class IngressClassSpec /// /// Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. /// - public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.TypedLocalObjectReference Parameters; + public readonly Pulumi.Kubernetes.Types.Outputs.Networking.V1.IngressClassParametersReference Parameters; [OutputConstructor] private IngressClassSpec( string controller, - Pulumi.Kubernetes.Types.Outputs.Core.V1.TypedLocalObjectReference parameters) + Pulumi.Kubernetes.Types.Outputs.Networking.V1.IngressClassParametersReference parameters) { Controller = controller; Parameters = parameters; diff --git a/sdk/dotnet/Networking/V1/Outputs/NetworkPolicyPort.cs b/sdk/dotnet/Networking/V1/Outputs/NetworkPolicyPort.cs index 0f9b223179..977001870b 100644 --- a/sdk/dotnet/Networking/V1/Outputs/NetworkPolicyPort.cs +++ b/sdk/dotnet/Networking/V1/Outputs/NetworkPolicyPort.cs @@ -14,7 +14,11 @@ namespace Pulumi.Kubernetes.Types.Outputs.Networking.V1 public sealed class NetworkPolicyPort { /// - /// The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + /// If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate "NetworkPolicyEndPort". + /// + public readonly int EndPort; + /// + /// The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. /// public readonly Union Port; /// @@ -24,10 +28,13 @@ public sealed class NetworkPolicyPort [OutputConstructor] private NetworkPolicyPort( + int endPort, + Union port, string protocol) { + EndPort = endPort; Port = port; Protocol = protocol; } diff --git a/sdk/dotnet/Networking/V1/Outputs/NetworkPolicySpec.cs b/sdk/dotnet/Networking/V1/Outputs/NetworkPolicySpec.cs index 125e4264c9..e3bd498194 100644 --- a/sdk/dotnet/Networking/V1/Outputs/NetworkPolicySpec.cs +++ b/sdk/dotnet/Networking/V1/Outputs/NetworkPolicySpec.cs @@ -26,7 +26,7 @@ public sealed class NetworkPolicySpec /// public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector PodSelector; /// - /// List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + /// List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 /// public readonly ImmutableArray PolicyTypes; diff --git a/sdk/dotnet/Networking/V1Beta1/Inputs/IngressClassParametersReferenceArgs.cs b/sdk/dotnet/Networking/V1Beta1/Inputs/IngressClassParametersReferenceArgs.cs new file mode 100644 index 0000000000..4b11f8e48b --- /dev/null +++ b/sdk/dotnet/Networking/V1Beta1/Inputs/IngressClassParametersReferenceArgs.cs @@ -0,0 +1,52 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Networking.V1Beta1 +{ + + /// + /// IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + /// + public class IngressClassParametersReferenceArgs : Pulumi.ResourceArgs + { + /// + /// APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + /// + [Input("apiGroup")] + public Input? ApiGroup { get; set; } + + /// + /// Kind is the type of resource being referenced. + /// + [Input("kind", required: true)] + public Input Kind { get; set; } = null!; + + /// + /// Name is the name of resource being referenced. + /// + [Input("name", required: true)] + public Input Name { get; set; } = null!; + + /// + /// Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + /// + [Input("namespace")] + public Input? Namespace { get; set; } + + /// + /// Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + /// + [Input("scope")] + public Input? Scope { get; set; } + + public IngressClassParametersReferenceArgs() + { + } + } +} diff --git a/sdk/dotnet/Networking/V1Beta1/Inputs/IngressClassSpecArgs.cs b/sdk/dotnet/Networking/V1Beta1/Inputs/IngressClassSpecArgs.cs index 41e06d6f33..d52da2ff0b 100644 --- a/sdk/dotnet/Networking/V1Beta1/Inputs/IngressClassSpecArgs.cs +++ b/sdk/dotnet/Networking/V1Beta1/Inputs/IngressClassSpecArgs.cs @@ -25,7 +25,7 @@ public class IngressClassSpecArgs : Pulumi.ResourceArgs /// Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. /// [Input("parameters")] - public Input? Parameters { get; set; } + public Input? Parameters { get; set; } public IngressClassSpecArgs() { diff --git a/sdk/dotnet/Networking/V1Beta1/Outputs/IngressClassParametersReference.cs b/sdk/dotnet/Networking/V1Beta1/Outputs/IngressClassParametersReference.cs new file mode 100644 index 0000000000..f929da4241 --- /dev/null +++ b/sdk/dotnet/Networking/V1Beta1/Outputs/IngressClassParametersReference.cs @@ -0,0 +1,56 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Networking.V1Beta1 +{ + + [OutputType] + public sealed class IngressClassParametersReference + { + /// + /// APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + /// + public readonly string ApiGroup; + /// + /// Kind is the type of resource being referenced. + /// + public readonly string Kind; + /// + /// Name is the name of resource being referenced. + /// + public readonly string Name; + /// + /// Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + /// + public readonly string Namespace; + /// + /// Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + /// + public readonly string Scope; + + [OutputConstructor] + private IngressClassParametersReference( + string apiGroup, + + string kind, + + string name, + + string @namespace, + + string scope) + { + ApiGroup = apiGroup; + Kind = kind; + Name = name; + Namespace = @namespace; + Scope = scope; + } + } +} diff --git a/sdk/dotnet/Networking/V1Beta1/Outputs/IngressClassSpec.cs b/sdk/dotnet/Networking/V1Beta1/Outputs/IngressClassSpec.cs index 7f4a3bcdec..f814beef25 100644 --- a/sdk/dotnet/Networking/V1Beta1/Outputs/IngressClassSpec.cs +++ b/sdk/dotnet/Networking/V1Beta1/Outputs/IngressClassSpec.cs @@ -20,13 +20,13 @@ public sealed class IngressClassSpec /// /// Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. /// - public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.TypedLocalObjectReference Parameters; + public readonly Pulumi.Kubernetes.Types.Outputs.Networking.V1Beta1.IngressClassParametersReference Parameters; [OutputConstructor] private IngressClassSpec( string controller, - Pulumi.Kubernetes.Types.Outputs.Core.V1.TypedLocalObjectReference parameters) + Pulumi.Kubernetes.Types.Outputs.Networking.V1Beta1.IngressClassParametersReference parameters) { Controller = controller; Parameters = parameters; diff --git a/sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetArgs.cs b/sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetArgs.cs new file mode 100644 index 0000000000..8bcd6517ad --- /dev/null +++ b/sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetArgs.cs @@ -0,0 +1,12 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Policy.V1 +{ +} diff --git a/sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetSpecArgs.cs b/sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetSpecArgs.cs new file mode 100644 index 0000000000..9156fa43f7 --- /dev/null +++ b/sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetSpecArgs.cs @@ -0,0 +1,40 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Policy.V1 +{ + + /// + /// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. + /// + public class PodDisruptionBudgetSpecArgs : Pulumi.ResourceArgs + { + /// + /// An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + /// + [Input("maxUnavailable")] + public InputUnion? MaxUnavailable { get; set; } + + /// + /// An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + /// + [Input("minAvailable")] + public InputUnion? MinAvailable { get; set; } + + /// + /// Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. + /// + [Input("selector")] + public Input? Selector { get; set; } + + public PodDisruptionBudgetSpecArgs() + { + } + } +} diff --git a/sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetStatusArgs.cs b/sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetStatusArgs.cs new file mode 100644 index 0000000000..976a90e81a --- /dev/null +++ b/sdk/dotnet/Policy/V1/Inputs/PodDisruptionBudgetStatusArgs.cs @@ -0,0 +1,84 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Policy.V1 +{ + + /// + /// PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. + /// + public class PodDisruptionBudgetStatusArgs : Pulumi.ResourceArgs + { + [Input("conditions")] + private InputList? _conditions; + + /// + /// Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + /// the number of allowed disruptions. Therefore no disruptions are + /// allowed and the status of the condition will be False. + /// - InsufficientPods: The number of pods are either at or below the number + /// required by the PodDisruptionBudget. No disruptions are + /// allowed and the status of the condition will be False. + /// - SufficientPods: There are more pods than required by the PodDisruptionBudget. + /// The condition will be True, and the number of allowed + /// disruptions are provided by the disruptionsAllowed property. + /// + public InputList Conditions + { + get => _conditions ?? (_conditions = new InputList()); + set => _conditions = value; + } + + /// + /// current number of healthy pods + /// + [Input("currentHealthy", required: true)] + public Input CurrentHealthy { get; set; } = null!; + + /// + /// minimum desired number of healthy pods + /// + [Input("desiredHealthy", required: true)] + public Input DesiredHealthy { get; set; } = null!; + + [Input("disruptedPods")] + private InputMap? _disruptedPods; + + /// + /// DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. + /// + public InputMap DisruptedPods + { + get => _disruptedPods ?? (_disruptedPods = new InputMap()); + set => _disruptedPods = value; + } + + /// + /// Number of pod disruptions that are currently allowed. + /// + [Input("disruptionsAllowed", required: true)] + public Input DisruptionsAllowed { get; set; } = null!; + + /// + /// total number of pods counted by this disruption budget + /// + [Input("expectedPods", required: true)] + public Input ExpectedPods { get; set; } = null!; + + /// + /// Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. + /// + [Input("observedGeneration")] + public Input? ObservedGeneration { get; set; } + + public PodDisruptionBudgetStatusArgs() + { + } + } +} diff --git a/sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudget.cs b/sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudget.cs new file mode 100644 index 0000000000..9751a36acd --- /dev/null +++ b/sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudget.cs @@ -0,0 +1,56 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Policy.V1 +{ + + [OutputType] + public sealed class PodDisruptionBudget + { + /// + /// 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 + /// + public readonly string ApiVersion; + /// + /// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + /// + public readonly string Kind; + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta Metadata; + /// + /// Specification of the desired behavior of the PodDisruptionBudget. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Policy.V1.PodDisruptionBudgetSpec Spec; + /// + /// Most recently observed status of the PodDisruptionBudget. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Policy.V1.PodDisruptionBudgetStatus Status; + + [OutputConstructor] + private PodDisruptionBudget( + string apiVersion, + + string kind, + + Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta metadata, + + Pulumi.Kubernetes.Types.Outputs.Policy.V1.PodDisruptionBudgetSpec spec, + + Pulumi.Kubernetes.Types.Outputs.Policy.V1.PodDisruptionBudgetStatus status) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + } + } +} diff --git a/sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudgetSpec.cs b/sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudgetSpec.cs new file mode 100644 index 0000000000..9ab726b69a --- /dev/null +++ b/sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudgetSpec.cs @@ -0,0 +1,42 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Policy.V1 +{ + + [OutputType] + public sealed class PodDisruptionBudgetSpec + { + /// + /// An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + /// + public readonly Union MaxUnavailable; + /// + /// An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + /// + public readonly Union MinAvailable; + /// + /// Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector Selector; + + [OutputConstructor] + private PodDisruptionBudgetSpec( + Union maxUnavailable, + + Union minAvailable, + + Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector selector) + { + MaxUnavailable = maxUnavailable; + MinAvailable = minAvailable; + Selector = selector; + } + } +} diff --git a/sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudgetStatus.cs b/sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudgetStatus.cs new file mode 100644 index 0000000000..d4faa11f23 --- /dev/null +++ b/sdk/dotnet/Policy/V1/Outputs/PodDisruptionBudgetStatus.cs @@ -0,0 +1,78 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Policy.V1 +{ + + [OutputType] + public sealed class PodDisruptionBudgetStatus + { + /// + /// Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + /// the number of allowed disruptions. Therefore no disruptions are + /// allowed and the status of the condition will be False. + /// - InsufficientPods: The number of pods are either at or below the number + /// required by the PodDisruptionBudget. No disruptions are + /// allowed and the status of the condition will be False. + /// - SufficientPods: There are more pods than required by the PodDisruptionBudget. + /// The condition will be True, and the number of allowed + /// disruptions are provided by the disruptionsAllowed property. + /// + public readonly ImmutableArray Conditions; + /// + /// current number of healthy pods + /// + public readonly int CurrentHealthy; + /// + /// minimum desired number of healthy pods + /// + public readonly int DesiredHealthy; + /// + /// DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. + /// + public readonly ImmutableDictionary DisruptedPods; + /// + /// Number of pod disruptions that are currently allowed. + /// + public readonly int DisruptionsAllowed; + /// + /// total number of pods counted by this disruption budget + /// + public readonly int ExpectedPods; + /// + /// Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. + /// + public readonly int ObservedGeneration; + + [OutputConstructor] + private PodDisruptionBudgetStatus( + ImmutableArray conditions, + + int currentHealthy, + + int desiredHealthy, + + ImmutableDictionary disruptedPods, + + int disruptionsAllowed, + + int expectedPods, + + int observedGeneration) + { + Conditions = conditions; + CurrentHealthy = currentHealthy; + DesiredHealthy = desiredHealthy; + DisruptedPods = disruptedPods; + DisruptionsAllowed = disruptionsAllowed; + ExpectedPods = expectedPods; + ObservedGeneration = observedGeneration; + } + } +} diff --git a/sdk/dotnet/Policy/V1/PodDisruptionBudget.cs b/sdk/dotnet/Policy/V1/PodDisruptionBudget.cs new file mode 100644 index 0000000000..81dc5d44d3 --- /dev/null +++ b/sdk/dotnet/Policy/V1/PodDisruptionBudget.cs @@ -0,0 +1,140 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Policy.V1 +{ + /// + /// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods + /// + [KubernetesResourceType("kubernetes:policy/v1:PodDisruptionBudget")] + public partial class PodDisruptionBudget : KubernetesResource + { + /// + /// 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 + /// + [Output("apiVersion")] + public Output ApiVersion { get; private set; } = null!; + + /// + /// 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 + /// + [Output("kind")] + public Output Kind { get; private set; } = null!; + + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Output("metadata")] + public Output Metadata { get; private set; } = null!; + + /// + /// Specification of the desired behavior of the PodDisruptionBudget. + /// + [Output("spec")] + public Output Spec { get; private set; } = null!; + + /// + /// Most recently observed status of the PodDisruptionBudget. + /// + [Output("status")] + public Output Status { get; private set; } = null!; + + + /// + /// Create a PodDisruptionBudget resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public PodDisruptionBudget(string name, Pulumi.Kubernetes.Types.Inputs.Policy.V1.PodDisruptionBudgetArgs? args = null, CustomResourceOptions? options = null) + : base("kubernetes:policy/v1:PodDisruptionBudget", name, MakeArgs(args), MakeResourceOptions(options, "")) + { + } + internal PodDisruptionBudget(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:policy/v1:PodDisruptionBudget", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, "")) + { + } + + private PodDisruptionBudget(string name, Input id, CustomResourceOptions? options = null) + : base("kubernetes:policy/v1:PodDisruptionBudget", name, null, MakeResourceOptions(options, id)) + { + } + + private static Pulumi.Kubernetes.Types.Inputs.Policy.V1.PodDisruptionBudgetArgs? MakeArgs(Pulumi.Kubernetes.Types.Inputs.Policy.V1.PodDisruptionBudgetArgs? args) + { + args ??= new Pulumi.Kubernetes.Types.Inputs.Policy.V1.PodDisruptionBudgetArgs(); + args.ApiVersion = "policy/v1"; + args.Kind = "PodDisruptionBudget"; + return args; + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + Aliases = + { + new Pulumi.Alias { Type = "kubernetes:policy/v1beta1:PodDisruptionBudget"}, + }, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing PodDisruptionBudget resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static PodDisruptionBudget Get(string name, Input id, CustomResourceOptions? options = null) + { + return new PodDisruptionBudget(name, id, options); + } + } +} +namespace Pulumi.Kubernetes.Types.Inputs.Policy.V1 +{ + + public class PodDisruptionBudgetArgs : Pulumi.ResourceArgs + { + /// + /// 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 + /// + [Input("apiVersion")] + public Input? ApiVersion { get; set; } + + /// + /// 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 + /// + [Input("kind")] + public Input? Kind { get; set; } + + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Input("metadata")] + public Input? Metadata { get; set; } + + /// + /// Specification of the desired behavior of the PodDisruptionBudget. + /// + [Input("spec")] + public Input? Spec { get; set; } + + public PodDisruptionBudgetArgs() + { + } + } +} diff --git a/sdk/dotnet/Policy/V1/PodDisruptionBudgetList.cs b/sdk/dotnet/Policy/V1/PodDisruptionBudgetList.cs new file mode 100644 index 0000000000..e4d28ce590 --- /dev/null +++ b/sdk/dotnet/Policy/V1/PodDisruptionBudgetList.cs @@ -0,0 +1,136 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Policy.V1 +{ + /// + /// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. + /// + [KubernetesResourceType("kubernetes:policy/v1:PodDisruptionBudgetList")] + public partial class PodDisruptionBudgetList : KubernetesResource + { + /// + /// 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 + /// + [Output("apiVersion")] + public Output ApiVersion { get; private set; } = null!; + + /// + /// Items is a list of PodDisruptionBudgets + /// + [Output("items")] + public Output> Items { get; private set; } = null!; + + /// + /// 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 + /// + [Output("kind")] + public Output Kind { get; private set; } = null!; + + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Output("metadata")] + public Output Metadata { get; private set; } = null!; + + + /// + /// Create a PodDisruptionBudgetList resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public PodDisruptionBudgetList(string name, Pulumi.Kubernetes.Types.Inputs.Policy.V1.PodDisruptionBudgetListArgs? args = null, CustomResourceOptions? options = null) + : base("kubernetes:policy/v1:PodDisruptionBudgetList", name, MakeArgs(args), MakeResourceOptions(options, "")) + { + } + internal PodDisruptionBudgetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:policy/v1:PodDisruptionBudgetList", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, "")) + { + } + + private PodDisruptionBudgetList(string name, Input id, CustomResourceOptions? options = null) + : base("kubernetes:policy/v1:PodDisruptionBudgetList", name, null, MakeResourceOptions(options, id)) + { + } + + private static Pulumi.Kubernetes.Types.Inputs.Policy.V1.PodDisruptionBudgetListArgs? MakeArgs(Pulumi.Kubernetes.Types.Inputs.Policy.V1.PodDisruptionBudgetListArgs? args) + { + args ??= new Pulumi.Kubernetes.Types.Inputs.Policy.V1.PodDisruptionBudgetListArgs(); + args.ApiVersion = "policy/v1"; + args.Kind = "PodDisruptionBudgetList"; + return args; + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing PodDisruptionBudgetList resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static PodDisruptionBudgetList Get(string name, Input id, CustomResourceOptions? options = null) + { + return new PodDisruptionBudgetList(name, id, options); + } + } +} +namespace Pulumi.Kubernetes.Types.Inputs.Policy.V1 +{ + + public class PodDisruptionBudgetListArgs : Pulumi.ResourceArgs + { + /// + /// 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 + /// + [Input("apiVersion")] + public Input? ApiVersion { get; set; } + + [Input("items", required: true)] + private InputList? _items; + + /// + /// Items is a list of PodDisruptionBudgets + /// + public InputList Items + { + get => _items ?? (_items = new InputList()); + set => _items = value; + } + + /// + /// 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 + /// + [Input("kind")] + public Input? Kind { get; set; } + + /// + /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Input("metadata")] + public Input? Metadata { get; set; } + + public PodDisruptionBudgetListArgs() + { + } + } +} diff --git a/sdk/dotnet/Policy/V1Beta1/Inputs/PodDisruptionBudgetSpecArgs.cs b/sdk/dotnet/Policy/V1Beta1/Inputs/PodDisruptionBudgetSpecArgs.cs index 4395649d4c..8c22becc2c 100644 --- a/sdk/dotnet/Policy/V1Beta1/Inputs/PodDisruptionBudgetSpecArgs.cs +++ b/sdk/dotnet/Policy/V1Beta1/Inputs/PodDisruptionBudgetSpecArgs.cs @@ -28,7 +28,7 @@ public class PodDisruptionBudgetSpecArgs : Pulumi.ResourceArgs public InputUnion? MinAvailable { get; set; } /// - /// Label query over pods whose evictions are managed by the disruption budget. + /// Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. /// [Input("selector")] public Input? Selector { get; set; } diff --git a/sdk/dotnet/Policy/V1Beta1/Inputs/PodDisruptionBudgetStatusArgs.cs b/sdk/dotnet/Policy/V1Beta1/Inputs/PodDisruptionBudgetStatusArgs.cs index aafcc9eca4..3b3b8defb6 100644 --- a/sdk/dotnet/Policy/V1Beta1/Inputs/PodDisruptionBudgetStatusArgs.cs +++ b/sdk/dotnet/Policy/V1Beta1/Inputs/PodDisruptionBudgetStatusArgs.cs @@ -15,6 +15,26 @@ namespace Pulumi.Kubernetes.Types.Inputs.Policy.V1Beta1 /// public class PodDisruptionBudgetStatusArgs : Pulumi.ResourceArgs { + [Input("conditions")] + private InputList? _conditions; + + /// + /// Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + /// the number of allowed disruptions. Therefore no disruptions are + /// allowed and the status of the condition will be False. + /// - InsufficientPods: The number of pods are either at or below the number + /// required by the PodDisruptionBudget. No disruptions are + /// allowed and the status of the condition will be False. + /// - SufficientPods: There are more pods than required by the PodDisruptionBudget. + /// The condition will be True, and the number of allowed + /// disruptions are provided by the disruptionsAllowed property. + /// + public InputList Conditions + { + get => _conditions ?? (_conditions = new InputList()); + set => _conditions = value; + } + /// /// current number of healthy pods /// diff --git a/sdk/dotnet/Policy/V1Beta1/Outputs/PodDisruptionBudgetSpec.cs b/sdk/dotnet/Policy/V1Beta1/Outputs/PodDisruptionBudgetSpec.cs index 8bfd2527b5..3953033103 100644 --- a/sdk/dotnet/Policy/V1Beta1/Outputs/PodDisruptionBudgetSpec.cs +++ b/sdk/dotnet/Policy/V1Beta1/Outputs/PodDisruptionBudgetSpec.cs @@ -22,7 +22,7 @@ public sealed class PodDisruptionBudgetSpec /// public readonly Union MinAvailable; /// - /// Label query over pods whose evictions are managed by the disruption budget. + /// Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. /// public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector Selector; diff --git a/sdk/dotnet/Policy/V1Beta1/Outputs/PodDisruptionBudgetStatus.cs b/sdk/dotnet/Policy/V1Beta1/Outputs/PodDisruptionBudgetStatus.cs index 6351ce00dc..d9cf6bac8c 100644 --- a/sdk/dotnet/Policy/V1Beta1/Outputs/PodDisruptionBudgetStatus.cs +++ b/sdk/dotnet/Policy/V1Beta1/Outputs/PodDisruptionBudgetStatus.cs @@ -13,6 +13,18 @@ namespace Pulumi.Kubernetes.Types.Outputs.Policy.V1Beta1 [OutputType] public sealed class PodDisruptionBudgetStatus { + /// + /// Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + /// the number of allowed disruptions. Therefore no disruptions are + /// allowed and the status of the condition will be False. + /// - InsufficientPods: The number of pods are either at or below the number + /// required by the PodDisruptionBudget. No disruptions are + /// allowed and the status of the condition will be False. + /// - SufficientPods: There are more pods than required by the PodDisruptionBudget. + /// The condition will be True, and the number of allowed + /// disruptions are provided by the disruptionsAllowed property. + /// + public readonly ImmutableArray Conditions; /// /// current number of healthy pods /// @@ -40,6 +52,8 @@ public sealed class PodDisruptionBudgetStatus [OutputConstructor] private PodDisruptionBudgetStatus( + ImmutableArray conditions, + int currentHealthy, int desiredHealthy, @@ -52,6 +66,7 @@ public sealed class PodDisruptionBudgetStatus int observedGeneration) { + Conditions = conditions; CurrentHealthy = currentHealthy; DesiredHealthy = desiredHealthy; DisruptedPods = disruptedPods; diff --git a/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudget.cs b/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudget.cs index 187ff53540..f1a82d7cb4 100755 --- a/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudget.cs +++ b/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudget.cs @@ -77,6 +77,10 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? var defaultOptions = new CustomResourceOptions { Version = Utilities.Version, + Aliases = + { + new Pulumi.Alias { Type = "kubernetes:policy/v1:PodDisruptionBudget"}, + }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicy.cs b/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicy.cs index 07c5d260cd..c3bde19382 100755 --- a/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicy.cs +++ b/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicy.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Policy.V1Beta1 { /// - /// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. + /// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. /// [KubernetesResourceType("kubernetes:policy/v1beta1:PodSecurityPolicy")] public partial class PodSecurityPolicy : KubernetesResource diff --git a/sdk/dotnet/Storage/V1/Inputs/CSIDriverSpecArgs.cs b/sdk/dotnet/Storage/V1/Inputs/CSIDriverSpecArgs.cs index ae43bf9401..bf1910ae83 100644 --- a/sdk/dotnet/Storage/V1/Inputs/CSIDriverSpecArgs.cs +++ b/sdk/dotnet/Storage/V1/Inputs/CSIDriverSpecArgs.cs @@ -17,21 +17,27 @@ public class CSIDriverSpecArgs : Pulumi.ResourceArgs { /// /// attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + /// + /// This field is immutable. /// [Input("attachRequired")] public Input? AttachRequired { get; set; } /// /// Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + /// + /// This field is immutable. /// [Input("fsGroupPolicy")] public Input? FsGroupPolicy { get; set; } /// - /// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + /// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume /// defined by a CSIVolumeSource, otherwise "false" /// /// "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + /// + /// This field is immutable. /// [Input("podInfoOnMount")] public Input? PodInfoOnMount { get; set; } @@ -41,7 +47,7 @@ public class CSIDriverSpecArgs : Pulumi.ResourceArgs /// /// Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. /// - /// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + /// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. /// [Input("requiresRepublish")] public Input? RequiresRepublish { get; set; } @@ -53,7 +59,9 @@ public class CSIDriverSpecArgs : Pulumi.ResourceArgs /// /// Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. /// - /// This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + /// This field is immutable. + /// + /// This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. /// [Input("storageCapacity")] public Input? StorageCapacity { get; set; } @@ -72,7 +80,7 @@ public class CSIDriverSpecArgs : Pulumi.ResourceArgs /// /// Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. /// - /// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + /// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. /// public InputList TokenRequests { @@ -85,6 +93,8 @@ public InputList Tok /// /// volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. + /// + /// This field is immutable. /// public InputList VolumeLifecycleModes { diff --git a/sdk/dotnet/Storage/V1/Inputs/VolumeAttachmentSourceArgs.cs b/sdk/dotnet/Storage/V1/Inputs/VolumeAttachmentSourceArgs.cs index 3c1ff11215..2a9502ec28 100644 --- a/sdk/dotnet/Storage/V1/Inputs/VolumeAttachmentSourceArgs.cs +++ b/sdk/dotnet/Storage/V1/Inputs/VolumeAttachmentSourceArgs.cs @@ -16,7 +16,7 @@ namespace Pulumi.Kubernetes.Types.Inputs.Storage.V1 public class VolumeAttachmentSourceArgs : Pulumi.ResourceArgs { /// - /// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + /// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. /// [Input("inlineVolumeSpec")] public Input? InlineVolumeSpec { get; set; } diff --git a/sdk/dotnet/Storage/V1/Outputs/CSIDriverSpec.cs b/sdk/dotnet/Storage/V1/Outputs/CSIDriverSpec.cs index a5e7a75141..786d76e873 100644 --- a/sdk/dotnet/Storage/V1/Outputs/CSIDriverSpec.cs +++ b/sdk/dotnet/Storage/V1/Outputs/CSIDriverSpec.cs @@ -15,17 +15,23 @@ public sealed class CSIDriverSpec { /// /// attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + /// + /// This field is immutable. /// public readonly bool AttachRequired; /// /// Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + /// + /// This field is immutable. /// public readonly string FsGroupPolicy; /// - /// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + /// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume /// defined by a CSIVolumeSource, otherwise "false" /// /// "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + /// + /// This field is immutable. /// public readonly bool PodInfoOnMount; /// @@ -33,7 +39,7 @@ public sealed class CSIDriverSpec /// /// Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. /// - /// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + /// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. /// public readonly bool RequiresRepublish; /// @@ -43,7 +49,9 @@ public sealed class CSIDriverSpec /// /// Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. /// - /// This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + /// This field is immutable. + /// + /// This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. /// public readonly bool StorageCapacity; /// @@ -57,11 +65,13 @@ public sealed class CSIDriverSpec /// /// Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. /// - /// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + /// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. /// public readonly ImmutableArray TokenRequests; /// /// volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. + /// + /// This field is immutable. /// public readonly ImmutableArray VolumeLifecycleModes; diff --git a/sdk/dotnet/Storage/V1/Outputs/VolumeAttachmentSource.cs b/sdk/dotnet/Storage/V1/Outputs/VolumeAttachmentSource.cs index 9f804e16b1..a63a308618 100644 --- a/sdk/dotnet/Storage/V1/Outputs/VolumeAttachmentSource.cs +++ b/sdk/dotnet/Storage/V1/Outputs/VolumeAttachmentSource.cs @@ -14,7 +14,7 @@ namespace Pulumi.Kubernetes.Types.Outputs.Storage.V1 public sealed class VolumeAttachmentSource { /// - /// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + /// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. /// public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.PersistentVolumeSpec InlineVolumeSpec; /// diff --git a/sdk/dotnet/Storage/V1Alpha1/CSIStorageCapacity.cs b/sdk/dotnet/Storage/V1Alpha1/CSIStorageCapacity.cs new file mode 100644 index 0000000000..91baacf5b7 --- /dev/null +++ b/sdk/dotnet/Storage/V1Alpha1/CSIStorageCapacity.cs @@ -0,0 +1,194 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Storage.V1Alpha1 +{ + /// + /// CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + /// + /// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + /// + /// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + /// + /// The producer of these objects can decide which approach is more suitable. + /// + /// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + /// + [KubernetesResourceType("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity")] + public partial class CSIStorageCapacity : KubernetesResource + { + /// + /// 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 + /// + [Output("apiVersion")] + public Output ApiVersion { get; private set; } = null!; + + /// + /// Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + /// + [Output("capacity")] + public Output Capacity { get; private set; } = null!; + + /// + /// 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 + /// + [Output("kind")] + public Output Kind { get; private set; } = null!; + + /// + /// MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + /// + [Output("maximumVolumeSize")] + public Output MaximumVolumeSize { get; private set; } = null!; + + /// + /// Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-<uuid>, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + /// + /// Objects are namespaced. + /// + /// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Output("metadata")] + public Output Metadata { get; private set; } = null!; + + /// + /// NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + /// + [Output("nodeTopology")] + public Output NodeTopology { get; private set; } = null!; + + /// + /// The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + /// + [Output("storageClassName")] + public Output StorageClassName { get; private set; } = null!; + + + /// + /// Create a CSIStorageCapacity resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public CSIStorageCapacity(string name, Pulumi.Kubernetes.Types.Inputs.Storage.V1Alpha1.CSIStorageCapacityArgs? args = null, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity", name, MakeArgs(args), MakeResourceOptions(options, "")) + { + } + internal CSIStorageCapacity(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, "")) + { + } + + private CSIStorageCapacity(string name, Input id, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity", name, null, MakeResourceOptions(options, id)) + { + } + + private static Pulumi.Kubernetes.Types.Inputs.Storage.V1Alpha1.CSIStorageCapacityArgs? MakeArgs(Pulumi.Kubernetes.Types.Inputs.Storage.V1Alpha1.CSIStorageCapacityArgs? args) + { + args ??= new Pulumi.Kubernetes.Types.Inputs.Storage.V1Alpha1.CSIStorageCapacityArgs(); + args.ApiVersion = "storage.k8s.io/v1alpha1"; + args.Kind = "CSIStorageCapacity"; + return args; + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + Aliases = + { + new Pulumi.Alias { Type = "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity"}, + }, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing CSIStorageCapacity resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static CSIStorageCapacity Get(string name, Input id, CustomResourceOptions? options = null) + { + return new CSIStorageCapacity(name, id, options); + } + } +} +namespace Pulumi.Kubernetes.Types.Inputs.Storage.V1Alpha1 +{ + + public class CSIStorageCapacityArgs : Pulumi.ResourceArgs + { + /// + /// 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 + /// + [Input("apiVersion")] + public Input? ApiVersion { get; set; } + + /// + /// Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + /// + [Input("capacity")] + public Input? Capacity { get; set; } + + /// + /// 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 + /// + [Input("kind")] + public Input? Kind { get; set; } + + /// + /// MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + /// + [Input("maximumVolumeSize")] + public Input? MaximumVolumeSize { get; set; } + + /// + /// Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-<uuid>, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + /// + /// Objects are namespaced. + /// + /// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Input("metadata")] + public Input? Metadata { get; set; } + + /// + /// NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + /// + [Input("nodeTopology")] + public Input? NodeTopology { get; set; } + + /// + /// The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + /// + [Input("storageClassName", required: true)] + public Input StorageClassName { get; set; } = null!; + + public CSIStorageCapacityArgs() + { + } + } +} diff --git a/sdk/dotnet/Storage/V1Alpha1/CSIStorageCapacityList.cs b/sdk/dotnet/Storage/V1Alpha1/CSIStorageCapacityList.cs new file mode 100644 index 0000000000..df946d2462 --- /dev/null +++ b/sdk/dotnet/Storage/V1Alpha1/CSIStorageCapacityList.cs @@ -0,0 +1,136 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Storage.V1Alpha1 +{ + /// + /// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. + /// + [KubernetesResourceType("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList")] + public partial class CSIStorageCapacityList : KubernetesResource + { + /// + /// 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 + /// + [Output("apiVersion")] + public Output ApiVersion { get; private set; } = null!; + + /// + /// Items is the list of CSIStorageCapacity objects. + /// + [Output("items")] + public Output> Items { get; private set; } = null!; + + /// + /// 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 + /// + [Output("kind")] + public Output Kind { get; private set; } = null!; + + /// + /// Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Output("metadata")] + public Output Metadata { get; private set; } = null!; + + + /// + /// Create a CSIStorageCapacityList resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public CSIStorageCapacityList(string name, Pulumi.Kubernetes.Types.Inputs.Storage.V1Alpha1.CSIStorageCapacityListArgs? args = null, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList", name, MakeArgs(args), MakeResourceOptions(options, "")) + { + } + internal CSIStorageCapacityList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, "")) + { + } + + private CSIStorageCapacityList(string name, Input id, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList", name, null, MakeResourceOptions(options, id)) + { + } + + private static Pulumi.Kubernetes.Types.Inputs.Storage.V1Alpha1.CSIStorageCapacityListArgs? MakeArgs(Pulumi.Kubernetes.Types.Inputs.Storage.V1Alpha1.CSIStorageCapacityListArgs? args) + { + args ??= new Pulumi.Kubernetes.Types.Inputs.Storage.V1Alpha1.CSIStorageCapacityListArgs(); + args.ApiVersion = "storage.k8s.io/v1alpha1"; + args.Kind = "CSIStorageCapacityList"; + return args; + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing CSIStorageCapacityList resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static CSIStorageCapacityList Get(string name, Input id, CustomResourceOptions? options = null) + { + return new CSIStorageCapacityList(name, id, options); + } + } +} +namespace Pulumi.Kubernetes.Types.Inputs.Storage.V1Alpha1 +{ + + public class CSIStorageCapacityListArgs : Pulumi.ResourceArgs + { + /// + /// 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 + /// + [Input("apiVersion")] + public Input? ApiVersion { get; set; } + + [Input("items", required: true)] + private InputList? _items; + + /// + /// Items is the list of CSIStorageCapacity objects. + /// + public InputList Items + { + get => _items ?? (_items = new InputList()); + set => _items = value; + } + + /// + /// 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 + /// + [Input("kind")] + public Input? Kind { get; set; } + + /// + /// Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Input("metadata")] + public Input? Metadata { get; set; } + + public CSIStorageCapacityListArgs() + { + } + } +} diff --git a/sdk/dotnet/Storage/V1Alpha1/Inputs/CSIStorageCapacityArgs.cs b/sdk/dotnet/Storage/V1Alpha1/Inputs/CSIStorageCapacityArgs.cs new file mode 100644 index 0000000000..6b7fcbeb80 --- /dev/null +++ b/sdk/dotnet/Storage/V1Alpha1/Inputs/CSIStorageCapacityArgs.cs @@ -0,0 +1,12 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Storage.V1Alpha1 +{ +} diff --git a/sdk/dotnet/Storage/V1Alpha1/Outputs/CSIStorageCapacity.cs b/sdk/dotnet/Storage/V1Alpha1/Outputs/CSIStorageCapacity.cs new file mode 100644 index 0000000000..a9ac3a0b53 --- /dev/null +++ b/sdk/dotnet/Storage/V1Alpha1/Outputs/CSIStorageCapacity.cs @@ -0,0 +1,78 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Storage.V1Alpha1 +{ + + [OutputType] + public sealed class CSIStorageCapacity + { + /// + /// 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 + /// + public readonly string ApiVersion; + /// + /// Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + /// + public readonly string Capacity; + /// + /// 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 + /// + public readonly string Kind; + /// + /// MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + /// + public readonly string MaximumVolumeSize; + /// + /// Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-<uuid>, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + /// + /// Objects are namespaced. + /// + /// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta Metadata; + /// + /// NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector NodeTopology; + /// + /// The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + /// + public readonly string StorageClassName; + + [OutputConstructor] + private CSIStorageCapacity( + string apiVersion, + + string capacity, + + string kind, + + string maximumVolumeSize, + + Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta metadata, + + Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector nodeTopology, + + string storageClassName) + { + ApiVersion = apiVersion; + Capacity = capacity; + Kind = kind; + MaximumVolumeSize = maximumVolumeSize; + Metadata = metadata; + NodeTopology = nodeTopology; + StorageClassName = storageClassName; + } + } +} diff --git a/sdk/dotnet/Storage/V1Beta1/CSIStorageCapacity.cs b/sdk/dotnet/Storage/V1Beta1/CSIStorageCapacity.cs new file mode 100644 index 0000000000..03c77b6b97 --- /dev/null +++ b/sdk/dotnet/Storage/V1Beta1/CSIStorageCapacity.cs @@ -0,0 +1,194 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Storage.V1Beta1 +{ + /// + /// CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + /// + /// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + /// + /// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + /// + /// The producer of these objects can decide which approach is more suitable. + /// + /// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + /// + [KubernetesResourceType("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity")] + public partial class CSIStorageCapacity : KubernetesResource + { + /// + /// 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 + /// + [Output("apiVersion")] + public Output ApiVersion { get; private set; } = null!; + + /// + /// Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + /// + [Output("capacity")] + public Output Capacity { get; private set; } = null!; + + /// + /// 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 + /// + [Output("kind")] + public Output Kind { get; private set; } = null!; + + /// + /// MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + /// + [Output("maximumVolumeSize")] + public Output MaximumVolumeSize { get; private set; } = null!; + + /// + /// Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-<uuid>, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + /// + /// Objects are namespaced. + /// + /// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Output("metadata")] + public Output Metadata { get; private set; } = null!; + + /// + /// NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + /// + [Output("nodeTopology")] + public Output NodeTopology { get; private set; } = null!; + + /// + /// The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + /// + [Output("storageClassName")] + public Output StorageClassName { get; private set; } = null!; + + + /// + /// Create a CSIStorageCapacity resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public CSIStorageCapacity(string name, Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1.CSIStorageCapacityArgs? args = null, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity", name, MakeArgs(args), MakeResourceOptions(options, "")) + { + } + internal CSIStorageCapacity(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, "")) + { + } + + private CSIStorageCapacity(string name, Input id, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity", name, null, MakeResourceOptions(options, id)) + { + } + + private static Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1.CSIStorageCapacityArgs? MakeArgs(Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1.CSIStorageCapacityArgs? args) + { + args ??= new Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1.CSIStorageCapacityArgs(); + args.ApiVersion = "storage.k8s.io/v1beta1"; + args.Kind = "CSIStorageCapacity"; + return args; + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + Aliases = + { + new Pulumi.Alias { Type = "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity"}, + }, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing CSIStorageCapacity resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static CSIStorageCapacity Get(string name, Input id, CustomResourceOptions? options = null) + { + return new CSIStorageCapacity(name, id, options); + } + } +} +namespace Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1 +{ + + public class CSIStorageCapacityArgs : Pulumi.ResourceArgs + { + /// + /// 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 + /// + [Input("apiVersion")] + public Input? ApiVersion { get; set; } + + /// + /// Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + /// + [Input("capacity")] + public Input? Capacity { get; set; } + + /// + /// 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 + /// + [Input("kind")] + public Input? Kind { get; set; } + + /// + /// MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + /// + [Input("maximumVolumeSize")] + public Input? MaximumVolumeSize { get; set; } + + /// + /// Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-<uuid>, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + /// + /// Objects are namespaced. + /// + /// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Input("metadata")] + public Input? Metadata { get; set; } + + /// + /// NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + /// + [Input("nodeTopology")] + public Input? NodeTopology { get; set; } + + /// + /// The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + /// + [Input("storageClassName", required: true)] + public Input StorageClassName { get; set; } = null!; + + public CSIStorageCapacityArgs() + { + } + } +} diff --git a/sdk/dotnet/Storage/V1Beta1/CSIStorageCapacityList.cs b/sdk/dotnet/Storage/V1Beta1/CSIStorageCapacityList.cs new file mode 100644 index 0000000000..e061e258c2 --- /dev/null +++ b/sdk/dotnet/Storage/V1Beta1/CSIStorageCapacityList.cs @@ -0,0 +1,136 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Storage.V1Beta1 +{ + /// + /// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. + /// + [KubernetesResourceType("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList")] + public partial class CSIStorageCapacityList : KubernetesResource + { + /// + /// 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 + /// + [Output("apiVersion")] + public Output ApiVersion { get; private set; } = null!; + + /// + /// Items is the list of CSIStorageCapacity objects. + /// + [Output("items")] + public Output> Items { get; private set; } = null!; + + /// + /// 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 + /// + [Output("kind")] + public Output Kind { get; private set; } = null!; + + /// + /// Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Output("metadata")] + public Output Metadata { get; private set; } = null!; + + + /// + /// Create a CSIStorageCapacityList resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public CSIStorageCapacityList(string name, Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1.CSIStorageCapacityListArgs? args = null, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList", name, MakeArgs(args), MakeResourceOptions(options, "")) + { + } + internal CSIStorageCapacityList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, "")) + { + } + + private CSIStorageCapacityList(string name, Input id, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList", name, null, MakeResourceOptions(options, id)) + { + } + + private static Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1.CSIStorageCapacityListArgs? MakeArgs(Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1.CSIStorageCapacityListArgs? args) + { + args ??= new Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1.CSIStorageCapacityListArgs(); + args.ApiVersion = "storage.k8s.io/v1beta1"; + args.Kind = "CSIStorageCapacityList"; + return args; + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing CSIStorageCapacityList resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static CSIStorageCapacityList Get(string name, Input id, CustomResourceOptions? options = null) + { + return new CSIStorageCapacityList(name, id, options); + } + } +} +namespace Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1 +{ + + public class CSIStorageCapacityListArgs : Pulumi.ResourceArgs + { + /// + /// 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 + /// + [Input("apiVersion")] + public Input? ApiVersion { get; set; } + + [Input("items", required: true)] + private InputList? _items; + + /// + /// Items is the list of CSIStorageCapacity objects. + /// + public InputList Items + { + get => _items ?? (_items = new InputList()); + set => _items = value; + } + + /// + /// 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 + /// + [Input("kind")] + public Input? Kind { get; set; } + + /// + /// Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + [Input("metadata")] + public Input? Metadata { get; set; } + + public CSIStorageCapacityListArgs() + { + } + } +} diff --git a/sdk/dotnet/Storage/V1Beta1/Inputs/CSIDriverSpecArgs.cs b/sdk/dotnet/Storage/V1Beta1/Inputs/CSIDriverSpecArgs.cs index 8ffe3797af..8cdaaa843c 100644 --- a/sdk/dotnet/Storage/V1Beta1/Inputs/CSIDriverSpecArgs.cs +++ b/sdk/dotnet/Storage/V1Beta1/Inputs/CSIDriverSpecArgs.cs @@ -17,21 +17,27 @@ public class CSIDriverSpecArgs : Pulumi.ResourceArgs { /// /// attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + /// + /// This field is immutable. /// [Input("attachRequired")] public Input? AttachRequired { get; set; } /// /// Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + /// + /// This field is immutable. /// [Input("fsGroupPolicy")] public Input? FsGroupPolicy { get; set; } /// - /// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + /// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume /// defined by a CSIVolumeSource, otherwise "false" /// /// "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + /// + /// This field is immutable. /// [Input("podInfoOnMount")] public Input? PodInfoOnMount { get; set; } @@ -41,7 +47,7 @@ public class CSIDriverSpecArgs : Pulumi.ResourceArgs /// /// Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. /// - /// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + /// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. /// [Input("requiresRepublish")] public Input? RequiresRepublish { get; set; } @@ -53,7 +59,9 @@ public class CSIDriverSpecArgs : Pulumi.ResourceArgs /// /// Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. /// - /// This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + /// This field is immutable. + /// + /// This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. /// [Input("storageCapacity")] public Input? StorageCapacity { get; set; } @@ -72,7 +80,7 @@ public class CSIDriverSpecArgs : Pulumi.ResourceArgs /// /// Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. /// - /// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + /// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. /// public InputList TokenRequests { @@ -85,6 +93,8 @@ public InputList /// VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. + /// + /// This field is immutable. /// public InputList VolumeLifecycleModes { diff --git a/sdk/dotnet/Storage/V1Beta1/Inputs/CSIStorageCapacityArgs.cs b/sdk/dotnet/Storage/V1Beta1/Inputs/CSIStorageCapacityArgs.cs new file mode 100644 index 0000000000..6ffde89385 --- /dev/null +++ b/sdk/dotnet/Storage/V1Beta1/Inputs/CSIStorageCapacityArgs.cs @@ -0,0 +1,12 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1 +{ +} diff --git a/sdk/dotnet/Storage/V1Beta1/Inputs/VolumeAttachmentSourceArgs.cs b/sdk/dotnet/Storage/V1Beta1/Inputs/VolumeAttachmentSourceArgs.cs index 7188acd768..cd3ebac8ea 100644 --- a/sdk/dotnet/Storage/V1Beta1/Inputs/VolumeAttachmentSourceArgs.cs +++ b/sdk/dotnet/Storage/V1Beta1/Inputs/VolumeAttachmentSourceArgs.cs @@ -16,7 +16,7 @@ namespace Pulumi.Kubernetes.Types.Inputs.Storage.V1Beta1 public class VolumeAttachmentSourceArgs : Pulumi.ResourceArgs { /// - /// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + /// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. /// [Input("inlineVolumeSpec")] public Input? InlineVolumeSpec { get; set; } diff --git a/sdk/dotnet/Storage/V1Beta1/Outputs/CSIDriverSpec.cs b/sdk/dotnet/Storage/V1Beta1/Outputs/CSIDriverSpec.cs index 16eb80b020..ff629750a9 100644 --- a/sdk/dotnet/Storage/V1Beta1/Outputs/CSIDriverSpec.cs +++ b/sdk/dotnet/Storage/V1Beta1/Outputs/CSIDriverSpec.cs @@ -15,17 +15,23 @@ public sealed class CSIDriverSpec { /// /// attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + /// + /// This field is immutable. /// public readonly bool AttachRequired; /// /// Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + /// + /// This field is immutable. /// public readonly string FsGroupPolicy; /// - /// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + /// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume /// defined by a CSIVolumeSource, otherwise "false" /// /// "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + /// + /// This field is immutable. /// public readonly bool PodInfoOnMount; /// @@ -33,7 +39,7 @@ public sealed class CSIDriverSpec /// /// Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. /// - /// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + /// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. /// public readonly bool RequiresRepublish; /// @@ -43,7 +49,9 @@ public sealed class CSIDriverSpec /// /// Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. /// - /// This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + /// This field is immutable. + /// + /// This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. /// public readonly bool StorageCapacity; /// @@ -57,11 +65,13 @@ public sealed class CSIDriverSpec /// /// Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. /// - /// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + /// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. /// public readonly ImmutableArray TokenRequests; /// /// VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. + /// + /// This field is immutable. /// public readonly ImmutableArray VolumeLifecycleModes; diff --git a/sdk/dotnet/Storage/V1Beta1/Outputs/CSIStorageCapacity.cs b/sdk/dotnet/Storage/V1Beta1/Outputs/CSIStorageCapacity.cs new file mode 100644 index 0000000000..35cde3c303 --- /dev/null +++ b/sdk/dotnet/Storage/V1Beta1/Outputs/CSIStorageCapacity.cs @@ -0,0 +1,78 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Types.Outputs.Storage.V1Beta1 +{ + + [OutputType] + public sealed class CSIStorageCapacity + { + /// + /// 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 + /// + public readonly string ApiVersion; + /// + /// Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + /// + public readonly string Capacity; + /// + /// 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 + /// + public readonly string Kind; + /// + /// MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + /// + /// This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + /// + public readonly string MaximumVolumeSize; + /// + /// Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-<uuid>, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + /// + /// Objects are namespaced. + /// + /// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta Metadata; + /// + /// NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + /// + public readonly Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector NodeTopology; + /// + /// The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + /// + public readonly string StorageClassName; + + [OutputConstructor] + private CSIStorageCapacity( + string apiVersion, + + string capacity, + + string kind, + + string maximumVolumeSize, + + Pulumi.Kubernetes.Types.Outputs.Meta.V1.ObjectMeta metadata, + + Pulumi.Kubernetes.Types.Outputs.Meta.V1.LabelSelector nodeTopology, + + string storageClassName) + { + ApiVersion = apiVersion; + Capacity = capacity; + Kind = kind; + MaximumVolumeSize = maximumVolumeSize; + Metadata = metadata; + NodeTopology = nodeTopology; + StorageClassName = storageClassName; + } + } +} diff --git a/sdk/dotnet/Storage/V1Beta1/Outputs/VolumeAttachmentSource.cs b/sdk/dotnet/Storage/V1Beta1/Outputs/VolumeAttachmentSource.cs index 306508e408..f6a80dc81f 100644 --- a/sdk/dotnet/Storage/V1Beta1/Outputs/VolumeAttachmentSource.cs +++ b/sdk/dotnet/Storage/V1Beta1/Outputs/VolumeAttachmentSource.cs @@ -14,7 +14,7 @@ namespace Pulumi.Kubernetes.Types.Outputs.Storage.V1Beta1 public sealed class VolumeAttachmentSource { /// - /// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + /// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. /// public readonly Pulumi.Kubernetes.Types.Outputs.Core.V1.PersistentVolumeSpec InlineVolumeSpec; /// diff --git a/sdk/dotnet/Yaml/Yaml.cs b/sdk/dotnet/Yaml/Yaml.cs index 7f292d628e..fc2b3d4b11 100755 --- a/sdk/dotnet/Yaml/Yaml.cs +++ b/sdk/dotnet/Yaml/Yaml.cs @@ -117,6 +117,8 @@ public Output GetResource(string name, string? namespaceName = null) type == typeof(Autoscaling.V2Beta1.HorizontalPodAutoscalerList) ? "autoscaling/v2beta1/HorizontalPodAutoscalerList" : type == typeof(Autoscaling.V2Beta2.HorizontalPodAutoscaler) ? "autoscaling/v2beta2/HorizontalPodAutoscaler" : type == typeof(Autoscaling.V2Beta2.HorizontalPodAutoscalerList) ? "autoscaling/v2beta2/HorizontalPodAutoscalerList" : + type == typeof(Batch.V1.CronJob) ? "batch/v1/CronJob" : + type == typeof(Batch.V1.CronJobList) ? "batch/v1/CronJobList" : type == typeof(Batch.V1.Job) ? "batch/v1/Job" : type == typeof(Batch.V1.JobList) ? "batch/v1/JobList" : type == typeof(Batch.V1Beta1.CronJob) ? "batch/v1beta1/CronJob" : @@ -136,6 +138,7 @@ public Output GetResource(string name, string? namespaceName = null) type == typeof(Core.V1.ConfigMapList) ? "v1/ConfigMapList" : type == typeof(Core.V1.Endpoints) ? "v1/Endpoints" : type == typeof(Core.V1.EndpointsList) ? "v1/EndpointsList" : + type == typeof(Core.V1.EphemeralContainers) ? "v1/EphemeralContainers" : type == typeof(Core.V1.Event) ? "v1/Event" : type == typeof(Core.V1.EventList) ? "v1/EventList" : type == typeof(Core.V1.LimitRange) ? "v1/LimitRange" : @@ -162,6 +165,8 @@ public Output GetResource(string name, string? namespaceName = null) type == typeof(Core.V1.ServiceAccount) ? "v1/ServiceAccount" : type == typeof(Core.V1.ServiceAccountList) ? "v1/ServiceAccountList" : type == typeof(Core.V1.ServiceList) ? "v1/ServiceList" : + type == typeof(Discovery.V1.EndpointSlice) ? "discovery.k8s.io/v1/EndpointSlice" : + type == typeof(Discovery.V1.EndpointSliceList) ? "discovery.k8s.io/v1/EndpointSliceList" : type == typeof(Discovery.V1Beta1.EndpointSlice) ? "discovery.k8s.io/v1beta1/EndpointSlice" : type == typeof(Discovery.V1Beta1.EndpointSliceList) ? "discovery.k8s.io/v1beta1/EndpointSliceList" : type == typeof(Events.V1.Event) ? "events.k8s.io/v1/Event" : @@ -205,6 +210,8 @@ public Output GetResource(string name, string? namespaceName = null) type == typeof(Node.V1Alpha1.RuntimeClassList) ? "node.k8s.io/v1alpha1/RuntimeClassList" : type == typeof(Node.V1Beta1.RuntimeClass) ? "node.k8s.io/v1beta1/RuntimeClass" : type == typeof(Node.V1Beta1.RuntimeClassList) ? "node.k8s.io/v1beta1/RuntimeClassList" : + type == typeof(Policy.V1.PodDisruptionBudget) ? "policy/v1/PodDisruptionBudget" : + type == typeof(Policy.V1.PodDisruptionBudgetList) ? "policy/v1/PodDisruptionBudgetList" : type == typeof(Policy.V1Beta1.PodDisruptionBudget) ? "policy/v1beta1/PodDisruptionBudget" : type == typeof(Policy.V1Beta1.PodDisruptionBudgetList) ? "policy/v1beta1/PodDisruptionBudgetList" : type == typeof(Policy.V1Beta1.PodSecurityPolicy) ? "policy/v1beta1/PodSecurityPolicy" : @@ -249,12 +256,16 @@ public Output GetResource(string name, string? namespaceName = null) type == typeof(Storage.V1.StorageClassList) ? "storage.k8s.io/v1/StorageClassList" : type == typeof(Storage.V1.VolumeAttachment) ? "storage.k8s.io/v1/VolumeAttachment" : type == typeof(Storage.V1.VolumeAttachmentList) ? "storage.k8s.io/v1/VolumeAttachmentList" : + type == typeof(Storage.V1Alpha1.CSIStorageCapacity) ? "storage.k8s.io/v1alpha1/CSIStorageCapacity" : + type == typeof(Storage.V1Alpha1.CSIStorageCapacityList) ? "storage.k8s.io/v1alpha1/CSIStorageCapacityList" : type == typeof(Storage.V1Alpha1.VolumeAttachment) ? "storage.k8s.io/v1alpha1/VolumeAttachment" : type == typeof(Storage.V1Alpha1.VolumeAttachmentList) ? "storage.k8s.io/v1alpha1/VolumeAttachmentList" : type == typeof(Storage.V1Beta1.CSIDriver) ? "storage.k8s.io/v1beta1/CSIDriver" : type == typeof(Storage.V1Beta1.CSIDriverList) ? "storage.k8s.io/v1beta1/CSIDriverList" : type == typeof(Storage.V1Beta1.CSINode) ? "storage.k8s.io/v1beta1/CSINode" : type == typeof(Storage.V1Beta1.CSINodeList) ? "storage.k8s.io/v1beta1/CSINodeList" : + type == typeof(Storage.V1Beta1.CSIStorageCapacity) ? "storage.k8s.io/v1beta1/CSIStorageCapacity" : + type == typeof(Storage.V1Beta1.CSIStorageCapacityList) ? "storage.k8s.io/v1beta1/CSIStorageCapacityList" : type == typeof(Storage.V1Beta1.StorageClass) ? "storage.k8s.io/v1beta1/StorageClass" : type == typeof(Storage.V1Beta1.StorageClassList) ? "storage.k8s.io/v1beta1/StorageClassList" : type == typeof(Storage.V1Beta1.VolumeAttachment) ? "storage.k8s.io/v1beta1/VolumeAttachment" : @@ -455,6 +466,7 @@ internal static bool IsUrl(string s) || gvk == "autoscaling/v1/HorizontalPodAutoscalerList" || gvk == "autoscaling/v2beta1/HorizontalPodAutoscalerList" || gvk == "autoscaling/v2beta2/HorizontalPodAutoscalerList" + || gvk == "batch/v1/CronJobList" || gvk == "batch/v1/JobList" || gvk == "batch/v1beta1/CronJobList" || gvk == "batch/v2alpha1/CronJobList" @@ -477,6 +489,7 @@ internal static bool IsUrl(string s) || gvk == "v1/SecretList" || gvk == "v1/ServiceAccountList" || gvk == "v1/ServiceList" + || gvk == "discovery.k8s.io/v1/EndpointSliceList" || gvk == "discovery.k8s.io/v1beta1/EndpointSliceList" || gvk == "events.k8s.io/v1/EventList" || gvk == "events.k8s.io/v1beta1/EventList" @@ -498,6 +511,7 @@ internal static bool IsUrl(string s) || gvk == "node.k8s.io/v1/RuntimeClassList" || gvk == "node.k8s.io/v1alpha1/RuntimeClassList" || gvk == "node.k8s.io/v1beta1/RuntimeClassList" + || gvk == "policy/v1/PodDisruptionBudgetList" || gvk == "policy/v1beta1/PodDisruptionBudgetList" || gvk == "policy/v1beta1/PodSecurityPolicyList" || gvk == "rbac.authorization.k8s.io/v1/ClusterRoleBindingList" @@ -520,9 +534,11 @@ internal static bool IsUrl(string s) || gvk == "storage.k8s.io/v1/CSINodeList" || gvk == "storage.k8s.io/v1/StorageClassList" || gvk == "storage.k8s.io/v1/VolumeAttachmentList" + || gvk == "storage.k8s.io/v1alpha1/CSIStorageCapacityList" || gvk == "storage.k8s.io/v1alpha1/VolumeAttachmentList" || gvk == "storage.k8s.io/v1beta1/CSIDriverList" || gvk == "storage.k8s.io/v1beta1/CSINodeList" + || gvk == "storage.k8s.io/v1beta1/CSIStorageCapacityList" || gvk == "storage.k8s.io/v1beta1/StorageClassList" || gvk == "storage.k8s.io/v1beta1/VolumeAttachmentList" ) @@ -768,6 +784,12 @@ internal static bool IsUrl(string s) id.Apply(id => ($"autoscaling/v2beta2/HorizontalPodAutoscaler::{id}", new Autoscaling.V2Beta2.HorizontalPodAutoscaler(id, obj!, opts) as KubernetesResource)) }; + case "batch/v1/CronJob": + return new[] + { + id.Apply(id => ($"batch/v1/CronJob::{id}", + new Batch.V1.CronJob(id, obj!, opts) as KubernetesResource)) + }; case "batch/v1/Job": return new[] { @@ -828,6 +850,12 @@ internal static bool IsUrl(string s) id.Apply(id => ($"v1/Endpoints::{id}", new Core.V1.Endpoints(id, obj!, opts) as KubernetesResource)) }; + case "v1/EphemeralContainers": + return new[] + { + id.Apply(id => ($"v1/EphemeralContainers::{id}", + new Core.V1.EphemeralContainers(id, obj!, opts) as KubernetesResource)) + }; case "v1/Event": return new[] { @@ -906,6 +934,12 @@ internal static bool IsUrl(string s) id.Apply(id => ($"v1/ServiceAccount::{id}", new Core.V1.ServiceAccount(id, obj!, opts) as KubernetesResource)) }; + case "discovery.k8s.io/v1/EndpointSlice": + return new[] + { + id.Apply(id => ($"discovery.k8s.io/v1/EndpointSlice::{id}", + new Discovery.V1.EndpointSlice(id, obj!, opts) as KubernetesResource)) + }; case "discovery.k8s.io/v1beta1/EndpointSlice": return new[] { @@ -1038,6 +1072,12 @@ internal static bool IsUrl(string s) id.Apply(id => ($"node.k8s.io/v1beta1/RuntimeClass::{id}", new Node.V1Beta1.RuntimeClass(id, obj!, opts) as KubernetesResource)) }; + case "policy/v1/PodDisruptionBudget": + return new[] + { + id.Apply(id => ($"policy/v1/PodDisruptionBudget::{id}", + new Policy.V1.PodDisruptionBudget(id, obj!, opts) as KubernetesResource)) + }; case "policy/v1beta1/PodDisruptionBudget": return new[] { @@ -1170,6 +1210,12 @@ internal static bool IsUrl(string s) id.Apply(id => ($"storage.k8s.io/v1/VolumeAttachment::{id}", new Storage.V1.VolumeAttachment(id, obj!, opts) as KubernetesResource)) }; + case "storage.k8s.io/v1alpha1/CSIStorageCapacity": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1alpha1/CSIStorageCapacity::{id}", + new Storage.V1Alpha1.CSIStorageCapacity(id, obj!, opts) as KubernetesResource)) + }; case "storage.k8s.io/v1alpha1/VolumeAttachment": return new[] { @@ -1188,6 +1234,12 @@ internal static bool IsUrl(string s) id.Apply(id => ($"storage.k8s.io/v1beta1/CSINode::{id}", new Storage.V1Beta1.CSINode(id, obj!, opts) as KubernetesResource)) }; + case "storage.k8s.io/v1beta1/CSIStorageCapacity": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1beta1/CSIStorageCapacity::{id}", + new Storage.V1Beta1.CSIStorageCapacity(id, obj!, opts) as KubernetesResource)) + }; case "storage.k8s.io/v1beta1/StorageClass": return new[] { diff --git a/sdk/go/kubernetes/admissionregistration/v1/pulumiTypes.go b/sdk/go/kubernetes/admissionregistration/v1/pulumiTypes.go index a8d1cffb03..741b92a146 100644 --- a/sdk/go/kubernetes/admissionregistration/v1/pulumiTypes.go +++ b/sdk/go/kubernetes/admissionregistration/v1/pulumiTypes.go @@ -73,7 +73,7 @@ type MutatingWebhook struct { ReinvocationPolicy *string `pulumi:"reinvocationPolicy"` // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. Rules []RuleWithOperations `pulumi:"rules"` - // SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + // SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. SideEffects string `pulumi:"sideEffects"` // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. TimeoutSeconds *int `pulumi:"timeoutSeconds"` @@ -152,7 +152,7 @@ type MutatingWebhookArgs struct { ReinvocationPolicy pulumi.StringPtrInput `pulumi:"reinvocationPolicy"` // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. Rules RuleWithOperationsArrayInput `pulumi:"rules"` - // SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + // SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. SideEffects pulumi.StringInput `pulumi:"sideEffects"` // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. TimeoutSeconds pulumi.IntPtrInput `pulumi:"timeoutSeconds"` @@ -297,7 +297,7 @@ func (o MutatingWebhookOutput) Rules() RuleWithOperationsArrayOutput { return o.ApplyT(func(v MutatingWebhook) []RuleWithOperations { return v.Rules }).(RuleWithOperationsArrayOutput) } -// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. +// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. func (o MutatingWebhookOutput) SideEffects() pulumi.StringOutput { return o.ApplyT(func(v MutatingWebhook) string { return v.SideEffects }).(pulumi.StringOutput) } @@ -935,7 +935,7 @@ type ValidatingWebhook struct { ObjectSelector *metav1.LabelSelector `pulumi:"objectSelector"` // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. Rules []RuleWithOperations `pulumi:"rules"` - // SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + // SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. SideEffects string `pulumi:"sideEffects"` // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. TimeoutSeconds *int `pulumi:"timeoutSeconds"` @@ -1006,7 +1006,7 @@ type ValidatingWebhookArgs struct { ObjectSelector metav1.LabelSelectorPtrInput `pulumi:"objectSelector"` // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. Rules RuleWithOperationsArrayInput `pulumi:"rules"` - // SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + // SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. SideEffects pulumi.StringInput `pulumi:"sideEffects"` // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. TimeoutSeconds pulumi.IntPtrInput `pulumi:"timeoutSeconds"` @@ -1140,7 +1140,7 @@ func (o ValidatingWebhookOutput) Rules() RuleWithOperationsArrayOutput { return o.ApplyT(func(v ValidatingWebhook) []RuleWithOperations { return v.Rules }).(RuleWithOperationsArrayOutput) } -// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. +// SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. func (o ValidatingWebhookOutput) SideEffects() pulumi.StringOutput { return o.ApplyT(func(v ValidatingWebhook) string { return v.SideEffects }).(pulumi.StringOutput) } diff --git a/sdk/go/kubernetes/admissionregistration/v1beta1/pulumiTypes.go b/sdk/go/kubernetes/admissionregistration/v1beta1/pulumiTypes.go index bd49c9e49a..689f595f56 100644 --- a/sdk/go/kubernetes/admissionregistration/v1beta1/pulumiTypes.go +++ b/sdk/go/kubernetes/admissionregistration/v1beta1/pulumiTypes.go @@ -73,7 +73,7 @@ type MutatingWebhook struct { ReinvocationPolicy *string `pulumi:"reinvocationPolicy"` // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. Rules []RuleWithOperations `pulumi:"rules"` - // SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + // SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. SideEffects *string `pulumi:"sideEffects"` // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds. TimeoutSeconds *int `pulumi:"timeoutSeconds"` @@ -152,7 +152,7 @@ type MutatingWebhookArgs struct { ReinvocationPolicy pulumi.StringPtrInput `pulumi:"reinvocationPolicy"` // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. Rules RuleWithOperationsArrayInput `pulumi:"rules"` - // SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + // SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. SideEffects pulumi.StringPtrInput `pulumi:"sideEffects"` // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds. TimeoutSeconds pulumi.IntPtrInput `pulumi:"timeoutSeconds"` @@ -297,7 +297,7 @@ func (o MutatingWebhookOutput) Rules() RuleWithOperationsArrayOutput { return o.ApplyT(func(v MutatingWebhook) []RuleWithOperations { return v.Rules }).(RuleWithOperationsArrayOutput) } -// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. +// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. func (o MutatingWebhookOutput) SideEffects() pulumi.StringPtrOutput { return o.ApplyT(func(v MutatingWebhook) *string { return v.SideEffects }).(pulumi.StringPtrOutput) } @@ -935,7 +935,7 @@ type ValidatingWebhook struct { ObjectSelector *metav1.LabelSelector `pulumi:"objectSelector"` // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. Rules []RuleWithOperations `pulumi:"rules"` - // SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + // SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. SideEffects *string `pulumi:"sideEffects"` // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds. TimeoutSeconds *int `pulumi:"timeoutSeconds"` @@ -1006,7 +1006,7 @@ type ValidatingWebhookArgs struct { ObjectSelector metav1.LabelSelectorPtrInput `pulumi:"objectSelector"` // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. Rules RuleWithOperationsArrayInput `pulumi:"rules"` - // SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + // SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. SideEffects pulumi.StringPtrInput `pulumi:"sideEffects"` // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds. TimeoutSeconds pulumi.IntPtrInput `pulumi:"timeoutSeconds"` @@ -1140,7 +1140,7 @@ func (o ValidatingWebhookOutput) Rules() RuleWithOperationsArrayOutput { return o.ApplyT(func(v ValidatingWebhook) []RuleWithOperations { return v.Rules }).(RuleWithOperationsArrayOutput) } -// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. +// SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. func (o ValidatingWebhookOutput) SideEffects() pulumi.StringPtrOutput { return o.ApplyT(func(v ValidatingWebhook) *string { return v.SideEffects }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/kubernetes/apps/v1/pulumiTypes.go b/sdk/go/kubernetes/apps/v1/pulumiTypes.go index 1050674d3c..6ce79b6c2e 100644 --- a/sdk/go/kubernetes/apps/v1/pulumiTypes.go +++ b/sdk/go/kubernetes/apps/v1/pulumiTypes.go @@ -3144,7 +3144,9 @@ func (o ReplicaSetStatusPtrOutput) Replicas() pulumi.IntPtrOutput { // Spec to control the desired behavior of daemon set rolling update. type RollingUpdateDaemonSet struct { - // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + // The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. + MaxSurge interface{} `pulumi:"maxSurge"` + // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. MaxUnavailable interface{} `pulumi:"maxUnavailable"` } @@ -3161,7 +3163,9 @@ type RollingUpdateDaemonSetInput interface { // Spec to control the desired behavior of daemon set rolling update. type RollingUpdateDaemonSetArgs struct { - // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + // The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. + MaxSurge pulumi.Input `pulumi:"maxSurge"` + // The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. MaxUnavailable pulumi.Input `pulumi:"maxUnavailable"` } @@ -3243,7 +3247,12 @@ func (o RollingUpdateDaemonSetOutput) ToRollingUpdateDaemonSetPtrOutputWithConte }).(RollingUpdateDaemonSetPtrOutput) } -// The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. +// The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. +func (o RollingUpdateDaemonSetOutput) MaxSurge() pulumi.AnyOutput { + return o.ApplyT(func(v RollingUpdateDaemonSet) interface{} { return v.MaxSurge }).(pulumi.AnyOutput) +} + +// The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. func (o RollingUpdateDaemonSetOutput) MaxUnavailable() pulumi.AnyOutput { return o.ApplyT(func(v RollingUpdateDaemonSet) interface{} { return v.MaxUnavailable }).(pulumi.AnyOutput) } @@ -3266,7 +3275,17 @@ func (o RollingUpdateDaemonSetPtrOutput) Elem() RollingUpdateDaemonSetOutput { return o.ApplyT(func(v *RollingUpdateDaemonSet) RollingUpdateDaemonSet { return *v }).(RollingUpdateDaemonSetOutput) } -// The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. +// The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. +func (o RollingUpdateDaemonSetPtrOutput) MaxSurge() pulumi.AnyOutput { + return o.ApplyT(func(v *RollingUpdateDaemonSet) interface{} { + if v == nil { + return nil + } + return v.MaxSurge + }).(pulumi.AnyOutput) +} + +// The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. func (o RollingUpdateDaemonSetPtrOutput) MaxUnavailable() pulumi.AnyOutput { return o.ApplyT(func(v *RollingUpdateDaemonSet) interface{} { if v == nil { diff --git a/sdk/go/kubernetes/batch/v1/cronJob.go b/sdk/go/kubernetes/batch/v1/cronJob.go new file mode 100644 index 0000000000..41d9a2fc6b --- /dev/null +++ b/sdk/go/kubernetes/batch/v1/cronJob.go @@ -0,0 +1,311 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1 + +import ( + "context" + "reflect" + + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// CronJob represents the configuration of a single cron job. +type CronJob struct { + pulumi.CustomResourceState + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` + // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec CronJobSpecPtrOutput `pulumi:"spec"` + // Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status CronJobStatusPtrOutput `pulumi:"status"` +} + +// NewCronJob registers a new resource with the given unique name, arguments, and options. +func NewCronJob(ctx *pulumi.Context, + name string, args *CronJobArgs, opts ...pulumi.ResourceOption) (*CronJob, error) { + if args == nil { + args = &CronJobArgs{} + } + + args.ApiVersion = pulumi.StringPtr("batch/v1") + args.Kind = pulumi.StringPtr("CronJob") + aliases := pulumi.Aliases([]pulumi.Alias{ + { + Type: pulumi.String("kubernetes:batch/v1beta1:CronJob"), + }, + { + Type: pulumi.String("kubernetes:batch/v2alpha1:CronJob"), + }, + }) + opts = append(opts, aliases) + var resource CronJob + err := ctx.RegisterResource("kubernetes:batch/v1:CronJob", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetCronJob gets an existing CronJob resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetCronJob(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *CronJobState, opts ...pulumi.ResourceOption) (*CronJob, error) { + var resource CronJob + err := ctx.ReadResource("kubernetes:batch/v1:CronJob", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering CronJob resources. +type cronJobState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *CronJobSpec `pulumi:"spec"` + // Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *CronJobStatus `pulumi:"status"` +} + +type CronJobState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput + // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec CronJobSpecPtrInput + // Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status CronJobStatusPtrInput +} + +func (CronJobState) ElementType() reflect.Type { + return reflect.TypeOf((*cronJobState)(nil)).Elem() +} + +type cronJobArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *CronJobSpec `pulumi:"spec"` +} + +// The set of arguments for constructing a CronJob resource. +type CronJobArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput + // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec CronJobSpecPtrInput +} + +func (CronJobArgs) ElementType() reflect.Type { + return reflect.TypeOf((*cronJobArgs)(nil)).Elem() +} + +type CronJobInput interface { + pulumi.Input + + ToCronJobOutput() CronJobOutput + ToCronJobOutputWithContext(ctx context.Context) CronJobOutput +} + +func (*CronJob) ElementType() reflect.Type { + return reflect.TypeOf((*CronJob)(nil)) +} + +func (i *CronJob) ToCronJobOutput() CronJobOutput { + return i.ToCronJobOutputWithContext(context.Background()) +} + +func (i *CronJob) ToCronJobOutputWithContext(ctx context.Context) CronJobOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobOutput) +} + +func (i *CronJob) ToCronJobPtrOutput() CronJobPtrOutput { + return i.ToCronJobPtrOutputWithContext(context.Background()) +} + +func (i *CronJob) ToCronJobPtrOutputWithContext(ctx context.Context) CronJobPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobPtrOutput) +} + +type CronJobPtrInput interface { + pulumi.Input + + ToCronJobPtrOutput() CronJobPtrOutput + ToCronJobPtrOutputWithContext(ctx context.Context) CronJobPtrOutput +} + +type cronJobPtrType CronJobArgs + +func (*cronJobPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CronJob)(nil)) +} + +func (i *cronJobPtrType) ToCronJobPtrOutput() CronJobPtrOutput { + return i.ToCronJobPtrOutputWithContext(context.Background()) +} + +func (i *cronJobPtrType) ToCronJobPtrOutputWithContext(ctx context.Context) CronJobPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobPtrOutput) +} + +// CronJobArrayInput is an input type that accepts CronJobArray and CronJobArrayOutput values. +// You can construct a concrete instance of `CronJobArrayInput` via: +// +// CronJobArray{ CronJobArgs{...} } +type CronJobArrayInput interface { + pulumi.Input + + ToCronJobArrayOutput() CronJobArrayOutput + ToCronJobArrayOutputWithContext(context.Context) CronJobArrayOutput +} + +type CronJobArray []CronJobInput + +func (CronJobArray) ElementType() reflect.Type { + return reflect.TypeOf(([]*CronJob)(nil)) +} + +func (i CronJobArray) ToCronJobArrayOutput() CronJobArrayOutput { + return i.ToCronJobArrayOutputWithContext(context.Background()) +} + +func (i CronJobArray) ToCronJobArrayOutputWithContext(ctx context.Context) CronJobArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobArrayOutput) +} + +// CronJobMapInput is an input type that accepts CronJobMap and CronJobMapOutput values. +// You can construct a concrete instance of `CronJobMapInput` via: +// +// CronJobMap{ "key": CronJobArgs{...} } +type CronJobMapInput interface { + pulumi.Input + + ToCronJobMapOutput() CronJobMapOutput + ToCronJobMapOutputWithContext(context.Context) CronJobMapOutput +} + +type CronJobMap map[string]CronJobInput + +func (CronJobMap) ElementType() reflect.Type { + return reflect.TypeOf((map[string]*CronJob)(nil)) +} + +func (i CronJobMap) ToCronJobMapOutput() CronJobMapOutput { + return i.ToCronJobMapOutputWithContext(context.Background()) +} + +func (i CronJobMap) ToCronJobMapOutputWithContext(ctx context.Context) CronJobMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobMapOutput) +} + +type CronJobOutput struct { + *pulumi.OutputState +} + +func (CronJobOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CronJob)(nil)) +} + +func (o CronJobOutput) ToCronJobOutput() CronJobOutput { + return o +} + +func (o CronJobOutput) ToCronJobOutputWithContext(ctx context.Context) CronJobOutput { + return o +} + +func (o CronJobOutput) ToCronJobPtrOutput() CronJobPtrOutput { + return o.ToCronJobPtrOutputWithContext(context.Background()) +} + +func (o CronJobOutput) ToCronJobPtrOutputWithContext(ctx context.Context) CronJobPtrOutput { + return o.ApplyT(func(v CronJob) *CronJob { + return &v + }).(CronJobPtrOutput) +} + +type CronJobPtrOutput struct { + *pulumi.OutputState +} + +func (CronJobPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CronJob)(nil)) +} + +func (o CronJobPtrOutput) ToCronJobPtrOutput() CronJobPtrOutput { + return o +} + +func (o CronJobPtrOutput) ToCronJobPtrOutputWithContext(ctx context.Context) CronJobPtrOutput { + return o +} + +type CronJobArrayOutput struct{ *pulumi.OutputState } + +func (CronJobArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]CronJob)(nil)) +} + +func (o CronJobArrayOutput) ToCronJobArrayOutput() CronJobArrayOutput { + return o +} + +func (o CronJobArrayOutput) ToCronJobArrayOutputWithContext(ctx context.Context) CronJobArrayOutput { + return o +} + +func (o CronJobArrayOutput) Index(i pulumi.IntInput) CronJobOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) CronJob { + return vs[0].([]CronJob)[vs[1].(int)] + }).(CronJobOutput) +} + +type CronJobMapOutput struct{ *pulumi.OutputState } + +func (CronJobMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]CronJob)(nil)) +} + +func (o CronJobMapOutput) ToCronJobMapOutput() CronJobMapOutput { + return o +} + +func (o CronJobMapOutput) ToCronJobMapOutputWithContext(ctx context.Context) CronJobMapOutput { + return o +} + +func (o CronJobMapOutput) MapIndex(k pulumi.StringInput) CronJobOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) CronJob { + return vs[0].(map[string]CronJob)[vs[1].(string)] + }).(CronJobOutput) +} + +func init() { + pulumi.RegisterOutputType(CronJobOutput{}) + pulumi.RegisterOutputType(CronJobPtrOutput{}) + pulumi.RegisterOutputType(CronJobArrayOutput{}) + pulumi.RegisterOutputType(CronJobMapOutput{}) +} diff --git a/sdk/go/kubernetes/batch/v1/cronJobList.go b/sdk/go/kubernetes/batch/v1/cronJobList.go new file mode 100644 index 0000000000..bdbf56f2b0 --- /dev/null +++ b/sdk/go/kubernetes/batch/v1/cronJobList.go @@ -0,0 +1,300 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1 + +import ( + "context" + "reflect" + + "github.com/pkg/errors" + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// CronJobList is a collection of cron jobs. +type CronJobList struct { + pulumi.CustomResourceState + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` + // items is the list of CronJobs. + Items CronJobTypeArrayOutput `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrOutput `pulumi:"metadata"` +} + +// NewCronJobList registers a new resource with the given unique name, arguments, and options. +func NewCronJobList(ctx *pulumi.Context, + name string, args *CronJobListArgs, opts ...pulumi.ResourceOption) (*CronJobList, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Items == nil { + return nil, errors.New("invalid value for required argument 'Items'") + } + args.ApiVersion = pulumi.StringPtr("batch/v1") + args.Kind = pulumi.StringPtr("CronJobList") + var resource CronJobList + err := ctx.RegisterResource("kubernetes:batch/v1:CronJobList", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetCronJobList gets an existing CronJobList resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetCronJobList(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *CronJobListState, opts ...pulumi.ResourceOption) (*CronJobList, error) { + var resource CronJobList + err := ctx.ReadResource("kubernetes:batch/v1:CronJobList", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering CronJobList resources. +type cronJobListState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // items is the list of CronJobs. + Items []CronJobType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +type CronJobListState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // items is the list of CronJobs. + Items CronJobTypeArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput +} + +func (CronJobListState) ElementType() reflect.Type { + return reflect.TypeOf((*cronJobListState)(nil)).Elem() +} + +type cronJobListArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // items is the list of CronJobs. + Items []CronJobType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +// The set of arguments for constructing a CronJobList resource. +type CronJobListArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // items is the list of CronJobs. + Items CronJobTypeArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput +} + +func (CronJobListArgs) ElementType() reflect.Type { + return reflect.TypeOf((*cronJobListArgs)(nil)).Elem() +} + +type CronJobListInput interface { + pulumi.Input + + ToCronJobListOutput() CronJobListOutput + ToCronJobListOutputWithContext(ctx context.Context) CronJobListOutput +} + +func (*CronJobList) ElementType() reflect.Type { + return reflect.TypeOf((*CronJobList)(nil)) +} + +func (i *CronJobList) ToCronJobListOutput() CronJobListOutput { + return i.ToCronJobListOutputWithContext(context.Background()) +} + +func (i *CronJobList) ToCronJobListOutputWithContext(ctx context.Context) CronJobListOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobListOutput) +} + +func (i *CronJobList) ToCronJobListPtrOutput() CronJobListPtrOutput { + return i.ToCronJobListPtrOutputWithContext(context.Background()) +} + +func (i *CronJobList) ToCronJobListPtrOutputWithContext(ctx context.Context) CronJobListPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobListPtrOutput) +} + +type CronJobListPtrInput interface { + pulumi.Input + + ToCronJobListPtrOutput() CronJobListPtrOutput + ToCronJobListPtrOutputWithContext(ctx context.Context) CronJobListPtrOutput +} + +type cronJobListPtrType CronJobListArgs + +func (*cronJobListPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CronJobList)(nil)) +} + +func (i *cronJobListPtrType) ToCronJobListPtrOutput() CronJobListPtrOutput { + return i.ToCronJobListPtrOutputWithContext(context.Background()) +} + +func (i *cronJobListPtrType) ToCronJobListPtrOutputWithContext(ctx context.Context) CronJobListPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobListPtrOutput) +} + +// CronJobListArrayInput is an input type that accepts CronJobListArray and CronJobListArrayOutput values. +// You can construct a concrete instance of `CronJobListArrayInput` via: +// +// CronJobListArray{ CronJobListArgs{...} } +type CronJobListArrayInput interface { + pulumi.Input + + ToCronJobListArrayOutput() CronJobListArrayOutput + ToCronJobListArrayOutputWithContext(context.Context) CronJobListArrayOutput +} + +type CronJobListArray []CronJobListInput + +func (CronJobListArray) ElementType() reflect.Type { + return reflect.TypeOf(([]*CronJobList)(nil)) +} + +func (i CronJobListArray) ToCronJobListArrayOutput() CronJobListArrayOutput { + return i.ToCronJobListArrayOutputWithContext(context.Background()) +} + +func (i CronJobListArray) ToCronJobListArrayOutputWithContext(ctx context.Context) CronJobListArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobListArrayOutput) +} + +// CronJobListMapInput is an input type that accepts CronJobListMap and CronJobListMapOutput values. +// You can construct a concrete instance of `CronJobListMapInput` via: +// +// CronJobListMap{ "key": CronJobListArgs{...} } +type CronJobListMapInput interface { + pulumi.Input + + ToCronJobListMapOutput() CronJobListMapOutput + ToCronJobListMapOutputWithContext(context.Context) CronJobListMapOutput +} + +type CronJobListMap map[string]CronJobListInput + +func (CronJobListMap) ElementType() reflect.Type { + return reflect.TypeOf((map[string]*CronJobList)(nil)) +} + +func (i CronJobListMap) ToCronJobListMapOutput() CronJobListMapOutput { + return i.ToCronJobListMapOutputWithContext(context.Background()) +} + +func (i CronJobListMap) ToCronJobListMapOutputWithContext(ctx context.Context) CronJobListMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobListMapOutput) +} + +type CronJobListOutput struct { + *pulumi.OutputState +} + +func (CronJobListOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CronJobList)(nil)) +} + +func (o CronJobListOutput) ToCronJobListOutput() CronJobListOutput { + return o +} + +func (o CronJobListOutput) ToCronJobListOutputWithContext(ctx context.Context) CronJobListOutput { + return o +} + +func (o CronJobListOutput) ToCronJobListPtrOutput() CronJobListPtrOutput { + return o.ToCronJobListPtrOutputWithContext(context.Background()) +} + +func (o CronJobListOutput) ToCronJobListPtrOutputWithContext(ctx context.Context) CronJobListPtrOutput { + return o.ApplyT(func(v CronJobList) *CronJobList { + return &v + }).(CronJobListPtrOutput) +} + +type CronJobListPtrOutput struct { + *pulumi.OutputState +} + +func (CronJobListPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CronJobList)(nil)) +} + +func (o CronJobListPtrOutput) ToCronJobListPtrOutput() CronJobListPtrOutput { + return o +} + +func (o CronJobListPtrOutput) ToCronJobListPtrOutputWithContext(ctx context.Context) CronJobListPtrOutput { + return o +} + +type CronJobListArrayOutput struct{ *pulumi.OutputState } + +func (CronJobListArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]CronJobList)(nil)) +} + +func (o CronJobListArrayOutput) ToCronJobListArrayOutput() CronJobListArrayOutput { + return o +} + +func (o CronJobListArrayOutput) ToCronJobListArrayOutputWithContext(ctx context.Context) CronJobListArrayOutput { + return o +} + +func (o CronJobListArrayOutput) Index(i pulumi.IntInput) CronJobListOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) CronJobList { + return vs[0].([]CronJobList)[vs[1].(int)] + }).(CronJobListOutput) +} + +type CronJobListMapOutput struct{ *pulumi.OutputState } + +func (CronJobListMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]CronJobList)(nil)) +} + +func (o CronJobListMapOutput) ToCronJobListMapOutput() CronJobListMapOutput { + return o +} + +func (o CronJobListMapOutput) ToCronJobListMapOutputWithContext(ctx context.Context) CronJobListMapOutput { + return o +} + +func (o CronJobListMapOutput) MapIndex(k pulumi.StringInput) CronJobListOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) CronJobList { + return vs[0].(map[string]CronJobList)[vs[1].(string)] + }).(CronJobListOutput) +} + +func init() { + pulumi.RegisterOutputType(CronJobListOutput{}) + pulumi.RegisterOutputType(CronJobListPtrOutput{}) + pulumi.RegisterOutputType(CronJobListArrayOutput{}) + pulumi.RegisterOutputType(CronJobListMapOutput{}) +} diff --git a/sdk/go/kubernetes/batch/v1/init.go b/sdk/go/kubernetes/batch/v1/init.go index 6093a617a6..8ed3c07908 100644 --- a/sdk/go/kubernetes/batch/v1/init.go +++ b/sdk/go/kubernetes/batch/v1/init.go @@ -21,6 +21,10 @@ func (m *module) Version() semver.Version { func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { + case "kubernetes:batch/v1:CronJob": + r, err = NewCronJob(ctx, name, nil, pulumi.URN_(urn)) + case "kubernetes:batch/v1:CronJobList": + r, err = NewCronJobList(ctx, name, nil, pulumi.URN_(urn)) case "kubernetes:batch/v1:Job": r, err = NewJob(ctx, name, nil, pulumi.URN_(urn)) case "kubernetes:batch/v1:JobList": diff --git a/sdk/go/kubernetes/batch/v1/pulumiTypes.go b/sdk/go/kubernetes/batch/v1/pulumiTypes.go index fe8088af67..189d0e33b4 100644 --- a/sdk/go/kubernetes/batch/v1/pulumiTypes.go +++ b/sdk/go/kubernetes/batch/v1/pulumiTypes.go @@ -12,6 +12,644 @@ import ( "github.com/pulumi/pulumi/sdk/v2/go/pulumi" ) +// CronJob represents the configuration of a single cron job. +type CronJobType struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *CronJobSpec `pulumi:"spec"` + // Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *CronJobStatus `pulumi:"status"` +} + +// CronJobTypeInput is an input type that accepts CronJobTypeArgs and CronJobTypeOutput values. +// You can construct a concrete instance of `CronJobTypeInput` via: +// +// CronJobTypeArgs{...} +type CronJobTypeInput interface { + pulumi.Input + + ToCronJobTypeOutput() CronJobTypeOutput + ToCronJobTypeOutputWithContext(context.Context) CronJobTypeOutput +} + +// CronJob represents the configuration of a single cron job. +type CronJobTypeArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"` + // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec CronJobSpecPtrInput `pulumi:"spec"` + // Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status CronJobStatusPtrInput `pulumi:"status"` +} + +func (CronJobTypeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CronJobType)(nil)).Elem() +} + +func (i CronJobTypeArgs) ToCronJobTypeOutput() CronJobTypeOutput { + return i.ToCronJobTypeOutputWithContext(context.Background()) +} + +func (i CronJobTypeArgs) ToCronJobTypeOutputWithContext(ctx context.Context) CronJobTypeOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobTypeOutput) +} + +// CronJobTypeArrayInput is an input type that accepts CronJobTypeArray and CronJobTypeArrayOutput values. +// You can construct a concrete instance of `CronJobTypeArrayInput` via: +// +// CronJobTypeArray{ CronJobTypeArgs{...} } +type CronJobTypeArrayInput interface { + pulumi.Input + + ToCronJobTypeArrayOutput() CronJobTypeArrayOutput + ToCronJobTypeArrayOutputWithContext(context.Context) CronJobTypeArrayOutput +} + +type CronJobTypeArray []CronJobTypeInput + +func (CronJobTypeArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]CronJobType)(nil)).Elem() +} + +func (i CronJobTypeArray) ToCronJobTypeArrayOutput() CronJobTypeArrayOutput { + return i.ToCronJobTypeArrayOutputWithContext(context.Background()) +} + +func (i CronJobTypeArray) ToCronJobTypeArrayOutputWithContext(ctx context.Context) CronJobTypeArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobTypeArrayOutput) +} + +// CronJob represents the configuration of a single cron job. +type CronJobTypeOutput struct{ *pulumi.OutputState } + +func (CronJobTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CronJobType)(nil)).Elem() +} + +func (o CronJobTypeOutput) ToCronJobTypeOutput() CronJobTypeOutput { + return o +} + +func (o CronJobTypeOutput) ToCronJobTypeOutputWithContext(ctx context.Context) CronJobTypeOutput { + return o +} + +// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +func (o CronJobTypeOutput) ApiVersion() pulumi.StringPtrOutput { + return o.ApplyT(func(v CronJobType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) +} + +// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +func (o CronJobTypeOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v CronJobType) *string { return v.Kind }).(pulumi.StringPtrOutput) +} + +// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o CronJobTypeOutput) Metadata() metav1.ObjectMetaPtrOutput { + return o.ApplyT(func(v CronJobType) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput) +} + +// Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +func (o CronJobTypeOutput) Spec() CronJobSpecPtrOutput { + return o.ApplyT(func(v CronJobType) *CronJobSpec { return v.Spec }).(CronJobSpecPtrOutput) +} + +// Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +func (o CronJobTypeOutput) Status() CronJobStatusPtrOutput { + return o.ApplyT(func(v CronJobType) *CronJobStatus { return v.Status }).(CronJobStatusPtrOutput) +} + +type CronJobTypeArrayOutput struct{ *pulumi.OutputState } + +func (CronJobTypeArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]CronJobType)(nil)).Elem() +} + +func (o CronJobTypeArrayOutput) ToCronJobTypeArrayOutput() CronJobTypeArrayOutput { + return o +} + +func (o CronJobTypeArrayOutput) ToCronJobTypeArrayOutputWithContext(ctx context.Context) CronJobTypeArrayOutput { + return o +} + +func (o CronJobTypeArrayOutput) Index(i pulumi.IntInput) CronJobTypeOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) CronJobType { + return vs[0].([]CronJobType)[vs[1].(int)] + }).(CronJobTypeOutput) +} + +// CronJobList is a collection of cron jobs. +type CronJobListType struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // items is the list of CronJobs. + Items []CronJobType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +// CronJobListTypeInput is an input type that accepts CronJobListTypeArgs and CronJobListTypeOutput values. +// You can construct a concrete instance of `CronJobListTypeInput` via: +// +// CronJobListTypeArgs{...} +type CronJobListTypeInput interface { + pulumi.Input + + ToCronJobListTypeOutput() CronJobListTypeOutput + ToCronJobListTypeOutputWithContext(context.Context) CronJobListTypeOutput +} + +// CronJobList is a collection of cron jobs. +type CronJobListTypeArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` + // items is the list of CronJobs. + Items CronJobTypeArrayInput `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput `pulumi:"kind"` + // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput `pulumi:"metadata"` +} + +func (CronJobListTypeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CronJobListType)(nil)).Elem() +} + +func (i CronJobListTypeArgs) ToCronJobListTypeOutput() CronJobListTypeOutput { + return i.ToCronJobListTypeOutputWithContext(context.Background()) +} + +func (i CronJobListTypeArgs) ToCronJobListTypeOutputWithContext(ctx context.Context) CronJobListTypeOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobListTypeOutput) +} + +// CronJobList is a collection of cron jobs. +type CronJobListTypeOutput struct{ *pulumi.OutputState } + +func (CronJobListTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CronJobListType)(nil)).Elem() +} + +func (o CronJobListTypeOutput) ToCronJobListTypeOutput() CronJobListTypeOutput { + return o +} + +func (o CronJobListTypeOutput) ToCronJobListTypeOutputWithContext(ctx context.Context) CronJobListTypeOutput { + return o +} + +// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +func (o CronJobListTypeOutput) ApiVersion() pulumi.StringPtrOutput { + return o.ApplyT(func(v CronJobListType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) +} + +// items is the list of CronJobs. +func (o CronJobListTypeOutput) Items() CronJobTypeArrayOutput { + return o.ApplyT(func(v CronJobListType) []CronJobType { return v.Items }).(CronJobTypeArrayOutput) +} + +// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +func (o CronJobListTypeOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v CronJobListType) *string { return v.Kind }).(pulumi.StringPtrOutput) +} + +// Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o CronJobListTypeOutput) Metadata() metav1.ListMetaPtrOutput { + return o.ApplyT(func(v CronJobListType) *metav1.ListMeta { return v.Metadata }).(metav1.ListMetaPtrOutput) +} + +// CronJobSpec describes how the job execution will look like and when it will actually run. +type CronJobSpec struct { + // Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one + ConcurrencyPolicy *string `pulumi:"concurrencyPolicy"` + // The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. + FailedJobsHistoryLimit *int `pulumi:"failedJobsHistoryLimit"` + // Specifies the job that will be created when executing a CronJob. + JobTemplate JobTemplateSpec `pulumi:"jobTemplate"` + // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + Schedule string `pulumi:"schedule"` + // Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. + StartingDeadlineSeconds *int `pulumi:"startingDeadlineSeconds"` + // The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. + SuccessfulJobsHistoryLimit *int `pulumi:"successfulJobsHistoryLimit"` + // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. + Suspend *bool `pulumi:"suspend"` +} + +// CronJobSpecInput is an input type that accepts CronJobSpecArgs and CronJobSpecOutput values. +// You can construct a concrete instance of `CronJobSpecInput` via: +// +// CronJobSpecArgs{...} +type CronJobSpecInput interface { + pulumi.Input + + ToCronJobSpecOutput() CronJobSpecOutput + ToCronJobSpecOutputWithContext(context.Context) CronJobSpecOutput +} + +// CronJobSpec describes how the job execution will look like and when it will actually run. +type CronJobSpecArgs struct { + // Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one + ConcurrencyPolicy pulumi.StringPtrInput `pulumi:"concurrencyPolicy"` + // The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. + FailedJobsHistoryLimit pulumi.IntPtrInput `pulumi:"failedJobsHistoryLimit"` + // Specifies the job that will be created when executing a CronJob. + JobTemplate JobTemplateSpecInput `pulumi:"jobTemplate"` + // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + Schedule pulumi.StringInput `pulumi:"schedule"` + // Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. + StartingDeadlineSeconds pulumi.IntPtrInput `pulumi:"startingDeadlineSeconds"` + // The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. + SuccessfulJobsHistoryLimit pulumi.IntPtrInput `pulumi:"successfulJobsHistoryLimit"` + // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. + Suspend pulumi.BoolPtrInput `pulumi:"suspend"` +} + +func (CronJobSpecArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CronJobSpec)(nil)).Elem() +} + +func (i CronJobSpecArgs) ToCronJobSpecOutput() CronJobSpecOutput { + return i.ToCronJobSpecOutputWithContext(context.Background()) +} + +func (i CronJobSpecArgs) ToCronJobSpecOutputWithContext(ctx context.Context) CronJobSpecOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobSpecOutput) +} + +func (i CronJobSpecArgs) ToCronJobSpecPtrOutput() CronJobSpecPtrOutput { + return i.ToCronJobSpecPtrOutputWithContext(context.Background()) +} + +func (i CronJobSpecArgs) ToCronJobSpecPtrOutputWithContext(ctx context.Context) CronJobSpecPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobSpecOutput).ToCronJobSpecPtrOutputWithContext(ctx) +} + +// CronJobSpecPtrInput is an input type that accepts CronJobSpecArgs, CronJobSpecPtr and CronJobSpecPtrOutput values. +// You can construct a concrete instance of `CronJobSpecPtrInput` via: +// +// CronJobSpecArgs{...} +// +// or: +// +// nil +type CronJobSpecPtrInput interface { + pulumi.Input + + ToCronJobSpecPtrOutput() CronJobSpecPtrOutput + ToCronJobSpecPtrOutputWithContext(context.Context) CronJobSpecPtrOutput +} + +type cronJobSpecPtrType CronJobSpecArgs + +func CronJobSpecPtr(v *CronJobSpecArgs) CronJobSpecPtrInput { + return (*cronJobSpecPtrType)(v) +} + +func (*cronJobSpecPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CronJobSpec)(nil)).Elem() +} + +func (i *cronJobSpecPtrType) ToCronJobSpecPtrOutput() CronJobSpecPtrOutput { + return i.ToCronJobSpecPtrOutputWithContext(context.Background()) +} + +func (i *cronJobSpecPtrType) ToCronJobSpecPtrOutputWithContext(ctx context.Context) CronJobSpecPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobSpecPtrOutput) +} + +// CronJobSpec describes how the job execution will look like and when it will actually run. +type CronJobSpecOutput struct{ *pulumi.OutputState } + +func (CronJobSpecOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CronJobSpec)(nil)).Elem() +} + +func (o CronJobSpecOutput) ToCronJobSpecOutput() CronJobSpecOutput { + return o +} + +func (o CronJobSpecOutput) ToCronJobSpecOutputWithContext(ctx context.Context) CronJobSpecOutput { + return o +} + +func (o CronJobSpecOutput) ToCronJobSpecPtrOutput() CronJobSpecPtrOutput { + return o.ToCronJobSpecPtrOutputWithContext(context.Background()) +} + +func (o CronJobSpecOutput) ToCronJobSpecPtrOutputWithContext(ctx context.Context) CronJobSpecPtrOutput { + return o.ApplyT(func(v CronJobSpec) *CronJobSpec { + return &v + }).(CronJobSpecPtrOutput) +} + +// Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one +func (o CronJobSpecOutput) ConcurrencyPolicy() pulumi.StringPtrOutput { + return o.ApplyT(func(v CronJobSpec) *string { return v.ConcurrencyPolicy }).(pulumi.StringPtrOutput) +} + +// The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. +func (o CronJobSpecOutput) FailedJobsHistoryLimit() pulumi.IntPtrOutput { + return o.ApplyT(func(v CronJobSpec) *int { return v.FailedJobsHistoryLimit }).(pulumi.IntPtrOutput) +} + +// Specifies the job that will be created when executing a CronJob. +func (o CronJobSpecOutput) JobTemplate() JobTemplateSpecOutput { + return o.ApplyT(func(v CronJobSpec) JobTemplateSpec { return v.JobTemplate }).(JobTemplateSpecOutput) +} + +// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. +func (o CronJobSpecOutput) Schedule() pulumi.StringOutput { + return o.ApplyT(func(v CronJobSpec) string { return v.Schedule }).(pulumi.StringOutput) +} + +// Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. +func (o CronJobSpecOutput) StartingDeadlineSeconds() pulumi.IntPtrOutput { + return o.ApplyT(func(v CronJobSpec) *int { return v.StartingDeadlineSeconds }).(pulumi.IntPtrOutput) +} + +// The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. +func (o CronJobSpecOutput) SuccessfulJobsHistoryLimit() pulumi.IntPtrOutput { + return o.ApplyT(func(v CronJobSpec) *int { return v.SuccessfulJobsHistoryLimit }).(pulumi.IntPtrOutput) +} + +// This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. +func (o CronJobSpecOutput) Suspend() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CronJobSpec) *bool { return v.Suspend }).(pulumi.BoolPtrOutput) +} + +type CronJobSpecPtrOutput struct{ *pulumi.OutputState } + +func (CronJobSpecPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CronJobSpec)(nil)).Elem() +} + +func (o CronJobSpecPtrOutput) ToCronJobSpecPtrOutput() CronJobSpecPtrOutput { + return o +} + +func (o CronJobSpecPtrOutput) ToCronJobSpecPtrOutputWithContext(ctx context.Context) CronJobSpecPtrOutput { + return o +} + +func (o CronJobSpecPtrOutput) Elem() CronJobSpecOutput { + return o.ApplyT(func(v *CronJobSpec) CronJobSpec { return *v }).(CronJobSpecOutput) +} + +// Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one +func (o CronJobSpecPtrOutput) ConcurrencyPolicy() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CronJobSpec) *string { + if v == nil { + return nil + } + return v.ConcurrencyPolicy + }).(pulumi.StringPtrOutput) +} + +// The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. +func (o CronJobSpecPtrOutput) FailedJobsHistoryLimit() pulumi.IntPtrOutput { + return o.ApplyT(func(v *CronJobSpec) *int { + if v == nil { + return nil + } + return v.FailedJobsHistoryLimit + }).(pulumi.IntPtrOutput) +} + +// Specifies the job that will be created when executing a CronJob. +func (o CronJobSpecPtrOutput) JobTemplate() JobTemplateSpecPtrOutput { + return o.ApplyT(func(v *CronJobSpec) *JobTemplateSpec { + if v == nil { + return nil + } + return &v.JobTemplate + }).(JobTemplateSpecPtrOutput) +} + +// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. +func (o CronJobSpecPtrOutput) Schedule() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CronJobSpec) *string { + if v == nil { + return nil + } + return &v.Schedule + }).(pulumi.StringPtrOutput) +} + +// Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. +func (o CronJobSpecPtrOutput) StartingDeadlineSeconds() pulumi.IntPtrOutput { + return o.ApplyT(func(v *CronJobSpec) *int { + if v == nil { + return nil + } + return v.StartingDeadlineSeconds + }).(pulumi.IntPtrOutput) +} + +// The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. +func (o CronJobSpecPtrOutput) SuccessfulJobsHistoryLimit() pulumi.IntPtrOutput { + return o.ApplyT(func(v *CronJobSpec) *int { + if v == nil { + return nil + } + return v.SuccessfulJobsHistoryLimit + }).(pulumi.IntPtrOutput) +} + +// This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. +func (o CronJobSpecPtrOutput) Suspend() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CronJobSpec) *bool { + if v == nil { + return nil + } + return v.Suspend + }).(pulumi.BoolPtrOutput) +} + +// CronJobStatus represents the current state of a cron job. +type CronJobStatus struct { + // A list of pointers to currently running jobs. + Active []corev1.ObjectReference `pulumi:"active"` + // Information when was the last time the job was successfully scheduled. + LastScheduleTime *string `pulumi:"lastScheduleTime"` + // Information when was the last time the job successfully completed. + LastSuccessfulTime *string `pulumi:"lastSuccessfulTime"` +} + +// CronJobStatusInput is an input type that accepts CronJobStatusArgs and CronJobStatusOutput values. +// You can construct a concrete instance of `CronJobStatusInput` via: +// +// CronJobStatusArgs{...} +type CronJobStatusInput interface { + pulumi.Input + + ToCronJobStatusOutput() CronJobStatusOutput + ToCronJobStatusOutputWithContext(context.Context) CronJobStatusOutput +} + +// CronJobStatus represents the current state of a cron job. +type CronJobStatusArgs struct { + // A list of pointers to currently running jobs. + Active corev1.ObjectReferenceArrayInput `pulumi:"active"` + // Information when was the last time the job was successfully scheduled. + LastScheduleTime pulumi.StringPtrInput `pulumi:"lastScheduleTime"` + // Information when was the last time the job successfully completed. + LastSuccessfulTime pulumi.StringPtrInput `pulumi:"lastSuccessfulTime"` +} + +func (CronJobStatusArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CronJobStatus)(nil)).Elem() +} + +func (i CronJobStatusArgs) ToCronJobStatusOutput() CronJobStatusOutput { + return i.ToCronJobStatusOutputWithContext(context.Background()) +} + +func (i CronJobStatusArgs) ToCronJobStatusOutputWithContext(ctx context.Context) CronJobStatusOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobStatusOutput) +} + +func (i CronJobStatusArgs) ToCronJobStatusPtrOutput() CronJobStatusPtrOutput { + return i.ToCronJobStatusPtrOutputWithContext(context.Background()) +} + +func (i CronJobStatusArgs) ToCronJobStatusPtrOutputWithContext(ctx context.Context) CronJobStatusPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobStatusOutput).ToCronJobStatusPtrOutputWithContext(ctx) +} + +// CronJobStatusPtrInput is an input type that accepts CronJobStatusArgs, CronJobStatusPtr and CronJobStatusPtrOutput values. +// You can construct a concrete instance of `CronJobStatusPtrInput` via: +// +// CronJobStatusArgs{...} +// +// or: +// +// nil +type CronJobStatusPtrInput interface { + pulumi.Input + + ToCronJobStatusPtrOutput() CronJobStatusPtrOutput + ToCronJobStatusPtrOutputWithContext(context.Context) CronJobStatusPtrOutput +} + +type cronJobStatusPtrType CronJobStatusArgs + +func CronJobStatusPtr(v *CronJobStatusArgs) CronJobStatusPtrInput { + return (*cronJobStatusPtrType)(v) +} + +func (*cronJobStatusPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CronJobStatus)(nil)).Elem() +} + +func (i *cronJobStatusPtrType) ToCronJobStatusPtrOutput() CronJobStatusPtrOutput { + return i.ToCronJobStatusPtrOutputWithContext(context.Background()) +} + +func (i *cronJobStatusPtrType) ToCronJobStatusPtrOutputWithContext(ctx context.Context) CronJobStatusPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CronJobStatusPtrOutput) +} + +// CronJobStatus represents the current state of a cron job. +type CronJobStatusOutput struct{ *pulumi.OutputState } + +func (CronJobStatusOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CronJobStatus)(nil)).Elem() +} + +func (o CronJobStatusOutput) ToCronJobStatusOutput() CronJobStatusOutput { + return o +} + +func (o CronJobStatusOutput) ToCronJobStatusOutputWithContext(ctx context.Context) CronJobStatusOutput { + return o +} + +func (o CronJobStatusOutput) ToCronJobStatusPtrOutput() CronJobStatusPtrOutput { + return o.ToCronJobStatusPtrOutputWithContext(context.Background()) +} + +func (o CronJobStatusOutput) ToCronJobStatusPtrOutputWithContext(ctx context.Context) CronJobStatusPtrOutput { + return o.ApplyT(func(v CronJobStatus) *CronJobStatus { + return &v + }).(CronJobStatusPtrOutput) +} + +// A list of pointers to currently running jobs. +func (o CronJobStatusOutput) Active() corev1.ObjectReferenceArrayOutput { + return o.ApplyT(func(v CronJobStatus) []corev1.ObjectReference { return v.Active }).(corev1.ObjectReferenceArrayOutput) +} + +// Information when was the last time the job was successfully scheduled. +func (o CronJobStatusOutput) LastScheduleTime() pulumi.StringPtrOutput { + return o.ApplyT(func(v CronJobStatus) *string { return v.LastScheduleTime }).(pulumi.StringPtrOutput) +} + +// Information when was the last time the job successfully completed. +func (o CronJobStatusOutput) LastSuccessfulTime() pulumi.StringPtrOutput { + return o.ApplyT(func(v CronJobStatus) *string { return v.LastSuccessfulTime }).(pulumi.StringPtrOutput) +} + +type CronJobStatusPtrOutput struct{ *pulumi.OutputState } + +func (CronJobStatusPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CronJobStatus)(nil)).Elem() +} + +func (o CronJobStatusPtrOutput) ToCronJobStatusPtrOutput() CronJobStatusPtrOutput { + return o +} + +func (o CronJobStatusPtrOutput) ToCronJobStatusPtrOutputWithContext(ctx context.Context) CronJobStatusPtrOutput { + return o +} + +func (o CronJobStatusPtrOutput) Elem() CronJobStatusOutput { + return o.ApplyT(func(v *CronJobStatus) CronJobStatus { return *v }).(CronJobStatusOutput) +} + +// A list of pointers to currently running jobs. +func (o CronJobStatusPtrOutput) Active() corev1.ObjectReferenceArrayOutput { + return o.ApplyT(func(v *CronJobStatus) []corev1.ObjectReference { + if v == nil { + return nil + } + return v.Active + }).(corev1.ObjectReferenceArrayOutput) +} + +// Information when was the last time the job was successfully scheduled. +func (o CronJobStatusPtrOutput) LastScheduleTime() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CronJobStatus) *string { + if v == nil { + return nil + } + return v.LastScheduleTime + }).(pulumi.StringPtrOutput) +} + +// Information when was the last time the job successfully completed. +func (o CronJobStatusPtrOutput) LastSuccessfulTime() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CronJobStatus) *string { + if v == nil { + return nil + } + return v.LastSuccessfulTime + }).(pulumi.StringPtrOutput) +} + // Job represents the configuration of a single job. // // This resource waits until its status is ready before registering success @@ -422,10 +1060,18 @@ func (o JobListTypeOutput) Metadata() metav1.ListMetaPtrOutput { // JobSpec describes how the job execution will look like. type JobSpec struct { - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer + // Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. ActiveDeadlineSeconds *int `pulumi:"activeDeadlineSeconds"` // Specifies the number of retries before marking this job failed. Defaults to 6 BackoffLimit *int `pulumi:"backoffLimit"` + // CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. + // + // `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. + // + // `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. + // + // This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. + CompletionMode *string `pulumi:"completionMode"` // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ Completions *int `pulumi:"completions"` // manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector @@ -434,6 +1080,8 @@ type JobSpec struct { Parallelism *int `pulumi:"parallelism"` // A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors Selector *metav1.LabelSelector `pulumi:"selector"` + // Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. + Suspend *bool `pulumi:"suspend"` // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ Template corev1.PodTemplateSpec `pulumi:"template"` // ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. This field is alpha-level and is only honored by servers that enable the TTLAfterFinished feature. @@ -453,10 +1101,18 @@ type JobSpecInput interface { // JobSpec describes how the job execution will look like. type JobSpecArgs struct { - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer + // Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. ActiveDeadlineSeconds pulumi.IntPtrInput `pulumi:"activeDeadlineSeconds"` // Specifies the number of retries before marking this job failed. Defaults to 6 BackoffLimit pulumi.IntPtrInput `pulumi:"backoffLimit"` + // CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. + // + // `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. + // + // `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. + // + // This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. + CompletionMode pulumi.StringPtrInput `pulumi:"completionMode"` // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ Completions pulumi.IntPtrInput `pulumi:"completions"` // manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector @@ -465,6 +1121,8 @@ type JobSpecArgs struct { Parallelism pulumi.IntPtrInput `pulumi:"parallelism"` // A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors Selector metav1.LabelSelectorPtrInput `pulumi:"selector"` + // Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. + Suspend pulumi.BoolPtrInput `pulumi:"suspend"` // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ Template corev1.PodTemplateSpecInput `pulumi:"template"` // ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. This field is alpha-level and is only honored by servers that enable the TTLAfterFinished feature. @@ -549,7 +1207,7 @@ func (o JobSpecOutput) ToJobSpecPtrOutputWithContext(ctx context.Context) JobSpe }).(JobSpecPtrOutput) } -// Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer +// Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. func (o JobSpecOutput) ActiveDeadlineSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v JobSpec) *int { return v.ActiveDeadlineSeconds }).(pulumi.IntPtrOutput) } @@ -559,6 +1217,17 @@ func (o JobSpecOutput) BackoffLimit() pulumi.IntPtrOutput { return o.ApplyT(func(v JobSpec) *int { return v.BackoffLimit }).(pulumi.IntPtrOutput) } +// CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. +// +// `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. +// +// `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. +// +// This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. +func (o JobSpecOutput) CompletionMode() pulumi.StringPtrOutput { + return o.ApplyT(func(v JobSpec) *string { return v.CompletionMode }).(pulumi.StringPtrOutput) +} + // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ func (o JobSpecOutput) Completions() pulumi.IntPtrOutput { return o.ApplyT(func(v JobSpec) *int { return v.Completions }).(pulumi.IntPtrOutput) @@ -579,6 +1248,11 @@ func (o JobSpecOutput) Selector() metav1.LabelSelectorPtrOutput { return o.ApplyT(func(v JobSpec) *metav1.LabelSelector { return v.Selector }).(metav1.LabelSelectorPtrOutput) } +// Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. +func (o JobSpecOutput) Suspend() pulumi.BoolPtrOutput { + return o.ApplyT(func(v JobSpec) *bool { return v.Suspend }).(pulumi.BoolPtrOutput) +} + // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ func (o JobSpecOutput) Template() corev1.PodTemplateSpecOutput { return o.ApplyT(func(v JobSpec) corev1.PodTemplateSpec { return v.Template }).(corev1.PodTemplateSpecOutput) @@ -607,7 +1281,7 @@ func (o JobSpecPtrOutput) Elem() JobSpecOutput { return o.ApplyT(func(v *JobSpec) JobSpec { return *v }).(JobSpecOutput) } -// Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer +// Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. func (o JobSpecPtrOutput) ActiveDeadlineSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *JobSpec) *int { if v == nil { @@ -627,6 +1301,22 @@ func (o JobSpecPtrOutput) BackoffLimit() pulumi.IntPtrOutput { }).(pulumi.IntPtrOutput) } +// CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. +// +// `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. +// +// `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. +// +// This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. +func (o JobSpecPtrOutput) CompletionMode() pulumi.StringPtrOutput { + return o.ApplyT(func(v *JobSpec) *string { + if v == nil { + return nil + } + return v.CompletionMode + }).(pulumi.StringPtrOutput) +} + // Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ func (o JobSpecPtrOutput) Completions() pulumi.IntPtrOutput { return o.ApplyT(func(v *JobSpec) *int { @@ -667,6 +1357,16 @@ func (o JobSpecPtrOutput) Selector() metav1.LabelSelectorPtrOutput { }).(metav1.LabelSelectorPtrOutput) } +// Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. +func (o JobSpecPtrOutput) Suspend() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *JobSpec) *bool { + if v == nil { + return nil + } + return v.Suspend + }).(pulumi.BoolPtrOutput) +} + // Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ func (o JobSpecPtrOutput) Template() corev1.PodTemplateSpecPtrOutput { return o.ApplyT(func(v *JobSpec) *corev1.PodTemplateSpec { @@ -691,13 +1391,15 @@ func (o JobSpecPtrOutput) TtlSecondsAfterFinished() pulumi.IntPtrOutput { type JobStatus struct { // The number of actively running pods. Active *int `pulumi:"active"` + // CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". + CompletedIndexes *string `pulumi:"completedIndexes"` // Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. CompletionTime *string `pulumi:"completionTime"` - // The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + // The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ Conditions []JobCondition `pulumi:"conditions"` // The number of pods which reached phase Failed. Failed *int `pulumi:"failed"` - // Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. + // Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. StartTime *string `pulumi:"startTime"` // The number of pods which reached phase Succeeded. Succeeded *int `pulumi:"succeeded"` @@ -718,13 +1420,15 @@ type JobStatusInput interface { type JobStatusArgs struct { // The number of actively running pods. Active pulumi.IntPtrInput `pulumi:"active"` + // CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". + CompletedIndexes pulumi.StringPtrInput `pulumi:"completedIndexes"` // Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. CompletionTime pulumi.StringPtrInput `pulumi:"completionTime"` - // The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + // The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ Conditions JobConditionArrayInput `pulumi:"conditions"` // The number of pods which reached phase Failed. Failed pulumi.IntPtrInput `pulumi:"failed"` - // Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. + // Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. StartTime pulumi.StringPtrInput `pulumi:"startTime"` // The number of pods which reached phase Succeeded. Succeeded pulumi.IntPtrInput `pulumi:"succeeded"` @@ -813,12 +1517,17 @@ func (o JobStatusOutput) Active() pulumi.IntPtrOutput { return o.ApplyT(func(v JobStatus) *int { return v.Active }).(pulumi.IntPtrOutput) } +// CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". +func (o JobStatusOutput) CompletedIndexes() pulumi.StringPtrOutput { + return o.ApplyT(func(v JobStatus) *string { return v.CompletedIndexes }).(pulumi.StringPtrOutput) +} + // Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. func (o JobStatusOutput) CompletionTime() pulumi.StringPtrOutput { return o.ApplyT(func(v JobStatus) *string { return v.CompletionTime }).(pulumi.StringPtrOutput) } -// The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +// The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ func (o JobStatusOutput) Conditions() JobConditionArrayOutput { return o.ApplyT(func(v JobStatus) []JobCondition { return v.Conditions }).(JobConditionArrayOutput) } @@ -828,7 +1537,7 @@ func (o JobStatusOutput) Failed() pulumi.IntPtrOutput { return o.ApplyT(func(v JobStatus) *int { return v.Failed }).(pulumi.IntPtrOutput) } -// Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +// Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. func (o JobStatusOutput) StartTime() pulumi.StringPtrOutput { return o.ApplyT(func(v JobStatus) *string { return v.StartTime }).(pulumi.StringPtrOutput) } @@ -866,6 +1575,16 @@ func (o JobStatusPtrOutput) Active() pulumi.IntPtrOutput { }).(pulumi.IntPtrOutput) } +// CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". +func (o JobStatusPtrOutput) CompletedIndexes() pulumi.StringPtrOutput { + return o.ApplyT(func(v *JobStatus) *string { + if v == nil { + return nil + } + return v.CompletedIndexes + }).(pulumi.StringPtrOutput) +} + // Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. func (o JobStatusPtrOutput) CompletionTime() pulumi.StringPtrOutput { return o.ApplyT(func(v *JobStatus) *string { @@ -876,7 +1595,7 @@ func (o JobStatusPtrOutput) CompletionTime() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } -// The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +// The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ func (o JobStatusPtrOutput) Conditions() JobConditionArrayOutput { return o.ApplyT(func(v *JobStatus) []JobCondition { if v == nil { @@ -896,7 +1615,7 @@ func (o JobStatusPtrOutput) Failed() pulumi.IntPtrOutput { }).(pulumi.IntPtrOutput) } -// Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +// Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. func (o JobStatusPtrOutput) StartTime() pulumi.StringPtrOutput { return o.ApplyT(func(v *JobStatus) *string { if v == nil { @@ -916,7 +1635,167 @@ func (o JobStatusPtrOutput) Succeeded() pulumi.IntPtrOutput { }).(pulumi.IntPtrOutput) } +// JobTemplateSpec describes the data a Job should have when created from a template +type JobTemplateSpec struct { + // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *JobSpec `pulumi:"spec"` +} + +// JobTemplateSpecInput is an input type that accepts JobTemplateSpecArgs and JobTemplateSpecOutput values. +// You can construct a concrete instance of `JobTemplateSpecInput` via: +// +// JobTemplateSpecArgs{...} +type JobTemplateSpecInput interface { + pulumi.Input + + ToJobTemplateSpecOutput() JobTemplateSpecOutput + ToJobTemplateSpecOutputWithContext(context.Context) JobTemplateSpecOutput +} + +// JobTemplateSpec describes the data a Job should have when created from a template +type JobTemplateSpecArgs struct { + // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"` + // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec JobSpecPtrInput `pulumi:"spec"` +} + +func (JobTemplateSpecArgs) ElementType() reflect.Type { + return reflect.TypeOf((*JobTemplateSpec)(nil)).Elem() +} + +func (i JobTemplateSpecArgs) ToJobTemplateSpecOutput() JobTemplateSpecOutput { + return i.ToJobTemplateSpecOutputWithContext(context.Background()) +} + +func (i JobTemplateSpecArgs) ToJobTemplateSpecOutputWithContext(ctx context.Context) JobTemplateSpecOutput { + return pulumi.ToOutputWithContext(ctx, i).(JobTemplateSpecOutput) +} + +func (i JobTemplateSpecArgs) ToJobTemplateSpecPtrOutput() JobTemplateSpecPtrOutput { + return i.ToJobTemplateSpecPtrOutputWithContext(context.Background()) +} + +func (i JobTemplateSpecArgs) ToJobTemplateSpecPtrOutputWithContext(ctx context.Context) JobTemplateSpecPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(JobTemplateSpecOutput).ToJobTemplateSpecPtrOutputWithContext(ctx) +} + +// JobTemplateSpecPtrInput is an input type that accepts JobTemplateSpecArgs, JobTemplateSpecPtr and JobTemplateSpecPtrOutput values. +// You can construct a concrete instance of `JobTemplateSpecPtrInput` via: +// +// JobTemplateSpecArgs{...} +// +// or: +// +// nil +type JobTemplateSpecPtrInput interface { + pulumi.Input + + ToJobTemplateSpecPtrOutput() JobTemplateSpecPtrOutput + ToJobTemplateSpecPtrOutputWithContext(context.Context) JobTemplateSpecPtrOutput +} + +type jobTemplateSpecPtrType JobTemplateSpecArgs + +func JobTemplateSpecPtr(v *JobTemplateSpecArgs) JobTemplateSpecPtrInput { + return (*jobTemplateSpecPtrType)(v) +} + +func (*jobTemplateSpecPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**JobTemplateSpec)(nil)).Elem() +} + +func (i *jobTemplateSpecPtrType) ToJobTemplateSpecPtrOutput() JobTemplateSpecPtrOutput { + return i.ToJobTemplateSpecPtrOutputWithContext(context.Background()) +} + +func (i *jobTemplateSpecPtrType) ToJobTemplateSpecPtrOutputWithContext(ctx context.Context) JobTemplateSpecPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(JobTemplateSpecPtrOutput) +} + +// JobTemplateSpec describes the data a Job should have when created from a template +type JobTemplateSpecOutput struct{ *pulumi.OutputState } + +func (JobTemplateSpecOutput) ElementType() reflect.Type { + return reflect.TypeOf((*JobTemplateSpec)(nil)).Elem() +} + +func (o JobTemplateSpecOutput) ToJobTemplateSpecOutput() JobTemplateSpecOutput { + return o +} + +func (o JobTemplateSpecOutput) ToJobTemplateSpecOutputWithContext(ctx context.Context) JobTemplateSpecOutput { + return o +} + +func (o JobTemplateSpecOutput) ToJobTemplateSpecPtrOutput() JobTemplateSpecPtrOutput { + return o.ToJobTemplateSpecPtrOutputWithContext(context.Background()) +} + +func (o JobTemplateSpecOutput) ToJobTemplateSpecPtrOutputWithContext(ctx context.Context) JobTemplateSpecPtrOutput { + return o.ApplyT(func(v JobTemplateSpec) *JobTemplateSpec { + return &v + }).(JobTemplateSpecPtrOutput) +} + +// Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o JobTemplateSpecOutput) Metadata() metav1.ObjectMetaPtrOutput { + return o.ApplyT(func(v JobTemplateSpec) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput) +} + +// Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +func (o JobTemplateSpecOutput) Spec() JobSpecPtrOutput { + return o.ApplyT(func(v JobTemplateSpec) *JobSpec { return v.Spec }).(JobSpecPtrOutput) +} + +type JobTemplateSpecPtrOutput struct{ *pulumi.OutputState } + +func (JobTemplateSpecPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**JobTemplateSpec)(nil)).Elem() +} + +func (o JobTemplateSpecPtrOutput) ToJobTemplateSpecPtrOutput() JobTemplateSpecPtrOutput { + return o +} + +func (o JobTemplateSpecPtrOutput) ToJobTemplateSpecPtrOutputWithContext(ctx context.Context) JobTemplateSpecPtrOutput { + return o +} + +func (o JobTemplateSpecPtrOutput) Elem() JobTemplateSpecOutput { + return o.ApplyT(func(v *JobTemplateSpec) JobTemplateSpec { return *v }).(JobTemplateSpecOutput) +} + +// Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o JobTemplateSpecPtrOutput) Metadata() metav1.ObjectMetaPtrOutput { + return o.ApplyT(func(v *JobTemplateSpec) *metav1.ObjectMeta { + if v == nil { + return nil + } + return v.Metadata + }).(metav1.ObjectMetaPtrOutput) +} + +// Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +func (o JobTemplateSpecPtrOutput) Spec() JobSpecPtrOutput { + return o.ApplyT(func(v *JobTemplateSpec) *JobSpec { + if v == nil { + return nil + } + return v.Spec + }).(JobSpecPtrOutput) +} + func init() { + pulumi.RegisterOutputType(CronJobTypeOutput{}) + pulumi.RegisterOutputType(CronJobTypeArrayOutput{}) + pulumi.RegisterOutputType(CronJobListTypeOutput{}) + pulumi.RegisterOutputType(CronJobSpecOutput{}) + pulumi.RegisterOutputType(CronJobSpecPtrOutput{}) + pulumi.RegisterOutputType(CronJobStatusOutput{}) + pulumi.RegisterOutputType(CronJobStatusPtrOutput{}) pulumi.RegisterOutputType(JobTypeOutput{}) pulumi.RegisterOutputType(JobTypeArrayOutput{}) pulumi.RegisterOutputType(JobConditionOutput{}) @@ -926,4 +1805,6 @@ func init() { pulumi.RegisterOutputType(JobSpecPtrOutput{}) pulumi.RegisterOutputType(JobStatusOutput{}) pulumi.RegisterOutputType(JobStatusPtrOutput{}) + pulumi.RegisterOutputType(JobTemplateSpecOutput{}) + pulumi.RegisterOutputType(JobTemplateSpecPtrOutput{}) } diff --git a/sdk/go/kubernetes/batch/v1beta1/cronJob.go b/sdk/go/kubernetes/batch/v1beta1/cronJob.go index 3d652d7c3c..e8d010c216 100644 --- a/sdk/go/kubernetes/batch/v1beta1/cronJob.go +++ b/sdk/go/kubernetes/batch/v1beta1/cronJob.go @@ -37,6 +37,9 @@ func NewCronJob(ctx *pulumi.Context, args.ApiVersion = pulumi.StringPtr("batch/v1beta1") args.Kind = pulumi.StringPtr("CronJob") aliases := pulumi.Aliases([]pulumi.Alias{ + { + Type: pulumi.String("kubernetes:batch/v1:CronJob"), + }, { Type: pulumi.String("kubernetes:batch/v2alpha1:CronJob"), }, diff --git a/sdk/go/kubernetes/batch/v1beta1/pulumiTypes.go b/sdk/go/kubernetes/batch/v1beta1/pulumiTypes.go index 428b8b4a50..a83e845c3d 100644 --- a/sdk/go/kubernetes/batch/v1beta1/pulumiTypes.go +++ b/sdk/go/kubernetes/batch/v1beta1/pulumiTypes.go @@ -485,6 +485,8 @@ type CronJobStatus struct { Active []corev1.ObjectReference `pulumi:"active"` // Information when was the last time the job was successfully scheduled. LastScheduleTime *string `pulumi:"lastScheduleTime"` + // Information when was the last time the job successfully completed. + LastSuccessfulTime *string `pulumi:"lastSuccessfulTime"` } // CronJobStatusInput is an input type that accepts CronJobStatusArgs and CronJobStatusOutput values. @@ -504,6 +506,8 @@ type CronJobStatusArgs struct { Active corev1.ObjectReferenceArrayInput `pulumi:"active"` // Information when was the last time the job was successfully scheduled. LastScheduleTime pulumi.StringPtrInput `pulumi:"lastScheduleTime"` + // Information when was the last time the job successfully completed. + LastSuccessfulTime pulumi.StringPtrInput `pulumi:"lastSuccessfulTime"` } func (CronJobStatusArgs) ElementType() reflect.Type { @@ -594,6 +598,11 @@ func (o CronJobStatusOutput) LastScheduleTime() pulumi.StringPtrOutput { return o.ApplyT(func(v CronJobStatus) *string { return v.LastScheduleTime }).(pulumi.StringPtrOutput) } +// Information when was the last time the job successfully completed. +func (o CronJobStatusOutput) LastSuccessfulTime() pulumi.StringPtrOutput { + return o.ApplyT(func(v CronJobStatus) *string { return v.LastSuccessfulTime }).(pulumi.StringPtrOutput) +} + type CronJobStatusPtrOutput struct{ *pulumi.OutputState } func (CronJobStatusPtrOutput) ElementType() reflect.Type { @@ -632,6 +641,16 @@ func (o CronJobStatusPtrOutput) LastScheduleTime() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } +// Information when was the last time the job successfully completed. +func (o CronJobStatusPtrOutput) LastSuccessfulTime() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CronJobStatus) *string { + if v == nil { + return nil + } + return v.LastSuccessfulTime + }).(pulumi.StringPtrOutput) +} + // JobTemplateSpec describes the data a Job should have when created from a template type JobTemplateSpec struct { // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata diff --git a/sdk/go/kubernetes/batch/v2alpha1/cronJob.go b/sdk/go/kubernetes/batch/v2alpha1/cronJob.go index 5ba9df37ca..f46d016d74 100644 --- a/sdk/go/kubernetes/batch/v2alpha1/cronJob.go +++ b/sdk/go/kubernetes/batch/v2alpha1/cronJob.go @@ -37,6 +37,9 @@ func NewCronJob(ctx *pulumi.Context, args.ApiVersion = pulumi.StringPtr("batch/v2alpha1") args.Kind = pulumi.StringPtr("CronJob") aliases := pulumi.Aliases([]pulumi.Alias{ + { + Type: pulumi.String("kubernetes:batch/v1:CronJob"), + }, { Type: pulumi.String("kubernetes:batch/v1beta1:CronJob"), }, diff --git a/sdk/go/kubernetes/core/v1/configMap.go b/sdk/go/kubernetes/core/v1/configMap.go index ba693965e4..793333ef24 100644 --- a/sdk/go/kubernetes/core/v1/configMap.go +++ b/sdk/go/kubernetes/core/v1/configMap.go @@ -21,7 +21,7 @@ type ConfigMap struct { BinaryData pulumi.StringMapOutput `pulumi:"binaryData"` // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. Data pulumi.StringMapOutput `pulumi:"data"` - // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable pulumi.BoolPtrOutput `pulumi:"immutable"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrOutput `pulumi:"kind"` @@ -66,7 +66,7 @@ type configMapState struct { BinaryData map[string]string `pulumi:"binaryData"` // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. Data map[string]string `pulumi:"data"` - // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable *bool `pulumi:"immutable"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind *string `pulumi:"kind"` @@ -81,7 +81,7 @@ type ConfigMapState struct { BinaryData pulumi.StringMapInput // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. Data pulumi.StringMapInput - // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable pulumi.BoolPtrInput // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrInput @@ -100,7 +100,7 @@ type configMapArgs struct { BinaryData map[string]string `pulumi:"binaryData"` // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. Data map[string]string `pulumi:"data"` - // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable *bool `pulumi:"immutable"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind *string `pulumi:"kind"` @@ -116,7 +116,7 @@ type ConfigMapArgs struct { BinaryData pulumi.StringMapInput // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. Data pulumi.StringMapInput - // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable pulumi.BoolPtrInput // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrInput diff --git a/sdk/go/kubernetes/core/v1/ephemeralContainers.go b/sdk/go/kubernetes/core/v1/ephemeralContainers.go new file mode 100644 index 0000000000..c87f0f74e7 --- /dev/null +++ b/sdk/go/kubernetes/core/v1/ephemeralContainers.go @@ -0,0 +1,295 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1 + +import ( + "context" + "reflect" + + "github.com/pkg/errors" + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// A list of ephemeral containers used with the Pod ephemeralcontainers subresource. +type EphemeralContainers struct { + pulumi.CustomResourceState + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` + // A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + EphemeralContainers EphemeralContainerArrayOutput `pulumi:"ephemeralContainers"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrOutput `pulumi:"kind"` + Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` +} + +// NewEphemeralContainers registers a new resource with the given unique name, arguments, and options. +func NewEphemeralContainers(ctx *pulumi.Context, + name string, args *EphemeralContainersArgs, opts ...pulumi.ResourceOption) (*EphemeralContainers, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.EphemeralContainers == nil { + return nil, errors.New("invalid value for required argument 'EphemeralContainers'") + } + args.ApiVersion = pulumi.StringPtr("v1") + args.Kind = pulumi.StringPtr("EphemeralContainers") + var resource EphemeralContainers + err := ctx.RegisterResource("kubernetes:core/v1:EphemeralContainers", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetEphemeralContainers gets an existing EphemeralContainers resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetEphemeralContainers(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *EphemeralContainersState, opts ...pulumi.ResourceOption) (*EphemeralContainers, error) { + var resource EphemeralContainers + err := ctx.ReadResource("kubernetes:core/v1:EphemeralContainers", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering EphemeralContainers resources. +type ephemeralContainersState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + EphemeralContainers []EphemeralContainer `pulumi:"ephemeralContainers"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + Metadata *metav1.ObjectMeta `pulumi:"metadata"` +} + +type EphemeralContainersState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + EphemeralContainers EphemeralContainerArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + Metadata metav1.ObjectMetaPtrInput +} + +func (EphemeralContainersState) ElementType() reflect.Type { + return reflect.TypeOf((*ephemeralContainersState)(nil)).Elem() +} + +type ephemeralContainersArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + EphemeralContainers []EphemeralContainer `pulumi:"ephemeralContainers"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + Metadata *metav1.ObjectMeta `pulumi:"metadata"` +} + +// The set of arguments for constructing a EphemeralContainers resource. +type EphemeralContainersArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + EphemeralContainers EphemeralContainerArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + Metadata metav1.ObjectMetaPtrInput +} + +func (EphemeralContainersArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ephemeralContainersArgs)(nil)).Elem() +} + +type EphemeralContainersInput interface { + pulumi.Input + + ToEphemeralContainersOutput() EphemeralContainersOutput + ToEphemeralContainersOutputWithContext(ctx context.Context) EphemeralContainersOutput +} + +func (*EphemeralContainers) ElementType() reflect.Type { + return reflect.TypeOf((*EphemeralContainers)(nil)) +} + +func (i *EphemeralContainers) ToEphemeralContainersOutput() EphemeralContainersOutput { + return i.ToEphemeralContainersOutputWithContext(context.Background()) +} + +func (i *EphemeralContainers) ToEphemeralContainersOutputWithContext(ctx context.Context) EphemeralContainersOutput { + return pulumi.ToOutputWithContext(ctx, i).(EphemeralContainersOutput) +} + +func (i *EphemeralContainers) ToEphemeralContainersPtrOutput() EphemeralContainersPtrOutput { + return i.ToEphemeralContainersPtrOutputWithContext(context.Background()) +} + +func (i *EphemeralContainers) ToEphemeralContainersPtrOutputWithContext(ctx context.Context) EphemeralContainersPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EphemeralContainersPtrOutput) +} + +type EphemeralContainersPtrInput interface { + pulumi.Input + + ToEphemeralContainersPtrOutput() EphemeralContainersPtrOutput + ToEphemeralContainersPtrOutputWithContext(ctx context.Context) EphemeralContainersPtrOutput +} + +type ephemeralContainersPtrType EphemeralContainersArgs + +func (*ephemeralContainersPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**EphemeralContainers)(nil)) +} + +func (i *ephemeralContainersPtrType) ToEphemeralContainersPtrOutput() EphemeralContainersPtrOutput { + return i.ToEphemeralContainersPtrOutputWithContext(context.Background()) +} + +func (i *ephemeralContainersPtrType) ToEphemeralContainersPtrOutputWithContext(ctx context.Context) EphemeralContainersPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EphemeralContainersPtrOutput) +} + +// EphemeralContainersArrayInput is an input type that accepts EphemeralContainersArray and EphemeralContainersArrayOutput values. +// You can construct a concrete instance of `EphemeralContainersArrayInput` via: +// +// EphemeralContainersArray{ EphemeralContainersArgs{...} } +type EphemeralContainersArrayInput interface { + pulumi.Input + + ToEphemeralContainersArrayOutput() EphemeralContainersArrayOutput + ToEphemeralContainersArrayOutputWithContext(context.Context) EphemeralContainersArrayOutput +} + +type EphemeralContainersArray []EphemeralContainersInput + +func (EphemeralContainersArray) ElementType() reflect.Type { + return reflect.TypeOf(([]*EphemeralContainers)(nil)) +} + +func (i EphemeralContainersArray) ToEphemeralContainersArrayOutput() EphemeralContainersArrayOutput { + return i.ToEphemeralContainersArrayOutputWithContext(context.Background()) +} + +func (i EphemeralContainersArray) ToEphemeralContainersArrayOutputWithContext(ctx context.Context) EphemeralContainersArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(EphemeralContainersArrayOutput) +} + +// EphemeralContainersMapInput is an input type that accepts EphemeralContainersMap and EphemeralContainersMapOutput values. +// You can construct a concrete instance of `EphemeralContainersMapInput` via: +// +// EphemeralContainersMap{ "key": EphemeralContainersArgs{...} } +type EphemeralContainersMapInput interface { + pulumi.Input + + ToEphemeralContainersMapOutput() EphemeralContainersMapOutput + ToEphemeralContainersMapOutputWithContext(context.Context) EphemeralContainersMapOutput +} + +type EphemeralContainersMap map[string]EphemeralContainersInput + +func (EphemeralContainersMap) ElementType() reflect.Type { + return reflect.TypeOf((map[string]*EphemeralContainers)(nil)) +} + +func (i EphemeralContainersMap) ToEphemeralContainersMapOutput() EphemeralContainersMapOutput { + return i.ToEphemeralContainersMapOutputWithContext(context.Background()) +} + +func (i EphemeralContainersMap) ToEphemeralContainersMapOutputWithContext(ctx context.Context) EphemeralContainersMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(EphemeralContainersMapOutput) +} + +type EphemeralContainersOutput struct { + *pulumi.OutputState +} + +func (EphemeralContainersOutput) ElementType() reflect.Type { + return reflect.TypeOf((*EphemeralContainers)(nil)) +} + +func (o EphemeralContainersOutput) ToEphemeralContainersOutput() EphemeralContainersOutput { + return o +} + +func (o EphemeralContainersOutput) ToEphemeralContainersOutputWithContext(ctx context.Context) EphemeralContainersOutput { + return o +} + +func (o EphemeralContainersOutput) ToEphemeralContainersPtrOutput() EphemeralContainersPtrOutput { + return o.ToEphemeralContainersPtrOutputWithContext(context.Background()) +} + +func (o EphemeralContainersOutput) ToEphemeralContainersPtrOutputWithContext(ctx context.Context) EphemeralContainersPtrOutput { + return o.ApplyT(func(v EphemeralContainers) *EphemeralContainers { + return &v + }).(EphemeralContainersPtrOutput) +} + +type EphemeralContainersPtrOutput struct { + *pulumi.OutputState +} + +func (EphemeralContainersPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**EphemeralContainers)(nil)) +} + +func (o EphemeralContainersPtrOutput) ToEphemeralContainersPtrOutput() EphemeralContainersPtrOutput { + return o +} + +func (o EphemeralContainersPtrOutput) ToEphemeralContainersPtrOutputWithContext(ctx context.Context) EphemeralContainersPtrOutput { + return o +} + +type EphemeralContainersArrayOutput struct{ *pulumi.OutputState } + +func (EphemeralContainersArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]EphemeralContainers)(nil)) +} + +func (o EphemeralContainersArrayOutput) ToEphemeralContainersArrayOutput() EphemeralContainersArrayOutput { + return o +} + +func (o EphemeralContainersArrayOutput) ToEphemeralContainersArrayOutputWithContext(ctx context.Context) EphemeralContainersArrayOutput { + return o +} + +func (o EphemeralContainersArrayOutput) Index(i pulumi.IntInput) EphemeralContainersOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) EphemeralContainers { + return vs[0].([]EphemeralContainers)[vs[1].(int)] + }).(EphemeralContainersOutput) +} + +type EphemeralContainersMapOutput struct{ *pulumi.OutputState } + +func (EphemeralContainersMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]EphemeralContainers)(nil)) +} + +func (o EphemeralContainersMapOutput) ToEphemeralContainersMapOutput() EphemeralContainersMapOutput { + return o +} + +func (o EphemeralContainersMapOutput) ToEphemeralContainersMapOutputWithContext(ctx context.Context) EphemeralContainersMapOutput { + return o +} + +func (o EphemeralContainersMapOutput) MapIndex(k pulumi.StringInput) EphemeralContainersOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) EphemeralContainers { + return vs[0].(map[string]EphemeralContainers)[vs[1].(string)] + }).(EphemeralContainersOutput) +} + +func init() { + pulumi.RegisterOutputType(EphemeralContainersOutput{}) + pulumi.RegisterOutputType(EphemeralContainersPtrOutput{}) + pulumi.RegisterOutputType(EphemeralContainersArrayOutput{}) + pulumi.RegisterOutputType(EphemeralContainersMapOutput{}) +} diff --git a/sdk/go/kubernetes/core/v1/init.go b/sdk/go/kubernetes/core/v1/init.go index 234d2076db..61079317f2 100644 --- a/sdk/go/kubernetes/core/v1/init.go +++ b/sdk/go/kubernetes/core/v1/init.go @@ -31,6 +31,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r, err = NewEndpoints(ctx, name, nil, pulumi.URN_(urn)) case "kubernetes:core/v1:EndpointsList": r, err = NewEndpointsList(ctx, name, nil, pulumi.URN_(urn)) + case "kubernetes:core/v1:EphemeralContainers": + r, err = NewEphemeralContainers(ctx, name, nil, pulumi.URN_(urn)) case "kubernetes:core/v1:Event": r, err = NewEvent(ctx, name, nil, pulumi.URN_(urn)) case "kubernetes:core/v1:EventList": diff --git a/sdk/go/kubernetes/core/v1/limitRangeList.go b/sdk/go/kubernetes/core/v1/limitRangeList.go index c89650eee4..e534c35b12 100644 --- a/sdk/go/kubernetes/core/v1/limitRangeList.go +++ b/sdk/go/kubernetes/core/v1/limitRangeList.go @@ -18,7 +18,7 @@ type LimitRangeList struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` - // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Items LimitRangeTypeArrayOutput `pulumi:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrOutput `pulumi:"kind"` @@ -62,7 +62,7 @@ func GetLimitRangeList(ctx *pulumi.Context, type limitRangeListState struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources ApiVersion *string `pulumi:"apiVersion"` - // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Items []LimitRangeType `pulumi:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind *string `pulumi:"kind"` @@ -73,7 +73,7 @@ type limitRangeListState struct { type LimitRangeListState struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources ApiVersion pulumi.StringPtrInput - // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Items LimitRangeTypeArrayInput // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrInput @@ -88,7 +88,7 @@ func (LimitRangeListState) ElementType() reflect.Type { type limitRangeListArgs struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources ApiVersion *string `pulumi:"apiVersion"` - // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Items []LimitRangeType `pulumi:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind *string `pulumi:"kind"` @@ -100,7 +100,7 @@ type limitRangeListArgs struct { type LimitRangeListArgs struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources ApiVersion pulumi.StringPtrInput - // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Items LimitRangeTypeArrayInput // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrInput diff --git a/sdk/go/kubernetes/core/v1/pulumiTypes.go b/sdk/go/kubernetes/core/v1/pulumiTypes.go index 77280152db..033ecb9b52 100644 --- a/sdk/go/kubernetes/core/v1/pulumiTypes.go +++ b/sdk/go/kubernetes/core/v1/pulumiTypes.go @@ -3130,7 +3130,7 @@ type ConfigMapType struct { BinaryData map[string]string `pulumi:"binaryData"` // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. Data map[string]string `pulumi:"data"` - // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable *bool `pulumi:"immutable"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind *string `pulumi:"kind"` @@ -3157,7 +3157,7 @@ type ConfigMapTypeArgs struct { BinaryData pulumi.StringMapInput `pulumi:"binaryData"` // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. Data pulumi.StringMapInput `pulumi:"data"` - // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable pulumi.BoolPtrInput `pulumi:"immutable"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrInput `pulumi:"kind"` @@ -3232,7 +3232,7 @@ func (o ConfigMapTypeOutput) Data() pulumi.StringMapOutput { return o.ApplyT(func(v ConfigMapType) map[string]string { return v.Data }).(pulumi.StringMapOutput) } -// Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. +// Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. func (o ConfigMapTypeOutput) Immutable() pulumi.BoolPtrOutput { return o.ApplyT(func(v ConfigMapType) *bool { return v.Immutable }).(pulumi.BoolPtrOutput) } @@ -4289,7 +4289,7 @@ type Container struct { Ports []ContainerPort `pulumi:"ports"` // Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes ReadinessProbe *Probe `pulumi:"readinessProbe"` - // Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Resources *ResourceRequirements `pulumi:"resources"` // Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ SecurityContext *SecurityContext `pulumi:"securityContext"` @@ -4348,7 +4348,7 @@ type ContainerArgs struct { Ports ContainerPortArrayInput `pulumi:"ports"` // Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes ReadinessProbe ProbePtrInput `pulumi:"readinessProbe"` - // Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Resources ResourceRequirementsPtrInput `pulumi:"resources"` // Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ SecurityContext SecurityContextPtrInput `pulumi:"securityContext"` @@ -4479,7 +4479,7 @@ func (o ContainerOutput) ReadinessProbe() ProbePtrOutput { return o.ApplyT(func(v Container) *Probe { return v.ReadinessProbe }).(ProbePtrOutput) } -// Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +// Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ func (o ContainerOutput) Resources() ResourceRequirementsPtrOutput { return o.ApplyT(func(v Container) *ResourceRequirements { return v.Resources }).(ResourceRequirementsPtrOutput) } @@ -7739,10 +7739,87 @@ func (o EphemeralContainerArrayOutput) Index(i pulumi.IntInput) EphemeralContain }).(EphemeralContainerOutput) } +// A list of ephemeral containers used with the Pod ephemeralcontainers subresource. +type EphemeralContainersType struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + EphemeralContainers []EphemeralContainer `pulumi:"ephemeralContainers"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + Metadata *metav1.ObjectMeta `pulumi:"metadata"` +} + +// EphemeralContainersTypeInput is an input type that accepts EphemeralContainersTypeArgs and EphemeralContainersTypeOutput values. +// You can construct a concrete instance of `EphemeralContainersTypeInput` via: +// +// EphemeralContainersTypeArgs{...} +type EphemeralContainersTypeInput interface { + pulumi.Input + + ToEphemeralContainersTypeOutput() EphemeralContainersTypeOutput + ToEphemeralContainersTypeOutputWithContext(context.Context) EphemeralContainersTypeOutput +} + +// A list of ephemeral containers used with the Pod ephemeralcontainers subresource. +type EphemeralContainersTypeArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` + // A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + EphemeralContainers EphemeralContainerArrayInput `pulumi:"ephemeralContainers"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput `pulumi:"kind"` + Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"` +} + +func (EphemeralContainersTypeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*EphemeralContainersType)(nil)).Elem() +} + +func (i EphemeralContainersTypeArgs) ToEphemeralContainersTypeOutput() EphemeralContainersTypeOutput { + return i.ToEphemeralContainersTypeOutputWithContext(context.Background()) +} + +func (i EphemeralContainersTypeArgs) ToEphemeralContainersTypeOutputWithContext(ctx context.Context) EphemeralContainersTypeOutput { + return pulumi.ToOutputWithContext(ctx, i).(EphemeralContainersTypeOutput) +} + +// A list of ephemeral containers used with the Pod ephemeralcontainers subresource. +type EphemeralContainersTypeOutput struct{ *pulumi.OutputState } + +func (EphemeralContainersTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*EphemeralContainersType)(nil)).Elem() +} + +func (o EphemeralContainersTypeOutput) ToEphemeralContainersTypeOutput() EphemeralContainersTypeOutput { + return o +} + +func (o EphemeralContainersTypeOutput) ToEphemeralContainersTypeOutputWithContext(ctx context.Context) EphemeralContainersTypeOutput { + return o +} + +// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +func (o EphemeralContainersTypeOutput) ApiVersion() pulumi.StringPtrOutput { + return o.ApplyT(func(v EphemeralContainersType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) +} + +// A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. +func (o EphemeralContainersTypeOutput) EphemeralContainers() EphemeralContainerArrayOutput { + return o.ApplyT(func(v EphemeralContainersType) []EphemeralContainer { return v.EphemeralContainers }).(EphemeralContainerArrayOutput) +} + +// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +func (o EphemeralContainersTypeOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v EphemeralContainersType) *string { return v.Kind }).(pulumi.StringPtrOutput) +} + +func (o EphemeralContainersTypeOutput) Metadata() metav1.ObjectMetaPtrOutput { + return o.ApplyT(func(v EphemeralContainersType) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput) +} + // Represents an ephemeral volume that is handled by a normal storage driver. type EphemeralVolumeSource struct { - // Specifies a read-only configuration for the volume. Defaults to false (read/write). - ReadOnly *bool `pulumi:"readOnly"` // Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). // // An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. @@ -7766,8 +7843,6 @@ type EphemeralVolumeSourceInput interface { // Represents an ephemeral volume that is handled by a normal storage driver. type EphemeralVolumeSourceArgs struct { - // Specifies a read-only configuration for the volume. Defaults to false (read/write). - ReadOnly pulumi.BoolPtrInput `pulumi:"readOnly"` // Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). // // An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. @@ -7856,11 +7931,6 @@ func (o EphemeralVolumeSourceOutput) ToEphemeralVolumeSourcePtrOutputWithContext }).(EphemeralVolumeSourcePtrOutput) } -// Specifies a read-only configuration for the volume. Defaults to false (read/write). -func (o EphemeralVolumeSourceOutput) ReadOnly() pulumi.BoolPtrOutput { - return o.ApplyT(func(v EphemeralVolumeSource) *bool { return v.ReadOnly }).(pulumi.BoolPtrOutput) -} - // Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). // // An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. @@ -7890,16 +7960,6 @@ func (o EphemeralVolumeSourcePtrOutput) Elem() EphemeralVolumeSourceOutput { return o.ApplyT(func(v *EphemeralVolumeSource) EphemeralVolumeSource { return *v }).(EphemeralVolumeSourceOutput) } -// Specifies a read-only configuration for the volume. Defaults to false (read/write). -func (o EphemeralVolumeSourcePtrOutput) ReadOnly() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *EphemeralVolumeSource) *bool { - if v == nil { - return nil - } - return v.ReadOnly - }).(pulumi.BoolPtrOutput) -} - // Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). // // An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. @@ -12170,7 +12230,7 @@ func (o LimitRangeItemArrayOutput) Index(i pulumi.IntInput) LimitRangeItemOutput type LimitRangeListType struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources ApiVersion *string `pulumi:"apiVersion"` - // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Items []LimitRangeType `pulumi:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind *string `pulumi:"kind"` @@ -12193,7 +12253,7 @@ type LimitRangeListTypeInput interface { type LimitRangeListTypeArgs struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` - // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Items LimitRangeTypeArrayInput `pulumi:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrInput `pulumi:"kind"` @@ -12233,7 +12293,7 @@ func (o LimitRangeListTypeOutput) ApiVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v LimitRangeListType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) } -// Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +// Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ func (o LimitRangeListTypeOutput) Items() LimitRangeTypeArrayOutput { return o.ApplyT(func(v LimitRangeListType) []LimitRangeType { return v.Items }).(LimitRangeTypeArrayOutput) } @@ -19210,7 +19270,9 @@ func (o PodAffinityPtrOutput) RequiredDuringSchedulingIgnoredDuringExecution() P type PodAffinityTerm struct { // A label query over a set of resources, in this case pods. LabelSelector *metav1.LabelSelector `pulumi:"labelSelector"` - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" + // A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + NamespaceSelector *metav1.LabelSelector `pulumi:"namespaceSelector"` + // namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" Namespaces []string `pulumi:"namespaces"` // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. TopologyKey string `pulumi:"topologyKey"` @@ -19231,7 +19293,9 @@ type PodAffinityTermInput interface { type PodAffinityTermArgs struct { // A label query over a set of resources, in this case pods. LabelSelector metav1.LabelSelectorPtrInput `pulumi:"labelSelector"` - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" + // A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + NamespaceSelector metav1.LabelSelectorPtrInput `pulumi:"namespaceSelector"` + // namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" Namespaces pulumi.StringArrayInput `pulumi:"namespaces"` // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. TopologyKey pulumi.StringInput `pulumi:"topologyKey"` @@ -19294,7 +19358,12 @@ func (o PodAffinityTermOutput) LabelSelector() metav1.LabelSelectorPtrOutput { return o.ApplyT(func(v PodAffinityTerm) *metav1.LabelSelector { return v.LabelSelector }).(metav1.LabelSelectorPtrOutput) } -// namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" +// A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. +func (o PodAffinityTermOutput) NamespaceSelector() metav1.LabelSelectorPtrOutput { + return o.ApplyT(func(v PodAffinityTerm) *metav1.LabelSelector { return v.NamespaceSelector }).(metav1.LabelSelectorPtrOutput) +} + +// namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" func (o PodAffinityTermOutput) Namespaces() pulumi.StringArrayOutput { return o.ApplyT(func(v PodAffinityTerm) []string { return v.Namespaces }).(pulumi.StringArrayOutput) } @@ -20572,7 +20641,7 @@ type PodSpec struct { ShareProcessNamespace *bool `pulumi:"shareProcessNamespace"` // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. Subdomain *string `pulumi:"subdomain"` - // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. TerminationGracePeriodSeconds *int `pulumi:"terminationGracePeriodSeconds"` // If specified, the pod's tolerations. Tolerations []Toleration `pulumi:"tolerations"` @@ -20657,7 +20726,7 @@ type PodSpecArgs struct { ShareProcessNamespace pulumi.BoolPtrInput `pulumi:"shareProcessNamespace"` // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. Subdomain pulumi.StringPtrInput `pulumi:"subdomain"` - // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. TerminationGracePeriodSeconds pulumi.IntPtrInput `pulumi:"terminationGracePeriodSeconds"` // If specified, the pod's tolerations. Tolerations TolerationArrayInput `pulumi:"tolerations"` @@ -20900,7 +20969,7 @@ func (o PodSpecOutput) Subdomain() pulumi.StringPtrOutput { return o.ApplyT(func(v PodSpec) *string { return v.Subdomain }).(pulumi.StringPtrOutput) } -// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. +// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. func (o PodSpecOutput) TerminationGracePeriodSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v PodSpec) *int { return v.TerminationGracePeriodSeconds }).(pulumi.IntPtrOutput) } @@ -21248,7 +21317,7 @@ func (o PodSpecPtrOutput) Subdomain() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } -// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. +// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. func (o PodSpecPtrOutput) TerminationGracePeriodSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *PodSpec) *int { if v == nil { @@ -22449,6 +22518,8 @@ type Probe struct { SuccessThreshold *int `pulumi:"successThreshold"` // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TcpSocket *TCPSocketAction `pulumi:"tcpSocket"` + // Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. + TerminationGracePeriodSeconds *int `pulumi:"terminationGracePeriodSeconds"` // Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes TimeoutSeconds *int `pulumi:"timeoutSeconds"` } @@ -22480,6 +22551,8 @@ type ProbeArgs struct { SuccessThreshold pulumi.IntPtrInput `pulumi:"successThreshold"` // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TcpSocket TCPSocketActionPtrInput `pulumi:"tcpSocket"` + // Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. + TerminationGracePeriodSeconds pulumi.IntPtrInput `pulumi:"terminationGracePeriodSeconds"` // Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes TimeoutSeconds pulumi.IntPtrInput `pulumi:"timeoutSeconds"` } @@ -22597,6 +22670,11 @@ func (o ProbeOutput) TcpSocket() TCPSocketActionPtrOutput { return o.ApplyT(func(v Probe) *TCPSocketAction { return v.TcpSocket }).(TCPSocketActionPtrOutput) } +// Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. +func (o ProbeOutput) TerminationGracePeriodSeconds() pulumi.IntPtrOutput { + return o.ApplyT(func(v Probe) *int { return v.TerminationGracePeriodSeconds }).(pulumi.IntPtrOutput) +} + // Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes func (o ProbeOutput) TimeoutSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v Probe) *int { return v.TimeoutSeconds }).(pulumi.IntPtrOutput) @@ -22690,6 +22768,16 @@ func (o ProbePtrOutput) TcpSocket() TCPSocketActionPtrOutput { }).(TCPSocketActionPtrOutput) } +// Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. +func (o ProbePtrOutput) TerminationGracePeriodSeconds() pulumi.IntPtrOutput { + return o.ApplyT(func(v *Probe) *int { + if v == nil { + return nil + } + return v.TerminationGracePeriodSeconds + }).(pulumi.IntPtrOutput) +} + // Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes func (o ProbePtrOutput) TimeoutSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *Probe) *int { @@ -25107,9 +25195,9 @@ func (o ResourceQuotaStatusPtrOutput) Used() pulumi.StringMapOutput { // ResourceRequirements describes the compute resource requirements. type ResourceRequirements struct { - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Limits map[string]string `pulumi:"limits"` - // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Requests map[string]string `pulumi:"requests"` } @@ -25126,9 +25214,9 @@ type ResourceRequirementsInput interface { // ResourceRequirements describes the compute resource requirements. type ResourceRequirementsArgs struct { - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Limits pulumi.StringMapInput `pulumi:"limits"` - // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Requests pulumi.StringMapInput `pulumi:"requests"` } @@ -25210,12 +25298,12 @@ func (o ResourceRequirementsOutput) ToResourceRequirementsPtrOutputWithContext(c }).(ResourceRequirementsPtrOutput) } -// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ func (o ResourceRequirementsOutput) Limits() pulumi.StringMapOutput { return o.ApplyT(func(v ResourceRequirements) map[string]string { return v.Limits }).(pulumi.StringMapOutput) } -// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ func (o ResourceRequirementsOutput) Requests() pulumi.StringMapOutput { return o.ApplyT(func(v ResourceRequirements) map[string]string { return v.Requests }).(pulumi.StringMapOutput) } @@ -25238,7 +25326,7 @@ func (o ResourceRequirementsPtrOutput) Elem() ResourceRequirementsOutput { return o.ApplyT(func(v *ResourceRequirements) ResourceRequirements { return *v }).(ResourceRequirementsOutput) } -// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ func (o ResourceRequirementsPtrOutput) Limits() pulumi.StringMapOutput { return o.ApplyT(func(v *ResourceRequirements) map[string]string { if v == nil { @@ -25248,7 +25336,7 @@ func (o ResourceRequirementsPtrOutput) Limits() pulumi.StringMapOutput { }).(pulumi.StringMapOutput) } -// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ func (o ResourceRequirementsPtrOutput) Requests() pulumi.StringMapOutput { return o.ApplyT(func(v *ResourceRequirements) map[string]string { if v == nil { @@ -26488,13 +26576,13 @@ type SecretType struct { ApiVersion *string `pulumi:"apiVersion"` // Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 Data map[string]string `pulumi:"data"` - // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable *bool `pulumi:"immutable"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind *string `pulumi:"kind"` // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata *metav1.ObjectMeta `pulumi:"metadata"` - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + // stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. StringData map[string]string `pulumi:"stringData"` // Used to facilitate programmatic handling of secret data. Type *string `pulumi:"type"` @@ -26527,13 +26615,13 @@ type SecretTypeArgs struct { ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` // Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 Data pulumi.StringMapInput `pulumi:"data"` - // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable pulumi.BoolPtrInput `pulumi:"immutable"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrInput `pulumi:"kind"` // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"` - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + // stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. StringData pulumi.StringMapInput `pulumi:"stringData"` // Used to facilitate programmatic handling of secret data. Type pulumi.StringPtrInput `pulumi:"type"` @@ -26611,7 +26699,7 @@ func (o SecretTypeOutput) Data() pulumi.StringMapOutput { return o.ApplyT(func(v SecretType) map[string]string { return v.Data }).(pulumi.StringMapOutput) } -// Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. +// Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. func (o SecretTypeOutput) Immutable() pulumi.BoolPtrOutput { return o.ApplyT(func(v SecretType) *bool { return v.Immutable }).(pulumi.BoolPtrOutput) } @@ -26626,7 +26714,7 @@ func (o SecretTypeOutput) Metadata() metav1.ObjectMetaPtrOutput { return o.ApplyT(func(v SecretType) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput) } -// stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. +// stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. func (o SecretTypeOutput) StringData() pulumi.StringMapOutput { return o.ApplyT(func(v SecretType) map[string]string { return v.StringData }).(pulumi.StringMapOutput) } @@ -28770,12 +28858,14 @@ type ServiceSpec struct { ClusterIPs []string `pulumi:"clusterIPs"` // externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. ExternalIPs []string `pulumi:"externalIPs"` - // externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be + // externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". ExternalName *string `pulumi:"externalName"` // externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. "Local" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. "Cluster" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. ExternalTrafficPolicy *string `pulumi:"externalTrafficPolicy"` // healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type). HealthCheckNodePort *int `pulumi:"healthCheckNodePort"` + // InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". + InternalTrafficPolicy *string `pulumi:"internalTrafficPolicy"` // IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the "IPv6DualStack" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are "IPv4" and "IPv6". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to "headless" services. This field will be wiped when updating a Service to type ExternalName. // // This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. @@ -28784,6 +28874,8 @@ type ServiceSpec struct { IpFamily *string `pulumi:"ipFamily"` // IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the "IPv6DualStack" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be "SingleStack" (a single IP family), "PreferDualStack" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or "RequireDualStack" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName. IpFamilyPolicy *string `pulumi:"ipFamilyPolicy"` + // loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. + LoadBalancerClass *string `pulumi:"loadBalancerClass"` // Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. LoadBalancerIP *string `pulumi:"loadBalancerIP"` // If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ @@ -28798,7 +28890,7 @@ type ServiceSpec struct { SessionAffinity *string `pulumi:"sessionAffinity"` // sessionAffinityConfig contains the configurations of session affinity. SessionAffinityConfig *SessionAffinityConfig `pulumi:"sessionAffinityConfig"` - // topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. + // topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. TopologyKeys []string `pulumi:"topologyKeys"` // type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. "ExternalName" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types Type *string `pulumi:"type"` @@ -28827,12 +28919,14 @@ type ServiceSpecArgs struct { ClusterIPs pulumi.StringArrayInput `pulumi:"clusterIPs"` // externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. ExternalIPs pulumi.StringArrayInput `pulumi:"externalIPs"` - // externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be + // externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". ExternalName pulumi.StringPtrInput `pulumi:"externalName"` // externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. "Local" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. "Cluster" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. ExternalTrafficPolicy pulumi.StringPtrInput `pulumi:"externalTrafficPolicy"` // healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type). HealthCheckNodePort pulumi.IntPtrInput `pulumi:"healthCheckNodePort"` + // InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". + InternalTrafficPolicy pulumi.StringPtrInput `pulumi:"internalTrafficPolicy"` // IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the "IPv6DualStack" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are "IPv4" and "IPv6". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to "headless" services. This field will be wiped when updating a Service to type ExternalName. // // This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. @@ -28841,6 +28935,8 @@ type ServiceSpecArgs struct { IpFamily pulumi.StringPtrInput `pulumi:"ipFamily"` // IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the "IPv6DualStack" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be "SingleStack" (a single IP family), "PreferDualStack" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or "RequireDualStack" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName. IpFamilyPolicy pulumi.StringPtrInput `pulumi:"ipFamilyPolicy"` + // loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. + LoadBalancerClass pulumi.StringPtrInput `pulumi:"loadBalancerClass"` // Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. LoadBalancerIP pulumi.StringPtrInput `pulumi:"loadBalancerIP"` // If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ @@ -28855,7 +28951,7 @@ type ServiceSpecArgs struct { SessionAffinity pulumi.StringPtrInput `pulumi:"sessionAffinity"` // sessionAffinityConfig contains the configurations of session affinity. SessionAffinityConfig SessionAffinityConfigPtrInput `pulumi:"sessionAffinityConfig"` - // topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. + // topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. TopologyKeys pulumi.StringArrayInput `pulumi:"topologyKeys"` // type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. "ExternalName" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types Type pulumi.StringPtrInput `pulumi:"type"` @@ -28961,7 +29057,7 @@ func (o ServiceSpecOutput) ExternalIPs() pulumi.StringArrayOutput { return o.ApplyT(func(v ServiceSpec) []string { return v.ExternalIPs }).(pulumi.StringArrayOutput) } -// externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be +// externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". func (o ServiceSpecOutput) ExternalName() pulumi.StringPtrOutput { return o.ApplyT(func(v ServiceSpec) *string { return v.ExternalName }).(pulumi.StringPtrOutput) } @@ -28976,6 +29072,11 @@ func (o ServiceSpecOutput) HealthCheckNodePort() pulumi.IntPtrOutput { return o.ApplyT(func(v ServiceSpec) *int { return v.HealthCheckNodePort }).(pulumi.IntPtrOutput) } +// InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". +func (o ServiceSpecOutput) InternalTrafficPolicy() pulumi.StringPtrOutput { + return o.ApplyT(func(v ServiceSpec) *string { return v.InternalTrafficPolicy }).(pulumi.StringPtrOutput) +} + // IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the "IPv6DualStack" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are "IPv4" and "IPv6". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to "headless" services. This field will be wiped when updating a Service to type ExternalName. // // This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. @@ -28993,6 +29094,11 @@ func (o ServiceSpecOutput) IpFamilyPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v ServiceSpec) *string { return v.IpFamilyPolicy }).(pulumi.StringPtrOutput) } +// loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. +func (o ServiceSpecOutput) LoadBalancerClass() pulumi.StringPtrOutput { + return o.ApplyT(func(v ServiceSpec) *string { return v.LoadBalancerClass }).(pulumi.StringPtrOutput) +} + // Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. func (o ServiceSpecOutput) LoadBalancerIP() pulumi.StringPtrOutput { return o.ApplyT(func(v ServiceSpec) *string { return v.LoadBalancerIP }).(pulumi.StringPtrOutput) @@ -29028,7 +29134,7 @@ func (o ServiceSpecOutput) SessionAffinityConfig() SessionAffinityConfigPtrOutpu return o.ApplyT(func(v ServiceSpec) *SessionAffinityConfig { return v.SessionAffinityConfig }).(SessionAffinityConfigPtrOutput) } -// topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. +// topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. func (o ServiceSpecOutput) TopologyKeys() pulumi.StringArrayOutput { return o.ApplyT(func(v ServiceSpec) []string { return v.TopologyKeys }).(pulumi.StringArrayOutput) } @@ -29098,7 +29204,7 @@ func (o ServiceSpecPtrOutput) ExternalIPs() pulumi.StringArrayOutput { }).(pulumi.StringArrayOutput) } -// externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be +// externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". func (o ServiceSpecPtrOutput) ExternalName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ServiceSpec) *string { if v == nil { @@ -29128,6 +29234,16 @@ func (o ServiceSpecPtrOutput) HealthCheckNodePort() pulumi.IntPtrOutput { }).(pulumi.IntPtrOutput) } +// InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". +func (o ServiceSpecPtrOutput) InternalTrafficPolicy() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ServiceSpec) *string { + if v == nil { + return nil + } + return v.InternalTrafficPolicy + }).(pulumi.StringPtrOutput) +} + // IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the "IPv6DualStack" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are "IPv4" and "IPv6". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to "headless" services. This field will be wiped when updating a Service to type ExternalName. // // This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. @@ -29160,6 +29276,16 @@ func (o ServiceSpecPtrOutput) IpFamilyPolicy() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } +// loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. +func (o ServiceSpecPtrOutput) LoadBalancerClass() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ServiceSpec) *string { + if v == nil { + return nil + } + return v.LoadBalancerClass + }).(pulumi.StringPtrOutput) +} + // Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. func (o ServiceSpecPtrOutput) LoadBalancerIP() pulumi.StringPtrOutput { return o.ApplyT(func(v *ServiceSpec) *string { @@ -29230,7 +29356,7 @@ func (o ServiceSpecPtrOutput) SessionAffinityConfig() SessionAffinityConfigPtrOu }).(SessionAffinityConfigPtrOutput) } -// topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. +// topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. func (o ServiceSpecPtrOutput) TopologyKeys() pulumi.StringArrayOutput { return o.ApplyT(func(v *ServiceSpec) []string { if v == nil { @@ -31019,7 +31145,7 @@ type Volume struct { DownwardAPI *DownwardAPIVolumeSource `pulumi:"downwardAPI"` // EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir EmptyDir *EmptyDirVolumeSource `pulumi:"emptyDir"` - // Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + // Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. // // Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity // tracking are needed, @@ -31033,6 +31159,8 @@ type Volume struct { // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. // // A pod can use both types of ephemeral volumes and persistent volumes at the same time. + // + // This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. Ephemeral *EphemeralVolumeSource `pulumi:"ephemeral"` // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. Fc *FCVolumeSource `pulumi:"fc"` @@ -31107,7 +31235,7 @@ type VolumeArgs struct { DownwardAPI DownwardAPIVolumeSourcePtrInput `pulumi:"downwardAPI"` // EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir EmptyDir EmptyDirVolumeSourcePtrInput `pulumi:"emptyDir"` - // Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + // Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. // // Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity // tracking are needed, @@ -31121,6 +31249,8 @@ type VolumeArgs struct { // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. // // A pod can use both types of ephemeral volumes and persistent volumes at the same time. + // + // This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. Ephemeral EphemeralVolumeSourcePtrInput `pulumi:"ephemeral"` // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. Fc FCVolumeSourcePtrInput `pulumi:"fc"` @@ -31261,7 +31391,7 @@ func (o VolumeOutput) EmptyDir() EmptyDirVolumeSourcePtrOutput { return o.ApplyT(func(v Volume) *EmptyDirVolumeSource { return v.EmptyDir }).(EmptyDirVolumeSourcePtrOutput) } -// Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. +// Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. // // Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity // tracking are needed, @@ -31275,6 +31405,8 @@ func (o VolumeOutput) EmptyDir() EmptyDirVolumeSourcePtrOutput { // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. // // A pod can use both types of ephemeral volumes and persistent volumes at the same time. +// +// This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. func (o VolumeOutput) Ephemeral() EphemeralVolumeSourcePtrOutput { return o.ApplyT(func(v Volume) *EphemeralVolumeSource { return v.Ephemeral }).(EphemeralVolumeSourcePtrOutput) } @@ -32477,6 +32609,7 @@ func init() { pulumi.RegisterOutputType(EnvVarSourcePtrOutput{}) pulumi.RegisterOutputType(EphemeralContainerOutput{}) pulumi.RegisterOutputType(EphemeralContainerArrayOutput{}) + pulumi.RegisterOutputType(EphemeralContainersTypeOutput{}) pulumi.RegisterOutputType(EphemeralVolumeSourceOutput{}) pulumi.RegisterOutputType(EphemeralVolumeSourcePtrOutput{}) pulumi.RegisterOutputType(EventTypeOutput{}) diff --git a/sdk/go/kubernetes/core/v1/secret.go b/sdk/go/kubernetes/core/v1/secret.go index 960d1566b5..d02b73df8a 100644 --- a/sdk/go/kubernetes/core/v1/secret.go +++ b/sdk/go/kubernetes/core/v1/secret.go @@ -29,13 +29,13 @@ type Secret struct { ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` // Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 Data pulumi.StringMapOutput `pulumi:"data"` - // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable pulumi.BoolPtrOutput `pulumi:"immutable"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrOutput `pulumi:"kind"` // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + // stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. StringData pulumi.StringMapOutput `pulumi:"stringData"` // Used to facilitate programmatic handling of secret data. Type pulumi.StringPtrOutput `pulumi:"type"` @@ -81,13 +81,13 @@ type secretState struct { ApiVersion *string `pulumi:"apiVersion"` // Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 Data map[string]string `pulumi:"data"` - // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable *bool `pulumi:"immutable"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind *string `pulumi:"kind"` // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata *metav1.ObjectMeta `pulumi:"metadata"` - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + // stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. StringData map[string]string `pulumi:"stringData"` // Used to facilitate programmatic handling of secret data. Type *string `pulumi:"type"` @@ -98,13 +98,13 @@ type SecretState struct { ApiVersion pulumi.StringPtrInput // Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 Data pulumi.StringMapInput - // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable pulumi.BoolPtrInput // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrInput // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata metav1.ObjectMetaPtrInput - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + // stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. StringData pulumi.StringMapInput // Used to facilitate programmatic handling of secret data. Type pulumi.StringPtrInput @@ -119,13 +119,13 @@ type secretArgs struct { ApiVersion *string `pulumi:"apiVersion"` // Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 Data map[string]string `pulumi:"data"` - // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable *bool `pulumi:"immutable"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind *string `pulumi:"kind"` // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata *metav1.ObjectMeta `pulumi:"metadata"` - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + // stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. StringData map[string]string `pulumi:"stringData"` // Used to facilitate programmatic handling of secret data. Type *string `pulumi:"type"` @@ -137,13 +137,13 @@ type SecretArgs struct { ApiVersion pulumi.StringPtrInput // Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 Data pulumi.StringMapInput - // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. Immutable pulumi.BoolPtrInput // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind pulumi.StringPtrInput // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata metav1.ObjectMetaPtrInput - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + // stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. StringData pulumi.StringMapInput // Used to facilitate programmatic handling of secret data. Type pulumi.StringPtrInput diff --git a/sdk/go/kubernetes/discovery/v1/endpointSlice.go b/sdk/go/kubernetes/discovery/v1/endpointSlice.go new file mode 100644 index 0000000000..bf5a37b298 --- /dev/null +++ b/sdk/go/kubernetes/discovery/v1/endpointSlice.go @@ -0,0 +1,329 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1 + +import ( + "context" + "reflect" + + "github.com/pkg/errors" + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. +type EndpointSlice struct { + pulumi.CustomResourceState + + // addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + AddressType pulumi.StringOutput `pulumi:"addressType"` + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` + // endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + Endpoints EndpointArrayOutput `pulumi:"endpoints"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // Standard object's metadata. + Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` + // ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + Ports EndpointPortArrayOutput `pulumi:"ports"` +} + +// NewEndpointSlice registers a new resource with the given unique name, arguments, and options. +func NewEndpointSlice(ctx *pulumi.Context, + name string, args *EndpointSliceArgs, opts ...pulumi.ResourceOption) (*EndpointSlice, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.AddressType == nil { + return nil, errors.New("invalid value for required argument 'AddressType'") + } + if args.Endpoints == nil { + return nil, errors.New("invalid value for required argument 'Endpoints'") + } + args.ApiVersion = pulumi.StringPtr("discovery.k8s.io/v1") + args.Kind = pulumi.StringPtr("EndpointSlice") + aliases := pulumi.Aliases([]pulumi.Alias{ + { + Type: pulumi.String("kubernetes:discovery.k8s.io/v1beta1:EndpointSlice"), + }, + }) + opts = append(opts, aliases) + var resource EndpointSlice + err := ctx.RegisterResource("kubernetes:discovery.k8s.io/v1:EndpointSlice", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetEndpointSlice gets an existing EndpointSlice resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetEndpointSlice(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *EndpointSliceState, opts ...pulumi.ResourceOption) (*EndpointSlice, error) { + var resource EndpointSlice + err := ctx.ReadResource("kubernetes:discovery.k8s.io/v1:EndpointSlice", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering EndpointSlice resources. +type endpointSliceState struct { + // addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + AddressType *string `pulumi:"addressType"` + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + Endpoints []Endpoint `pulumi:"endpoints"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + Ports []EndpointPort `pulumi:"ports"` +} + +type EndpointSliceState struct { + // addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + AddressType pulumi.StringPtrInput + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + Endpoints EndpointArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard object's metadata. + Metadata metav1.ObjectMetaPtrInput + // ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + Ports EndpointPortArrayInput +} + +func (EndpointSliceState) ElementType() reflect.Type { + return reflect.TypeOf((*endpointSliceState)(nil)).Elem() +} + +type endpointSliceArgs struct { + // addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + AddressType string `pulumi:"addressType"` + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + Endpoints []Endpoint `pulumi:"endpoints"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + Ports []EndpointPort `pulumi:"ports"` +} + +// The set of arguments for constructing a EndpointSlice resource. +type EndpointSliceArgs struct { + // addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + AddressType pulumi.StringInput + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + Endpoints EndpointArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard object's metadata. + Metadata metav1.ObjectMetaPtrInput + // ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + Ports EndpointPortArrayInput +} + +func (EndpointSliceArgs) ElementType() reflect.Type { + return reflect.TypeOf((*endpointSliceArgs)(nil)).Elem() +} + +type EndpointSliceInput interface { + pulumi.Input + + ToEndpointSliceOutput() EndpointSliceOutput + ToEndpointSliceOutputWithContext(ctx context.Context) EndpointSliceOutput +} + +func (*EndpointSlice) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointSlice)(nil)) +} + +func (i *EndpointSlice) ToEndpointSliceOutput() EndpointSliceOutput { + return i.ToEndpointSliceOutputWithContext(context.Background()) +} + +func (i *EndpointSlice) ToEndpointSliceOutputWithContext(ctx context.Context) EndpointSliceOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceOutput) +} + +func (i *EndpointSlice) ToEndpointSlicePtrOutput() EndpointSlicePtrOutput { + return i.ToEndpointSlicePtrOutputWithContext(context.Background()) +} + +func (i *EndpointSlice) ToEndpointSlicePtrOutputWithContext(ctx context.Context) EndpointSlicePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSlicePtrOutput) +} + +type EndpointSlicePtrInput interface { + pulumi.Input + + ToEndpointSlicePtrOutput() EndpointSlicePtrOutput + ToEndpointSlicePtrOutputWithContext(ctx context.Context) EndpointSlicePtrOutput +} + +type endpointSlicePtrType EndpointSliceArgs + +func (*endpointSlicePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**EndpointSlice)(nil)) +} + +func (i *endpointSlicePtrType) ToEndpointSlicePtrOutput() EndpointSlicePtrOutput { + return i.ToEndpointSlicePtrOutputWithContext(context.Background()) +} + +func (i *endpointSlicePtrType) ToEndpointSlicePtrOutputWithContext(ctx context.Context) EndpointSlicePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSlicePtrOutput) +} + +// EndpointSliceArrayInput is an input type that accepts EndpointSliceArray and EndpointSliceArrayOutput values. +// You can construct a concrete instance of `EndpointSliceArrayInput` via: +// +// EndpointSliceArray{ EndpointSliceArgs{...} } +type EndpointSliceArrayInput interface { + pulumi.Input + + ToEndpointSliceArrayOutput() EndpointSliceArrayOutput + ToEndpointSliceArrayOutputWithContext(context.Context) EndpointSliceArrayOutput +} + +type EndpointSliceArray []EndpointSliceInput + +func (EndpointSliceArray) ElementType() reflect.Type { + return reflect.TypeOf(([]*EndpointSlice)(nil)) +} + +func (i EndpointSliceArray) ToEndpointSliceArrayOutput() EndpointSliceArrayOutput { + return i.ToEndpointSliceArrayOutputWithContext(context.Background()) +} + +func (i EndpointSliceArray) ToEndpointSliceArrayOutputWithContext(ctx context.Context) EndpointSliceArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceArrayOutput) +} + +// EndpointSliceMapInput is an input type that accepts EndpointSliceMap and EndpointSliceMapOutput values. +// You can construct a concrete instance of `EndpointSliceMapInput` via: +// +// EndpointSliceMap{ "key": EndpointSliceArgs{...} } +type EndpointSliceMapInput interface { + pulumi.Input + + ToEndpointSliceMapOutput() EndpointSliceMapOutput + ToEndpointSliceMapOutputWithContext(context.Context) EndpointSliceMapOutput +} + +type EndpointSliceMap map[string]EndpointSliceInput + +func (EndpointSliceMap) ElementType() reflect.Type { + return reflect.TypeOf((map[string]*EndpointSlice)(nil)) +} + +func (i EndpointSliceMap) ToEndpointSliceMapOutput() EndpointSliceMapOutput { + return i.ToEndpointSliceMapOutputWithContext(context.Background()) +} + +func (i EndpointSliceMap) ToEndpointSliceMapOutputWithContext(ctx context.Context) EndpointSliceMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceMapOutput) +} + +type EndpointSliceOutput struct { + *pulumi.OutputState +} + +func (EndpointSliceOutput) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointSlice)(nil)) +} + +func (o EndpointSliceOutput) ToEndpointSliceOutput() EndpointSliceOutput { + return o +} + +func (o EndpointSliceOutput) ToEndpointSliceOutputWithContext(ctx context.Context) EndpointSliceOutput { + return o +} + +func (o EndpointSliceOutput) ToEndpointSlicePtrOutput() EndpointSlicePtrOutput { + return o.ToEndpointSlicePtrOutputWithContext(context.Background()) +} + +func (o EndpointSliceOutput) ToEndpointSlicePtrOutputWithContext(ctx context.Context) EndpointSlicePtrOutput { + return o.ApplyT(func(v EndpointSlice) *EndpointSlice { + return &v + }).(EndpointSlicePtrOutput) +} + +type EndpointSlicePtrOutput struct { + *pulumi.OutputState +} + +func (EndpointSlicePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**EndpointSlice)(nil)) +} + +func (o EndpointSlicePtrOutput) ToEndpointSlicePtrOutput() EndpointSlicePtrOutput { + return o +} + +func (o EndpointSlicePtrOutput) ToEndpointSlicePtrOutputWithContext(ctx context.Context) EndpointSlicePtrOutput { + return o +} + +type EndpointSliceArrayOutput struct{ *pulumi.OutputState } + +func (EndpointSliceArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]EndpointSlice)(nil)) +} + +func (o EndpointSliceArrayOutput) ToEndpointSliceArrayOutput() EndpointSliceArrayOutput { + return o +} + +func (o EndpointSliceArrayOutput) ToEndpointSliceArrayOutputWithContext(ctx context.Context) EndpointSliceArrayOutput { + return o +} + +func (o EndpointSliceArrayOutput) Index(i pulumi.IntInput) EndpointSliceOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) EndpointSlice { + return vs[0].([]EndpointSlice)[vs[1].(int)] + }).(EndpointSliceOutput) +} + +type EndpointSliceMapOutput struct{ *pulumi.OutputState } + +func (EndpointSliceMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]EndpointSlice)(nil)) +} + +func (o EndpointSliceMapOutput) ToEndpointSliceMapOutput() EndpointSliceMapOutput { + return o +} + +func (o EndpointSliceMapOutput) ToEndpointSliceMapOutputWithContext(ctx context.Context) EndpointSliceMapOutput { + return o +} + +func (o EndpointSliceMapOutput) MapIndex(k pulumi.StringInput) EndpointSliceOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) EndpointSlice { + return vs[0].(map[string]EndpointSlice)[vs[1].(string)] + }).(EndpointSliceOutput) +} + +func init() { + pulumi.RegisterOutputType(EndpointSliceOutput{}) + pulumi.RegisterOutputType(EndpointSlicePtrOutput{}) + pulumi.RegisterOutputType(EndpointSliceArrayOutput{}) + pulumi.RegisterOutputType(EndpointSliceMapOutput{}) +} diff --git a/sdk/go/kubernetes/discovery/v1/endpointSliceList.go b/sdk/go/kubernetes/discovery/v1/endpointSliceList.go new file mode 100644 index 0000000000..3c0e034f4e --- /dev/null +++ b/sdk/go/kubernetes/discovery/v1/endpointSliceList.go @@ -0,0 +1,300 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1 + +import ( + "context" + "reflect" + + "github.com/pkg/errors" + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// EndpointSliceList represents a list of endpoint slices +type EndpointSliceList struct { + pulumi.CustomResourceState + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` + // List of endpoint slices + Items EndpointSliceTypeArrayOutput `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // Standard list metadata. + Metadata metav1.ListMetaPtrOutput `pulumi:"metadata"` +} + +// NewEndpointSliceList registers a new resource with the given unique name, arguments, and options. +func NewEndpointSliceList(ctx *pulumi.Context, + name string, args *EndpointSliceListArgs, opts ...pulumi.ResourceOption) (*EndpointSliceList, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Items == nil { + return nil, errors.New("invalid value for required argument 'Items'") + } + args.ApiVersion = pulumi.StringPtr("discovery.k8s.io/v1") + args.Kind = pulumi.StringPtr("EndpointSliceList") + var resource EndpointSliceList + err := ctx.RegisterResource("kubernetes:discovery.k8s.io/v1:EndpointSliceList", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetEndpointSliceList gets an existing EndpointSliceList resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetEndpointSliceList(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *EndpointSliceListState, opts ...pulumi.ResourceOption) (*EndpointSliceList, error) { + var resource EndpointSliceList + err := ctx.ReadResource("kubernetes:discovery.k8s.io/v1:EndpointSliceList", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering EndpointSliceList resources. +type endpointSliceListState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // List of endpoint slices + Items []EndpointSliceType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata. + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +type EndpointSliceListState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // List of endpoint slices + Items EndpointSliceTypeArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard list metadata. + Metadata metav1.ListMetaPtrInput +} + +func (EndpointSliceListState) ElementType() reflect.Type { + return reflect.TypeOf((*endpointSliceListState)(nil)).Elem() +} + +type endpointSliceListArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // List of endpoint slices + Items []EndpointSliceType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata. + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +// The set of arguments for constructing a EndpointSliceList resource. +type EndpointSliceListArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // List of endpoint slices + Items EndpointSliceTypeArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard list metadata. + Metadata metav1.ListMetaPtrInput +} + +func (EndpointSliceListArgs) ElementType() reflect.Type { + return reflect.TypeOf((*endpointSliceListArgs)(nil)).Elem() +} + +type EndpointSliceListInput interface { + pulumi.Input + + ToEndpointSliceListOutput() EndpointSliceListOutput + ToEndpointSliceListOutputWithContext(ctx context.Context) EndpointSliceListOutput +} + +func (*EndpointSliceList) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointSliceList)(nil)) +} + +func (i *EndpointSliceList) ToEndpointSliceListOutput() EndpointSliceListOutput { + return i.ToEndpointSliceListOutputWithContext(context.Background()) +} + +func (i *EndpointSliceList) ToEndpointSliceListOutputWithContext(ctx context.Context) EndpointSliceListOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListOutput) +} + +func (i *EndpointSliceList) ToEndpointSliceListPtrOutput() EndpointSliceListPtrOutput { + return i.ToEndpointSliceListPtrOutputWithContext(context.Background()) +} + +func (i *EndpointSliceList) ToEndpointSliceListPtrOutputWithContext(ctx context.Context) EndpointSliceListPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListPtrOutput) +} + +type EndpointSliceListPtrInput interface { + pulumi.Input + + ToEndpointSliceListPtrOutput() EndpointSliceListPtrOutput + ToEndpointSliceListPtrOutputWithContext(ctx context.Context) EndpointSliceListPtrOutput +} + +type endpointSliceListPtrType EndpointSliceListArgs + +func (*endpointSliceListPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**EndpointSliceList)(nil)) +} + +func (i *endpointSliceListPtrType) ToEndpointSliceListPtrOutput() EndpointSliceListPtrOutput { + return i.ToEndpointSliceListPtrOutputWithContext(context.Background()) +} + +func (i *endpointSliceListPtrType) ToEndpointSliceListPtrOutputWithContext(ctx context.Context) EndpointSliceListPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListPtrOutput) +} + +// EndpointSliceListArrayInput is an input type that accepts EndpointSliceListArray and EndpointSliceListArrayOutput values. +// You can construct a concrete instance of `EndpointSliceListArrayInput` via: +// +// EndpointSliceListArray{ EndpointSliceListArgs{...} } +type EndpointSliceListArrayInput interface { + pulumi.Input + + ToEndpointSliceListArrayOutput() EndpointSliceListArrayOutput + ToEndpointSliceListArrayOutputWithContext(context.Context) EndpointSliceListArrayOutput +} + +type EndpointSliceListArray []EndpointSliceListInput + +func (EndpointSliceListArray) ElementType() reflect.Type { + return reflect.TypeOf(([]*EndpointSliceList)(nil)) +} + +func (i EndpointSliceListArray) ToEndpointSliceListArrayOutput() EndpointSliceListArrayOutput { + return i.ToEndpointSliceListArrayOutputWithContext(context.Background()) +} + +func (i EndpointSliceListArray) ToEndpointSliceListArrayOutputWithContext(ctx context.Context) EndpointSliceListArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListArrayOutput) +} + +// EndpointSliceListMapInput is an input type that accepts EndpointSliceListMap and EndpointSliceListMapOutput values. +// You can construct a concrete instance of `EndpointSliceListMapInput` via: +// +// EndpointSliceListMap{ "key": EndpointSliceListArgs{...} } +type EndpointSliceListMapInput interface { + pulumi.Input + + ToEndpointSliceListMapOutput() EndpointSliceListMapOutput + ToEndpointSliceListMapOutputWithContext(context.Context) EndpointSliceListMapOutput +} + +type EndpointSliceListMap map[string]EndpointSliceListInput + +func (EndpointSliceListMap) ElementType() reflect.Type { + return reflect.TypeOf((map[string]*EndpointSliceList)(nil)) +} + +func (i EndpointSliceListMap) ToEndpointSliceListMapOutput() EndpointSliceListMapOutput { + return i.ToEndpointSliceListMapOutputWithContext(context.Background()) +} + +func (i EndpointSliceListMap) ToEndpointSliceListMapOutputWithContext(ctx context.Context) EndpointSliceListMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListMapOutput) +} + +type EndpointSliceListOutput struct { + *pulumi.OutputState +} + +func (EndpointSliceListOutput) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointSliceList)(nil)) +} + +func (o EndpointSliceListOutput) ToEndpointSliceListOutput() EndpointSliceListOutput { + return o +} + +func (o EndpointSliceListOutput) ToEndpointSliceListOutputWithContext(ctx context.Context) EndpointSliceListOutput { + return o +} + +func (o EndpointSliceListOutput) ToEndpointSliceListPtrOutput() EndpointSliceListPtrOutput { + return o.ToEndpointSliceListPtrOutputWithContext(context.Background()) +} + +func (o EndpointSliceListOutput) ToEndpointSliceListPtrOutputWithContext(ctx context.Context) EndpointSliceListPtrOutput { + return o.ApplyT(func(v EndpointSliceList) *EndpointSliceList { + return &v + }).(EndpointSliceListPtrOutput) +} + +type EndpointSliceListPtrOutput struct { + *pulumi.OutputState +} + +func (EndpointSliceListPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**EndpointSliceList)(nil)) +} + +func (o EndpointSliceListPtrOutput) ToEndpointSliceListPtrOutput() EndpointSliceListPtrOutput { + return o +} + +func (o EndpointSliceListPtrOutput) ToEndpointSliceListPtrOutputWithContext(ctx context.Context) EndpointSliceListPtrOutput { + return o +} + +type EndpointSliceListArrayOutput struct{ *pulumi.OutputState } + +func (EndpointSliceListArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]EndpointSliceList)(nil)) +} + +func (o EndpointSliceListArrayOutput) ToEndpointSliceListArrayOutput() EndpointSliceListArrayOutput { + return o +} + +func (o EndpointSliceListArrayOutput) ToEndpointSliceListArrayOutputWithContext(ctx context.Context) EndpointSliceListArrayOutput { + return o +} + +func (o EndpointSliceListArrayOutput) Index(i pulumi.IntInput) EndpointSliceListOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) EndpointSliceList { + return vs[0].([]EndpointSliceList)[vs[1].(int)] + }).(EndpointSliceListOutput) +} + +type EndpointSliceListMapOutput struct{ *pulumi.OutputState } + +func (EndpointSliceListMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]EndpointSliceList)(nil)) +} + +func (o EndpointSliceListMapOutput) ToEndpointSliceListMapOutput() EndpointSliceListMapOutput { + return o +} + +func (o EndpointSliceListMapOutput) ToEndpointSliceListMapOutputWithContext(ctx context.Context) EndpointSliceListMapOutput { + return o +} + +func (o EndpointSliceListMapOutput) MapIndex(k pulumi.StringInput) EndpointSliceListOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) EndpointSliceList { + return vs[0].(map[string]EndpointSliceList)[vs[1].(string)] + }).(EndpointSliceListOutput) +} + +func init() { + pulumi.RegisterOutputType(EndpointSliceListOutput{}) + pulumi.RegisterOutputType(EndpointSliceListPtrOutput{}) + pulumi.RegisterOutputType(EndpointSliceListArrayOutput{}) + pulumi.RegisterOutputType(EndpointSliceListMapOutput{}) +} diff --git a/sdk/go/kubernetes/discovery/v1/init.go b/sdk/go/kubernetes/discovery/v1/init.go new file mode 100644 index 0000000000..5b141829c8 --- /dev/null +++ b/sdk/go/kubernetes/discovery/v1/init.go @@ -0,0 +1,45 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1 + +import ( + "fmt" + + "github.com/blang/semver" + "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +type module struct { + version semver.Version +} + +func (m *module) Version() semver.Version { + return m.version +} + +func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { + switch typ { + case "kubernetes:discovery.k8s.io/v1:EndpointSlice": + r, err = NewEndpointSlice(ctx, name, nil, pulumi.URN_(urn)) + case "kubernetes:discovery.k8s.io/v1:EndpointSliceList": + r, err = NewEndpointSliceList(ctx, name, nil, pulumi.URN_(urn)) + default: + return nil, fmt.Errorf("unknown resource type: %s", typ) + } + + return +} + +func init() { + version, err := kubernetes.PkgVersion() + if err != nil { + fmt.Println("failed to determine package version. defaulting to v1: %v", err) + } + pulumi.RegisterResourceModule( + "kubernetes", + "discovery.k8s.io/v1", + &module{version}, + ) +} diff --git a/sdk/go/kubernetes/discovery/v1/pulumiTypes.go b/sdk/go/kubernetes/discovery/v1/pulumiTypes.go new file mode 100644 index 0000000000..07b634d125 --- /dev/null +++ b/sdk/go/kubernetes/discovery/v1/pulumiTypes.go @@ -0,0 +1,952 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1 + +import ( + "context" + "reflect" + + corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/core/v1" + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// Endpoint represents a single logical "backend" implementing a service. +type Endpoint struct { + // addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + Addresses []string `pulumi:"addresses"` + // conditions contains information about the current status of the endpoint. + Conditions *EndpointConditions `pulumi:"conditions"` + // deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. + DeprecatedTopology map[string]string `pulumi:"deprecatedTopology"` + // hints contains information associated with how an endpoint should be consumed. + Hints *EndpointHints `pulumi:"hints"` + // hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + Hostname *string `pulumi:"hostname"` + // nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + NodeName *string `pulumi:"nodeName"` + // targetRef is a reference to a Kubernetes object that represents this endpoint. + TargetRef *corev1.ObjectReference `pulumi:"targetRef"` + // zone is the name of the Zone this endpoint exists in. + Zone *string `pulumi:"zone"` +} + +// EndpointInput is an input type that accepts EndpointArgs and EndpointOutput values. +// You can construct a concrete instance of `EndpointInput` via: +// +// EndpointArgs{...} +type EndpointInput interface { + pulumi.Input + + ToEndpointOutput() EndpointOutput + ToEndpointOutputWithContext(context.Context) EndpointOutput +} + +// Endpoint represents a single logical "backend" implementing a service. +type EndpointArgs struct { + // addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + Addresses pulumi.StringArrayInput `pulumi:"addresses"` + // conditions contains information about the current status of the endpoint. + Conditions EndpointConditionsPtrInput `pulumi:"conditions"` + // deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. + DeprecatedTopology pulumi.StringMapInput `pulumi:"deprecatedTopology"` + // hints contains information associated with how an endpoint should be consumed. + Hints EndpointHintsPtrInput `pulumi:"hints"` + // hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + Hostname pulumi.StringPtrInput `pulumi:"hostname"` + // nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + NodeName pulumi.StringPtrInput `pulumi:"nodeName"` + // targetRef is a reference to a Kubernetes object that represents this endpoint. + TargetRef corev1.ObjectReferencePtrInput `pulumi:"targetRef"` + // zone is the name of the Zone this endpoint exists in. + Zone pulumi.StringPtrInput `pulumi:"zone"` +} + +func (EndpointArgs) ElementType() reflect.Type { + return reflect.TypeOf((*Endpoint)(nil)).Elem() +} + +func (i EndpointArgs) ToEndpointOutput() EndpointOutput { + return i.ToEndpointOutputWithContext(context.Background()) +} + +func (i EndpointArgs) ToEndpointOutputWithContext(ctx context.Context) EndpointOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointOutput) +} + +// EndpointArrayInput is an input type that accepts EndpointArray and EndpointArrayOutput values. +// You can construct a concrete instance of `EndpointArrayInput` via: +// +// EndpointArray{ EndpointArgs{...} } +type EndpointArrayInput interface { + pulumi.Input + + ToEndpointArrayOutput() EndpointArrayOutput + ToEndpointArrayOutputWithContext(context.Context) EndpointArrayOutput +} + +type EndpointArray []EndpointInput + +func (EndpointArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]Endpoint)(nil)).Elem() +} + +func (i EndpointArray) ToEndpointArrayOutput() EndpointArrayOutput { + return i.ToEndpointArrayOutputWithContext(context.Background()) +} + +func (i EndpointArray) ToEndpointArrayOutputWithContext(ctx context.Context) EndpointArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointArrayOutput) +} + +// Endpoint represents a single logical "backend" implementing a service. +type EndpointOutput struct{ *pulumi.OutputState } + +func (EndpointOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Endpoint)(nil)).Elem() +} + +func (o EndpointOutput) ToEndpointOutput() EndpointOutput { + return o +} + +func (o EndpointOutput) ToEndpointOutputWithContext(ctx context.Context) EndpointOutput { + return o +} + +// addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. +func (o EndpointOutput) Addresses() pulumi.StringArrayOutput { + return o.ApplyT(func(v Endpoint) []string { return v.Addresses }).(pulumi.StringArrayOutput) +} + +// conditions contains information about the current status of the endpoint. +func (o EndpointOutput) Conditions() EndpointConditionsPtrOutput { + return o.ApplyT(func(v Endpoint) *EndpointConditions { return v.Conditions }).(EndpointConditionsPtrOutput) +} + +// deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. +func (o EndpointOutput) DeprecatedTopology() pulumi.StringMapOutput { + return o.ApplyT(func(v Endpoint) map[string]string { return v.DeprecatedTopology }).(pulumi.StringMapOutput) +} + +// hints contains information associated with how an endpoint should be consumed. +func (o EndpointOutput) Hints() EndpointHintsPtrOutput { + return o.ApplyT(func(v Endpoint) *EndpointHints { return v.Hints }).(EndpointHintsPtrOutput) +} + +// hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. +func (o EndpointOutput) Hostname() pulumi.StringPtrOutput { + return o.ApplyT(func(v Endpoint) *string { return v.Hostname }).(pulumi.StringPtrOutput) +} + +// nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. +func (o EndpointOutput) NodeName() pulumi.StringPtrOutput { + return o.ApplyT(func(v Endpoint) *string { return v.NodeName }).(pulumi.StringPtrOutput) +} + +// targetRef is a reference to a Kubernetes object that represents this endpoint. +func (o EndpointOutput) TargetRef() corev1.ObjectReferencePtrOutput { + return o.ApplyT(func(v Endpoint) *corev1.ObjectReference { return v.TargetRef }).(corev1.ObjectReferencePtrOutput) +} + +// zone is the name of the Zone this endpoint exists in. +func (o EndpointOutput) Zone() pulumi.StringPtrOutput { + return o.ApplyT(func(v Endpoint) *string { return v.Zone }).(pulumi.StringPtrOutput) +} + +type EndpointArrayOutput struct{ *pulumi.OutputState } + +func (EndpointArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]Endpoint)(nil)).Elem() +} + +func (o EndpointArrayOutput) ToEndpointArrayOutput() EndpointArrayOutput { + return o +} + +func (o EndpointArrayOutput) ToEndpointArrayOutputWithContext(ctx context.Context) EndpointArrayOutput { + return o +} + +func (o EndpointArrayOutput) Index(i pulumi.IntInput) EndpointOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) Endpoint { + return vs[0].([]Endpoint)[vs[1].(int)] + }).(EndpointOutput) +} + +// EndpointConditions represents the current condition of an endpoint. +type EndpointConditions struct { + // ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + Ready *bool `pulumi:"ready"` + // serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + Serving *bool `pulumi:"serving"` + // terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + Terminating *bool `pulumi:"terminating"` +} + +// EndpointConditionsInput is an input type that accepts EndpointConditionsArgs and EndpointConditionsOutput values. +// You can construct a concrete instance of `EndpointConditionsInput` via: +// +// EndpointConditionsArgs{...} +type EndpointConditionsInput interface { + pulumi.Input + + ToEndpointConditionsOutput() EndpointConditionsOutput + ToEndpointConditionsOutputWithContext(context.Context) EndpointConditionsOutput +} + +// EndpointConditions represents the current condition of an endpoint. +type EndpointConditionsArgs struct { + // ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + Ready pulumi.BoolPtrInput `pulumi:"ready"` + // serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + Serving pulumi.BoolPtrInput `pulumi:"serving"` + // terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + Terminating pulumi.BoolPtrInput `pulumi:"terminating"` +} + +func (EndpointConditionsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointConditions)(nil)).Elem() +} + +func (i EndpointConditionsArgs) ToEndpointConditionsOutput() EndpointConditionsOutput { + return i.ToEndpointConditionsOutputWithContext(context.Background()) +} + +func (i EndpointConditionsArgs) ToEndpointConditionsOutputWithContext(ctx context.Context) EndpointConditionsOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointConditionsOutput) +} + +func (i EndpointConditionsArgs) ToEndpointConditionsPtrOutput() EndpointConditionsPtrOutput { + return i.ToEndpointConditionsPtrOutputWithContext(context.Background()) +} + +func (i EndpointConditionsArgs) ToEndpointConditionsPtrOutputWithContext(ctx context.Context) EndpointConditionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointConditionsOutput).ToEndpointConditionsPtrOutputWithContext(ctx) +} + +// EndpointConditionsPtrInput is an input type that accepts EndpointConditionsArgs, EndpointConditionsPtr and EndpointConditionsPtrOutput values. +// You can construct a concrete instance of `EndpointConditionsPtrInput` via: +// +// EndpointConditionsArgs{...} +// +// or: +// +// nil +type EndpointConditionsPtrInput interface { + pulumi.Input + + ToEndpointConditionsPtrOutput() EndpointConditionsPtrOutput + ToEndpointConditionsPtrOutputWithContext(context.Context) EndpointConditionsPtrOutput +} + +type endpointConditionsPtrType EndpointConditionsArgs + +func EndpointConditionsPtr(v *EndpointConditionsArgs) EndpointConditionsPtrInput { + return (*endpointConditionsPtrType)(v) +} + +func (*endpointConditionsPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**EndpointConditions)(nil)).Elem() +} + +func (i *endpointConditionsPtrType) ToEndpointConditionsPtrOutput() EndpointConditionsPtrOutput { + return i.ToEndpointConditionsPtrOutputWithContext(context.Background()) +} + +func (i *endpointConditionsPtrType) ToEndpointConditionsPtrOutputWithContext(ctx context.Context) EndpointConditionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointConditionsPtrOutput) +} + +// EndpointConditions represents the current condition of an endpoint. +type EndpointConditionsOutput struct{ *pulumi.OutputState } + +func (EndpointConditionsOutput) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointConditions)(nil)).Elem() +} + +func (o EndpointConditionsOutput) ToEndpointConditionsOutput() EndpointConditionsOutput { + return o +} + +func (o EndpointConditionsOutput) ToEndpointConditionsOutputWithContext(ctx context.Context) EndpointConditionsOutput { + return o +} + +func (o EndpointConditionsOutput) ToEndpointConditionsPtrOutput() EndpointConditionsPtrOutput { + return o.ToEndpointConditionsPtrOutputWithContext(context.Background()) +} + +func (o EndpointConditionsOutput) ToEndpointConditionsPtrOutputWithContext(ctx context.Context) EndpointConditionsPtrOutput { + return o.ApplyT(func(v EndpointConditions) *EndpointConditions { + return &v + }).(EndpointConditionsPtrOutput) +} + +// ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. +func (o EndpointConditionsOutput) Ready() pulumi.BoolPtrOutput { + return o.ApplyT(func(v EndpointConditions) *bool { return v.Ready }).(pulumi.BoolPtrOutput) +} + +// serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. +func (o EndpointConditionsOutput) Serving() pulumi.BoolPtrOutput { + return o.ApplyT(func(v EndpointConditions) *bool { return v.Serving }).(pulumi.BoolPtrOutput) +} + +// terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. +func (o EndpointConditionsOutput) Terminating() pulumi.BoolPtrOutput { + return o.ApplyT(func(v EndpointConditions) *bool { return v.Terminating }).(pulumi.BoolPtrOutput) +} + +type EndpointConditionsPtrOutput struct{ *pulumi.OutputState } + +func (EndpointConditionsPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**EndpointConditions)(nil)).Elem() +} + +func (o EndpointConditionsPtrOutput) ToEndpointConditionsPtrOutput() EndpointConditionsPtrOutput { + return o +} + +func (o EndpointConditionsPtrOutput) ToEndpointConditionsPtrOutputWithContext(ctx context.Context) EndpointConditionsPtrOutput { + return o +} + +func (o EndpointConditionsPtrOutput) Elem() EndpointConditionsOutput { + return o.ApplyT(func(v *EndpointConditions) EndpointConditions { return *v }).(EndpointConditionsOutput) +} + +// ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. +func (o EndpointConditionsPtrOutput) Ready() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *EndpointConditions) *bool { + if v == nil { + return nil + } + return v.Ready + }).(pulumi.BoolPtrOutput) +} + +// serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. +func (o EndpointConditionsPtrOutput) Serving() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *EndpointConditions) *bool { + if v == nil { + return nil + } + return v.Serving + }).(pulumi.BoolPtrOutput) +} + +// terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. +func (o EndpointConditionsPtrOutput) Terminating() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *EndpointConditions) *bool { + if v == nil { + return nil + } + return v.Terminating + }).(pulumi.BoolPtrOutput) +} + +// EndpointHints provides hints describing how an endpoint should be consumed. +type EndpointHints struct { + // forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + ForZones []ForZone `pulumi:"forZones"` +} + +// EndpointHintsInput is an input type that accepts EndpointHintsArgs and EndpointHintsOutput values. +// You can construct a concrete instance of `EndpointHintsInput` via: +// +// EndpointHintsArgs{...} +type EndpointHintsInput interface { + pulumi.Input + + ToEndpointHintsOutput() EndpointHintsOutput + ToEndpointHintsOutputWithContext(context.Context) EndpointHintsOutput +} + +// EndpointHints provides hints describing how an endpoint should be consumed. +type EndpointHintsArgs struct { + // forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + ForZones ForZoneArrayInput `pulumi:"forZones"` +} + +func (EndpointHintsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointHints)(nil)).Elem() +} + +func (i EndpointHintsArgs) ToEndpointHintsOutput() EndpointHintsOutput { + return i.ToEndpointHintsOutputWithContext(context.Background()) +} + +func (i EndpointHintsArgs) ToEndpointHintsOutputWithContext(ctx context.Context) EndpointHintsOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointHintsOutput) +} + +func (i EndpointHintsArgs) ToEndpointHintsPtrOutput() EndpointHintsPtrOutput { + return i.ToEndpointHintsPtrOutputWithContext(context.Background()) +} + +func (i EndpointHintsArgs) ToEndpointHintsPtrOutputWithContext(ctx context.Context) EndpointHintsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointHintsOutput).ToEndpointHintsPtrOutputWithContext(ctx) +} + +// EndpointHintsPtrInput is an input type that accepts EndpointHintsArgs, EndpointHintsPtr and EndpointHintsPtrOutput values. +// You can construct a concrete instance of `EndpointHintsPtrInput` via: +// +// EndpointHintsArgs{...} +// +// or: +// +// nil +type EndpointHintsPtrInput interface { + pulumi.Input + + ToEndpointHintsPtrOutput() EndpointHintsPtrOutput + ToEndpointHintsPtrOutputWithContext(context.Context) EndpointHintsPtrOutput +} + +type endpointHintsPtrType EndpointHintsArgs + +func EndpointHintsPtr(v *EndpointHintsArgs) EndpointHintsPtrInput { + return (*endpointHintsPtrType)(v) +} + +func (*endpointHintsPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**EndpointHints)(nil)).Elem() +} + +func (i *endpointHintsPtrType) ToEndpointHintsPtrOutput() EndpointHintsPtrOutput { + return i.ToEndpointHintsPtrOutputWithContext(context.Background()) +} + +func (i *endpointHintsPtrType) ToEndpointHintsPtrOutputWithContext(ctx context.Context) EndpointHintsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointHintsPtrOutput) +} + +// EndpointHints provides hints describing how an endpoint should be consumed. +type EndpointHintsOutput struct{ *pulumi.OutputState } + +func (EndpointHintsOutput) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointHints)(nil)).Elem() +} + +func (o EndpointHintsOutput) ToEndpointHintsOutput() EndpointHintsOutput { + return o +} + +func (o EndpointHintsOutput) ToEndpointHintsOutputWithContext(ctx context.Context) EndpointHintsOutput { + return o +} + +func (o EndpointHintsOutput) ToEndpointHintsPtrOutput() EndpointHintsPtrOutput { + return o.ToEndpointHintsPtrOutputWithContext(context.Background()) +} + +func (o EndpointHintsOutput) ToEndpointHintsPtrOutputWithContext(ctx context.Context) EndpointHintsPtrOutput { + return o.ApplyT(func(v EndpointHints) *EndpointHints { + return &v + }).(EndpointHintsPtrOutput) +} + +// forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. +func (o EndpointHintsOutput) ForZones() ForZoneArrayOutput { + return o.ApplyT(func(v EndpointHints) []ForZone { return v.ForZones }).(ForZoneArrayOutput) +} + +type EndpointHintsPtrOutput struct{ *pulumi.OutputState } + +func (EndpointHintsPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**EndpointHints)(nil)).Elem() +} + +func (o EndpointHintsPtrOutput) ToEndpointHintsPtrOutput() EndpointHintsPtrOutput { + return o +} + +func (o EndpointHintsPtrOutput) ToEndpointHintsPtrOutputWithContext(ctx context.Context) EndpointHintsPtrOutput { + return o +} + +func (o EndpointHintsPtrOutput) Elem() EndpointHintsOutput { + return o.ApplyT(func(v *EndpointHints) EndpointHints { return *v }).(EndpointHintsOutput) +} + +// forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. +func (o EndpointHintsPtrOutput) ForZones() ForZoneArrayOutput { + return o.ApplyT(func(v *EndpointHints) []ForZone { + if v == nil { + return nil + } + return v.ForZones + }).(ForZoneArrayOutput) +} + +// EndpointPort represents a Port used by an EndpointSlice +type EndpointPort struct { + // The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + AppProtocol *string `pulumi:"appProtocol"` + // The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. + Name *string `pulumi:"name"` + // The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. + Port *int `pulumi:"port"` + // The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. + Protocol *string `pulumi:"protocol"` +} + +// EndpointPortInput is an input type that accepts EndpointPortArgs and EndpointPortOutput values. +// You can construct a concrete instance of `EndpointPortInput` via: +// +// EndpointPortArgs{...} +type EndpointPortInput interface { + pulumi.Input + + ToEndpointPortOutput() EndpointPortOutput + ToEndpointPortOutputWithContext(context.Context) EndpointPortOutput +} + +// EndpointPort represents a Port used by an EndpointSlice +type EndpointPortArgs struct { + // The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + AppProtocol pulumi.StringPtrInput `pulumi:"appProtocol"` + // The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. + Name pulumi.StringPtrInput `pulumi:"name"` + // The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. + Port pulumi.IntPtrInput `pulumi:"port"` + // The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. + Protocol pulumi.StringPtrInput `pulumi:"protocol"` +} + +func (EndpointPortArgs) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointPort)(nil)).Elem() +} + +func (i EndpointPortArgs) ToEndpointPortOutput() EndpointPortOutput { + return i.ToEndpointPortOutputWithContext(context.Background()) +} + +func (i EndpointPortArgs) ToEndpointPortOutputWithContext(ctx context.Context) EndpointPortOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointPortOutput) +} + +// EndpointPortArrayInput is an input type that accepts EndpointPortArray and EndpointPortArrayOutput values. +// You can construct a concrete instance of `EndpointPortArrayInput` via: +// +// EndpointPortArray{ EndpointPortArgs{...} } +type EndpointPortArrayInput interface { + pulumi.Input + + ToEndpointPortArrayOutput() EndpointPortArrayOutput + ToEndpointPortArrayOutputWithContext(context.Context) EndpointPortArrayOutput +} + +type EndpointPortArray []EndpointPortInput + +func (EndpointPortArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]EndpointPort)(nil)).Elem() +} + +func (i EndpointPortArray) ToEndpointPortArrayOutput() EndpointPortArrayOutput { + return i.ToEndpointPortArrayOutputWithContext(context.Background()) +} + +func (i EndpointPortArray) ToEndpointPortArrayOutputWithContext(ctx context.Context) EndpointPortArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointPortArrayOutput) +} + +// EndpointPort represents a Port used by an EndpointSlice +type EndpointPortOutput struct{ *pulumi.OutputState } + +func (EndpointPortOutput) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointPort)(nil)).Elem() +} + +func (o EndpointPortOutput) ToEndpointPortOutput() EndpointPortOutput { + return o +} + +func (o EndpointPortOutput) ToEndpointPortOutputWithContext(ctx context.Context) EndpointPortOutput { + return o +} + +// The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. +func (o EndpointPortOutput) AppProtocol() pulumi.StringPtrOutput { + return o.ApplyT(func(v EndpointPort) *string { return v.AppProtocol }).(pulumi.StringPtrOutput) +} + +// The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. +func (o EndpointPortOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v EndpointPort) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. +func (o EndpointPortOutput) Port() pulumi.IntPtrOutput { + return o.ApplyT(func(v EndpointPort) *int { return v.Port }).(pulumi.IntPtrOutput) +} + +// The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. +func (o EndpointPortOutput) Protocol() pulumi.StringPtrOutput { + return o.ApplyT(func(v EndpointPort) *string { return v.Protocol }).(pulumi.StringPtrOutput) +} + +type EndpointPortArrayOutput struct{ *pulumi.OutputState } + +func (EndpointPortArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]EndpointPort)(nil)).Elem() +} + +func (o EndpointPortArrayOutput) ToEndpointPortArrayOutput() EndpointPortArrayOutput { + return o +} + +func (o EndpointPortArrayOutput) ToEndpointPortArrayOutputWithContext(ctx context.Context) EndpointPortArrayOutput { + return o +} + +func (o EndpointPortArrayOutput) Index(i pulumi.IntInput) EndpointPortOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) EndpointPort { + return vs[0].([]EndpointPort)[vs[1].(int)] + }).(EndpointPortOutput) +} + +// EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. +type EndpointSliceType struct { + // addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + AddressType string `pulumi:"addressType"` + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + Endpoints []Endpoint `pulumi:"endpoints"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + Ports []EndpointPort `pulumi:"ports"` +} + +// EndpointSliceTypeInput is an input type that accepts EndpointSliceTypeArgs and EndpointSliceTypeOutput values. +// You can construct a concrete instance of `EndpointSliceTypeInput` via: +// +// EndpointSliceTypeArgs{...} +type EndpointSliceTypeInput interface { + pulumi.Input + + ToEndpointSliceTypeOutput() EndpointSliceTypeOutput + ToEndpointSliceTypeOutputWithContext(context.Context) EndpointSliceTypeOutput +} + +// EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. +type EndpointSliceTypeArgs struct { + // addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + AddressType pulumi.StringInput `pulumi:"addressType"` + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` + // endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + Endpoints EndpointArrayInput `pulumi:"endpoints"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput `pulumi:"kind"` + // Standard object's metadata. + Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"` + // ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + Ports EndpointPortArrayInput `pulumi:"ports"` +} + +func (EndpointSliceTypeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointSliceType)(nil)).Elem() +} + +func (i EndpointSliceTypeArgs) ToEndpointSliceTypeOutput() EndpointSliceTypeOutput { + return i.ToEndpointSliceTypeOutputWithContext(context.Background()) +} + +func (i EndpointSliceTypeArgs) ToEndpointSliceTypeOutputWithContext(ctx context.Context) EndpointSliceTypeOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceTypeOutput) +} + +// EndpointSliceTypeArrayInput is an input type that accepts EndpointSliceTypeArray and EndpointSliceTypeArrayOutput values. +// You can construct a concrete instance of `EndpointSliceTypeArrayInput` via: +// +// EndpointSliceTypeArray{ EndpointSliceTypeArgs{...} } +type EndpointSliceTypeArrayInput interface { + pulumi.Input + + ToEndpointSliceTypeArrayOutput() EndpointSliceTypeArrayOutput + ToEndpointSliceTypeArrayOutputWithContext(context.Context) EndpointSliceTypeArrayOutput +} + +type EndpointSliceTypeArray []EndpointSliceTypeInput + +func (EndpointSliceTypeArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]EndpointSliceType)(nil)).Elem() +} + +func (i EndpointSliceTypeArray) ToEndpointSliceTypeArrayOutput() EndpointSliceTypeArrayOutput { + return i.ToEndpointSliceTypeArrayOutputWithContext(context.Background()) +} + +func (i EndpointSliceTypeArray) ToEndpointSliceTypeArrayOutputWithContext(ctx context.Context) EndpointSliceTypeArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceTypeArrayOutput) +} + +// EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. +type EndpointSliceTypeOutput struct{ *pulumi.OutputState } + +func (EndpointSliceTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointSliceType)(nil)).Elem() +} + +func (o EndpointSliceTypeOutput) ToEndpointSliceTypeOutput() EndpointSliceTypeOutput { + return o +} + +func (o EndpointSliceTypeOutput) ToEndpointSliceTypeOutputWithContext(ctx context.Context) EndpointSliceTypeOutput { + return o +} + +// addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. +func (o EndpointSliceTypeOutput) AddressType() pulumi.StringOutput { + return o.ApplyT(func(v EndpointSliceType) string { return v.AddressType }).(pulumi.StringOutput) +} + +// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +func (o EndpointSliceTypeOutput) ApiVersion() pulumi.StringPtrOutput { + return o.ApplyT(func(v EndpointSliceType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) +} + +// endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. +func (o EndpointSliceTypeOutput) Endpoints() EndpointArrayOutput { + return o.ApplyT(func(v EndpointSliceType) []Endpoint { return v.Endpoints }).(EndpointArrayOutput) +} + +// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +func (o EndpointSliceTypeOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v EndpointSliceType) *string { return v.Kind }).(pulumi.StringPtrOutput) +} + +// Standard object's metadata. +func (o EndpointSliceTypeOutput) Metadata() metav1.ObjectMetaPtrOutput { + return o.ApplyT(func(v EndpointSliceType) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput) +} + +// ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. +func (o EndpointSliceTypeOutput) Ports() EndpointPortArrayOutput { + return o.ApplyT(func(v EndpointSliceType) []EndpointPort { return v.Ports }).(EndpointPortArrayOutput) +} + +type EndpointSliceTypeArrayOutput struct{ *pulumi.OutputState } + +func (EndpointSliceTypeArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]EndpointSliceType)(nil)).Elem() +} + +func (o EndpointSliceTypeArrayOutput) ToEndpointSliceTypeArrayOutput() EndpointSliceTypeArrayOutput { + return o +} + +func (o EndpointSliceTypeArrayOutput) ToEndpointSliceTypeArrayOutputWithContext(ctx context.Context) EndpointSliceTypeArrayOutput { + return o +} + +func (o EndpointSliceTypeArrayOutput) Index(i pulumi.IntInput) EndpointSliceTypeOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) EndpointSliceType { + return vs[0].([]EndpointSliceType)[vs[1].(int)] + }).(EndpointSliceTypeOutput) +} + +// EndpointSliceList represents a list of endpoint slices +type EndpointSliceListType struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // List of endpoint slices + Items []EndpointSliceType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata. + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +// EndpointSliceListTypeInput is an input type that accepts EndpointSliceListTypeArgs and EndpointSliceListTypeOutput values. +// You can construct a concrete instance of `EndpointSliceListTypeInput` via: +// +// EndpointSliceListTypeArgs{...} +type EndpointSliceListTypeInput interface { + pulumi.Input + + ToEndpointSliceListTypeOutput() EndpointSliceListTypeOutput + ToEndpointSliceListTypeOutputWithContext(context.Context) EndpointSliceListTypeOutput +} + +// EndpointSliceList represents a list of endpoint slices +type EndpointSliceListTypeArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` + // List of endpoint slices + Items EndpointSliceTypeArrayInput `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput `pulumi:"kind"` + // Standard list metadata. + Metadata metav1.ListMetaPtrInput `pulumi:"metadata"` +} + +func (EndpointSliceListTypeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointSliceListType)(nil)).Elem() +} + +func (i EndpointSliceListTypeArgs) ToEndpointSliceListTypeOutput() EndpointSliceListTypeOutput { + return i.ToEndpointSliceListTypeOutputWithContext(context.Background()) +} + +func (i EndpointSliceListTypeArgs) ToEndpointSliceListTypeOutputWithContext(ctx context.Context) EndpointSliceListTypeOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointSliceListTypeOutput) +} + +// EndpointSliceList represents a list of endpoint slices +type EndpointSliceListTypeOutput struct{ *pulumi.OutputState } + +func (EndpointSliceListTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointSliceListType)(nil)).Elem() +} + +func (o EndpointSliceListTypeOutput) ToEndpointSliceListTypeOutput() EndpointSliceListTypeOutput { + return o +} + +func (o EndpointSliceListTypeOutput) ToEndpointSliceListTypeOutputWithContext(ctx context.Context) EndpointSliceListTypeOutput { + return o +} + +// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +func (o EndpointSliceListTypeOutput) ApiVersion() pulumi.StringPtrOutput { + return o.ApplyT(func(v EndpointSliceListType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) +} + +// List of endpoint slices +func (o EndpointSliceListTypeOutput) Items() EndpointSliceTypeArrayOutput { + return o.ApplyT(func(v EndpointSliceListType) []EndpointSliceType { return v.Items }).(EndpointSliceTypeArrayOutput) +} + +// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +func (o EndpointSliceListTypeOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v EndpointSliceListType) *string { return v.Kind }).(pulumi.StringPtrOutput) +} + +// Standard list metadata. +func (o EndpointSliceListTypeOutput) Metadata() metav1.ListMetaPtrOutput { + return o.ApplyT(func(v EndpointSliceListType) *metav1.ListMeta { return v.Metadata }).(metav1.ListMetaPtrOutput) +} + +// ForZone provides information about which zones should consume this endpoint. +type ForZone struct { + // name represents the name of the zone. + Name string `pulumi:"name"` +} + +// ForZoneInput is an input type that accepts ForZoneArgs and ForZoneOutput values. +// You can construct a concrete instance of `ForZoneInput` via: +// +// ForZoneArgs{...} +type ForZoneInput interface { + pulumi.Input + + ToForZoneOutput() ForZoneOutput + ToForZoneOutputWithContext(context.Context) ForZoneOutput +} + +// ForZone provides information about which zones should consume this endpoint. +type ForZoneArgs struct { + // name represents the name of the zone. + Name pulumi.StringInput `pulumi:"name"` +} + +func (ForZoneArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ForZone)(nil)).Elem() +} + +func (i ForZoneArgs) ToForZoneOutput() ForZoneOutput { + return i.ToForZoneOutputWithContext(context.Background()) +} + +func (i ForZoneArgs) ToForZoneOutputWithContext(ctx context.Context) ForZoneOutput { + return pulumi.ToOutputWithContext(ctx, i).(ForZoneOutput) +} + +// ForZoneArrayInput is an input type that accepts ForZoneArray and ForZoneArrayOutput values. +// You can construct a concrete instance of `ForZoneArrayInput` via: +// +// ForZoneArray{ ForZoneArgs{...} } +type ForZoneArrayInput interface { + pulumi.Input + + ToForZoneArrayOutput() ForZoneArrayOutput + ToForZoneArrayOutputWithContext(context.Context) ForZoneArrayOutput +} + +type ForZoneArray []ForZoneInput + +func (ForZoneArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]ForZone)(nil)).Elem() +} + +func (i ForZoneArray) ToForZoneArrayOutput() ForZoneArrayOutput { + return i.ToForZoneArrayOutputWithContext(context.Background()) +} + +func (i ForZoneArray) ToForZoneArrayOutputWithContext(ctx context.Context) ForZoneArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(ForZoneArrayOutput) +} + +// ForZone provides information about which zones should consume this endpoint. +type ForZoneOutput struct{ *pulumi.OutputState } + +func (ForZoneOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ForZone)(nil)).Elem() +} + +func (o ForZoneOutput) ToForZoneOutput() ForZoneOutput { + return o +} + +func (o ForZoneOutput) ToForZoneOutputWithContext(ctx context.Context) ForZoneOutput { + return o +} + +// name represents the name of the zone. +func (o ForZoneOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v ForZone) string { return v.Name }).(pulumi.StringOutput) +} + +type ForZoneArrayOutput struct{ *pulumi.OutputState } + +func (ForZoneArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]ForZone)(nil)).Elem() +} + +func (o ForZoneArrayOutput) ToForZoneArrayOutput() ForZoneArrayOutput { + return o +} + +func (o ForZoneArrayOutput) ToForZoneArrayOutputWithContext(ctx context.Context) ForZoneArrayOutput { + return o +} + +func (o ForZoneArrayOutput) Index(i pulumi.IntInput) ForZoneOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) ForZone { + return vs[0].([]ForZone)[vs[1].(int)] + }).(ForZoneOutput) +} + +func init() { + pulumi.RegisterOutputType(EndpointOutput{}) + pulumi.RegisterOutputType(EndpointArrayOutput{}) + pulumi.RegisterOutputType(EndpointConditionsOutput{}) + pulumi.RegisterOutputType(EndpointConditionsPtrOutput{}) + pulumi.RegisterOutputType(EndpointHintsOutput{}) + pulumi.RegisterOutputType(EndpointHintsPtrOutput{}) + pulumi.RegisterOutputType(EndpointPortOutput{}) + pulumi.RegisterOutputType(EndpointPortArrayOutput{}) + pulumi.RegisterOutputType(EndpointSliceTypeOutput{}) + pulumi.RegisterOutputType(EndpointSliceTypeArrayOutput{}) + pulumi.RegisterOutputType(EndpointSliceListTypeOutput{}) + pulumi.RegisterOutputType(ForZoneOutput{}) + pulumi.RegisterOutputType(ForZoneArrayOutput{}) +} diff --git a/sdk/go/kubernetes/discovery/v1beta1/endpointSlice.go b/sdk/go/kubernetes/discovery/v1beta1/endpointSlice.go index 773287f194..8887c540d3 100644 --- a/sdk/go/kubernetes/discovery/v1beta1/endpointSlice.go +++ b/sdk/go/kubernetes/discovery/v1beta1/endpointSlice.go @@ -45,6 +45,12 @@ func NewEndpointSlice(ctx *pulumi.Context, } args.ApiVersion = pulumi.StringPtr("discovery.k8s.io/v1beta1") args.Kind = pulumi.StringPtr("EndpointSlice") + aliases := pulumi.Aliases([]pulumi.Alias{ + { + Type: pulumi.String("kubernetes:discovery.k8s.io/v1:EndpointSlice"), + }, + }) + opts = append(opts, aliases) var resource EndpointSlice err := ctx.RegisterResource("kubernetes:discovery.k8s.io/v1beta1:EndpointSlice", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/kubernetes/discovery/v1beta1/pulumiTypes.go b/sdk/go/kubernetes/discovery/v1beta1/pulumiTypes.go index 9abe99942e..a9d1f1505f 100644 --- a/sdk/go/kubernetes/discovery/v1beta1/pulumiTypes.go +++ b/sdk/go/kubernetes/discovery/v1beta1/pulumiTypes.go @@ -18,6 +18,8 @@ type Endpoint struct { Addresses []string `pulumi:"addresses"` // conditions contains information about the current status of the endpoint. Conditions *EndpointConditions `pulumi:"conditions"` + // hints contains information associated with how an endpoint should be consumed. + Hints *EndpointHints `pulumi:"hints"` // hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. Hostname *string `pulumi:"hostname"` // nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. @@ -52,6 +54,8 @@ type EndpointArgs struct { Addresses pulumi.StringArrayInput `pulumi:"addresses"` // conditions contains information about the current status of the endpoint. Conditions EndpointConditionsPtrInput `pulumi:"conditions"` + // hints contains information associated with how an endpoint should be consumed. + Hints EndpointHintsPtrInput `pulumi:"hints"` // hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. Hostname pulumi.StringPtrInput `pulumi:"hostname"` // nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. @@ -131,6 +135,11 @@ func (o EndpointOutput) Conditions() EndpointConditionsPtrOutput { return o.ApplyT(func(v Endpoint) *EndpointConditions { return v.Conditions }).(EndpointConditionsPtrOutput) } +// hints contains information associated with how an endpoint should be consumed. +func (o EndpointOutput) Hints() EndpointHintsPtrOutput { + return o.ApplyT(func(v Endpoint) *EndpointHints { return v.Hints }).(EndpointHintsPtrOutput) +} + // hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. func (o EndpointOutput) Hostname() pulumi.StringPtrOutput { return o.ApplyT(func(v Endpoint) *string { return v.Hostname }).(pulumi.StringPtrOutput) @@ -350,6 +359,140 @@ func (o EndpointConditionsPtrOutput) Terminating() pulumi.BoolPtrOutput { }).(pulumi.BoolPtrOutput) } +// EndpointHints provides hints describing how an endpoint should be consumed. +type EndpointHints struct { + // forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. + ForZones []ForZone `pulumi:"forZones"` +} + +// EndpointHintsInput is an input type that accepts EndpointHintsArgs and EndpointHintsOutput values. +// You can construct a concrete instance of `EndpointHintsInput` via: +// +// EndpointHintsArgs{...} +type EndpointHintsInput interface { + pulumi.Input + + ToEndpointHintsOutput() EndpointHintsOutput + ToEndpointHintsOutputWithContext(context.Context) EndpointHintsOutput +} + +// EndpointHints provides hints describing how an endpoint should be consumed. +type EndpointHintsArgs struct { + // forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. + ForZones ForZoneArrayInput `pulumi:"forZones"` +} + +func (EndpointHintsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointHints)(nil)).Elem() +} + +func (i EndpointHintsArgs) ToEndpointHintsOutput() EndpointHintsOutput { + return i.ToEndpointHintsOutputWithContext(context.Background()) +} + +func (i EndpointHintsArgs) ToEndpointHintsOutputWithContext(ctx context.Context) EndpointHintsOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointHintsOutput) +} + +func (i EndpointHintsArgs) ToEndpointHintsPtrOutput() EndpointHintsPtrOutput { + return i.ToEndpointHintsPtrOutputWithContext(context.Background()) +} + +func (i EndpointHintsArgs) ToEndpointHintsPtrOutputWithContext(ctx context.Context) EndpointHintsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointHintsOutput).ToEndpointHintsPtrOutputWithContext(ctx) +} + +// EndpointHintsPtrInput is an input type that accepts EndpointHintsArgs, EndpointHintsPtr and EndpointHintsPtrOutput values. +// You can construct a concrete instance of `EndpointHintsPtrInput` via: +// +// EndpointHintsArgs{...} +// +// or: +// +// nil +type EndpointHintsPtrInput interface { + pulumi.Input + + ToEndpointHintsPtrOutput() EndpointHintsPtrOutput + ToEndpointHintsPtrOutputWithContext(context.Context) EndpointHintsPtrOutput +} + +type endpointHintsPtrType EndpointHintsArgs + +func EndpointHintsPtr(v *EndpointHintsArgs) EndpointHintsPtrInput { + return (*endpointHintsPtrType)(v) +} + +func (*endpointHintsPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**EndpointHints)(nil)).Elem() +} + +func (i *endpointHintsPtrType) ToEndpointHintsPtrOutput() EndpointHintsPtrOutput { + return i.ToEndpointHintsPtrOutputWithContext(context.Background()) +} + +func (i *endpointHintsPtrType) ToEndpointHintsPtrOutputWithContext(ctx context.Context) EndpointHintsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(EndpointHintsPtrOutput) +} + +// EndpointHints provides hints describing how an endpoint should be consumed. +type EndpointHintsOutput struct{ *pulumi.OutputState } + +func (EndpointHintsOutput) ElementType() reflect.Type { + return reflect.TypeOf((*EndpointHints)(nil)).Elem() +} + +func (o EndpointHintsOutput) ToEndpointHintsOutput() EndpointHintsOutput { + return o +} + +func (o EndpointHintsOutput) ToEndpointHintsOutputWithContext(ctx context.Context) EndpointHintsOutput { + return o +} + +func (o EndpointHintsOutput) ToEndpointHintsPtrOutput() EndpointHintsPtrOutput { + return o.ToEndpointHintsPtrOutputWithContext(context.Background()) +} + +func (o EndpointHintsOutput) ToEndpointHintsPtrOutputWithContext(ctx context.Context) EndpointHintsPtrOutput { + return o.ApplyT(func(v EndpointHints) *EndpointHints { + return &v + }).(EndpointHintsPtrOutput) +} + +// forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. +func (o EndpointHintsOutput) ForZones() ForZoneArrayOutput { + return o.ApplyT(func(v EndpointHints) []ForZone { return v.ForZones }).(ForZoneArrayOutput) +} + +type EndpointHintsPtrOutput struct{ *pulumi.OutputState } + +func (EndpointHintsPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**EndpointHints)(nil)).Elem() +} + +func (o EndpointHintsPtrOutput) ToEndpointHintsPtrOutput() EndpointHintsPtrOutput { + return o +} + +func (o EndpointHintsPtrOutput) ToEndpointHintsPtrOutputWithContext(ctx context.Context) EndpointHintsPtrOutput { + return o +} + +func (o EndpointHintsPtrOutput) Elem() EndpointHintsOutput { + return o.ApplyT(func(v *EndpointHints) EndpointHints { return *v }).(EndpointHintsOutput) +} + +// forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. +func (o EndpointHintsPtrOutput) ForZones() ForZoneArrayOutput { + return o.ApplyT(func(v *EndpointHints) []ForZone { + if v == nil { + return nil + } + return v.ForZones + }).(ForZoneArrayOutput) +} + // EndpointPort represents a Port used by an EndpointSlice type EndpointPort struct { // The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. @@ -704,14 +847,118 @@ func (o EndpointSliceListTypeOutput) Metadata() metav1.ListMetaPtrOutput { return o.ApplyT(func(v EndpointSliceListType) *metav1.ListMeta { return v.Metadata }).(metav1.ListMetaPtrOutput) } +// ForZone provides information about which zones should consume this endpoint. +type ForZone struct { + // name represents the name of the zone. + Name string `pulumi:"name"` +} + +// ForZoneInput is an input type that accepts ForZoneArgs and ForZoneOutput values. +// You can construct a concrete instance of `ForZoneInput` via: +// +// ForZoneArgs{...} +type ForZoneInput interface { + pulumi.Input + + ToForZoneOutput() ForZoneOutput + ToForZoneOutputWithContext(context.Context) ForZoneOutput +} + +// ForZone provides information about which zones should consume this endpoint. +type ForZoneArgs struct { + // name represents the name of the zone. + Name pulumi.StringInput `pulumi:"name"` +} + +func (ForZoneArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ForZone)(nil)).Elem() +} + +func (i ForZoneArgs) ToForZoneOutput() ForZoneOutput { + return i.ToForZoneOutputWithContext(context.Background()) +} + +func (i ForZoneArgs) ToForZoneOutputWithContext(ctx context.Context) ForZoneOutput { + return pulumi.ToOutputWithContext(ctx, i).(ForZoneOutput) +} + +// ForZoneArrayInput is an input type that accepts ForZoneArray and ForZoneArrayOutput values. +// You can construct a concrete instance of `ForZoneArrayInput` via: +// +// ForZoneArray{ ForZoneArgs{...} } +type ForZoneArrayInput interface { + pulumi.Input + + ToForZoneArrayOutput() ForZoneArrayOutput + ToForZoneArrayOutputWithContext(context.Context) ForZoneArrayOutput +} + +type ForZoneArray []ForZoneInput + +func (ForZoneArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]ForZone)(nil)).Elem() +} + +func (i ForZoneArray) ToForZoneArrayOutput() ForZoneArrayOutput { + return i.ToForZoneArrayOutputWithContext(context.Background()) +} + +func (i ForZoneArray) ToForZoneArrayOutputWithContext(ctx context.Context) ForZoneArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(ForZoneArrayOutput) +} + +// ForZone provides information about which zones should consume this endpoint. +type ForZoneOutput struct{ *pulumi.OutputState } + +func (ForZoneOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ForZone)(nil)).Elem() +} + +func (o ForZoneOutput) ToForZoneOutput() ForZoneOutput { + return o +} + +func (o ForZoneOutput) ToForZoneOutputWithContext(ctx context.Context) ForZoneOutput { + return o +} + +// name represents the name of the zone. +func (o ForZoneOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v ForZone) string { return v.Name }).(pulumi.StringOutput) +} + +type ForZoneArrayOutput struct{ *pulumi.OutputState } + +func (ForZoneArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]ForZone)(nil)).Elem() +} + +func (o ForZoneArrayOutput) ToForZoneArrayOutput() ForZoneArrayOutput { + return o +} + +func (o ForZoneArrayOutput) ToForZoneArrayOutputWithContext(ctx context.Context) ForZoneArrayOutput { + return o +} + +func (o ForZoneArrayOutput) Index(i pulumi.IntInput) ForZoneOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) ForZone { + return vs[0].([]ForZone)[vs[1].(int)] + }).(ForZoneOutput) +} + func init() { pulumi.RegisterOutputType(EndpointOutput{}) pulumi.RegisterOutputType(EndpointArrayOutput{}) pulumi.RegisterOutputType(EndpointConditionsOutput{}) pulumi.RegisterOutputType(EndpointConditionsPtrOutput{}) + pulumi.RegisterOutputType(EndpointHintsOutput{}) + pulumi.RegisterOutputType(EndpointHintsPtrOutput{}) pulumi.RegisterOutputType(EndpointPortOutput{}) pulumi.RegisterOutputType(EndpointPortArrayOutput{}) pulumi.RegisterOutputType(EndpointSliceTypeOutput{}) pulumi.RegisterOutputType(EndpointSliceTypeArrayOutput{}) pulumi.RegisterOutputType(EndpointSliceListTypeOutput{}) + pulumi.RegisterOutputType(ForZoneOutput{}) + pulumi.RegisterOutputType(ForZoneArrayOutput{}) } diff --git a/sdk/go/kubernetes/events/v1/event.go b/sdk/go/kubernetes/events/v1/event.go index 904d3e587c..deaaae6404 100644 --- a/sdk/go/kubernetes/events/v1/event.go +++ b/sdk/go/kubernetes/events/v1/event.go @@ -32,8 +32,9 @@ type Event struct { // eventTime is the time when this Event was first observed. It is required. EventTime pulumi.StringOutput `pulumi:"eventTime"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind pulumi.StringPtrOutput `pulumi:"kind"` - Metadata metav1.ObjectMetaOutput `pulumi:"metadata"` + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note pulumi.StringPtrOutput `pulumi:"note"` // reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters. @@ -62,9 +63,6 @@ func NewEvent(ctx *pulumi.Context, if args.EventTime == nil { return nil, errors.New("invalid value for required argument 'EventTime'") } - if args.Metadata == nil { - return nil, errors.New("invalid value for required argument 'Metadata'") - } args.ApiVersion = pulumi.StringPtr("events.k8s.io/v1") args.Kind = pulumi.StringPtr("Event") aliases := pulumi.Aliases([]pulumi.Alias{ @@ -113,7 +111,8 @@ type eventState struct { // eventTime is the time when this Event was first observed. It is required. EventTime *string `pulumi:"eventTime"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind *string `pulumi:"kind"` + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata *metav1.ObjectMeta `pulumi:"metadata"` // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note *string `pulumi:"note"` @@ -149,7 +148,8 @@ type EventState struct { // eventTime is the time when this Event was first observed. It is required. EventTime pulumi.StringPtrInput // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind pulumi.StringPtrInput + Kind pulumi.StringPtrInput + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata metav1.ObjectMetaPtrInput // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note pulumi.StringPtrInput @@ -189,8 +189,9 @@ type eventArgs struct { // eventTime is the time when this Event was first observed. It is required. EventTime string `pulumi:"eventTime"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind *string `pulumi:"kind"` - Metadata metav1.ObjectMeta `pulumi:"metadata"` + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note *string `pulumi:"note"` // reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters. @@ -226,8 +227,9 @@ type EventArgs struct { // eventTime is the time when this Event was first observed. It is required. EventTime pulumi.StringInput // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind pulumi.StringPtrInput - Metadata metav1.ObjectMetaInput + Kind pulumi.StringPtrInput + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note pulumi.StringPtrInput // reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters. diff --git a/sdk/go/kubernetes/events/v1/pulumiTypes.go b/sdk/go/kubernetes/events/v1/pulumiTypes.go index 6ee1b2645b..20eaf9af7e 100644 --- a/sdk/go/kubernetes/events/v1/pulumiTypes.go +++ b/sdk/go/kubernetes/events/v1/pulumiTypes.go @@ -29,8 +29,9 @@ type EventType struct { // eventTime is the time when this Event was first observed. It is required. EventTime string `pulumi:"eventTime"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind *string `pulumi:"kind"` - Metadata metav1.ObjectMeta `pulumi:"metadata"` + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note *string `pulumi:"note"` // reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters. @@ -77,8 +78,9 @@ type EventTypeArgs struct { // eventTime is the time when this Event was first observed. It is required. EventTime pulumi.StringInput `pulumi:"eventTime"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind pulumi.StringPtrInput `pulumi:"kind"` - Metadata metav1.ObjectMetaInput `pulumi:"metadata"` + Kind pulumi.StringPtrInput `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"` // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note pulumi.StringPtrInput `pulumi:"note"` // reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters. @@ -189,8 +191,9 @@ func (o EventTypeOutput) Kind() pulumi.StringPtrOutput { return o.ApplyT(func(v EventType) *string { return v.Kind }).(pulumi.StringPtrOutput) } -func (o EventTypeOutput) Metadata() metav1.ObjectMetaOutput { - return o.ApplyT(func(v EventType) metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaOutput) +// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o EventTypeOutput) Metadata() metav1.ObjectMetaPtrOutput { + return o.ApplyT(func(v EventType) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput) } // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. diff --git a/sdk/go/kubernetes/events/v1beta1/event.go b/sdk/go/kubernetes/events/v1beta1/event.go index 2dd47a8429..ea5e8bfdc4 100644 --- a/sdk/go/kubernetes/events/v1beta1/event.go +++ b/sdk/go/kubernetes/events/v1beta1/event.go @@ -32,8 +32,9 @@ type Event struct { // eventTime is the time when this Event was first observed. It is required. EventTime pulumi.StringOutput `pulumi:"eventTime"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind pulumi.StringPtrOutput `pulumi:"kind"` - Metadata metav1.ObjectMetaOutput `pulumi:"metadata"` + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note pulumi.StringPtrOutput `pulumi:"note"` // reason is why the action was taken. It is human-readable. This field can have at most 128 characters. @@ -62,9 +63,6 @@ func NewEvent(ctx *pulumi.Context, if args.EventTime == nil { return nil, errors.New("invalid value for required argument 'EventTime'") } - if args.Metadata == nil { - return nil, errors.New("invalid value for required argument 'Metadata'") - } args.ApiVersion = pulumi.StringPtr("events.k8s.io/v1beta1") args.Kind = pulumi.StringPtr("Event") aliases := pulumi.Aliases([]pulumi.Alias{ @@ -113,7 +111,8 @@ type eventState struct { // eventTime is the time when this Event was first observed. It is required. EventTime *string `pulumi:"eventTime"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind *string `pulumi:"kind"` + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata *metav1.ObjectMeta `pulumi:"metadata"` // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note *string `pulumi:"note"` @@ -149,7 +148,8 @@ type EventState struct { // eventTime is the time when this Event was first observed. It is required. EventTime pulumi.StringPtrInput // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind pulumi.StringPtrInput + Kind pulumi.StringPtrInput + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Metadata metav1.ObjectMetaPtrInput // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note pulumi.StringPtrInput @@ -189,8 +189,9 @@ type eventArgs struct { // eventTime is the time when this Event was first observed. It is required. EventTime string `pulumi:"eventTime"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind *string `pulumi:"kind"` - Metadata metav1.ObjectMeta `pulumi:"metadata"` + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note *string `pulumi:"note"` // reason is why the action was taken. It is human-readable. This field can have at most 128 characters. @@ -226,8 +227,9 @@ type EventArgs struct { // eventTime is the time when this Event was first observed. It is required. EventTime pulumi.StringInput // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind pulumi.StringPtrInput - Metadata metav1.ObjectMetaInput + Kind pulumi.StringPtrInput + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note pulumi.StringPtrInput // reason is why the action was taken. It is human-readable. This field can have at most 128 characters. diff --git a/sdk/go/kubernetes/events/v1beta1/pulumiTypes.go b/sdk/go/kubernetes/events/v1beta1/pulumiTypes.go index 91159cd61d..ca5aa224bc 100644 --- a/sdk/go/kubernetes/events/v1beta1/pulumiTypes.go +++ b/sdk/go/kubernetes/events/v1beta1/pulumiTypes.go @@ -29,8 +29,9 @@ type EventType struct { // eventTime is the time when this Event was first observed. It is required. EventTime string `pulumi:"eventTime"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind *string `pulumi:"kind"` - Metadata metav1.ObjectMeta `pulumi:"metadata"` + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note *string `pulumi:"note"` // reason is why the action was taken. It is human-readable. This field can have at most 128 characters. @@ -77,8 +78,9 @@ type EventTypeArgs struct { // eventTime is the time when this Event was first observed. It is required. EventTime pulumi.StringInput `pulumi:"eventTime"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind pulumi.StringPtrInput `pulumi:"kind"` - Metadata metav1.ObjectMetaInput `pulumi:"metadata"` + Kind pulumi.StringPtrInput `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"` // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. Note pulumi.StringPtrInput `pulumi:"note"` // reason is why the action was taken. It is human-readable. This field can have at most 128 characters. @@ -189,8 +191,9 @@ func (o EventTypeOutput) Kind() pulumi.StringPtrOutput { return o.ApplyT(func(v EventType) *string { return v.Kind }).(pulumi.StringPtrOutput) } -func (o EventTypeOutput) Metadata() metav1.ObjectMetaOutput { - return o.ApplyT(func(v EventType) metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaOutput) +// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o EventTypeOutput) Metadata() metav1.ObjectMetaPtrOutput { + return o.ApplyT(func(v EventType) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput) } // note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. diff --git a/sdk/go/kubernetes/flowcontrol/v1alpha1/pulumiTypes.go b/sdk/go/kubernetes/flowcontrol/v1alpha1/pulumiTypes.go index 85885ce745..9d9e0a542d 100644 --- a/sdk/go/kubernetes/flowcontrol/v1alpha1/pulumiTypes.go +++ b/sdk/go/kubernetes/flowcontrol/v1alpha1/pulumiTypes.go @@ -503,7 +503,7 @@ func (o FlowSchemaListTypeOutput) Metadata() metav1.ListMetaPtrOutput { type FlowSchemaSpec struct { // `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string. DistinguisherMethod *FlowDistinguisherMethod `pulumi:"distinguisherMethod"` - // `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. + // `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. MatchingPrecedence *int `pulumi:"matchingPrecedence"` // `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required. PriorityLevelConfiguration PriorityLevelConfigurationReference `pulumi:"priorityLevelConfiguration"` @@ -526,7 +526,7 @@ type FlowSchemaSpecInput interface { type FlowSchemaSpecArgs struct { // `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string. DistinguisherMethod FlowDistinguisherMethodPtrInput `pulumi:"distinguisherMethod"` - // `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. + // `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. MatchingPrecedence pulumi.IntPtrInput `pulumi:"matchingPrecedence"` // `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required. PriorityLevelConfiguration PriorityLevelConfigurationReferenceInput `pulumi:"priorityLevelConfiguration"` @@ -617,7 +617,7 @@ func (o FlowSchemaSpecOutput) DistinguisherMethod() FlowDistinguisherMethodPtrOu return o.ApplyT(func(v FlowSchemaSpec) *FlowDistinguisherMethod { return v.DistinguisherMethod }).(FlowDistinguisherMethodPtrOutput) } -// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. +// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. func (o FlowSchemaSpecOutput) MatchingPrecedence() pulumi.IntPtrOutput { return o.ApplyT(func(v FlowSchemaSpec) *int { return v.MatchingPrecedence }).(pulumi.IntPtrOutput) } @@ -660,7 +660,7 @@ func (o FlowSchemaSpecPtrOutput) DistinguisherMethod() FlowDistinguisherMethodPt }).(FlowDistinguisherMethodPtrOutput) } -// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. +// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. func (o FlowSchemaSpecPtrOutput) MatchingPrecedence() pulumi.IntPtrOutput { return o.ApplyT(func(v *FlowSchemaSpec) *int { if v == nil { diff --git a/sdk/go/kubernetes/networking/v1/pulumiTypes.go b/sdk/go/kubernetes/networking/v1/pulumiTypes.go index 1d30809d5d..0ea98726bb 100644 --- a/sdk/go/kubernetes/networking/v1/pulumiTypes.go +++ b/sdk/go/kubernetes/networking/v1/pulumiTypes.go @@ -987,12 +987,222 @@ func (o IngressClassListTypeOutput) Metadata() metav1.ListMetaPtrOutput { return o.ApplyT(func(v IngressClassListType) *metav1.ListMeta { return v.Metadata }).(metav1.ListMetaPtrOutput) } +// IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. +type IngressClassParametersReference struct { + // APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + ApiGroup *string `pulumi:"apiGroup"` + // Kind is the type of resource being referenced. + Kind string `pulumi:"kind"` + // Name is the name of resource being referenced. + Name string `pulumi:"name"` + // Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + Namespace *string `pulumi:"namespace"` + // Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + Scope *string `pulumi:"scope"` +} + +// IngressClassParametersReferenceInput is an input type that accepts IngressClassParametersReferenceArgs and IngressClassParametersReferenceOutput values. +// You can construct a concrete instance of `IngressClassParametersReferenceInput` via: +// +// IngressClassParametersReferenceArgs{...} +type IngressClassParametersReferenceInput interface { + pulumi.Input + + ToIngressClassParametersReferenceOutput() IngressClassParametersReferenceOutput + ToIngressClassParametersReferenceOutputWithContext(context.Context) IngressClassParametersReferenceOutput +} + +// IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. +type IngressClassParametersReferenceArgs struct { + // APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + ApiGroup pulumi.StringPtrInput `pulumi:"apiGroup"` + // Kind is the type of resource being referenced. + Kind pulumi.StringInput `pulumi:"kind"` + // Name is the name of resource being referenced. + Name pulumi.StringInput `pulumi:"name"` + // Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + Namespace pulumi.StringPtrInput `pulumi:"namespace"` + // Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + Scope pulumi.StringPtrInput `pulumi:"scope"` +} + +func (IngressClassParametersReferenceArgs) ElementType() reflect.Type { + return reflect.TypeOf((*IngressClassParametersReference)(nil)).Elem() +} + +func (i IngressClassParametersReferenceArgs) ToIngressClassParametersReferenceOutput() IngressClassParametersReferenceOutput { + return i.ToIngressClassParametersReferenceOutputWithContext(context.Background()) +} + +func (i IngressClassParametersReferenceArgs) ToIngressClassParametersReferenceOutputWithContext(ctx context.Context) IngressClassParametersReferenceOutput { + return pulumi.ToOutputWithContext(ctx, i).(IngressClassParametersReferenceOutput) +} + +func (i IngressClassParametersReferenceArgs) ToIngressClassParametersReferencePtrOutput() IngressClassParametersReferencePtrOutput { + return i.ToIngressClassParametersReferencePtrOutputWithContext(context.Background()) +} + +func (i IngressClassParametersReferenceArgs) ToIngressClassParametersReferencePtrOutputWithContext(ctx context.Context) IngressClassParametersReferencePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(IngressClassParametersReferenceOutput).ToIngressClassParametersReferencePtrOutputWithContext(ctx) +} + +// IngressClassParametersReferencePtrInput is an input type that accepts IngressClassParametersReferenceArgs, IngressClassParametersReferencePtr and IngressClassParametersReferencePtrOutput values. +// You can construct a concrete instance of `IngressClassParametersReferencePtrInput` via: +// +// IngressClassParametersReferenceArgs{...} +// +// or: +// +// nil +type IngressClassParametersReferencePtrInput interface { + pulumi.Input + + ToIngressClassParametersReferencePtrOutput() IngressClassParametersReferencePtrOutput + ToIngressClassParametersReferencePtrOutputWithContext(context.Context) IngressClassParametersReferencePtrOutput +} + +type ingressClassParametersReferencePtrType IngressClassParametersReferenceArgs + +func IngressClassParametersReferencePtr(v *IngressClassParametersReferenceArgs) IngressClassParametersReferencePtrInput { + return (*ingressClassParametersReferencePtrType)(v) +} + +func (*ingressClassParametersReferencePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**IngressClassParametersReference)(nil)).Elem() +} + +func (i *ingressClassParametersReferencePtrType) ToIngressClassParametersReferencePtrOutput() IngressClassParametersReferencePtrOutput { + return i.ToIngressClassParametersReferencePtrOutputWithContext(context.Background()) +} + +func (i *ingressClassParametersReferencePtrType) ToIngressClassParametersReferencePtrOutputWithContext(ctx context.Context) IngressClassParametersReferencePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(IngressClassParametersReferencePtrOutput) +} + +// IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. +type IngressClassParametersReferenceOutput struct{ *pulumi.OutputState } + +func (IngressClassParametersReferenceOutput) ElementType() reflect.Type { + return reflect.TypeOf((*IngressClassParametersReference)(nil)).Elem() +} + +func (o IngressClassParametersReferenceOutput) ToIngressClassParametersReferenceOutput() IngressClassParametersReferenceOutput { + return o +} + +func (o IngressClassParametersReferenceOutput) ToIngressClassParametersReferenceOutputWithContext(ctx context.Context) IngressClassParametersReferenceOutput { + return o +} + +func (o IngressClassParametersReferenceOutput) ToIngressClassParametersReferencePtrOutput() IngressClassParametersReferencePtrOutput { + return o.ToIngressClassParametersReferencePtrOutputWithContext(context.Background()) +} + +func (o IngressClassParametersReferenceOutput) ToIngressClassParametersReferencePtrOutputWithContext(ctx context.Context) IngressClassParametersReferencePtrOutput { + return o.ApplyT(func(v IngressClassParametersReference) *IngressClassParametersReference { + return &v + }).(IngressClassParametersReferencePtrOutput) +} + +// APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. +func (o IngressClassParametersReferenceOutput) ApiGroup() pulumi.StringPtrOutput { + return o.ApplyT(func(v IngressClassParametersReference) *string { return v.ApiGroup }).(pulumi.StringPtrOutput) +} + +// Kind is the type of resource being referenced. +func (o IngressClassParametersReferenceOutput) Kind() pulumi.StringOutput { + return o.ApplyT(func(v IngressClassParametersReference) string { return v.Kind }).(pulumi.StringOutput) +} + +// Name is the name of resource being referenced. +func (o IngressClassParametersReferenceOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v IngressClassParametersReference) string { return v.Name }).(pulumi.StringOutput) +} + +// Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". +func (o IngressClassParametersReferenceOutput) Namespace() pulumi.StringPtrOutput { + return o.ApplyT(func(v IngressClassParametersReference) *string { return v.Namespace }).(pulumi.StringPtrOutput) +} + +// Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. +func (o IngressClassParametersReferenceOutput) Scope() pulumi.StringPtrOutput { + return o.ApplyT(func(v IngressClassParametersReference) *string { return v.Scope }).(pulumi.StringPtrOutput) +} + +type IngressClassParametersReferencePtrOutput struct{ *pulumi.OutputState } + +func (IngressClassParametersReferencePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**IngressClassParametersReference)(nil)).Elem() +} + +func (o IngressClassParametersReferencePtrOutput) ToIngressClassParametersReferencePtrOutput() IngressClassParametersReferencePtrOutput { + return o +} + +func (o IngressClassParametersReferencePtrOutput) ToIngressClassParametersReferencePtrOutputWithContext(ctx context.Context) IngressClassParametersReferencePtrOutput { + return o +} + +func (o IngressClassParametersReferencePtrOutput) Elem() IngressClassParametersReferenceOutput { + return o.ApplyT(func(v *IngressClassParametersReference) IngressClassParametersReference { return *v }).(IngressClassParametersReferenceOutput) +} + +// APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. +func (o IngressClassParametersReferencePtrOutput) ApiGroup() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IngressClassParametersReference) *string { + if v == nil { + return nil + } + return v.ApiGroup + }).(pulumi.StringPtrOutput) +} + +// Kind is the type of resource being referenced. +func (o IngressClassParametersReferencePtrOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IngressClassParametersReference) *string { + if v == nil { + return nil + } + return &v.Kind + }).(pulumi.StringPtrOutput) +} + +// Name is the name of resource being referenced. +func (o IngressClassParametersReferencePtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IngressClassParametersReference) *string { + if v == nil { + return nil + } + return &v.Name + }).(pulumi.StringPtrOutput) +} + +// Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". +func (o IngressClassParametersReferencePtrOutput) Namespace() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IngressClassParametersReference) *string { + if v == nil { + return nil + } + return v.Namespace + }).(pulumi.StringPtrOutput) +} + +// Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. +func (o IngressClassParametersReferencePtrOutput) Scope() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IngressClassParametersReference) *string { + if v == nil { + return nil + } + return v.Scope + }).(pulumi.StringPtrOutput) +} + // IngressClassSpec provides information about the class of an Ingress. type IngressClassSpec struct { // Controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable. Controller *string `pulumi:"controller"` // Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. - Parameters *corev1.TypedLocalObjectReference `pulumi:"parameters"` + Parameters *IngressClassParametersReference `pulumi:"parameters"` } // IngressClassSpecInput is an input type that accepts IngressClassSpecArgs and IngressClassSpecOutput values. @@ -1011,7 +1221,7 @@ type IngressClassSpecArgs struct { // Controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable. Controller pulumi.StringPtrInput `pulumi:"controller"` // Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. - Parameters corev1.TypedLocalObjectReferencePtrInput `pulumi:"parameters"` + Parameters IngressClassParametersReferencePtrInput `pulumi:"parameters"` } func (IngressClassSpecArgs) ElementType() reflect.Type { @@ -1098,8 +1308,8 @@ func (o IngressClassSpecOutput) Controller() pulumi.StringPtrOutput { } // Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. -func (o IngressClassSpecOutput) Parameters() corev1.TypedLocalObjectReferencePtrOutput { - return o.ApplyT(func(v IngressClassSpec) *corev1.TypedLocalObjectReference { return v.Parameters }).(corev1.TypedLocalObjectReferencePtrOutput) +func (o IngressClassSpecOutput) Parameters() IngressClassParametersReferencePtrOutput { + return o.ApplyT(func(v IngressClassSpec) *IngressClassParametersReference { return v.Parameters }).(IngressClassParametersReferencePtrOutput) } type IngressClassSpecPtrOutput struct{ *pulumi.OutputState } @@ -1131,13 +1341,13 @@ func (o IngressClassSpecPtrOutput) Controller() pulumi.StringPtrOutput { } // Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. -func (o IngressClassSpecPtrOutput) Parameters() corev1.TypedLocalObjectReferencePtrOutput { - return o.ApplyT(func(v *IngressClassSpec) *corev1.TypedLocalObjectReference { +func (o IngressClassSpecPtrOutput) Parameters() IngressClassParametersReferencePtrOutput { + return o.ApplyT(func(v *IngressClassSpec) *IngressClassParametersReference { if v == nil { return nil } return v.Parameters - }).(corev1.TypedLocalObjectReferencePtrOutput) + }).(IngressClassParametersReferencePtrOutput) } // IngressList is a collection of Ingress. @@ -2495,7 +2705,9 @@ func (o NetworkPolicyPeerArrayOutput) Index(i pulumi.IntInput) NetworkPolicyPeer // NetworkPolicyPort describes a port to allow traffic on type NetworkPolicyPort struct { - // The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + // If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate "NetworkPolicyEndPort". + EndPort *int `pulumi:"endPort"` + // The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. Port interface{} `pulumi:"port"` // The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. Protocol *string `pulumi:"protocol"` @@ -2514,7 +2726,9 @@ type NetworkPolicyPortInput interface { // NetworkPolicyPort describes a port to allow traffic on type NetworkPolicyPortArgs struct { - // The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + // If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate "NetworkPolicyEndPort". + EndPort pulumi.IntPtrInput `pulumi:"endPort"` + // The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. Port pulumi.Input `pulumi:"port"` // The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. Protocol pulumi.StringPtrInput `pulumi:"protocol"` @@ -2572,7 +2786,12 @@ func (o NetworkPolicyPortOutput) ToNetworkPolicyPortOutputWithContext(ctx contex return o } -// The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. +// If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate "NetworkPolicyEndPort". +func (o NetworkPolicyPortOutput) EndPort() pulumi.IntPtrOutput { + return o.ApplyT(func(v NetworkPolicyPort) *int { return v.EndPort }).(pulumi.IntPtrOutput) +} + +// The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. func (o NetworkPolicyPortOutput) Port() pulumi.AnyOutput { return o.ApplyT(func(v NetworkPolicyPort) interface{} { return v.Port }).(pulumi.AnyOutput) } @@ -2610,7 +2829,7 @@ type NetworkPolicySpec struct { Ingress []NetworkPolicyIngressRule `pulumi:"ingress"` // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. PodSelector metav1.LabelSelector `pulumi:"podSelector"` - // List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + // List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 PolicyTypes []string `pulumi:"policyTypes"` } @@ -2633,7 +2852,7 @@ type NetworkPolicySpecArgs struct { Ingress NetworkPolicyIngressRuleArrayInput `pulumi:"ingress"` // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. PodSelector metav1.LabelSelectorInput `pulumi:"podSelector"` - // List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + // List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 PolicyTypes pulumi.StringArrayInput `pulumi:"policyTypes"` } @@ -2730,7 +2949,7 @@ func (o NetworkPolicySpecOutput) PodSelector() metav1.LabelSelectorOutput { return o.ApplyT(func(v NetworkPolicySpec) metav1.LabelSelector { return v.PodSelector }).(metav1.LabelSelectorOutput) } -// List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 +// List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 func (o NetworkPolicySpecOutput) PolicyTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v NetworkPolicySpec) []string { return v.PolicyTypes }).(pulumi.StringArrayOutput) } @@ -2783,7 +3002,7 @@ func (o NetworkPolicySpecPtrOutput) PodSelector() metav1.LabelSelectorPtrOutput }).(metav1.LabelSelectorPtrOutput) } -// List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 +// List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 func (o NetworkPolicySpecPtrOutput) PolicyTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkPolicySpec) []string { if v == nil { @@ -2960,6 +3179,8 @@ func init() { pulumi.RegisterOutputType(IngressClassTypeOutput{}) pulumi.RegisterOutputType(IngressClassTypeArrayOutput{}) pulumi.RegisterOutputType(IngressClassListTypeOutput{}) + pulumi.RegisterOutputType(IngressClassParametersReferenceOutput{}) + pulumi.RegisterOutputType(IngressClassParametersReferencePtrOutput{}) pulumi.RegisterOutputType(IngressClassSpecOutput{}) pulumi.RegisterOutputType(IngressClassSpecPtrOutput{}) pulumi.RegisterOutputType(IngressListTypeOutput{}) diff --git a/sdk/go/kubernetes/networking/v1beta1/pulumiTypes.go b/sdk/go/kubernetes/networking/v1beta1/pulumiTypes.go index 7e1029af2e..b190357ccc 100644 --- a/sdk/go/kubernetes/networking/v1beta1/pulumiTypes.go +++ b/sdk/go/kubernetes/networking/v1beta1/pulumiTypes.go @@ -853,12 +853,222 @@ func (o IngressClassListTypeOutput) Metadata() metav1.ListMetaPtrOutput { return o.ApplyT(func(v IngressClassListType) *metav1.ListMeta { return v.Metadata }).(metav1.ListMetaPtrOutput) } +// IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. +type IngressClassParametersReference struct { + // APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + ApiGroup *string `pulumi:"apiGroup"` + // Kind is the type of resource being referenced. + Kind string `pulumi:"kind"` + // Name is the name of resource being referenced. + Name string `pulumi:"name"` + // Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + Namespace *string `pulumi:"namespace"` + // Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + Scope *string `pulumi:"scope"` +} + +// IngressClassParametersReferenceInput is an input type that accepts IngressClassParametersReferenceArgs and IngressClassParametersReferenceOutput values. +// You can construct a concrete instance of `IngressClassParametersReferenceInput` via: +// +// IngressClassParametersReferenceArgs{...} +type IngressClassParametersReferenceInput interface { + pulumi.Input + + ToIngressClassParametersReferenceOutput() IngressClassParametersReferenceOutput + ToIngressClassParametersReferenceOutputWithContext(context.Context) IngressClassParametersReferenceOutput +} + +// IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. +type IngressClassParametersReferenceArgs struct { + // APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + ApiGroup pulumi.StringPtrInput `pulumi:"apiGroup"` + // Kind is the type of resource being referenced. + Kind pulumi.StringInput `pulumi:"kind"` + // Name is the name of resource being referenced. + Name pulumi.StringInput `pulumi:"name"` + // Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + Namespace pulumi.StringPtrInput `pulumi:"namespace"` + // Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + Scope pulumi.StringPtrInput `pulumi:"scope"` +} + +func (IngressClassParametersReferenceArgs) ElementType() reflect.Type { + return reflect.TypeOf((*IngressClassParametersReference)(nil)).Elem() +} + +func (i IngressClassParametersReferenceArgs) ToIngressClassParametersReferenceOutput() IngressClassParametersReferenceOutput { + return i.ToIngressClassParametersReferenceOutputWithContext(context.Background()) +} + +func (i IngressClassParametersReferenceArgs) ToIngressClassParametersReferenceOutputWithContext(ctx context.Context) IngressClassParametersReferenceOutput { + return pulumi.ToOutputWithContext(ctx, i).(IngressClassParametersReferenceOutput) +} + +func (i IngressClassParametersReferenceArgs) ToIngressClassParametersReferencePtrOutput() IngressClassParametersReferencePtrOutput { + return i.ToIngressClassParametersReferencePtrOutputWithContext(context.Background()) +} + +func (i IngressClassParametersReferenceArgs) ToIngressClassParametersReferencePtrOutputWithContext(ctx context.Context) IngressClassParametersReferencePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(IngressClassParametersReferenceOutput).ToIngressClassParametersReferencePtrOutputWithContext(ctx) +} + +// IngressClassParametersReferencePtrInput is an input type that accepts IngressClassParametersReferenceArgs, IngressClassParametersReferencePtr and IngressClassParametersReferencePtrOutput values. +// You can construct a concrete instance of `IngressClassParametersReferencePtrInput` via: +// +// IngressClassParametersReferenceArgs{...} +// +// or: +// +// nil +type IngressClassParametersReferencePtrInput interface { + pulumi.Input + + ToIngressClassParametersReferencePtrOutput() IngressClassParametersReferencePtrOutput + ToIngressClassParametersReferencePtrOutputWithContext(context.Context) IngressClassParametersReferencePtrOutput +} + +type ingressClassParametersReferencePtrType IngressClassParametersReferenceArgs + +func IngressClassParametersReferencePtr(v *IngressClassParametersReferenceArgs) IngressClassParametersReferencePtrInput { + return (*ingressClassParametersReferencePtrType)(v) +} + +func (*ingressClassParametersReferencePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**IngressClassParametersReference)(nil)).Elem() +} + +func (i *ingressClassParametersReferencePtrType) ToIngressClassParametersReferencePtrOutput() IngressClassParametersReferencePtrOutput { + return i.ToIngressClassParametersReferencePtrOutputWithContext(context.Background()) +} + +func (i *ingressClassParametersReferencePtrType) ToIngressClassParametersReferencePtrOutputWithContext(ctx context.Context) IngressClassParametersReferencePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(IngressClassParametersReferencePtrOutput) +} + +// IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. +type IngressClassParametersReferenceOutput struct{ *pulumi.OutputState } + +func (IngressClassParametersReferenceOutput) ElementType() reflect.Type { + return reflect.TypeOf((*IngressClassParametersReference)(nil)).Elem() +} + +func (o IngressClassParametersReferenceOutput) ToIngressClassParametersReferenceOutput() IngressClassParametersReferenceOutput { + return o +} + +func (o IngressClassParametersReferenceOutput) ToIngressClassParametersReferenceOutputWithContext(ctx context.Context) IngressClassParametersReferenceOutput { + return o +} + +func (o IngressClassParametersReferenceOutput) ToIngressClassParametersReferencePtrOutput() IngressClassParametersReferencePtrOutput { + return o.ToIngressClassParametersReferencePtrOutputWithContext(context.Background()) +} + +func (o IngressClassParametersReferenceOutput) ToIngressClassParametersReferencePtrOutputWithContext(ctx context.Context) IngressClassParametersReferencePtrOutput { + return o.ApplyT(func(v IngressClassParametersReference) *IngressClassParametersReference { + return &v + }).(IngressClassParametersReferencePtrOutput) +} + +// APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. +func (o IngressClassParametersReferenceOutput) ApiGroup() pulumi.StringPtrOutput { + return o.ApplyT(func(v IngressClassParametersReference) *string { return v.ApiGroup }).(pulumi.StringPtrOutput) +} + +// Kind is the type of resource being referenced. +func (o IngressClassParametersReferenceOutput) Kind() pulumi.StringOutput { + return o.ApplyT(func(v IngressClassParametersReference) string { return v.Kind }).(pulumi.StringOutput) +} + +// Name is the name of resource being referenced. +func (o IngressClassParametersReferenceOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v IngressClassParametersReference) string { return v.Name }).(pulumi.StringOutput) +} + +// Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". +func (o IngressClassParametersReferenceOutput) Namespace() pulumi.StringPtrOutput { + return o.ApplyT(func(v IngressClassParametersReference) *string { return v.Namespace }).(pulumi.StringPtrOutput) +} + +// Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. +func (o IngressClassParametersReferenceOutput) Scope() pulumi.StringPtrOutput { + return o.ApplyT(func(v IngressClassParametersReference) *string { return v.Scope }).(pulumi.StringPtrOutput) +} + +type IngressClassParametersReferencePtrOutput struct{ *pulumi.OutputState } + +func (IngressClassParametersReferencePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**IngressClassParametersReference)(nil)).Elem() +} + +func (o IngressClassParametersReferencePtrOutput) ToIngressClassParametersReferencePtrOutput() IngressClassParametersReferencePtrOutput { + return o +} + +func (o IngressClassParametersReferencePtrOutput) ToIngressClassParametersReferencePtrOutputWithContext(ctx context.Context) IngressClassParametersReferencePtrOutput { + return o +} + +func (o IngressClassParametersReferencePtrOutput) Elem() IngressClassParametersReferenceOutput { + return o.ApplyT(func(v *IngressClassParametersReference) IngressClassParametersReference { return *v }).(IngressClassParametersReferenceOutput) +} + +// APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. +func (o IngressClassParametersReferencePtrOutput) ApiGroup() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IngressClassParametersReference) *string { + if v == nil { + return nil + } + return v.ApiGroup + }).(pulumi.StringPtrOutput) +} + +// Kind is the type of resource being referenced. +func (o IngressClassParametersReferencePtrOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IngressClassParametersReference) *string { + if v == nil { + return nil + } + return &v.Kind + }).(pulumi.StringPtrOutput) +} + +// Name is the name of resource being referenced. +func (o IngressClassParametersReferencePtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IngressClassParametersReference) *string { + if v == nil { + return nil + } + return &v.Name + }).(pulumi.StringPtrOutput) +} + +// Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". +func (o IngressClassParametersReferencePtrOutput) Namespace() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IngressClassParametersReference) *string { + if v == nil { + return nil + } + return v.Namespace + }).(pulumi.StringPtrOutput) +} + +// Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. +func (o IngressClassParametersReferencePtrOutput) Scope() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IngressClassParametersReference) *string { + if v == nil { + return nil + } + return v.Scope + }).(pulumi.StringPtrOutput) +} + // IngressClassSpec provides information about the class of an Ingress. type IngressClassSpec struct { // Controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable. Controller *string `pulumi:"controller"` // Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. - Parameters *corev1.TypedLocalObjectReference `pulumi:"parameters"` + Parameters *IngressClassParametersReference `pulumi:"parameters"` } // IngressClassSpecInput is an input type that accepts IngressClassSpecArgs and IngressClassSpecOutput values. @@ -877,7 +1087,7 @@ type IngressClassSpecArgs struct { // Controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable. Controller pulumi.StringPtrInput `pulumi:"controller"` // Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. - Parameters corev1.TypedLocalObjectReferencePtrInput `pulumi:"parameters"` + Parameters IngressClassParametersReferencePtrInput `pulumi:"parameters"` } func (IngressClassSpecArgs) ElementType() reflect.Type { @@ -964,8 +1174,8 @@ func (o IngressClassSpecOutput) Controller() pulumi.StringPtrOutput { } // Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. -func (o IngressClassSpecOutput) Parameters() corev1.TypedLocalObjectReferencePtrOutput { - return o.ApplyT(func(v IngressClassSpec) *corev1.TypedLocalObjectReference { return v.Parameters }).(corev1.TypedLocalObjectReferencePtrOutput) +func (o IngressClassSpecOutput) Parameters() IngressClassParametersReferencePtrOutput { + return o.ApplyT(func(v IngressClassSpec) *IngressClassParametersReference { return v.Parameters }).(IngressClassParametersReferencePtrOutput) } type IngressClassSpecPtrOutput struct{ *pulumi.OutputState } @@ -997,13 +1207,13 @@ func (o IngressClassSpecPtrOutput) Controller() pulumi.StringPtrOutput { } // Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. -func (o IngressClassSpecPtrOutput) Parameters() corev1.TypedLocalObjectReferencePtrOutput { - return o.ApplyT(func(v *IngressClassSpec) *corev1.TypedLocalObjectReference { +func (o IngressClassSpecPtrOutput) Parameters() IngressClassParametersReferencePtrOutput { + return o.ApplyT(func(v *IngressClassSpec) *IngressClassParametersReference { if v == nil { return nil } return v.Parameters - }).(corev1.TypedLocalObjectReferencePtrOutput) + }).(IngressClassParametersReferencePtrOutput) } // IngressList is a collection of Ingress. @@ -1661,6 +1871,8 @@ func init() { pulumi.RegisterOutputType(IngressClassTypeOutput{}) pulumi.RegisterOutputType(IngressClassTypeArrayOutput{}) pulumi.RegisterOutputType(IngressClassListTypeOutput{}) + pulumi.RegisterOutputType(IngressClassParametersReferenceOutput{}) + pulumi.RegisterOutputType(IngressClassParametersReferencePtrOutput{}) pulumi.RegisterOutputType(IngressClassSpecOutput{}) pulumi.RegisterOutputType(IngressClassSpecPtrOutput{}) pulumi.RegisterOutputType(IngressListTypeOutput{}) diff --git a/sdk/go/kubernetes/policy/v1/init.go b/sdk/go/kubernetes/policy/v1/init.go new file mode 100644 index 0000000000..a6ab9912fe --- /dev/null +++ b/sdk/go/kubernetes/policy/v1/init.go @@ -0,0 +1,45 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1 + +import ( + "fmt" + + "github.com/blang/semver" + "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +type module struct { + version semver.Version +} + +func (m *module) Version() semver.Version { + return m.version +} + +func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { + switch typ { + case "kubernetes:policy/v1:PodDisruptionBudget": + r, err = NewPodDisruptionBudget(ctx, name, nil, pulumi.URN_(urn)) + case "kubernetes:policy/v1:PodDisruptionBudgetList": + r, err = NewPodDisruptionBudgetList(ctx, name, nil, pulumi.URN_(urn)) + default: + return nil, fmt.Errorf("unknown resource type: %s", typ) + } + + return +} + +func init() { + version, err := kubernetes.PkgVersion() + if err != nil { + fmt.Println("failed to determine package version. defaulting to v1: %v", err) + } + pulumi.RegisterResourceModule( + "kubernetes", + "policy/v1", + &module{version}, + ) +} diff --git a/sdk/go/kubernetes/policy/v1/podDisruptionBudget.go b/sdk/go/kubernetes/policy/v1/podDisruptionBudget.go new file mode 100644 index 0000000000..066c5fcb7b --- /dev/null +++ b/sdk/go/kubernetes/policy/v1/podDisruptionBudget.go @@ -0,0 +1,308 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1 + +import ( + "context" + "reflect" + + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods +type PodDisruptionBudget struct { + pulumi.CustomResourceState + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` + // Specification of the desired behavior of the PodDisruptionBudget. + Spec PodDisruptionBudgetSpecPtrOutput `pulumi:"spec"` + // Most recently observed status of the PodDisruptionBudget. + Status PodDisruptionBudgetStatusPtrOutput `pulumi:"status"` +} + +// NewPodDisruptionBudget registers a new resource with the given unique name, arguments, and options. +func NewPodDisruptionBudget(ctx *pulumi.Context, + name string, args *PodDisruptionBudgetArgs, opts ...pulumi.ResourceOption) (*PodDisruptionBudget, error) { + if args == nil { + args = &PodDisruptionBudgetArgs{} + } + + args.ApiVersion = pulumi.StringPtr("policy/v1") + args.Kind = pulumi.StringPtr("PodDisruptionBudget") + aliases := pulumi.Aliases([]pulumi.Alias{ + { + Type: pulumi.String("kubernetes:policy/v1beta1:PodDisruptionBudget"), + }, + }) + opts = append(opts, aliases) + var resource PodDisruptionBudget + err := ctx.RegisterResource("kubernetes:policy/v1:PodDisruptionBudget", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetPodDisruptionBudget gets an existing PodDisruptionBudget resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetPodDisruptionBudget(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *PodDisruptionBudgetState, opts ...pulumi.ResourceOption) (*PodDisruptionBudget, error) { + var resource PodDisruptionBudget + err := ctx.ReadResource("kubernetes:policy/v1:PodDisruptionBudget", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering PodDisruptionBudget resources. +type podDisruptionBudgetState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // Specification of the desired behavior of the PodDisruptionBudget. + Spec *PodDisruptionBudgetSpec `pulumi:"spec"` + // Most recently observed status of the PodDisruptionBudget. + Status *PodDisruptionBudgetStatus `pulumi:"status"` +} + +type PodDisruptionBudgetState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput + // Specification of the desired behavior of the PodDisruptionBudget. + Spec PodDisruptionBudgetSpecPtrInput + // Most recently observed status of the PodDisruptionBudget. + Status PodDisruptionBudgetStatusPtrInput +} + +func (PodDisruptionBudgetState) ElementType() reflect.Type { + return reflect.TypeOf((*podDisruptionBudgetState)(nil)).Elem() +} + +type podDisruptionBudgetArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // Specification of the desired behavior of the PodDisruptionBudget. + Spec *PodDisruptionBudgetSpec `pulumi:"spec"` +} + +// The set of arguments for constructing a PodDisruptionBudget resource. +type PodDisruptionBudgetArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput + // Specification of the desired behavior of the PodDisruptionBudget. + Spec PodDisruptionBudgetSpecPtrInput +} + +func (PodDisruptionBudgetArgs) ElementType() reflect.Type { + return reflect.TypeOf((*podDisruptionBudgetArgs)(nil)).Elem() +} + +type PodDisruptionBudgetInput interface { + pulumi.Input + + ToPodDisruptionBudgetOutput() PodDisruptionBudgetOutput + ToPodDisruptionBudgetOutputWithContext(ctx context.Context) PodDisruptionBudgetOutput +} + +func (*PodDisruptionBudget) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudget)(nil)) +} + +func (i *PodDisruptionBudget) ToPodDisruptionBudgetOutput() PodDisruptionBudgetOutput { + return i.ToPodDisruptionBudgetOutputWithContext(context.Background()) +} + +func (i *PodDisruptionBudget) ToPodDisruptionBudgetOutputWithContext(ctx context.Context) PodDisruptionBudgetOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetOutput) +} + +func (i *PodDisruptionBudget) ToPodDisruptionBudgetPtrOutput() PodDisruptionBudgetPtrOutput { + return i.ToPodDisruptionBudgetPtrOutputWithContext(context.Background()) +} + +func (i *PodDisruptionBudget) ToPodDisruptionBudgetPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetPtrOutput) +} + +type PodDisruptionBudgetPtrInput interface { + pulumi.Input + + ToPodDisruptionBudgetPtrOutput() PodDisruptionBudgetPtrOutput + ToPodDisruptionBudgetPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetPtrOutput +} + +type podDisruptionBudgetPtrType PodDisruptionBudgetArgs + +func (*podDisruptionBudgetPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**PodDisruptionBudget)(nil)) +} + +func (i *podDisruptionBudgetPtrType) ToPodDisruptionBudgetPtrOutput() PodDisruptionBudgetPtrOutput { + return i.ToPodDisruptionBudgetPtrOutputWithContext(context.Background()) +} + +func (i *podDisruptionBudgetPtrType) ToPodDisruptionBudgetPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetPtrOutput) +} + +// PodDisruptionBudgetArrayInput is an input type that accepts PodDisruptionBudgetArray and PodDisruptionBudgetArrayOutput values. +// You can construct a concrete instance of `PodDisruptionBudgetArrayInput` via: +// +// PodDisruptionBudgetArray{ PodDisruptionBudgetArgs{...} } +type PodDisruptionBudgetArrayInput interface { + pulumi.Input + + ToPodDisruptionBudgetArrayOutput() PodDisruptionBudgetArrayOutput + ToPodDisruptionBudgetArrayOutputWithContext(context.Context) PodDisruptionBudgetArrayOutput +} + +type PodDisruptionBudgetArray []PodDisruptionBudgetInput + +func (PodDisruptionBudgetArray) ElementType() reflect.Type { + return reflect.TypeOf(([]*PodDisruptionBudget)(nil)) +} + +func (i PodDisruptionBudgetArray) ToPodDisruptionBudgetArrayOutput() PodDisruptionBudgetArrayOutput { + return i.ToPodDisruptionBudgetArrayOutputWithContext(context.Background()) +} + +func (i PodDisruptionBudgetArray) ToPodDisruptionBudgetArrayOutputWithContext(ctx context.Context) PodDisruptionBudgetArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetArrayOutput) +} + +// PodDisruptionBudgetMapInput is an input type that accepts PodDisruptionBudgetMap and PodDisruptionBudgetMapOutput values. +// You can construct a concrete instance of `PodDisruptionBudgetMapInput` via: +// +// PodDisruptionBudgetMap{ "key": PodDisruptionBudgetArgs{...} } +type PodDisruptionBudgetMapInput interface { + pulumi.Input + + ToPodDisruptionBudgetMapOutput() PodDisruptionBudgetMapOutput + ToPodDisruptionBudgetMapOutputWithContext(context.Context) PodDisruptionBudgetMapOutput +} + +type PodDisruptionBudgetMap map[string]PodDisruptionBudgetInput + +func (PodDisruptionBudgetMap) ElementType() reflect.Type { + return reflect.TypeOf((map[string]*PodDisruptionBudget)(nil)) +} + +func (i PodDisruptionBudgetMap) ToPodDisruptionBudgetMapOutput() PodDisruptionBudgetMapOutput { + return i.ToPodDisruptionBudgetMapOutputWithContext(context.Background()) +} + +func (i PodDisruptionBudgetMap) ToPodDisruptionBudgetMapOutputWithContext(ctx context.Context) PodDisruptionBudgetMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetMapOutput) +} + +type PodDisruptionBudgetOutput struct { + *pulumi.OutputState +} + +func (PodDisruptionBudgetOutput) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudget)(nil)) +} + +func (o PodDisruptionBudgetOutput) ToPodDisruptionBudgetOutput() PodDisruptionBudgetOutput { + return o +} + +func (o PodDisruptionBudgetOutput) ToPodDisruptionBudgetOutputWithContext(ctx context.Context) PodDisruptionBudgetOutput { + return o +} + +func (o PodDisruptionBudgetOutput) ToPodDisruptionBudgetPtrOutput() PodDisruptionBudgetPtrOutput { + return o.ToPodDisruptionBudgetPtrOutputWithContext(context.Background()) +} + +func (o PodDisruptionBudgetOutput) ToPodDisruptionBudgetPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetPtrOutput { + return o.ApplyT(func(v PodDisruptionBudget) *PodDisruptionBudget { + return &v + }).(PodDisruptionBudgetPtrOutput) +} + +type PodDisruptionBudgetPtrOutput struct { + *pulumi.OutputState +} + +func (PodDisruptionBudgetPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**PodDisruptionBudget)(nil)) +} + +func (o PodDisruptionBudgetPtrOutput) ToPodDisruptionBudgetPtrOutput() PodDisruptionBudgetPtrOutput { + return o +} + +func (o PodDisruptionBudgetPtrOutput) ToPodDisruptionBudgetPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetPtrOutput { + return o +} + +type PodDisruptionBudgetArrayOutput struct{ *pulumi.OutputState } + +func (PodDisruptionBudgetArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]PodDisruptionBudget)(nil)) +} + +func (o PodDisruptionBudgetArrayOutput) ToPodDisruptionBudgetArrayOutput() PodDisruptionBudgetArrayOutput { + return o +} + +func (o PodDisruptionBudgetArrayOutput) ToPodDisruptionBudgetArrayOutputWithContext(ctx context.Context) PodDisruptionBudgetArrayOutput { + return o +} + +func (o PodDisruptionBudgetArrayOutput) Index(i pulumi.IntInput) PodDisruptionBudgetOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) PodDisruptionBudget { + return vs[0].([]PodDisruptionBudget)[vs[1].(int)] + }).(PodDisruptionBudgetOutput) +} + +type PodDisruptionBudgetMapOutput struct{ *pulumi.OutputState } + +func (PodDisruptionBudgetMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]PodDisruptionBudget)(nil)) +} + +func (o PodDisruptionBudgetMapOutput) ToPodDisruptionBudgetMapOutput() PodDisruptionBudgetMapOutput { + return o +} + +func (o PodDisruptionBudgetMapOutput) ToPodDisruptionBudgetMapOutputWithContext(ctx context.Context) PodDisruptionBudgetMapOutput { + return o +} + +func (o PodDisruptionBudgetMapOutput) MapIndex(k pulumi.StringInput) PodDisruptionBudgetOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) PodDisruptionBudget { + return vs[0].(map[string]PodDisruptionBudget)[vs[1].(string)] + }).(PodDisruptionBudgetOutput) +} + +func init() { + pulumi.RegisterOutputType(PodDisruptionBudgetOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetPtrOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetArrayOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetMapOutput{}) +} diff --git a/sdk/go/kubernetes/policy/v1/podDisruptionBudgetList.go b/sdk/go/kubernetes/policy/v1/podDisruptionBudgetList.go new file mode 100644 index 0000000000..be7e08b170 --- /dev/null +++ b/sdk/go/kubernetes/policy/v1/podDisruptionBudgetList.go @@ -0,0 +1,300 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1 + +import ( + "context" + "reflect" + + "github.com/pkg/errors" + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +type PodDisruptionBudgetList struct { + pulumi.CustomResourceState + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` + // Items is a list of PodDisruptionBudgets + Items PodDisruptionBudgetTypeArrayOutput `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrOutput `pulumi:"metadata"` +} + +// NewPodDisruptionBudgetList registers a new resource with the given unique name, arguments, and options. +func NewPodDisruptionBudgetList(ctx *pulumi.Context, + name string, args *PodDisruptionBudgetListArgs, opts ...pulumi.ResourceOption) (*PodDisruptionBudgetList, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Items == nil { + return nil, errors.New("invalid value for required argument 'Items'") + } + args.ApiVersion = pulumi.StringPtr("policy/v1") + args.Kind = pulumi.StringPtr("PodDisruptionBudgetList") + var resource PodDisruptionBudgetList + err := ctx.RegisterResource("kubernetes:policy/v1:PodDisruptionBudgetList", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetPodDisruptionBudgetList gets an existing PodDisruptionBudgetList resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetPodDisruptionBudgetList(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *PodDisruptionBudgetListState, opts ...pulumi.ResourceOption) (*PodDisruptionBudgetList, error) { + var resource PodDisruptionBudgetList + err := ctx.ReadResource("kubernetes:policy/v1:PodDisruptionBudgetList", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering PodDisruptionBudgetList resources. +type podDisruptionBudgetListState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Items is a list of PodDisruptionBudgets + Items []PodDisruptionBudgetType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +type PodDisruptionBudgetListState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Items is a list of PodDisruptionBudgets + Items PodDisruptionBudgetTypeArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput +} + +func (PodDisruptionBudgetListState) ElementType() reflect.Type { + return reflect.TypeOf((*podDisruptionBudgetListState)(nil)).Elem() +} + +type podDisruptionBudgetListArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Items is a list of PodDisruptionBudgets + Items []PodDisruptionBudgetType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +// The set of arguments for constructing a PodDisruptionBudgetList resource. +type PodDisruptionBudgetListArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Items is a list of PodDisruptionBudgets + Items PodDisruptionBudgetTypeArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput +} + +func (PodDisruptionBudgetListArgs) ElementType() reflect.Type { + return reflect.TypeOf((*podDisruptionBudgetListArgs)(nil)).Elem() +} + +type PodDisruptionBudgetListInput interface { + pulumi.Input + + ToPodDisruptionBudgetListOutput() PodDisruptionBudgetListOutput + ToPodDisruptionBudgetListOutputWithContext(ctx context.Context) PodDisruptionBudgetListOutput +} + +func (*PodDisruptionBudgetList) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudgetList)(nil)) +} + +func (i *PodDisruptionBudgetList) ToPodDisruptionBudgetListOutput() PodDisruptionBudgetListOutput { + return i.ToPodDisruptionBudgetListOutputWithContext(context.Background()) +} + +func (i *PodDisruptionBudgetList) ToPodDisruptionBudgetListOutputWithContext(ctx context.Context) PodDisruptionBudgetListOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetListOutput) +} + +func (i *PodDisruptionBudgetList) ToPodDisruptionBudgetListPtrOutput() PodDisruptionBudgetListPtrOutput { + return i.ToPodDisruptionBudgetListPtrOutputWithContext(context.Background()) +} + +func (i *PodDisruptionBudgetList) ToPodDisruptionBudgetListPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetListPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetListPtrOutput) +} + +type PodDisruptionBudgetListPtrInput interface { + pulumi.Input + + ToPodDisruptionBudgetListPtrOutput() PodDisruptionBudgetListPtrOutput + ToPodDisruptionBudgetListPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetListPtrOutput +} + +type podDisruptionBudgetListPtrType PodDisruptionBudgetListArgs + +func (*podDisruptionBudgetListPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**PodDisruptionBudgetList)(nil)) +} + +func (i *podDisruptionBudgetListPtrType) ToPodDisruptionBudgetListPtrOutput() PodDisruptionBudgetListPtrOutput { + return i.ToPodDisruptionBudgetListPtrOutputWithContext(context.Background()) +} + +func (i *podDisruptionBudgetListPtrType) ToPodDisruptionBudgetListPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetListPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetListPtrOutput) +} + +// PodDisruptionBudgetListArrayInput is an input type that accepts PodDisruptionBudgetListArray and PodDisruptionBudgetListArrayOutput values. +// You can construct a concrete instance of `PodDisruptionBudgetListArrayInput` via: +// +// PodDisruptionBudgetListArray{ PodDisruptionBudgetListArgs{...} } +type PodDisruptionBudgetListArrayInput interface { + pulumi.Input + + ToPodDisruptionBudgetListArrayOutput() PodDisruptionBudgetListArrayOutput + ToPodDisruptionBudgetListArrayOutputWithContext(context.Context) PodDisruptionBudgetListArrayOutput +} + +type PodDisruptionBudgetListArray []PodDisruptionBudgetListInput + +func (PodDisruptionBudgetListArray) ElementType() reflect.Type { + return reflect.TypeOf(([]*PodDisruptionBudgetList)(nil)) +} + +func (i PodDisruptionBudgetListArray) ToPodDisruptionBudgetListArrayOutput() PodDisruptionBudgetListArrayOutput { + return i.ToPodDisruptionBudgetListArrayOutputWithContext(context.Background()) +} + +func (i PodDisruptionBudgetListArray) ToPodDisruptionBudgetListArrayOutputWithContext(ctx context.Context) PodDisruptionBudgetListArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetListArrayOutput) +} + +// PodDisruptionBudgetListMapInput is an input type that accepts PodDisruptionBudgetListMap and PodDisruptionBudgetListMapOutput values. +// You can construct a concrete instance of `PodDisruptionBudgetListMapInput` via: +// +// PodDisruptionBudgetListMap{ "key": PodDisruptionBudgetListArgs{...} } +type PodDisruptionBudgetListMapInput interface { + pulumi.Input + + ToPodDisruptionBudgetListMapOutput() PodDisruptionBudgetListMapOutput + ToPodDisruptionBudgetListMapOutputWithContext(context.Context) PodDisruptionBudgetListMapOutput +} + +type PodDisruptionBudgetListMap map[string]PodDisruptionBudgetListInput + +func (PodDisruptionBudgetListMap) ElementType() reflect.Type { + return reflect.TypeOf((map[string]*PodDisruptionBudgetList)(nil)) +} + +func (i PodDisruptionBudgetListMap) ToPodDisruptionBudgetListMapOutput() PodDisruptionBudgetListMapOutput { + return i.ToPodDisruptionBudgetListMapOutputWithContext(context.Background()) +} + +func (i PodDisruptionBudgetListMap) ToPodDisruptionBudgetListMapOutputWithContext(ctx context.Context) PodDisruptionBudgetListMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetListMapOutput) +} + +type PodDisruptionBudgetListOutput struct { + *pulumi.OutputState +} + +func (PodDisruptionBudgetListOutput) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudgetList)(nil)) +} + +func (o PodDisruptionBudgetListOutput) ToPodDisruptionBudgetListOutput() PodDisruptionBudgetListOutput { + return o +} + +func (o PodDisruptionBudgetListOutput) ToPodDisruptionBudgetListOutputWithContext(ctx context.Context) PodDisruptionBudgetListOutput { + return o +} + +func (o PodDisruptionBudgetListOutput) ToPodDisruptionBudgetListPtrOutput() PodDisruptionBudgetListPtrOutput { + return o.ToPodDisruptionBudgetListPtrOutputWithContext(context.Background()) +} + +func (o PodDisruptionBudgetListOutput) ToPodDisruptionBudgetListPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetListPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetList) *PodDisruptionBudgetList { + return &v + }).(PodDisruptionBudgetListPtrOutput) +} + +type PodDisruptionBudgetListPtrOutput struct { + *pulumi.OutputState +} + +func (PodDisruptionBudgetListPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**PodDisruptionBudgetList)(nil)) +} + +func (o PodDisruptionBudgetListPtrOutput) ToPodDisruptionBudgetListPtrOutput() PodDisruptionBudgetListPtrOutput { + return o +} + +func (o PodDisruptionBudgetListPtrOutput) ToPodDisruptionBudgetListPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetListPtrOutput { + return o +} + +type PodDisruptionBudgetListArrayOutput struct{ *pulumi.OutputState } + +func (PodDisruptionBudgetListArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]PodDisruptionBudgetList)(nil)) +} + +func (o PodDisruptionBudgetListArrayOutput) ToPodDisruptionBudgetListArrayOutput() PodDisruptionBudgetListArrayOutput { + return o +} + +func (o PodDisruptionBudgetListArrayOutput) ToPodDisruptionBudgetListArrayOutputWithContext(ctx context.Context) PodDisruptionBudgetListArrayOutput { + return o +} + +func (o PodDisruptionBudgetListArrayOutput) Index(i pulumi.IntInput) PodDisruptionBudgetListOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) PodDisruptionBudgetList { + return vs[0].([]PodDisruptionBudgetList)[vs[1].(int)] + }).(PodDisruptionBudgetListOutput) +} + +type PodDisruptionBudgetListMapOutput struct{ *pulumi.OutputState } + +func (PodDisruptionBudgetListMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]PodDisruptionBudgetList)(nil)) +} + +func (o PodDisruptionBudgetListMapOutput) ToPodDisruptionBudgetListMapOutput() PodDisruptionBudgetListMapOutput { + return o +} + +func (o PodDisruptionBudgetListMapOutput) ToPodDisruptionBudgetListMapOutputWithContext(ctx context.Context) PodDisruptionBudgetListMapOutput { + return o +} + +func (o PodDisruptionBudgetListMapOutput) MapIndex(k pulumi.StringInput) PodDisruptionBudgetListOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) PodDisruptionBudgetList { + return vs[0].(map[string]PodDisruptionBudgetList)[vs[1].(string)] + }).(PodDisruptionBudgetListOutput) +} + +func init() { + pulumi.RegisterOutputType(PodDisruptionBudgetListOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetListPtrOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetListArrayOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetListMapOutput{}) +} diff --git a/sdk/go/kubernetes/policy/v1/pulumiTypes.go b/sdk/go/kubernetes/policy/v1/pulumiTypes.go new file mode 100644 index 0000000000..91129e9a2c --- /dev/null +++ b/sdk/go/kubernetes/policy/v1/pulumiTypes.go @@ -0,0 +1,692 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1 + +import ( + "context" + "reflect" + + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods +type PodDisruptionBudgetType struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // Specification of the desired behavior of the PodDisruptionBudget. + Spec *PodDisruptionBudgetSpec `pulumi:"spec"` + // Most recently observed status of the PodDisruptionBudget. + Status *PodDisruptionBudgetStatus `pulumi:"status"` +} + +// PodDisruptionBudgetTypeInput is an input type that accepts PodDisruptionBudgetTypeArgs and PodDisruptionBudgetTypeOutput values. +// You can construct a concrete instance of `PodDisruptionBudgetTypeInput` via: +// +// PodDisruptionBudgetTypeArgs{...} +type PodDisruptionBudgetTypeInput interface { + pulumi.Input + + ToPodDisruptionBudgetTypeOutput() PodDisruptionBudgetTypeOutput + ToPodDisruptionBudgetTypeOutputWithContext(context.Context) PodDisruptionBudgetTypeOutput +} + +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods +type PodDisruptionBudgetTypeArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"` + // Specification of the desired behavior of the PodDisruptionBudget. + Spec PodDisruptionBudgetSpecPtrInput `pulumi:"spec"` + // Most recently observed status of the PodDisruptionBudget. + Status PodDisruptionBudgetStatusPtrInput `pulumi:"status"` +} + +func (PodDisruptionBudgetTypeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudgetType)(nil)).Elem() +} + +func (i PodDisruptionBudgetTypeArgs) ToPodDisruptionBudgetTypeOutput() PodDisruptionBudgetTypeOutput { + return i.ToPodDisruptionBudgetTypeOutputWithContext(context.Background()) +} + +func (i PodDisruptionBudgetTypeArgs) ToPodDisruptionBudgetTypeOutputWithContext(ctx context.Context) PodDisruptionBudgetTypeOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetTypeOutput) +} + +// PodDisruptionBudgetTypeArrayInput is an input type that accepts PodDisruptionBudgetTypeArray and PodDisruptionBudgetTypeArrayOutput values. +// You can construct a concrete instance of `PodDisruptionBudgetTypeArrayInput` via: +// +// PodDisruptionBudgetTypeArray{ PodDisruptionBudgetTypeArgs{...} } +type PodDisruptionBudgetTypeArrayInput interface { + pulumi.Input + + ToPodDisruptionBudgetTypeArrayOutput() PodDisruptionBudgetTypeArrayOutput + ToPodDisruptionBudgetTypeArrayOutputWithContext(context.Context) PodDisruptionBudgetTypeArrayOutput +} + +type PodDisruptionBudgetTypeArray []PodDisruptionBudgetTypeInput + +func (PodDisruptionBudgetTypeArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]PodDisruptionBudgetType)(nil)).Elem() +} + +func (i PodDisruptionBudgetTypeArray) ToPodDisruptionBudgetTypeArrayOutput() PodDisruptionBudgetTypeArrayOutput { + return i.ToPodDisruptionBudgetTypeArrayOutputWithContext(context.Background()) +} + +func (i PodDisruptionBudgetTypeArray) ToPodDisruptionBudgetTypeArrayOutputWithContext(ctx context.Context) PodDisruptionBudgetTypeArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetTypeArrayOutput) +} + +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods +type PodDisruptionBudgetTypeOutput struct{ *pulumi.OutputState } + +func (PodDisruptionBudgetTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudgetType)(nil)).Elem() +} + +func (o PodDisruptionBudgetTypeOutput) ToPodDisruptionBudgetTypeOutput() PodDisruptionBudgetTypeOutput { + return o +} + +func (o PodDisruptionBudgetTypeOutput) ToPodDisruptionBudgetTypeOutputWithContext(ctx context.Context) PodDisruptionBudgetTypeOutput { + return o +} + +// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +func (o PodDisruptionBudgetTypeOutput) ApiVersion() pulumi.StringPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) +} + +// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +func (o PodDisruptionBudgetTypeOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetType) *string { return v.Kind }).(pulumi.StringPtrOutput) +} + +// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o PodDisruptionBudgetTypeOutput) Metadata() metav1.ObjectMetaPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetType) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput) +} + +// Specification of the desired behavior of the PodDisruptionBudget. +func (o PodDisruptionBudgetTypeOutput) Spec() PodDisruptionBudgetSpecPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetType) *PodDisruptionBudgetSpec { return v.Spec }).(PodDisruptionBudgetSpecPtrOutput) +} + +// Most recently observed status of the PodDisruptionBudget. +func (o PodDisruptionBudgetTypeOutput) Status() PodDisruptionBudgetStatusPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetType) *PodDisruptionBudgetStatus { return v.Status }).(PodDisruptionBudgetStatusPtrOutput) +} + +type PodDisruptionBudgetTypeArrayOutput struct{ *pulumi.OutputState } + +func (PodDisruptionBudgetTypeArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]PodDisruptionBudgetType)(nil)).Elem() +} + +func (o PodDisruptionBudgetTypeArrayOutput) ToPodDisruptionBudgetTypeArrayOutput() PodDisruptionBudgetTypeArrayOutput { + return o +} + +func (o PodDisruptionBudgetTypeArrayOutput) ToPodDisruptionBudgetTypeArrayOutputWithContext(ctx context.Context) PodDisruptionBudgetTypeArrayOutput { + return o +} + +func (o PodDisruptionBudgetTypeArrayOutput) Index(i pulumi.IntInput) PodDisruptionBudgetTypeOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) PodDisruptionBudgetType { + return vs[0].([]PodDisruptionBudgetType)[vs[1].(int)] + }).(PodDisruptionBudgetTypeOutput) +} + +// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +type PodDisruptionBudgetListType struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Items is a list of PodDisruptionBudgets + Items []PodDisruptionBudgetType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +// PodDisruptionBudgetListTypeInput is an input type that accepts PodDisruptionBudgetListTypeArgs and PodDisruptionBudgetListTypeOutput values. +// You can construct a concrete instance of `PodDisruptionBudgetListTypeInput` via: +// +// PodDisruptionBudgetListTypeArgs{...} +type PodDisruptionBudgetListTypeInput interface { + pulumi.Input + + ToPodDisruptionBudgetListTypeOutput() PodDisruptionBudgetListTypeOutput + ToPodDisruptionBudgetListTypeOutputWithContext(context.Context) PodDisruptionBudgetListTypeOutput +} + +// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +type PodDisruptionBudgetListTypeArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` + // Items is a list of PodDisruptionBudgets + Items PodDisruptionBudgetTypeArrayInput `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput `pulumi:"kind"` + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput `pulumi:"metadata"` +} + +func (PodDisruptionBudgetListTypeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudgetListType)(nil)).Elem() +} + +func (i PodDisruptionBudgetListTypeArgs) ToPodDisruptionBudgetListTypeOutput() PodDisruptionBudgetListTypeOutput { + return i.ToPodDisruptionBudgetListTypeOutputWithContext(context.Background()) +} + +func (i PodDisruptionBudgetListTypeArgs) ToPodDisruptionBudgetListTypeOutputWithContext(ctx context.Context) PodDisruptionBudgetListTypeOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetListTypeOutput) +} + +// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +type PodDisruptionBudgetListTypeOutput struct{ *pulumi.OutputState } + +func (PodDisruptionBudgetListTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudgetListType)(nil)).Elem() +} + +func (o PodDisruptionBudgetListTypeOutput) ToPodDisruptionBudgetListTypeOutput() PodDisruptionBudgetListTypeOutput { + return o +} + +func (o PodDisruptionBudgetListTypeOutput) ToPodDisruptionBudgetListTypeOutputWithContext(ctx context.Context) PodDisruptionBudgetListTypeOutput { + return o +} + +// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +func (o PodDisruptionBudgetListTypeOutput) ApiVersion() pulumi.StringPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetListType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) +} + +// Items is a list of PodDisruptionBudgets +func (o PodDisruptionBudgetListTypeOutput) Items() PodDisruptionBudgetTypeArrayOutput { + return o.ApplyT(func(v PodDisruptionBudgetListType) []PodDisruptionBudgetType { return v.Items }).(PodDisruptionBudgetTypeArrayOutput) +} + +// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +func (o PodDisruptionBudgetListTypeOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetListType) *string { return v.Kind }).(pulumi.StringPtrOutput) +} + +// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o PodDisruptionBudgetListTypeOutput) Metadata() metav1.ListMetaPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetListType) *metav1.ListMeta { return v.Metadata }).(metav1.ListMetaPtrOutput) +} + +// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. +type PodDisruptionBudgetSpec struct { + // An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + MaxUnavailable interface{} `pulumi:"maxUnavailable"` + // An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + MinAvailable interface{} `pulumi:"minAvailable"` + // Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. + Selector *metav1.LabelSelector `pulumi:"selector"` +} + +// PodDisruptionBudgetSpecInput is an input type that accepts PodDisruptionBudgetSpecArgs and PodDisruptionBudgetSpecOutput values. +// You can construct a concrete instance of `PodDisruptionBudgetSpecInput` via: +// +// PodDisruptionBudgetSpecArgs{...} +type PodDisruptionBudgetSpecInput interface { + pulumi.Input + + ToPodDisruptionBudgetSpecOutput() PodDisruptionBudgetSpecOutput + ToPodDisruptionBudgetSpecOutputWithContext(context.Context) PodDisruptionBudgetSpecOutput +} + +// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. +type PodDisruptionBudgetSpecArgs struct { + // An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + MaxUnavailable pulumi.Input `pulumi:"maxUnavailable"` + // An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + MinAvailable pulumi.Input `pulumi:"minAvailable"` + // Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. + Selector metav1.LabelSelectorPtrInput `pulumi:"selector"` +} + +func (PodDisruptionBudgetSpecArgs) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudgetSpec)(nil)).Elem() +} + +func (i PodDisruptionBudgetSpecArgs) ToPodDisruptionBudgetSpecOutput() PodDisruptionBudgetSpecOutput { + return i.ToPodDisruptionBudgetSpecOutputWithContext(context.Background()) +} + +func (i PodDisruptionBudgetSpecArgs) ToPodDisruptionBudgetSpecOutputWithContext(ctx context.Context) PodDisruptionBudgetSpecOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetSpecOutput) +} + +func (i PodDisruptionBudgetSpecArgs) ToPodDisruptionBudgetSpecPtrOutput() PodDisruptionBudgetSpecPtrOutput { + return i.ToPodDisruptionBudgetSpecPtrOutputWithContext(context.Background()) +} + +func (i PodDisruptionBudgetSpecArgs) ToPodDisruptionBudgetSpecPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetSpecPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetSpecOutput).ToPodDisruptionBudgetSpecPtrOutputWithContext(ctx) +} + +// PodDisruptionBudgetSpecPtrInput is an input type that accepts PodDisruptionBudgetSpecArgs, PodDisruptionBudgetSpecPtr and PodDisruptionBudgetSpecPtrOutput values. +// You can construct a concrete instance of `PodDisruptionBudgetSpecPtrInput` via: +// +// PodDisruptionBudgetSpecArgs{...} +// +// or: +// +// nil +type PodDisruptionBudgetSpecPtrInput interface { + pulumi.Input + + ToPodDisruptionBudgetSpecPtrOutput() PodDisruptionBudgetSpecPtrOutput + ToPodDisruptionBudgetSpecPtrOutputWithContext(context.Context) PodDisruptionBudgetSpecPtrOutput +} + +type podDisruptionBudgetSpecPtrType PodDisruptionBudgetSpecArgs + +func PodDisruptionBudgetSpecPtr(v *PodDisruptionBudgetSpecArgs) PodDisruptionBudgetSpecPtrInput { + return (*podDisruptionBudgetSpecPtrType)(v) +} + +func (*podDisruptionBudgetSpecPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**PodDisruptionBudgetSpec)(nil)).Elem() +} + +func (i *podDisruptionBudgetSpecPtrType) ToPodDisruptionBudgetSpecPtrOutput() PodDisruptionBudgetSpecPtrOutput { + return i.ToPodDisruptionBudgetSpecPtrOutputWithContext(context.Background()) +} + +func (i *podDisruptionBudgetSpecPtrType) ToPodDisruptionBudgetSpecPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetSpecPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetSpecPtrOutput) +} + +// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. +type PodDisruptionBudgetSpecOutput struct{ *pulumi.OutputState } + +func (PodDisruptionBudgetSpecOutput) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudgetSpec)(nil)).Elem() +} + +func (o PodDisruptionBudgetSpecOutput) ToPodDisruptionBudgetSpecOutput() PodDisruptionBudgetSpecOutput { + return o +} + +func (o PodDisruptionBudgetSpecOutput) ToPodDisruptionBudgetSpecOutputWithContext(ctx context.Context) PodDisruptionBudgetSpecOutput { + return o +} + +func (o PodDisruptionBudgetSpecOutput) ToPodDisruptionBudgetSpecPtrOutput() PodDisruptionBudgetSpecPtrOutput { + return o.ToPodDisruptionBudgetSpecPtrOutputWithContext(context.Background()) +} + +func (o PodDisruptionBudgetSpecOutput) ToPodDisruptionBudgetSpecPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetSpecPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetSpec) *PodDisruptionBudgetSpec { + return &v + }).(PodDisruptionBudgetSpecPtrOutput) +} + +// An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". +func (o PodDisruptionBudgetSpecOutput) MaxUnavailable() pulumi.AnyOutput { + return o.ApplyT(func(v PodDisruptionBudgetSpec) interface{} { return v.MaxUnavailable }).(pulumi.AnyOutput) +} + +// An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". +func (o PodDisruptionBudgetSpecOutput) MinAvailable() pulumi.AnyOutput { + return o.ApplyT(func(v PodDisruptionBudgetSpec) interface{} { return v.MinAvailable }).(pulumi.AnyOutput) +} + +// Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. +func (o PodDisruptionBudgetSpecOutput) Selector() metav1.LabelSelectorPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetSpec) *metav1.LabelSelector { return v.Selector }).(metav1.LabelSelectorPtrOutput) +} + +type PodDisruptionBudgetSpecPtrOutput struct{ *pulumi.OutputState } + +func (PodDisruptionBudgetSpecPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**PodDisruptionBudgetSpec)(nil)).Elem() +} + +func (o PodDisruptionBudgetSpecPtrOutput) ToPodDisruptionBudgetSpecPtrOutput() PodDisruptionBudgetSpecPtrOutput { + return o +} + +func (o PodDisruptionBudgetSpecPtrOutput) ToPodDisruptionBudgetSpecPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetSpecPtrOutput { + return o +} + +func (o PodDisruptionBudgetSpecPtrOutput) Elem() PodDisruptionBudgetSpecOutput { + return o.ApplyT(func(v *PodDisruptionBudgetSpec) PodDisruptionBudgetSpec { return *v }).(PodDisruptionBudgetSpecOutput) +} + +// An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". +func (o PodDisruptionBudgetSpecPtrOutput) MaxUnavailable() pulumi.AnyOutput { + return o.ApplyT(func(v *PodDisruptionBudgetSpec) interface{} { + if v == nil { + return nil + } + return v.MaxUnavailable + }).(pulumi.AnyOutput) +} + +// An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". +func (o PodDisruptionBudgetSpecPtrOutput) MinAvailable() pulumi.AnyOutput { + return o.ApplyT(func(v *PodDisruptionBudgetSpec) interface{} { + if v == nil { + return nil + } + return v.MinAvailable + }).(pulumi.AnyOutput) +} + +// Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. +func (o PodDisruptionBudgetSpecPtrOutput) Selector() metav1.LabelSelectorPtrOutput { + return o.ApplyT(func(v *PodDisruptionBudgetSpec) *metav1.LabelSelector { + if v == nil { + return nil + } + return v.Selector + }).(metav1.LabelSelectorPtrOutput) +} + +// PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. +type PodDisruptionBudgetStatus struct { + // Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + // the number of allowed disruptions. Therefore no disruptions are + // allowed and the status of the condition will be False. + // - InsufficientPods: The number of pods are either at or below the number + // required by the PodDisruptionBudget. No disruptions are + // allowed and the status of the condition will be False. + // - SufficientPods: There are more pods than required by the PodDisruptionBudget. + // The condition will be True, and the number of allowed + // disruptions are provided by the disruptionsAllowed property. + Conditions []metav1.Condition `pulumi:"conditions"` + // current number of healthy pods + CurrentHealthy int `pulumi:"currentHealthy"` + // minimum desired number of healthy pods + DesiredHealthy int `pulumi:"desiredHealthy"` + // DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. + DisruptedPods map[string]string `pulumi:"disruptedPods"` + // Number of pod disruptions that are currently allowed. + DisruptionsAllowed int `pulumi:"disruptionsAllowed"` + // total number of pods counted by this disruption budget + ExpectedPods int `pulumi:"expectedPods"` + // Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. + ObservedGeneration *int `pulumi:"observedGeneration"` +} + +// PodDisruptionBudgetStatusInput is an input type that accepts PodDisruptionBudgetStatusArgs and PodDisruptionBudgetStatusOutput values. +// You can construct a concrete instance of `PodDisruptionBudgetStatusInput` via: +// +// PodDisruptionBudgetStatusArgs{...} +type PodDisruptionBudgetStatusInput interface { + pulumi.Input + + ToPodDisruptionBudgetStatusOutput() PodDisruptionBudgetStatusOutput + ToPodDisruptionBudgetStatusOutputWithContext(context.Context) PodDisruptionBudgetStatusOutput +} + +// PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. +type PodDisruptionBudgetStatusArgs struct { + // Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + // the number of allowed disruptions. Therefore no disruptions are + // allowed and the status of the condition will be False. + // - InsufficientPods: The number of pods are either at or below the number + // required by the PodDisruptionBudget. No disruptions are + // allowed and the status of the condition will be False. + // - SufficientPods: There are more pods than required by the PodDisruptionBudget. + // The condition will be True, and the number of allowed + // disruptions are provided by the disruptionsAllowed property. + Conditions metav1.ConditionArrayInput `pulumi:"conditions"` + // current number of healthy pods + CurrentHealthy pulumi.IntInput `pulumi:"currentHealthy"` + // minimum desired number of healthy pods + DesiredHealthy pulumi.IntInput `pulumi:"desiredHealthy"` + // DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. + DisruptedPods pulumi.StringMapInput `pulumi:"disruptedPods"` + // Number of pod disruptions that are currently allowed. + DisruptionsAllowed pulumi.IntInput `pulumi:"disruptionsAllowed"` + // total number of pods counted by this disruption budget + ExpectedPods pulumi.IntInput `pulumi:"expectedPods"` + // Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. + ObservedGeneration pulumi.IntPtrInput `pulumi:"observedGeneration"` +} + +func (PodDisruptionBudgetStatusArgs) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudgetStatus)(nil)).Elem() +} + +func (i PodDisruptionBudgetStatusArgs) ToPodDisruptionBudgetStatusOutput() PodDisruptionBudgetStatusOutput { + return i.ToPodDisruptionBudgetStatusOutputWithContext(context.Background()) +} + +func (i PodDisruptionBudgetStatusArgs) ToPodDisruptionBudgetStatusOutputWithContext(ctx context.Context) PodDisruptionBudgetStatusOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetStatusOutput) +} + +func (i PodDisruptionBudgetStatusArgs) ToPodDisruptionBudgetStatusPtrOutput() PodDisruptionBudgetStatusPtrOutput { + return i.ToPodDisruptionBudgetStatusPtrOutputWithContext(context.Background()) +} + +func (i PodDisruptionBudgetStatusArgs) ToPodDisruptionBudgetStatusPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetStatusPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetStatusOutput).ToPodDisruptionBudgetStatusPtrOutputWithContext(ctx) +} + +// PodDisruptionBudgetStatusPtrInput is an input type that accepts PodDisruptionBudgetStatusArgs, PodDisruptionBudgetStatusPtr and PodDisruptionBudgetStatusPtrOutput values. +// You can construct a concrete instance of `PodDisruptionBudgetStatusPtrInput` via: +// +// PodDisruptionBudgetStatusArgs{...} +// +// or: +// +// nil +type PodDisruptionBudgetStatusPtrInput interface { + pulumi.Input + + ToPodDisruptionBudgetStatusPtrOutput() PodDisruptionBudgetStatusPtrOutput + ToPodDisruptionBudgetStatusPtrOutputWithContext(context.Context) PodDisruptionBudgetStatusPtrOutput +} + +type podDisruptionBudgetStatusPtrType PodDisruptionBudgetStatusArgs + +func PodDisruptionBudgetStatusPtr(v *PodDisruptionBudgetStatusArgs) PodDisruptionBudgetStatusPtrInput { + return (*podDisruptionBudgetStatusPtrType)(v) +} + +func (*podDisruptionBudgetStatusPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**PodDisruptionBudgetStatus)(nil)).Elem() +} + +func (i *podDisruptionBudgetStatusPtrType) ToPodDisruptionBudgetStatusPtrOutput() PodDisruptionBudgetStatusPtrOutput { + return i.ToPodDisruptionBudgetStatusPtrOutputWithContext(context.Background()) +} + +func (i *podDisruptionBudgetStatusPtrType) ToPodDisruptionBudgetStatusPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetStatusPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(PodDisruptionBudgetStatusPtrOutput) +} + +// PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. +type PodDisruptionBudgetStatusOutput struct{ *pulumi.OutputState } + +func (PodDisruptionBudgetStatusOutput) ElementType() reflect.Type { + return reflect.TypeOf((*PodDisruptionBudgetStatus)(nil)).Elem() +} + +func (o PodDisruptionBudgetStatusOutput) ToPodDisruptionBudgetStatusOutput() PodDisruptionBudgetStatusOutput { + return o +} + +func (o PodDisruptionBudgetStatusOutput) ToPodDisruptionBudgetStatusOutputWithContext(ctx context.Context) PodDisruptionBudgetStatusOutput { + return o +} + +func (o PodDisruptionBudgetStatusOutput) ToPodDisruptionBudgetStatusPtrOutput() PodDisruptionBudgetStatusPtrOutput { + return o.ToPodDisruptionBudgetStatusPtrOutputWithContext(context.Background()) +} + +func (o PodDisruptionBudgetStatusOutput) ToPodDisruptionBudgetStatusPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetStatusPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetStatus) *PodDisruptionBudgetStatus { + return &v + }).(PodDisruptionBudgetStatusPtrOutput) +} + +// Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute +// the number of allowed disruptions. Therefore no disruptions are +// allowed and the status of the condition will be False. +// - InsufficientPods: The number of pods are either at or below the number +// required by the PodDisruptionBudget. No disruptions are +// allowed and the status of the condition will be False. +// - SufficientPods: There are more pods than required by the PodDisruptionBudget. +// The condition will be True, and the number of allowed +// disruptions are provided by the disruptionsAllowed property. +func (o PodDisruptionBudgetStatusOutput) Conditions() metav1.ConditionArrayOutput { + return o.ApplyT(func(v PodDisruptionBudgetStatus) []metav1.Condition { return v.Conditions }).(metav1.ConditionArrayOutput) +} + +// current number of healthy pods +func (o PodDisruptionBudgetStatusOutput) CurrentHealthy() pulumi.IntOutput { + return o.ApplyT(func(v PodDisruptionBudgetStatus) int { return v.CurrentHealthy }).(pulumi.IntOutput) +} + +// minimum desired number of healthy pods +func (o PodDisruptionBudgetStatusOutput) DesiredHealthy() pulumi.IntOutput { + return o.ApplyT(func(v PodDisruptionBudgetStatus) int { return v.DesiredHealthy }).(pulumi.IntOutput) +} + +// DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. +func (o PodDisruptionBudgetStatusOutput) DisruptedPods() pulumi.StringMapOutput { + return o.ApplyT(func(v PodDisruptionBudgetStatus) map[string]string { return v.DisruptedPods }).(pulumi.StringMapOutput) +} + +// Number of pod disruptions that are currently allowed. +func (o PodDisruptionBudgetStatusOutput) DisruptionsAllowed() pulumi.IntOutput { + return o.ApplyT(func(v PodDisruptionBudgetStatus) int { return v.DisruptionsAllowed }).(pulumi.IntOutput) +} + +// total number of pods counted by this disruption budget +func (o PodDisruptionBudgetStatusOutput) ExpectedPods() pulumi.IntOutput { + return o.ApplyT(func(v PodDisruptionBudgetStatus) int { return v.ExpectedPods }).(pulumi.IntOutput) +} + +// Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. +func (o PodDisruptionBudgetStatusOutput) ObservedGeneration() pulumi.IntPtrOutput { + return o.ApplyT(func(v PodDisruptionBudgetStatus) *int { return v.ObservedGeneration }).(pulumi.IntPtrOutput) +} + +type PodDisruptionBudgetStatusPtrOutput struct{ *pulumi.OutputState } + +func (PodDisruptionBudgetStatusPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**PodDisruptionBudgetStatus)(nil)).Elem() +} + +func (o PodDisruptionBudgetStatusPtrOutput) ToPodDisruptionBudgetStatusPtrOutput() PodDisruptionBudgetStatusPtrOutput { + return o +} + +func (o PodDisruptionBudgetStatusPtrOutput) ToPodDisruptionBudgetStatusPtrOutputWithContext(ctx context.Context) PodDisruptionBudgetStatusPtrOutput { + return o +} + +func (o PodDisruptionBudgetStatusPtrOutput) Elem() PodDisruptionBudgetStatusOutput { + return o.ApplyT(func(v *PodDisruptionBudgetStatus) PodDisruptionBudgetStatus { return *v }).(PodDisruptionBudgetStatusOutput) +} + +// Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute +// the number of allowed disruptions. Therefore no disruptions are +// allowed and the status of the condition will be False. +// - InsufficientPods: The number of pods are either at or below the number +// required by the PodDisruptionBudget. No disruptions are +// allowed and the status of the condition will be False. +// - SufficientPods: There are more pods than required by the PodDisruptionBudget. +// The condition will be True, and the number of allowed +// disruptions are provided by the disruptionsAllowed property. +func (o PodDisruptionBudgetStatusPtrOutput) Conditions() metav1.ConditionArrayOutput { + return o.ApplyT(func(v *PodDisruptionBudgetStatus) []metav1.Condition { + if v == nil { + return nil + } + return v.Conditions + }).(metav1.ConditionArrayOutput) +} + +// current number of healthy pods +func (o PodDisruptionBudgetStatusPtrOutput) CurrentHealthy() pulumi.IntPtrOutput { + return o.ApplyT(func(v *PodDisruptionBudgetStatus) *int { + if v == nil { + return nil + } + return &v.CurrentHealthy + }).(pulumi.IntPtrOutput) +} + +// minimum desired number of healthy pods +func (o PodDisruptionBudgetStatusPtrOutput) DesiredHealthy() pulumi.IntPtrOutput { + return o.ApplyT(func(v *PodDisruptionBudgetStatus) *int { + if v == nil { + return nil + } + return &v.DesiredHealthy + }).(pulumi.IntPtrOutput) +} + +// DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. +func (o PodDisruptionBudgetStatusPtrOutput) DisruptedPods() pulumi.StringMapOutput { + return o.ApplyT(func(v *PodDisruptionBudgetStatus) map[string]string { + if v == nil { + return nil + } + return v.DisruptedPods + }).(pulumi.StringMapOutput) +} + +// Number of pod disruptions that are currently allowed. +func (o PodDisruptionBudgetStatusPtrOutput) DisruptionsAllowed() pulumi.IntPtrOutput { + return o.ApplyT(func(v *PodDisruptionBudgetStatus) *int { + if v == nil { + return nil + } + return &v.DisruptionsAllowed + }).(pulumi.IntPtrOutput) +} + +// total number of pods counted by this disruption budget +func (o PodDisruptionBudgetStatusPtrOutput) ExpectedPods() pulumi.IntPtrOutput { + return o.ApplyT(func(v *PodDisruptionBudgetStatus) *int { + if v == nil { + return nil + } + return &v.ExpectedPods + }).(pulumi.IntPtrOutput) +} + +// Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. +func (o PodDisruptionBudgetStatusPtrOutput) ObservedGeneration() pulumi.IntPtrOutput { + return o.ApplyT(func(v *PodDisruptionBudgetStatus) *int { + if v == nil { + return nil + } + return v.ObservedGeneration + }).(pulumi.IntPtrOutput) +} + +func init() { + pulumi.RegisterOutputType(PodDisruptionBudgetTypeOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetTypeArrayOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetListTypeOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetSpecOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetSpecPtrOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetStatusOutput{}) + pulumi.RegisterOutputType(PodDisruptionBudgetStatusPtrOutput{}) +} diff --git a/sdk/go/kubernetes/policy/v1beta1/podDisruptionBudget.go b/sdk/go/kubernetes/policy/v1beta1/podDisruptionBudget.go index 81c969023e..010383b0d1 100644 --- a/sdk/go/kubernetes/policy/v1beta1/podDisruptionBudget.go +++ b/sdk/go/kubernetes/policy/v1beta1/podDisruptionBudget.go @@ -35,6 +35,12 @@ func NewPodDisruptionBudget(ctx *pulumi.Context, args.ApiVersion = pulumi.StringPtr("policy/v1beta1") args.Kind = pulumi.StringPtr("PodDisruptionBudget") + aliases := pulumi.Aliases([]pulumi.Alias{ + { + Type: pulumi.String("kubernetes:policy/v1:PodDisruptionBudget"), + }, + }) + opts = append(opts, aliases) var resource PodDisruptionBudget err := ctx.RegisterResource("kubernetes:policy/v1beta1:PodDisruptionBudget", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/kubernetes/policy/v1beta1/podSecurityPolicy.go b/sdk/go/kubernetes/policy/v1beta1/podSecurityPolicy.go index 018bfaa8c3..567b288718 100644 --- a/sdk/go/kubernetes/policy/v1beta1/podSecurityPolicy.go +++ b/sdk/go/kubernetes/policy/v1beta1/podSecurityPolicy.go @@ -11,7 +11,7 @@ import ( "github.com/pulumi/pulumi/sdk/v2/go/pulumi" ) -// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. +// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. type PodSecurityPolicy struct { pulumi.CustomResourceState diff --git a/sdk/go/kubernetes/policy/v1beta1/pulumiTypes.go b/sdk/go/kubernetes/policy/v1beta1/pulumiTypes.go index 54dcfd93a9..b2098bcb12 100644 --- a/sdk/go/kubernetes/policy/v1beta1/pulumiTypes.go +++ b/sdk/go/kubernetes/policy/v1beta1/pulumiTypes.go @@ -995,7 +995,7 @@ type PodDisruptionBudgetSpec struct { MaxUnavailable interface{} `pulumi:"maxUnavailable"` // An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". MinAvailable interface{} `pulumi:"minAvailable"` - // Label query over pods whose evictions are managed by the disruption budget. + // Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. Selector *metav1.LabelSelector `pulumi:"selector"` } @@ -1016,7 +1016,7 @@ type PodDisruptionBudgetSpecArgs struct { MaxUnavailable pulumi.Input `pulumi:"maxUnavailable"` // An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". MinAvailable pulumi.Input `pulumi:"minAvailable"` - // Label query over pods whose evictions are managed by the disruption budget. + // Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. Selector metav1.LabelSelectorPtrInput `pulumi:"selector"` } @@ -1108,7 +1108,7 @@ func (o PodDisruptionBudgetSpecOutput) MinAvailable() pulumi.AnyOutput { return o.ApplyT(func(v PodDisruptionBudgetSpec) interface{} { return v.MinAvailable }).(pulumi.AnyOutput) } -// Label query over pods whose evictions are managed by the disruption budget. +// Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. func (o PodDisruptionBudgetSpecOutput) Selector() metav1.LabelSelectorPtrOutput { return o.ApplyT(func(v PodDisruptionBudgetSpec) *metav1.LabelSelector { return v.Selector }).(metav1.LabelSelectorPtrOutput) } @@ -1151,7 +1151,7 @@ func (o PodDisruptionBudgetSpecPtrOutput) MinAvailable() pulumi.AnyOutput { }).(pulumi.AnyOutput) } -// Label query over pods whose evictions are managed by the disruption budget. +// Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. func (o PodDisruptionBudgetSpecPtrOutput) Selector() metav1.LabelSelectorPtrOutput { return o.ApplyT(func(v *PodDisruptionBudgetSpec) *metav1.LabelSelector { if v == nil { @@ -1163,6 +1163,16 @@ func (o PodDisruptionBudgetSpecPtrOutput) Selector() metav1.LabelSelectorPtrOutp // PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. type PodDisruptionBudgetStatus struct { + // Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + // the number of allowed disruptions. Therefore no disruptions are + // allowed and the status of the condition will be False. + // - InsufficientPods: The number of pods are either at or below the number + // required by the PodDisruptionBudget. No disruptions are + // allowed and the status of the condition will be False. + // - SufficientPods: There are more pods than required by the PodDisruptionBudget. + // The condition will be True, and the number of allowed + // disruptions are provided by the disruptionsAllowed property. + Conditions []metav1.Condition `pulumi:"conditions"` // current number of healthy pods CurrentHealthy int `pulumi:"currentHealthy"` // minimum desired number of healthy pods @@ -1190,6 +1200,16 @@ type PodDisruptionBudgetStatusInput interface { // PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. type PodDisruptionBudgetStatusArgs struct { + // Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + // the number of allowed disruptions. Therefore no disruptions are + // allowed and the status of the condition will be False. + // - InsufficientPods: The number of pods are either at or below the number + // required by the PodDisruptionBudget. No disruptions are + // allowed and the status of the condition will be False. + // - SufficientPods: There are more pods than required by the PodDisruptionBudget. + // The condition will be True, and the number of allowed + // disruptions are provided by the disruptionsAllowed property. + Conditions metav1.ConditionArrayInput `pulumi:"conditions"` // current number of healthy pods CurrentHealthy pulumi.IntInput `pulumi:"currentHealthy"` // minimum desired number of healthy pods @@ -1282,6 +1302,19 @@ func (o PodDisruptionBudgetStatusOutput) ToPodDisruptionBudgetStatusPtrOutputWit }).(PodDisruptionBudgetStatusPtrOutput) } +// Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute +// the number of allowed disruptions. Therefore no disruptions are +// allowed and the status of the condition will be False. +// - InsufficientPods: The number of pods are either at or below the number +// required by the PodDisruptionBudget. No disruptions are +// allowed and the status of the condition will be False. +// - SufficientPods: There are more pods than required by the PodDisruptionBudget. +// The condition will be True, and the number of allowed +// disruptions are provided by the disruptionsAllowed property. +func (o PodDisruptionBudgetStatusOutput) Conditions() metav1.ConditionArrayOutput { + return o.ApplyT(func(v PodDisruptionBudgetStatus) []metav1.Condition { return v.Conditions }).(metav1.ConditionArrayOutput) +} + // current number of healthy pods func (o PodDisruptionBudgetStatusOutput) CurrentHealthy() pulumi.IntOutput { return o.ApplyT(func(v PodDisruptionBudgetStatus) int { return v.CurrentHealthy }).(pulumi.IntOutput) @@ -1330,6 +1363,24 @@ func (o PodDisruptionBudgetStatusPtrOutput) Elem() PodDisruptionBudgetStatusOutp return o.ApplyT(func(v *PodDisruptionBudgetStatus) PodDisruptionBudgetStatus { return *v }).(PodDisruptionBudgetStatusOutput) } +// Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute +// the number of allowed disruptions. Therefore no disruptions are +// allowed and the status of the condition will be False. +// - InsufficientPods: The number of pods are either at or below the number +// required by the PodDisruptionBudget. No disruptions are +// allowed and the status of the condition will be False. +// - SufficientPods: There are more pods than required by the PodDisruptionBudget. +// The condition will be True, and the number of allowed +// disruptions are provided by the disruptionsAllowed property. +func (o PodDisruptionBudgetStatusPtrOutput) Conditions() metav1.ConditionArrayOutput { + return o.ApplyT(func(v *PodDisruptionBudgetStatus) []metav1.Condition { + if v == nil { + return nil + } + return v.Conditions + }).(metav1.ConditionArrayOutput) +} + // current number of healthy pods func (o PodDisruptionBudgetStatusPtrOutput) CurrentHealthy() pulumi.IntPtrOutput { return o.ApplyT(func(v *PodDisruptionBudgetStatus) *int { @@ -1390,7 +1441,7 @@ func (o PodDisruptionBudgetStatusPtrOutput) ObservedGeneration() pulumi.IntPtrOu }).(pulumi.IntPtrOutput) } -// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. +// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. type PodSecurityPolicyType struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources ApiVersion *string `pulumi:"apiVersion"` @@ -1413,7 +1464,7 @@ type PodSecurityPolicyTypeInput interface { ToPodSecurityPolicyTypeOutputWithContext(context.Context) PodSecurityPolicyTypeOutput } -// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. +// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. type PodSecurityPolicyTypeArgs struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` @@ -1462,7 +1513,7 @@ func (i PodSecurityPolicyTypeArray) ToPodSecurityPolicyTypeArrayOutputWithContex return pulumi.ToOutputWithContext(ctx, i).(PodSecurityPolicyTypeArrayOutput) } -// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. +// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. type PodSecurityPolicyTypeOutput struct{ *pulumi.OutputState } func (PodSecurityPolicyTypeOutput) ElementType() reflect.Type { diff --git a/sdk/go/kubernetes/storage/v1/pulumiTypes.go b/sdk/go/kubernetes/storage/v1/pulumiTypes.go index 4decbd3d16..e7496aa849 100644 --- a/sdk/go/kubernetes/storage/v1/pulumiTypes.go +++ b/sdk/go/kubernetes/storage/v1/pulumiTypes.go @@ -224,19 +224,25 @@ func (o CSIDriverListTypeOutput) Metadata() metav1.ListMetaPtrOutput { // CSIDriverSpec is the specification of a CSIDriver. type CSIDriverSpec struct { // attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + // + // This field is immutable. AttachRequired *bool `pulumi:"attachRequired"` // Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + // + // This field is immutable. FsGroupPolicy *string `pulumi:"fsGroupPolicy"` - // If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + // If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume // defined by a CSIVolumeSource, otherwise "false" // // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + // + // This field is immutable. PodInfoOnMount *bool `pulumi:"podInfoOnMount"` // RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false. // // Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. // - // This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + // This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. RequiresRepublish *bool `pulumi:"requiresRepublish"` // If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information. // @@ -244,7 +250,9 @@ type CSIDriverSpec struct { // // Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. // - // This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + // This field is immutable. + // + // This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. StorageCapacity *bool `pulumi:"storageCapacity"` // TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: "csi.storage.k8s.io/serviceAccount.tokens": { // "": { @@ -256,9 +264,11 @@ type CSIDriverSpec struct { // // Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. // - // This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + // This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. TokenRequests []TokenRequest `pulumi:"tokenRequests"` // volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. + // + // This field is immutable. VolumeLifecycleModes []string `pulumi:"volumeLifecycleModes"` } @@ -276,19 +286,25 @@ type CSIDriverSpecInput interface { // CSIDriverSpec is the specification of a CSIDriver. type CSIDriverSpecArgs struct { // attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + // + // This field is immutable. AttachRequired pulumi.BoolPtrInput `pulumi:"attachRequired"` // Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + // + // This field is immutable. FsGroupPolicy pulumi.StringPtrInput `pulumi:"fsGroupPolicy"` - // If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + // If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume // defined by a CSIVolumeSource, otherwise "false" // // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + // + // This field is immutable. PodInfoOnMount pulumi.BoolPtrInput `pulumi:"podInfoOnMount"` // RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false. // // Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. // - // This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + // This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. RequiresRepublish pulumi.BoolPtrInput `pulumi:"requiresRepublish"` // If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information. // @@ -296,7 +312,9 @@ type CSIDriverSpecArgs struct { // // Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. // - // This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + // This field is immutable. + // + // This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. StorageCapacity pulumi.BoolPtrInput `pulumi:"storageCapacity"` // TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: "csi.storage.k8s.io/serviceAccount.tokens": { // "": { @@ -308,9 +326,11 @@ type CSIDriverSpecArgs struct { // // Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. // - // This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + // This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. TokenRequests TokenRequestArrayInput `pulumi:"tokenRequests"` // volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. + // + // This field is immutable. VolumeLifecycleModes pulumi.StringArrayInput `pulumi:"volumeLifecycleModes"` } @@ -393,19 +413,25 @@ func (o CSIDriverSpecOutput) ToCSIDriverSpecPtrOutputWithContext(ctx context.Con } // attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. +// +// This field is immutable. func (o CSIDriverSpecOutput) AttachRequired() pulumi.BoolPtrOutput { return o.ApplyT(func(v CSIDriverSpec) *bool { return v.AttachRequired }).(pulumi.BoolPtrOutput) } // Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. +// +// This field is immutable. func (o CSIDriverSpecOutput) FsGroupPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v CSIDriverSpec) *string { return v.FsGroupPolicy }).(pulumi.StringPtrOutput) } -// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume +// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume // defined by a CSIVolumeSource, otherwise "false" // // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. +// +// This field is immutable. func (o CSIDriverSpecOutput) PodInfoOnMount() pulumi.BoolPtrOutput { return o.ApplyT(func(v CSIDriverSpec) *bool { return v.PodInfoOnMount }).(pulumi.BoolPtrOutput) } @@ -414,7 +440,7 @@ func (o CSIDriverSpecOutput) PodInfoOnMount() pulumi.BoolPtrOutput { // // Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. // -// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. +// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. func (o CSIDriverSpecOutput) RequiresRepublish() pulumi.BoolPtrOutput { return o.ApplyT(func(v CSIDriverSpec) *bool { return v.RequiresRepublish }).(pulumi.BoolPtrOutput) } @@ -425,7 +451,9 @@ func (o CSIDriverSpecOutput) RequiresRepublish() pulumi.BoolPtrOutput { // // Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. // -// This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. +// This field is immutable. +// +// This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. func (o CSIDriverSpecOutput) StorageCapacity() pulumi.BoolPtrOutput { return o.ApplyT(func(v CSIDriverSpec) *bool { return v.StorageCapacity }).(pulumi.BoolPtrOutput) } @@ -440,12 +468,14 @@ func (o CSIDriverSpecOutput) StorageCapacity() pulumi.BoolPtrOutput { // // Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. // -// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. +// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. func (o CSIDriverSpecOutput) TokenRequests() TokenRequestArrayOutput { return o.ApplyT(func(v CSIDriverSpec) []TokenRequest { return v.TokenRequests }).(TokenRequestArrayOutput) } // volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. +// +// This field is immutable. func (o CSIDriverSpecOutput) VolumeLifecycleModes() pulumi.StringArrayOutput { return o.ApplyT(func(v CSIDriverSpec) []string { return v.VolumeLifecycleModes }).(pulumi.StringArrayOutput) } @@ -469,6 +499,8 @@ func (o CSIDriverSpecPtrOutput) Elem() CSIDriverSpecOutput { } // attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. +// +// This field is immutable. func (o CSIDriverSpecPtrOutput) AttachRequired() pulumi.BoolPtrOutput { return o.ApplyT(func(v *CSIDriverSpec) *bool { if v == nil { @@ -479,6 +511,8 @@ func (o CSIDriverSpecPtrOutput) AttachRequired() pulumi.BoolPtrOutput { } // Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. +// +// This field is immutable. func (o CSIDriverSpecPtrOutput) FsGroupPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v *CSIDriverSpec) *string { if v == nil { @@ -488,10 +522,12 @@ func (o CSIDriverSpecPtrOutput) FsGroupPolicy() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } -// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume +// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume // defined by a CSIVolumeSource, otherwise "false" // // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. +// +// This field is immutable. func (o CSIDriverSpecPtrOutput) PodInfoOnMount() pulumi.BoolPtrOutput { return o.ApplyT(func(v *CSIDriverSpec) *bool { if v == nil { @@ -505,7 +541,7 @@ func (o CSIDriverSpecPtrOutput) PodInfoOnMount() pulumi.BoolPtrOutput { // // Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. // -// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. +// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. func (o CSIDriverSpecPtrOutput) RequiresRepublish() pulumi.BoolPtrOutput { return o.ApplyT(func(v *CSIDriverSpec) *bool { if v == nil { @@ -521,7 +557,9 @@ func (o CSIDriverSpecPtrOutput) RequiresRepublish() pulumi.BoolPtrOutput { // // Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. // -// This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. +// This field is immutable. +// +// This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. func (o CSIDriverSpecPtrOutput) StorageCapacity() pulumi.BoolPtrOutput { return o.ApplyT(func(v *CSIDriverSpec) *bool { if v == nil { @@ -541,7 +579,7 @@ func (o CSIDriverSpecPtrOutput) StorageCapacity() pulumi.BoolPtrOutput { // // Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. // -// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. +// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. func (o CSIDriverSpecPtrOutput) TokenRequests() TokenRequestArrayOutput { return o.ApplyT(func(v *CSIDriverSpec) []TokenRequest { if v == nil { @@ -552,6 +590,8 @@ func (o CSIDriverSpecPtrOutput) TokenRequests() TokenRequestArrayOutput { } // volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. +// +// This field is immutable. func (o CSIDriverSpecPtrOutput) VolumeLifecycleModes() pulumi.StringArrayOutput { return o.ApplyT(func(v *CSIDriverSpec) []string { if v == nil { @@ -1635,7 +1675,7 @@ func (o VolumeAttachmentListTypeOutput) Metadata() metav1.ListMetaPtrOutput { // VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. type VolumeAttachmentSource struct { - // inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + // inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. InlineVolumeSpec *corev1.PersistentVolumeSpec `pulumi:"inlineVolumeSpec"` // Name of the persistent volume to attach. PersistentVolumeName *string `pulumi:"persistentVolumeName"` @@ -1654,7 +1694,7 @@ type VolumeAttachmentSourceInput interface { // VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. type VolumeAttachmentSourceArgs struct { - // inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + // inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. InlineVolumeSpec corev1.PersistentVolumeSpecPtrInput `pulumi:"inlineVolumeSpec"` // Name of the persistent volume to attach. PersistentVolumeName pulumi.StringPtrInput `pulumi:"persistentVolumeName"` @@ -1738,7 +1778,7 @@ func (o VolumeAttachmentSourceOutput) ToVolumeAttachmentSourcePtrOutputWithConte }).(VolumeAttachmentSourcePtrOutput) } -// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. +// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. func (o VolumeAttachmentSourceOutput) InlineVolumeSpec() corev1.PersistentVolumeSpecPtrOutput { return o.ApplyT(func(v VolumeAttachmentSource) *corev1.PersistentVolumeSpec { return v.InlineVolumeSpec }).(corev1.PersistentVolumeSpecPtrOutput) } @@ -1766,7 +1806,7 @@ func (o VolumeAttachmentSourcePtrOutput) Elem() VolumeAttachmentSourceOutput { return o.ApplyT(func(v *VolumeAttachmentSource) VolumeAttachmentSource { return *v }).(VolumeAttachmentSourceOutput) } -// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. +// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. func (o VolumeAttachmentSourcePtrOutput) InlineVolumeSpec() corev1.PersistentVolumeSpecPtrOutput { return o.ApplyT(func(v *VolumeAttachmentSource) *corev1.PersistentVolumeSpec { if v == nil { diff --git a/sdk/go/kubernetes/storage/v1alpha1/csistorageCapacity.go b/sdk/go/kubernetes/storage/v1alpha1/csistorageCapacity.go new file mode 100644 index 0000000000..96c2633d35 --- /dev/null +++ b/sdk/go/kubernetes/storage/v1alpha1/csistorageCapacity.go @@ -0,0 +1,384 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1alpha1 + +import ( + "context" + "reflect" + + "github.com/pkg/errors" + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type CSIStorageCapacity struct { + pulumi.CustomResourceState + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity pulumi.StringPtrOutput `pulumi:"capacity"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize pulumi.StringPtrOutput `pulumi:"maximumVolumeSize"` + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology metav1.LabelSelectorPtrOutput `pulumi:"nodeTopology"` + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName pulumi.StringOutput `pulumi:"storageClassName"` +} + +// NewCSIStorageCapacity registers a new resource with the given unique name, arguments, and options. +func NewCSIStorageCapacity(ctx *pulumi.Context, + name string, args *CSIStorageCapacityArgs, opts ...pulumi.ResourceOption) (*CSIStorageCapacity, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.StorageClassName == nil { + return nil, errors.New("invalid value for required argument 'StorageClassName'") + } + args.ApiVersion = pulumi.StringPtr("storage.k8s.io/v1alpha1") + args.Kind = pulumi.StringPtr("CSIStorageCapacity") + aliases := pulumi.Aliases([]pulumi.Alias{ + { + Type: pulumi.String("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity"), + }, + }) + opts = append(opts, aliases) + var resource CSIStorageCapacity + err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetCSIStorageCapacity gets an existing CSIStorageCapacity resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetCSIStorageCapacity(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *CSIStorageCapacityState, opts ...pulumi.ResourceOption) (*CSIStorageCapacity, error) { + var resource CSIStorageCapacity + err := ctx.ReadResource("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering CSIStorageCapacity resources. +type csistorageCapacityState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity *string `pulumi:"capacity"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize *string `pulumi:"maximumVolumeSize"` + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology *metav1.LabelSelector `pulumi:"nodeTopology"` + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName *string `pulumi:"storageClassName"` +} + +type CSIStorageCapacityState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity pulumi.StringPtrInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize pulumi.StringPtrInput + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology metav1.LabelSelectorPtrInput + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName pulumi.StringPtrInput +} + +func (CSIStorageCapacityState) ElementType() reflect.Type { + return reflect.TypeOf((*csistorageCapacityState)(nil)).Elem() +} + +type csistorageCapacityArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity *string `pulumi:"capacity"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize *string `pulumi:"maximumVolumeSize"` + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology *metav1.LabelSelector `pulumi:"nodeTopology"` + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName string `pulumi:"storageClassName"` +} + +// The set of arguments for constructing a CSIStorageCapacity resource. +type CSIStorageCapacityArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity pulumi.StringPtrInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize pulumi.StringPtrInput + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology metav1.LabelSelectorPtrInput + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName pulumi.StringInput +} + +func (CSIStorageCapacityArgs) ElementType() reflect.Type { + return reflect.TypeOf((*csistorageCapacityArgs)(nil)).Elem() +} + +type CSIStorageCapacityInput interface { + pulumi.Input + + ToCSIStorageCapacityOutput() CSIStorageCapacityOutput + ToCSIStorageCapacityOutputWithContext(ctx context.Context) CSIStorageCapacityOutput +} + +func (*CSIStorageCapacity) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacity)(nil)) +} + +func (i *CSIStorageCapacity) ToCSIStorageCapacityOutput() CSIStorageCapacityOutput { + return i.ToCSIStorageCapacityOutputWithContext(context.Background()) +} + +func (i *CSIStorageCapacity) ToCSIStorageCapacityOutputWithContext(ctx context.Context) CSIStorageCapacityOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityOutput) +} + +func (i *CSIStorageCapacity) ToCSIStorageCapacityPtrOutput() CSIStorageCapacityPtrOutput { + return i.ToCSIStorageCapacityPtrOutputWithContext(context.Background()) +} + +func (i *CSIStorageCapacity) ToCSIStorageCapacityPtrOutputWithContext(ctx context.Context) CSIStorageCapacityPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityPtrOutput) +} + +type CSIStorageCapacityPtrInput interface { + pulumi.Input + + ToCSIStorageCapacityPtrOutput() CSIStorageCapacityPtrOutput + ToCSIStorageCapacityPtrOutputWithContext(ctx context.Context) CSIStorageCapacityPtrOutput +} + +type csistorageCapacityPtrType CSIStorageCapacityArgs + +func (*csistorageCapacityPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CSIStorageCapacity)(nil)) +} + +func (i *csistorageCapacityPtrType) ToCSIStorageCapacityPtrOutput() CSIStorageCapacityPtrOutput { + return i.ToCSIStorageCapacityPtrOutputWithContext(context.Background()) +} + +func (i *csistorageCapacityPtrType) ToCSIStorageCapacityPtrOutputWithContext(ctx context.Context) CSIStorageCapacityPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityPtrOutput) +} + +// CSIStorageCapacityArrayInput is an input type that accepts CSIStorageCapacityArray and CSIStorageCapacityArrayOutput values. +// You can construct a concrete instance of `CSIStorageCapacityArrayInput` via: +// +// CSIStorageCapacityArray{ CSIStorageCapacityArgs{...} } +type CSIStorageCapacityArrayInput interface { + pulumi.Input + + ToCSIStorageCapacityArrayOutput() CSIStorageCapacityArrayOutput + ToCSIStorageCapacityArrayOutputWithContext(context.Context) CSIStorageCapacityArrayOutput +} + +type CSIStorageCapacityArray []CSIStorageCapacityInput + +func (CSIStorageCapacityArray) ElementType() reflect.Type { + return reflect.TypeOf(([]*CSIStorageCapacity)(nil)) +} + +func (i CSIStorageCapacityArray) ToCSIStorageCapacityArrayOutput() CSIStorageCapacityArrayOutput { + return i.ToCSIStorageCapacityArrayOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityArray) ToCSIStorageCapacityArrayOutputWithContext(ctx context.Context) CSIStorageCapacityArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityArrayOutput) +} + +// CSIStorageCapacityMapInput is an input type that accepts CSIStorageCapacityMap and CSIStorageCapacityMapOutput values. +// You can construct a concrete instance of `CSIStorageCapacityMapInput` via: +// +// CSIStorageCapacityMap{ "key": CSIStorageCapacityArgs{...} } +type CSIStorageCapacityMapInput interface { + pulumi.Input + + ToCSIStorageCapacityMapOutput() CSIStorageCapacityMapOutput + ToCSIStorageCapacityMapOutputWithContext(context.Context) CSIStorageCapacityMapOutput +} + +type CSIStorageCapacityMap map[string]CSIStorageCapacityInput + +func (CSIStorageCapacityMap) ElementType() reflect.Type { + return reflect.TypeOf((map[string]*CSIStorageCapacity)(nil)) +} + +func (i CSIStorageCapacityMap) ToCSIStorageCapacityMapOutput() CSIStorageCapacityMapOutput { + return i.ToCSIStorageCapacityMapOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityMap) ToCSIStorageCapacityMapOutputWithContext(ctx context.Context) CSIStorageCapacityMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityMapOutput) +} + +type CSIStorageCapacityOutput struct { + *pulumi.OutputState +} + +func (CSIStorageCapacityOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacity)(nil)) +} + +func (o CSIStorageCapacityOutput) ToCSIStorageCapacityOutput() CSIStorageCapacityOutput { + return o +} + +func (o CSIStorageCapacityOutput) ToCSIStorageCapacityOutputWithContext(ctx context.Context) CSIStorageCapacityOutput { + return o +} + +func (o CSIStorageCapacityOutput) ToCSIStorageCapacityPtrOutput() CSIStorageCapacityPtrOutput { + return o.ToCSIStorageCapacityPtrOutputWithContext(context.Background()) +} + +func (o CSIStorageCapacityOutput) ToCSIStorageCapacityPtrOutputWithContext(ctx context.Context) CSIStorageCapacityPtrOutput { + return o.ApplyT(func(v CSIStorageCapacity) *CSIStorageCapacity { + return &v + }).(CSIStorageCapacityPtrOutput) +} + +type CSIStorageCapacityPtrOutput struct { + *pulumi.OutputState +} + +func (CSIStorageCapacityPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CSIStorageCapacity)(nil)) +} + +func (o CSIStorageCapacityPtrOutput) ToCSIStorageCapacityPtrOutput() CSIStorageCapacityPtrOutput { + return o +} + +func (o CSIStorageCapacityPtrOutput) ToCSIStorageCapacityPtrOutputWithContext(ctx context.Context) CSIStorageCapacityPtrOutput { + return o +} + +type CSIStorageCapacityArrayOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]CSIStorageCapacity)(nil)) +} + +func (o CSIStorageCapacityArrayOutput) ToCSIStorageCapacityArrayOutput() CSIStorageCapacityArrayOutput { + return o +} + +func (o CSIStorageCapacityArrayOutput) ToCSIStorageCapacityArrayOutputWithContext(ctx context.Context) CSIStorageCapacityArrayOutput { + return o +} + +func (o CSIStorageCapacityArrayOutput) Index(i pulumi.IntInput) CSIStorageCapacityOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) CSIStorageCapacity { + return vs[0].([]CSIStorageCapacity)[vs[1].(int)] + }).(CSIStorageCapacityOutput) +} + +type CSIStorageCapacityMapOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]CSIStorageCapacity)(nil)) +} + +func (o CSIStorageCapacityMapOutput) ToCSIStorageCapacityMapOutput() CSIStorageCapacityMapOutput { + return o +} + +func (o CSIStorageCapacityMapOutput) ToCSIStorageCapacityMapOutputWithContext(ctx context.Context) CSIStorageCapacityMapOutput { + return o +} + +func (o CSIStorageCapacityMapOutput) MapIndex(k pulumi.StringInput) CSIStorageCapacityOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) CSIStorageCapacity { + return vs[0].(map[string]CSIStorageCapacity)[vs[1].(string)] + }).(CSIStorageCapacityOutput) +} + +func init() { + pulumi.RegisterOutputType(CSIStorageCapacityOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityPtrOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityArrayOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityMapOutput{}) +} diff --git a/sdk/go/kubernetes/storage/v1alpha1/csistorageCapacityList.go b/sdk/go/kubernetes/storage/v1alpha1/csistorageCapacityList.go new file mode 100644 index 0000000000..4b7d06a459 --- /dev/null +++ b/sdk/go/kubernetes/storage/v1alpha1/csistorageCapacityList.go @@ -0,0 +1,300 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1alpha1 + +import ( + "context" + "reflect" + + "github.com/pkg/errors" + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type CSIStorageCapacityList struct { + pulumi.CustomResourceState + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` + // Items is the list of CSIStorageCapacity objects. + Items CSIStorageCapacityTypeArrayOutput `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrOutput `pulumi:"metadata"` +} + +// NewCSIStorageCapacityList registers a new resource with the given unique name, arguments, and options. +func NewCSIStorageCapacityList(ctx *pulumi.Context, + name string, args *CSIStorageCapacityListArgs, opts ...pulumi.ResourceOption) (*CSIStorageCapacityList, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Items == nil { + return nil, errors.New("invalid value for required argument 'Items'") + } + args.ApiVersion = pulumi.StringPtr("storage.k8s.io/v1alpha1") + args.Kind = pulumi.StringPtr("CSIStorageCapacityList") + var resource CSIStorageCapacityList + err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetCSIStorageCapacityList gets an existing CSIStorageCapacityList resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetCSIStorageCapacityList(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *CSIStorageCapacityListState, opts ...pulumi.ResourceOption) (*CSIStorageCapacityList, error) { + var resource CSIStorageCapacityList + err := ctx.ReadResource("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering CSIStorageCapacityList resources. +type csistorageCapacityListState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Items is the list of CSIStorageCapacity objects. + Items []CSIStorageCapacityType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +type CSIStorageCapacityListState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Items is the list of CSIStorageCapacity objects. + Items CSIStorageCapacityTypeArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput +} + +func (CSIStorageCapacityListState) ElementType() reflect.Type { + return reflect.TypeOf((*csistorageCapacityListState)(nil)).Elem() +} + +type csistorageCapacityListArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Items is the list of CSIStorageCapacity objects. + Items []CSIStorageCapacityType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +// The set of arguments for constructing a CSIStorageCapacityList resource. +type CSIStorageCapacityListArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Items is the list of CSIStorageCapacity objects. + Items CSIStorageCapacityTypeArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput +} + +func (CSIStorageCapacityListArgs) ElementType() reflect.Type { + return reflect.TypeOf((*csistorageCapacityListArgs)(nil)).Elem() +} + +type CSIStorageCapacityListInput interface { + pulumi.Input + + ToCSIStorageCapacityListOutput() CSIStorageCapacityListOutput + ToCSIStorageCapacityListOutputWithContext(ctx context.Context) CSIStorageCapacityListOutput +} + +func (*CSIStorageCapacityList) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityList)(nil)) +} + +func (i *CSIStorageCapacityList) ToCSIStorageCapacityListOutput() CSIStorageCapacityListOutput { + return i.ToCSIStorageCapacityListOutputWithContext(context.Background()) +} + +func (i *CSIStorageCapacityList) ToCSIStorageCapacityListOutputWithContext(ctx context.Context) CSIStorageCapacityListOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListOutput) +} + +func (i *CSIStorageCapacityList) ToCSIStorageCapacityListPtrOutput() CSIStorageCapacityListPtrOutput { + return i.ToCSIStorageCapacityListPtrOutputWithContext(context.Background()) +} + +func (i *CSIStorageCapacityList) ToCSIStorageCapacityListPtrOutputWithContext(ctx context.Context) CSIStorageCapacityListPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListPtrOutput) +} + +type CSIStorageCapacityListPtrInput interface { + pulumi.Input + + ToCSIStorageCapacityListPtrOutput() CSIStorageCapacityListPtrOutput + ToCSIStorageCapacityListPtrOutputWithContext(ctx context.Context) CSIStorageCapacityListPtrOutput +} + +type csistorageCapacityListPtrType CSIStorageCapacityListArgs + +func (*csistorageCapacityListPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CSIStorageCapacityList)(nil)) +} + +func (i *csistorageCapacityListPtrType) ToCSIStorageCapacityListPtrOutput() CSIStorageCapacityListPtrOutput { + return i.ToCSIStorageCapacityListPtrOutputWithContext(context.Background()) +} + +func (i *csistorageCapacityListPtrType) ToCSIStorageCapacityListPtrOutputWithContext(ctx context.Context) CSIStorageCapacityListPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListPtrOutput) +} + +// CSIStorageCapacityListArrayInput is an input type that accepts CSIStorageCapacityListArray and CSIStorageCapacityListArrayOutput values. +// You can construct a concrete instance of `CSIStorageCapacityListArrayInput` via: +// +// CSIStorageCapacityListArray{ CSIStorageCapacityListArgs{...} } +type CSIStorageCapacityListArrayInput interface { + pulumi.Input + + ToCSIStorageCapacityListArrayOutput() CSIStorageCapacityListArrayOutput + ToCSIStorageCapacityListArrayOutputWithContext(context.Context) CSIStorageCapacityListArrayOutput +} + +type CSIStorageCapacityListArray []CSIStorageCapacityListInput + +func (CSIStorageCapacityListArray) ElementType() reflect.Type { + return reflect.TypeOf(([]*CSIStorageCapacityList)(nil)) +} + +func (i CSIStorageCapacityListArray) ToCSIStorageCapacityListArrayOutput() CSIStorageCapacityListArrayOutput { + return i.ToCSIStorageCapacityListArrayOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityListArray) ToCSIStorageCapacityListArrayOutputWithContext(ctx context.Context) CSIStorageCapacityListArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListArrayOutput) +} + +// CSIStorageCapacityListMapInput is an input type that accepts CSIStorageCapacityListMap and CSIStorageCapacityListMapOutput values. +// You can construct a concrete instance of `CSIStorageCapacityListMapInput` via: +// +// CSIStorageCapacityListMap{ "key": CSIStorageCapacityListArgs{...} } +type CSIStorageCapacityListMapInput interface { + pulumi.Input + + ToCSIStorageCapacityListMapOutput() CSIStorageCapacityListMapOutput + ToCSIStorageCapacityListMapOutputWithContext(context.Context) CSIStorageCapacityListMapOutput +} + +type CSIStorageCapacityListMap map[string]CSIStorageCapacityListInput + +func (CSIStorageCapacityListMap) ElementType() reflect.Type { + return reflect.TypeOf((map[string]*CSIStorageCapacityList)(nil)) +} + +func (i CSIStorageCapacityListMap) ToCSIStorageCapacityListMapOutput() CSIStorageCapacityListMapOutput { + return i.ToCSIStorageCapacityListMapOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityListMap) ToCSIStorageCapacityListMapOutputWithContext(ctx context.Context) CSIStorageCapacityListMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListMapOutput) +} + +type CSIStorageCapacityListOutput struct { + *pulumi.OutputState +} + +func (CSIStorageCapacityListOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityList)(nil)) +} + +func (o CSIStorageCapacityListOutput) ToCSIStorageCapacityListOutput() CSIStorageCapacityListOutput { + return o +} + +func (o CSIStorageCapacityListOutput) ToCSIStorageCapacityListOutputWithContext(ctx context.Context) CSIStorageCapacityListOutput { + return o +} + +func (o CSIStorageCapacityListOutput) ToCSIStorageCapacityListPtrOutput() CSIStorageCapacityListPtrOutput { + return o.ToCSIStorageCapacityListPtrOutputWithContext(context.Background()) +} + +func (o CSIStorageCapacityListOutput) ToCSIStorageCapacityListPtrOutputWithContext(ctx context.Context) CSIStorageCapacityListPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityList) *CSIStorageCapacityList { + return &v + }).(CSIStorageCapacityListPtrOutput) +} + +type CSIStorageCapacityListPtrOutput struct { + *pulumi.OutputState +} + +func (CSIStorageCapacityListPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CSIStorageCapacityList)(nil)) +} + +func (o CSIStorageCapacityListPtrOutput) ToCSIStorageCapacityListPtrOutput() CSIStorageCapacityListPtrOutput { + return o +} + +func (o CSIStorageCapacityListPtrOutput) ToCSIStorageCapacityListPtrOutputWithContext(ctx context.Context) CSIStorageCapacityListPtrOutput { + return o +} + +type CSIStorageCapacityListArrayOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityListArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]CSIStorageCapacityList)(nil)) +} + +func (o CSIStorageCapacityListArrayOutput) ToCSIStorageCapacityListArrayOutput() CSIStorageCapacityListArrayOutput { + return o +} + +func (o CSIStorageCapacityListArrayOutput) ToCSIStorageCapacityListArrayOutputWithContext(ctx context.Context) CSIStorageCapacityListArrayOutput { + return o +} + +func (o CSIStorageCapacityListArrayOutput) Index(i pulumi.IntInput) CSIStorageCapacityListOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) CSIStorageCapacityList { + return vs[0].([]CSIStorageCapacityList)[vs[1].(int)] + }).(CSIStorageCapacityListOutput) +} + +type CSIStorageCapacityListMapOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityListMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]CSIStorageCapacityList)(nil)) +} + +func (o CSIStorageCapacityListMapOutput) ToCSIStorageCapacityListMapOutput() CSIStorageCapacityListMapOutput { + return o +} + +func (o CSIStorageCapacityListMapOutput) ToCSIStorageCapacityListMapOutputWithContext(ctx context.Context) CSIStorageCapacityListMapOutput { + return o +} + +func (o CSIStorageCapacityListMapOutput) MapIndex(k pulumi.StringInput) CSIStorageCapacityListOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) CSIStorageCapacityList { + return vs[0].(map[string]CSIStorageCapacityList)[vs[1].(string)] + }).(CSIStorageCapacityListOutput) +} + +func init() { + pulumi.RegisterOutputType(CSIStorageCapacityListOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityListPtrOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityListArrayOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityListMapOutput{}) +} diff --git a/sdk/go/kubernetes/storage/v1alpha1/init.go b/sdk/go/kubernetes/storage/v1alpha1/init.go index 1d6a6b881a..5f99538b39 100644 --- a/sdk/go/kubernetes/storage/v1alpha1/init.go +++ b/sdk/go/kubernetes/storage/v1alpha1/init.go @@ -21,6 +21,10 @@ func (m *module) Version() semver.Version { func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { + case "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity": + r, err = NewCSIStorageCapacity(ctx, name, nil, pulumi.URN_(urn)) + case "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList": + r, err = NewCSIStorageCapacityList(ctx, name, nil, pulumi.URN_(urn)) case "kubernetes:storage.k8s.io/v1alpha1:VolumeAttachment": r, err = NewVolumeAttachment(ctx, name, nil, pulumi.URN_(urn)) case "kubernetes:storage.k8s.io/v1alpha1:VolumeAttachmentList": diff --git a/sdk/go/kubernetes/storage/v1alpha1/pulumiTypes.go b/sdk/go/kubernetes/storage/v1alpha1/pulumiTypes.go index 19079f0526..1a94289b05 100644 --- a/sdk/go/kubernetes/storage/v1alpha1/pulumiTypes.go +++ b/sdk/go/kubernetes/storage/v1alpha1/pulumiTypes.go @@ -12,6 +12,290 @@ import ( "github.com/pulumi/pulumi/sdk/v2/go/pulumi" ) +// CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type CSIStorageCapacityType struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity *string `pulumi:"capacity"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize *string `pulumi:"maximumVolumeSize"` + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology *metav1.LabelSelector `pulumi:"nodeTopology"` + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName string `pulumi:"storageClassName"` +} + +// CSIStorageCapacityTypeInput is an input type that accepts CSIStorageCapacityTypeArgs and CSIStorageCapacityTypeOutput values. +// You can construct a concrete instance of `CSIStorageCapacityTypeInput` via: +// +// CSIStorageCapacityTypeArgs{...} +type CSIStorageCapacityTypeInput interface { + pulumi.Input + + ToCSIStorageCapacityTypeOutput() CSIStorageCapacityTypeOutput + ToCSIStorageCapacityTypeOutputWithContext(context.Context) CSIStorageCapacityTypeOutput +} + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type CSIStorageCapacityTypeArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity pulumi.StringPtrInput `pulumi:"capacity"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput `pulumi:"kind"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize pulumi.StringPtrInput `pulumi:"maximumVolumeSize"` + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology metav1.LabelSelectorPtrInput `pulumi:"nodeTopology"` + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName pulumi.StringInput `pulumi:"storageClassName"` +} + +func (CSIStorageCapacityTypeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityType)(nil)).Elem() +} + +func (i CSIStorageCapacityTypeArgs) ToCSIStorageCapacityTypeOutput() CSIStorageCapacityTypeOutput { + return i.ToCSIStorageCapacityTypeOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityTypeArgs) ToCSIStorageCapacityTypeOutputWithContext(ctx context.Context) CSIStorageCapacityTypeOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityTypeOutput) +} + +// CSIStorageCapacityTypeArrayInput is an input type that accepts CSIStorageCapacityTypeArray and CSIStorageCapacityTypeArrayOutput values. +// You can construct a concrete instance of `CSIStorageCapacityTypeArrayInput` via: +// +// CSIStorageCapacityTypeArray{ CSIStorageCapacityTypeArgs{...} } +type CSIStorageCapacityTypeArrayInput interface { + pulumi.Input + + ToCSIStorageCapacityTypeArrayOutput() CSIStorageCapacityTypeArrayOutput + ToCSIStorageCapacityTypeArrayOutputWithContext(context.Context) CSIStorageCapacityTypeArrayOutput +} + +type CSIStorageCapacityTypeArray []CSIStorageCapacityTypeInput + +func (CSIStorageCapacityTypeArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]CSIStorageCapacityType)(nil)).Elem() +} + +func (i CSIStorageCapacityTypeArray) ToCSIStorageCapacityTypeArrayOutput() CSIStorageCapacityTypeArrayOutput { + return i.ToCSIStorageCapacityTypeArrayOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityTypeArray) ToCSIStorageCapacityTypeArrayOutputWithContext(ctx context.Context) CSIStorageCapacityTypeArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityTypeArrayOutput) +} + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type CSIStorageCapacityTypeOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityType)(nil)).Elem() +} + +func (o CSIStorageCapacityTypeOutput) ToCSIStorageCapacityTypeOutput() CSIStorageCapacityTypeOutput { + return o +} + +func (o CSIStorageCapacityTypeOutput) ToCSIStorageCapacityTypeOutputWithContext(ctx context.Context) CSIStorageCapacityTypeOutput { + return o +} + +// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +func (o CSIStorageCapacityTypeOutput) ApiVersion() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) +} + +// Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. +// +// The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. +func (o CSIStorageCapacityTypeOutput) Capacity() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *string { return v.Capacity }).(pulumi.StringPtrOutput) +} + +// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +func (o CSIStorageCapacityTypeOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *string { return v.Kind }).(pulumi.StringPtrOutput) +} + +// MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. +// +// This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. +func (o CSIStorageCapacityTypeOutput) MaximumVolumeSize() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *string { return v.MaximumVolumeSize }).(pulumi.StringPtrOutput) +} + +// Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. +// +// Objects are namespaced. +// +// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o CSIStorageCapacityTypeOutput) Metadata() metav1.ObjectMetaPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput) +} + +// NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. +func (o CSIStorageCapacityTypeOutput) NodeTopology() metav1.LabelSelectorPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *metav1.LabelSelector { return v.NodeTopology }).(metav1.LabelSelectorPtrOutput) +} + +// The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. +func (o CSIStorageCapacityTypeOutput) StorageClassName() pulumi.StringOutput { + return o.ApplyT(func(v CSIStorageCapacityType) string { return v.StorageClassName }).(pulumi.StringOutput) +} + +type CSIStorageCapacityTypeArrayOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityTypeArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]CSIStorageCapacityType)(nil)).Elem() +} + +func (o CSIStorageCapacityTypeArrayOutput) ToCSIStorageCapacityTypeArrayOutput() CSIStorageCapacityTypeArrayOutput { + return o +} + +func (o CSIStorageCapacityTypeArrayOutput) ToCSIStorageCapacityTypeArrayOutputWithContext(ctx context.Context) CSIStorageCapacityTypeArrayOutput { + return o +} + +func (o CSIStorageCapacityTypeArrayOutput) Index(i pulumi.IntInput) CSIStorageCapacityTypeOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) CSIStorageCapacityType { + return vs[0].([]CSIStorageCapacityType)[vs[1].(int)] + }).(CSIStorageCapacityTypeOutput) +} + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type CSIStorageCapacityListType struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Items is the list of CSIStorageCapacity objects. + Items []CSIStorageCapacityType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +// CSIStorageCapacityListTypeInput is an input type that accepts CSIStorageCapacityListTypeArgs and CSIStorageCapacityListTypeOutput values. +// You can construct a concrete instance of `CSIStorageCapacityListTypeInput` via: +// +// CSIStorageCapacityListTypeArgs{...} +type CSIStorageCapacityListTypeInput interface { + pulumi.Input + + ToCSIStorageCapacityListTypeOutput() CSIStorageCapacityListTypeOutput + ToCSIStorageCapacityListTypeOutputWithContext(context.Context) CSIStorageCapacityListTypeOutput +} + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type CSIStorageCapacityListTypeArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` + // Items is the list of CSIStorageCapacity objects. + Items CSIStorageCapacityTypeArrayInput `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput `pulumi:"kind"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput `pulumi:"metadata"` +} + +func (CSIStorageCapacityListTypeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityListType)(nil)).Elem() +} + +func (i CSIStorageCapacityListTypeArgs) ToCSIStorageCapacityListTypeOutput() CSIStorageCapacityListTypeOutput { + return i.ToCSIStorageCapacityListTypeOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityListTypeArgs) ToCSIStorageCapacityListTypeOutputWithContext(ctx context.Context) CSIStorageCapacityListTypeOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListTypeOutput) +} + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type CSIStorageCapacityListTypeOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityListTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityListType)(nil)).Elem() +} + +func (o CSIStorageCapacityListTypeOutput) ToCSIStorageCapacityListTypeOutput() CSIStorageCapacityListTypeOutput { + return o +} + +func (o CSIStorageCapacityListTypeOutput) ToCSIStorageCapacityListTypeOutputWithContext(ctx context.Context) CSIStorageCapacityListTypeOutput { + return o +} + +// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +func (o CSIStorageCapacityListTypeOutput) ApiVersion() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityListType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) +} + +// Items is the list of CSIStorageCapacity objects. +func (o CSIStorageCapacityListTypeOutput) Items() CSIStorageCapacityTypeArrayOutput { + return o.ApplyT(func(v CSIStorageCapacityListType) []CSIStorageCapacityType { return v.Items }).(CSIStorageCapacityTypeArrayOutput) +} + +// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +func (o CSIStorageCapacityListTypeOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityListType) *string { return v.Kind }).(pulumi.StringPtrOutput) +} + +// Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o CSIStorageCapacityListTypeOutput) Metadata() metav1.ListMetaPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityListType) *metav1.ListMeta { return v.Metadata }).(metav1.ListMetaPtrOutput) +} + // VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. // // VolumeAttachment objects are non-namespaced. @@ -906,6 +1190,9 @@ func (o VolumeErrorPtrOutput) Time() pulumi.StringPtrOutput { } func init() { + pulumi.RegisterOutputType(CSIStorageCapacityTypeOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityTypeArrayOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityListTypeOutput{}) pulumi.RegisterOutputType(VolumeAttachmentTypeOutput{}) pulumi.RegisterOutputType(VolumeAttachmentTypeArrayOutput{}) pulumi.RegisterOutputType(VolumeAttachmentListTypeOutput{}) diff --git a/sdk/go/kubernetes/storage/v1beta1/csistorageCapacity.go b/sdk/go/kubernetes/storage/v1beta1/csistorageCapacity.go new file mode 100644 index 0000000000..312c6e5223 --- /dev/null +++ b/sdk/go/kubernetes/storage/v1beta1/csistorageCapacity.go @@ -0,0 +1,384 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1beta1 + +import ( + "context" + "reflect" + + "github.com/pkg/errors" + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type CSIStorageCapacity struct { + pulumi.CustomResourceState + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity pulumi.StringPtrOutput `pulumi:"capacity"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize pulumi.StringPtrOutput `pulumi:"maximumVolumeSize"` + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology metav1.LabelSelectorPtrOutput `pulumi:"nodeTopology"` + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName pulumi.StringOutput `pulumi:"storageClassName"` +} + +// NewCSIStorageCapacity registers a new resource with the given unique name, arguments, and options. +func NewCSIStorageCapacity(ctx *pulumi.Context, + name string, args *CSIStorageCapacityArgs, opts ...pulumi.ResourceOption) (*CSIStorageCapacity, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.StorageClassName == nil { + return nil, errors.New("invalid value for required argument 'StorageClassName'") + } + args.ApiVersion = pulumi.StringPtr("storage.k8s.io/v1beta1") + args.Kind = pulumi.StringPtr("CSIStorageCapacity") + aliases := pulumi.Aliases([]pulumi.Alias{ + { + Type: pulumi.String("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity"), + }, + }) + opts = append(opts, aliases) + var resource CSIStorageCapacity + err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetCSIStorageCapacity gets an existing CSIStorageCapacity resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetCSIStorageCapacity(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *CSIStorageCapacityState, opts ...pulumi.ResourceOption) (*CSIStorageCapacity, error) { + var resource CSIStorageCapacity + err := ctx.ReadResource("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering CSIStorageCapacity resources. +type csistorageCapacityState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity *string `pulumi:"capacity"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize *string `pulumi:"maximumVolumeSize"` + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology *metav1.LabelSelector `pulumi:"nodeTopology"` + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName *string `pulumi:"storageClassName"` +} + +type CSIStorageCapacityState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity pulumi.StringPtrInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize pulumi.StringPtrInput + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology metav1.LabelSelectorPtrInput + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName pulumi.StringPtrInput +} + +func (CSIStorageCapacityState) ElementType() reflect.Type { + return reflect.TypeOf((*csistorageCapacityState)(nil)).Elem() +} + +type csistorageCapacityArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity *string `pulumi:"capacity"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize *string `pulumi:"maximumVolumeSize"` + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology *metav1.LabelSelector `pulumi:"nodeTopology"` + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName string `pulumi:"storageClassName"` +} + +// The set of arguments for constructing a CSIStorageCapacity resource. +type CSIStorageCapacityArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity pulumi.StringPtrInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize pulumi.StringPtrInput + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology metav1.LabelSelectorPtrInput + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName pulumi.StringInput +} + +func (CSIStorageCapacityArgs) ElementType() reflect.Type { + return reflect.TypeOf((*csistorageCapacityArgs)(nil)).Elem() +} + +type CSIStorageCapacityInput interface { + pulumi.Input + + ToCSIStorageCapacityOutput() CSIStorageCapacityOutput + ToCSIStorageCapacityOutputWithContext(ctx context.Context) CSIStorageCapacityOutput +} + +func (*CSIStorageCapacity) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacity)(nil)) +} + +func (i *CSIStorageCapacity) ToCSIStorageCapacityOutput() CSIStorageCapacityOutput { + return i.ToCSIStorageCapacityOutputWithContext(context.Background()) +} + +func (i *CSIStorageCapacity) ToCSIStorageCapacityOutputWithContext(ctx context.Context) CSIStorageCapacityOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityOutput) +} + +func (i *CSIStorageCapacity) ToCSIStorageCapacityPtrOutput() CSIStorageCapacityPtrOutput { + return i.ToCSIStorageCapacityPtrOutputWithContext(context.Background()) +} + +func (i *CSIStorageCapacity) ToCSIStorageCapacityPtrOutputWithContext(ctx context.Context) CSIStorageCapacityPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityPtrOutput) +} + +type CSIStorageCapacityPtrInput interface { + pulumi.Input + + ToCSIStorageCapacityPtrOutput() CSIStorageCapacityPtrOutput + ToCSIStorageCapacityPtrOutputWithContext(ctx context.Context) CSIStorageCapacityPtrOutput +} + +type csistorageCapacityPtrType CSIStorageCapacityArgs + +func (*csistorageCapacityPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CSIStorageCapacity)(nil)) +} + +func (i *csistorageCapacityPtrType) ToCSIStorageCapacityPtrOutput() CSIStorageCapacityPtrOutput { + return i.ToCSIStorageCapacityPtrOutputWithContext(context.Background()) +} + +func (i *csistorageCapacityPtrType) ToCSIStorageCapacityPtrOutputWithContext(ctx context.Context) CSIStorageCapacityPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityPtrOutput) +} + +// CSIStorageCapacityArrayInput is an input type that accepts CSIStorageCapacityArray and CSIStorageCapacityArrayOutput values. +// You can construct a concrete instance of `CSIStorageCapacityArrayInput` via: +// +// CSIStorageCapacityArray{ CSIStorageCapacityArgs{...} } +type CSIStorageCapacityArrayInput interface { + pulumi.Input + + ToCSIStorageCapacityArrayOutput() CSIStorageCapacityArrayOutput + ToCSIStorageCapacityArrayOutputWithContext(context.Context) CSIStorageCapacityArrayOutput +} + +type CSIStorageCapacityArray []CSIStorageCapacityInput + +func (CSIStorageCapacityArray) ElementType() reflect.Type { + return reflect.TypeOf(([]*CSIStorageCapacity)(nil)) +} + +func (i CSIStorageCapacityArray) ToCSIStorageCapacityArrayOutput() CSIStorageCapacityArrayOutput { + return i.ToCSIStorageCapacityArrayOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityArray) ToCSIStorageCapacityArrayOutputWithContext(ctx context.Context) CSIStorageCapacityArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityArrayOutput) +} + +// CSIStorageCapacityMapInput is an input type that accepts CSIStorageCapacityMap and CSIStorageCapacityMapOutput values. +// You can construct a concrete instance of `CSIStorageCapacityMapInput` via: +// +// CSIStorageCapacityMap{ "key": CSIStorageCapacityArgs{...} } +type CSIStorageCapacityMapInput interface { + pulumi.Input + + ToCSIStorageCapacityMapOutput() CSIStorageCapacityMapOutput + ToCSIStorageCapacityMapOutputWithContext(context.Context) CSIStorageCapacityMapOutput +} + +type CSIStorageCapacityMap map[string]CSIStorageCapacityInput + +func (CSIStorageCapacityMap) ElementType() reflect.Type { + return reflect.TypeOf((map[string]*CSIStorageCapacity)(nil)) +} + +func (i CSIStorageCapacityMap) ToCSIStorageCapacityMapOutput() CSIStorageCapacityMapOutput { + return i.ToCSIStorageCapacityMapOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityMap) ToCSIStorageCapacityMapOutputWithContext(ctx context.Context) CSIStorageCapacityMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityMapOutput) +} + +type CSIStorageCapacityOutput struct { + *pulumi.OutputState +} + +func (CSIStorageCapacityOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacity)(nil)) +} + +func (o CSIStorageCapacityOutput) ToCSIStorageCapacityOutput() CSIStorageCapacityOutput { + return o +} + +func (o CSIStorageCapacityOutput) ToCSIStorageCapacityOutputWithContext(ctx context.Context) CSIStorageCapacityOutput { + return o +} + +func (o CSIStorageCapacityOutput) ToCSIStorageCapacityPtrOutput() CSIStorageCapacityPtrOutput { + return o.ToCSIStorageCapacityPtrOutputWithContext(context.Background()) +} + +func (o CSIStorageCapacityOutput) ToCSIStorageCapacityPtrOutputWithContext(ctx context.Context) CSIStorageCapacityPtrOutput { + return o.ApplyT(func(v CSIStorageCapacity) *CSIStorageCapacity { + return &v + }).(CSIStorageCapacityPtrOutput) +} + +type CSIStorageCapacityPtrOutput struct { + *pulumi.OutputState +} + +func (CSIStorageCapacityPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CSIStorageCapacity)(nil)) +} + +func (o CSIStorageCapacityPtrOutput) ToCSIStorageCapacityPtrOutput() CSIStorageCapacityPtrOutput { + return o +} + +func (o CSIStorageCapacityPtrOutput) ToCSIStorageCapacityPtrOutputWithContext(ctx context.Context) CSIStorageCapacityPtrOutput { + return o +} + +type CSIStorageCapacityArrayOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]CSIStorageCapacity)(nil)) +} + +func (o CSIStorageCapacityArrayOutput) ToCSIStorageCapacityArrayOutput() CSIStorageCapacityArrayOutput { + return o +} + +func (o CSIStorageCapacityArrayOutput) ToCSIStorageCapacityArrayOutputWithContext(ctx context.Context) CSIStorageCapacityArrayOutput { + return o +} + +func (o CSIStorageCapacityArrayOutput) Index(i pulumi.IntInput) CSIStorageCapacityOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) CSIStorageCapacity { + return vs[0].([]CSIStorageCapacity)[vs[1].(int)] + }).(CSIStorageCapacityOutput) +} + +type CSIStorageCapacityMapOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]CSIStorageCapacity)(nil)) +} + +func (o CSIStorageCapacityMapOutput) ToCSIStorageCapacityMapOutput() CSIStorageCapacityMapOutput { + return o +} + +func (o CSIStorageCapacityMapOutput) ToCSIStorageCapacityMapOutputWithContext(ctx context.Context) CSIStorageCapacityMapOutput { + return o +} + +func (o CSIStorageCapacityMapOutput) MapIndex(k pulumi.StringInput) CSIStorageCapacityOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) CSIStorageCapacity { + return vs[0].(map[string]CSIStorageCapacity)[vs[1].(string)] + }).(CSIStorageCapacityOutput) +} + +func init() { + pulumi.RegisterOutputType(CSIStorageCapacityOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityPtrOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityArrayOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityMapOutput{}) +} diff --git a/sdk/go/kubernetes/storage/v1beta1/csistorageCapacityList.go b/sdk/go/kubernetes/storage/v1beta1/csistorageCapacityList.go new file mode 100644 index 0000000000..9beefdc682 --- /dev/null +++ b/sdk/go/kubernetes/storage/v1beta1/csistorageCapacityList.go @@ -0,0 +1,300 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package v1beta1 + +import ( + "context" + "reflect" + + "github.com/pkg/errors" + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v2/go/pulumi" +) + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type CSIStorageCapacityList struct { + pulumi.CustomResourceState + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` + // Items is the list of CSIStorageCapacity objects. + Items CSIStorageCapacityTypeArrayOutput `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrOutput `pulumi:"kind"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrOutput `pulumi:"metadata"` +} + +// NewCSIStorageCapacityList registers a new resource with the given unique name, arguments, and options. +func NewCSIStorageCapacityList(ctx *pulumi.Context, + name string, args *CSIStorageCapacityListArgs, opts ...pulumi.ResourceOption) (*CSIStorageCapacityList, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Items == nil { + return nil, errors.New("invalid value for required argument 'Items'") + } + args.ApiVersion = pulumi.StringPtr("storage.k8s.io/v1beta1") + args.Kind = pulumi.StringPtr("CSIStorageCapacityList") + var resource CSIStorageCapacityList + err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetCSIStorageCapacityList gets an existing CSIStorageCapacityList resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetCSIStorageCapacityList(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *CSIStorageCapacityListState, opts ...pulumi.ResourceOption) (*CSIStorageCapacityList, error) { + var resource CSIStorageCapacityList + err := ctx.ReadResource("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering CSIStorageCapacityList resources. +type csistorageCapacityListState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Items is the list of CSIStorageCapacity objects. + Items []CSIStorageCapacityType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +type CSIStorageCapacityListState struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Items is the list of CSIStorageCapacity objects. + Items CSIStorageCapacityTypeArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput +} + +func (CSIStorageCapacityListState) ElementType() reflect.Type { + return reflect.TypeOf((*csistorageCapacityListState)(nil)).Elem() +} + +type csistorageCapacityListArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Items is the list of CSIStorageCapacity objects. + Items []CSIStorageCapacityType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +// The set of arguments for constructing a CSIStorageCapacityList resource. +type CSIStorageCapacityListArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput + // Items is the list of CSIStorageCapacity objects. + Items CSIStorageCapacityTypeArrayInput + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput +} + +func (CSIStorageCapacityListArgs) ElementType() reflect.Type { + return reflect.TypeOf((*csistorageCapacityListArgs)(nil)).Elem() +} + +type CSIStorageCapacityListInput interface { + pulumi.Input + + ToCSIStorageCapacityListOutput() CSIStorageCapacityListOutput + ToCSIStorageCapacityListOutputWithContext(ctx context.Context) CSIStorageCapacityListOutput +} + +func (*CSIStorageCapacityList) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityList)(nil)) +} + +func (i *CSIStorageCapacityList) ToCSIStorageCapacityListOutput() CSIStorageCapacityListOutput { + return i.ToCSIStorageCapacityListOutputWithContext(context.Background()) +} + +func (i *CSIStorageCapacityList) ToCSIStorageCapacityListOutputWithContext(ctx context.Context) CSIStorageCapacityListOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListOutput) +} + +func (i *CSIStorageCapacityList) ToCSIStorageCapacityListPtrOutput() CSIStorageCapacityListPtrOutput { + return i.ToCSIStorageCapacityListPtrOutputWithContext(context.Background()) +} + +func (i *CSIStorageCapacityList) ToCSIStorageCapacityListPtrOutputWithContext(ctx context.Context) CSIStorageCapacityListPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListPtrOutput) +} + +type CSIStorageCapacityListPtrInput interface { + pulumi.Input + + ToCSIStorageCapacityListPtrOutput() CSIStorageCapacityListPtrOutput + ToCSIStorageCapacityListPtrOutputWithContext(ctx context.Context) CSIStorageCapacityListPtrOutput +} + +type csistorageCapacityListPtrType CSIStorageCapacityListArgs + +func (*csistorageCapacityListPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CSIStorageCapacityList)(nil)) +} + +func (i *csistorageCapacityListPtrType) ToCSIStorageCapacityListPtrOutput() CSIStorageCapacityListPtrOutput { + return i.ToCSIStorageCapacityListPtrOutputWithContext(context.Background()) +} + +func (i *csistorageCapacityListPtrType) ToCSIStorageCapacityListPtrOutputWithContext(ctx context.Context) CSIStorageCapacityListPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListPtrOutput) +} + +// CSIStorageCapacityListArrayInput is an input type that accepts CSIStorageCapacityListArray and CSIStorageCapacityListArrayOutput values. +// You can construct a concrete instance of `CSIStorageCapacityListArrayInput` via: +// +// CSIStorageCapacityListArray{ CSIStorageCapacityListArgs{...} } +type CSIStorageCapacityListArrayInput interface { + pulumi.Input + + ToCSIStorageCapacityListArrayOutput() CSIStorageCapacityListArrayOutput + ToCSIStorageCapacityListArrayOutputWithContext(context.Context) CSIStorageCapacityListArrayOutput +} + +type CSIStorageCapacityListArray []CSIStorageCapacityListInput + +func (CSIStorageCapacityListArray) ElementType() reflect.Type { + return reflect.TypeOf(([]*CSIStorageCapacityList)(nil)) +} + +func (i CSIStorageCapacityListArray) ToCSIStorageCapacityListArrayOutput() CSIStorageCapacityListArrayOutput { + return i.ToCSIStorageCapacityListArrayOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityListArray) ToCSIStorageCapacityListArrayOutputWithContext(ctx context.Context) CSIStorageCapacityListArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListArrayOutput) +} + +// CSIStorageCapacityListMapInput is an input type that accepts CSIStorageCapacityListMap and CSIStorageCapacityListMapOutput values. +// You can construct a concrete instance of `CSIStorageCapacityListMapInput` via: +// +// CSIStorageCapacityListMap{ "key": CSIStorageCapacityListArgs{...} } +type CSIStorageCapacityListMapInput interface { + pulumi.Input + + ToCSIStorageCapacityListMapOutput() CSIStorageCapacityListMapOutput + ToCSIStorageCapacityListMapOutputWithContext(context.Context) CSIStorageCapacityListMapOutput +} + +type CSIStorageCapacityListMap map[string]CSIStorageCapacityListInput + +func (CSIStorageCapacityListMap) ElementType() reflect.Type { + return reflect.TypeOf((map[string]*CSIStorageCapacityList)(nil)) +} + +func (i CSIStorageCapacityListMap) ToCSIStorageCapacityListMapOutput() CSIStorageCapacityListMapOutput { + return i.ToCSIStorageCapacityListMapOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityListMap) ToCSIStorageCapacityListMapOutputWithContext(ctx context.Context) CSIStorageCapacityListMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListMapOutput) +} + +type CSIStorageCapacityListOutput struct { + *pulumi.OutputState +} + +func (CSIStorageCapacityListOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityList)(nil)) +} + +func (o CSIStorageCapacityListOutput) ToCSIStorageCapacityListOutput() CSIStorageCapacityListOutput { + return o +} + +func (o CSIStorageCapacityListOutput) ToCSIStorageCapacityListOutputWithContext(ctx context.Context) CSIStorageCapacityListOutput { + return o +} + +func (o CSIStorageCapacityListOutput) ToCSIStorageCapacityListPtrOutput() CSIStorageCapacityListPtrOutput { + return o.ToCSIStorageCapacityListPtrOutputWithContext(context.Background()) +} + +func (o CSIStorageCapacityListOutput) ToCSIStorageCapacityListPtrOutputWithContext(ctx context.Context) CSIStorageCapacityListPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityList) *CSIStorageCapacityList { + return &v + }).(CSIStorageCapacityListPtrOutput) +} + +type CSIStorageCapacityListPtrOutput struct { + *pulumi.OutputState +} + +func (CSIStorageCapacityListPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CSIStorageCapacityList)(nil)) +} + +func (o CSIStorageCapacityListPtrOutput) ToCSIStorageCapacityListPtrOutput() CSIStorageCapacityListPtrOutput { + return o +} + +func (o CSIStorageCapacityListPtrOutput) ToCSIStorageCapacityListPtrOutputWithContext(ctx context.Context) CSIStorageCapacityListPtrOutput { + return o +} + +type CSIStorageCapacityListArrayOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityListArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]CSIStorageCapacityList)(nil)) +} + +func (o CSIStorageCapacityListArrayOutput) ToCSIStorageCapacityListArrayOutput() CSIStorageCapacityListArrayOutput { + return o +} + +func (o CSIStorageCapacityListArrayOutput) ToCSIStorageCapacityListArrayOutputWithContext(ctx context.Context) CSIStorageCapacityListArrayOutput { + return o +} + +func (o CSIStorageCapacityListArrayOutput) Index(i pulumi.IntInput) CSIStorageCapacityListOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) CSIStorageCapacityList { + return vs[0].([]CSIStorageCapacityList)[vs[1].(int)] + }).(CSIStorageCapacityListOutput) +} + +type CSIStorageCapacityListMapOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityListMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]CSIStorageCapacityList)(nil)) +} + +func (o CSIStorageCapacityListMapOutput) ToCSIStorageCapacityListMapOutput() CSIStorageCapacityListMapOutput { + return o +} + +func (o CSIStorageCapacityListMapOutput) ToCSIStorageCapacityListMapOutputWithContext(ctx context.Context) CSIStorageCapacityListMapOutput { + return o +} + +func (o CSIStorageCapacityListMapOutput) MapIndex(k pulumi.StringInput) CSIStorageCapacityListOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) CSIStorageCapacityList { + return vs[0].(map[string]CSIStorageCapacityList)[vs[1].(string)] + }).(CSIStorageCapacityListOutput) +} + +func init() { + pulumi.RegisterOutputType(CSIStorageCapacityListOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityListPtrOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityListArrayOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityListMapOutput{}) +} diff --git a/sdk/go/kubernetes/storage/v1beta1/init.go b/sdk/go/kubernetes/storage/v1beta1/init.go index bedc24f10c..8959586c5c 100644 --- a/sdk/go/kubernetes/storage/v1beta1/init.go +++ b/sdk/go/kubernetes/storage/v1beta1/init.go @@ -29,6 +29,10 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r, err = NewCSINode(ctx, name, nil, pulumi.URN_(urn)) case "kubernetes:storage.k8s.io/v1beta1:CSINodeList": r, err = NewCSINodeList(ctx, name, nil, pulumi.URN_(urn)) + case "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity": + r, err = NewCSIStorageCapacity(ctx, name, nil, pulumi.URN_(urn)) + case "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList": + r, err = NewCSIStorageCapacityList(ctx, name, nil, pulumi.URN_(urn)) case "kubernetes:storage.k8s.io/v1beta1:StorageClass": r, err = NewStorageClass(ctx, name, nil, pulumi.URN_(urn)) case "kubernetes:storage.k8s.io/v1beta1:StorageClassList": diff --git a/sdk/go/kubernetes/storage/v1beta1/pulumiTypes.go b/sdk/go/kubernetes/storage/v1beta1/pulumiTypes.go index 39587460ea..050f876468 100644 --- a/sdk/go/kubernetes/storage/v1beta1/pulumiTypes.go +++ b/sdk/go/kubernetes/storage/v1beta1/pulumiTypes.go @@ -224,19 +224,25 @@ func (o CSIDriverListTypeOutput) Metadata() metav1.ListMetaPtrOutput { // CSIDriverSpec is the specification of a CSIDriver. type CSIDriverSpec struct { // attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + // + // This field is immutable. AttachRequired *bool `pulumi:"attachRequired"` // Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + // + // This field is immutable. FsGroupPolicy *string `pulumi:"fsGroupPolicy"` - // If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + // If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume // defined by a CSIVolumeSource, otherwise "false" // // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + // + // This field is immutable. PodInfoOnMount *bool `pulumi:"podInfoOnMount"` // RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false. // // Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. // - // This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + // This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. RequiresRepublish *bool `pulumi:"requiresRepublish"` // If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information. // @@ -244,7 +250,9 @@ type CSIDriverSpec struct { // // Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. // - // This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + // This field is immutable. + // + // This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. StorageCapacity *bool `pulumi:"storageCapacity"` // TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: "csi.storage.k8s.io/serviceAccount.tokens": { // "": { @@ -256,9 +264,11 @@ type CSIDriverSpec struct { // // Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. // - // This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + // This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. TokenRequests []TokenRequest `pulumi:"tokenRequests"` // VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. + // + // This field is immutable. VolumeLifecycleModes []string `pulumi:"volumeLifecycleModes"` } @@ -276,19 +286,25 @@ type CSIDriverSpecInput interface { // CSIDriverSpec is the specification of a CSIDriver. type CSIDriverSpecArgs struct { // attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + // + // This field is immutable. AttachRequired pulumi.BoolPtrInput `pulumi:"attachRequired"` // Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + // + // This field is immutable. FsGroupPolicy pulumi.StringPtrInput `pulumi:"fsGroupPolicy"` - // If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + // If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume // defined by a CSIVolumeSource, otherwise "false" // // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + // + // This field is immutable. PodInfoOnMount pulumi.BoolPtrInput `pulumi:"podInfoOnMount"` // RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false. // // Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. // - // This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + // This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. RequiresRepublish pulumi.BoolPtrInput `pulumi:"requiresRepublish"` // If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information. // @@ -296,7 +312,9 @@ type CSIDriverSpecArgs struct { // // Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. // - // This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + // This field is immutable. + // + // This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. StorageCapacity pulumi.BoolPtrInput `pulumi:"storageCapacity"` // TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: "csi.storage.k8s.io/serviceAccount.tokens": { // "": { @@ -308,9 +326,11 @@ type CSIDriverSpecArgs struct { // // Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. // - // This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + // This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. TokenRequests TokenRequestArrayInput `pulumi:"tokenRequests"` // VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. + // + // This field is immutable. VolumeLifecycleModes pulumi.StringArrayInput `pulumi:"volumeLifecycleModes"` } @@ -393,19 +413,25 @@ func (o CSIDriverSpecOutput) ToCSIDriverSpecPtrOutputWithContext(ctx context.Con } // attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. +// +// This field is immutable. func (o CSIDriverSpecOutput) AttachRequired() pulumi.BoolPtrOutput { return o.ApplyT(func(v CSIDriverSpec) *bool { return v.AttachRequired }).(pulumi.BoolPtrOutput) } // Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. +// +// This field is immutable. func (o CSIDriverSpecOutput) FsGroupPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v CSIDriverSpec) *string { return v.FsGroupPolicy }).(pulumi.StringPtrOutput) } -// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume +// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume // defined by a CSIVolumeSource, otherwise "false" // // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. +// +// This field is immutable. func (o CSIDriverSpecOutput) PodInfoOnMount() pulumi.BoolPtrOutput { return o.ApplyT(func(v CSIDriverSpec) *bool { return v.PodInfoOnMount }).(pulumi.BoolPtrOutput) } @@ -414,7 +440,7 @@ func (o CSIDriverSpecOutput) PodInfoOnMount() pulumi.BoolPtrOutput { // // Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. // -// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. +// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. func (o CSIDriverSpecOutput) RequiresRepublish() pulumi.BoolPtrOutput { return o.ApplyT(func(v CSIDriverSpec) *bool { return v.RequiresRepublish }).(pulumi.BoolPtrOutput) } @@ -425,7 +451,9 @@ func (o CSIDriverSpecOutput) RequiresRepublish() pulumi.BoolPtrOutput { // // Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. // -// This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. +// This field is immutable. +// +// This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. func (o CSIDriverSpecOutput) StorageCapacity() pulumi.BoolPtrOutput { return o.ApplyT(func(v CSIDriverSpec) *bool { return v.StorageCapacity }).(pulumi.BoolPtrOutput) } @@ -440,12 +468,14 @@ func (o CSIDriverSpecOutput) StorageCapacity() pulumi.BoolPtrOutput { // // Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. // -// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. +// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. func (o CSIDriverSpecOutput) TokenRequests() TokenRequestArrayOutput { return o.ApplyT(func(v CSIDriverSpec) []TokenRequest { return v.TokenRequests }).(TokenRequestArrayOutput) } // VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. +// +// This field is immutable. func (o CSIDriverSpecOutput) VolumeLifecycleModes() pulumi.StringArrayOutput { return o.ApplyT(func(v CSIDriverSpec) []string { return v.VolumeLifecycleModes }).(pulumi.StringArrayOutput) } @@ -469,6 +499,8 @@ func (o CSIDriverSpecPtrOutput) Elem() CSIDriverSpecOutput { } // attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. +// +// This field is immutable. func (o CSIDriverSpecPtrOutput) AttachRequired() pulumi.BoolPtrOutput { return o.ApplyT(func(v *CSIDriverSpec) *bool { if v == nil { @@ -479,6 +511,8 @@ func (o CSIDriverSpecPtrOutput) AttachRequired() pulumi.BoolPtrOutput { } // Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. +// +// This field is immutable. func (o CSIDriverSpecPtrOutput) FsGroupPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v *CSIDriverSpec) *string { if v == nil { @@ -488,10 +522,12 @@ func (o CSIDriverSpecPtrOutput) FsGroupPolicy() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } -// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume +// If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume // defined by a CSIVolumeSource, otherwise "false" // // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. +// +// This field is immutable. func (o CSIDriverSpecPtrOutput) PodInfoOnMount() pulumi.BoolPtrOutput { return o.ApplyT(func(v *CSIDriverSpec) *bool { if v == nil { @@ -505,7 +541,7 @@ func (o CSIDriverSpecPtrOutput) PodInfoOnMount() pulumi.BoolPtrOutput { // // Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. // -// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. +// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. func (o CSIDriverSpecPtrOutput) RequiresRepublish() pulumi.BoolPtrOutput { return o.ApplyT(func(v *CSIDriverSpec) *bool { if v == nil { @@ -521,7 +557,9 @@ func (o CSIDriverSpecPtrOutput) RequiresRepublish() pulumi.BoolPtrOutput { // // Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. // -// This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. +// This field is immutable. +// +// This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. func (o CSIDriverSpecPtrOutput) StorageCapacity() pulumi.BoolPtrOutput { return o.ApplyT(func(v *CSIDriverSpec) *bool { if v == nil { @@ -541,7 +579,7 @@ func (o CSIDriverSpecPtrOutput) StorageCapacity() pulumi.BoolPtrOutput { // // Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. // -// This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. +// This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. func (o CSIDriverSpecPtrOutput) TokenRequests() TokenRequestArrayOutput { return o.ApplyT(func(v *CSIDriverSpec) []TokenRequest { if v == nil { @@ -552,6 +590,8 @@ func (o CSIDriverSpecPtrOutput) TokenRequests() TokenRequestArrayOutput { } // VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. +// +// This field is immutable. func (o CSIDriverSpecPtrOutput) VolumeLifecycleModes() pulumi.StringArrayOutput { return o.ApplyT(func(v *CSIDriverSpec) []string { if v == nil { @@ -1031,6 +1071,290 @@ func (o CSINodeSpecPtrOutput) Drivers() CSINodeDriverArrayOutput { }).(CSINodeDriverArrayOutput) } +// CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type CSIStorageCapacityType struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity *string `pulumi:"capacity"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize *string `pulumi:"maximumVolumeSize"` + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ObjectMeta `pulumi:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology *metav1.LabelSelector `pulumi:"nodeTopology"` + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName string `pulumi:"storageClassName"` +} + +// CSIStorageCapacityTypeInput is an input type that accepts CSIStorageCapacityTypeArgs and CSIStorageCapacityTypeOutput values. +// You can construct a concrete instance of `CSIStorageCapacityTypeInput` via: +// +// CSIStorageCapacityTypeArgs{...} +type CSIStorageCapacityTypeInput interface { + pulumi.Input + + ToCSIStorageCapacityTypeOutput() CSIStorageCapacityTypeOutput + ToCSIStorageCapacityTypeOutputWithContext(context.Context) CSIStorageCapacityTypeOutput +} + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type CSIStorageCapacityTypeArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity pulumi.StringPtrInput `pulumi:"capacity"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput `pulumi:"kind"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize pulumi.StringPtrInput `pulumi:"maximumVolumeSize"` + // Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ObjectMetaPtrInput `pulumi:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology metav1.LabelSelectorPtrInput `pulumi:"nodeTopology"` + // The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName pulumi.StringInput `pulumi:"storageClassName"` +} + +func (CSIStorageCapacityTypeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityType)(nil)).Elem() +} + +func (i CSIStorageCapacityTypeArgs) ToCSIStorageCapacityTypeOutput() CSIStorageCapacityTypeOutput { + return i.ToCSIStorageCapacityTypeOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityTypeArgs) ToCSIStorageCapacityTypeOutputWithContext(ctx context.Context) CSIStorageCapacityTypeOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityTypeOutput) +} + +// CSIStorageCapacityTypeArrayInput is an input type that accepts CSIStorageCapacityTypeArray and CSIStorageCapacityTypeArrayOutput values. +// You can construct a concrete instance of `CSIStorageCapacityTypeArrayInput` via: +// +// CSIStorageCapacityTypeArray{ CSIStorageCapacityTypeArgs{...} } +type CSIStorageCapacityTypeArrayInput interface { + pulumi.Input + + ToCSIStorageCapacityTypeArrayOutput() CSIStorageCapacityTypeArrayOutput + ToCSIStorageCapacityTypeArrayOutputWithContext(context.Context) CSIStorageCapacityTypeArrayOutput +} + +type CSIStorageCapacityTypeArray []CSIStorageCapacityTypeInput + +func (CSIStorageCapacityTypeArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]CSIStorageCapacityType)(nil)).Elem() +} + +func (i CSIStorageCapacityTypeArray) ToCSIStorageCapacityTypeArrayOutput() CSIStorageCapacityTypeArrayOutput { + return i.ToCSIStorageCapacityTypeArrayOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityTypeArray) ToCSIStorageCapacityTypeArrayOutputWithContext(ctx context.Context) CSIStorageCapacityTypeArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityTypeArrayOutput) +} + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type CSIStorageCapacityTypeOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityType)(nil)).Elem() +} + +func (o CSIStorageCapacityTypeOutput) ToCSIStorageCapacityTypeOutput() CSIStorageCapacityTypeOutput { + return o +} + +func (o CSIStorageCapacityTypeOutput) ToCSIStorageCapacityTypeOutputWithContext(ctx context.Context) CSIStorageCapacityTypeOutput { + return o +} + +// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +func (o CSIStorageCapacityTypeOutput) ApiVersion() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) +} + +// Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. +// +// The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. +func (o CSIStorageCapacityTypeOutput) Capacity() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *string { return v.Capacity }).(pulumi.StringPtrOutput) +} + +// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +func (o CSIStorageCapacityTypeOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *string { return v.Kind }).(pulumi.StringPtrOutput) +} + +// MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. +// +// This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. +func (o CSIStorageCapacityTypeOutput) MaximumVolumeSize() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *string { return v.MaximumVolumeSize }).(pulumi.StringPtrOutput) +} + +// Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. +// +// Objects are namespaced. +// +// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o CSIStorageCapacityTypeOutput) Metadata() metav1.ObjectMetaPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *metav1.ObjectMeta { return v.Metadata }).(metav1.ObjectMetaPtrOutput) +} + +// NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. +func (o CSIStorageCapacityTypeOutput) NodeTopology() metav1.LabelSelectorPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityType) *metav1.LabelSelector { return v.NodeTopology }).(metav1.LabelSelectorPtrOutput) +} + +// The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. +func (o CSIStorageCapacityTypeOutput) StorageClassName() pulumi.StringOutput { + return o.ApplyT(func(v CSIStorageCapacityType) string { return v.StorageClassName }).(pulumi.StringOutput) +} + +type CSIStorageCapacityTypeArrayOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityTypeArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]CSIStorageCapacityType)(nil)).Elem() +} + +func (o CSIStorageCapacityTypeArrayOutput) ToCSIStorageCapacityTypeArrayOutput() CSIStorageCapacityTypeArrayOutput { + return o +} + +func (o CSIStorageCapacityTypeArrayOutput) ToCSIStorageCapacityTypeArrayOutputWithContext(ctx context.Context) CSIStorageCapacityTypeArrayOutput { + return o +} + +func (o CSIStorageCapacityTypeArrayOutput) Index(i pulumi.IntInput) CSIStorageCapacityTypeOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) CSIStorageCapacityType { + return vs[0].([]CSIStorageCapacityType)[vs[1].(int)] + }).(CSIStorageCapacityTypeOutput) +} + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type CSIStorageCapacityListType struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `pulumi:"apiVersion"` + // Items is the list of CSIStorageCapacity objects. + Items []CSIStorageCapacityType `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `pulumi:"kind"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *metav1.ListMeta `pulumi:"metadata"` +} + +// CSIStorageCapacityListTypeInput is an input type that accepts CSIStorageCapacityListTypeArgs and CSIStorageCapacityListTypeOutput values. +// You can construct a concrete instance of `CSIStorageCapacityListTypeInput` via: +// +// CSIStorageCapacityListTypeArgs{...} +type CSIStorageCapacityListTypeInput interface { + pulumi.Input + + ToCSIStorageCapacityListTypeOutput() CSIStorageCapacityListTypeOutput + ToCSIStorageCapacityListTypeOutputWithContext(context.Context) CSIStorageCapacityListTypeOutput +} + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type CSIStorageCapacityListTypeArgs struct { + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion pulumi.StringPtrInput `pulumi:"apiVersion"` + // Items is the list of CSIStorageCapacity objects. + Items CSIStorageCapacityTypeArrayInput `pulumi:"items"` + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind pulumi.StringPtrInput `pulumi:"kind"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata metav1.ListMetaPtrInput `pulumi:"metadata"` +} + +func (CSIStorageCapacityListTypeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityListType)(nil)).Elem() +} + +func (i CSIStorageCapacityListTypeArgs) ToCSIStorageCapacityListTypeOutput() CSIStorageCapacityListTypeOutput { + return i.ToCSIStorageCapacityListTypeOutputWithContext(context.Background()) +} + +func (i CSIStorageCapacityListTypeArgs) ToCSIStorageCapacityListTypeOutputWithContext(ctx context.Context) CSIStorageCapacityListTypeOutput { + return pulumi.ToOutputWithContext(ctx, i).(CSIStorageCapacityListTypeOutput) +} + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type CSIStorageCapacityListTypeOutput struct{ *pulumi.OutputState } + +func (CSIStorageCapacityListTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CSIStorageCapacityListType)(nil)).Elem() +} + +func (o CSIStorageCapacityListTypeOutput) ToCSIStorageCapacityListTypeOutput() CSIStorageCapacityListTypeOutput { + return o +} + +func (o CSIStorageCapacityListTypeOutput) ToCSIStorageCapacityListTypeOutputWithContext(ctx context.Context) CSIStorageCapacityListTypeOutput { + return o +} + +// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +func (o CSIStorageCapacityListTypeOutput) ApiVersion() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityListType) *string { return v.ApiVersion }).(pulumi.StringPtrOutput) +} + +// Items is the list of CSIStorageCapacity objects. +func (o CSIStorageCapacityListTypeOutput) Items() CSIStorageCapacityTypeArrayOutput { + return o.ApplyT(func(v CSIStorageCapacityListType) []CSIStorageCapacityType { return v.Items }).(CSIStorageCapacityTypeArrayOutput) +} + +// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +func (o CSIStorageCapacityListTypeOutput) Kind() pulumi.StringPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityListType) *string { return v.Kind }).(pulumi.StringPtrOutput) +} + +// Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +func (o CSIStorageCapacityListTypeOutput) Metadata() metav1.ListMetaPtrOutput { + return o.ApplyT(func(v CSIStorageCapacityListType) *metav1.ListMeta { return v.Metadata }).(metav1.ListMetaPtrOutput) +} + // StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. // // StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name. @@ -1635,7 +1959,7 @@ func (o VolumeAttachmentListTypeOutput) Metadata() metav1.ListMetaPtrOutput { // VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. type VolumeAttachmentSource struct { - // inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + // inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. InlineVolumeSpec *corev1.PersistentVolumeSpec `pulumi:"inlineVolumeSpec"` // Name of the persistent volume to attach. PersistentVolumeName *string `pulumi:"persistentVolumeName"` @@ -1654,7 +1978,7 @@ type VolumeAttachmentSourceInput interface { // VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. type VolumeAttachmentSourceArgs struct { - // inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + // inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. InlineVolumeSpec corev1.PersistentVolumeSpecPtrInput `pulumi:"inlineVolumeSpec"` // Name of the persistent volume to attach. PersistentVolumeName pulumi.StringPtrInput `pulumi:"persistentVolumeName"` @@ -1738,7 +2062,7 @@ func (o VolumeAttachmentSourceOutput) ToVolumeAttachmentSourcePtrOutputWithConte }).(VolumeAttachmentSourcePtrOutput) } -// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. +// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. func (o VolumeAttachmentSourceOutput) InlineVolumeSpec() corev1.PersistentVolumeSpecPtrOutput { return o.ApplyT(func(v VolumeAttachmentSource) *corev1.PersistentVolumeSpec { return v.InlineVolumeSpec }).(corev1.PersistentVolumeSpecPtrOutput) } @@ -1766,7 +2090,7 @@ func (o VolumeAttachmentSourcePtrOutput) Elem() VolumeAttachmentSourceOutput { return o.ApplyT(func(v *VolumeAttachmentSource) VolumeAttachmentSource { return *v }).(VolumeAttachmentSourceOutput) } -// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. +// inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. func (o VolumeAttachmentSourcePtrOutput) InlineVolumeSpec() corev1.PersistentVolumeSpecPtrOutput { return o.ApplyT(func(v *VolumeAttachmentSource) *corev1.PersistentVolumeSpec { if v == nil { @@ -2449,6 +2773,9 @@ func init() { pulumi.RegisterOutputType(CSINodeListTypeOutput{}) pulumi.RegisterOutputType(CSINodeSpecOutput{}) pulumi.RegisterOutputType(CSINodeSpecPtrOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityTypeOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityTypeArrayOutput{}) + pulumi.RegisterOutputType(CSIStorageCapacityListTypeOutput{}) pulumi.RegisterOutputType(StorageClassTypeOutput{}) pulumi.RegisterOutputType(StorageClassTypeArrayOutput{}) pulumi.RegisterOutputType(StorageClassListTypeOutput{}) diff --git a/sdk/go/kubernetes/yaml/yaml.go b/sdk/go/kubernetes/yaml/yaml.go index 80c77628e5..06df9ece62 100644 --- a/sdk/go/kubernetes/yaml/yaml.go +++ b/sdk/go/kubernetes/yaml/yaml.go @@ -52,6 +52,7 @@ import ( coordinationv1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/coordination/v1" coordinationv1beta1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/coordination/v1beta1" corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/core/v1" + discoveryv1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/discovery/v1" discoveryv1beta1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/discovery/v1beta1" eventsv1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/events/v1" eventsv1beta1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/events/v1beta1" @@ -64,6 +65,7 @@ import ( nodev1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/node/v1" nodev1alpha1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/node/v1alpha1" nodev1beta1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/node/v1beta1" + policyv1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/policy/v1" policyv1beta1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/policy/v1beta1" rbacv1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/rbac/v1" rbacv1alpha1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/rbac/v1alpha1" @@ -235,6 +237,7 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma "autoscaling/v1/HorizontalPodAutoscalerList", "autoscaling/v2beta1/HorizontalPodAutoscalerList", "autoscaling/v2beta2/HorizontalPodAutoscalerList", + "batch/v1/CronJobList", "batch/v1/JobList", "batch/v1beta1/CronJobList", "batch/v2alpha1/CronJobList", @@ -257,6 +260,7 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma "v1/SecretList", "v1/ServiceAccountList", "v1/ServiceList", + "discovery.k8s.io/v1/EndpointSliceList", "discovery.k8s.io/v1beta1/EndpointSliceList", "events.k8s.io/v1/EventList", "events.k8s.io/v1beta1/EventList", @@ -278,6 +282,7 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma "node.k8s.io/v1/RuntimeClassList", "node.k8s.io/v1alpha1/RuntimeClassList", "node.k8s.io/v1beta1/RuntimeClassList", + "policy/v1/PodDisruptionBudgetList", "policy/v1beta1/PodDisruptionBudgetList", "policy/v1beta1/PodSecurityPolicyList", "rbac.authorization.k8s.io/v1/ClusterRoleBindingList", @@ -300,9 +305,11 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma "storage.k8s.io/v1/CSINodeList", "storage.k8s.io/v1/StorageClassList", "storage.k8s.io/v1/VolumeAttachmentList", + "storage.k8s.io/v1alpha1/CSIStorageCapacityList", "storage.k8s.io/v1alpha1/VolumeAttachmentList", "storage.k8s.io/v1beta1/CSIDriverList", "storage.k8s.io/v1beta1/CSINodeList", + "storage.k8s.io/v1beta1/CSIStorageCapacityList", "storage.k8s.io/v1beta1/StorageClassList", "storage.k8s.io/v1beta1/VolumeAttachmentList": var resources []resourceTuple @@ -603,6 +610,13 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma return nil, err } return []resourceTuple{{Name: key, Resource: &res}}, nil + case "batch/v1/CronJob": + var res batchv1.CronJob + err := ctx.RegisterResource("kubernetes:batch/v1:CronJob", metaName, kubernetes.UntypedArgs(obj), &res, opts...) + if err != nil { + return nil, err + } + return []resourceTuple{{Name: key, Resource: &res}}, nil case "batch/v1/Job": var res batchv1.Job err := ctx.RegisterResource("kubernetes:batch/v1:Job", metaName, kubernetes.UntypedArgs(obj), &res, opts...) @@ -673,6 +687,13 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma return nil, err } return []resourceTuple{{Name: key, Resource: &res}}, nil + case "v1/EphemeralContainers": + var res corev1.EphemeralContainers + err := ctx.RegisterResource("kubernetes:core/v1:EphemeralContainers", metaName, kubernetes.UntypedArgs(obj), &res, opts...) + if err != nil { + return nil, err + } + return []resourceTuple{{Name: key, Resource: &res}}, nil case "v1/Event": var res corev1.Event err := ctx.RegisterResource("kubernetes:core/v1:Event", metaName, kubernetes.UntypedArgs(obj), &res, opts...) @@ -764,6 +785,13 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma return nil, err } return []resourceTuple{{Name: key, Resource: &res}}, nil + case "discovery.k8s.io/v1/EndpointSlice": + var res discoveryv1.EndpointSlice + err := ctx.RegisterResource("kubernetes:discovery.k8s.io/v1:EndpointSlice", metaName, kubernetes.UntypedArgs(obj), &res, opts...) + if err != nil { + return nil, err + } + return []resourceTuple{{Name: key, Resource: &res}}, nil case "discovery.k8s.io/v1beta1/EndpointSlice": var res discoveryv1beta1.EndpointSlice err := ctx.RegisterResource("kubernetes:discovery.k8s.io/v1beta1:EndpointSlice", metaName, kubernetes.UntypedArgs(obj), &res, opts...) @@ -918,6 +946,13 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma return nil, err } return []resourceTuple{{Name: key, Resource: &res}}, nil + case "policy/v1/PodDisruptionBudget": + var res policyv1.PodDisruptionBudget + err := ctx.RegisterResource("kubernetes:policy/v1:PodDisruptionBudget", metaName, kubernetes.UntypedArgs(obj), &res, opts...) + if err != nil { + return nil, err + } + return []resourceTuple{{Name: key, Resource: &res}}, nil case "policy/v1beta1/PodDisruptionBudget": var res policyv1beta1.PodDisruptionBudget err := ctx.RegisterResource("kubernetes:policy/v1beta1:PodDisruptionBudget", metaName, kubernetes.UntypedArgs(obj), &res, opts...) @@ -1072,6 +1107,13 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma return nil, err } return []resourceTuple{{Name: key, Resource: &res}}, nil + case "storage.k8s.io/v1alpha1/CSIStorageCapacity": + var res storagev1alpha1.CSIStorageCapacity + err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity", metaName, kubernetes.UntypedArgs(obj), &res, opts...) + if err != nil { + return nil, err + } + return []resourceTuple{{Name: key, Resource: &res}}, nil case "storage.k8s.io/v1alpha1/VolumeAttachment": var res storagev1alpha1.VolumeAttachment err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1alpha1:VolumeAttachment", metaName, kubernetes.UntypedArgs(obj), &res, opts...) @@ -1093,6 +1135,13 @@ func parseYamlObject(ctx *pulumi.Context, obj map[string]interface{}, transforma return nil, err } return []resourceTuple{{Name: key, Resource: &res}}, nil + case "storage.k8s.io/v1beta1/CSIStorageCapacity": + var res storagev1beta1.CSIStorageCapacity + err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity", metaName, kubernetes.UntypedArgs(obj), &res, opts...) + if err != nil { + return nil, err + } + return []resourceTuple{{Name: key, Resource: &res}}, nil case "storage.k8s.io/v1beta1/StorageClass": var res storagev1beta1.StorageClass err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1beta1:StorageClass", metaName, kubernetes.UntypedArgs(obj), &res, opts...) diff --git a/sdk/nodejs/batch/v1/cronJob.ts b/sdk/nodejs/batch/v1/cronJob.ts new file mode 100644 index 0000000000..a74f659647 --- /dev/null +++ b/sdk/nodejs/batch/v1/cronJob.ts @@ -0,0 +1,111 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import { input as inputs, output as outputs, enums } from "../../types"; +import * as utilities from "../../utilities"; + +/** + * CronJob represents the configuration of a single cron job. + */ +export class CronJob extends pulumi.CustomResource { + /** + * Get an existing CronJob resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): CronJob { + return new CronJob(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'kubernetes:batch/v1:CronJob'; + + /** + * Returns true if the given object is an instance of CronJob. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is CronJob { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === CronJob.__pulumiType; + } + + /** + * 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 + */ + public readonly apiVersion!: pulumi.Output<"batch/v1">; + /** + * 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 + */ + public readonly kind!: pulumi.Output<"CronJob">; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + public readonly metadata!: pulumi.Output; + /** + * Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + public readonly spec!: pulumi.Output; + /** + * Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + public /*out*/ readonly status!: pulumi.Output; + + /** + * Create a CronJob resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: CronJobArgs, opts?: pulumi.CustomResourceOptions) { + let inputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + inputs["apiVersion"] = "batch/v1"; + inputs["kind"] = "CronJob"; + inputs["metadata"] = args ? args.metadata : undefined; + inputs["spec"] = args ? args.spec : undefined; + inputs["status"] = undefined /*out*/; + } else { + inputs["apiVersion"] = undefined /*out*/; + inputs["kind"] = undefined /*out*/; + inputs["metadata"] = undefined /*out*/; + inputs["spec"] = undefined /*out*/; + inputs["status"] = undefined /*out*/; + } + if (!opts.version) { + opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); + } + const aliasOpts = { aliases: [{ type: "kubernetes:batch/v1beta1:CronJob" }, { type: "kubernetes:batch/v2alpha1:CronJob" }] }; + opts = pulumi.mergeOptions(opts, aliasOpts); + super(CronJob.__pulumiType, name, inputs, opts); + } +} + +/** + * The set of arguments for constructing a CronJob resource. + */ +export interface CronJobArgs { + /** + * 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 + */ + readonly apiVersion?: pulumi.Input<"batch/v1">; + /** + * 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 + */ + readonly kind?: pulumi.Input<"CronJob">; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + readonly metadata?: pulumi.Input; + /** + * Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + readonly spec?: pulumi.Input; +} diff --git a/sdk/nodejs/batch/v1/cronJobList.ts b/sdk/nodejs/batch/v1/cronJobList.ts new file mode 100644 index 0000000000..6875d59534 --- /dev/null +++ b/sdk/nodejs/batch/v1/cronJobList.ts @@ -0,0 +1,106 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import { input as inputs, output as outputs, enums } from "../../types"; +import * as utilities from "../../utilities"; + +/** + * CronJobList is a collection of cron jobs. + */ +export class CronJobList extends pulumi.CustomResource { + /** + * Get an existing CronJobList resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): CronJobList { + return new CronJobList(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'kubernetes:batch/v1:CronJobList'; + + /** + * Returns true if the given object is an instance of CronJobList. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is CronJobList { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === CronJobList.__pulumiType; + } + + /** + * 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 + */ + public readonly apiVersion!: pulumi.Output<"batch/v1">; + /** + * items is the list of CronJobs. + */ + public readonly items!: pulumi.Output; + /** + * 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 + */ + public readonly kind!: pulumi.Output<"CronJobList">; + /** + * Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + public readonly metadata!: pulumi.Output; + + /** + * Create a CronJobList resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: CronJobListArgs, opts?: pulumi.CustomResourceOptions) { + let inputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + if ((!args || args.items === undefined) && !opts.urn) { + throw new Error("Missing required property 'items'"); + } + inputs["apiVersion"] = "batch/v1"; + inputs["items"] = args ? args.items : undefined; + inputs["kind"] = "CronJobList"; + inputs["metadata"] = args ? args.metadata : undefined; + } else { + inputs["apiVersion"] = undefined /*out*/; + inputs["items"] = undefined /*out*/; + inputs["kind"] = undefined /*out*/; + inputs["metadata"] = undefined /*out*/; + } + if (!opts.version) { + opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); + } + super(CronJobList.__pulumiType, name, inputs, opts); + } +} + +/** + * The set of arguments for constructing a CronJobList resource. + */ +export interface CronJobListArgs { + /** + * 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 + */ + readonly apiVersion?: pulumi.Input<"batch/v1">; + /** + * items is the list of CronJobs. + */ + readonly items: pulumi.Input[]>; + /** + * 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 + */ + readonly kind?: pulumi.Input<"CronJobList">; + /** + * Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + readonly metadata?: pulumi.Input; +} diff --git a/sdk/nodejs/batch/v1/index.ts b/sdk/nodejs/batch/v1/index.ts index f045a68187..46e072fb54 100644 --- a/sdk/nodejs/batch/v1/index.ts +++ b/sdk/nodejs/batch/v1/index.ts @@ -5,10 +5,14 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "../../utilities"; // Export members: +export * from "./cronJob"; +export * from "./cronJobList"; export * from "./job"; export * from "./jobList"; // Import resources to register: +import { CronJob } from "./cronJob"; +import { CronJobList } from "./cronJobList"; import { Job } from "./job"; import { JobList } from "./jobList"; @@ -16,6 +20,10 @@ const _module = { version: utilities.getVersion(), construct: (name: string, type: string, urn: string): pulumi.Resource => { switch (type) { + case "kubernetes:batch/v1:CronJob": + return new CronJob(name, undefined, { urn }) + case "kubernetes:batch/v1:CronJobList": + return new CronJobList(name, undefined, { urn }) case "kubernetes:batch/v1:Job": return new Job(name, undefined, { urn }) case "kubernetes:batch/v1:JobList": diff --git a/sdk/nodejs/batch/v1beta1/cronJob.ts b/sdk/nodejs/batch/v1beta1/cronJob.ts index c80f3846fb..e1bcfe6abf 100644 --- a/sdk/nodejs/batch/v1beta1/cronJob.ts +++ b/sdk/nodejs/batch/v1beta1/cronJob.ts @@ -82,7 +82,7 @@ export class CronJob extends pulumi.CustomResource { if (!opts.version) { opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); } - const aliasOpts = { aliases: [{ type: "kubernetes:batch/v2alpha1:CronJob" }] }; + const aliasOpts = { aliases: [{ type: "kubernetes:batch/v1:CronJob" }, { type: "kubernetes:batch/v2alpha1:CronJob" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(CronJob.__pulumiType, name, inputs, opts); } diff --git a/sdk/nodejs/batch/v2alpha1/cronJob.ts b/sdk/nodejs/batch/v2alpha1/cronJob.ts index 924fe7bc89..7343a849f8 100644 --- a/sdk/nodejs/batch/v2alpha1/cronJob.ts +++ b/sdk/nodejs/batch/v2alpha1/cronJob.ts @@ -82,7 +82,7 @@ export class CronJob extends pulumi.CustomResource { if (!opts.version) { opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); } - const aliasOpts = { aliases: [{ type: "kubernetes:batch/v1beta1:CronJob" }] }; + const aliasOpts = { aliases: [{ type: "kubernetes:batch/v1:CronJob" }, { type: "kubernetes:batch/v1beta1:CronJob" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(CronJob.__pulumiType, name, inputs, opts); } diff --git a/sdk/nodejs/core/v1/configMap.ts b/sdk/nodejs/core/v1/configMap.ts index c0bb148b51..83802c53fc 100644 --- a/sdk/nodejs/core/v1/configMap.ts +++ b/sdk/nodejs/core/v1/configMap.ts @@ -48,7 +48,7 @@ export class ConfigMap extends pulumi.CustomResource { */ public readonly data!: pulumi.Output<{[key: string]: string}>; /** - * Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + * Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. */ public readonly immutable!: pulumi.Output; /** @@ -109,7 +109,7 @@ export interface ConfigMapArgs { */ readonly data?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + * Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. */ readonly immutable?: pulumi.Input; /** diff --git a/sdk/nodejs/core/v1/ephemeralContainers.ts b/sdk/nodejs/core/v1/ephemeralContainers.ts new file mode 100644 index 0000000000..0d55baaf01 --- /dev/null +++ b/sdk/nodejs/core/v1/ephemeralContainers.ts @@ -0,0 +1,100 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import { input as inputs, output as outputs, enums } from "../../types"; +import * as utilities from "../../utilities"; + +/** + * A list of ephemeral containers used with the Pod ephemeralcontainers subresource. + */ +export class EphemeralContainers extends pulumi.CustomResource { + /** + * Get an existing EphemeralContainers resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): EphemeralContainers { + return new EphemeralContainers(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'kubernetes:core/v1:EphemeralContainers'; + + /** + * Returns true if the given object is an instance of EphemeralContainers. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is EphemeralContainers { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === EphemeralContainers.__pulumiType; + } + + /** + * 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 + */ + public readonly apiVersion!: pulumi.Output<"v1">; + /** + * A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + */ + public readonly ephemeralContainers!: pulumi.Output; + /** + * 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 + */ + public readonly kind!: pulumi.Output<"EphemeralContainers">; + public readonly metadata!: pulumi.Output; + + /** + * Create a EphemeralContainers resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: EphemeralContainersArgs, opts?: pulumi.CustomResourceOptions) { + let inputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + if ((!args || args.ephemeralContainers === undefined) && !opts.urn) { + throw new Error("Missing required property 'ephemeralContainers'"); + } + inputs["apiVersion"] = "v1"; + inputs["ephemeralContainers"] = args ? args.ephemeralContainers : undefined; + inputs["kind"] = "EphemeralContainers"; + inputs["metadata"] = args ? args.metadata : undefined; + } else { + inputs["apiVersion"] = undefined /*out*/; + inputs["ephemeralContainers"] = undefined /*out*/; + inputs["kind"] = undefined /*out*/; + inputs["metadata"] = undefined /*out*/; + } + if (!opts.version) { + opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); + } + super(EphemeralContainers.__pulumiType, name, inputs, opts); + } +} + +/** + * The set of arguments for constructing a EphemeralContainers resource. + */ +export interface EphemeralContainersArgs { + /** + * 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 + */ + readonly apiVersion?: pulumi.Input<"v1">; + /** + * A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + */ + readonly ephemeralContainers: pulumi.Input[]>; + /** + * 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 + */ + readonly kind?: pulumi.Input<"EphemeralContainers">; + readonly metadata?: pulumi.Input; +} diff --git a/sdk/nodejs/core/v1/index.ts b/sdk/nodejs/core/v1/index.ts index 2243d67620..96963ed12e 100644 --- a/sdk/nodejs/core/v1/index.ts +++ b/sdk/nodejs/core/v1/index.ts @@ -10,6 +10,7 @@ export * from "./configMap"; export * from "./configMapList"; export * from "./endpoints"; export * from "./endpointsList"; +export * from "./ephemeralContainers"; export * from "./event"; export * from "./eventList"; export * from "./limitRange"; @@ -46,6 +47,7 @@ import { ConfigMap } from "./configMap"; import { ConfigMapList } from "./configMapList"; import { Endpoints } from "./endpoints"; import { EndpointsList } from "./endpointsList"; +import { EphemeralContainers } from "./ephemeralContainers"; import { Event } from "./event"; import { EventList } from "./eventList"; import { LimitRange } from "./limitRange"; @@ -87,6 +89,8 @@ const _module = { return new Endpoints(name, undefined, { urn }) case "kubernetes:core/v1:EndpointsList": return new EndpointsList(name, undefined, { urn }) + case "kubernetes:core/v1:EphemeralContainers": + return new EphemeralContainers(name, undefined, { urn }) case "kubernetes:core/v1:Event": return new Event(name, undefined, { urn }) case "kubernetes:core/v1:EventList": diff --git a/sdk/nodejs/core/v1/limitRangeList.ts b/sdk/nodejs/core/v1/limitRangeList.ts index ad14a67f84..5d12e525cb 100644 --- a/sdk/nodejs/core/v1/limitRangeList.ts +++ b/sdk/nodejs/core/v1/limitRangeList.ts @@ -40,7 +40,7 @@ export class LimitRangeList extends pulumi.CustomResource { */ public readonly apiVersion!: pulumi.Output<"v1">; /** - * Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + * Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ public readonly items!: pulumi.Output; /** @@ -92,7 +92,7 @@ export interface LimitRangeListArgs { */ readonly apiVersion?: pulumi.Input<"v1">; /** - * Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + * Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ readonly items: pulumi.Input[]>; /** diff --git a/sdk/nodejs/core/v1/secret.ts b/sdk/nodejs/core/v1/secret.ts index c06ba31831..fa0cdc25e1 100644 --- a/sdk/nodejs/core/v1/secret.ts +++ b/sdk/nodejs/core/v1/secret.ts @@ -54,7 +54,7 @@ export class Secret extends pulumi.CustomResource { */ public readonly data!: pulumi.Output<{[key: string]: string}>; /** - * Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + * Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. */ public readonly immutable!: pulumi.Output; /** @@ -66,7 +66,7 @@ export class Secret extends pulumi.CustomResource { */ public readonly metadata!: pulumi.Output; /** - * stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + * stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. */ public readonly stringData!: pulumi.Output<{[key: string]: string}>; /** @@ -123,7 +123,7 @@ export interface SecretArgs { */ readonly data?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + * Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. */ readonly immutable?: pulumi.Input; /** @@ -135,7 +135,7 @@ export interface SecretArgs { */ readonly metadata?: pulumi.Input; /** - * stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + * stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. */ readonly stringData?: pulumi.Input<{[key: string]: pulumi.Input}>; /** diff --git a/sdk/nodejs/discovery/index.ts b/sdk/nodejs/discovery/index.ts index 4a454a43b2..5220598184 100644 --- a/sdk/nodejs/discovery/index.ts +++ b/sdk/nodejs/discovery/index.ts @@ -2,8 +2,10 @@ // *** Do not edit by hand unless you're certain you know what you are doing! *** // Export sub-modules: +import * as v1 from "./v1"; import * as v1beta1 from "./v1beta1"; export { + v1, v1beta1, }; diff --git a/sdk/nodejs/discovery/v1/endpointSlice.ts b/sdk/nodejs/discovery/v1/endpointSlice.ts new file mode 100644 index 0000000000..8c609cc2ed --- /dev/null +++ b/sdk/nodejs/discovery/v1/endpointSlice.ts @@ -0,0 +1,131 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import { input as inputs, output as outputs, enums } from "../../types"; +import * as utilities from "../../utilities"; + +/** + * EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. + */ +export class EndpointSlice extends pulumi.CustomResource { + /** + * Get an existing EndpointSlice resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): EndpointSlice { + return new EndpointSlice(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'kubernetes:discovery.k8s.io/v1:EndpointSlice'; + + /** + * Returns true if the given object is an instance of EndpointSlice. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is EndpointSlice { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === EndpointSlice.__pulumiType; + } + + /** + * addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + */ + public readonly addressType!: pulumi.Output; + /** + * 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 + */ + public readonly apiVersion!: pulumi.Output<"discovery.k8s.io/v1">; + /** + * endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + */ + public readonly endpoints!: pulumi.Output; + /** + * 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 + */ + public readonly kind!: pulumi.Output<"EndpointSlice">; + /** + * Standard object's metadata. + */ + public readonly metadata!: pulumi.Output; + /** + * ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + */ + public readonly ports!: pulumi.Output; + + /** + * Create a EndpointSlice resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: EndpointSliceArgs, opts?: pulumi.CustomResourceOptions) { + let inputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + if ((!args || args.addressType === undefined) && !opts.urn) { + throw new Error("Missing required property 'addressType'"); + } + if ((!args || args.endpoints === undefined) && !opts.urn) { + throw new Error("Missing required property 'endpoints'"); + } + inputs["addressType"] = args ? args.addressType : undefined; + inputs["apiVersion"] = "discovery.k8s.io/v1"; + inputs["endpoints"] = args ? args.endpoints : undefined; + inputs["kind"] = "EndpointSlice"; + inputs["metadata"] = args ? args.metadata : undefined; + inputs["ports"] = args ? args.ports : undefined; + } else { + inputs["addressType"] = undefined /*out*/; + inputs["apiVersion"] = undefined /*out*/; + inputs["endpoints"] = undefined /*out*/; + inputs["kind"] = undefined /*out*/; + inputs["metadata"] = undefined /*out*/; + inputs["ports"] = undefined /*out*/; + } + if (!opts.version) { + opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); + } + const aliasOpts = { aliases: [{ type: "kubernetes:discovery.k8s.io/v1beta1:EndpointSlice" }] }; + opts = pulumi.mergeOptions(opts, aliasOpts); + super(EndpointSlice.__pulumiType, name, inputs, opts); + } +} + +/** + * The set of arguments for constructing a EndpointSlice resource. + */ +export interface EndpointSliceArgs { + /** + * addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + */ + readonly addressType: pulumi.Input; + /** + * 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 + */ + readonly apiVersion?: pulumi.Input<"discovery.k8s.io/v1">; + /** + * endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + */ + readonly endpoints: pulumi.Input[]>; + /** + * 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 + */ + readonly kind?: pulumi.Input<"EndpointSlice">; + /** + * Standard object's metadata. + */ + readonly metadata?: pulumi.Input; + /** + * ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + */ + readonly ports?: pulumi.Input[]>; +} diff --git a/sdk/nodejs/discovery/v1/endpointSliceList.ts b/sdk/nodejs/discovery/v1/endpointSliceList.ts new file mode 100644 index 0000000000..e9095922c5 --- /dev/null +++ b/sdk/nodejs/discovery/v1/endpointSliceList.ts @@ -0,0 +1,106 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import { input as inputs, output as outputs, enums } from "../../types"; +import * as utilities from "../../utilities"; + +/** + * EndpointSliceList represents a list of endpoint slices + */ +export class EndpointSliceList extends pulumi.CustomResource { + /** + * Get an existing EndpointSliceList resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): EndpointSliceList { + return new EndpointSliceList(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'kubernetes:discovery.k8s.io/v1:EndpointSliceList'; + + /** + * Returns true if the given object is an instance of EndpointSliceList. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is EndpointSliceList { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === EndpointSliceList.__pulumiType; + } + + /** + * 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 + */ + public readonly apiVersion!: pulumi.Output<"discovery.k8s.io/v1">; + /** + * List of endpoint slices + */ + public readonly items!: pulumi.Output; + /** + * 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 + */ + public readonly kind!: pulumi.Output<"EndpointSliceList">; + /** + * Standard list metadata. + */ + public readonly metadata!: pulumi.Output; + + /** + * Create a EndpointSliceList resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: EndpointSliceListArgs, opts?: pulumi.CustomResourceOptions) { + let inputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + if ((!args || args.items === undefined) && !opts.urn) { + throw new Error("Missing required property 'items'"); + } + inputs["apiVersion"] = "discovery.k8s.io/v1"; + inputs["items"] = args ? args.items : undefined; + inputs["kind"] = "EndpointSliceList"; + inputs["metadata"] = args ? args.metadata : undefined; + } else { + inputs["apiVersion"] = undefined /*out*/; + inputs["items"] = undefined /*out*/; + inputs["kind"] = undefined /*out*/; + inputs["metadata"] = undefined /*out*/; + } + if (!opts.version) { + opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); + } + super(EndpointSliceList.__pulumiType, name, inputs, opts); + } +} + +/** + * The set of arguments for constructing a EndpointSliceList resource. + */ +export interface EndpointSliceListArgs { + /** + * 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 + */ + readonly apiVersion?: pulumi.Input<"discovery.k8s.io/v1">; + /** + * List of endpoint slices + */ + readonly items: pulumi.Input[]>; + /** + * 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 + */ + readonly kind?: pulumi.Input<"EndpointSliceList">; + /** + * Standard list metadata. + */ + readonly metadata?: pulumi.Input; +} diff --git a/sdk/nodejs/discovery/v1/index.ts b/sdk/nodejs/discovery/v1/index.ts new file mode 100644 index 0000000000..8f9f80b8c9 --- /dev/null +++ b/sdk/nodejs/discovery/v1/index.ts @@ -0,0 +1,28 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "../../utilities"; + +// Export members: +export * from "./endpointSlice"; +export * from "./endpointSliceList"; + +// Import resources to register: +import { EndpointSlice } from "./endpointSlice"; +import { EndpointSliceList } from "./endpointSliceList"; + +const _module = { + version: utilities.getVersion(), + construct: (name: string, type: string, urn: string): pulumi.Resource => { + switch (type) { + case "kubernetes:discovery.k8s.io/v1:EndpointSlice": + return new EndpointSlice(name, undefined, { urn }) + case "kubernetes:discovery.k8s.io/v1:EndpointSliceList": + return new EndpointSliceList(name, undefined, { urn }) + default: + throw new Error(`unknown resource type ${type}`); + } + }, +}; +pulumi.runtime.registerResourceModule("kubernetes", "discovery.k8s.io/v1", _module) diff --git a/sdk/nodejs/discovery/v1beta1/endpointSlice.ts b/sdk/nodejs/discovery/v1beta1/endpointSlice.ts index 55ba8e6d4a..d64d87c4cc 100644 --- a/sdk/nodejs/discovery/v1beta1/endpointSlice.ts +++ b/sdk/nodejs/discovery/v1beta1/endpointSlice.ts @@ -94,6 +94,8 @@ export class EndpointSlice extends pulumi.CustomResource { if (!opts.version) { opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); } + const aliasOpts = { aliases: [{ type: "kubernetes:discovery.k8s.io/v1:EndpointSlice" }] }; + opts = pulumi.mergeOptions(opts, aliasOpts); super(EndpointSlice.__pulumiType, name, inputs, opts); } } diff --git a/sdk/nodejs/events/v1/event.ts b/sdk/nodejs/events/v1/event.ts index 9b0df17dab..c3ed6c0bcc 100644 --- a/sdk/nodejs/events/v1/event.ts +++ b/sdk/nodejs/events/v1/event.ts @@ -67,6 +67,9 @@ export class Event extends pulumi.CustomResource { * 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 */ public readonly kind!: pulumi.Output<"Event">; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ public readonly metadata!: pulumi.Output; /** * note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. @@ -115,9 +118,6 @@ export class Event extends pulumi.CustomResource { if ((!args || args.eventTime === undefined) && !opts.urn) { throw new Error("Missing required property 'eventTime'"); } - if ((!args || args.metadata === undefined) && !opts.urn) { - throw new Error("Missing required property 'metadata'"); - } inputs["action"] = args ? args.action : undefined; inputs["apiVersion"] = "events.k8s.io/v1"; inputs["deprecatedCount"] = args ? args.deprecatedCount : undefined; @@ -199,7 +199,10 @@ export interface EventArgs { * 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 */ readonly kind?: pulumi.Input<"Event">; - readonly metadata: pulumi.Input; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + readonly metadata?: pulumi.Input; /** * note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. */ diff --git a/sdk/nodejs/events/v1beta1/event.ts b/sdk/nodejs/events/v1beta1/event.ts index b7ad2ad080..d3baeb888b 100644 --- a/sdk/nodejs/events/v1beta1/event.ts +++ b/sdk/nodejs/events/v1beta1/event.ts @@ -67,6 +67,9 @@ export class Event extends pulumi.CustomResource { * 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 */ public readonly kind!: pulumi.Output<"Event">; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ public readonly metadata!: pulumi.Output; /** * note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. @@ -115,9 +118,6 @@ export class Event extends pulumi.CustomResource { if ((!args || args.eventTime === undefined) && !opts.urn) { throw new Error("Missing required property 'eventTime'"); } - if ((!args || args.metadata === undefined) && !opts.urn) { - throw new Error("Missing required property 'metadata'"); - } inputs["action"] = args ? args.action : undefined; inputs["apiVersion"] = "events.k8s.io/v1beta1"; inputs["deprecatedCount"] = args ? args.deprecatedCount : undefined; @@ -199,7 +199,10 @@ export interface EventArgs { * 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 */ readonly kind?: pulumi.Input<"Event">; - readonly metadata: pulumi.Input; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + readonly metadata?: pulumi.Input; /** * note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. */ diff --git a/sdk/nodejs/policy/index.ts b/sdk/nodejs/policy/index.ts index 4a454a43b2..5220598184 100644 --- a/sdk/nodejs/policy/index.ts +++ b/sdk/nodejs/policy/index.ts @@ -2,8 +2,10 @@ // *** Do not edit by hand unless you're certain you know what you are doing! *** // Export sub-modules: +import * as v1 from "./v1"; import * as v1beta1 from "./v1beta1"; export { + v1, v1beta1, }; diff --git a/sdk/nodejs/policy/v1/index.ts b/sdk/nodejs/policy/v1/index.ts new file mode 100644 index 0000000000..0b7dd73c48 --- /dev/null +++ b/sdk/nodejs/policy/v1/index.ts @@ -0,0 +1,28 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "../../utilities"; + +// Export members: +export * from "./podDisruptionBudget"; +export * from "./podDisruptionBudgetList"; + +// Import resources to register: +import { PodDisruptionBudget } from "./podDisruptionBudget"; +import { PodDisruptionBudgetList } from "./podDisruptionBudgetList"; + +const _module = { + version: utilities.getVersion(), + construct: (name: string, type: string, urn: string): pulumi.Resource => { + switch (type) { + case "kubernetes:policy/v1:PodDisruptionBudget": + return new PodDisruptionBudget(name, undefined, { urn }) + case "kubernetes:policy/v1:PodDisruptionBudgetList": + return new PodDisruptionBudgetList(name, undefined, { urn }) + default: + throw new Error(`unknown resource type ${type}`); + } + }, +}; +pulumi.runtime.registerResourceModule("kubernetes", "policy/v1", _module) diff --git a/sdk/nodejs/policy/v1/podDisruptionBudget.ts b/sdk/nodejs/policy/v1/podDisruptionBudget.ts new file mode 100644 index 0000000000..884720080c --- /dev/null +++ b/sdk/nodejs/policy/v1/podDisruptionBudget.ts @@ -0,0 +1,111 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import { input as inputs, output as outputs, enums } from "../../types"; +import * as utilities from "../../utilities"; + +/** + * PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods + */ +export class PodDisruptionBudget extends pulumi.CustomResource { + /** + * Get an existing PodDisruptionBudget resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): PodDisruptionBudget { + return new PodDisruptionBudget(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'kubernetes:policy/v1:PodDisruptionBudget'; + + /** + * Returns true if the given object is an instance of PodDisruptionBudget. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is PodDisruptionBudget { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === PodDisruptionBudget.__pulumiType; + } + + /** + * 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 + */ + public readonly apiVersion!: pulumi.Output<"policy/v1">; + /** + * 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 + */ + public readonly kind!: pulumi.Output<"PodDisruptionBudget">; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + public readonly metadata!: pulumi.Output; + /** + * Specification of the desired behavior of the PodDisruptionBudget. + */ + public readonly spec!: pulumi.Output; + /** + * Most recently observed status of the PodDisruptionBudget. + */ + public /*out*/ readonly status!: pulumi.Output; + + /** + * Create a PodDisruptionBudget resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: PodDisruptionBudgetArgs, opts?: pulumi.CustomResourceOptions) { + let inputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + inputs["apiVersion"] = "policy/v1"; + inputs["kind"] = "PodDisruptionBudget"; + inputs["metadata"] = args ? args.metadata : undefined; + inputs["spec"] = args ? args.spec : undefined; + inputs["status"] = undefined /*out*/; + } else { + inputs["apiVersion"] = undefined /*out*/; + inputs["kind"] = undefined /*out*/; + inputs["metadata"] = undefined /*out*/; + inputs["spec"] = undefined /*out*/; + inputs["status"] = undefined /*out*/; + } + if (!opts.version) { + opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); + } + const aliasOpts = { aliases: [{ type: "kubernetes:policy/v1beta1:PodDisruptionBudget" }] }; + opts = pulumi.mergeOptions(opts, aliasOpts); + super(PodDisruptionBudget.__pulumiType, name, inputs, opts); + } +} + +/** + * The set of arguments for constructing a PodDisruptionBudget resource. + */ +export interface PodDisruptionBudgetArgs { + /** + * 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 + */ + readonly apiVersion?: pulumi.Input<"policy/v1">; + /** + * 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 + */ + readonly kind?: pulumi.Input<"PodDisruptionBudget">; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + readonly metadata?: pulumi.Input; + /** + * Specification of the desired behavior of the PodDisruptionBudget. + */ + readonly spec?: pulumi.Input; +} diff --git a/sdk/nodejs/policy/v1/podDisruptionBudgetList.ts b/sdk/nodejs/policy/v1/podDisruptionBudgetList.ts new file mode 100644 index 0000000000..448cbdfacb --- /dev/null +++ b/sdk/nodejs/policy/v1/podDisruptionBudgetList.ts @@ -0,0 +1,106 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import { input as inputs, output as outputs, enums } from "../../types"; +import * as utilities from "../../utilities"; + +/** + * PodDisruptionBudgetList is a collection of PodDisruptionBudgets. + */ +export class PodDisruptionBudgetList extends pulumi.CustomResource { + /** + * Get an existing PodDisruptionBudgetList resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): PodDisruptionBudgetList { + return new PodDisruptionBudgetList(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'kubernetes:policy/v1:PodDisruptionBudgetList'; + + /** + * Returns true if the given object is an instance of PodDisruptionBudgetList. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is PodDisruptionBudgetList { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === PodDisruptionBudgetList.__pulumiType; + } + + /** + * 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 + */ + public readonly apiVersion!: pulumi.Output<"policy/v1">; + /** + * Items is a list of PodDisruptionBudgets + */ + public readonly items!: pulumi.Output; + /** + * 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 + */ + public readonly kind!: pulumi.Output<"PodDisruptionBudgetList">; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + public readonly metadata!: pulumi.Output; + + /** + * Create a PodDisruptionBudgetList resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: PodDisruptionBudgetListArgs, opts?: pulumi.CustomResourceOptions) { + let inputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + if ((!args || args.items === undefined) && !opts.urn) { + throw new Error("Missing required property 'items'"); + } + inputs["apiVersion"] = "policy/v1"; + inputs["items"] = args ? args.items : undefined; + inputs["kind"] = "PodDisruptionBudgetList"; + inputs["metadata"] = args ? args.metadata : undefined; + } else { + inputs["apiVersion"] = undefined /*out*/; + inputs["items"] = undefined /*out*/; + inputs["kind"] = undefined /*out*/; + inputs["metadata"] = undefined /*out*/; + } + if (!opts.version) { + opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); + } + super(PodDisruptionBudgetList.__pulumiType, name, inputs, opts); + } +} + +/** + * The set of arguments for constructing a PodDisruptionBudgetList resource. + */ +export interface PodDisruptionBudgetListArgs { + /** + * 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 + */ + readonly apiVersion?: pulumi.Input<"policy/v1">; + /** + * Items is a list of PodDisruptionBudgets + */ + readonly items: pulumi.Input[]>; + /** + * 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 + */ + readonly kind?: pulumi.Input<"PodDisruptionBudgetList">; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + readonly metadata?: pulumi.Input; +} diff --git a/sdk/nodejs/policy/v1beta1/podDisruptionBudget.ts b/sdk/nodejs/policy/v1beta1/podDisruptionBudget.ts index 05398b10f7..0c41f7dadc 100644 --- a/sdk/nodejs/policy/v1beta1/podDisruptionBudget.ts +++ b/sdk/nodejs/policy/v1beta1/podDisruptionBudget.ts @@ -79,6 +79,8 @@ export class PodDisruptionBudget extends pulumi.CustomResource { if (!opts.version) { opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); } + const aliasOpts = { aliases: [{ type: "kubernetes:policy/v1:PodDisruptionBudget" }] }; + opts = pulumi.mergeOptions(opts, aliasOpts); super(PodDisruptionBudget.__pulumiType, name, inputs, opts); } } diff --git a/sdk/nodejs/policy/v1beta1/podSecurityPolicy.ts b/sdk/nodejs/policy/v1beta1/podSecurityPolicy.ts index 1e3d5a7211..633676e683 100644 --- a/sdk/nodejs/policy/v1beta1/podSecurityPolicy.ts +++ b/sdk/nodejs/policy/v1beta1/podSecurityPolicy.ts @@ -6,7 +6,7 @@ import { input as inputs, output as outputs, enums } from "../../types"; import * as utilities from "../../utilities"; /** - * PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. + * PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. */ export class PodSecurityPolicy extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/storage/v1alpha1/csistorageCapacity.ts b/sdk/nodejs/storage/v1alpha1/csistorageCapacity.ts new file mode 100644 index 0000000000..b443e3f8b6 --- /dev/null +++ b/sdk/nodejs/storage/v1alpha1/csistorageCapacity.ts @@ -0,0 +1,162 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import { input as inputs, output as outputs, enums } from "../../types"; +import * as utilities from "../../utilities"; + +/** + * CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + * + * For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + * + * The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + * + * The producer of these objects can decide which approach is more suitable. + * + * They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + */ +export class CSIStorageCapacity extends pulumi.CustomResource { + /** + * Get an existing CSIStorageCapacity resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): CSIStorageCapacity { + return new CSIStorageCapacity(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity'; + + /** + * Returns true if the given object is an instance of CSIStorageCapacity. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is CSIStorageCapacity { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === CSIStorageCapacity.__pulumiType; + } + + /** + * 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 + */ + public readonly apiVersion!: pulumi.Output<"storage.k8s.io/v1alpha1">; + /** + * Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + */ + public readonly capacity!: pulumi.Output; + /** + * 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 + */ + public readonly kind!: pulumi.Output<"CSIStorageCapacity">; + /** + * MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + */ + public readonly maximumVolumeSize!: pulumi.Output; + /** + * Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + * + * Objects are namespaced. + * + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + public readonly metadata!: pulumi.Output; + /** + * NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + */ + public readonly nodeTopology!: pulumi.Output; + /** + * The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + */ + public readonly storageClassName!: pulumi.Output; + + /** + * Create a CSIStorageCapacity resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: CSIStorageCapacityArgs, opts?: pulumi.CustomResourceOptions) { + let inputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + if ((!args || args.storageClassName === undefined) && !opts.urn) { + throw new Error("Missing required property 'storageClassName'"); + } + inputs["apiVersion"] = "storage.k8s.io/v1alpha1"; + inputs["capacity"] = args ? args.capacity : undefined; + inputs["kind"] = "CSIStorageCapacity"; + inputs["maximumVolumeSize"] = args ? args.maximumVolumeSize : undefined; + inputs["metadata"] = args ? args.metadata : undefined; + inputs["nodeTopology"] = args ? args.nodeTopology : undefined; + inputs["storageClassName"] = args ? args.storageClassName : undefined; + } else { + inputs["apiVersion"] = undefined /*out*/; + inputs["capacity"] = undefined /*out*/; + inputs["kind"] = undefined /*out*/; + inputs["maximumVolumeSize"] = undefined /*out*/; + inputs["metadata"] = undefined /*out*/; + inputs["nodeTopology"] = undefined /*out*/; + inputs["storageClassName"] = undefined /*out*/; + } + if (!opts.version) { + opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); + } + const aliasOpts = { aliases: [{ type: "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity" }] }; + opts = pulumi.mergeOptions(opts, aliasOpts); + super(CSIStorageCapacity.__pulumiType, name, inputs, opts); + } +} + +/** + * The set of arguments for constructing a CSIStorageCapacity resource. + */ +export interface CSIStorageCapacityArgs { + /** + * 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 + */ + readonly apiVersion?: pulumi.Input<"storage.k8s.io/v1alpha1">; + /** + * Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + */ + readonly capacity?: pulumi.Input; + /** + * 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 + */ + readonly kind?: pulumi.Input<"CSIStorageCapacity">; + /** + * MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + */ + readonly maximumVolumeSize?: pulumi.Input; + /** + * Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + * + * Objects are namespaced. + * + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + readonly metadata?: pulumi.Input; + /** + * NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + */ + readonly nodeTopology?: pulumi.Input; + /** + * The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + */ + readonly storageClassName: pulumi.Input; +} diff --git a/sdk/nodejs/storage/v1alpha1/csistorageCapacityList.ts b/sdk/nodejs/storage/v1alpha1/csistorageCapacityList.ts new file mode 100644 index 0000000000..4c76a036a0 --- /dev/null +++ b/sdk/nodejs/storage/v1alpha1/csistorageCapacityList.ts @@ -0,0 +1,106 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import { input as inputs, output as outputs, enums } from "../../types"; +import * as utilities from "../../utilities"; + +/** + * CSIStorageCapacityList is a collection of CSIStorageCapacity objects. + */ +export class CSIStorageCapacityList extends pulumi.CustomResource { + /** + * Get an existing CSIStorageCapacityList resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): CSIStorageCapacityList { + return new CSIStorageCapacityList(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList'; + + /** + * Returns true if the given object is an instance of CSIStorageCapacityList. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is CSIStorageCapacityList { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === CSIStorageCapacityList.__pulumiType; + } + + /** + * 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 + */ + public readonly apiVersion!: pulumi.Output<"storage.k8s.io/v1alpha1">; + /** + * Items is the list of CSIStorageCapacity objects. + */ + public readonly items!: pulumi.Output; + /** + * 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 + */ + public readonly kind!: pulumi.Output<"CSIStorageCapacityList">; + /** + * Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + public readonly metadata!: pulumi.Output; + + /** + * Create a CSIStorageCapacityList resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: CSIStorageCapacityListArgs, opts?: pulumi.CustomResourceOptions) { + let inputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + if ((!args || args.items === undefined) && !opts.urn) { + throw new Error("Missing required property 'items'"); + } + inputs["apiVersion"] = "storage.k8s.io/v1alpha1"; + inputs["items"] = args ? args.items : undefined; + inputs["kind"] = "CSIStorageCapacityList"; + inputs["metadata"] = args ? args.metadata : undefined; + } else { + inputs["apiVersion"] = undefined /*out*/; + inputs["items"] = undefined /*out*/; + inputs["kind"] = undefined /*out*/; + inputs["metadata"] = undefined /*out*/; + } + if (!opts.version) { + opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); + } + super(CSIStorageCapacityList.__pulumiType, name, inputs, opts); + } +} + +/** + * The set of arguments for constructing a CSIStorageCapacityList resource. + */ +export interface CSIStorageCapacityListArgs { + /** + * 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 + */ + readonly apiVersion?: pulumi.Input<"storage.k8s.io/v1alpha1">; + /** + * Items is the list of CSIStorageCapacity objects. + */ + readonly items: pulumi.Input[]>; + /** + * 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 + */ + readonly kind?: pulumi.Input<"CSIStorageCapacityList">; + /** + * Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + readonly metadata?: pulumi.Input; +} diff --git a/sdk/nodejs/storage/v1alpha1/index.ts b/sdk/nodejs/storage/v1alpha1/index.ts index c854a56e9b..fac148e4fd 100644 --- a/sdk/nodejs/storage/v1alpha1/index.ts +++ b/sdk/nodejs/storage/v1alpha1/index.ts @@ -5,10 +5,14 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "../../utilities"; // Export members: +export * from "./csistorageCapacity"; +export * from "./csistorageCapacityList"; export * from "./volumeAttachment"; export * from "./volumeAttachmentList"; // Import resources to register: +import { CSIStorageCapacity } from "./csistorageCapacity"; +import { CSIStorageCapacityList } from "./csistorageCapacityList"; import { VolumeAttachment } from "./volumeAttachment"; import { VolumeAttachmentList } from "./volumeAttachmentList"; @@ -16,6 +20,10 @@ const _module = { version: utilities.getVersion(), construct: (name: string, type: string, urn: string): pulumi.Resource => { switch (type) { + case "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity": + return new CSIStorageCapacity(name, undefined, { urn }) + case "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList": + return new CSIStorageCapacityList(name, undefined, { urn }) case "kubernetes:storage.k8s.io/v1alpha1:VolumeAttachment": return new VolumeAttachment(name, undefined, { urn }) case "kubernetes:storage.k8s.io/v1alpha1:VolumeAttachmentList": diff --git a/sdk/nodejs/storage/v1beta1/csistorageCapacity.ts b/sdk/nodejs/storage/v1beta1/csistorageCapacity.ts new file mode 100644 index 0000000000..cfc906d362 --- /dev/null +++ b/sdk/nodejs/storage/v1beta1/csistorageCapacity.ts @@ -0,0 +1,162 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import { input as inputs, output as outputs, enums } from "../../types"; +import * as utilities from "../../utilities"; + +/** + * CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + * + * For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + * + * The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + * + * The producer of these objects can decide which approach is more suitable. + * + * They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + */ +export class CSIStorageCapacity extends pulumi.CustomResource { + /** + * Get an existing CSIStorageCapacity resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): CSIStorageCapacity { + return new CSIStorageCapacity(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity'; + + /** + * Returns true if the given object is an instance of CSIStorageCapacity. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is CSIStorageCapacity { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === CSIStorageCapacity.__pulumiType; + } + + /** + * 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 + */ + public readonly apiVersion!: pulumi.Output<"storage.k8s.io/v1beta1">; + /** + * Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + */ + public readonly capacity!: pulumi.Output; + /** + * 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 + */ + public readonly kind!: pulumi.Output<"CSIStorageCapacity">; + /** + * MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + */ + public readonly maximumVolumeSize!: pulumi.Output; + /** + * Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + * + * Objects are namespaced. + * + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + public readonly metadata!: pulumi.Output; + /** + * NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + */ + public readonly nodeTopology!: pulumi.Output; + /** + * The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + */ + public readonly storageClassName!: pulumi.Output; + + /** + * Create a CSIStorageCapacity resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: CSIStorageCapacityArgs, opts?: pulumi.CustomResourceOptions) { + let inputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + if ((!args || args.storageClassName === undefined) && !opts.urn) { + throw new Error("Missing required property 'storageClassName'"); + } + inputs["apiVersion"] = "storage.k8s.io/v1beta1"; + inputs["capacity"] = args ? args.capacity : undefined; + inputs["kind"] = "CSIStorageCapacity"; + inputs["maximumVolumeSize"] = args ? args.maximumVolumeSize : undefined; + inputs["metadata"] = args ? args.metadata : undefined; + inputs["nodeTopology"] = args ? args.nodeTopology : undefined; + inputs["storageClassName"] = args ? args.storageClassName : undefined; + } else { + inputs["apiVersion"] = undefined /*out*/; + inputs["capacity"] = undefined /*out*/; + inputs["kind"] = undefined /*out*/; + inputs["maximumVolumeSize"] = undefined /*out*/; + inputs["metadata"] = undefined /*out*/; + inputs["nodeTopology"] = undefined /*out*/; + inputs["storageClassName"] = undefined /*out*/; + } + if (!opts.version) { + opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); + } + const aliasOpts = { aliases: [{ type: "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity" }] }; + opts = pulumi.mergeOptions(opts, aliasOpts); + super(CSIStorageCapacity.__pulumiType, name, inputs, opts); + } +} + +/** + * The set of arguments for constructing a CSIStorageCapacity resource. + */ +export interface CSIStorageCapacityArgs { + /** + * 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 + */ + readonly apiVersion?: pulumi.Input<"storage.k8s.io/v1beta1">; + /** + * Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + */ + readonly capacity?: pulumi.Input; + /** + * 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 + */ + readonly kind?: pulumi.Input<"CSIStorageCapacity">; + /** + * MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + */ + readonly maximumVolumeSize?: pulumi.Input; + /** + * Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + * + * Objects are namespaced. + * + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + readonly metadata?: pulumi.Input; + /** + * NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + */ + readonly nodeTopology?: pulumi.Input; + /** + * The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + */ + readonly storageClassName: pulumi.Input; +} diff --git a/sdk/nodejs/storage/v1beta1/csistorageCapacityList.ts b/sdk/nodejs/storage/v1beta1/csistorageCapacityList.ts new file mode 100644 index 0000000000..51a3bb56da --- /dev/null +++ b/sdk/nodejs/storage/v1beta1/csistorageCapacityList.ts @@ -0,0 +1,106 @@ +// *** WARNING: this file was generated by pulumigen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import { input as inputs, output as outputs, enums } from "../../types"; +import * as utilities from "../../utilities"; + +/** + * CSIStorageCapacityList is a collection of CSIStorageCapacity objects. + */ +export class CSIStorageCapacityList extends pulumi.CustomResource { + /** + * Get an existing CSIStorageCapacityList resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): CSIStorageCapacityList { + return new CSIStorageCapacityList(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList'; + + /** + * Returns true if the given object is an instance of CSIStorageCapacityList. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is CSIStorageCapacityList { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === CSIStorageCapacityList.__pulumiType; + } + + /** + * 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 + */ + public readonly apiVersion!: pulumi.Output<"storage.k8s.io/v1beta1">; + /** + * Items is the list of CSIStorageCapacity objects. + */ + public readonly items!: pulumi.Output; + /** + * 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 + */ + public readonly kind!: pulumi.Output<"CSIStorageCapacityList">; + /** + * Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + public readonly metadata!: pulumi.Output; + + /** + * Create a CSIStorageCapacityList resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: CSIStorageCapacityListArgs, opts?: pulumi.CustomResourceOptions) { + let inputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + if ((!args || args.items === undefined) && !opts.urn) { + throw new Error("Missing required property 'items'"); + } + inputs["apiVersion"] = "storage.k8s.io/v1beta1"; + inputs["items"] = args ? args.items : undefined; + inputs["kind"] = "CSIStorageCapacityList"; + inputs["metadata"] = args ? args.metadata : undefined; + } else { + inputs["apiVersion"] = undefined /*out*/; + inputs["items"] = undefined /*out*/; + inputs["kind"] = undefined /*out*/; + inputs["metadata"] = undefined /*out*/; + } + if (!opts.version) { + opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()}); + } + super(CSIStorageCapacityList.__pulumiType, name, inputs, opts); + } +} + +/** + * The set of arguments for constructing a CSIStorageCapacityList resource. + */ +export interface CSIStorageCapacityListArgs { + /** + * 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 + */ + readonly apiVersion?: pulumi.Input<"storage.k8s.io/v1beta1">; + /** + * Items is the list of CSIStorageCapacity objects. + */ + readonly items: pulumi.Input[]>; + /** + * 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 + */ + readonly kind?: pulumi.Input<"CSIStorageCapacityList">; + /** + * Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + readonly metadata?: pulumi.Input; +} diff --git a/sdk/nodejs/storage/v1beta1/index.ts b/sdk/nodejs/storage/v1beta1/index.ts index 1f48953478..edd7f45931 100644 --- a/sdk/nodejs/storage/v1beta1/index.ts +++ b/sdk/nodejs/storage/v1beta1/index.ts @@ -9,6 +9,8 @@ export * from "./csidriver"; export * from "./csidriverList"; export * from "./csinode"; export * from "./csinodeList"; +export * from "./csistorageCapacity"; +export * from "./csistorageCapacityList"; export * from "./storageClass"; export * from "./storageClassList"; export * from "./volumeAttachment"; @@ -19,6 +21,8 @@ import { CSIDriver } from "./csidriver"; import { CSIDriverList } from "./csidriverList"; import { CSINode } from "./csinode"; import { CSINodeList } from "./csinodeList"; +import { CSIStorageCapacity } from "./csistorageCapacity"; +import { CSIStorageCapacityList } from "./csistorageCapacityList"; import { StorageClass } from "./storageClass"; import { StorageClassList } from "./storageClassList"; import { VolumeAttachment } from "./volumeAttachment"; @@ -36,6 +40,10 @@ const _module = { return new CSINode(name, undefined, { urn }) case "kubernetes:storage.k8s.io/v1beta1:CSINodeList": return new CSINodeList(name, undefined, { urn }) + case "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity": + return new CSIStorageCapacity(name, undefined, { urn }) + case "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList": + return new CSIStorageCapacityList(name, undefined, { urn }) case "kubernetes:storage.k8s.io/v1beta1:StorageClass": return new StorageClass(name, undefined, { urn }) case "kubernetes:storage.k8s.io/v1beta1:StorageClassList": diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index f114efa42a..fee3d6583e 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -101,6 +101,8 @@ "autoscaling/v2beta2/horizontalPodAutoscalerList.ts", "autoscaling/v2beta2/index.ts", "batch/index.ts", + "batch/v1/cronJob.ts", + "batch/v1/cronJobList.ts", "batch/v1/index.ts", "batch/v1/job.ts", "batch/v1/jobList.ts", @@ -130,6 +132,7 @@ "core/v1/configMapList.ts", "core/v1/endpoints.ts", "core/v1/endpointsList.ts", + "core/v1/ephemeralContainers.ts", "core/v1/event.ts", "core/v1/eventList.ts", "core/v1/index.ts", @@ -158,6 +161,9 @@ "core/v1/serviceAccountList.ts", "core/v1/serviceList.ts", "discovery/index.ts", + "discovery/v1/endpointSlice.ts", + "discovery/v1/endpointSliceList.ts", + "discovery/v1/index.ts", "discovery/v1beta1/endpointSlice.ts", "discovery/v1beta1/endpointSliceList.ts", "discovery/v1beta1/index.ts", @@ -228,6 +234,9 @@ "node/v1beta1/runtimeClass.ts", "node/v1beta1/runtimeClassList.ts", "policy/index.ts", + "policy/v1/index.ts", + "policy/v1/podDisruptionBudget.ts", + "policy/v1/podDisruptionBudgetList.ts", "policy/v1beta1/index.ts", "policy/v1beta1/podDisruptionBudget.ts", "policy/v1beta1/podDisruptionBudgetList.ts", @@ -286,6 +295,8 @@ "storage/v1/storageClassList.ts", "storage/v1/volumeAttachment.ts", "storage/v1/volumeAttachmentList.ts", + "storage/v1alpha1/csistorageCapacity.ts", + "storage/v1alpha1/csistorageCapacityList.ts", "storage/v1alpha1/index.ts", "storage/v1alpha1/volumeAttachment.ts", "storage/v1alpha1/volumeAttachmentList.ts", @@ -293,6 +304,8 @@ "storage/v1beta1/csidriverList.ts", "storage/v1beta1/csinode.ts", "storage/v1beta1/csinodeList.ts", + "storage/v1beta1/csistorageCapacity.ts", + "storage/v1beta1/csistorageCapacityList.ts", "storage/v1beta1/index.ts", "storage/v1beta1/storageClass.ts", "storage/v1beta1/storageClassList.ts", diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index fd74905069..a3c82f1b9d 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -89,7 +89,7 @@ export namespace admissionregistration { */ rules?: pulumi.Input[]>; /** - * 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 change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + * SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. */ sideEffects: pulumi.Input; /** @@ -247,7 +247,7 @@ export namespace admissionregistration { */ rules?: pulumi.Input[]>; /** - * 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 change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + * SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. */ sideEffects: pulumi.Input; /** @@ -393,7 +393,7 @@ export namespace admissionregistration { */ rules?: pulumi.Input[]>; /** - * SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + * SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. */ sideEffects?: pulumi.Input; /** @@ -551,7 +551,7 @@ export namespace admissionregistration { */ rules?: pulumi.Input[]>; /** - * SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + * SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. */ sideEffects?: pulumi.Input; /** @@ -2165,7 +2165,11 @@ export namespace apps { */ export interface RollingUpdateDaemonSet { /** - * The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + * The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. + */ + maxSurge?: pulumi.Input; + /** + * The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. */ maxUnavailable?: pulumi.Input; } @@ -4732,6 +4736,84 @@ export namespace autoscaling { export namespace batch { export namespace v1 { + /** + * CronJob represents the configuration of a single cron job. + */ + export interface CronJob { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + apiVersion?: pulumi.Input<"batch/v1">; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + kind?: pulumi.Input<"CronJob">; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata?: pulumi.Input; + /** + * Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + spec?: pulumi.Input; + /** + * Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + status?: pulumi.Input; + } + + /** + * CronJobSpec describes how the job execution will look like and when it will actually run. + */ + export interface CronJobSpec { + /** + * Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one + */ + concurrencyPolicy?: pulumi.Input; + /** + * The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. + */ + failedJobsHistoryLimit?: pulumi.Input; + /** + * Specifies the job that will be created when executing a CronJob. + */ + jobTemplate: pulumi.Input; + /** + * The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + */ + schedule: pulumi.Input; + /** + * Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. + */ + startingDeadlineSeconds?: pulumi.Input; + /** + * The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. + */ + successfulJobsHistoryLimit?: pulumi.Input; + /** + * This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. + */ + suspend?: pulumi.Input; + } + + /** + * CronJobStatus represents the current state of a cron job. + */ + export interface CronJobStatus { + /** + * A list of pointers to currently running jobs. + */ + active?: pulumi.Input[]>; + /** + * Information when was the last time the job was successfully scheduled. + */ + lastScheduleTime?: pulumi.Input; + /** + * Information when was the last time the job successfully completed. + */ + lastSuccessfulTime?: pulumi.Input; + } + /** * Job represents the configuration of a single job. * @@ -4808,13 +4890,23 @@ export namespace batch { */ export interface JobSpec { /** - * Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer + * Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. */ activeDeadlineSeconds?: pulumi.Input; /** * Specifies the number of retries before marking this job failed. Defaults to 6 */ backoffLimit?: pulumi.Input; + /** + * CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. + * + * `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. + * + * `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. + * + * This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. + */ + completionMode?: pulumi.Input; /** * Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ */ @@ -4831,6 +4923,10 @@ export namespace batch { * A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors */ selector?: pulumi.Input; + /** + * Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. + */ + suspend?: pulumi.Input; /** * Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ */ @@ -4849,12 +4945,16 @@ export namespace batch { * The number of actively running pods. */ active?: pulumi.Input; + /** + * CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". + */ + completedIndexes?: pulumi.Input; /** * Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. */ completionTime?: pulumi.Input; /** - * The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + * The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ */ conditions?: pulumi.Input[]>; /** @@ -4862,7 +4962,7 @@ export namespace batch { */ failed?: pulumi.Input; /** - * Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. + * Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. */ startTime?: pulumi.Input; /** @@ -4870,6 +4970,20 @@ export namespace batch { */ succeeded?: pulumi.Input; } + + /** + * JobTemplateSpec describes the data a Job should have when created from a template + */ + export interface JobTemplateSpec { + /** + * Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata?: pulumi.Input; + /** + * Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + spec?: pulumi.Input; + } } export namespace v1beta1 { @@ -4945,6 +5059,10 @@ export namespace batch { * Information when was the last time the job was successfully scheduled. */ lastScheduleTime?: pulumi.Input; + /** + * Information when was the last time the job successfully completed. + */ + lastSuccessfulTime?: pulumi.Input; } /** @@ -5799,7 +5917,7 @@ export namespace core { */ data?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + * Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. */ immutable?: pulumi.Input; /** @@ -5965,7 +6083,7 @@ export namespace core { */ readinessProbe?: pulumi.Input; /** - * Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + * Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ resources?: pulumi.Input; /** @@ -6500,10 +6618,6 @@ export namespace core { * Represents an ephemeral volume that is handled by a normal storage driver. */ export interface EphemeralVolumeSource { - /** - * Specifies a read-only configuration for the volume. Defaults to false (read/write). - */ - readOnly?: pulumi.Input; /** * Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). * @@ -7953,7 +8067,11 @@ export namespace core { */ labelSelector?: pulumi.Input; /** - * namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" + * A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + */ + namespaceSelector?: pulumi.Input; + /** + * namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" */ namespaces?: pulumi.Input[]>; /** @@ -8235,7 +8353,7 @@ export namespace core { */ subdomain?: pulumi.Input; /** - * Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + * Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. */ terminationGracePeriodSeconds?: pulumi.Input; /** @@ -8432,6 +8550,10 @@ export namespace core { * TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported */ tcpSocket?: pulumi.Input; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. + */ + terminationGracePeriodSeconds?: pulumi.Input; /** * Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes */ @@ -8743,11 +8865,11 @@ export namespace core { */ export interface ResourceRequirements { /** - * Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + * Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ limits?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + * Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ requests?: pulumi.Input<{[key: string]: pulumi.Input}>; } @@ -8933,7 +9055,7 @@ export namespace core { */ data?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + * Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. */ immutable?: pulumi.Input; /** @@ -8945,7 +9067,7 @@ export namespace core { */ metadata?: pulumi.Input; /** - * stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + * stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. */ stringData?: pulumi.Input<{[key: string]: pulumi.Input}>; /** @@ -9248,7 +9370,7 @@ export namespace core { */ externalIPs?: pulumi.Input[]>; /** - * externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be + * externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". */ externalName?: pulumi.Input; /** @@ -9259,6 +9381,10 @@ export namespace core { * healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type). */ healthCheckNodePort?: pulumi.Input; + /** + * InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". + */ + internalTrafficPolicy?: pulumi.Input; /** * IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the "IPv6DualStack" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are "IPv4" and "IPv6". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to "headless" services. This field will be wiped when updating a Service to type ExternalName. * @@ -9273,6 +9399,10 @@ export namespace core { * IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the "IPv6DualStack" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be "SingleStack" (a single IP family), "PreferDualStack" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or "RequireDualStack" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName. */ ipFamilyPolicy?: pulumi.Input; + /** + * loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. + */ + loadBalancerClass?: pulumi.Input; /** * Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. */ @@ -9302,7 +9432,7 @@ export namespace core { */ sessionAffinityConfig?: pulumi.Input; /** - * topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. + * topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. */ topologyKeys?: pulumi.Input[]>; /** @@ -9571,7 +9701,7 @@ export namespace core { */ emptyDir?: pulumi.Input; /** - * Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + * Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. * * Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity * tracking are needed, @@ -9585,6 +9715,8 @@ export namespace core { * Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. * * A pod can use both types of ephemeral volumes and persistent volumes at the same time. + * + * This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. */ ephemeral?: pulumi.Input; /** @@ -9802,6 +9934,136 @@ export namespace core { } export namespace discovery { + export namespace v1 { + /** + * Endpoint represents a single logical "backend" implementing a service. + */ + export interface Endpoint { + /** + * addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + */ + addresses: pulumi.Input[]>; + /** + * conditions contains information about the current status of the endpoint. + */ + conditions?: pulumi.Input; + /** + * deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. + */ + deprecatedTopology?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * hints contains information associated with how an endpoint should be consumed. + */ + hints?: pulumi.Input; + /** + * hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + */ + hostname?: pulumi.Input; + /** + * nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + */ + nodeName?: pulumi.Input; + /** + * targetRef is a reference to a Kubernetes object that represents this endpoint. + */ + targetRef?: pulumi.Input; + /** + * zone is the name of the Zone this endpoint exists in. + */ + zone?: pulumi.Input; + } + + /** + * EndpointConditions represents the current condition of an endpoint. + */ + export interface EndpointConditions { + /** + * ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + */ + ready?: pulumi.Input; + /** + * serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + */ + serving?: pulumi.Input; + /** + * terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + */ + terminating?: pulumi.Input; + } + + /** + * EndpointHints provides hints describing how an endpoint should be consumed. + */ + export interface EndpointHints { + /** + * forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + */ + forZones?: pulumi.Input[]>; + } + + /** + * EndpointPort represents a Port used by an EndpointSlice + */ + export interface EndpointPort { + /** + * The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + */ + appProtocol?: pulumi.Input; + /** + * The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. + */ + name?: pulumi.Input; + /** + * The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. + */ + port?: pulumi.Input; + /** + * The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. + */ + protocol?: pulumi.Input; + } + + /** + * EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. + */ + export interface EndpointSlice { + /** + * addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + */ + addressType: pulumi.Input; + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + apiVersion?: pulumi.Input<"discovery.k8s.io/v1">; + /** + * endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + */ + endpoints: pulumi.Input[]>; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + kind?: pulumi.Input<"EndpointSlice">; + /** + * Standard object's metadata. + */ + metadata?: pulumi.Input; + /** + * ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + */ + ports?: pulumi.Input[]>; + } + + /** + * ForZone provides information about which zones should consume this endpoint. + */ + export interface ForZone { + /** + * name represents the name of the zone. + */ + name: pulumi.Input; + } + } + export namespace v1beta1 { /** * Endpoint represents a single logical "backend" implementing a service. @@ -9815,6 +10077,10 @@ export namespace discovery { * conditions contains information about the current status of the endpoint. */ conditions?: pulumi.Input; + /** + * hints contains information associated with how an endpoint should be consumed. + */ + hints?: pulumi.Input; /** * hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. */ @@ -9858,6 +10124,16 @@ export namespace discovery { terminating?: pulumi.Input; } + /** + * EndpointHints provides hints describing how an endpoint should be consumed. + */ + export interface EndpointHints { + /** + * forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. + */ + forZones?: pulumi.Input[]>; + } + /** * EndpointPort represents a Port used by an EndpointSlice */ @@ -9910,6 +10186,15 @@ export namespace discovery { ports?: pulumi.Input[]>; } + /** + * ForZone provides information about which zones should consume this endpoint. + */ + export interface ForZone { + /** + * name represents the name of the zone. + */ + name: pulumi.Input; + } } } @@ -9951,7 +10236,10 @@ export namespace events { * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ kind?: pulumi.Input<"Event">; - metadata: pulumi.Input; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata?: pulumi.Input; /** * note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. */ @@ -10038,7 +10326,10 @@ export namespace events { * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ kind?: pulumi.Input<"Event">; - metadata: pulumi.Input; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata?: pulumi.Input; /** * note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. */ @@ -11177,7 +11468,7 @@ export namespace flowcontrol { */ distinguisherMethod?: pulumi.Input; /** - * `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. + * `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. */ matchingPrecedence?: pulumi.Input; /** @@ -12215,6 +12506,32 @@ export namespace networking { spec?: pulumi.Input; } + /** + * IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + */ + export interface IngressClassParametersReference { + /** + * APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + */ + apiGroup?: pulumi.Input; + /** + * Kind is the type of resource being referenced. + */ + kind: pulumi.Input; + /** + * Name is the name of resource being referenced. + */ + name: pulumi.Input; + /** + * Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + */ + namespace?: pulumi.Input; + /** + * Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + */ + scope?: pulumi.Input; + } + /** * IngressClassSpec provides information about the class of an Ingress. */ @@ -12226,7 +12543,7 @@ export namespace networking { /** * Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. */ - parameters?: pulumi.Input; + parameters?: pulumi.Input; } /** @@ -12384,7 +12701,11 @@ export namespace networking { */ export interface NetworkPolicyPort { /** - * The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + * If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate "NetworkPolicyEndPort". + */ + endPort?: pulumi.Input; + /** + * The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. */ port?: pulumi.Input; /** @@ -12410,7 +12731,7 @@ export namespace networking { */ podSelector: pulumi.Input; /** - * List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + * List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 */ policyTypes?: pulumi.Input[]>; } @@ -12549,6 +12870,32 @@ export namespace networking { spec?: pulumi.Input; } + /** + * IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + */ + export interface IngressClassParametersReference { + /** + * APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + */ + apiGroup?: pulumi.Input; + /** + * Kind is the type of resource being referenced. + */ + kind: pulumi.Input; + /** + * Name is the name of resource being referenced. + */ + name: pulumi.Input; + /** + * Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + */ + namespace?: pulumi.Input; + /** + * Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + */ + scope?: pulumi.Input; + } + /** * IngressClassSpec provides information about the class of an Ingress. */ @@ -12560,7 +12907,7 @@ export namespace networking { /** * Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. */ - parameters?: pulumi.Input; + parameters?: pulumi.Input; } /** @@ -12817,6 +13164,94 @@ export namespace pkg { } export namespace policy { + export namespace v1 { + /** + * PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods + */ + export interface PodDisruptionBudget { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + apiVersion?: pulumi.Input<"policy/v1">; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + kind?: pulumi.Input<"PodDisruptionBudget">; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata?: pulumi.Input; + /** + * Specification of the desired behavior of the PodDisruptionBudget. + */ + spec?: pulumi.Input; + /** + * Most recently observed status of the PodDisruptionBudget. + */ + status?: pulumi.Input; + } + + /** + * PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. + */ + export interface PodDisruptionBudgetSpec { + /** + * An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + */ + maxUnavailable?: pulumi.Input; + /** + * An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + */ + minAvailable?: pulumi.Input; + /** + * Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. + */ + selector?: pulumi.Input; + } + + /** + * PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. + */ + export interface PodDisruptionBudgetStatus { + /** + * Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + * the number of allowed disruptions. Therefore no disruptions are + * allowed and the status of the condition will be False. + * - InsufficientPods: The number of pods are either at or below the number + * required by the PodDisruptionBudget. No disruptions are + * allowed and the status of the condition will be False. + * - SufficientPods: There are more pods than required by the PodDisruptionBudget. + * The condition will be True, and the number of allowed + * disruptions are provided by the disruptionsAllowed property. + */ + conditions?: pulumi.Input[]>; + /** + * current number of healthy pods + */ + currentHealthy: pulumi.Input; + /** + * minimum desired number of healthy pods + */ + desiredHealthy: pulumi.Input; + /** + * DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. + */ + disruptedPods?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * Number of pod disruptions that are currently allowed. + */ + disruptionsAllowed: pulumi.Input; + /** + * total number of pods counted by this disruption budget + */ + expectedPods: pulumi.Input; + /** + * Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. + */ + observedGeneration?: pulumi.Input; + } + } + export namespace v1beta1 { /** * AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used. @@ -12932,7 +13367,7 @@ export namespace policy { */ minAvailable?: pulumi.Input; /** - * Label query over pods whose evictions are managed by the disruption budget. + * Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. */ selector?: pulumi.Input; } @@ -12941,6 +13376,18 @@ export namespace policy { * PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. */ export interface PodDisruptionBudgetStatus { + /** + * Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + * the number of allowed disruptions. Therefore no disruptions are + * allowed and the status of the condition will be False. + * - InsufficientPods: The number of pods are either at or below the number + * required by the PodDisruptionBudget. No disruptions are + * allowed and the status of the condition will be False. + * - SufficientPods: There are more pods than required by the PodDisruptionBudget. + * The condition will be True, and the number of allowed + * disruptions are provided by the disruptionsAllowed property. + */ + conditions?: pulumi.Input[]>; /** * current number of healthy pods */ @@ -12968,7 +13415,7 @@ export namespace policy { } /** - * PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. + * PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. */ export interface PodSecurityPolicy { /** @@ -13892,17 +14339,23 @@ export namespace storage { export interface CSIDriverSpec { /** * attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + * + * This field is immutable. */ attachRequired?: pulumi.Input; /** * Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + * + * This field is immutable. */ fsGroupPolicy?: pulumi.Input; /** - * If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + * If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume * defined by a CSIVolumeSource, otherwise "false" * * "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + * + * This field is immutable. */ podInfoOnMount?: pulumi.Input; /** @@ -13910,7 +14363,7 @@ export namespace storage { * * Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. * - * This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + * This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. */ requiresRepublish?: pulumi.Input; /** @@ -13920,7 +14373,9 @@ export namespace storage { * * Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. * - * This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + * This field is immutable. + * + * This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. */ storageCapacity?: pulumi.Input; /** @@ -13934,11 +14389,13 @@ export namespace storage { * * Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. * - * This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + * This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. */ tokenRequests?: pulumi.Input[]>; /** * volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. + * + * This field is immutable. */ volumeLifecycleModes?: pulumi.Input[]>; } @@ -14092,7 +14549,7 @@ export namespace storage { */ export interface VolumeAttachmentSource { /** - * inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + * inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. */ inlineVolumeSpec?: pulumi.Input; /** @@ -14167,6 +14624,56 @@ export namespace storage { } export namespace v1alpha1 { + /** + * CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + * + * For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + * + * The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + * + * The producer of these objects can decide which approach is more suitable. + * + * They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + */ + export interface CSIStorageCapacity { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + apiVersion?: pulumi.Input<"storage.k8s.io/v1alpha1">; + /** + * Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + */ + capacity?: pulumi.Input; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + kind?: pulumi.Input<"CSIStorageCapacity">; + /** + * MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + */ + maximumVolumeSize?: pulumi.Input; + /** + * Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + * + * Objects are namespaced. + * + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata?: pulumi.Input; + /** + * NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + */ + nodeTopology?: pulumi.Input; + /** + * The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + */ + storageClassName: pulumi.Input; + } + /** * VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. * @@ -14293,17 +14800,23 @@ export namespace storage { export interface CSIDriverSpec { /** * attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + * + * This field is immutable. */ attachRequired?: pulumi.Input; /** * Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + * + * This field is immutable. */ fsGroupPolicy?: pulumi.Input; /** - * If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + * If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume * defined by a CSIVolumeSource, otherwise "false" * * "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + * + * This field is immutable. */ podInfoOnMount?: pulumi.Input; /** @@ -14311,7 +14824,7 @@ export namespace storage { * * Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. * - * This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + * This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. */ requiresRepublish?: pulumi.Input; /** @@ -14321,7 +14834,9 @@ export namespace storage { * * Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. * - * This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + * This field is immutable. + * + * This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. */ storageCapacity?: pulumi.Input; /** @@ -14335,11 +14850,13 @@ export namespace storage { * * Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. * - * This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + * This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. */ tokenRequests?: pulumi.Input[]>; /** * VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. + * + * This field is immutable. */ volumeLifecycleModes?: pulumi.Input[]>; } @@ -14398,6 +14915,56 @@ export namespace storage { drivers: pulumi.Input[]>; } + /** + * CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + * + * For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + * + * The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + * + * The producer of these objects can decide which approach is more suitable. + * + * They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + */ + export interface CSIStorageCapacity { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + apiVersion?: pulumi.Input<"storage.k8s.io/v1beta1">; + /** + * Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + */ + capacity?: pulumi.Input; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + kind?: pulumi.Input<"CSIStorageCapacity">; + /** + * MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + */ + maximumVolumeSize?: pulumi.Input; + /** + * Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + * + * Objects are namespaced. + * + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata?: pulumi.Input; + /** + * NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + */ + nodeTopology?: pulumi.Input; + /** + * The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + */ + storageClassName: pulumi.Input; + } + /** * StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. * @@ -14493,7 +15060,7 @@ export namespace storage { */ export interface VolumeAttachmentSource { /** - * inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + * inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. */ inlineVolumeSpec?: pulumi.Input; /** diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index b8879a2af2..52967a2abb 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -89,7 +89,7 @@ export namespace admissionregistration { */ rules: outputs.admissionregistration.v1.RuleWithOperations[]; /** - * 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 change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + * SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. */ sideEffects: string; /** @@ -247,7 +247,7 @@ export namespace admissionregistration { */ rules: outputs.admissionregistration.v1.RuleWithOperations[]; /** - * 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 change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + * SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. */ sideEffects: string; /** @@ -393,7 +393,7 @@ export namespace admissionregistration { */ rules: outputs.admissionregistration.v1beta1.RuleWithOperations[]; /** - * SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + * SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. */ sideEffects: string; /** @@ -551,7 +551,7 @@ export namespace admissionregistration { */ rules: outputs.admissionregistration.v1beta1.RuleWithOperations[]; /** - * SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + * SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. */ sideEffects: string; /** @@ -2165,7 +2165,11 @@ export namespace apps { */ export interface RollingUpdateDaemonSet { /** - * The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + * The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. + */ + maxSurge: number | string; + /** + * The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. */ maxUnavailable: number | string; } @@ -4992,6 +4996,84 @@ export namespace autoscaling { export namespace batch { export namespace v1 { + /** + * CronJob represents the configuration of a single cron job. + */ + export interface CronJob { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + apiVersion: "batch/v1"; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + kind: "CronJob"; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata: outputs.meta.v1.ObjectMeta; + /** + * Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + spec: outputs.batch.v1.CronJobSpec; + /** + * Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + status: outputs.batch.v1.CronJobStatus; + } + + /** + * CronJobSpec describes how the job execution will look like and when it will actually run. + */ + export interface CronJobSpec { + /** + * Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one + */ + concurrencyPolicy: string; + /** + * The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. + */ + failedJobsHistoryLimit: number; + /** + * Specifies the job that will be created when executing a CronJob. + */ + jobTemplate: outputs.batch.v1.JobTemplateSpec; + /** + * The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + */ + schedule: string; + /** + * Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. + */ + startingDeadlineSeconds: number; + /** + * The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. + */ + successfulJobsHistoryLimit: number; + /** + * This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. + */ + suspend: boolean; + } + + /** + * CronJobStatus represents the current state of a cron job. + */ + export interface CronJobStatus { + /** + * A list of pointers to currently running jobs. + */ + active: outputs.core.v1.ObjectReference[]; + /** + * Information when was the last time the job was successfully scheduled. + */ + lastScheduleTime: string; + /** + * Information when was the last time the job successfully completed. + */ + lastSuccessfulTime: string; + } + /** * Job represents the configuration of a single job. * @@ -5068,13 +5150,23 @@ export namespace batch { */ export interface JobSpec { /** - * Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer + * Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. */ activeDeadlineSeconds: number; /** * Specifies the number of retries before marking this job failed. Defaults to 6 */ backoffLimit: number; + /** + * CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. + * + * `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. + * + * `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. + * + * This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. + */ + completionMode: string; /** * Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ */ @@ -5091,6 +5183,10 @@ export namespace batch { * A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors */ selector: outputs.meta.v1.LabelSelector; + /** + * Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. + */ + suspend: boolean; /** * Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ */ @@ -5109,12 +5205,16 @@ export namespace batch { * The number of actively running pods. */ active: number; + /** + * CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". + */ + completedIndexes: string; /** * Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. */ completionTime: string; /** - * The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + * The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ */ conditions: outputs.batch.v1.JobCondition[]; /** @@ -5122,7 +5222,7 @@ export namespace batch { */ failed: number; /** - * Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. + * Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. */ startTime: string; /** @@ -5130,6 +5230,20 @@ export namespace batch { */ succeeded: number; } + + /** + * JobTemplateSpec describes the data a Job should have when created from a template + */ + export interface JobTemplateSpec { + /** + * Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata: outputs.meta.v1.ObjectMeta; + /** + * Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + spec: outputs.batch.v1.JobSpec; + } } export namespace v1beta1 { @@ -5205,6 +5319,10 @@ export namespace batch { * Information when was the last time the job was successfully scheduled. */ lastScheduleTime: string; + /** + * Information when was the last time the job successfully completed. + */ + lastSuccessfulTime: string; } /** @@ -6059,7 +6177,7 @@ export namespace core { */ data: {[key: string]: string}; /** - * Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + * Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. */ immutable: boolean; /** @@ -6225,7 +6343,7 @@ export namespace core { */ readinessProbe: outputs.core.v1.Probe; /** - * Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + * Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ resources: outputs.core.v1.ResourceRequirements; /** @@ -6760,10 +6878,6 @@ export namespace core { * Represents an ephemeral volume that is handled by a normal storage driver. */ export interface EphemeralVolumeSource { - /** - * Specifies a read-only configuration for the volume. Defaults to false (read/write). - */ - readOnly: boolean; /** * Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). * @@ -8213,7 +8327,11 @@ export namespace core { */ labelSelector: outputs.meta.v1.LabelSelector; /** - * namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" + * A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + */ + namespaceSelector: outputs.meta.v1.LabelSelector; + /** + * namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" */ namespaces: string[]; /** @@ -8495,7 +8613,7 @@ export namespace core { */ subdomain: string; /** - * Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + * Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. */ terminationGracePeriodSeconds: number; /** @@ -8692,6 +8810,10 @@ export namespace core { * TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported */ tcpSocket: outputs.core.v1.TCPSocketAction; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. + */ + terminationGracePeriodSeconds: number; /** * Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes */ @@ -9003,11 +9125,11 @@ export namespace core { */ export interface ResourceRequirements { /** - * Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + * Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ limits: {[key: string]: string}; /** - * Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + * Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ requests: {[key: string]: string}; } @@ -9193,7 +9315,7 @@ export namespace core { */ data: {[key: string]: string}; /** - * Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + * Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. */ immutable: boolean; /** @@ -9205,7 +9327,7 @@ export namespace core { */ metadata: outputs.meta.v1.ObjectMeta; /** - * stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + * stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. */ stringData: {[key: string]: string}; /** @@ -9508,7 +9630,7 @@ export namespace core { */ externalIPs: string[]; /** - * externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be + * externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". */ externalName: string; /** @@ -9519,6 +9641,10 @@ export namespace core { * healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type). */ healthCheckNodePort: number; + /** + * InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". + */ + internalTrafficPolicy: string; /** * IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the "IPv6DualStack" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are "IPv4" and "IPv6". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to "headless" services. This field will be wiped when updating a Service to type ExternalName. * @@ -9533,6 +9659,10 @@ export namespace core { * IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the "IPv6DualStack" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be "SingleStack" (a single IP family), "PreferDualStack" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or "RequireDualStack" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName. */ ipFamilyPolicy: string; + /** + * loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. + */ + loadBalancerClass: string; /** * Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. */ @@ -9562,7 +9692,7 @@ export namespace core { */ sessionAffinityConfig: outputs.core.v1.SessionAffinityConfig; /** - * topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. + * topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. */ topologyKeys: string[]; /** @@ -9831,7 +9961,7 @@ export namespace core { */ emptyDir: outputs.core.v1.EmptyDirVolumeSource; /** - * Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + * Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. * * Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity * tracking are needed, @@ -9845,6 +9975,8 @@ export namespace core { * Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. * * A pod can use both types of ephemeral volumes and persistent volumes at the same time. + * + * This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. */ ephemeral: outputs.core.v1.EphemeralVolumeSource; /** @@ -10062,6 +10194,136 @@ export namespace core { } export namespace discovery { + export namespace v1 { + /** + * Endpoint represents a single logical "backend" implementing a service. + */ + export interface Endpoint { + /** + * addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + */ + addresses: string[]; + /** + * conditions contains information about the current status of the endpoint. + */ + conditions: outputs.discovery.v1.EndpointConditions; + /** + * deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. + */ + deprecatedTopology: {[key: string]: string}; + /** + * hints contains information associated with how an endpoint should be consumed. + */ + hints: outputs.discovery.v1.EndpointHints; + /** + * hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + */ + hostname: string; + /** + * nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + */ + nodeName: string; + /** + * targetRef is a reference to a Kubernetes object that represents this endpoint. + */ + targetRef: outputs.core.v1.ObjectReference; + /** + * zone is the name of the Zone this endpoint exists in. + */ + zone: string; + } + + /** + * EndpointConditions represents the current condition of an endpoint. + */ + export interface EndpointConditions { + /** + * ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + */ + ready: boolean; + /** + * serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + */ + serving: boolean; + /** + * terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + */ + terminating: boolean; + } + + /** + * EndpointHints provides hints describing how an endpoint should be consumed. + */ + export interface EndpointHints { + /** + * forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + */ + forZones: outputs.discovery.v1.ForZone[]; + } + + /** + * EndpointPort represents a Port used by an EndpointSlice + */ + export interface EndpointPort { + /** + * The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + */ + appProtocol: string; + /** + * The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. + */ + name: string; + /** + * The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. + */ + port: number; + /** + * The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. + */ + protocol: string; + } + + /** + * EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. + */ + export interface EndpointSlice { + /** + * addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + */ + addressType: string; + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + apiVersion: "discovery.k8s.io/v1"; + /** + * endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + */ + endpoints: outputs.discovery.v1.Endpoint[]; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + kind: "EndpointSlice"; + /** + * Standard object's metadata. + */ + metadata: outputs.meta.v1.ObjectMeta; + /** + * ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + */ + ports: outputs.discovery.v1.EndpointPort[]; + } + + /** + * ForZone provides information about which zones should consume this endpoint. + */ + export interface ForZone { + /** + * name represents the name of the zone. + */ + name: string; + } + } + export namespace v1beta1 { /** * Endpoint represents a single logical "backend" implementing a service. @@ -10075,6 +10337,10 @@ export namespace discovery { * conditions contains information about the current status of the endpoint. */ conditions: outputs.discovery.v1beta1.EndpointConditions; + /** + * hints contains information associated with how an endpoint should be consumed. + */ + hints: outputs.discovery.v1beta1.EndpointHints; /** * hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. */ @@ -10118,6 +10384,16 @@ export namespace discovery { terminating: boolean; } + /** + * EndpointHints provides hints describing how an endpoint should be consumed. + */ + export interface EndpointHints { + /** + * forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. + */ + forZones: outputs.discovery.v1beta1.ForZone[]; + } + /** * EndpointPort represents a Port used by an EndpointSlice */ @@ -10170,6 +10446,15 @@ export namespace discovery { ports: outputs.discovery.v1beta1.EndpointPort[]; } + /** + * ForZone provides information about which zones should consume this endpoint. + */ + export interface ForZone { + /** + * name represents the name of the zone. + */ + name: string; + } } } @@ -10211,6 +10496,9 @@ export namespace events { * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ kind: "Event"; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ metadata: outputs.meta.v1.ObjectMeta; /** * note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. @@ -10298,6 +10586,9 @@ export namespace events { * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ kind: "Event"; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ metadata: outputs.meta.v1.ObjectMeta; /** * note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. @@ -11437,7 +11728,7 @@ export namespace flowcontrol { */ distinguisherMethod: outputs.flowcontrol.v1alpha1.FlowDistinguisherMethod; /** - * `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. + * `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. */ matchingPrecedence: number; /** @@ -12475,6 +12766,32 @@ export namespace networking { spec: outputs.networking.v1.IngressClassSpec; } + /** + * IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + */ + export interface IngressClassParametersReference { + /** + * APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + */ + apiGroup: string; + /** + * Kind is the type of resource being referenced. + */ + kind: string; + /** + * Name is the name of resource being referenced. + */ + name: string; + /** + * Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + */ + namespace: string; + /** + * Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + */ + scope: string; + } + /** * IngressClassSpec provides information about the class of an Ingress. */ @@ -12486,7 +12803,7 @@ export namespace networking { /** * Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. */ - parameters: outputs.core.v1.TypedLocalObjectReference; + parameters: outputs.networking.v1.IngressClassParametersReference; } /** @@ -12644,7 +12961,11 @@ export namespace networking { */ export interface NetworkPolicyPort { /** - * The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + * If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate "NetworkPolicyEndPort". + */ + endPort: number; + /** + * The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. */ port: number | string; /** @@ -12670,7 +12991,7 @@ export namespace networking { */ podSelector: outputs.meta.v1.LabelSelector; /** - * List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + * List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 */ policyTypes: string[]; } @@ -12809,6 +13130,32 @@ export namespace networking { spec: outputs.networking.v1beta1.IngressClassSpec; } + /** + * IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + */ + export interface IngressClassParametersReference { + /** + * APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + */ + apiGroup: string; + /** + * Kind is the type of resource being referenced. + */ + kind: string; + /** + * Name is the name of resource being referenced. + */ + name: string; + /** + * Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + */ + namespace: string; + /** + * Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + */ + scope: string; + } + /** * IngressClassSpec provides information about the class of an Ingress. */ @@ -12820,7 +13167,7 @@ export namespace networking { /** * Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. */ - parameters: outputs.core.v1.TypedLocalObjectReference; + parameters: outputs.networking.v1beta1.IngressClassParametersReference; } /** @@ -13077,6 +13424,94 @@ export namespace pkg { } export namespace policy { + export namespace v1 { + /** + * PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods + */ + export interface PodDisruptionBudget { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + apiVersion: "policy/v1"; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + kind: "PodDisruptionBudget"; + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata: outputs.meta.v1.ObjectMeta; + /** + * Specification of the desired behavior of the PodDisruptionBudget. + */ + spec: outputs.policy.v1.PodDisruptionBudgetSpec; + /** + * Most recently observed status of the PodDisruptionBudget. + */ + status: outputs.policy.v1.PodDisruptionBudgetStatus; + } + + /** + * PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. + */ + export interface PodDisruptionBudgetSpec { + /** + * An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + */ + maxUnavailable: number | string; + /** + * An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + */ + minAvailable: number | string; + /** + * Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. + */ + selector: outputs.meta.v1.LabelSelector; + } + + /** + * PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. + */ + export interface PodDisruptionBudgetStatus { + /** + * Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + * the number of allowed disruptions. Therefore no disruptions are + * allowed and the status of the condition will be False. + * - InsufficientPods: The number of pods are either at or below the number + * required by the PodDisruptionBudget. No disruptions are + * allowed and the status of the condition will be False. + * - SufficientPods: There are more pods than required by the PodDisruptionBudget. + * The condition will be True, and the number of allowed + * disruptions are provided by the disruptionsAllowed property. + */ + conditions: outputs.meta.v1.Condition[]; + /** + * current number of healthy pods + */ + currentHealthy: number; + /** + * minimum desired number of healthy pods + */ + desiredHealthy: number; + /** + * DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. + */ + disruptedPods: {[key: string]: string}; + /** + * Number of pod disruptions that are currently allowed. + */ + disruptionsAllowed: number; + /** + * total number of pods counted by this disruption budget + */ + expectedPods: number; + /** + * Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. + */ + observedGeneration: number; + } + } + export namespace v1beta1 { /** * AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used. @@ -13192,7 +13627,7 @@ export namespace policy { */ minAvailable: number | string; /** - * Label query over pods whose evictions are managed by the disruption budget. + * Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. */ selector: outputs.meta.v1.LabelSelector; } @@ -13201,6 +13636,18 @@ export namespace policy { * PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. */ export interface PodDisruptionBudgetStatus { + /** + * Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + * the number of allowed disruptions. Therefore no disruptions are + * allowed and the status of the condition will be False. + * - InsufficientPods: The number of pods are either at or below the number + * required by the PodDisruptionBudget. No disruptions are + * allowed and the status of the condition will be False. + * - SufficientPods: There are more pods than required by the PodDisruptionBudget. + * The condition will be True, and the number of allowed + * disruptions are provided by the disruptionsAllowed property. + */ + conditions: outputs.meta.v1.Condition[]; /** * current number of healthy pods */ @@ -13228,7 +13675,7 @@ export namespace policy { } /** - * PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. + * PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. */ export interface PodSecurityPolicy { /** @@ -14152,17 +14599,23 @@ export namespace storage { export interface CSIDriverSpec { /** * attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + * + * This field is immutable. */ attachRequired: boolean; /** * Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + * + * This field is immutable. */ fsGroupPolicy: string; /** - * If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + * If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume * defined by a CSIVolumeSource, otherwise "false" * * "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + * + * This field is immutable. */ podInfoOnMount: boolean; /** @@ -14170,7 +14623,7 @@ export namespace storage { * * Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. * - * This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + * This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. */ requiresRepublish: boolean; /** @@ -14180,7 +14633,9 @@ export namespace storage { * * Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. * - * This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + * This field is immutable. + * + * This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. */ storageCapacity: boolean; /** @@ -14194,11 +14649,13 @@ export namespace storage { * * Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. * - * This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + * This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. */ tokenRequests: outputs.storage.v1.TokenRequest[]; /** * volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. + * + * This field is immutable. */ volumeLifecycleModes: string[]; } @@ -14352,7 +14809,7 @@ export namespace storage { */ export interface VolumeAttachmentSource { /** - * inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + * inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. */ inlineVolumeSpec: outputs.core.v1.PersistentVolumeSpec; /** @@ -14427,6 +14884,56 @@ export namespace storage { } export namespace v1alpha1 { + /** + * CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + * + * For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + * + * The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + * + * The producer of these objects can decide which approach is more suitable. + * + * They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + */ + export interface CSIStorageCapacity { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + apiVersion: "storage.k8s.io/v1alpha1"; + /** + * Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + */ + capacity: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + kind: "CSIStorageCapacity"; + /** + * MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + */ + maximumVolumeSize: string; + /** + * Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + * + * Objects are namespaced. + * + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata: outputs.meta.v1.ObjectMeta; + /** + * NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + */ + nodeTopology: outputs.meta.v1.LabelSelector; + /** + * The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + */ + storageClassName: string; + } + /** * VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. * @@ -14553,17 +15060,23 @@ export namespace storage { export interface CSIDriverSpec { /** * attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + * + * This field is immutable. */ attachRequired: boolean; /** * Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + * + * This field is immutable. */ fsGroupPolicy: string; /** - * If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + * If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume * defined by a CSIVolumeSource, otherwise "false" * * "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + * + * This field is immutable. */ podInfoOnMount: boolean; /** @@ -14571,7 +15084,7 @@ export namespace storage { * * Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. * - * This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + * This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. */ requiresRepublish: boolean; /** @@ -14581,7 +15094,9 @@ export namespace storage { * * Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. * - * This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + * This field is immutable. + * + * This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. */ storageCapacity: boolean; /** @@ -14595,11 +15110,13 @@ export namespace storage { * * Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. * - * This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + * This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. */ tokenRequests: outputs.storage.v1beta1.TokenRequest[]; /** * VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. + * + * This field is immutable. */ volumeLifecycleModes: string[]; } @@ -14658,6 +15175,56 @@ export namespace storage { drivers: outputs.storage.v1beta1.CSINodeDriver[]; } + /** + * CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + * + * For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + * + * The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + * + * The producer of these objects can decide which approach is more suitable. + * + * They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + */ + export interface CSIStorageCapacity { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + apiVersion: "storage.k8s.io/v1beta1"; + /** + * Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + */ + capacity: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + kind: "CSIStorageCapacity"; + /** + * MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + * + * This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + */ + maximumVolumeSize: string; + /** + * Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + * + * Objects are namespaced. + * + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + metadata: outputs.meta.v1.ObjectMeta; + /** + * NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + */ + nodeTopology: outputs.meta.v1.LabelSelector; + /** + * The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + */ + storageClassName: string; + } + /** * StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. * @@ -14753,7 +15320,7 @@ export namespace storage { */ export interface VolumeAttachmentSource { /** - * inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + * inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. */ inlineVolumeSpec: outputs.core.v1.PersistentVolumeSpec; /** diff --git a/sdk/nodejs/yaml/yaml.ts b/sdk/nodejs/yaml/yaml.ts index 77f262614f..129cd5e578 100644 --- a/sdk/nodejs/yaml/yaml.ts +++ b/sdk/nodejs/yaml/yaml.ts @@ -161,6 +161,10 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResource(groupVersionKind: "autoscaling/v2beta2/HorizontalPodAutoscaler", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "autoscaling/v2beta2/HorizontalPodAutoscalerList", name: string): pulumi.Output; public getResource(groupVersionKind: "autoscaling/v2beta2/HorizontalPodAutoscalerList", namespace: string, name: string): pulumi.Output; + public getResource(groupVersionKind: "batch/v1/CronJob", name: string): pulumi.Output; + public getResource(groupVersionKind: "batch/v1/CronJob", namespace: string, name: string): pulumi.Output; + public getResource(groupVersionKind: "batch/v1/CronJobList", name: string): pulumi.Output; + public getResource(groupVersionKind: "batch/v1/CronJobList", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "batch/v1/Job", name: string): pulumi.Output; public getResource(groupVersionKind: "batch/v1/Job", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "batch/v1/JobList", name: string): pulumi.Output; @@ -199,6 +203,8 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResource(groupVersionKind: "v1/Endpoints", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "v1/EndpointsList", name: string): pulumi.Output; public getResource(groupVersionKind: "v1/EndpointsList", namespace: string, name: string): pulumi.Output; + public getResource(groupVersionKind: "v1/EphemeralContainers", name: string): pulumi.Output; + public getResource(groupVersionKind: "v1/EphemeralContainers", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "v1/Event", name: string): pulumi.Output; public getResource(groupVersionKind: "v1/Event", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "v1/EventList", name: string): pulumi.Output; @@ -251,6 +257,10 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResource(groupVersionKind: "v1/ServiceAccountList", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "v1/ServiceList", name: string): pulumi.Output; public getResource(groupVersionKind: "v1/ServiceList", namespace: string, name: string): pulumi.Output; + public getResource(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", name: string): pulumi.Output; + public getResource(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", namespace: string, name: string): pulumi.Output; + public getResource(groupVersionKind: "discovery.k8s.io/v1/EndpointSliceList", name: string): pulumi.Output; + public getResource(groupVersionKind: "discovery.k8s.io/v1/EndpointSliceList", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "discovery.k8s.io/v1beta1/EndpointSlice", name: string): pulumi.Output; public getResource(groupVersionKind: "discovery.k8s.io/v1beta1/EndpointSlice", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "discovery.k8s.io/v1beta1/EndpointSliceList", name: string): pulumi.Output; @@ -337,6 +347,10 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResource(groupVersionKind: "node.k8s.io/v1beta1/RuntimeClass", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "node.k8s.io/v1beta1/RuntimeClassList", name: string): pulumi.Output; public getResource(groupVersionKind: "node.k8s.io/v1beta1/RuntimeClassList", namespace: string, name: string): pulumi.Output; + public getResource(groupVersionKind: "policy/v1/PodDisruptionBudget", name: string): pulumi.Output; + public getResource(groupVersionKind: "policy/v1/PodDisruptionBudget", namespace: string, name: string): pulumi.Output; + public getResource(groupVersionKind: "policy/v1/PodDisruptionBudgetList", name: string): pulumi.Output; + public getResource(groupVersionKind: "policy/v1/PodDisruptionBudgetList", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "policy/v1beta1/PodDisruptionBudget", name: string): pulumi.Output; public getResource(groupVersionKind: "policy/v1beta1/PodDisruptionBudget", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "policy/v1beta1/PodDisruptionBudgetList", name: string): pulumi.Output; @@ -425,6 +439,10 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResource(groupVersionKind: "storage.k8s.io/v1/VolumeAttachment", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "storage.k8s.io/v1/VolumeAttachmentList", name: string): pulumi.Output; public getResource(groupVersionKind: "storage.k8s.io/v1/VolumeAttachmentList", namespace: string, name: string): pulumi.Output; + public getResource(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", name: string): pulumi.Output; + public getResource(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", namespace: string, name: string): pulumi.Output; + public getResource(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacityList", name: string): pulumi.Output; + public getResource(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacityList", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "storage.k8s.io/v1alpha1/VolumeAttachment", name: string): pulumi.Output; public getResource(groupVersionKind: "storage.k8s.io/v1alpha1/VolumeAttachment", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "storage.k8s.io/v1alpha1/VolumeAttachmentList", name: string): pulumi.Output; @@ -437,6 +455,10 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResource(groupVersionKind: "storage.k8s.io/v1beta1/CSINode", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "storage.k8s.io/v1beta1/CSINodeList", name: string): pulumi.Output; public getResource(groupVersionKind: "storage.k8s.io/v1beta1/CSINodeList", namespace: string, name: string): pulumi.Output; + public getResource(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", name: string): pulumi.Output; + public getResource(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", namespace: string, name: string): pulumi.Output; + public getResource(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacityList", name: string): pulumi.Output; + public getResource(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacityList", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "storage.k8s.io/v1beta1/StorageClass", name: string): pulumi.Output; public getResource(groupVersionKind: "storage.k8s.io/v1beta1/StorageClass", namespace: string, name: string): pulumi.Output; public getResource(groupVersionKind: "storage.k8s.io/v1beta1/StorageClassList", name: string): pulumi.Output; @@ -1005,6 +1027,24 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResourceProperty(groupVersionKind: "autoscaling/v2beta2/HorizontalPodAutoscalerList", namespace: string, name: string, property: "kind"): pulumi.Output<"HorizontalPodAutoscalerList">; public getResourceProperty(groupVersionKind: "autoscaling/v2beta2/HorizontalPodAutoscalerList", name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "autoscaling/v2beta2/HorizontalPodAutoscalerList", namespace: string, name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "batch/v1/CronJob", name: string, property: "apiVersion"): pulumi.Output<"batch/v1">; + public getResourceProperty(groupVersionKind: "batch/v1/CronJob", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"batch/v1">; + public getResourceProperty(groupVersionKind: "batch/v1/CronJob", name: string, property: "kind"): pulumi.Output<"CronJob">; + public getResourceProperty(groupVersionKind: "batch/v1/CronJob", namespace: string, name: string, property: "kind"): pulumi.Output<"CronJob">; + public getResourceProperty(groupVersionKind: "batch/v1/CronJob", name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "batch/v1/CronJob", namespace: string, name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "batch/v1/CronJob", name: string, property: "spec"): pulumi.Output; + public getResourceProperty(groupVersionKind: "batch/v1/CronJob", namespace: string, name: string, property: "spec"): pulumi.Output; + public getResourceProperty(groupVersionKind: "batch/v1/CronJob", name: string, property: "status"): pulumi.Output; + public getResourceProperty(groupVersionKind: "batch/v1/CronJob", namespace: string, name: string, property: "status"): pulumi.Output; + public getResourceProperty(groupVersionKind: "batch/v1/CronJobList", name: string, property: "apiVersion"): pulumi.Output<"batch/v1">; + public getResourceProperty(groupVersionKind: "batch/v1/CronJobList", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"batch/v1">; + public getResourceProperty(groupVersionKind: "batch/v1/CronJobList", name: string, property: "items"): pulumi.Output; + public getResourceProperty(groupVersionKind: "batch/v1/CronJobList", namespace: string, name: string, property: "items"): pulumi.Output; + public getResourceProperty(groupVersionKind: "batch/v1/CronJobList", name: string, property: "kind"): pulumi.Output<"CronJobList">; + public getResourceProperty(groupVersionKind: "batch/v1/CronJobList", namespace: string, name: string, property: "kind"): pulumi.Output<"CronJobList">; + public getResourceProperty(groupVersionKind: "batch/v1/CronJobList", name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "batch/v1/CronJobList", namespace: string, name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "batch/v1/Job", name: string, property: "apiVersion"): pulumi.Output<"batch/v1">; public getResourceProperty(groupVersionKind: "batch/v1/Job", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"batch/v1">; public getResourceProperty(groupVersionKind: "batch/v1/Job", name: string, property: "kind"): pulumi.Output<"Job">; @@ -1171,6 +1211,14 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResourceProperty(groupVersionKind: "v1/EndpointsList", namespace: string, name: string, property: "kind"): pulumi.Output<"EndpointsList">; public getResourceProperty(groupVersionKind: "v1/EndpointsList", name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "v1/EndpointsList", namespace: string, name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "v1/EphemeralContainers", name: string, property: "apiVersion"): pulumi.Output<"v1">; + public getResourceProperty(groupVersionKind: "v1/EphemeralContainers", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"v1">; + public getResourceProperty(groupVersionKind: "v1/EphemeralContainers", name: string, property: "ephemeralContainers"): pulumi.Output; + public getResourceProperty(groupVersionKind: "v1/EphemeralContainers", namespace: string, name: string, property: "ephemeralContainers"): pulumi.Output; + public getResourceProperty(groupVersionKind: "v1/EphemeralContainers", name: string, property: "kind"): pulumi.Output<"EphemeralContainers">; + public getResourceProperty(groupVersionKind: "v1/EphemeralContainers", namespace: string, name: string, property: "kind"): pulumi.Output<"EphemeralContainers">; + public getResourceProperty(groupVersionKind: "v1/EphemeralContainers", name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "v1/EphemeralContainers", namespace: string, name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "v1/Event", name: string, property: "action"): pulumi.Output; public getResourceProperty(groupVersionKind: "v1/Event", namespace: string, name: string, property: "action"): pulumi.Output; public getResourceProperty(groupVersionKind: "v1/Event", name: string, property: "apiVersion"): pulumi.Output<"v1">; @@ -1431,6 +1479,26 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResourceProperty(groupVersionKind: "v1/ServiceList", namespace: string, name: string, property: "kind"): pulumi.Output<"ServiceList">; public getResourceProperty(groupVersionKind: "v1/ServiceList", name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "v1/ServiceList", namespace: string, name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", name: string, property: "addressType"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", namespace: string, name: string, property: "addressType"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", name: string, property: "apiVersion"): pulumi.Output<"discovery.k8s.io/v1">; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"discovery.k8s.io/v1">; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", name: string, property: "endpoints"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", namespace: string, name: string, property: "endpoints"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", name: string, property: "kind"): pulumi.Output<"EndpointSlice">; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", namespace: string, name: string, property: "kind"): pulumi.Output<"EndpointSlice">; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", namespace: string, name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", name: string, property: "ports"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSlice", namespace: string, name: string, property: "ports"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSliceList", name: string, property: "apiVersion"): pulumi.Output<"discovery.k8s.io/v1">; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSliceList", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"discovery.k8s.io/v1">; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSliceList", name: string, property: "items"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSliceList", namespace: string, name: string, property: "items"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSliceList", name: string, property: "kind"): pulumi.Output<"EndpointSliceList">; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSliceList", namespace: string, name: string, property: "kind"): pulumi.Output<"EndpointSliceList">; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSliceList", name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1/EndpointSliceList", namespace: string, name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1beta1/EndpointSlice", name: string, property: "addressType"): pulumi.Output; public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1beta1/EndpointSlice", namespace: string, name: string, property: "addressType"): pulumi.Output; public getResourceProperty(groupVersionKind: "discovery.k8s.io/v1beta1/EndpointSlice", name: string, property: "apiVersion"): pulumi.Output<"discovery.k8s.io/v1beta1">; @@ -1867,6 +1935,24 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResourceProperty(groupVersionKind: "node.k8s.io/v1beta1/RuntimeClassList", namespace: string, name: string, property: "kind"): pulumi.Output<"RuntimeClassList">; public getResourceProperty(groupVersionKind: "node.k8s.io/v1beta1/RuntimeClassList", name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "node.k8s.io/v1beta1/RuntimeClassList", namespace: string, name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudget", name: string, property: "apiVersion"): pulumi.Output<"policy/v1">; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudget", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"policy/v1">; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudget", name: string, property: "kind"): pulumi.Output<"PodDisruptionBudget">; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudget", namespace: string, name: string, property: "kind"): pulumi.Output<"PodDisruptionBudget">; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudget", name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudget", namespace: string, name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudget", name: string, property: "spec"): pulumi.Output; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudget", namespace: string, name: string, property: "spec"): pulumi.Output; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudget", name: string, property: "status"): pulumi.Output; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudget", namespace: string, name: string, property: "status"): pulumi.Output; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudgetList", name: string, property: "apiVersion"): pulumi.Output<"policy/v1">; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudgetList", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"policy/v1">; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudgetList", name: string, property: "items"): pulumi.Output; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudgetList", namespace: string, name: string, property: "items"): pulumi.Output; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudgetList", name: string, property: "kind"): pulumi.Output<"PodDisruptionBudgetList">; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudgetList", namespace: string, name: string, property: "kind"): pulumi.Output<"PodDisruptionBudgetList">; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudgetList", name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "policy/v1/PodDisruptionBudgetList", namespace: string, name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "policy/v1beta1/PodDisruptionBudget", name: string, property: "apiVersion"): pulumi.Output<"policy/v1beta1">; public getResourceProperty(groupVersionKind: "policy/v1beta1/PodDisruptionBudget", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"policy/v1beta1">; public getResourceProperty(groupVersionKind: "policy/v1beta1/PodDisruptionBudget", name: string, property: "kind"): pulumi.Output<"PodDisruptionBudget">; @@ -2271,6 +2357,28 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResourceProperty(groupVersionKind: "storage.k8s.io/v1/VolumeAttachmentList", namespace: string, name: string, property: "kind"): pulumi.Output<"VolumeAttachmentList">; public getResourceProperty(groupVersionKind: "storage.k8s.io/v1/VolumeAttachmentList", name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "storage.k8s.io/v1/VolumeAttachmentList", namespace: string, name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", name: string, property: "apiVersion"): pulumi.Output<"storage.k8s.io/v1alpha1">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"storage.k8s.io/v1alpha1">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", name: string, property: "capacity"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", namespace: string, name: string, property: "capacity"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", name: string, property: "kind"): pulumi.Output<"CSIStorageCapacity">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", namespace: string, name: string, property: "kind"): pulumi.Output<"CSIStorageCapacity">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", name: string, property: "maximumVolumeSize"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", namespace: string, name: string, property: "maximumVolumeSize"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", namespace: string, name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", name: string, property: "nodeTopology"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", namespace: string, name: string, property: "nodeTopology"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", name: string, property: "storageClassName"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacity", namespace: string, name: string, property: "storageClassName"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacityList", name: string, property: "apiVersion"): pulumi.Output<"storage.k8s.io/v1alpha1">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacityList", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"storage.k8s.io/v1alpha1">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacityList", name: string, property: "items"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacityList", namespace: string, name: string, property: "items"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacityList", name: string, property: "kind"): pulumi.Output<"CSIStorageCapacityList">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacityList", namespace: string, name: string, property: "kind"): pulumi.Output<"CSIStorageCapacityList">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacityList", name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/CSIStorageCapacityList", namespace: string, name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/VolumeAttachment", name: string, property: "apiVersion"): pulumi.Output<"storage.k8s.io/v1alpha1">; public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/VolumeAttachment", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"storage.k8s.io/v1alpha1">; public getResourceProperty(groupVersionKind: "storage.k8s.io/v1alpha1/VolumeAttachment", name: string, property: "kind"): pulumi.Output<"VolumeAttachment">; @@ -2321,6 +2429,28 @@ export abstract class CollectionComponentResource extends pulumi.ComponentResour public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSINodeList", namespace: string, name: string, property: "kind"): pulumi.Output<"CSINodeList">; public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSINodeList", name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSINodeList", namespace: string, name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", name: string, property: "apiVersion"): pulumi.Output<"storage.k8s.io/v1beta1">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"storage.k8s.io/v1beta1">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", name: string, property: "capacity"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", namespace: string, name: string, property: "capacity"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", name: string, property: "kind"): pulumi.Output<"CSIStorageCapacity">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", namespace: string, name: string, property: "kind"): pulumi.Output<"CSIStorageCapacity">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", name: string, property: "maximumVolumeSize"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", namespace: string, name: string, property: "maximumVolumeSize"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", namespace: string, name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", name: string, property: "nodeTopology"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", namespace: string, name: string, property: "nodeTopology"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", name: string, property: "storageClassName"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacity", namespace: string, name: string, property: "storageClassName"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacityList", name: string, property: "apiVersion"): pulumi.Output<"storage.k8s.io/v1beta1">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacityList", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"storage.k8s.io/v1beta1">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacityList", name: string, property: "items"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacityList", namespace: string, name: string, property: "items"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacityList", name: string, property: "kind"): pulumi.Output<"CSIStorageCapacityList">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacityList", namespace: string, name: string, property: "kind"): pulumi.Output<"CSIStorageCapacityList">; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacityList", name: string, property: "metadata"): pulumi.Output; + public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/CSIStorageCapacityList", namespace: string, name: string, property: "metadata"): pulumi.Output; public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/StorageClass", name: string, property: "allowVolumeExpansion"): pulumi.Output; public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/StorageClass", namespace: string, name: string, property: "allowVolumeExpansion"): pulumi.Output; public getResourceProperty(groupVersionKind: "storage.k8s.io/v1beta1/StorageClass", name: string, property: "allowedTopologies"): pulumi.Output; @@ -2819,6 +2949,7 @@ export interface ConfigOpts { || (gvk === "autoscaling/v1/HorizontalPodAutoscalerList") || (gvk === "autoscaling/v2beta1/HorizontalPodAutoscalerList") || (gvk === "autoscaling/v2beta2/HorizontalPodAutoscalerList") + || (gvk === "batch/v1/CronJobList") || (gvk === "batch/v1/JobList") || (gvk === "batch/v1beta1/CronJobList") || (gvk === "batch/v2alpha1/CronJobList") @@ -2841,6 +2972,7 @@ export interface ConfigOpts { || (gvk === "v1/SecretList") || (gvk === "v1/ServiceAccountList") || (gvk === "v1/ServiceList") + || (gvk === "discovery.k8s.io/v1/EndpointSliceList") || (gvk === "discovery.k8s.io/v1beta1/EndpointSliceList") || (gvk === "events.k8s.io/v1/EventList") || (gvk === "events.k8s.io/v1beta1/EventList") @@ -2862,6 +2994,7 @@ export interface ConfigOpts { || (gvk === "node.k8s.io/v1/RuntimeClassList") || (gvk === "node.k8s.io/v1alpha1/RuntimeClassList") || (gvk === "node.k8s.io/v1beta1/RuntimeClassList") + || (gvk === "policy/v1/PodDisruptionBudgetList") || (gvk === "policy/v1beta1/PodDisruptionBudgetList") || (gvk === "policy/v1beta1/PodSecurityPolicyList") || (gvk === "rbac.authorization.k8s.io/v1/ClusterRoleBindingList") @@ -2884,9 +3017,11 @@ export interface ConfigOpts { || (gvk === "storage.k8s.io/v1/CSINodeList") || (gvk === "storage.k8s.io/v1/StorageClassList") || (gvk === "storage.k8s.io/v1/VolumeAttachmentList") + || (gvk === "storage.k8s.io/v1alpha1/CSIStorageCapacityList") || (gvk === "storage.k8s.io/v1alpha1/VolumeAttachmentList") || (gvk === "storage.k8s.io/v1beta1/CSIDriverList") || (gvk === "storage.k8s.io/v1beta1/CSINodeList") + || (gvk === "storage.k8s.io/v1beta1/CSIStorageCapacityList") || (gvk === "storage.k8s.io/v1beta1/StorageClassList") || (gvk === "storage.k8s.io/v1beta1/VolumeAttachmentList") ) { @@ -3092,6 +3227,11 @@ export interface ConfigOpts { name: `autoscaling/v2beta2/HorizontalPodAutoscaler::${id}`, resource: new k8s.autoscaling.v2beta2.HorizontalPodAutoscaler(id, obj, opts), }))]; + case "batch/v1/CronJob": + return [id.apply(id => ({ + name: `batch/v1/CronJob::${id}`, + resource: new k8s.batch.v1.CronJob(id, obj, opts), + }))]; case "batch/v1/Job": return [id.apply(id => ({ name: `batch/v1/Job::${id}`, @@ -3142,6 +3282,11 @@ export interface ConfigOpts { name: `v1/Endpoints::${id}`, resource: new k8s.core.v1.Endpoints(id, obj, opts), }))]; + case "v1/EphemeralContainers": + return [id.apply(id => ({ + name: `v1/EphemeralContainers::${id}`, + resource: new k8s.core.v1.EphemeralContainers(id, obj, opts), + }))]; case "v1/Event": return [id.apply(id => ({ name: `v1/Event::${id}`, @@ -3207,6 +3352,11 @@ export interface ConfigOpts { name: `v1/ServiceAccount::${id}`, resource: new k8s.core.v1.ServiceAccount(id, obj, opts), }))]; + case "discovery.k8s.io/v1/EndpointSlice": + return [id.apply(id => ({ + name: `discovery.k8s.io/v1/EndpointSlice::${id}`, + resource: new k8s.discovery.v1.EndpointSlice(id, obj, opts), + }))]; case "discovery.k8s.io/v1beta1/EndpointSlice": return [id.apply(id => ({ name: `discovery.k8s.io/v1beta1/EndpointSlice::${id}`, @@ -3317,6 +3467,11 @@ export interface ConfigOpts { name: `node.k8s.io/v1beta1/RuntimeClass::${id}`, resource: new k8s.node.v1beta1.RuntimeClass(id, obj, opts), }))]; + case "policy/v1/PodDisruptionBudget": + return [id.apply(id => ({ + name: `policy/v1/PodDisruptionBudget::${id}`, + resource: new k8s.policy.v1.PodDisruptionBudget(id, obj, opts), + }))]; case "policy/v1beta1/PodDisruptionBudget": return [id.apply(id => ({ name: `policy/v1beta1/PodDisruptionBudget::${id}`, @@ -3427,6 +3582,11 @@ export interface ConfigOpts { name: `storage.k8s.io/v1/VolumeAttachment::${id}`, resource: new k8s.storage.v1.VolumeAttachment(id, obj, opts), }))]; + case "storage.k8s.io/v1alpha1/CSIStorageCapacity": + return [id.apply(id => ({ + name: `storage.k8s.io/v1alpha1/CSIStorageCapacity::${id}`, + resource: new k8s.storage.v1alpha1.CSIStorageCapacity(id, obj, opts), + }))]; case "storage.k8s.io/v1alpha1/VolumeAttachment": return [id.apply(id => ({ name: `storage.k8s.io/v1alpha1/VolumeAttachment::${id}`, @@ -3442,6 +3602,11 @@ export interface ConfigOpts { name: `storage.k8s.io/v1beta1/CSINode::${id}`, resource: new k8s.storage.v1beta1.CSINode(id, obj, opts), }))]; + case "storage.k8s.io/v1beta1/CSIStorageCapacity": + return [id.apply(id => ({ + name: `storage.k8s.io/v1beta1/CSIStorageCapacity::${id}`, + resource: new k8s.storage.v1beta1.CSIStorageCapacity(id, obj, opts), + }))]; case "storage.k8s.io/v1beta1/StorageClass": return [id.apply(id => ({ name: `storage.k8s.io/v1beta1/StorageClass::${id}`, diff --git a/sdk/python/pulumi_kubernetes/_tables.py b/sdk/python/pulumi_kubernetes/_tables.py index 0aa05580f5..c657704caa 100644 --- a/sdk/python/pulumi_kubernetes/_tables.py +++ b/sdk/python/pulumi_kubernetes/_tables.py @@ -65,6 +65,8 @@ "cluster_role_selectors": "clusterRoleSelectors", "cluster_scope": "clusterScope", "collision_count": "collisionCount", + "completed_indexes": "completedIndexes", + "completion_mode": "completionMode", "completion_time": "completionTime", "concurrency_policy": "concurrencyPolicy", "condition_type": "conditionType", @@ -109,6 +111,7 @@ "deprecated_first_timestamp": "deprecatedFirstTimestamp", "deprecated_last_timestamp": "deprecatedLastTimestamp", "deprecated_source": "deprecatedSource", + "deprecated_topology": "deprecatedTopology", "deprecation_warning": "deprecationWarning", "described_object": "describedObject", "desired_healthy": "desiredHealthy", @@ -128,6 +131,7 @@ "empty_dir": "emptyDir", "enable_dry_run": "enableDryRun", "enable_service_links": "enableServiceLinks", + "end_port": "endPort", "endpoints_namespace": "endpointsNamespace", "env_from": "envFrom", "ephemeral_container_statuses": "ephemeralContainerStatuses", @@ -157,6 +161,7 @@ "finished_at": "finishedAt", "first_timestamp": "firstTimestamp", "flex_volume": "flexVolume", + "for_zones": "forZones", "forbidden_sysctls": "forbiddenSysctls", "from_": "from", "fs_group": "fsGroup", @@ -200,6 +205,7 @@ "initiator_name": "initiatorName", "inline_volume_spec": "inlineVolumeSpec", "insecure_skip_tls_verify": "insecureSkipTLSVerify", + "internal_traffic_policy": "internalTrafficPolicy", "involved_object": "involvedObject", "ip_block": "ipBlock", "ip_families": "ipFamilies", @@ -222,6 +228,7 @@ "last_scale_time": "lastScaleTime", "last_schedule_time": "lastScheduleTime", "last_state": "lastState", + "last_successful_time": "lastSuccessfulTime", "last_timestamp": "lastTimestamp", "last_transition_time": "lastTransitionTime", "last_update_time": "lastUpdateTime", @@ -231,6 +238,7 @@ "list_kind": "listKind", "liveness_probe": "livenessProbe", "load_balancer": "loadBalancer", + "load_balancer_class": "loadBalancerClass", "load_balancer_ip": "loadBalancerIP", "load_balancer_source_ranges": "loadBalancerSourceRanges", "localhost_profile": "localhostProfile", @@ -251,6 +259,7 @@ "max_skew": "maxSkew", "max_surge": "maxSurge", "max_unavailable": "maxUnavailable", + "maximum_volume_size": "maximumVolumeSize", "metric_name": "metricName", "metric_selector": "metricSelector", "min_available": "minAvailable", @@ -273,6 +282,7 @@ "node_selector": "nodeSelector", "node_selector_terms": "nodeSelectorTerms", "node_stage_secret_ref": "nodeStageSecretRef", + "node_topology": "nodeTopology", "nominated_node_name": "nominatedNodeName", "non_resource_attributes": "nonResourceAttributes", "non_resource_rules": "nonResourceRules", @@ -543,6 +553,8 @@ "clusterRoleSelectors": "cluster_role_selectors", "clusterScope": "cluster_scope", "collisionCount": "collision_count", + "completedIndexes": "completed_indexes", + "completionMode": "completion_mode", "completionTime": "completion_time", "concurrencyPolicy": "concurrency_policy", "conditionType": "condition_type", @@ -587,6 +599,7 @@ "deprecatedFirstTimestamp": "deprecated_first_timestamp", "deprecatedLastTimestamp": "deprecated_last_timestamp", "deprecatedSource": "deprecated_source", + "deprecatedTopology": "deprecated_topology", "deprecationWarning": "deprecation_warning", "describedObject": "described_object", "desiredHealthy": "desired_healthy", @@ -606,6 +619,7 @@ "emptyDir": "empty_dir", "enableDryRun": "enable_dry_run", "enableServiceLinks": "enable_service_links", + "endPort": "end_port", "endpointsNamespace": "endpoints_namespace", "envFrom": "env_from", "ephemeralContainerStatuses": "ephemeral_container_statuses", @@ -635,6 +649,7 @@ "finishedAt": "finished_at", "firstTimestamp": "first_timestamp", "flexVolume": "flex_volume", + "forZones": "for_zones", "forbiddenSysctls": "forbidden_sysctls", "from": "from_", "fsGroup": "fs_group", @@ -678,6 +693,7 @@ "initiatorName": "initiator_name", "inlineVolumeSpec": "inline_volume_spec", "insecureSkipTLSVerify": "insecure_skip_tls_verify", + "internalTrafficPolicy": "internal_traffic_policy", "involvedObject": "involved_object", "ipBlock": "ip_block", "ipFamilies": "ip_families", @@ -700,6 +716,7 @@ "lastScaleTime": "last_scale_time", "lastScheduleTime": "last_schedule_time", "lastState": "last_state", + "lastSuccessfulTime": "last_successful_time", "lastTimestamp": "last_timestamp", "lastTransitionTime": "last_transition_time", "lastUpdateTime": "last_update_time", @@ -709,6 +726,7 @@ "listKind": "list_kind", "livenessProbe": "liveness_probe", "loadBalancer": "load_balancer", + "loadBalancerClass": "load_balancer_class", "loadBalancerIP": "load_balancer_ip", "loadBalancerSourceRanges": "load_balancer_source_ranges", "localhostProfile": "localhost_profile", @@ -729,6 +747,7 @@ "maxSkew": "max_skew", "maxSurge": "max_surge", "maxUnavailable": "max_unavailable", + "maximumVolumeSize": "maximum_volume_size", "metricName": "metric_name", "metricSelector": "metric_selector", "minAvailable": "min_available", @@ -751,6 +770,7 @@ "nodeSelector": "node_selector", "nodeSelectorTerms": "node_selector_terms", "nodeStageSecretRef": "node_stage_secret_ref", + "nodeTopology": "node_topology", "nominatedNodeName": "nominated_node_name", "nonResourceAttributes": "non_resource_attributes", "nonResourceRules": "non_resource_rules", diff --git a/sdk/python/pulumi_kubernetes/admissionregistration/v1/_inputs.py b/sdk/python/pulumi_kubernetes/admissionregistration/v1/_inputs.py index 594858ca70..3592b6ec72 100644 --- a/sdk/python/pulumi_kubernetes/admissionregistration/v1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/admissionregistration/v1/_inputs.py @@ -38,7 +38,7 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[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. :param pulumi.Input['WebhookClientConfigArgs'] client_config: ClientConfig defines how to communicate with the hook. Required :param pulumi.Input[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. - :param pulumi.Input[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 change 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. + :param pulumi.Input[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. :param pulumi.Input[str] failure_policy: FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail. :param pulumi.Input[str] match_policy: matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". @@ -148,7 +148,7 @@ def name(self, value: pulumi.Input[str]): @pulumi.getter(name="sideEffects") def side_effects(self) -> pulumi.Input[str]: """ - 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 change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + SideEffects 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. """ return pulumi.get(self, "side_effects") @@ -543,7 +543,7 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[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. :param pulumi.Input['WebhookClientConfigArgs'] client_config: ClientConfig defines how to communicate with the hook. Required :param pulumi.Input[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. - :param pulumi.Input[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 change 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. + :param pulumi.Input[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. :param pulumi.Input[str] failure_policy: FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail. :param pulumi.Input[str] match_policy: matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". @@ -644,7 +644,7 @@ def name(self, value: pulumi.Input[str]): @pulumi.getter(name="sideEffects") def side_effects(self) -> pulumi.Input[str]: """ - 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 change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + SideEffects 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. """ return pulumi.get(self, "side_effects") diff --git a/sdk/python/pulumi_kubernetes/admissionregistration/v1/outputs.py b/sdk/python/pulumi_kubernetes/admissionregistration/v1/outputs.py index 1d6aa60b8d..2249f099db 100644 --- a/sdk/python/pulumi_kubernetes/admissionregistration/v1/outputs.py +++ b/sdk/python/pulumi_kubernetes/admissionregistration/v1/outputs.py @@ -42,7 +42,7 @@ def __init__(__self__, *, :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. :param 'WebhookClientConfigArgs' client_config: ClientConfig defines how to communicate with the hook. Required :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. - :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 change 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. + :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. :param str failure_policy: FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail. :param str match_policy: matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". @@ -140,7 +140,7 @@ def name(self) -> str: @pulumi.getter(name="sideEffects") def side_effects(self) -> str: """ - 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 change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + SideEffects 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. """ return pulumi.get(self, "side_effects") @@ -475,7 +475,7 @@ def __init__(__self__, *, :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. :param 'WebhookClientConfigArgs' client_config: ClientConfig defines how to communicate with the hook. Required :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. - :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 change 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. + :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. :param str failure_policy: FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail. :param str match_policy: matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". @@ -564,7 +564,7 @@ def name(self) -> str: @pulumi.getter(name="sideEffects") def side_effects(self) -> str: """ - 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 change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + SideEffects 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. """ return pulumi.get(self, "side_effects") diff --git a/sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/_inputs.py b/sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/_inputs.py index 5a41d9ffcb..0995e3b81b 100644 --- a/sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/_inputs.py @@ -86,7 +86,7 @@ def __init__(__self__, *, Defaults to "Never". :param pulumi.Input[Sequence[pulumi.Input['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. - :param pulumi.Input[str] side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + :param pulumi.Input[str] side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. :param pulumi.Input[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 30 seconds. """ pulumi.set(__self__, "client_config", client_config) @@ -264,7 +264,7 @@ def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RuleWithOper @pulumi.getter(name="sideEffects") def side_effects(self) -> Optional[pulumi.Input[str]]: """ - SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. """ return pulumi.get(self, "side_effects") @@ -586,7 +586,7 @@ def __init__(__self__, *, Default to the empty LabelSelector, which matches everything. :param pulumi.Input['_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. :param pulumi.Input[Sequence[pulumi.Input['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. - :param pulumi.Input[str] side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + :param pulumi.Input[str] side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. :param pulumi.Input[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 30 seconds. """ pulumi.set(__self__, "client_config", client_config) @@ -744,7 +744,7 @@ def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RuleWithOper @pulumi.getter(name="sideEffects") def side_effects(self) -> Optional[pulumi.Input[str]]: """ - SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. """ return pulumi.get(self, "side_effects") diff --git a/sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/outputs.py b/sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/outputs.py index 0e9323298d..47c18229c6 100644 --- a/sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/outputs.py +++ b/sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/outputs.py @@ -90,7 +90,7 @@ def __init__(__self__, *, Defaults to "Never". :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. - :param str side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + :param str side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. :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 30 seconds. """ pulumi.set(__self__, "client_config", client_config) @@ -232,7 +232,7 @@ def rules(self) -> Optional[Sequence['outputs.RuleWithOperations']]: @pulumi.getter(name="sideEffects") def side_effects(self) -> Optional[str]: """ - SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. """ return pulumi.get(self, "side_effects") @@ -518,7 +518,7 @@ def __init__(__self__, *, Default to the empty LabelSelector, which matches everything. :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. :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. - :param str side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + :param str side_effects: SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. :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 30 seconds. """ pulumi.set(__self__, "client_config", client_config) @@ -644,7 +644,7 @@ def rules(self) -> Optional[Sequence['outputs.RuleWithOperations']]: @pulumi.getter(name="sideEffects") def side_effects(self) -> Optional[str]: """ - SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. + SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown. """ return pulumi.get(self, "side_effects") diff --git a/sdk/python/pulumi_kubernetes/apps/v1/_inputs.py b/sdk/python/pulumi_kubernetes/apps/v1/_inputs.py index f52c85a236..b67eeb2b91 100644 --- a/sdk/python/pulumi_kubernetes/apps/v1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/apps/v1/_inputs.py @@ -1460,19 +1460,35 @@ def ready_replicas(self, value: Optional[pulumi.Input[int]]): @pulumi.input_type class RollingUpdateDaemonSetArgs: def __init__(__self__, *, + max_surge: Optional[pulumi.Input[Union[int, str]]] = None, max_unavailable: Optional[pulumi.Input[Union[int, str]]] = None): """ Spec to control the desired behavior of daemon set rolling update. - :param pulumi.Input[Union[int, str]] max_unavailable: The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + :param pulumi.Input[Union[int, str]] max_surge: The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. + :param pulumi.Input[Union[int, str]] max_unavailable: The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. """ + if max_surge is not None: + pulumi.set(__self__, "max_surge", max_surge) if max_unavailable is not None: pulumi.set(__self__, "max_unavailable", max_unavailable) + @property + @pulumi.getter(name="maxSurge") + def max_surge(self) -> Optional[pulumi.Input[Union[int, str]]]: + """ + The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. + """ + return pulumi.get(self, "max_surge") + + @max_surge.setter + def max_surge(self, value: Optional[pulumi.Input[Union[int, str]]]): + pulumi.set(self, "max_surge", value) + @property @pulumi.getter(name="maxUnavailable") def max_unavailable(self) -> Optional[pulumi.Input[Union[int, str]]]: """ - The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. """ return pulumi.get(self, "max_unavailable") diff --git a/sdk/python/pulumi_kubernetes/apps/v1/outputs.py b/sdk/python/pulumi_kubernetes/apps/v1/outputs.py index b4b511bb35..158bc3745d 100644 --- a/sdk/python/pulumi_kubernetes/apps/v1/outputs.py +++ b/sdk/python/pulumi_kubernetes/apps/v1/outputs.py @@ -1252,19 +1252,31 @@ class RollingUpdateDaemonSet(dict): Spec to control the desired behavior of daemon set rolling update. """ def __init__(__self__, *, + max_surge: Optional[Any] = None, max_unavailable: Optional[Any] = None): """ Spec to control the desired behavior of daemon set rolling update. - :param Union[int, str] max_unavailable: The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + :param Union[int, str] max_surge: The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. + :param Union[int, str] max_unavailable: The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. """ + if max_surge is not None: + pulumi.set(__self__, "max_surge", max_surge) if max_unavailable is not None: pulumi.set(__self__, "max_unavailable", max_unavailable) + @property + @pulumi.getter(name="maxSurge") + def max_surge(self) -> Optional[Any]: + """ + The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate. + """ + return pulumi.get(self, "max_surge") + @property @pulumi.getter(name="maxUnavailable") def max_unavailable(self) -> Optional[Any]: """ - The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. """ return pulumi.get(self, "max_unavailable") diff --git a/sdk/python/pulumi_kubernetes/batch/v1/CronJob.py b/sdk/python/pulumi_kubernetes/batch/v1/CronJob.py new file mode 100644 index 0000000000..7b6e47705c --- /dev/null +++ b/sdk/python/pulumi_kubernetes/batch/v1/CronJob.py @@ -0,0 +1,137 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from . import outputs +from ... import core as _core +from ... import meta as _meta +from ._inputs import * + +__all__ = ['CronJob'] + + +class CronJob(pulumi.CustomResource): + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + api_version: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']]] = None, + spec: Optional[pulumi.Input[pulumi.InputType['CronJobSpecArgs']]] = None, + __props__=None, + __name__=None, + __opts__=None): + """ + CronJob represents the configuration of a single cron job. + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[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 + :param pulumi.Input[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 + :param pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param pulumi.Input[pulumi.InputType['CronJobSpecArgs']] spec: Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + if __name__ is not None: + warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) + resource_name = __name__ + if __opts__ is not None: + warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) + opts = __opts__ + if opts is None: + opts = pulumi.ResourceOptions() + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.version is None: + opts.version = _utilities.get_version() + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = dict() + + __props__['api_version'] = 'batch/v1' + __props__['kind'] = 'CronJob' + __props__['metadata'] = metadata + __props__['spec'] = spec + __props__['status'] = None + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:batch/v1beta1:CronJob"), pulumi.Alias(type_="kubernetes:batch/v2alpha1:CronJob")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) + super(CronJob, __self__).__init__( + 'kubernetes:batch/v1:CronJob', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'CronJob': + """ + Get an existing CronJob resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = dict() + + __props__["api_version"] = None + __props__["kind"] = None + __props__["metadata"] = None + __props__["spec"] = None + __props__["status"] = None + return CronJob(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def kind(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ObjectMeta']]: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @property + @pulumi.getter + def spec(self) -> pulumi.Output[Optional['outputs.CronJobSpec']]: + """ + Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + return pulumi.get(self, "spec") + + @property + @pulumi.getter + def status(self) -> pulumi.Output[Optional['outputs.CronJobStatus']]: + """ + Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + return pulumi.get(self, "status") + + def translate_output_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + def translate_input_property(self, prop): + return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop + diff --git a/sdk/python/pulumi_kubernetes/batch/v1/CronJobList.py b/sdk/python/pulumi_kubernetes/batch/v1/CronJobList.py new file mode 100644 index 0000000000..ce16ee6a37 --- /dev/null +++ b/sdk/python/pulumi_kubernetes/batch/v1/CronJobList.py @@ -0,0 +1,127 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from . import outputs +from ... import core as _core +from ... import meta as _meta +from ._inputs import * + +__all__ = ['CronJobList'] + + +class CronJobList(pulumi.CustomResource): + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + api_version: Optional[pulumi.Input[str]] = None, + items: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CronJobArgs']]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']]] = None, + __props__=None, + __name__=None, + __opts__=None): + """ + CronJobList is a collection of cron jobs. + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[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 + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CronJobArgs']]]] items: items is the list of CronJobs. + :param pulumi.Input[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 + :param pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']] metadata: Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + if __name__ is not None: + warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) + resource_name = __name__ + if __opts__ is not None: + warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) + opts = __opts__ + if opts is None: + opts = pulumi.ResourceOptions() + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.version is None: + opts.version = _utilities.get_version() + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = dict() + + __props__['api_version'] = 'batch/v1' + if items is None and not opts.urn: + raise TypeError("Missing required property 'items'") + __props__['items'] = items + __props__['kind'] = 'CronJobList' + __props__['metadata'] = metadata + super(CronJobList, __self__).__init__( + 'kubernetes:batch/v1:CronJobList', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'CronJobList': + """ + Get an existing CronJobList resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = dict() + + __props__["api_version"] = None + __props__["items"] = None + __props__["kind"] = None + __props__["metadata"] = None + return CronJobList(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def items(self) -> pulumi.Output[Sequence['outputs.CronJob']]: + """ + items is the list of CronJobs. + """ + return pulumi.get(self, "items") + + @property + @pulumi.getter + def kind(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ListMeta']]: + """ + Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + def translate_output_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + def translate_input_property(self, prop): + return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop + diff --git a/sdk/python/pulumi_kubernetes/batch/v1/__init__.py b/sdk/python/pulumi_kubernetes/batch/v1/__init__.py index 35083e4ec6..190cd7fd41 100644 --- a/sdk/python/pulumi_kubernetes/batch/v1/__init__.py +++ b/sdk/python/pulumi_kubernetes/batch/v1/__init__.py @@ -3,6 +3,8 @@ # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: +from .CronJob import * +from .CronJobList import * from .Job import * from .JobList import * from ._inputs import * @@ -20,7 +22,11 @@ def version(self): return Module._version def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource: - if typ == "kubernetes:batch/v1:Job": + if typ == "kubernetes:batch/v1:CronJob": + return CronJob(name, pulumi.ResourceOptions(urn=urn)) + elif typ == "kubernetes:batch/v1:CronJobList": + return CronJobList(name, pulumi.ResourceOptions(urn=urn)) + elif typ == "kubernetes:batch/v1:Job": return Job(name, pulumi.ResourceOptions(urn=urn)) elif typ == "kubernetes:batch/v1:JobList": return JobList(name, pulumi.ResourceOptions(urn=urn)) diff --git a/sdk/python/pulumi_kubernetes/batch/v1/_inputs.py b/sdk/python/pulumi_kubernetes/batch/v1/_inputs.py index 876a9d48f3..8e400e58ad 100644 --- a/sdk/python/pulumi_kubernetes/batch/v1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/batch/v1/_inputs.py @@ -11,12 +11,278 @@ from ... import meta as _meta __all__ = [ + 'CronJobArgs', + 'CronJobSpecArgs', + 'CronJobStatusArgs', 'JobArgs', 'JobConditionArgs', 'JobSpecArgs', 'JobStatusArgs', + 'JobTemplateSpecArgs', ] +@pulumi.input_type +class CronJobArgs: + def __init__(__self__, *, + api_version: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']] = None, + spec: Optional[pulumi.Input['CronJobSpecArgs']] = None, + status: Optional[pulumi.Input['CronJobStatusArgs']] = None): + """ + CronJob represents the configuration of a single cron job. + :param pulumi.Input[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 + :param pulumi.Input[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 + :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param pulumi.Input['CronJobSpecArgs'] spec: Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + :param pulumi.Input['CronJobStatusArgs'] status: Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + if api_version is not None: + pulumi.set(__self__, "api_version", 'batch/v1') + if kind is not None: + pulumi.set(__self__, "kind", 'CronJob') + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if spec is not None: + pulumi.set(__self__, "spec", spec) + if status is not None: + pulumi.set(__self__, "status", status) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> Optional[pulumi.Input[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @api_version.setter + def api_version(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "api_version", value) + + @property + @pulumi.getter + def kind(self) -> Optional[pulumi.Input[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @kind.setter + def kind(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "kind", value) + + @property + @pulumi.getter + def metadata(self) -> Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @metadata.setter + def metadata(self, value: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]): + pulumi.set(self, "metadata", value) + + @property + @pulumi.getter + def spec(self) -> Optional[pulumi.Input['CronJobSpecArgs']]: + """ + Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + return pulumi.get(self, "spec") + + @spec.setter + def spec(self, value: Optional[pulumi.Input['CronJobSpecArgs']]): + pulumi.set(self, "spec", value) + + @property + @pulumi.getter + def status(self) -> Optional[pulumi.Input['CronJobStatusArgs']]: + """ + Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + return pulumi.get(self, "status") + + @status.setter + def status(self, value: Optional[pulumi.Input['CronJobStatusArgs']]): + pulumi.set(self, "status", value) + + +@pulumi.input_type +class CronJobSpecArgs: + def __init__(__self__, *, + job_template: pulumi.Input['JobTemplateSpecArgs'], + schedule: pulumi.Input[str], + concurrency_policy: Optional[pulumi.Input[str]] = None, + failed_jobs_history_limit: Optional[pulumi.Input[int]] = None, + starting_deadline_seconds: Optional[pulumi.Input[int]] = None, + successful_jobs_history_limit: Optional[pulumi.Input[int]] = None, + suspend: Optional[pulumi.Input[bool]] = None): + """ + CronJobSpec describes how the job execution will look like and when it will actually run. + :param pulumi.Input['JobTemplateSpecArgs'] job_template: Specifies the job that will be created when executing a CronJob. + :param pulumi.Input[str] schedule: The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + :param pulumi.Input[str] concurrency_policy: Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one + :param pulumi.Input[int] failed_jobs_history_limit: The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. + :param pulumi.Input[int] starting_deadline_seconds: Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. + :param pulumi.Input[int] successful_jobs_history_limit: The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. + :param pulumi.Input[bool] suspend: This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. + """ + pulumi.set(__self__, "job_template", job_template) + pulumi.set(__self__, "schedule", schedule) + if concurrency_policy is not None: + pulumi.set(__self__, "concurrency_policy", concurrency_policy) + if failed_jobs_history_limit is not None: + pulumi.set(__self__, "failed_jobs_history_limit", failed_jobs_history_limit) + if starting_deadline_seconds is not None: + pulumi.set(__self__, "starting_deadline_seconds", starting_deadline_seconds) + if successful_jobs_history_limit is not None: + pulumi.set(__self__, "successful_jobs_history_limit", successful_jobs_history_limit) + if suspend is not None: + pulumi.set(__self__, "suspend", suspend) + + @property + @pulumi.getter(name="jobTemplate") + def job_template(self) -> pulumi.Input['JobTemplateSpecArgs']: + """ + Specifies the job that will be created when executing a CronJob. + """ + return pulumi.get(self, "job_template") + + @job_template.setter + def job_template(self, value: pulumi.Input['JobTemplateSpecArgs']): + pulumi.set(self, "job_template", value) + + @property + @pulumi.getter + def schedule(self) -> pulumi.Input[str]: + """ + The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + """ + return pulumi.get(self, "schedule") + + @schedule.setter + def schedule(self, value: pulumi.Input[str]): + pulumi.set(self, "schedule", value) + + @property + @pulumi.getter(name="concurrencyPolicy") + def concurrency_policy(self) -> Optional[pulumi.Input[str]]: + """ + Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one + """ + return pulumi.get(self, "concurrency_policy") + + @concurrency_policy.setter + def concurrency_policy(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "concurrency_policy", value) + + @property + @pulumi.getter(name="failedJobsHistoryLimit") + def failed_jobs_history_limit(self) -> Optional[pulumi.Input[int]]: + """ + The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. + """ + return pulumi.get(self, "failed_jobs_history_limit") + + @failed_jobs_history_limit.setter + def failed_jobs_history_limit(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "failed_jobs_history_limit", value) + + @property + @pulumi.getter(name="startingDeadlineSeconds") + def starting_deadline_seconds(self) -> Optional[pulumi.Input[int]]: + """ + Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. + """ + return pulumi.get(self, "starting_deadline_seconds") + + @starting_deadline_seconds.setter + def starting_deadline_seconds(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "starting_deadline_seconds", value) + + @property + @pulumi.getter(name="successfulJobsHistoryLimit") + def successful_jobs_history_limit(self) -> Optional[pulumi.Input[int]]: + """ + The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. + """ + return pulumi.get(self, "successful_jobs_history_limit") + + @successful_jobs_history_limit.setter + def successful_jobs_history_limit(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "successful_jobs_history_limit", value) + + @property + @pulumi.getter + def suspend(self) -> Optional[pulumi.Input[bool]]: + """ + This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. + """ + return pulumi.get(self, "suspend") + + @suspend.setter + def suspend(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "suspend", value) + + +@pulumi.input_type +class CronJobStatusArgs: + def __init__(__self__, *, + active: Optional[pulumi.Input[Sequence[pulumi.Input['_core.v1.ObjectReferenceArgs']]]] = None, + last_schedule_time: Optional[pulumi.Input[str]] = None, + last_successful_time: Optional[pulumi.Input[str]] = None): + """ + CronJobStatus represents the current state of a cron job. + :param pulumi.Input[Sequence[pulumi.Input['_core.v1.ObjectReferenceArgs']]] active: A list of pointers to currently running jobs. + :param pulumi.Input[str] last_schedule_time: Information when was the last time the job was successfully scheduled. + :param pulumi.Input[str] last_successful_time: Information when was the last time the job successfully completed. + """ + if active is not None: + pulumi.set(__self__, "active", active) + if last_schedule_time is not None: + pulumi.set(__self__, "last_schedule_time", last_schedule_time) + if last_successful_time is not None: + pulumi.set(__self__, "last_successful_time", last_successful_time) + + @property + @pulumi.getter + def active(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['_core.v1.ObjectReferenceArgs']]]]: + """ + A list of pointers to currently running jobs. + """ + return pulumi.get(self, "active") + + @active.setter + def active(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['_core.v1.ObjectReferenceArgs']]]]): + pulumi.set(self, "active", value) + + @property + @pulumi.getter(name="lastScheduleTime") + def last_schedule_time(self) -> Optional[pulumi.Input[str]]: + """ + Information when was the last time the job was successfully scheduled. + """ + return pulumi.get(self, "last_schedule_time") + + @last_schedule_time.setter + def last_schedule_time(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "last_schedule_time", value) + + @property + @pulumi.getter(name="lastSuccessfulTime") + def last_successful_time(self) -> Optional[pulumi.Input[str]]: + """ + Information when was the last time the job successfully completed. + """ + return pulumi.get(self, "last_successful_time") + + @last_successful_time.setter + def last_successful_time(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "last_successful_time", value) + + @pulumi.input_type class JobArgs: def __init__(__self__, *, @@ -228,20 +494,30 @@ def __init__(__self__, *, template: pulumi.Input['_core.v1.PodTemplateSpecArgs'], active_deadline_seconds: Optional[pulumi.Input[int]] = None, backoff_limit: Optional[pulumi.Input[int]] = None, + completion_mode: Optional[pulumi.Input[str]] = None, completions: Optional[pulumi.Input[int]] = None, manual_selector: Optional[pulumi.Input[bool]] = None, parallelism: Optional[pulumi.Input[int]] = None, selector: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']] = None, + suspend: Optional[pulumi.Input[bool]] = None, ttl_seconds_after_finished: Optional[pulumi.Input[int]] = None): """ JobSpec describes how the job execution will look like. :param pulumi.Input['_core.v1.PodTemplateSpecArgs'] template: Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - :param pulumi.Input[int] active_deadline_seconds: Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer + :param pulumi.Input[int] active_deadline_seconds: Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. :param pulumi.Input[int] backoff_limit: Specifies the number of retries before marking this job failed. Defaults to 6 + :param pulumi.Input[str] completion_mode: CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. + + `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. + + `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. + + This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. :param pulumi.Input[int] completions: Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ :param pulumi.Input[bool] manual_selector: manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector :param pulumi.Input[int] parallelism: Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ :param pulumi.Input['_meta.v1.LabelSelectorArgs'] selector: A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + :param pulumi.Input[bool] suspend: Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. :param pulumi.Input[int] ttl_seconds_after_finished: ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. This field is alpha-level and is only honored by servers that enable the TTLAfterFinished feature. """ pulumi.set(__self__, "template", template) @@ -249,6 +525,8 @@ def __init__(__self__, *, pulumi.set(__self__, "active_deadline_seconds", active_deadline_seconds) if backoff_limit is not None: pulumi.set(__self__, "backoff_limit", backoff_limit) + if completion_mode is not None: + pulumi.set(__self__, "completion_mode", completion_mode) if completions is not None: pulumi.set(__self__, "completions", completions) if manual_selector is not None: @@ -257,6 +535,8 @@ def __init__(__self__, *, pulumi.set(__self__, "parallelism", parallelism) if selector is not None: pulumi.set(__self__, "selector", selector) + if suspend is not None: + pulumi.set(__self__, "suspend", suspend) if ttl_seconds_after_finished is not None: pulumi.set(__self__, "ttl_seconds_after_finished", ttl_seconds_after_finished) @@ -276,7 +556,7 @@ def template(self, value: pulumi.Input['_core.v1.PodTemplateSpecArgs']): @pulumi.getter(name="activeDeadlineSeconds") def active_deadline_seconds(self) -> Optional[pulumi.Input[int]]: """ - Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer + Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. """ return pulumi.get(self, "active_deadline_seconds") @@ -296,6 +576,24 @@ def backoff_limit(self) -> Optional[pulumi.Input[int]]: def backoff_limit(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "backoff_limit", value) + @property + @pulumi.getter(name="completionMode") + def completion_mode(self) -> Optional[pulumi.Input[str]]: + """ + CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. + + `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. + + `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. + + This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. + """ + return pulumi.get(self, "completion_mode") + + @completion_mode.setter + def completion_mode(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "completion_mode", value) + @property @pulumi.getter def completions(self) -> Optional[pulumi.Input[int]]: @@ -344,6 +642,18 @@ def selector(self) -> Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]: def selector(self, value: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]): pulumi.set(self, "selector", value) + @property + @pulumi.getter + def suspend(self) -> Optional[pulumi.Input[bool]]: + """ + Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. + """ + return pulumi.get(self, "suspend") + + @suspend.setter + def suspend(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "suspend", value) + @property @pulumi.getter(name="ttlSecondsAfterFinished") def ttl_seconds_after_finished(self) -> Optional[pulumi.Input[int]]: @@ -361,6 +671,7 @@ def ttl_seconds_after_finished(self, value: Optional[pulumi.Input[int]]): class JobStatusArgs: def __init__(__self__, *, active: Optional[pulumi.Input[int]] = None, + completed_indexes: Optional[pulumi.Input[str]] = None, completion_time: Optional[pulumi.Input[str]] = None, conditions: Optional[pulumi.Input[Sequence[pulumi.Input['JobConditionArgs']]]] = None, failed: Optional[pulumi.Input[int]] = None, @@ -369,14 +680,17 @@ def __init__(__self__, *, """ JobStatus represents the current state of a Job. :param pulumi.Input[int] active: The number of actively running pods. + :param pulumi.Input[str] completed_indexes: CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". :param pulumi.Input[str] completion_time: Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. - :param pulumi.Input[Sequence[pulumi.Input['JobConditionArgs']]] conditions: The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + :param pulumi.Input[Sequence[pulumi.Input['JobConditionArgs']]] conditions: The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ :param pulumi.Input[int] failed: The number of pods which reached phase Failed. - :param pulumi.Input[str] start_time: Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. + :param pulumi.Input[str] start_time: Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. :param pulumi.Input[int] succeeded: The number of pods which reached phase Succeeded. """ if active is not None: pulumi.set(__self__, "active", active) + if completed_indexes is not None: + pulumi.set(__self__, "completed_indexes", completed_indexes) if completion_time is not None: pulumi.set(__self__, "completion_time", completion_time) if conditions is not None: @@ -400,6 +714,18 @@ def active(self) -> Optional[pulumi.Input[int]]: def active(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "active", value) + @property + @pulumi.getter(name="completedIndexes") + def completed_indexes(self) -> Optional[pulumi.Input[str]]: + """ + CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". + """ + return pulumi.get(self, "completed_indexes") + + @completed_indexes.setter + def completed_indexes(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "completed_indexes", value) + @property @pulumi.getter(name="completionTime") def completion_time(self) -> Optional[pulumi.Input[str]]: @@ -416,7 +742,7 @@ def completion_time(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['JobConditionArgs']]]]: """ - The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ """ return pulumi.get(self, "conditions") @@ -440,7 +766,7 @@ def failed(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="startTime") def start_time(self) -> Optional[pulumi.Input[str]]: """ - Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. + Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. """ return pulumi.get(self, "start_time") @@ -461,3 +787,43 @@ def succeeded(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "succeeded", value) +@pulumi.input_type +class JobTemplateSpecArgs: + def __init__(__self__, *, + metadata: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']] = None, + spec: Optional[pulumi.Input['JobSpecArgs']] = None): + """ + JobTemplateSpec describes the data a Job should have when created from a template + :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param pulumi.Input['JobSpecArgs'] spec: Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if spec is not None: + pulumi.set(__self__, "spec", spec) + + @property + @pulumi.getter + def metadata(self) -> Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]: + """ + Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @metadata.setter + def metadata(self, value: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]): + pulumi.set(self, "metadata", value) + + @property + @pulumi.getter + def spec(self) -> Optional[pulumi.Input['JobSpecArgs']]: + """ + Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + return pulumi.get(self, "spec") + + @spec.setter + def spec(self, value: Optional[pulumi.Input['JobSpecArgs']]): + pulumi.set(self, "spec", value) + + diff --git a/sdk/python/pulumi_kubernetes/batch/v1/outputs.py b/sdk/python/pulumi_kubernetes/batch/v1/outputs.py index 36346fd0b6..7b4c2f4b8b 100644 --- a/sdk/python/pulumi_kubernetes/batch/v1/outputs.py +++ b/sdk/python/pulumi_kubernetes/batch/v1/outputs.py @@ -12,12 +12,236 @@ from ... import meta as _meta __all__ = [ + 'CronJob', + 'CronJobSpec', + 'CronJobStatus', 'Job', 'JobCondition', 'JobSpec', 'JobStatus', + 'JobTemplateSpec', ] +@pulumi.output_type +class CronJob(dict): + """ + CronJob represents the configuration of a single cron job. + """ + def __init__(__self__, *, + api_version: Optional[str] = None, + kind: Optional[str] = None, + metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None, + spec: Optional['outputs.CronJobSpec'] = None, + status: Optional['outputs.CronJobStatus'] = None): + """ + CronJob represents the configuration of a single cron job. + :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 + :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 + :param '_meta.v1.ObjectMetaArgs' metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param 'CronJobSpecArgs' spec: Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + :param 'CronJobStatusArgs' status: Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + if api_version is not None: + pulumi.set(__self__, "api_version", 'batch/v1') + if kind is not None: + pulumi.set(__self__, "kind", 'CronJob') + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if spec is not None: + pulumi.set(__self__, "spec", spec) + if status is not None: + pulumi.set(__self__, "status", status) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> Optional[str]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def kind(self) -> Optional[str]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @property + @pulumi.getter + def spec(self) -> Optional['outputs.CronJobSpec']: + """ + Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + return pulumi.get(self, "spec") + + @property + @pulumi.getter + def status(self) -> Optional['outputs.CronJobStatus']: + """ + Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + return pulumi.get(self, "status") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + +@pulumi.output_type +class CronJobSpec(dict): + """ + CronJobSpec describes how the job execution will look like and when it will actually run. + """ + def __init__(__self__, *, + job_template: 'outputs.JobTemplateSpec', + schedule: str, + concurrency_policy: Optional[str] = None, + failed_jobs_history_limit: Optional[int] = None, + starting_deadline_seconds: Optional[int] = None, + successful_jobs_history_limit: Optional[int] = None, + suspend: Optional[bool] = None): + """ + CronJobSpec describes how the job execution will look like and when it will actually run. + :param 'JobTemplateSpecArgs' job_template: Specifies the job that will be created when executing a CronJob. + :param str schedule: The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + :param str concurrency_policy: Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one + :param int failed_jobs_history_limit: The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. + :param int starting_deadline_seconds: Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. + :param int successful_jobs_history_limit: The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. + :param bool suspend: This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. + """ + pulumi.set(__self__, "job_template", job_template) + pulumi.set(__self__, "schedule", schedule) + if concurrency_policy is not None: + pulumi.set(__self__, "concurrency_policy", concurrency_policy) + if failed_jobs_history_limit is not None: + pulumi.set(__self__, "failed_jobs_history_limit", failed_jobs_history_limit) + if starting_deadline_seconds is not None: + pulumi.set(__self__, "starting_deadline_seconds", starting_deadline_seconds) + if successful_jobs_history_limit is not None: + pulumi.set(__self__, "successful_jobs_history_limit", successful_jobs_history_limit) + if suspend is not None: + pulumi.set(__self__, "suspend", suspend) + + @property + @pulumi.getter(name="jobTemplate") + def job_template(self) -> 'outputs.JobTemplateSpec': + """ + Specifies the job that will be created when executing a CronJob. + """ + return pulumi.get(self, "job_template") + + @property + @pulumi.getter + def schedule(self) -> str: + """ + The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + """ + return pulumi.get(self, "schedule") + + @property + @pulumi.getter(name="concurrencyPolicy") + def concurrency_policy(self) -> Optional[str]: + """ + Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one + """ + return pulumi.get(self, "concurrency_policy") + + @property + @pulumi.getter(name="failedJobsHistoryLimit") + def failed_jobs_history_limit(self) -> Optional[int]: + """ + The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. + """ + return pulumi.get(self, "failed_jobs_history_limit") + + @property + @pulumi.getter(name="startingDeadlineSeconds") + def starting_deadline_seconds(self) -> Optional[int]: + """ + Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. + """ + return pulumi.get(self, "starting_deadline_seconds") + + @property + @pulumi.getter(name="successfulJobsHistoryLimit") + def successful_jobs_history_limit(self) -> Optional[int]: + """ + The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. + """ + return pulumi.get(self, "successful_jobs_history_limit") + + @property + @pulumi.getter + def suspend(self) -> Optional[bool]: + """ + This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. + """ + return pulumi.get(self, "suspend") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + +@pulumi.output_type +class CronJobStatus(dict): + """ + CronJobStatus represents the current state of a cron job. + """ + def __init__(__self__, *, + active: Optional[Sequence['_core.v1.outputs.ObjectReference']] = None, + last_schedule_time: Optional[str] = None, + last_successful_time: Optional[str] = None): + """ + CronJobStatus represents the current state of a cron job. + :param Sequence['_core.v1.ObjectReferenceArgs'] active: A list of pointers to currently running jobs. + :param str last_schedule_time: Information when was the last time the job was successfully scheduled. + :param str last_successful_time: Information when was the last time the job successfully completed. + """ + if active is not None: + pulumi.set(__self__, "active", active) + if last_schedule_time is not None: + pulumi.set(__self__, "last_schedule_time", last_schedule_time) + if last_successful_time is not None: + pulumi.set(__self__, "last_successful_time", last_successful_time) + + @property + @pulumi.getter + def active(self) -> Optional[Sequence['_core.v1.outputs.ObjectReference']]: + """ + A list of pointers to currently running jobs. + """ + return pulumi.get(self, "active") + + @property + @pulumi.getter(name="lastScheduleTime") + def last_schedule_time(self) -> Optional[str]: + """ + Information when was the last time the job was successfully scheduled. + """ + return pulumi.get(self, "last_schedule_time") + + @property + @pulumi.getter(name="lastSuccessfulTime") + def last_successful_time(self) -> Optional[str]: + """ + Information when was the last time the job successfully completed. + """ + return pulumi.get(self, "last_successful_time") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + @pulumi.output_type class Job(dict): """ @@ -215,20 +439,30 @@ def __init__(__self__, *, template: '_core.v1.outputs.PodTemplateSpec', active_deadline_seconds: Optional[int] = None, backoff_limit: Optional[int] = None, + completion_mode: Optional[str] = None, completions: Optional[int] = None, manual_selector: Optional[bool] = None, parallelism: Optional[int] = None, selector: Optional['_meta.v1.outputs.LabelSelector'] = None, + suspend: Optional[bool] = None, ttl_seconds_after_finished: Optional[int] = None): """ JobSpec describes how the job execution will look like. :param '_core.v1.PodTemplateSpecArgs' template: Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - :param int active_deadline_seconds: Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer + :param int active_deadline_seconds: Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. :param int backoff_limit: Specifies the number of retries before marking this job failed. Defaults to 6 + :param str completion_mode: CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. + + `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. + + `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. + + This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. :param int completions: Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ :param bool manual_selector: manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector :param int parallelism: Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ :param '_meta.v1.LabelSelectorArgs' selector: A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + :param bool suspend: Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. :param int ttl_seconds_after_finished: ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. This field is alpha-level and is only honored by servers that enable the TTLAfterFinished feature. """ pulumi.set(__self__, "template", template) @@ -236,6 +470,8 @@ def __init__(__self__, *, pulumi.set(__self__, "active_deadline_seconds", active_deadline_seconds) if backoff_limit is not None: pulumi.set(__self__, "backoff_limit", backoff_limit) + if completion_mode is not None: + pulumi.set(__self__, "completion_mode", completion_mode) if completions is not None: pulumi.set(__self__, "completions", completions) if manual_selector is not None: @@ -244,6 +480,8 @@ def __init__(__self__, *, pulumi.set(__self__, "parallelism", parallelism) if selector is not None: pulumi.set(__self__, "selector", selector) + if suspend is not None: + pulumi.set(__self__, "suspend", suspend) if ttl_seconds_after_finished is not None: pulumi.set(__self__, "ttl_seconds_after_finished", ttl_seconds_after_finished) @@ -259,7 +497,7 @@ def template(self) -> '_core.v1.outputs.PodTemplateSpec': @pulumi.getter(name="activeDeadlineSeconds") def active_deadline_seconds(self) -> Optional[int]: """ - Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer + Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. """ return pulumi.get(self, "active_deadline_seconds") @@ -271,6 +509,20 @@ def backoff_limit(self) -> Optional[int]: """ return pulumi.get(self, "backoff_limit") + @property + @pulumi.getter(name="completionMode") + def completion_mode(self) -> Optional[str]: + """ + CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. + + `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. + + `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. + + This field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. + """ + return pulumi.get(self, "completion_mode") + @property @pulumi.getter def completions(self) -> Optional[int]: @@ -303,6 +555,14 @@ def selector(self) -> Optional['_meta.v1.outputs.LabelSelector']: """ return pulumi.get(self, "selector") + @property + @pulumi.getter + def suspend(self) -> Optional[bool]: + """ + Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false. + """ + return pulumi.get(self, "suspend") + @property @pulumi.getter(name="ttlSecondsAfterFinished") def ttl_seconds_after_finished(self) -> Optional[int]: @@ -322,6 +582,7 @@ class JobStatus(dict): """ def __init__(__self__, *, active: Optional[int] = None, + completed_indexes: Optional[str] = None, completion_time: Optional[str] = None, conditions: Optional[Sequence['outputs.JobCondition']] = None, failed: Optional[int] = None, @@ -330,14 +591,17 @@ def __init__(__self__, *, """ JobStatus represents the current state of a Job. :param int active: The number of actively running pods. + :param str completed_indexes: CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". :param str completion_time: Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. - :param Sequence['JobConditionArgs'] conditions: The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + :param Sequence['JobConditionArgs'] conditions: The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ :param int failed: The number of pods which reached phase Failed. - :param str start_time: Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. + :param str start_time: Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. :param int succeeded: The number of pods which reached phase Succeeded. """ if active is not None: pulumi.set(__self__, "active", active) + if completed_indexes is not None: + pulumi.set(__self__, "completed_indexes", completed_indexes) if completion_time is not None: pulumi.set(__self__, "completion_time", completion_time) if conditions is not None: @@ -357,6 +621,14 @@ def active(self) -> Optional[int]: """ return pulumi.get(self, "active") + @property + @pulumi.getter(name="completedIndexes") + def completed_indexes(self) -> Optional[str]: + """ + CompletedIndexes holds the completed indexes when .spec.completionMode = "Indexed" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". + """ + return pulumi.get(self, "completed_indexes") + @property @pulumi.getter(name="completionTime") def completion_time(self) -> Optional[str]: @@ -369,7 +641,7 @@ def completion_time(self) -> Optional[str]: @pulumi.getter def conditions(self) -> Optional[Sequence['outputs.JobCondition']]: """ - The latest available observations of an object's current state. When a job fails, one of the conditions will have type == "Failed". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + The latest available observations of an object's current state. When a Job fails, one of the conditions will have type "Failed" and status true. When a Job is suspended, one of the conditions will have type "Suspended" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type "Complete" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ """ return pulumi.get(self, "conditions") @@ -385,7 +657,7 @@ def failed(self) -> Optional[int]: @pulumi.getter(name="startTime") def start_time(self) -> Optional[str]: """ - Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. + Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. """ return pulumi.get(self, "start_time") @@ -401,3 +673,41 @@ def _translate_property(self, prop): return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop +@pulumi.output_type +class JobTemplateSpec(dict): + """ + JobTemplateSpec describes the data a Job should have when created from a template + """ + def __init__(__self__, *, + metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None, + spec: Optional['outputs.JobSpec'] = None): + """ + JobTemplateSpec describes the data a Job should have when created from a template + :param '_meta.v1.ObjectMetaArgs' metadata: Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param 'JobSpecArgs' spec: Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if spec is not None: + pulumi.set(__self__, "spec", spec) + + @property + @pulumi.getter + def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']: + """ + Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @property + @pulumi.getter + def spec(self) -> Optional['outputs.JobSpec']: + """ + Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + """ + return pulumi.get(self, "spec") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + diff --git a/sdk/python/pulumi_kubernetes/batch/v1beta1/CronJob.py b/sdk/python/pulumi_kubernetes/batch/v1beta1/CronJob.py index ef0ef0687c..626e599f7e 100644 --- a/sdk/python/pulumi_kubernetes/batch/v1beta1/CronJob.py +++ b/sdk/python/pulumi_kubernetes/batch/v1beta1/CronJob.py @@ -59,7 +59,7 @@ def __init__(__self__, __props__['metadata'] = metadata __props__['spec'] = spec __props__['status'] = None - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:batch/v2alpha1:CronJob")]) + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:batch/v1:CronJob"), pulumi.Alias(type_="kubernetes:batch/v2alpha1:CronJob")]) opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(CronJob, __self__).__init__( 'kubernetes:batch/v1beta1:CronJob', diff --git a/sdk/python/pulumi_kubernetes/batch/v1beta1/_inputs.py b/sdk/python/pulumi_kubernetes/batch/v1beta1/_inputs.py index ceb5de9890..64631c9ac2 100644 --- a/sdk/python/pulumi_kubernetes/batch/v1beta1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/batch/v1beta1/_inputs.py @@ -228,16 +228,20 @@ def suspend(self, value: Optional[pulumi.Input[bool]]): class CronJobStatusArgs: def __init__(__self__, *, active: Optional[pulumi.Input[Sequence[pulumi.Input['_core.v1.ObjectReferenceArgs']]]] = None, - last_schedule_time: Optional[pulumi.Input[str]] = None): + last_schedule_time: Optional[pulumi.Input[str]] = None, + last_successful_time: Optional[pulumi.Input[str]] = None): """ CronJobStatus represents the current state of a cron job. :param pulumi.Input[Sequence[pulumi.Input['_core.v1.ObjectReferenceArgs']]] active: A list of pointers to currently running jobs. :param pulumi.Input[str] last_schedule_time: Information when was the last time the job was successfully scheduled. + :param pulumi.Input[str] last_successful_time: Information when was the last time the job successfully completed. """ if active is not None: pulumi.set(__self__, "active", active) if last_schedule_time is not None: pulumi.set(__self__, "last_schedule_time", last_schedule_time) + if last_successful_time is not None: + pulumi.set(__self__, "last_successful_time", last_successful_time) @property @pulumi.getter @@ -263,6 +267,18 @@ def last_schedule_time(self) -> Optional[pulumi.Input[str]]: def last_schedule_time(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "last_schedule_time", value) + @property + @pulumi.getter(name="lastSuccessfulTime") + def last_successful_time(self) -> Optional[pulumi.Input[str]]: + """ + Information when was the last time the job successfully completed. + """ + return pulumi.get(self, "last_successful_time") + + @last_successful_time.setter + def last_successful_time(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "last_successful_time", value) + @pulumi.input_type class JobTemplateSpecArgs: diff --git a/sdk/python/pulumi_kubernetes/batch/v1beta1/outputs.py b/sdk/python/pulumi_kubernetes/batch/v1beta1/outputs.py index b7bc660bcc..757a4e8089 100644 --- a/sdk/python/pulumi_kubernetes/batch/v1beta1/outputs.py +++ b/sdk/python/pulumi_kubernetes/batch/v1beta1/outputs.py @@ -196,16 +196,20 @@ class CronJobStatus(dict): """ def __init__(__self__, *, active: Optional[Sequence['_core.v1.outputs.ObjectReference']] = None, - last_schedule_time: Optional[str] = None): + last_schedule_time: Optional[str] = None, + last_successful_time: Optional[str] = None): """ CronJobStatus represents the current state of a cron job. :param Sequence['_core.v1.ObjectReferenceArgs'] active: A list of pointers to currently running jobs. :param str last_schedule_time: Information when was the last time the job was successfully scheduled. + :param str last_successful_time: Information when was the last time the job successfully completed. """ if active is not None: pulumi.set(__self__, "active", active) if last_schedule_time is not None: pulumi.set(__self__, "last_schedule_time", last_schedule_time) + if last_successful_time is not None: + pulumi.set(__self__, "last_successful_time", last_successful_time) @property @pulumi.getter @@ -223,6 +227,14 @@ def last_schedule_time(self) -> Optional[str]: """ return pulumi.get(self, "last_schedule_time") + @property + @pulumi.getter(name="lastSuccessfulTime") + def last_successful_time(self) -> Optional[str]: + """ + Information when was the last time the job successfully completed. + """ + return pulumi.get(self, "last_successful_time") + def _translate_property(self, prop): return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop diff --git a/sdk/python/pulumi_kubernetes/batch/v2alpha1/CronJob.py b/sdk/python/pulumi_kubernetes/batch/v2alpha1/CronJob.py index 76245dbedc..cb0c7bbed5 100644 --- a/sdk/python/pulumi_kubernetes/batch/v2alpha1/CronJob.py +++ b/sdk/python/pulumi_kubernetes/batch/v2alpha1/CronJob.py @@ -59,7 +59,7 @@ def __init__(__self__, __props__['metadata'] = metadata __props__['spec'] = spec __props__['status'] = None - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:batch/v1beta1:CronJob")]) + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:batch/v1:CronJob"), pulumi.Alias(type_="kubernetes:batch/v1beta1:CronJob")]) opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(CronJob, __self__).__init__( 'kubernetes:batch/v2alpha1:CronJob', diff --git a/sdk/python/pulumi_kubernetes/core/v1/ConfigMap.py b/sdk/python/pulumi_kubernetes/core/v1/ConfigMap.py index 614d0f6b6a..236f4bc8c2 100644 --- a/sdk/python/pulumi_kubernetes/core/v1/ConfigMap.py +++ b/sdk/python/pulumi_kubernetes/core/v1/ConfigMap.py @@ -33,7 +33,7 @@ def __init__(__self__, :param pulumi.Input[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 :param pulumi.Input[Mapping[str, pulumi.Input[str]]] binary_data: BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] data: Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. - :param pulumi.Input[bool] immutable: Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + :param pulumi.Input[bool] immutable: Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. :param pulumi.Input[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 :param pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata """ @@ -118,7 +118,7 @@ def data(self) -> pulumi.Output[Optional[Mapping[str, str]]]: @pulumi.getter def immutable(self) -> pulumi.Output[Optional[bool]]: """ - Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. """ return pulumi.get(self, "immutable") diff --git a/sdk/python/pulumi_kubernetes/core/v1/EphemeralContainers.py b/sdk/python/pulumi_kubernetes/core/v1/EphemeralContainers.py new file mode 100644 index 0000000000..35f0abd4d0 --- /dev/null +++ b/sdk/python/pulumi_kubernetes/core/v1/EphemeralContainers.py @@ -0,0 +1,122 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from . import outputs +from ... import meta as _meta +from ._inputs import * + +__all__ = ['EphemeralContainers'] + + +class EphemeralContainers(pulumi.CustomResource): + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + api_version: Optional[pulumi.Input[str]] = None, + ephemeral_containers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EphemeralContainerArgs']]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']]] = None, + __props__=None, + __name__=None, + __opts__=None): + """ + A list of ephemeral containers used with the Pod ephemeralcontainers subresource. + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[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 + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EphemeralContainerArgs']]]] ephemeral_containers: A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + :param pulumi.Input[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 + """ + if __name__ is not None: + warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) + resource_name = __name__ + if __opts__ is not None: + warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) + opts = __opts__ + if opts is None: + opts = pulumi.ResourceOptions() + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.version is None: + opts.version = _utilities.get_version() + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = dict() + + __props__['api_version'] = 'v1' + if ephemeral_containers is None and not opts.urn: + raise TypeError("Missing required property 'ephemeral_containers'") + __props__['ephemeral_containers'] = ephemeral_containers + __props__['kind'] = 'EphemeralContainers' + __props__['metadata'] = metadata + super(EphemeralContainers, __self__).__init__( + 'kubernetes:core/v1:EphemeralContainers', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'EphemeralContainers': + """ + Get an existing EphemeralContainers resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = dict() + + __props__["api_version"] = None + __props__["ephemeral_containers"] = None + __props__["kind"] = None + __props__["metadata"] = None + return EphemeralContainers(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter(name="ephemeralContainers") + def ephemeral_containers(self) -> pulumi.Output[Sequence['outputs.EphemeralContainer']]: + """ + A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified. + """ + return pulumi.get(self, "ephemeral_containers") + + @property + @pulumi.getter + def kind(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ObjectMeta']]: + return pulumi.get(self, "metadata") + + def translate_output_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + def translate_input_property(self, prop): + return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop + diff --git a/sdk/python/pulumi_kubernetes/core/v1/LimitRangeList.py b/sdk/python/pulumi_kubernetes/core/v1/LimitRangeList.py index 2d761ba5b7..2e80d9ac64 100644 --- a/sdk/python/pulumi_kubernetes/core/v1/LimitRangeList.py +++ b/sdk/python/pulumi_kubernetes/core/v1/LimitRangeList.py @@ -31,7 +31,7 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[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 - :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['LimitRangeArgs']]]] items: Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['LimitRangeArgs']]]] items: Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ :param pulumi.Input[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 :param pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']] metadata: Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds """ @@ -98,7 +98,7 @@ def api_version(self) -> pulumi.Output[Optional[str]]: @pulumi.getter def items(self) -> pulumi.Output[Sequence['outputs.LimitRange']]: """ - Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ """ return pulumi.get(self, "items") diff --git a/sdk/python/pulumi_kubernetes/core/v1/Secret.py b/sdk/python/pulumi_kubernetes/core/v1/Secret.py index 4f4168c8ce..490ad13ccb 100644 --- a/sdk/python/pulumi_kubernetes/core/v1/Secret.py +++ b/sdk/python/pulumi_kubernetes/core/v1/Secret.py @@ -43,10 +43,10 @@ def __init__(__self__, :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[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 :param pulumi.Input[Mapping[str, pulumi.Input[str]]] data: Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 - :param pulumi.Input[bool] immutable: Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + :param pulumi.Input[bool] immutable: Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. :param pulumi.Input[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 :param pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] string_data: stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] string_data: stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. :param pulumi.Input[str] type: Used to facilitate programmatic handling of secret data. """ if __name__ is not None: @@ -126,7 +126,7 @@ def data(self) -> pulumi.Output[Optional[Mapping[str, str]]]: @pulumi.getter def immutable(self) -> pulumi.Output[Optional[bool]]: """ - Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. """ return pulumi.get(self, "immutable") @@ -150,7 +150,7 @@ def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ObjectMeta']]: @pulumi.getter(name="stringData") def string_data(self) -> pulumi.Output[Optional[Mapping[str, str]]]: """ - stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. """ return pulumi.get(self, "string_data") diff --git a/sdk/python/pulumi_kubernetes/core/v1/__init__.py b/sdk/python/pulumi_kubernetes/core/v1/__init__.py index 9e2af93389..9d07162715 100644 --- a/sdk/python/pulumi_kubernetes/core/v1/__init__.py +++ b/sdk/python/pulumi_kubernetes/core/v1/__init__.py @@ -9,6 +9,7 @@ from .ConfigMapList import * from .Endpoints import * from .EndpointsList import * +from .EphemeralContainers import * from .Event import * from .EventList import * from .LimitRange import * @@ -60,6 +61,8 @@ def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource: return Endpoints(name, pulumi.ResourceOptions(urn=urn)) elif typ == "kubernetes:core/v1:EndpointsList": return EndpointsList(name, pulumi.ResourceOptions(urn=urn)) + elif typ == "kubernetes:core/v1:EphemeralContainers": + return EphemeralContainers(name, pulumi.ResourceOptions(urn=urn)) elif typ == "kubernetes:core/v1:Event": return Event(name, pulumi.ResourceOptions(urn=urn)) elif typ == "kubernetes:core/v1:EventList": diff --git a/sdk/python/pulumi_kubernetes/core/v1/_inputs.py b/sdk/python/pulumi_kubernetes/core/v1/_inputs.py index dc08fb91fe..1afeace588 100644 --- a/sdk/python/pulumi_kubernetes/core/v1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/core/v1/_inputs.py @@ -1238,7 +1238,7 @@ def __init__(__self__, *, :param pulumi.Input[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 :param pulumi.Input[Mapping[str, pulumi.Input[str]]] binary_data: BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] data: Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. - :param pulumi.Input[bool] immutable: Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + :param pulumi.Input[bool] immutable: Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. :param pulumi.Input[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 :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata """ @@ -1295,7 +1295,7 @@ def data(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): @pulumi.getter def immutable(self) -> Optional[pulumi.Input[bool]]: """ - Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. """ return pulumi.get(self, "immutable") @@ -1680,7 +1680,7 @@ def __init__(__self__, *, :param pulumi.Input['ProbeArgs'] liveness_probe: Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes :param pulumi.Input[Sequence[pulumi.Input['ContainerPortArgs']]] ports: List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. :param pulumi.Input['ProbeArgs'] readiness_probe: Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - :param pulumi.Input['ResourceRequirementsArgs'] resources: Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :param pulumi.Input['ResourceRequirementsArgs'] resources: Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ :param pulumi.Input['SecurityContextArgs'] security_context: Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ :param pulumi.Input['ProbeArgs'] startup_probe: StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes :param pulumi.Input[bool] stdin: Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. @@ -1872,7 +1872,7 @@ def readiness_probe(self, value: Optional[pulumi.Input['ProbeArgs']]): @pulumi.getter def resources(self) -> Optional[pulumi.Input['ResourceRequirementsArgs']]: """ - Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ """ return pulumi.get(self, "resources") @@ -3560,11 +3560,9 @@ def working_dir(self, value: Optional[pulumi.Input[str]]): @pulumi.input_type class EphemeralVolumeSourceArgs: def __init__(__self__, *, - read_only: Optional[pulumi.Input[bool]] = None, volume_claim_template: Optional[pulumi.Input['PersistentVolumeClaimTemplateArgs']] = None): """ Represents an ephemeral volume that is handled by a normal storage driver. - :param pulumi.Input[bool] read_only: Specifies a read-only configuration for the volume. Defaults to false (read/write). :param pulumi.Input['PersistentVolumeClaimTemplateArgs'] volume_claim_template: Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. @@ -3573,23 +3571,9 @@ def __init__(__self__, *, Required, must not be nil. """ - if read_only is not None: - pulumi.set(__self__, "read_only", read_only) if volume_claim_template is not None: pulumi.set(__self__, "volume_claim_template", volume_claim_template) - @property - @pulumi.getter(name="readOnly") - def read_only(self) -> Optional[pulumi.Input[bool]]: - """ - Specifies a read-only configuration for the volume. Defaults to false (read/write). - """ - return pulumi.get(self, "read_only") - - @read_only.setter - def read_only(self, value: Optional[pulumi.Input[bool]]): - pulumi.set(self, "read_only", value) - @property @pulumi.getter(name="volumeClaimTemplate") def volume_claim_template(self) -> Optional[pulumi.Input['PersistentVolumeClaimTemplateArgs']]: @@ -8297,16 +8281,20 @@ class PodAffinityTermArgs: def __init__(__self__, *, topology_key: pulumi.Input[str], label_selector: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']] = None, + namespace_selector: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']] = None, namespaces: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): """ Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running :param pulumi.Input[str] topology_key: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. :param pulumi.Input['_meta.v1.LabelSelectorArgs'] label_selector: A label query over a set of resources, in this case pods. - :param pulumi.Input[Sequence[pulumi.Input[str]]] namespaces: namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" + :param pulumi.Input['_meta.v1.LabelSelectorArgs'] namespace_selector: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + :param pulumi.Input[Sequence[pulumi.Input[str]]] namespaces: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" """ pulumi.set(__self__, "topology_key", topology_key) if label_selector is not None: pulumi.set(__self__, "label_selector", label_selector) + if namespace_selector is not None: + pulumi.set(__self__, "namespace_selector", namespace_selector) if namespaces is not None: pulumi.set(__self__, "namespaces", namespaces) @@ -8334,11 +8322,23 @@ def label_selector(self) -> Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']] def label_selector(self, value: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]): pulumi.set(self, "label_selector", value) + @property + @pulumi.getter(name="namespaceSelector") + def namespace_selector(self) -> Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]: + """ + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + """ + return pulumi.get(self, "namespace_selector") + + @namespace_selector.setter + def namespace_selector(self, value: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]): + pulumi.set(self, "namespace_selector", value) + @property @pulumi.getter def namespaces(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ - namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" """ return pulumi.get(self, "namespaces") @@ -8876,7 +8876,7 @@ def __init__(__self__, *, :param pulumi.Input[bool] set_hostname_as_fqdn: If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false. :param pulumi.Input[bool] share_process_namespace: Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. :param pulumi.Input[str] subdomain: If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - :param pulumi.Input[int] termination_grace_period_seconds: Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + :param pulumi.Input[int] termination_grace_period_seconds: Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. :param pulumi.Input[Sequence[pulumi.Input['TolerationArgs']]] tolerations: If specified, the pod's tolerations. :param pulumi.Input[Sequence[pulumi.Input['TopologySpreadConstraintArgs']]] topology_spread_constraints: TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed. :param pulumi.Input[Sequence[pulumi.Input['VolumeArgs']]] volumes: List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes @@ -9327,7 +9327,7 @@ def subdomain(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="terminationGracePeriodSeconds") def termination_grace_period_seconds(self) -> Optional[pulumi.Input[int]]: """ - Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. """ return pulumi.get(self, "termination_grace_period_seconds") @@ -9870,6 +9870,7 @@ def __init__(__self__, *, period_seconds: Optional[pulumi.Input[int]] = None, success_threshold: Optional[pulumi.Input[int]] = None, tcp_socket: Optional[pulumi.Input['TCPSocketActionArgs']] = None, + termination_grace_period_seconds: Optional[pulumi.Input[int]] = None, timeout_seconds: Optional[pulumi.Input[int]] = None): """ Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. @@ -9880,6 +9881,7 @@ def __init__(__self__, *, :param pulumi.Input[int] period_seconds: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. :param pulumi.Input[int] success_threshold: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. :param pulumi.Input['TCPSocketActionArgs'] tcp_socket: TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported + :param pulumi.Input[int] termination_grace_period_seconds: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. :param pulumi.Input[int] timeout_seconds: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes """ if exec_ is not None: @@ -9896,6 +9898,8 @@ def __init__(__self__, *, pulumi.set(__self__, "success_threshold", success_threshold) if tcp_socket is not None: pulumi.set(__self__, "tcp_socket", tcp_socket) + if termination_grace_period_seconds is not None: + pulumi.set(__self__, "termination_grace_period_seconds", termination_grace_period_seconds) if timeout_seconds is not None: pulumi.set(__self__, "timeout_seconds", timeout_seconds) @@ -9983,6 +9987,18 @@ def tcp_socket(self) -> Optional[pulumi.Input['TCPSocketActionArgs']]: def tcp_socket(self, value: Optional[pulumi.Input['TCPSocketActionArgs']]): pulumi.set(self, "tcp_socket", value) + @property + @pulumi.getter(name="terminationGracePeriodSeconds") + def termination_grace_period_seconds(self) -> Optional[pulumi.Input[int]]: + """ + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. + """ + return pulumi.get(self, "termination_grace_period_seconds") + + @termination_grace_period_seconds.setter + def termination_grace_period_seconds(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "termination_grace_period_seconds", value) + @property @pulumi.getter(name="timeoutSeconds") def timeout_seconds(self) -> Optional[pulumi.Input[int]]: @@ -11000,8 +11016,8 @@ def __init__(__self__, *, requests: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None): """ ResourceRequirements describes the compute resource requirements. - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] limits: Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] requests: Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] limits: Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] requests: Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ """ if limits is not None: pulumi.set(__self__, "limits", limits) @@ -11012,7 +11028,7 @@ def __init__(__self__, *, @pulumi.getter def limits(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ """ return pulumi.get(self, "limits") @@ -11024,7 +11040,7 @@ def limits(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]) @pulumi.getter def requests(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ """ return pulumi.get(self, "requests") @@ -11580,10 +11596,10 @@ def __init__(__self__, *, https://kubernetes.io/docs/concepts/configuration/secret/#risks :param pulumi.Input[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 :param pulumi.Input[Mapping[str, pulumi.Input[str]]] data: Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 - :param pulumi.Input[bool] immutable: Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + :param pulumi.Input[bool] immutable: Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. :param pulumi.Input[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 :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] string_data: stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] string_data: stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. :param pulumi.Input[str] type: Used to facilitate programmatic handling of secret data. """ if api_version is not None: @@ -11629,7 +11645,7 @@ def data(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): @pulumi.getter def immutable(self) -> Optional[pulumi.Input[bool]]: """ - Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. """ return pulumi.get(self, "immutable") @@ -11665,7 +11681,7 @@ def metadata(self, value: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]): @pulumi.getter(name="stringData") def string_data(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. """ return pulumi.get(self, "string_data") @@ -12524,9 +12540,11 @@ def __init__(__self__, *, external_name: Optional[pulumi.Input[str]] = None, external_traffic_policy: Optional[pulumi.Input[str]] = None, health_check_node_port: Optional[pulumi.Input[int]] = None, + internal_traffic_policy: Optional[pulumi.Input[str]] = None, ip_families: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, ip_family: Optional[pulumi.Input[str]] = None, ip_family_policy: Optional[pulumi.Input[str]] = None, + load_balancer_class: Optional[pulumi.Input[str]] = None, load_balancer_ip: Optional[pulumi.Input[str]] = None, load_balancer_source_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, ports: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePortArgs']]]] = None, @@ -12544,14 +12562,16 @@ def __init__(__self__, *, Unless the "IPv6DualStack" feature gate is enabled, this field is limited to one value, which must be the same as the clusterIP field. If the feature gate is enabled, this field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies :param pulumi.Input[Sequence[pulumi.Input[str]]] external_ips: externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. - :param pulumi.Input[str] external_name: externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be + :param pulumi.Input[str] external_name: externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". :param pulumi.Input[str] external_traffic_policy: externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. "Local" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. "Cluster" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. :param pulumi.Input[int] health_check_node_port: healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type). + :param pulumi.Input[str] internal_traffic_policy: InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_families: IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the "IPv6DualStack" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are "IPv4" and "IPv6". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to "headless" services. This field will be wiped when updating a Service to type ExternalName. This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. :param pulumi.Input[str] ip_family: ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which allocate external load-balancers should use the same IP family. Endpoints for this Service will be of this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment. :param pulumi.Input[str] ip_family_policy: IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the "IPv6DualStack" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be "SingleStack" (a single IP family), "PreferDualStack" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or "RequireDualStack" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName. + :param pulumi.Input[str] load_balancer_class: loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. :param pulumi.Input[str] load_balancer_ip: Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. :param pulumi.Input[Sequence[pulumi.Input[str]]] load_balancer_source_ranges: If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ :param pulumi.Input[Sequence[pulumi.Input['ServicePortArgs']]] ports: The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies @@ -12559,7 +12579,7 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, pulumi.Input[str]]] selector: Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ :param pulumi.Input[str] session_affinity: Supports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies :param pulumi.Input['SessionAffinityConfigArgs'] session_affinity_config: sessionAffinityConfig contains the configurations of session affinity. - :param pulumi.Input[Sequence[pulumi.Input[str]]] topology_keys: topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. + :param pulumi.Input[Sequence[pulumi.Input[str]]] topology_keys: topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. :param pulumi.Input[Union[str, 'ServiceSpecType']] type: type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. "ExternalName" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types """ if allocate_load_balancer_node_ports is not None: @@ -12576,12 +12596,16 @@ def __init__(__self__, *, pulumi.set(__self__, "external_traffic_policy", external_traffic_policy) if health_check_node_port is not None: pulumi.set(__self__, "health_check_node_port", health_check_node_port) + if internal_traffic_policy is not None: + pulumi.set(__self__, "internal_traffic_policy", internal_traffic_policy) if ip_families is not None: pulumi.set(__self__, "ip_families", ip_families) if ip_family is not None: pulumi.set(__self__, "ip_family", ip_family) if ip_family_policy is not None: pulumi.set(__self__, "ip_family_policy", ip_family_policy) + if load_balancer_class is not None: + pulumi.set(__self__, "load_balancer_class", load_balancer_class) if load_balancer_ip is not None: pulumi.set(__self__, "load_balancer_ip", load_balancer_ip) if load_balancer_source_ranges is not None: @@ -12655,7 +12679,7 @@ def external_ips(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]] @pulumi.getter(name="externalName") def external_name(self) -> Optional[pulumi.Input[str]]: """ - externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be + externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". """ return pulumi.get(self, "external_name") @@ -12687,6 +12711,18 @@ def health_check_node_port(self) -> Optional[pulumi.Input[int]]: def health_check_node_port(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "health_check_node_port", value) + @property + @pulumi.getter(name="internalTrafficPolicy") + def internal_traffic_policy(self) -> Optional[pulumi.Input[str]]: + """ + InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". + """ + return pulumi.get(self, "internal_traffic_policy") + + @internal_traffic_policy.setter + def internal_traffic_policy(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "internal_traffic_policy", value) + @property @pulumi.getter(name="ipFamilies") def ip_families(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: @@ -12725,6 +12761,18 @@ def ip_family_policy(self) -> Optional[pulumi.Input[str]]: def ip_family_policy(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "ip_family_policy", value) + @property + @pulumi.getter(name="loadBalancerClass") + def load_balancer_class(self) -> Optional[pulumi.Input[str]]: + """ + loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. + """ + return pulumi.get(self, "load_balancer_class") + + @load_balancer_class.setter + def load_balancer_class(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "load_balancer_class", value) + @property @pulumi.getter(name="loadBalancerIP") def load_balancer_ip(self) -> Optional[pulumi.Input[str]]: @@ -12813,7 +12861,7 @@ def session_affinity_config(self, value: Optional[pulumi.Input['SessionAffinityC @pulumi.getter(name="topologyKeys") def topology_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ - topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. + topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. """ return pulumi.get(self, "topology_keys") @@ -13545,7 +13593,7 @@ def __init__(__self__, *, :param pulumi.Input['CSIVolumeSourceArgs'] csi: CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). :param pulumi.Input['DownwardAPIVolumeSourceArgs'] downward_api: DownwardAPI represents downward API about the pod that should populate this volume :param pulumi.Input['EmptyDirVolumeSourceArgs'] empty_dir: EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - :param pulumi.Input['EphemeralVolumeSourceArgs'] ephemeral: Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + :param pulumi.Input['EphemeralVolumeSourceArgs'] ephemeral: Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, @@ -13559,6 +13607,8 @@ def __init__(__self__, *, Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. A pod can use both types of ephemeral volumes and persistent volumes at the same time. + + This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. :param pulumi.Input['FCVolumeSourceArgs'] fc: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. :param pulumi.Input['FlexVolumeSourceArgs'] flex_volume: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. :param pulumi.Input['FlockerVolumeSourceArgs'] flocker: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running @@ -13763,7 +13813,7 @@ def empty_dir(self, value: Optional[pulumi.Input['EmptyDirVolumeSourceArgs']]): @pulumi.getter def ephemeral(self) -> Optional[pulumi.Input['EphemeralVolumeSourceArgs']]: """ - Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, @@ -13777,6 +13827,8 @@ def ephemeral(self) -> Optional[pulumi.Input['EphemeralVolumeSourceArgs']]: Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. A pod can use both types of ephemeral volumes and persistent volumes at the same time. + + This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. """ return pulumi.get(self, "ephemeral") diff --git a/sdk/python/pulumi_kubernetes/core/v1/outputs.py b/sdk/python/pulumi_kubernetes/core/v1/outputs.py index 89716cb2d2..296a8a6eb9 100644 --- a/sdk/python/pulumi_kubernetes/core/v1/outputs.py +++ b/sdk/python/pulumi_kubernetes/core/v1/outputs.py @@ -1092,7 +1092,7 @@ def __init__(__self__, *, :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 :param Mapping[str, str] binary_data: BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. :param Mapping[str, str] data: Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. - :param bool immutable: Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + :param bool immutable: Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. :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 :param '_meta.v1.ObjectMetaArgs' metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata """ @@ -1137,7 +1137,7 @@ def data(self) -> Optional[Mapping[str, str]]: @pulumi.getter def immutable(self) -> Optional[bool]: """ - Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. """ return pulumi.get(self, "immutable") @@ -1484,7 +1484,7 @@ def __init__(__self__, *, :param 'ProbeArgs' liveness_probe: Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes :param Sequence['ContainerPortArgs'] ports: List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. :param 'ProbeArgs' readiness_probe: Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - :param 'ResourceRequirementsArgs' resources: Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :param 'ResourceRequirementsArgs' resources: Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ :param 'SecurityContextArgs' security_context: Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ :param 'ProbeArgs' startup_probe: StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes :param bool stdin: Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. @@ -1632,7 +1632,7 @@ def readiness_probe(self) -> Optional['outputs.Probe']: @pulumi.getter def resources(self) -> Optional['outputs.ResourceRequirements']: """ - Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ """ return pulumi.get(self, "resources") @@ -3072,11 +3072,9 @@ class EphemeralVolumeSource(dict): Represents an ephemeral volume that is handled by a normal storage driver. """ def __init__(__self__, *, - read_only: Optional[bool] = None, volume_claim_template: Optional['outputs.PersistentVolumeClaimTemplate'] = None): """ Represents an ephemeral volume that is handled by a normal storage driver. - :param bool read_only: Specifies a read-only configuration for the volume. Defaults to false (read/write). :param 'PersistentVolumeClaimTemplateArgs' volume_claim_template: Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. @@ -3085,19 +3083,9 @@ def __init__(__self__, *, Required, must not be nil. """ - if read_only is not None: - pulumi.set(__self__, "read_only", read_only) if volume_claim_template is not None: pulumi.set(__self__, "volume_claim_template", volume_claim_template) - @property - @pulumi.getter(name="readOnly") - def read_only(self) -> Optional[bool]: - """ - Specifies a read-only configuration for the volume. Defaults to false (read/write). - """ - return pulumi.get(self, "read_only") - @property @pulumi.getter(name="volumeClaimTemplate") def volume_claim_template(self) -> Optional['outputs.PersistentVolumeClaimTemplate']: @@ -7122,16 +7110,20 @@ class PodAffinityTerm(dict): def __init__(__self__, *, topology_key: str, label_selector: Optional['_meta.v1.outputs.LabelSelector'] = None, + namespace_selector: Optional['_meta.v1.outputs.LabelSelector'] = None, namespaces: Optional[Sequence[str]] = None): """ Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running :param str topology_key: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. :param '_meta.v1.LabelSelectorArgs' label_selector: A label query over a set of resources, in this case pods. - :param Sequence[str] namespaces: namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" + :param '_meta.v1.LabelSelectorArgs' namespace_selector: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + :param Sequence[str] namespaces: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" """ pulumi.set(__self__, "topology_key", topology_key) if label_selector is not None: pulumi.set(__self__, "label_selector", label_selector) + if namespace_selector is not None: + pulumi.set(__self__, "namespace_selector", namespace_selector) if namespaces is not None: pulumi.set(__self__, "namespaces", namespaces) @@ -7151,11 +7143,19 @@ def label_selector(self) -> Optional['_meta.v1.outputs.LabelSelector']: """ return pulumi.get(self, "label_selector") + @property + @pulumi.getter(name="namespaceSelector") + def namespace_selector(self) -> Optional['_meta.v1.outputs.LabelSelector']: + """ + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + """ + return pulumi.get(self, "namespace_selector") + @property @pulumi.getter def namespaces(self) -> Optional[Sequence[str]]: """ - namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" """ return pulumi.get(self, "namespaces") @@ -7638,7 +7638,7 @@ def __init__(__self__, *, :param bool set_hostname_as_fqdn: If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false. :param bool share_process_namespace: Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. :param str subdomain: If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - :param int termination_grace_period_seconds: Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + :param int termination_grace_period_seconds: Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. :param Sequence['TolerationArgs'] tolerations: If specified, the pod's tolerations. :param Sequence['TopologySpreadConstraintArgs'] topology_spread_constraints: TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed. :param Sequence['VolumeArgs'] volumes: List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes @@ -7965,7 +7965,7 @@ def subdomain(self) -> Optional[str]: @pulumi.getter(name="terminationGracePeriodSeconds") def termination_grace_period_seconds(self) -> Optional[int]: """ - Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. """ return pulumi.get(self, "termination_grace_period_seconds") @@ -8423,6 +8423,7 @@ def __init__(__self__, *, period_seconds: Optional[int] = None, success_threshold: Optional[int] = None, tcp_socket: Optional['outputs.TCPSocketAction'] = None, + termination_grace_period_seconds: Optional[int] = None, timeout_seconds: Optional[int] = None): """ Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. @@ -8433,6 +8434,7 @@ def __init__(__self__, *, :param int period_seconds: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. :param int success_threshold: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. :param 'TCPSocketActionArgs' tcp_socket: TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported + :param int termination_grace_period_seconds: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. :param int timeout_seconds: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes """ if exec_ is not None: @@ -8449,6 +8451,8 @@ def __init__(__self__, *, pulumi.set(__self__, "success_threshold", success_threshold) if tcp_socket is not None: pulumi.set(__self__, "tcp_socket", tcp_socket) + if termination_grace_period_seconds is not None: + pulumi.set(__self__, "termination_grace_period_seconds", termination_grace_period_seconds) if timeout_seconds is not None: pulumi.set(__self__, "timeout_seconds", timeout_seconds) @@ -8508,6 +8512,14 @@ def tcp_socket(self) -> Optional['outputs.TCPSocketAction']: """ return pulumi.get(self, "tcp_socket") + @property + @pulumi.getter(name="terminationGracePeriodSeconds") + def termination_grace_period_seconds(self) -> Optional[int]: + """ + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. + """ + return pulumi.get(self, "termination_grace_period_seconds") + @property @pulumi.getter(name="timeoutSeconds") def timeout_seconds(self) -> Optional[int]: @@ -9371,8 +9383,8 @@ def __init__(__self__, *, requests: Optional[Mapping[str, str]] = None): """ ResourceRequirements describes the compute resource requirements. - :param Mapping[str, str] limits: Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - :param Mapping[str, str] requests: Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :param Mapping[str, str] limits: Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + :param Mapping[str, str] requests: Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ """ if limits is not None: pulumi.set(__self__, "limits", limits) @@ -9383,7 +9395,7 @@ def __init__(__self__, *, @pulumi.getter def limits(self) -> Optional[Mapping[str, str]]: """ - Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ """ return pulumi.get(self, "limits") @@ -9391,7 +9403,7 @@ def limits(self) -> Optional[Mapping[str, str]]: @pulumi.getter def requests(self) -> Optional[Mapping[str, str]]: """ - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ """ return pulumi.get(self, "requests") @@ -9875,10 +9887,10 @@ def __init__(__self__, *, https://kubernetes.io/docs/concepts/configuration/secret/#risks :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 :param Mapping[str, str] data: Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 - :param bool immutable: Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + :param bool immutable: Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. :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 :param '_meta.v1.ObjectMetaArgs' metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - :param Mapping[str, str] string_data: stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + :param Mapping[str, str] string_data: stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. :param str type: Used to facilitate programmatic handling of secret data. """ if api_version is not None: @@ -9916,7 +9928,7 @@ def data(self) -> Optional[Mapping[str, str]]: @pulumi.getter def immutable(self) -> Optional[bool]: """ - Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate. + Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. """ return pulumi.get(self, "immutable") @@ -9940,7 +9952,7 @@ def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']: @pulumi.getter(name="stringData") def string_data(self) -> Optional[Mapping[str, str]]: """ - stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. + stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. """ return pulumi.get(self, "string_data") @@ -10708,9 +10720,11 @@ def __init__(__self__, *, external_name: Optional[str] = None, external_traffic_policy: Optional[str] = None, health_check_node_port: Optional[int] = None, + internal_traffic_policy: Optional[str] = None, ip_families: Optional[Sequence[str]] = None, ip_family: Optional[str] = None, ip_family_policy: Optional[str] = None, + load_balancer_class: Optional[str] = None, load_balancer_ip: Optional[str] = None, load_balancer_source_ranges: Optional[Sequence[str]] = None, ports: Optional[Sequence['outputs.ServicePort']] = None, @@ -10728,14 +10742,16 @@ def __init__(__self__, *, Unless the "IPv6DualStack" feature gate is enabled, this field is limited to one value, which must be the same as the clusterIP field. If the feature gate is enabled, this field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies :param Sequence[str] external_ips: externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. - :param str external_name: externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be + :param str external_name: externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". :param str external_traffic_policy: externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. "Local" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. "Cluster" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. :param int health_check_node_port: healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type). + :param str internal_traffic_policy: InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". :param Sequence[str] ip_families: IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the "IPv6DualStack" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are "IPv4" and "IPv6". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to "headless" services. This field will be wiped when updating a Service to type ExternalName. This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. :param str ip_family: ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which allocate external load-balancers should use the same IP family. Endpoints for this Service will be of this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment. :param str ip_family_policy: IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the "IPv6DualStack" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be "SingleStack" (a single IP family), "PreferDualStack" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or "RequireDualStack" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName. + :param str load_balancer_class: loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. :param str load_balancer_ip: Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. :param Sequence[str] load_balancer_source_ranges: If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ :param Sequence['ServicePortArgs'] ports: The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies @@ -10743,7 +10759,7 @@ def __init__(__self__, *, :param Mapping[str, str] selector: Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ :param str session_affinity: Supports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies :param 'SessionAffinityConfigArgs' session_affinity_config: sessionAffinityConfig contains the configurations of session affinity. - :param Sequence[str] topology_keys: topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. + :param Sequence[str] topology_keys: topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. :param Union[str, 'ServiceSpecType'] type: type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. "ExternalName" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types """ if allocate_load_balancer_node_ports is not None: @@ -10760,12 +10776,16 @@ def __init__(__self__, *, pulumi.set(__self__, "external_traffic_policy", external_traffic_policy) if health_check_node_port is not None: pulumi.set(__self__, "health_check_node_port", health_check_node_port) + if internal_traffic_policy is not None: + pulumi.set(__self__, "internal_traffic_policy", internal_traffic_policy) if ip_families is not None: pulumi.set(__self__, "ip_families", ip_families) if ip_family is not None: pulumi.set(__self__, "ip_family", ip_family) if ip_family_policy is not None: pulumi.set(__self__, "ip_family_policy", ip_family_policy) + if load_balancer_class is not None: + pulumi.set(__self__, "load_balancer_class", load_balancer_class) if load_balancer_ip is not None: pulumi.set(__self__, "load_balancer_ip", load_balancer_ip) if load_balancer_source_ranges is not None: @@ -10823,7 +10843,7 @@ def external_ips(self) -> Optional[Sequence[str]]: @pulumi.getter(name="externalName") def external_name(self) -> Optional[str]: """ - externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be + externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". """ return pulumi.get(self, "external_name") @@ -10843,6 +10863,14 @@ def health_check_node_port(self) -> Optional[int]: """ return pulumi.get(self, "health_check_node_port") + @property + @pulumi.getter(name="internalTrafficPolicy") + def internal_traffic_policy(self) -> Optional[str]: + """ + InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". + """ + return pulumi.get(self, "internal_traffic_policy") + @property @pulumi.getter(name="ipFamilies") def ip_families(self) -> Optional[Sequence[str]]: @@ -10869,6 +10897,14 @@ def ip_family_policy(self) -> Optional[str]: """ return pulumi.get(self, "ip_family_policy") + @property + @pulumi.getter(name="loadBalancerClass") + def load_balancer_class(self) -> Optional[str]: + """ + loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. + """ + return pulumi.get(self, "load_balancer_class") + @property @pulumi.getter(name="loadBalancerIP") def load_balancer_ip(self) -> Optional[str]: @@ -10929,7 +10965,7 @@ def session_affinity_config(self) -> Optional['outputs.SessionAffinityConfig']: @pulumi.getter(name="topologyKeys") def topology_keys(self) -> Optional[Sequence[str]]: """ - topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. + topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version. """ return pulumi.get(self, "topology_keys") @@ -11587,7 +11623,7 @@ def __init__(__self__, *, :param 'CSIVolumeSourceArgs' csi: CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). :param 'DownwardAPIVolumeSourceArgs' downward_api: DownwardAPI represents downward API about the pod that should populate this volume :param 'EmptyDirVolumeSourceArgs' empty_dir: EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - :param 'EphemeralVolumeSourceArgs' ephemeral: Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + :param 'EphemeralVolumeSourceArgs' ephemeral: Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, @@ -11601,6 +11637,8 @@ def __init__(__self__, *, Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. A pod can use both types of ephemeral volumes and persistent volumes at the same time. + + This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. :param 'FCVolumeSourceArgs' fc: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. :param 'FlexVolumeSourceArgs' flex_volume: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. :param 'FlockerVolumeSourceArgs' flocker: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running @@ -11765,7 +11803,7 @@ def empty_dir(self) -> Optional['outputs.EmptyDirVolumeSource']: @pulumi.getter def ephemeral(self) -> Optional['outputs.EphemeralVolumeSource']: """ - Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, @@ -11779,6 +11817,8 @@ def ephemeral(self) -> Optional['outputs.EphemeralVolumeSource']: Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. A pod can use both types of ephemeral volumes and persistent volumes at the same time. + + This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. """ return pulumi.get(self, "ephemeral") diff --git a/sdk/python/pulumi_kubernetes/discovery/__init__.py b/sdk/python/pulumi_kubernetes/discovery/__init__.py index 0bf2eeb4ef..c1f755c4ab 100644 --- a/sdk/python/pulumi_kubernetes/discovery/__init__.py +++ b/sdk/python/pulumi_kubernetes/discovery/__init__.py @@ -5,5 +5,6 @@ # Make subpackages available: from . import ( + v1, v1beta1, ) diff --git a/sdk/python/pulumi_kubernetes/discovery/v1/EndpointSlice.py b/sdk/python/pulumi_kubernetes/discovery/v1/EndpointSlice.py new file mode 100644 index 0000000000..09db8483d1 --- /dev/null +++ b/sdk/python/pulumi_kubernetes/discovery/v1/EndpointSlice.py @@ -0,0 +1,155 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from . import outputs +from ... import core as _core +from ... import meta as _meta +from ._inputs import * + +__all__ = ['EndpointSlice'] + + +class EndpointSlice(pulumi.CustomResource): + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + address_type: Optional[pulumi.Input[str]] = None, + api_version: Optional[pulumi.Input[str]] = None, + endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EndpointArgs']]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']]] = None, + ports: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EndpointPortArgs']]]]] = None, + __props__=None, + __name__=None, + __opts__=None): + """ + EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] address_type: addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + :param pulumi.Input[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 + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EndpointArgs']]]] endpoints: endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + :param pulumi.Input[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 + :param pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']] metadata: Standard object's metadata. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EndpointPortArgs']]]] ports: ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + """ + if __name__ is not None: + warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) + resource_name = __name__ + if __opts__ is not None: + warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) + opts = __opts__ + if opts is None: + opts = pulumi.ResourceOptions() + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.version is None: + opts.version = _utilities.get_version() + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = dict() + + if address_type is None and not opts.urn: + raise TypeError("Missing required property 'address_type'") + __props__['address_type'] = address_type + __props__['api_version'] = 'discovery.k8s.io/v1' + if endpoints is None and not opts.urn: + raise TypeError("Missing required property 'endpoints'") + __props__['endpoints'] = endpoints + __props__['kind'] = 'EndpointSlice' + __props__['metadata'] = metadata + __props__['ports'] = ports + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:discovery.k8s.io/v1beta1:EndpointSlice")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) + super(EndpointSlice, __self__).__init__( + 'kubernetes:discovery.k8s.io/v1:EndpointSlice', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'EndpointSlice': + """ + Get an existing EndpointSlice resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = dict() + + __props__["address_type"] = None + __props__["api_version"] = None + __props__["endpoints"] = None + __props__["kind"] = None + __props__["metadata"] = None + __props__["ports"] = None + return EndpointSlice(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="addressType") + def address_type(self) -> pulumi.Output[str]: + """ + addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + """ + return pulumi.get(self, "address_type") + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def endpoints(self) -> pulumi.Output[Sequence['outputs.Endpoint']]: + """ + endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + """ + return pulumi.get(self, "endpoints") + + @property + @pulumi.getter + def kind(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ObjectMeta']]: + """ + Standard object's metadata. + """ + return pulumi.get(self, "metadata") + + @property + @pulumi.getter + def ports(self) -> pulumi.Output[Optional[Sequence['outputs.EndpointPort']]]: + """ + ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + """ + return pulumi.get(self, "ports") + + def translate_output_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + def translate_input_property(self, prop): + return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop + diff --git a/sdk/python/pulumi_kubernetes/discovery/v1/EndpointSliceList.py b/sdk/python/pulumi_kubernetes/discovery/v1/EndpointSliceList.py new file mode 100644 index 0000000000..6880dd5602 --- /dev/null +++ b/sdk/python/pulumi_kubernetes/discovery/v1/EndpointSliceList.py @@ -0,0 +1,127 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from . import outputs +from ... import core as _core +from ... import meta as _meta +from ._inputs import * + +__all__ = ['EndpointSliceList'] + + +class EndpointSliceList(pulumi.CustomResource): + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + api_version: Optional[pulumi.Input[str]] = None, + items: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EndpointSliceArgs']]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']]] = None, + __props__=None, + __name__=None, + __opts__=None): + """ + EndpointSliceList represents a list of endpoint slices + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[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 + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EndpointSliceArgs']]]] items: List of endpoint slices + :param pulumi.Input[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 + :param pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']] metadata: Standard list metadata. + """ + if __name__ is not None: + warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) + resource_name = __name__ + if __opts__ is not None: + warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) + opts = __opts__ + if opts is None: + opts = pulumi.ResourceOptions() + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.version is None: + opts.version = _utilities.get_version() + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = dict() + + __props__['api_version'] = 'discovery.k8s.io/v1' + if items is None and not opts.urn: + raise TypeError("Missing required property 'items'") + __props__['items'] = items + __props__['kind'] = 'EndpointSliceList' + __props__['metadata'] = metadata + super(EndpointSliceList, __self__).__init__( + 'kubernetes:discovery.k8s.io/v1:EndpointSliceList', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'EndpointSliceList': + """ + Get an existing EndpointSliceList resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = dict() + + __props__["api_version"] = None + __props__["items"] = None + __props__["kind"] = None + __props__["metadata"] = None + return EndpointSliceList(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def items(self) -> pulumi.Output[Sequence['outputs.EndpointSlice']]: + """ + List of endpoint slices + """ + return pulumi.get(self, "items") + + @property + @pulumi.getter + def kind(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ListMeta']]: + """ + Standard list metadata. + """ + return pulumi.get(self, "metadata") + + def translate_output_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + def translate_input_property(self, prop): + return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop + diff --git a/sdk/python/pulumi_kubernetes/discovery/v1/__init__.py b/sdk/python/pulumi_kubernetes/discovery/v1/__init__.py new file mode 100644 index 0000000000..021a690a0e --- /dev/null +++ b/sdk/python/pulumi_kubernetes/discovery/v1/__init__.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +# Export this package's modules as members: +from .EndpointSlice import * +from .EndpointSliceList import * +from ._inputs import * +from . import outputs + +def _register_module(): + import pulumi + from ... import _utilities + + + class Module(pulumi.runtime.ResourceModule): + _version = _utilities.get_semver_version() + + def version(self): + return Module._version + + def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource: + if typ == "kubernetes:discovery.k8s.io/v1:EndpointSlice": + return EndpointSlice(name, pulumi.ResourceOptions(urn=urn)) + elif typ == "kubernetes:discovery.k8s.io/v1:EndpointSliceList": + return EndpointSliceList(name, pulumi.ResourceOptions(urn=urn)) + else: + raise Exception(f"unknown resource type {typ}") + + + _module_instance = Module() + pulumi.runtime.register_resource_module("kubernetes", "discovery.k8s.io/v1", _module_instance) + +_register_module() diff --git a/sdk/python/pulumi_kubernetes/discovery/v1/_inputs.py b/sdk/python/pulumi_kubernetes/discovery/v1/_inputs.py new file mode 100644 index 0000000000..c97183e48f --- /dev/null +++ b/sdk/python/pulumi_kubernetes/discovery/v1/_inputs.py @@ -0,0 +1,433 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from ... import core as _core +from ... import meta as _meta + +__all__ = [ + 'EndpointArgs', + 'EndpointConditionsArgs', + 'EndpointHintsArgs', + 'EndpointPortArgs', + 'EndpointSliceArgs', + 'ForZoneArgs', +] + +@pulumi.input_type +class EndpointArgs: + def __init__(__self__, *, + addresses: pulumi.Input[Sequence[pulumi.Input[str]]], + conditions: Optional[pulumi.Input['EndpointConditionsArgs']] = None, + deprecated_topology: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + hints: Optional[pulumi.Input['EndpointHintsArgs']] = None, + hostname: Optional[pulumi.Input[str]] = None, + node_name: Optional[pulumi.Input[str]] = None, + target_ref: Optional[pulumi.Input['_core.v1.ObjectReferenceArgs']] = None, + zone: Optional[pulumi.Input[str]] = None): + """ + Endpoint represents a single logical "backend" implementing a service. + :param pulumi.Input[Sequence[pulumi.Input[str]]] addresses: addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + :param pulumi.Input['EndpointConditionsArgs'] conditions: conditions contains information about the current status of the endpoint. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] deprecated_topology: deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. + :param pulumi.Input['EndpointHintsArgs'] hints: hints contains information associated with how an endpoint should be consumed. + :param pulumi.Input[str] hostname: hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + :param pulumi.Input[str] node_name: nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + :param pulumi.Input['_core.v1.ObjectReferenceArgs'] target_ref: targetRef is a reference to a Kubernetes object that represents this endpoint. + :param pulumi.Input[str] zone: zone is the name of the Zone this endpoint exists in. + """ + pulumi.set(__self__, "addresses", addresses) + if conditions is not None: + pulumi.set(__self__, "conditions", conditions) + if deprecated_topology is not None: + pulumi.set(__self__, "deprecated_topology", deprecated_topology) + if hints is not None: + pulumi.set(__self__, "hints", hints) + if hostname is not None: + pulumi.set(__self__, "hostname", hostname) + if node_name is not None: + pulumi.set(__self__, "node_name", node_name) + if target_ref is not None: + pulumi.set(__self__, "target_ref", target_ref) + if zone is not None: + pulumi.set(__self__, "zone", zone) + + @property + @pulumi.getter + def addresses(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + """ + return pulumi.get(self, "addresses") + + @addresses.setter + def addresses(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "addresses", value) + + @property + @pulumi.getter + def conditions(self) -> Optional[pulumi.Input['EndpointConditionsArgs']]: + """ + conditions contains information about the current status of the endpoint. + """ + return pulumi.get(self, "conditions") + + @conditions.setter + def conditions(self, value: Optional[pulumi.Input['EndpointConditionsArgs']]): + pulumi.set(self, "conditions", value) + + @property + @pulumi.getter(name="deprecatedTopology") + def deprecated_topology(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. + """ + return pulumi.get(self, "deprecated_topology") + + @deprecated_topology.setter + def deprecated_topology(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "deprecated_topology", value) + + @property + @pulumi.getter + def hints(self) -> Optional[pulumi.Input['EndpointHintsArgs']]: + """ + hints contains information associated with how an endpoint should be consumed. + """ + return pulumi.get(self, "hints") + + @hints.setter + def hints(self, value: Optional[pulumi.Input['EndpointHintsArgs']]): + pulumi.set(self, "hints", value) + + @property + @pulumi.getter + def hostname(self) -> Optional[pulumi.Input[str]]: + """ + hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + """ + return pulumi.get(self, "hostname") + + @hostname.setter + def hostname(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "hostname", value) + + @property + @pulumi.getter(name="nodeName") + def node_name(self) -> Optional[pulumi.Input[str]]: + """ + nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + """ + return pulumi.get(self, "node_name") + + @node_name.setter + def node_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "node_name", value) + + @property + @pulumi.getter(name="targetRef") + def target_ref(self) -> Optional[pulumi.Input['_core.v1.ObjectReferenceArgs']]: + """ + targetRef is a reference to a Kubernetes object that represents this endpoint. + """ + return pulumi.get(self, "target_ref") + + @target_ref.setter + def target_ref(self, value: Optional[pulumi.Input['_core.v1.ObjectReferenceArgs']]): + pulumi.set(self, "target_ref", value) + + @property + @pulumi.getter + def zone(self) -> Optional[pulumi.Input[str]]: + """ + zone is the name of the Zone this endpoint exists in. + """ + return pulumi.get(self, "zone") + + @zone.setter + def zone(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "zone", value) + + +@pulumi.input_type +class EndpointConditionsArgs: + def __init__(__self__, *, + ready: Optional[pulumi.Input[bool]] = None, + serving: Optional[pulumi.Input[bool]] = None, + terminating: Optional[pulumi.Input[bool]] = None): + """ + EndpointConditions represents the current condition of an endpoint. + :param pulumi.Input[bool] ready: ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + :param pulumi.Input[bool] serving: serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + :param pulumi.Input[bool] terminating: terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + """ + if ready is not None: + pulumi.set(__self__, "ready", ready) + if serving is not None: + pulumi.set(__self__, "serving", serving) + if terminating is not None: + pulumi.set(__self__, "terminating", terminating) + + @property + @pulumi.getter + def ready(self) -> Optional[pulumi.Input[bool]]: + """ + ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + """ + return pulumi.get(self, "ready") + + @ready.setter + def ready(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "ready", value) + + @property + @pulumi.getter + def serving(self) -> Optional[pulumi.Input[bool]]: + """ + serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + """ + return pulumi.get(self, "serving") + + @serving.setter + def serving(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "serving", value) + + @property + @pulumi.getter + def terminating(self) -> Optional[pulumi.Input[bool]]: + """ + terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + """ + return pulumi.get(self, "terminating") + + @terminating.setter + def terminating(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "terminating", value) + + +@pulumi.input_type +class EndpointHintsArgs: + def __init__(__self__, *, + for_zones: Optional[pulumi.Input[Sequence[pulumi.Input['ForZoneArgs']]]] = None): + """ + EndpointHints provides hints describing how an endpoint should be consumed. + :param pulumi.Input[Sequence[pulumi.Input['ForZoneArgs']]] for_zones: forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + """ + if for_zones is not None: + pulumi.set(__self__, "for_zones", for_zones) + + @property + @pulumi.getter(name="forZones") + def for_zones(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ForZoneArgs']]]]: + """ + forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + """ + return pulumi.get(self, "for_zones") + + @for_zones.setter + def for_zones(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ForZoneArgs']]]]): + pulumi.set(self, "for_zones", value) + + +@pulumi.input_type +class EndpointPortArgs: + def __init__(__self__, *, + app_protocol: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, + protocol: Optional[pulumi.Input[str]] = None): + """ + EndpointPort represents a Port used by an EndpointSlice + :param pulumi.Input[str] app_protocol: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + :param pulumi.Input[str] name: The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. + :param pulumi.Input[int] port: The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. + :param pulumi.Input[str] protocol: The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. + """ + if app_protocol is not None: + pulumi.set(__self__, "app_protocol", app_protocol) + if name is not None: + pulumi.set(__self__, "name", name) + if port is not None: + pulumi.set(__self__, "port", port) + if protocol is not None: + pulumi.set(__self__, "protocol", protocol) + + @property + @pulumi.getter(name="appProtocol") + def app_protocol(self) -> Optional[pulumi.Input[str]]: + """ + The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + """ + return pulumi.get(self, "app_protocol") + + @app_protocol.setter + def app_protocol(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "app_protocol", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def port(self) -> Optional[pulumi.Input[int]]: + """ + The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. + """ + return pulumi.get(self, "port") + + @port.setter + def port(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "port", value) + + @property + @pulumi.getter + def protocol(self) -> Optional[pulumi.Input[str]]: + """ + The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. + """ + return pulumi.get(self, "protocol") + + @protocol.setter + def protocol(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "protocol", value) + + +@pulumi.input_type +class EndpointSliceArgs: + def __init__(__self__, *, + address_type: pulumi.Input[str], + endpoints: pulumi.Input[Sequence[pulumi.Input['EndpointArgs']]], + api_version: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']] = None, + ports: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointPortArgs']]]] = None): + """ + EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. + :param pulumi.Input[str] address_type: addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + :param pulumi.Input[Sequence[pulumi.Input['EndpointArgs']]] endpoints: endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + :param pulumi.Input[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 + :param pulumi.Input[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 + :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: Standard object's metadata. + :param pulumi.Input[Sequence[pulumi.Input['EndpointPortArgs']]] ports: ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + """ + pulumi.set(__self__, "address_type", address_type) + pulumi.set(__self__, "endpoints", endpoints) + if api_version is not None: + pulumi.set(__self__, "api_version", 'discovery.k8s.io/v1') + if kind is not None: + pulumi.set(__self__, "kind", 'EndpointSlice') + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if ports is not None: + pulumi.set(__self__, "ports", ports) + + @property + @pulumi.getter(name="addressType") + def address_type(self) -> pulumi.Input[str]: + """ + addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + """ + return pulumi.get(self, "address_type") + + @address_type.setter + def address_type(self, value: pulumi.Input[str]): + pulumi.set(self, "address_type", value) + + @property + @pulumi.getter + def endpoints(self) -> pulumi.Input[Sequence[pulumi.Input['EndpointArgs']]]: + """ + endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + """ + return pulumi.get(self, "endpoints") + + @endpoints.setter + def endpoints(self, value: pulumi.Input[Sequence[pulumi.Input['EndpointArgs']]]): + pulumi.set(self, "endpoints", value) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> Optional[pulumi.Input[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @api_version.setter + def api_version(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "api_version", value) + + @property + @pulumi.getter + def kind(self) -> Optional[pulumi.Input[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @kind.setter + def kind(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "kind", value) + + @property + @pulumi.getter + def metadata(self) -> Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]: + """ + Standard object's metadata. + """ + return pulumi.get(self, "metadata") + + @metadata.setter + def metadata(self, value: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]): + pulumi.set(self, "metadata", value) + + @property + @pulumi.getter + def ports(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EndpointPortArgs']]]]: + """ + ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + """ + return pulumi.get(self, "ports") + + @ports.setter + def ports(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointPortArgs']]]]): + pulumi.set(self, "ports", value) + + +@pulumi.input_type +class ForZoneArgs: + def __init__(__self__, *, + name: pulumi.Input[str]): + """ + ForZone provides information about which zones should consume this endpoint. + :param pulumi.Input[str] name: name represents the name of the zone. + """ + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter + def name(self) -> pulumi.Input[str]: + """ + name represents the name of the zone. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: pulumi.Input[str]): + pulumi.set(self, "name", value) + + diff --git a/sdk/python/pulumi_kubernetes/discovery/v1/outputs.py b/sdk/python/pulumi_kubernetes/discovery/v1/outputs.py new file mode 100644 index 0000000000..d15fd6b945 --- /dev/null +++ b/sdk/python/pulumi_kubernetes/discovery/v1/outputs.py @@ -0,0 +1,378 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from . import outputs +from ... import core as _core +from ... import meta as _meta + +__all__ = [ + 'Endpoint', + 'EndpointConditions', + 'EndpointHints', + 'EndpointPort', + 'EndpointSlice', + 'ForZone', +] + +@pulumi.output_type +class Endpoint(dict): + """ + Endpoint represents a single logical "backend" implementing a service. + """ + def __init__(__self__, *, + addresses: Sequence[str], + conditions: Optional['outputs.EndpointConditions'] = None, + deprecated_topology: Optional[Mapping[str, str]] = None, + hints: Optional['outputs.EndpointHints'] = None, + hostname: Optional[str] = None, + node_name: Optional[str] = None, + target_ref: Optional['_core.v1.outputs.ObjectReference'] = None, + zone: Optional[str] = None): + """ + Endpoint represents a single logical "backend" implementing a service. + :param Sequence[str] addresses: addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + :param 'EndpointConditionsArgs' conditions: conditions contains information about the current status of the endpoint. + :param Mapping[str, str] deprecated_topology: deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. + :param 'EndpointHintsArgs' hints: hints contains information associated with how an endpoint should be consumed. + :param str hostname: hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + :param str node_name: nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + :param '_core.v1.ObjectReferenceArgs' target_ref: targetRef is a reference to a Kubernetes object that represents this endpoint. + :param str zone: zone is the name of the Zone this endpoint exists in. + """ + pulumi.set(__self__, "addresses", addresses) + if conditions is not None: + pulumi.set(__self__, "conditions", conditions) + if deprecated_topology is not None: + pulumi.set(__self__, "deprecated_topology", deprecated_topology) + if hints is not None: + pulumi.set(__self__, "hints", hints) + if hostname is not None: + pulumi.set(__self__, "hostname", hostname) + if node_name is not None: + pulumi.set(__self__, "node_name", node_name) + if target_ref is not None: + pulumi.set(__self__, "target_ref", target_ref) + if zone is not None: + pulumi.set(__self__, "zone", zone) + + @property + @pulumi.getter + def addresses(self) -> Sequence[str]: + """ + addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + """ + return pulumi.get(self, "addresses") + + @property + @pulumi.getter + def conditions(self) -> Optional['outputs.EndpointConditions']: + """ + conditions contains information about the current status of the endpoint. + """ + return pulumi.get(self, "conditions") + + @property + @pulumi.getter(name="deprecatedTopology") + def deprecated_topology(self) -> Optional[Mapping[str, str]]: + """ + deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. + """ + return pulumi.get(self, "deprecated_topology") + + @property + @pulumi.getter + def hints(self) -> Optional['outputs.EndpointHints']: + """ + hints contains information associated with how an endpoint should be consumed. + """ + return pulumi.get(self, "hints") + + @property + @pulumi.getter + def hostname(self) -> Optional[str]: + """ + hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + """ + return pulumi.get(self, "hostname") + + @property + @pulumi.getter(name="nodeName") + def node_name(self) -> Optional[str]: + """ + nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + """ + return pulumi.get(self, "node_name") + + @property + @pulumi.getter(name="targetRef") + def target_ref(self) -> Optional['_core.v1.outputs.ObjectReference']: + """ + targetRef is a reference to a Kubernetes object that represents this endpoint. + """ + return pulumi.get(self, "target_ref") + + @property + @pulumi.getter + def zone(self) -> Optional[str]: + """ + zone is the name of the Zone this endpoint exists in. + """ + return pulumi.get(self, "zone") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + +@pulumi.output_type +class EndpointConditions(dict): + """ + EndpointConditions represents the current condition of an endpoint. + """ + def __init__(__self__, *, + ready: Optional[bool] = None, + serving: Optional[bool] = None, + terminating: Optional[bool] = None): + """ + EndpointConditions represents the current condition of an endpoint. + :param bool ready: ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + :param bool serving: serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + :param bool terminating: terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + """ + if ready is not None: + pulumi.set(__self__, "ready", ready) + if serving is not None: + pulumi.set(__self__, "serving", serving) + if terminating is not None: + pulumi.set(__self__, "terminating", terminating) + + @property + @pulumi.getter + def ready(self) -> Optional[bool]: + """ + ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + """ + return pulumi.get(self, "ready") + + @property + @pulumi.getter + def serving(self) -> Optional[bool]: + """ + serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + """ + return pulumi.get(self, "serving") + + @property + @pulumi.getter + def terminating(self) -> Optional[bool]: + """ + terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + """ + return pulumi.get(self, "terminating") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + +@pulumi.output_type +class EndpointHints(dict): + """ + EndpointHints provides hints describing how an endpoint should be consumed. + """ + def __init__(__self__, *, + for_zones: Optional[Sequence['outputs.ForZone']] = None): + """ + EndpointHints provides hints describing how an endpoint should be consumed. + :param Sequence['ForZoneArgs'] for_zones: forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + """ + if for_zones is not None: + pulumi.set(__self__, "for_zones", for_zones) + + @property + @pulumi.getter(name="forZones") + def for_zones(self) -> Optional[Sequence['outputs.ForZone']]: + """ + forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + """ + return pulumi.get(self, "for_zones") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + +@pulumi.output_type +class EndpointPort(dict): + """ + EndpointPort represents a Port used by an EndpointSlice + """ + def __init__(__self__, *, + app_protocol: Optional[str] = None, + name: Optional[str] = None, + port: Optional[int] = None, + protocol: Optional[str] = None): + """ + EndpointPort represents a Port used by an EndpointSlice + :param str app_protocol: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + :param str name: The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. + :param int port: The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. + :param str protocol: The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. + """ + if app_protocol is not None: + pulumi.set(__self__, "app_protocol", app_protocol) + if name is not None: + pulumi.set(__self__, "name", name) + if port is not None: + pulumi.set(__self__, "port", port) + if protocol is not None: + pulumi.set(__self__, "protocol", protocol) + + @property + @pulumi.getter(name="appProtocol") + def app_protocol(self) -> Optional[str]: + """ + The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + """ + return pulumi.get(self, "app_protocol") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def port(self) -> Optional[int]: + """ + The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. + """ + return pulumi.get(self, "port") + + @property + @pulumi.getter + def protocol(self) -> Optional[str]: + """ + The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. + """ + return pulumi.get(self, "protocol") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + +@pulumi.output_type +class EndpointSlice(dict): + """ + EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. + """ + def __init__(__self__, *, + address_type: str, + endpoints: Sequence['outputs.Endpoint'], + api_version: Optional[str] = None, + kind: Optional[str] = None, + metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None, + ports: Optional[Sequence['outputs.EndpointPort']] = None): + """ + EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. + :param str address_type: addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + :param Sequence['EndpointArgs'] endpoints: endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + :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 + :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 + :param '_meta.v1.ObjectMetaArgs' metadata: Standard object's metadata. + :param Sequence['EndpointPortArgs'] ports: ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + """ + pulumi.set(__self__, "address_type", address_type) + pulumi.set(__self__, "endpoints", endpoints) + if api_version is not None: + pulumi.set(__self__, "api_version", 'discovery.k8s.io/v1') + if kind is not None: + pulumi.set(__self__, "kind", 'EndpointSlice') + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if ports is not None: + pulumi.set(__self__, "ports", ports) + + @property + @pulumi.getter(name="addressType") + def address_type(self) -> str: + """ + addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + """ + return pulumi.get(self, "address_type") + + @property + @pulumi.getter + def endpoints(self) -> Sequence['outputs.Endpoint']: + """ + endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints. + """ + return pulumi.get(self, "endpoints") + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> Optional[str]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def kind(self) -> Optional[str]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']: + """ + Standard object's metadata. + """ + return pulumi.get(self, "metadata") + + @property + @pulumi.getter + def ports(self) -> Optional[Sequence['outputs.EndpointPort']]: + """ + ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + """ + return pulumi.get(self, "ports") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + +@pulumi.output_type +class ForZone(dict): + """ + ForZone provides information about which zones should consume this endpoint. + """ + def __init__(__self__, *, + name: str): + """ + ForZone provides information about which zones should consume this endpoint. + :param str name: name represents the name of the zone. + """ + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter + def name(self) -> str: + """ + name represents the name of the zone. + """ + return pulumi.get(self, "name") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + diff --git a/sdk/python/pulumi_kubernetes/discovery/v1beta1/EndpointSlice.py b/sdk/python/pulumi_kubernetes/discovery/v1beta1/EndpointSlice.py index e13ab3f505..374489cec4 100644 --- a/sdk/python/pulumi_kubernetes/discovery/v1beta1/EndpointSlice.py +++ b/sdk/python/pulumi_kubernetes/discovery/v1beta1/EndpointSlice.py @@ -67,6 +67,8 @@ def __init__(__self__, __props__['kind'] = 'EndpointSlice' __props__['metadata'] = metadata __props__['ports'] = ports + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:discovery.k8s.io/v1:EndpointSlice")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(EndpointSlice, __self__).__init__( 'kubernetes:discovery.k8s.io/v1beta1:EndpointSlice', resource_name, diff --git a/sdk/python/pulumi_kubernetes/discovery/v1beta1/_inputs.py b/sdk/python/pulumi_kubernetes/discovery/v1beta1/_inputs.py index 83131a098e..cccaa64457 100644 --- a/sdk/python/pulumi_kubernetes/discovery/v1beta1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/discovery/v1beta1/_inputs.py @@ -13,8 +13,10 @@ __all__ = [ 'EndpointArgs', 'EndpointConditionsArgs', + 'EndpointHintsArgs', 'EndpointPortArgs', 'EndpointSliceArgs', + 'ForZoneArgs', ] @pulumi.input_type @@ -22,6 +24,7 @@ class EndpointArgs: def __init__(__self__, *, addresses: pulumi.Input[Sequence[pulumi.Input[str]]], conditions: Optional[pulumi.Input['EndpointConditionsArgs']] = None, + hints: Optional[pulumi.Input['EndpointHintsArgs']] = None, hostname: Optional[pulumi.Input[str]] = None, node_name: Optional[pulumi.Input[str]] = None, target_ref: Optional[pulumi.Input['_core.v1.ObjectReferenceArgs']] = None, @@ -30,6 +33,7 @@ def __init__(__self__, *, Endpoint represents a single logical "backend" implementing a service. :param pulumi.Input[Sequence[pulumi.Input[str]]] addresses: addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. :param pulumi.Input['EndpointConditionsArgs'] conditions: conditions contains information about the current status of the endpoint. + :param pulumi.Input['EndpointHintsArgs'] hints: hints contains information associated with how an endpoint should be consumed. :param pulumi.Input[str] hostname: hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. :param pulumi.Input[str] node_name: nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. :param pulumi.Input['_core.v1.ObjectReferenceArgs'] target_ref: targetRef is a reference to a Kubernetes object that represents this endpoint. @@ -45,6 +49,8 @@ def __init__(__self__, *, pulumi.set(__self__, "addresses", addresses) if conditions is not None: pulumi.set(__self__, "conditions", conditions) + if hints is not None: + pulumi.set(__self__, "hints", hints) if hostname is not None: pulumi.set(__self__, "hostname", hostname) if node_name is not None: @@ -78,6 +84,18 @@ def conditions(self) -> Optional[pulumi.Input['EndpointConditionsArgs']]: def conditions(self, value: Optional[pulumi.Input['EndpointConditionsArgs']]): pulumi.set(self, "conditions", value) + @property + @pulumi.getter + def hints(self) -> Optional[pulumi.Input['EndpointHintsArgs']]: + """ + hints contains information associated with how an endpoint should be consumed. + """ + return pulumi.get(self, "hints") + + @hints.setter + def hints(self, value: Optional[pulumi.Input['EndpointHintsArgs']]): + pulumi.set(self, "hints", value) + @property @pulumi.getter def hostname(self) -> Optional[pulumi.Input[str]]: @@ -190,6 +208,30 @@ def terminating(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "terminating", value) +@pulumi.input_type +class EndpointHintsArgs: + def __init__(__self__, *, + for_zones: Optional[pulumi.Input[Sequence[pulumi.Input['ForZoneArgs']]]] = None): + """ + EndpointHints provides hints describing how an endpoint should be consumed. + :param pulumi.Input[Sequence[pulumi.Input['ForZoneArgs']]] for_zones: forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. + """ + if for_zones is not None: + pulumi.set(__self__, "for_zones", for_zones) + + @property + @pulumi.getter(name="forZones") + def for_zones(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ForZoneArgs']]]]: + """ + forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. + """ + return pulumi.get(self, "for_zones") + + @for_zones.setter + def for_zones(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ForZoneArgs']]]]): + pulumi.set(self, "for_zones", value) + + @pulumi.input_type class EndpointPortArgs: def __init__(__self__, *, @@ -364,3 +406,26 @@ def ports(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['EndpointPort pulumi.set(self, "ports", value) +@pulumi.input_type +class ForZoneArgs: + def __init__(__self__, *, + name: pulumi.Input[str]): + """ + ForZone provides information about which zones should consume this endpoint. + :param pulumi.Input[str] name: name represents the name of the zone. + """ + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter + def name(self) -> pulumi.Input[str]: + """ + name represents the name of the zone. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: pulumi.Input[str]): + pulumi.set(self, "name", value) + + diff --git a/sdk/python/pulumi_kubernetes/discovery/v1beta1/outputs.py b/sdk/python/pulumi_kubernetes/discovery/v1beta1/outputs.py index e361bb3088..80cfaa86e2 100644 --- a/sdk/python/pulumi_kubernetes/discovery/v1beta1/outputs.py +++ b/sdk/python/pulumi_kubernetes/discovery/v1beta1/outputs.py @@ -14,8 +14,10 @@ __all__ = [ 'Endpoint', 'EndpointConditions', + 'EndpointHints', 'EndpointPort', 'EndpointSlice', + 'ForZone', ] @pulumi.output_type @@ -26,6 +28,7 @@ class Endpoint(dict): def __init__(__self__, *, addresses: Sequence[str], conditions: Optional['outputs.EndpointConditions'] = None, + hints: Optional['outputs.EndpointHints'] = None, hostname: Optional[str] = None, node_name: Optional[str] = None, target_ref: Optional['_core.v1.outputs.ObjectReference'] = None, @@ -34,6 +37,7 @@ def __init__(__self__, *, Endpoint represents a single logical "backend" implementing a service. :param Sequence[str] addresses: addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. :param 'EndpointConditionsArgs' conditions: conditions contains information about the current status of the endpoint. + :param 'EndpointHintsArgs' hints: hints contains information associated with how an endpoint should be consumed. :param str hostname: hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. :param str node_name: nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. :param '_core.v1.ObjectReferenceArgs' target_ref: targetRef is a reference to a Kubernetes object that represents this endpoint. @@ -49,6 +53,8 @@ def __init__(__self__, *, pulumi.set(__self__, "addresses", addresses) if conditions is not None: pulumi.set(__self__, "conditions", conditions) + if hints is not None: + pulumi.set(__self__, "hints", hints) if hostname is not None: pulumi.set(__self__, "hostname", hostname) if node_name is not None: @@ -74,6 +80,14 @@ def conditions(self) -> Optional['outputs.EndpointConditions']: """ return pulumi.get(self, "conditions") + @property + @pulumi.getter + def hints(self) -> Optional['outputs.EndpointHints']: + """ + hints contains information associated with how an endpoint should be consumed. + """ + return pulumi.get(self, "hints") + @property @pulumi.getter def hostname(self) -> Optional[str]: @@ -167,6 +181,32 @@ def _translate_property(self, prop): return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop +@pulumi.output_type +class EndpointHints(dict): + """ + EndpointHints provides hints describing how an endpoint should be consumed. + """ + def __init__(__self__, *, + for_zones: Optional[Sequence['outputs.ForZone']] = None): + """ + EndpointHints provides hints describing how an endpoint should be consumed. + :param Sequence['ForZoneArgs'] for_zones: forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. + """ + if for_zones is not None: + pulumi.set(__self__, "for_zones", for_zones) + + @property + @pulumi.getter(name="forZones") + def for_zones(self) -> Optional[Sequence['outputs.ForZone']]: + """ + forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries. + """ + return pulumi.get(self, "for_zones") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + @pulumi.output_type class EndpointPort(dict): """ @@ -313,3 +353,28 @@ def _translate_property(self, prop): return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop +@pulumi.output_type +class ForZone(dict): + """ + ForZone provides information about which zones should consume this endpoint. + """ + def __init__(__self__, *, + name: str): + """ + ForZone provides information about which zones should consume this endpoint. + :param str name: name represents the name of the zone. + """ + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter + def name(self) -> str: + """ + name represents the name of the zone. + """ + return pulumi.get(self, "name") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + diff --git a/sdk/python/pulumi_kubernetes/events/v1/Event.py b/sdk/python/pulumi_kubernetes/events/v1/Event.py index 8c155aaeb4..f1a650bf21 100644 --- a/sdk/python/pulumi_kubernetes/events/v1/Event.py +++ b/sdk/python/pulumi_kubernetes/events/v1/Event.py @@ -52,6 +52,7 @@ def __init__(__self__, :param pulumi.Input[pulumi.InputType['_core.v1.EventSourceArgs']] deprecated_source: deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. :param pulumi.Input[str] event_time: eventTime is the time when this Event was first observed. It is required. :param pulumi.Input[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 + :param pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata :param pulumi.Input[str] note: note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. :param pulumi.Input[str] reason: reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters. :param pulumi.Input[pulumi.InputType['_core.v1.ObjectReferenceArgs']] regarding: regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. @@ -88,8 +89,6 @@ def __init__(__self__, raise TypeError("Missing required property 'event_time'") __props__['event_time'] = event_time __props__['kind'] = 'Event' - if metadata is None and not opts.urn: - raise TypeError("Missing required property 'metadata'") __props__['metadata'] = metadata __props__['note'] = note __props__['reason'] = reason @@ -208,7 +207,10 @@ def kind(self) -> pulumi.Output[Optional[str]]: @property @pulumi.getter - def metadata(self) -> pulumi.Output['_meta.v1.outputs.ObjectMeta']: + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ObjectMeta']]: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ return pulumi.get(self, "metadata") @property diff --git a/sdk/python/pulumi_kubernetes/events/v1/_inputs.py b/sdk/python/pulumi_kubernetes/events/v1/_inputs.py index 12a3d825a3..4688b12310 100644 --- a/sdk/python/pulumi_kubernetes/events/v1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/events/v1/_inputs.py @@ -19,7 +19,6 @@ class EventArgs: def __init__(__self__, *, event_time: pulumi.Input[str], - metadata: pulumi.Input['_meta.v1.ObjectMetaArgs'], action: Optional[pulumi.Input[str]] = None, api_version: Optional[pulumi.Input[str]] = None, deprecated_count: Optional[pulumi.Input[int]] = None, @@ -27,6 +26,7 @@ def __init__(__self__, *, deprecated_last_timestamp: Optional[pulumi.Input[str]] = None, deprecated_source: Optional[pulumi.Input['_core.v1.EventSourceArgs']] = None, kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']] = None, note: Optional[pulumi.Input[str]] = None, reason: Optional[pulumi.Input[str]] = None, regarding: Optional[pulumi.Input['_core.v1.ObjectReferenceArgs']] = None, @@ -45,6 +45,7 @@ def __init__(__self__, *, :param pulumi.Input[str] deprecated_last_timestamp: deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. :param pulumi.Input['_core.v1.EventSourceArgs'] deprecated_source: deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. :param pulumi.Input[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 + :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata :param pulumi.Input[str] note: note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. :param pulumi.Input[str] reason: reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters. :param pulumi.Input['_core.v1.ObjectReferenceArgs'] regarding: regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. @@ -55,7 +56,6 @@ def __init__(__self__, *, :param pulumi.Input[str] type: type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events. """ pulumi.set(__self__, "event_time", event_time) - pulumi.set(__self__, "metadata", metadata) if action is not None: pulumi.set(__self__, "action", action) if api_version is not None: @@ -70,6 +70,8 @@ def __init__(__self__, *, pulumi.set(__self__, "deprecated_source", deprecated_source) if kind is not None: pulumi.set(__self__, "kind", 'Event') + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) if note is not None: pulumi.set(__self__, "note", note) if reason is not None: @@ -99,15 +101,6 @@ def event_time(self) -> pulumi.Input[str]: def event_time(self, value: pulumi.Input[str]): pulumi.set(self, "event_time", value) - @property - @pulumi.getter - def metadata(self) -> pulumi.Input['_meta.v1.ObjectMetaArgs']: - return pulumi.get(self, "metadata") - - @metadata.setter - def metadata(self, value: pulumi.Input['_meta.v1.ObjectMetaArgs']): - pulumi.set(self, "metadata", value) - @property @pulumi.getter def action(self) -> Optional[pulumi.Input[str]]: @@ -192,6 +185,18 @@ def kind(self) -> Optional[pulumi.Input[str]]: def kind(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "kind", value) + @property + @pulumi.getter + def metadata(self) -> Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @metadata.setter + def metadata(self, value: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]): + pulumi.set(self, "metadata", value) + @property @pulumi.getter def note(self) -> Optional[pulumi.Input[str]]: diff --git a/sdk/python/pulumi_kubernetes/events/v1/outputs.py b/sdk/python/pulumi_kubernetes/events/v1/outputs.py index 7911300897..de4c815288 100644 --- a/sdk/python/pulumi_kubernetes/events/v1/outputs.py +++ b/sdk/python/pulumi_kubernetes/events/v1/outputs.py @@ -23,7 +23,6 @@ class Event(dict): """ def __init__(__self__, *, event_time: str, - metadata: '_meta.v1.outputs.ObjectMeta', action: Optional[str] = None, api_version: Optional[str] = None, deprecated_count: Optional[int] = None, @@ -31,6 +30,7 @@ def __init__(__self__, *, deprecated_last_timestamp: Optional[str] = None, deprecated_source: Optional['_core.v1.outputs.EventSource'] = None, kind: Optional[str] = None, + metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None, note: Optional[str] = None, reason: Optional[str] = None, regarding: Optional['_core.v1.outputs.ObjectReference'] = None, @@ -49,6 +49,7 @@ def __init__(__self__, *, :param str deprecated_last_timestamp: deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. :param '_core.v1.EventSourceArgs' deprecated_source: deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. :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 + :param '_meta.v1.ObjectMetaArgs' metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata :param str note: note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. :param str reason: reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters. :param '_core.v1.ObjectReferenceArgs' regarding: regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. @@ -59,7 +60,6 @@ def __init__(__self__, *, :param str type: type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events. """ pulumi.set(__self__, "event_time", event_time) - pulumi.set(__self__, "metadata", metadata) if action is not None: pulumi.set(__self__, "action", action) if api_version is not None: @@ -74,6 +74,8 @@ def __init__(__self__, *, pulumi.set(__self__, "deprecated_source", deprecated_source) if kind is not None: pulumi.set(__self__, "kind", 'Event') + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) if note is not None: pulumi.set(__self__, "note", note) if reason is not None: @@ -99,11 +101,6 @@ def event_time(self) -> str: """ return pulumi.get(self, "event_time") - @property - @pulumi.getter - def metadata(self) -> '_meta.v1.outputs.ObjectMeta': - return pulumi.get(self, "metadata") - @property @pulumi.getter def action(self) -> Optional[str]: @@ -160,6 +157,14 @@ def kind(self) -> Optional[str]: """ return pulumi.get(self, "kind") + @property + @pulumi.getter + def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + @property @pulumi.getter def note(self) -> Optional[str]: diff --git a/sdk/python/pulumi_kubernetes/events/v1beta1/Event.py b/sdk/python/pulumi_kubernetes/events/v1beta1/Event.py index 064d67d9c7..074b993aab 100644 --- a/sdk/python/pulumi_kubernetes/events/v1beta1/Event.py +++ b/sdk/python/pulumi_kubernetes/events/v1beta1/Event.py @@ -52,6 +52,7 @@ def __init__(__self__, :param pulumi.Input[pulumi.InputType['_core.v1.EventSourceArgs']] deprecated_source: deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. :param pulumi.Input[str] event_time: eventTime is the time when this Event was first observed. It is required. :param pulumi.Input[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 + :param pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata :param pulumi.Input[str] note: note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. :param pulumi.Input[str] reason: reason is why the action was taken. It is human-readable. This field can have at most 128 characters. :param pulumi.Input[pulumi.InputType['_core.v1.ObjectReferenceArgs']] regarding: regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. @@ -88,8 +89,6 @@ def __init__(__self__, raise TypeError("Missing required property 'event_time'") __props__['event_time'] = event_time __props__['kind'] = 'Event' - if metadata is None and not opts.urn: - raise TypeError("Missing required property 'metadata'") __props__['metadata'] = metadata __props__['note'] = note __props__['reason'] = reason @@ -208,7 +207,10 @@ def kind(self) -> pulumi.Output[Optional[str]]: @property @pulumi.getter - def metadata(self) -> pulumi.Output['_meta.v1.outputs.ObjectMeta']: + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ObjectMeta']]: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ return pulumi.get(self, "metadata") @property diff --git a/sdk/python/pulumi_kubernetes/events/v1beta1/_inputs.py b/sdk/python/pulumi_kubernetes/events/v1beta1/_inputs.py index ac9ff643d5..0299cd0f14 100644 --- a/sdk/python/pulumi_kubernetes/events/v1beta1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/events/v1beta1/_inputs.py @@ -19,7 +19,6 @@ class EventArgs: def __init__(__self__, *, event_time: pulumi.Input[str], - metadata: pulumi.Input['_meta.v1.ObjectMetaArgs'], action: Optional[pulumi.Input[str]] = None, api_version: Optional[pulumi.Input[str]] = None, deprecated_count: Optional[pulumi.Input[int]] = None, @@ -27,6 +26,7 @@ def __init__(__self__, *, deprecated_last_timestamp: Optional[pulumi.Input[str]] = None, deprecated_source: Optional[pulumi.Input['_core.v1.EventSourceArgs']] = None, kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']] = None, note: Optional[pulumi.Input[str]] = None, reason: Optional[pulumi.Input[str]] = None, regarding: Optional[pulumi.Input['_core.v1.ObjectReferenceArgs']] = None, @@ -45,6 +45,7 @@ def __init__(__self__, *, :param pulumi.Input[str] deprecated_last_timestamp: deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. :param pulumi.Input['_core.v1.EventSourceArgs'] deprecated_source: deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. :param pulumi.Input[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 + :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata :param pulumi.Input[str] note: note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. :param pulumi.Input[str] reason: reason is why the action was taken. It is human-readable. This field can have at most 128 characters. :param pulumi.Input['_core.v1.ObjectReferenceArgs'] regarding: regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. @@ -55,7 +56,6 @@ def __init__(__self__, *, :param pulumi.Input[str] type: type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. """ pulumi.set(__self__, "event_time", event_time) - pulumi.set(__self__, "metadata", metadata) if action is not None: pulumi.set(__self__, "action", action) if api_version is not None: @@ -70,6 +70,8 @@ def __init__(__self__, *, pulumi.set(__self__, "deprecated_source", deprecated_source) if kind is not None: pulumi.set(__self__, "kind", 'Event') + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) if note is not None: pulumi.set(__self__, "note", note) if reason is not None: @@ -99,15 +101,6 @@ def event_time(self) -> pulumi.Input[str]: def event_time(self, value: pulumi.Input[str]): pulumi.set(self, "event_time", value) - @property - @pulumi.getter - def metadata(self) -> pulumi.Input['_meta.v1.ObjectMetaArgs']: - return pulumi.get(self, "metadata") - - @metadata.setter - def metadata(self, value: pulumi.Input['_meta.v1.ObjectMetaArgs']): - pulumi.set(self, "metadata", value) - @property @pulumi.getter def action(self) -> Optional[pulumi.Input[str]]: @@ -192,6 +185,18 @@ def kind(self) -> Optional[pulumi.Input[str]]: def kind(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "kind", value) + @property + @pulumi.getter + def metadata(self) -> Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @metadata.setter + def metadata(self, value: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]): + pulumi.set(self, "metadata", value) + @property @pulumi.getter def note(self) -> Optional[pulumi.Input[str]]: diff --git a/sdk/python/pulumi_kubernetes/events/v1beta1/outputs.py b/sdk/python/pulumi_kubernetes/events/v1beta1/outputs.py index 2986852f94..238771c724 100644 --- a/sdk/python/pulumi_kubernetes/events/v1beta1/outputs.py +++ b/sdk/python/pulumi_kubernetes/events/v1beta1/outputs.py @@ -23,7 +23,6 @@ class Event(dict): """ def __init__(__self__, *, event_time: str, - metadata: '_meta.v1.outputs.ObjectMeta', action: Optional[str] = None, api_version: Optional[str] = None, deprecated_count: Optional[int] = None, @@ -31,6 +30,7 @@ def __init__(__self__, *, deprecated_last_timestamp: Optional[str] = None, deprecated_source: Optional['_core.v1.outputs.EventSource'] = None, kind: Optional[str] = None, + metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None, note: Optional[str] = None, reason: Optional[str] = None, regarding: Optional['_core.v1.outputs.ObjectReference'] = None, @@ -49,6 +49,7 @@ def __init__(__self__, *, :param str deprecated_last_timestamp: deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. :param '_core.v1.EventSourceArgs' deprecated_source: deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. :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 + :param '_meta.v1.ObjectMetaArgs' metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata :param str note: note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. :param str reason: reason is why the action was taken. It is human-readable. This field can have at most 128 characters. :param '_core.v1.ObjectReferenceArgs' regarding: regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. @@ -59,7 +60,6 @@ def __init__(__self__, *, :param str type: type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. """ pulumi.set(__self__, "event_time", event_time) - pulumi.set(__self__, "metadata", metadata) if action is not None: pulumi.set(__self__, "action", action) if api_version is not None: @@ -74,6 +74,8 @@ def __init__(__self__, *, pulumi.set(__self__, "deprecated_source", deprecated_source) if kind is not None: pulumi.set(__self__, "kind", 'Event') + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) if note is not None: pulumi.set(__self__, "note", note) if reason is not None: @@ -99,11 +101,6 @@ def event_time(self) -> str: """ return pulumi.get(self, "event_time") - @property - @pulumi.getter - def metadata(self) -> '_meta.v1.outputs.ObjectMeta': - return pulumi.get(self, "metadata") - @property @pulumi.getter def action(self) -> Optional[str]: @@ -160,6 +157,14 @@ def kind(self) -> Optional[str]: """ return pulumi.get(self, "kind") + @property + @pulumi.getter + def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + @property @pulumi.getter def note(self) -> Optional[str]: diff --git a/sdk/python/pulumi_kubernetes/flowcontrol/v1alpha1/_inputs.py b/sdk/python/pulumi_kubernetes/flowcontrol/v1alpha1/_inputs.py index c8b4acba9b..e8fa4ade33 100644 --- a/sdk/python/pulumi_kubernetes/flowcontrol/v1alpha1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/flowcontrol/v1alpha1/_inputs.py @@ -242,7 +242,7 @@ def __init__(__self__, *, FlowSchemaSpec describes how the FlowSchema's specification looks like. :param pulumi.Input['PriorityLevelConfigurationReferenceArgs'] priority_level_configuration: `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required. :param pulumi.Input['FlowDistinguisherMethodArgs'] distinguisher_method: `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string. - :param pulumi.Input[int] matching_precedence: `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. + :param pulumi.Input[int] matching_precedence: `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. :param pulumi.Input[Sequence[pulumi.Input['PolicyRulesWithSubjectsArgs']]] rules: `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema. """ pulumi.set(__self__, "priority_level_configuration", priority_level_configuration) @@ -281,7 +281,7 @@ def distinguisher_method(self, value: Optional[pulumi.Input['FlowDistinguisherMe @pulumi.getter(name="matchingPrecedence") def matching_precedence(self) -> Optional[pulumi.Input[int]]: """ - `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. + `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. """ return pulumi.get(self, "matching_precedence") diff --git a/sdk/python/pulumi_kubernetes/flowcontrol/v1alpha1/outputs.py b/sdk/python/pulumi_kubernetes/flowcontrol/v1alpha1/outputs.py index 0533bfb8b1..8beca7b581 100644 --- a/sdk/python/pulumi_kubernetes/flowcontrol/v1alpha1/outputs.py +++ b/sdk/python/pulumi_kubernetes/flowcontrol/v1alpha1/outputs.py @@ -220,7 +220,7 @@ def __init__(__self__, *, FlowSchemaSpec describes how the FlowSchema's specification looks like. :param 'PriorityLevelConfigurationReferenceArgs' priority_level_configuration: `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required. :param 'FlowDistinguisherMethodArgs' distinguisher_method: `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string. - :param int matching_precedence: `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. + :param int matching_precedence: `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. :param Sequence['PolicyRulesWithSubjectsArgs'] rules: `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema. """ pulumi.set(__self__, "priority_level_configuration", priority_level_configuration) @@ -251,7 +251,7 @@ def distinguisher_method(self) -> Optional['outputs.FlowDistinguisherMethod']: @pulumi.getter(name="matchingPrecedence") def matching_precedence(self) -> Optional[int]: """ - `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. + `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be non-negative. Note that if the precedence is not specified or zero, it will be set to 1000 as default. """ return pulumi.get(self, "matching_precedence") diff --git a/sdk/python/pulumi_kubernetes/networking/v1/IngressClass.py b/sdk/python/pulumi_kubernetes/networking/v1/IngressClass.py index 4c1dedda7f..a84400d84d 100644 --- a/sdk/python/pulumi_kubernetes/networking/v1/IngressClass.py +++ b/sdk/python/pulumi_kubernetes/networking/v1/IngressClass.py @@ -8,7 +8,6 @@ from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs -from ... import core as _core from ... import meta as _meta from ._inputs import * diff --git a/sdk/python/pulumi_kubernetes/networking/v1/IngressClassList.py b/sdk/python/pulumi_kubernetes/networking/v1/IngressClassList.py index 85d087a812..d1979aa64d 100644 --- a/sdk/python/pulumi_kubernetes/networking/v1/IngressClassList.py +++ b/sdk/python/pulumi_kubernetes/networking/v1/IngressClassList.py @@ -8,7 +8,6 @@ from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs -from ... import core as _core from ... import meta as _meta from ._inputs import * diff --git a/sdk/python/pulumi_kubernetes/networking/v1/_inputs.py b/sdk/python/pulumi_kubernetes/networking/v1/_inputs.py index dd85bb7354..48cfd6e5dc 100644 --- a/sdk/python/pulumi_kubernetes/networking/v1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/networking/v1/_inputs.py @@ -17,6 +17,7 @@ 'IngressArgs', 'IngressBackendArgs', 'IngressClassArgs', + 'IngressClassParametersReferenceArgs', 'IngressClassSpecArgs', 'IngressRuleArgs', 'IngressServiceBackendArgs', @@ -383,15 +384,101 @@ def spec(self, value: Optional[pulumi.Input['IngressClassSpecArgs']]): pulumi.set(self, "spec", value) +@pulumi.input_type +class IngressClassParametersReferenceArgs: + def __init__(__self__, *, + kind: pulumi.Input[str], + name: pulumi.Input[str], + api_group: Optional[pulumi.Input[str]] = None, + namespace: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None): + """ + IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + :param pulumi.Input[str] kind: Kind is the type of resource being referenced. + :param pulumi.Input[str] name: Name is the name of resource being referenced. + :param pulumi.Input[str] api_group: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + :param pulumi.Input[str] namespace: Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + :param pulumi.Input[str] scope: Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + """ + pulumi.set(__self__, "kind", kind) + pulumi.set(__self__, "name", name) + if api_group is not None: + pulumi.set(__self__, "api_group", api_group) + if namespace is not None: + pulumi.set(__self__, "namespace", namespace) + if scope is not None: + pulumi.set(__self__, "scope", scope) + + @property + @pulumi.getter + def kind(self) -> pulumi.Input[str]: + """ + Kind is the type of resource being referenced. + """ + return pulumi.get(self, "kind") + + @kind.setter + def kind(self, value: pulumi.Input[str]): + pulumi.set(self, "kind", value) + + @property + @pulumi.getter + def name(self) -> pulumi.Input[str]: + """ + Name is the name of resource being referenced. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: pulumi.Input[str]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter(name="apiGroup") + def api_group(self) -> Optional[pulumi.Input[str]]: + """ + APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + """ + return pulumi.get(self, "api_group") + + @api_group.setter + def api_group(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "api_group", value) + + @property + @pulumi.getter + def namespace(self) -> Optional[pulumi.Input[str]]: + """ + Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + """ + return pulumi.get(self, "namespace") + + @namespace.setter + def namespace(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "namespace", value) + + @property + @pulumi.getter + def scope(self) -> Optional[pulumi.Input[str]]: + """ + Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + """ + return pulumi.get(self, "scope") + + @scope.setter + def scope(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "scope", value) + + @pulumi.input_type class IngressClassSpecArgs: def __init__(__self__, *, controller: Optional[pulumi.Input[str]] = None, - parameters: Optional[pulumi.Input['_core.v1.TypedLocalObjectReferenceArgs']] = None): + parameters: Optional[pulumi.Input['IngressClassParametersReferenceArgs']] = None): """ IngressClassSpec provides information about the class of an Ingress. :param pulumi.Input[str] controller: Controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable. - :param pulumi.Input['_core.v1.TypedLocalObjectReferenceArgs'] parameters: Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. + :param pulumi.Input['IngressClassParametersReferenceArgs'] parameters: Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. """ if controller is not None: pulumi.set(__self__, "controller", controller) @@ -412,14 +499,14 @@ def controller(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter - def parameters(self) -> Optional[pulumi.Input['_core.v1.TypedLocalObjectReferenceArgs']]: + def parameters(self) -> Optional[pulumi.Input['IngressClassParametersReferenceArgs']]: """ Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. """ return pulumi.get(self, "parameters") @parameters.setter - def parameters(self, value: Optional[pulumi.Input['_core.v1.TypedLocalObjectReferenceArgs']]): + def parameters(self, value: Optional[pulumi.Input['IngressClassParametersReferenceArgs']]): pulumi.set(self, "parameters", value) @@ -867,23 +954,39 @@ def pod_selector(self, value: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs' @pulumi.input_type class NetworkPolicyPortArgs: def __init__(__self__, *, + end_port: Optional[pulumi.Input[int]] = None, port: Optional[pulumi.Input[Union[int, str]]] = None, protocol: Optional[pulumi.Input[str]] = None): """ NetworkPolicyPort describes a port to allow traffic on - :param pulumi.Input[Union[int, str]] port: The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + :param pulumi.Input[int] end_port: If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate "NetworkPolicyEndPort". + :param pulumi.Input[Union[int, str]] port: The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. :param pulumi.Input[str] protocol: The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. """ + if end_port is not None: + pulumi.set(__self__, "end_port", end_port) if port is not None: pulumi.set(__self__, "port", port) if protocol is not None: pulumi.set(__self__, "protocol", protocol) + @property + @pulumi.getter(name="endPort") + def end_port(self) -> Optional[pulumi.Input[int]]: + """ + If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate "NetworkPolicyEndPort". + """ + return pulumi.get(self, "end_port") + + @end_port.setter + def end_port(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "end_port", value) + @property @pulumi.getter def port(self) -> Optional[pulumi.Input[Union[int, str]]]: """ - The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. """ return pulumi.get(self, "port") @@ -916,7 +1019,7 @@ def __init__(__self__, *, :param pulumi.Input['_meta.v1.LabelSelectorArgs'] pod_selector: Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. :param pulumi.Input[Sequence[pulumi.Input['NetworkPolicyEgressRuleArgs']]] egress: List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 :param pulumi.Input[Sequence[pulumi.Input['NetworkPolicyIngressRuleArgs']]] ingress: List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default) - :param pulumi.Input[Sequence[pulumi.Input[str]]] policy_types: List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + :param pulumi.Input[Sequence[pulumi.Input[str]]] policy_types: List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 """ pulumi.set(__self__, "pod_selector", pod_selector) if egress is not None: @@ -966,7 +1069,7 @@ def ingress(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkPol @pulumi.getter(name="policyTypes") def policy_types(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ - List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 """ return pulumi.get(self, "policy_types") diff --git a/sdk/python/pulumi_kubernetes/networking/v1/outputs.py b/sdk/python/pulumi_kubernetes/networking/v1/outputs.py index 70b87b5cbf..b294af8d10 100644 --- a/sdk/python/pulumi_kubernetes/networking/v1/outputs.py +++ b/sdk/python/pulumi_kubernetes/networking/v1/outputs.py @@ -18,6 +18,7 @@ 'Ingress', 'IngressBackend', 'IngressClass', + 'IngressClassParametersReference', 'IngressClassSpec', 'IngressRule', 'IngressServiceBackend', @@ -366,6 +367,78 @@ def _translate_property(self, prop): return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop +@pulumi.output_type +class IngressClassParametersReference(dict): + """ + IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + """ + def __init__(__self__, *, + kind: str, + name: str, + api_group: Optional[str] = None, + namespace: Optional[str] = None, + scope: Optional[str] = None): + """ + IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + :param str kind: Kind is the type of resource being referenced. + :param str name: Name is the name of resource being referenced. + :param str api_group: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + :param str namespace: Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + :param str scope: Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + """ + pulumi.set(__self__, "kind", kind) + pulumi.set(__self__, "name", name) + if api_group is not None: + pulumi.set(__self__, "api_group", api_group) + if namespace is not None: + pulumi.set(__self__, "namespace", namespace) + if scope is not None: + pulumi.set(__self__, "scope", scope) + + @property + @pulumi.getter + def kind(self) -> str: + """ + Kind is the type of resource being referenced. + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def name(self) -> str: + """ + Name is the name of resource being referenced. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="apiGroup") + def api_group(self) -> Optional[str]: + """ + APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + """ + return pulumi.get(self, "api_group") + + @property + @pulumi.getter + def namespace(self) -> Optional[str]: + """ + Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + """ + return pulumi.get(self, "namespace") + + @property + @pulumi.getter + def scope(self) -> Optional[str]: + """ + Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + """ + return pulumi.get(self, "scope") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + @pulumi.output_type class IngressClassSpec(dict): """ @@ -373,11 +446,11 @@ class IngressClassSpec(dict): """ def __init__(__self__, *, controller: Optional[str] = None, - parameters: Optional['_core.v1.outputs.TypedLocalObjectReference'] = None): + parameters: Optional['outputs.IngressClassParametersReference'] = None): """ IngressClassSpec provides information about the class of an Ingress. :param str controller: Controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable. - :param '_core.v1.TypedLocalObjectReferenceArgs' parameters: Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. + :param 'IngressClassParametersReferenceArgs' parameters: Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. """ if controller is not None: pulumi.set(__self__, "controller", controller) @@ -394,7 +467,7 @@ def controller(self) -> Optional[str]: @property @pulumi.getter - def parameters(self) -> Optional['_core.v1.outputs.TypedLocalObjectReference']: + def parameters(self) -> Optional['outputs.IngressClassParametersReference']: """ Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. """ @@ -817,23 +890,35 @@ class NetworkPolicyPort(dict): NetworkPolicyPort describes a port to allow traffic on """ def __init__(__self__, *, + end_port: Optional[int] = None, port: Optional[Any] = None, protocol: Optional[str] = None): """ NetworkPolicyPort describes a port to allow traffic on - :param Union[int, str] port: The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + :param int end_port: If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate "NetworkPolicyEndPort". + :param Union[int, str] port: The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. :param str protocol: The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. """ + if end_port is not None: + pulumi.set(__self__, "end_port", end_port) if port is not None: pulumi.set(__self__, "port", port) if protocol is not None: pulumi.set(__self__, "protocol", protocol) + @property + @pulumi.getter(name="endPort") + def end_port(self) -> Optional[int]: + """ + If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate "NetworkPolicyEndPort". + """ + return pulumi.get(self, "end_port") + @property @pulumi.getter def port(self) -> Optional[Any]: """ - The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. """ return pulumi.get(self, "port") @@ -864,7 +949,7 @@ def __init__(__self__, *, :param '_meta.v1.LabelSelectorArgs' pod_selector: Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. :param Sequence['NetworkPolicyEgressRuleArgs'] egress: List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 :param Sequence['NetworkPolicyIngressRuleArgs'] ingress: List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default) - :param Sequence[str] policy_types: List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + :param Sequence[str] policy_types: List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 """ pulumi.set(__self__, "pod_selector", pod_selector) if egress is not None: @@ -902,7 +987,7 @@ def ingress(self) -> Optional[Sequence['outputs.NetworkPolicyIngressRule']]: @pulumi.getter(name="policyTypes") def policy_types(self) -> Optional[Sequence[str]]: """ - List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + List of rule types that the NetworkPolicy relates to. Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 """ return pulumi.get(self, "policy_types") diff --git a/sdk/python/pulumi_kubernetes/networking/v1beta1/IngressClass.py b/sdk/python/pulumi_kubernetes/networking/v1beta1/IngressClass.py index 7d23e22ac1..201e53f104 100644 --- a/sdk/python/pulumi_kubernetes/networking/v1beta1/IngressClass.py +++ b/sdk/python/pulumi_kubernetes/networking/v1beta1/IngressClass.py @@ -8,7 +8,6 @@ from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs -from ... import core as _core from ... import meta as _meta from ._inputs import * diff --git a/sdk/python/pulumi_kubernetes/networking/v1beta1/IngressClassList.py b/sdk/python/pulumi_kubernetes/networking/v1beta1/IngressClassList.py index 70bb48491d..216a73efa5 100644 --- a/sdk/python/pulumi_kubernetes/networking/v1beta1/IngressClassList.py +++ b/sdk/python/pulumi_kubernetes/networking/v1beta1/IngressClassList.py @@ -8,7 +8,6 @@ from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs -from ... import core as _core from ... import meta as _meta from ._inputs import * diff --git a/sdk/python/pulumi_kubernetes/networking/v1beta1/_inputs.py b/sdk/python/pulumi_kubernetes/networking/v1beta1/_inputs.py index 03b5c428ff..30ef056b6b 100644 --- a/sdk/python/pulumi_kubernetes/networking/v1beta1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/networking/v1beta1/_inputs.py @@ -16,6 +16,7 @@ 'IngressArgs', 'IngressBackendArgs', 'IngressClassArgs', + 'IngressClassParametersReferenceArgs', 'IngressClassSpecArgs', 'IngressRuleArgs', 'IngressSpecArgs', @@ -349,15 +350,101 @@ def spec(self, value: Optional[pulumi.Input['IngressClassSpecArgs']]): pulumi.set(self, "spec", value) +@pulumi.input_type +class IngressClassParametersReferenceArgs: + def __init__(__self__, *, + kind: pulumi.Input[str], + name: pulumi.Input[str], + api_group: Optional[pulumi.Input[str]] = None, + namespace: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None): + """ + IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + :param pulumi.Input[str] kind: Kind is the type of resource being referenced. + :param pulumi.Input[str] name: Name is the name of resource being referenced. + :param pulumi.Input[str] api_group: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + :param pulumi.Input[str] namespace: Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + :param pulumi.Input[str] scope: Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + """ + pulumi.set(__self__, "kind", kind) + pulumi.set(__self__, "name", name) + if api_group is not None: + pulumi.set(__self__, "api_group", api_group) + if namespace is not None: + pulumi.set(__self__, "namespace", namespace) + if scope is not None: + pulumi.set(__self__, "scope", scope) + + @property + @pulumi.getter + def kind(self) -> pulumi.Input[str]: + """ + Kind is the type of resource being referenced. + """ + return pulumi.get(self, "kind") + + @kind.setter + def kind(self, value: pulumi.Input[str]): + pulumi.set(self, "kind", value) + + @property + @pulumi.getter + def name(self) -> pulumi.Input[str]: + """ + Name is the name of resource being referenced. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: pulumi.Input[str]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter(name="apiGroup") + def api_group(self) -> Optional[pulumi.Input[str]]: + """ + APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + """ + return pulumi.get(self, "api_group") + + @api_group.setter + def api_group(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "api_group", value) + + @property + @pulumi.getter + def namespace(self) -> Optional[pulumi.Input[str]]: + """ + Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + """ + return pulumi.get(self, "namespace") + + @namespace.setter + def namespace(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "namespace", value) + + @property + @pulumi.getter + def scope(self) -> Optional[pulumi.Input[str]]: + """ + Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + """ + return pulumi.get(self, "scope") + + @scope.setter + def scope(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "scope", value) + + @pulumi.input_type class IngressClassSpecArgs: def __init__(__self__, *, controller: Optional[pulumi.Input[str]] = None, - parameters: Optional[pulumi.Input['_core.v1.TypedLocalObjectReferenceArgs']] = None): + parameters: Optional[pulumi.Input['IngressClassParametersReferenceArgs']] = None): """ IngressClassSpec provides information about the class of an Ingress. :param pulumi.Input[str] controller: Controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable. - :param pulumi.Input['_core.v1.TypedLocalObjectReferenceArgs'] parameters: Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. + :param pulumi.Input['IngressClassParametersReferenceArgs'] parameters: Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. """ if controller is not None: pulumi.set(__self__, "controller", controller) @@ -378,14 +465,14 @@ def controller(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter - def parameters(self) -> Optional[pulumi.Input['_core.v1.TypedLocalObjectReferenceArgs']]: + def parameters(self) -> Optional[pulumi.Input['IngressClassParametersReferenceArgs']]: """ Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. """ return pulumi.get(self, "parameters") @parameters.setter - def parameters(self, value: Optional[pulumi.Input['_core.v1.TypedLocalObjectReferenceArgs']]): + def parameters(self, value: Optional[pulumi.Input['IngressClassParametersReferenceArgs']]): pulumi.set(self, "parameters", value) diff --git a/sdk/python/pulumi_kubernetes/networking/v1beta1/outputs.py b/sdk/python/pulumi_kubernetes/networking/v1beta1/outputs.py index 9d984de648..52c25e76cb 100644 --- a/sdk/python/pulumi_kubernetes/networking/v1beta1/outputs.py +++ b/sdk/python/pulumi_kubernetes/networking/v1beta1/outputs.py @@ -17,6 +17,7 @@ 'Ingress', 'IngressBackend', 'IngressClass', + 'IngressClassParametersReference', 'IngressClassSpec', 'IngressRule', 'IngressSpec', @@ -330,6 +331,78 @@ def _translate_property(self, prop): return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop +@pulumi.output_type +class IngressClassParametersReference(dict): + """ + IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + """ + def __init__(__self__, *, + kind: str, + name: str, + api_group: Optional[str] = None, + namespace: Optional[str] = None, + scope: Optional[str] = None): + """ + IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. + :param str kind: Kind is the type of resource being referenced. + :param str name: Name is the name of resource being referenced. + :param str api_group: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + :param str namespace: Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + :param str scope: Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + """ + pulumi.set(__self__, "kind", kind) + pulumi.set(__self__, "name", name) + if api_group is not None: + pulumi.set(__self__, "api_group", api_group) + if namespace is not None: + pulumi.set(__self__, "namespace", namespace) + if scope is not None: + pulumi.set(__self__, "scope", scope) + + @property + @pulumi.getter + def kind(self) -> str: + """ + Kind is the type of resource being referenced. + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def name(self) -> str: + """ + Name is the name of resource being referenced. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="apiGroup") + def api_group(self) -> Optional[str]: + """ + APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + """ + return pulumi.get(self, "api_group") + + @property + @pulumi.getter + def namespace(self) -> Optional[str]: + """ + Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + """ + return pulumi.get(self, "namespace") + + @property + @pulumi.getter + def scope(self) -> Optional[str]: + """ + Scope represents if this refers to a cluster or namespace scoped resource. This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + """ + return pulumi.get(self, "scope") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + @pulumi.output_type class IngressClassSpec(dict): """ @@ -337,11 +410,11 @@ class IngressClassSpec(dict): """ def __init__(__self__, *, controller: Optional[str] = None, - parameters: Optional['_core.v1.outputs.TypedLocalObjectReference'] = None): + parameters: Optional['outputs.IngressClassParametersReference'] = None): """ IngressClassSpec provides information about the class of an Ingress. :param str controller: Controller refers to the name of the controller that should handle this class. This allows for different "flavors" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable. - :param '_core.v1.TypedLocalObjectReferenceArgs' parameters: Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. + :param 'IngressClassParametersReferenceArgs' parameters: Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. """ if controller is not None: pulumi.set(__self__, "controller", controller) @@ -358,7 +431,7 @@ def controller(self) -> Optional[str]: @property @pulumi.getter - def parameters(self) -> Optional['_core.v1.outputs.TypedLocalObjectReference']: + def parameters(self) -> Optional['outputs.IngressClassParametersReference']: """ Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. """ diff --git a/sdk/python/pulumi_kubernetes/policy/__init__.py b/sdk/python/pulumi_kubernetes/policy/__init__.py index 0bf2eeb4ef..c1f755c4ab 100644 --- a/sdk/python/pulumi_kubernetes/policy/__init__.py +++ b/sdk/python/pulumi_kubernetes/policy/__init__.py @@ -5,5 +5,6 @@ # Make subpackages available: from . import ( + v1, v1beta1, ) diff --git a/sdk/python/pulumi_kubernetes/policy/v1/PodDisruptionBudget.py b/sdk/python/pulumi_kubernetes/policy/v1/PodDisruptionBudget.py new file mode 100644 index 0000000000..61636a9602 --- /dev/null +++ b/sdk/python/pulumi_kubernetes/policy/v1/PodDisruptionBudget.py @@ -0,0 +1,136 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from . import outputs +from ... import meta as _meta +from ._inputs import * + +__all__ = ['PodDisruptionBudget'] + + +class PodDisruptionBudget(pulumi.CustomResource): + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + api_version: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']]] = None, + spec: Optional[pulumi.Input[pulumi.InputType['PodDisruptionBudgetSpecArgs']]] = None, + __props__=None, + __name__=None, + __opts__=None): + """ + PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[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 + :param pulumi.Input[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 + :param pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param pulumi.Input[pulumi.InputType['PodDisruptionBudgetSpecArgs']] spec: Specification of the desired behavior of the PodDisruptionBudget. + """ + if __name__ is not None: + warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) + resource_name = __name__ + if __opts__ is not None: + warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) + opts = __opts__ + if opts is None: + opts = pulumi.ResourceOptions() + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.version is None: + opts.version = _utilities.get_version() + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = dict() + + __props__['api_version'] = 'policy/v1' + __props__['kind'] = 'PodDisruptionBudget' + __props__['metadata'] = metadata + __props__['spec'] = spec + __props__['status'] = None + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:policy/v1beta1:PodDisruptionBudget")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) + super(PodDisruptionBudget, __self__).__init__( + 'kubernetes:policy/v1:PodDisruptionBudget', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'PodDisruptionBudget': + """ + Get an existing PodDisruptionBudget resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = dict() + + __props__["api_version"] = None + __props__["kind"] = None + __props__["metadata"] = None + __props__["spec"] = None + __props__["status"] = None + return PodDisruptionBudget(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def kind(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ObjectMeta']]: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @property + @pulumi.getter + def spec(self) -> pulumi.Output[Optional['outputs.PodDisruptionBudgetSpec']]: + """ + Specification of the desired behavior of the PodDisruptionBudget. + """ + return pulumi.get(self, "spec") + + @property + @pulumi.getter + def status(self) -> pulumi.Output[Optional['outputs.PodDisruptionBudgetStatus']]: + """ + Most recently observed status of the PodDisruptionBudget. + """ + return pulumi.get(self, "status") + + def translate_output_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + def translate_input_property(self, prop): + return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop + diff --git a/sdk/python/pulumi_kubernetes/policy/v1/PodDisruptionBudgetList.py b/sdk/python/pulumi_kubernetes/policy/v1/PodDisruptionBudgetList.py new file mode 100644 index 0000000000..e75b319ff3 --- /dev/null +++ b/sdk/python/pulumi_kubernetes/policy/v1/PodDisruptionBudgetList.py @@ -0,0 +1,126 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from . import outputs +from ... import meta as _meta +from ._inputs import * + +__all__ = ['PodDisruptionBudgetList'] + + +class PodDisruptionBudgetList(pulumi.CustomResource): + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + api_version: Optional[pulumi.Input[str]] = None, + items: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PodDisruptionBudgetArgs']]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']]] = None, + __props__=None, + __name__=None, + __opts__=None): + """ + PodDisruptionBudgetList is a collection of PodDisruptionBudgets. + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[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 + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PodDisruptionBudgetArgs']]]] items: Items is a list of PodDisruptionBudgets + :param pulumi.Input[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 + :param pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + if __name__ is not None: + warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) + resource_name = __name__ + if __opts__ is not None: + warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) + opts = __opts__ + if opts is None: + opts = pulumi.ResourceOptions() + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.version is None: + opts.version = _utilities.get_version() + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = dict() + + __props__['api_version'] = 'policy/v1' + if items is None and not opts.urn: + raise TypeError("Missing required property 'items'") + __props__['items'] = items + __props__['kind'] = 'PodDisruptionBudgetList' + __props__['metadata'] = metadata + super(PodDisruptionBudgetList, __self__).__init__( + 'kubernetes:policy/v1:PodDisruptionBudgetList', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'PodDisruptionBudgetList': + """ + Get an existing PodDisruptionBudgetList resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = dict() + + __props__["api_version"] = None + __props__["items"] = None + __props__["kind"] = None + __props__["metadata"] = None + return PodDisruptionBudgetList(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def items(self) -> pulumi.Output[Sequence['outputs.PodDisruptionBudget']]: + """ + Items is a list of PodDisruptionBudgets + """ + return pulumi.get(self, "items") + + @property + @pulumi.getter + def kind(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ListMeta']]: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + def translate_output_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + def translate_input_property(self, prop): + return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop + diff --git a/sdk/python/pulumi_kubernetes/policy/v1/__init__.py b/sdk/python/pulumi_kubernetes/policy/v1/__init__.py new file mode 100644 index 0000000000..e7b88e702c --- /dev/null +++ b/sdk/python/pulumi_kubernetes/policy/v1/__init__.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +# Export this package's modules as members: +from .PodDisruptionBudget import * +from .PodDisruptionBudgetList import * +from ._inputs import * +from . import outputs + +def _register_module(): + import pulumi + from ... import _utilities + + + class Module(pulumi.runtime.ResourceModule): + _version = _utilities.get_semver_version() + + def version(self): + return Module._version + + def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource: + if typ == "kubernetes:policy/v1:PodDisruptionBudget": + return PodDisruptionBudget(name, pulumi.ResourceOptions(urn=urn)) + elif typ == "kubernetes:policy/v1:PodDisruptionBudgetList": + return PodDisruptionBudgetList(name, pulumi.ResourceOptions(urn=urn)) + else: + raise Exception(f"unknown resource type {typ}") + + + _module_instance = Module() + pulumi.runtime.register_resource_module("kubernetes", "policy/v1", _module_instance) + +_register_module() diff --git a/sdk/python/pulumi_kubernetes/policy/v1/_inputs.py b/sdk/python/pulumi_kubernetes/policy/v1/_inputs.py new file mode 100644 index 0000000000..871820b338 --- /dev/null +++ b/sdk/python/pulumi_kubernetes/policy/v1/_inputs.py @@ -0,0 +1,293 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from ... import meta as _meta + +__all__ = [ + 'PodDisruptionBudgetArgs', + 'PodDisruptionBudgetSpecArgs', + 'PodDisruptionBudgetStatusArgs', +] + +@pulumi.input_type +class PodDisruptionBudgetArgs: + def __init__(__self__, *, + api_version: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']] = None, + spec: Optional[pulumi.Input['PodDisruptionBudgetSpecArgs']] = None, + status: Optional[pulumi.Input['PodDisruptionBudgetStatusArgs']] = None): + """ + PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods + :param pulumi.Input[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 + :param pulumi.Input[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 + :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param pulumi.Input['PodDisruptionBudgetSpecArgs'] spec: Specification of the desired behavior of the PodDisruptionBudget. + :param pulumi.Input['PodDisruptionBudgetStatusArgs'] status: Most recently observed status of the PodDisruptionBudget. + """ + if api_version is not None: + pulumi.set(__self__, "api_version", 'policy/v1') + if kind is not None: + pulumi.set(__self__, "kind", 'PodDisruptionBudget') + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if spec is not None: + pulumi.set(__self__, "spec", spec) + if status is not None: + pulumi.set(__self__, "status", status) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> Optional[pulumi.Input[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @api_version.setter + def api_version(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "api_version", value) + + @property + @pulumi.getter + def kind(self) -> Optional[pulumi.Input[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @kind.setter + def kind(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "kind", value) + + @property + @pulumi.getter + def metadata(self) -> Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @metadata.setter + def metadata(self, value: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]): + pulumi.set(self, "metadata", value) + + @property + @pulumi.getter + def spec(self) -> Optional[pulumi.Input['PodDisruptionBudgetSpecArgs']]: + """ + Specification of the desired behavior of the PodDisruptionBudget. + """ + return pulumi.get(self, "spec") + + @spec.setter + def spec(self, value: Optional[pulumi.Input['PodDisruptionBudgetSpecArgs']]): + pulumi.set(self, "spec", value) + + @property + @pulumi.getter + def status(self) -> Optional[pulumi.Input['PodDisruptionBudgetStatusArgs']]: + """ + Most recently observed status of the PodDisruptionBudget. + """ + return pulumi.get(self, "status") + + @status.setter + def status(self, value: Optional[pulumi.Input['PodDisruptionBudgetStatusArgs']]): + pulumi.set(self, "status", value) + + +@pulumi.input_type +class PodDisruptionBudgetSpecArgs: + def __init__(__self__, *, + max_unavailable: Optional[pulumi.Input[Union[int, str]]] = None, + min_available: Optional[pulumi.Input[Union[int, str]]] = None, + selector: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']] = None): + """ + PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. + :param pulumi.Input[Union[int, str]] max_unavailable: An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + :param pulumi.Input[Union[int, str]] min_available: An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + :param pulumi.Input['_meta.v1.LabelSelectorArgs'] selector: Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. + """ + if max_unavailable is not None: + pulumi.set(__self__, "max_unavailable", max_unavailable) + if min_available is not None: + pulumi.set(__self__, "min_available", min_available) + if selector is not None: + pulumi.set(__self__, "selector", selector) + + @property + @pulumi.getter(name="maxUnavailable") + def max_unavailable(self) -> Optional[pulumi.Input[Union[int, str]]]: + """ + An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + """ + return pulumi.get(self, "max_unavailable") + + @max_unavailable.setter + def max_unavailable(self, value: Optional[pulumi.Input[Union[int, str]]]): + pulumi.set(self, "max_unavailable", value) + + @property + @pulumi.getter(name="minAvailable") + def min_available(self) -> Optional[pulumi.Input[Union[int, str]]]: + """ + An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + """ + return pulumi.get(self, "min_available") + + @min_available.setter + def min_available(self, value: Optional[pulumi.Input[Union[int, str]]]): + pulumi.set(self, "min_available", value) + + @property + @pulumi.getter + def selector(self) -> Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]: + """ + Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. + """ + return pulumi.get(self, "selector") + + @selector.setter + def selector(self, value: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]): + pulumi.set(self, "selector", value) + + +@pulumi.input_type +class PodDisruptionBudgetStatusArgs: + def __init__(__self__, *, + current_healthy: pulumi.Input[int], + desired_healthy: pulumi.Input[int], + disruptions_allowed: pulumi.Input[int], + expected_pods: pulumi.Input[int], + conditions: Optional[pulumi.Input[Sequence[pulumi.Input['_meta.v1.ConditionArgs']]]] = None, + disrupted_pods: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + observed_generation: Optional[pulumi.Input[int]] = None): + """ + PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. + :param pulumi.Input[int] current_healthy: current number of healthy pods + :param pulumi.Input[int] desired_healthy: minimum desired number of healthy pods + :param pulumi.Input[int] disruptions_allowed: Number of pod disruptions that are currently allowed. + :param pulumi.Input[int] expected_pods: total number of pods counted by this disruption budget + :param pulumi.Input[Sequence[pulumi.Input['_meta.v1.ConditionArgs']]] conditions: Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + the number of allowed disruptions. Therefore no disruptions are + allowed and the status of the condition will be False. + - InsufficientPods: The number of pods are either at or below the number + required by the PodDisruptionBudget. No disruptions are + allowed and the status of the condition will be False. + - SufficientPods: There are more pods than required by the PodDisruptionBudget. + The condition will be True, and the number of allowed + disruptions are provided by the disruptionsAllowed property. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] disrupted_pods: DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. + :param pulumi.Input[int] observed_generation: Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. + """ + pulumi.set(__self__, "current_healthy", current_healthy) + pulumi.set(__self__, "desired_healthy", desired_healthy) + pulumi.set(__self__, "disruptions_allowed", disruptions_allowed) + pulumi.set(__self__, "expected_pods", expected_pods) + if conditions is not None: + pulumi.set(__self__, "conditions", conditions) + if disrupted_pods is not None: + pulumi.set(__self__, "disrupted_pods", disrupted_pods) + if observed_generation is not None: + pulumi.set(__self__, "observed_generation", observed_generation) + + @property + @pulumi.getter(name="currentHealthy") + def current_healthy(self) -> pulumi.Input[int]: + """ + current number of healthy pods + """ + return pulumi.get(self, "current_healthy") + + @current_healthy.setter + def current_healthy(self, value: pulumi.Input[int]): + pulumi.set(self, "current_healthy", value) + + @property + @pulumi.getter(name="desiredHealthy") + def desired_healthy(self) -> pulumi.Input[int]: + """ + minimum desired number of healthy pods + """ + return pulumi.get(self, "desired_healthy") + + @desired_healthy.setter + def desired_healthy(self, value: pulumi.Input[int]): + pulumi.set(self, "desired_healthy", value) + + @property + @pulumi.getter(name="disruptionsAllowed") + def disruptions_allowed(self) -> pulumi.Input[int]: + """ + Number of pod disruptions that are currently allowed. + """ + return pulumi.get(self, "disruptions_allowed") + + @disruptions_allowed.setter + def disruptions_allowed(self, value: pulumi.Input[int]): + pulumi.set(self, "disruptions_allowed", value) + + @property + @pulumi.getter(name="expectedPods") + def expected_pods(self) -> pulumi.Input[int]: + """ + total number of pods counted by this disruption budget + """ + return pulumi.get(self, "expected_pods") + + @expected_pods.setter + def expected_pods(self, value: pulumi.Input[int]): + pulumi.set(self, "expected_pods", value) + + @property + @pulumi.getter + def conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['_meta.v1.ConditionArgs']]]]: + """ + Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + the number of allowed disruptions. Therefore no disruptions are + allowed and the status of the condition will be False. + - InsufficientPods: The number of pods are either at or below the number + required by the PodDisruptionBudget. No disruptions are + allowed and the status of the condition will be False. + - SufficientPods: There are more pods than required by the PodDisruptionBudget. + The condition will be True, and the number of allowed + disruptions are provided by the disruptionsAllowed property. + """ + return pulumi.get(self, "conditions") + + @conditions.setter + def conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['_meta.v1.ConditionArgs']]]]): + pulumi.set(self, "conditions", value) + + @property + @pulumi.getter(name="disruptedPods") + def disrupted_pods(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. + """ + return pulumi.get(self, "disrupted_pods") + + @disrupted_pods.setter + def disrupted_pods(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "disrupted_pods", value) + + @property + @pulumi.getter(name="observedGeneration") + def observed_generation(self) -> Optional[pulumi.Input[int]]: + """ + Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. + """ + return pulumi.get(self, "observed_generation") + + @observed_generation.setter + def observed_generation(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "observed_generation", value) + + diff --git a/sdk/python/pulumi_kubernetes/policy/v1/outputs.py b/sdk/python/pulumi_kubernetes/policy/v1/outputs.py new file mode 100644 index 0000000000..f66b44f5f2 --- /dev/null +++ b/sdk/python/pulumi_kubernetes/policy/v1/outputs.py @@ -0,0 +1,252 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from . import outputs +from ... import meta as _meta + +__all__ = [ + 'PodDisruptionBudget', + 'PodDisruptionBudgetSpec', + 'PodDisruptionBudgetStatus', +] + +@pulumi.output_type +class PodDisruptionBudget(dict): + """ + PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods + """ + def __init__(__self__, *, + api_version: Optional[str] = None, + kind: Optional[str] = None, + metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None, + spec: Optional['outputs.PodDisruptionBudgetSpec'] = None, + status: Optional['outputs.PodDisruptionBudgetStatus'] = None): + """ + PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods + :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 + :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 + :param '_meta.v1.ObjectMetaArgs' metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param 'PodDisruptionBudgetSpecArgs' spec: Specification of the desired behavior of the PodDisruptionBudget. + :param 'PodDisruptionBudgetStatusArgs' status: Most recently observed status of the PodDisruptionBudget. + """ + if api_version is not None: + pulumi.set(__self__, "api_version", 'policy/v1') + if kind is not None: + pulumi.set(__self__, "kind", 'PodDisruptionBudget') + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if spec is not None: + pulumi.set(__self__, "spec", spec) + if status is not None: + pulumi.set(__self__, "status", status) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> Optional[str]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def kind(self) -> Optional[str]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']: + """ + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @property + @pulumi.getter + def spec(self) -> Optional['outputs.PodDisruptionBudgetSpec']: + """ + Specification of the desired behavior of the PodDisruptionBudget. + """ + return pulumi.get(self, "spec") + + @property + @pulumi.getter + def status(self) -> Optional['outputs.PodDisruptionBudgetStatus']: + """ + Most recently observed status of the PodDisruptionBudget. + """ + return pulumi.get(self, "status") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + +@pulumi.output_type +class PodDisruptionBudgetSpec(dict): + """ + PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. + """ + def __init__(__self__, *, + max_unavailable: Optional[Any] = None, + min_available: Optional[Any] = None, + selector: Optional['_meta.v1.outputs.LabelSelector'] = None): + """ + PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. + :param Union[int, str] max_unavailable: An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + :param Union[int, str] min_available: An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + :param '_meta.v1.LabelSelectorArgs' selector: Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. + """ + if max_unavailable is not None: + pulumi.set(__self__, "max_unavailable", max_unavailable) + if min_available is not None: + pulumi.set(__self__, "min_available", min_available) + if selector is not None: + pulumi.set(__self__, "selector", selector) + + @property + @pulumi.getter(name="maxUnavailable") + def max_unavailable(self) -> Optional[Any]: + """ + An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + """ + return pulumi.get(self, "max_unavailable") + + @property + @pulumi.getter(name="minAvailable") + def min_available(self) -> Optional[Any]: + """ + An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + """ + return pulumi.get(self, "min_available") + + @property + @pulumi.getter + def selector(self) -> Optional['_meta.v1.outputs.LabelSelector']: + """ + Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. + """ + return pulumi.get(self, "selector") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + +@pulumi.output_type +class PodDisruptionBudgetStatus(dict): + """ + PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. + """ + def __init__(__self__, *, + current_healthy: int, + desired_healthy: int, + disruptions_allowed: int, + expected_pods: int, + conditions: Optional[Sequence['_meta.v1.outputs.Condition']] = None, + disrupted_pods: Optional[Mapping[str, str]] = None, + observed_generation: Optional[int] = None): + """ + PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. + :param int current_healthy: current number of healthy pods + :param int desired_healthy: minimum desired number of healthy pods + :param int disruptions_allowed: Number of pod disruptions that are currently allowed. + :param int expected_pods: total number of pods counted by this disruption budget + :param Sequence['_meta.v1.ConditionArgs'] conditions: Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + the number of allowed disruptions. Therefore no disruptions are + allowed and the status of the condition will be False. + - InsufficientPods: The number of pods are either at or below the number + required by the PodDisruptionBudget. No disruptions are + allowed and the status of the condition will be False. + - SufficientPods: There are more pods than required by the PodDisruptionBudget. + The condition will be True, and the number of allowed + disruptions are provided by the disruptionsAllowed property. + :param Mapping[str, str] disrupted_pods: DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. + :param int observed_generation: Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. + """ + pulumi.set(__self__, "current_healthy", current_healthy) + pulumi.set(__self__, "desired_healthy", desired_healthy) + pulumi.set(__self__, "disruptions_allowed", disruptions_allowed) + pulumi.set(__self__, "expected_pods", expected_pods) + if conditions is not None: + pulumi.set(__self__, "conditions", conditions) + if disrupted_pods is not None: + pulumi.set(__self__, "disrupted_pods", disrupted_pods) + if observed_generation is not None: + pulumi.set(__self__, "observed_generation", observed_generation) + + @property + @pulumi.getter(name="currentHealthy") + def current_healthy(self) -> int: + """ + current number of healthy pods + """ + return pulumi.get(self, "current_healthy") + + @property + @pulumi.getter(name="desiredHealthy") + def desired_healthy(self) -> int: + """ + minimum desired number of healthy pods + """ + return pulumi.get(self, "desired_healthy") + + @property + @pulumi.getter(name="disruptionsAllowed") + def disruptions_allowed(self) -> int: + """ + Number of pod disruptions that are currently allowed. + """ + return pulumi.get(self, "disruptions_allowed") + + @property + @pulumi.getter(name="expectedPods") + def expected_pods(self) -> int: + """ + total number of pods counted by this disruption budget + """ + return pulumi.get(self, "expected_pods") + + @property + @pulumi.getter + def conditions(self) -> Optional[Sequence['_meta.v1.outputs.Condition']]: + """ + Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + the number of allowed disruptions. Therefore no disruptions are + allowed and the status of the condition will be False. + - InsufficientPods: The number of pods are either at or below the number + required by the PodDisruptionBudget. No disruptions are + allowed and the status of the condition will be False. + - SufficientPods: There are more pods than required by the PodDisruptionBudget. + The condition will be True, and the number of allowed + disruptions are provided by the disruptionsAllowed property. + """ + return pulumi.get(self, "conditions") + + @property + @pulumi.getter(name="disruptedPods") + def disrupted_pods(self) -> Optional[Mapping[str, str]]: + """ + DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. + """ + return pulumi.get(self, "disrupted_pods") + + @property + @pulumi.getter(name="observedGeneration") + def observed_generation(self) -> Optional[int]: + """ + Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. + """ + return pulumi.get(self, "observed_generation") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + diff --git a/sdk/python/pulumi_kubernetes/policy/v1beta1/PodDisruptionBudget.py b/sdk/python/pulumi_kubernetes/policy/v1beta1/PodDisruptionBudget.py index 881e99660d..ed8d240489 100644 --- a/sdk/python/pulumi_kubernetes/policy/v1beta1/PodDisruptionBudget.py +++ b/sdk/python/pulumi_kubernetes/policy/v1beta1/PodDisruptionBudget.py @@ -56,6 +56,8 @@ def __init__(__self__, __props__['metadata'] = metadata __props__['spec'] = spec __props__['status'] = None + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:policy/v1:PodDisruptionBudget")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(PodDisruptionBudget, __self__).__init__( 'kubernetes:policy/v1beta1:PodDisruptionBudget', resource_name, diff --git a/sdk/python/pulumi_kubernetes/policy/v1beta1/PodSecurityPolicy.py b/sdk/python/pulumi_kubernetes/policy/v1beta1/PodSecurityPolicy.py index 6440f570e9..bae033288d 100644 --- a/sdk/python/pulumi_kubernetes/policy/v1beta1/PodSecurityPolicy.py +++ b/sdk/python/pulumi_kubernetes/policy/v1beta1/PodSecurityPolicy.py @@ -27,7 +27,7 @@ def __init__(__self__, __name__=None, __opts__=None): """ - PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. + PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumi_kubernetes/policy/v1beta1/_inputs.py b/sdk/python/pulumi_kubernetes/policy/v1beta1/_inputs.py index a5975d5b63..a1540b5aad 100644 --- a/sdk/python/pulumi_kubernetes/policy/v1beta1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/policy/v1beta1/_inputs.py @@ -329,7 +329,7 @@ def __init__(__self__, *, PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. :param pulumi.Input[Union[int, str]] max_unavailable: An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". :param pulumi.Input[Union[int, str]] min_available: An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". - :param pulumi.Input['_meta.v1.LabelSelectorArgs'] selector: Label query over pods whose evictions are managed by the disruption budget. + :param pulumi.Input['_meta.v1.LabelSelectorArgs'] selector: Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. """ if max_unavailable is not None: pulumi.set(__self__, "max_unavailable", max_unavailable) @@ -366,7 +366,7 @@ def min_available(self, value: Optional[pulumi.Input[Union[int, str]]]): @pulumi.getter def selector(self) -> Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]: """ - Label query over pods whose evictions are managed by the disruption budget. + Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. """ return pulumi.get(self, "selector") @@ -382,6 +382,7 @@ def __init__(__self__, *, desired_healthy: pulumi.Input[int], disruptions_allowed: pulumi.Input[int], expected_pods: pulumi.Input[int], + conditions: Optional[pulumi.Input[Sequence[pulumi.Input['_meta.v1.ConditionArgs']]]] = None, disrupted_pods: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, observed_generation: Optional[pulumi.Input[int]] = None): """ @@ -390,6 +391,15 @@ def __init__(__self__, *, :param pulumi.Input[int] desired_healthy: minimum desired number of healthy pods :param pulumi.Input[int] disruptions_allowed: Number of pod disruptions that are currently allowed. :param pulumi.Input[int] expected_pods: total number of pods counted by this disruption budget + :param pulumi.Input[Sequence[pulumi.Input['_meta.v1.ConditionArgs']]] conditions: Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + the number of allowed disruptions. Therefore no disruptions are + allowed and the status of the condition will be False. + - InsufficientPods: The number of pods are either at or below the number + required by the PodDisruptionBudget. No disruptions are + allowed and the status of the condition will be False. + - SufficientPods: There are more pods than required by the PodDisruptionBudget. + The condition will be True, and the number of allowed + disruptions are provided by the disruptionsAllowed property. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] disrupted_pods: DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. :param pulumi.Input[int] observed_generation: Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. """ @@ -397,6 +407,8 @@ def __init__(__self__, *, pulumi.set(__self__, "desired_healthy", desired_healthy) pulumi.set(__self__, "disruptions_allowed", disruptions_allowed) pulumi.set(__self__, "expected_pods", expected_pods) + if conditions is not None: + pulumi.set(__self__, "conditions", conditions) if disrupted_pods is not None: pulumi.set(__self__, "disrupted_pods", disrupted_pods) if observed_generation is not None: @@ -450,6 +462,26 @@ def expected_pods(self) -> pulumi.Input[int]: def expected_pods(self, value: pulumi.Input[int]): pulumi.set(self, "expected_pods", value) + @property + @pulumi.getter + def conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['_meta.v1.ConditionArgs']]]]: + """ + Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + the number of allowed disruptions. Therefore no disruptions are + allowed and the status of the condition will be False. + - InsufficientPods: The number of pods are either at or below the number + required by the PodDisruptionBudget. No disruptions are + allowed and the status of the condition will be False. + - SufficientPods: There are more pods than required by the PodDisruptionBudget. + The condition will be True, and the number of allowed + disruptions are provided by the disruptionsAllowed property. + """ + return pulumi.get(self, "conditions") + + @conditions.setter + def conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['_meta.v1.ConditionArgs']]]]): + pulumi.set(self, "conditions", value) + @property @pulumi.getter(name="disruptedPods") def disrupted_pods(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: @@ -483,7 +515,7 @@ def __init__(__self__, *, metadata: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']] = None, spec: Optional[pulumi.Input['PodSecurityPolicySpecArgs']] = None): """ - PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. + PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. :param pulumi.Input[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 :param pulumi.Input[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 :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata diff --git a/sdk/python/pulumi_kubernetes/policy/v1beta1/outputs.py b/sdk/python/pulumi_kubernetes/policy/v1beta1/outputs.py index f926a73758..d974f68440 100644 --- a/sdk/python/pulumi_kubernetes/policy/v1beta1/outputs.py +++ b/sdk/python/pulumi_kubernetes/policy/v1beta1/outputs.py @@ -315,7 +315,7 @@ def __init__(__self__, *, PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. :param Union[int, str] max_unavailable: An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". :param Union[int, str] min_available: An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". - :param '_meta.v1.LabelSelectorArgs' selector: Label query over pods whose evictions are managed by the disruption budget. + :param '_meta.v1.LabelSelectorArgs' selector: Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. """ if max_unavailable is not None: pulumi.set(__self__, "max_unavailable", max_unavailable) @@ -344,7 +344,7 @@ def min_available(self) -> Optional[Any]: @pulumi.getter def selector(self) -> Optional['_meta.v1.outputs.LabelSelector']: """ - Label query over pods whose evictions are managed by the disruption budget. + Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. """ return pulumi.get(self, "selector") @@ -362,6 +362,7 @@ def __init__(__self__, *, desired_healthy: int, disruptions_allowed: int, expected_pods: int, + conditions: Optional[Sequence['_meta.v1.outputs.Condition']] = None, disrupted_pods: Optional[Mapping[str, str]] = None, observed_generation: Optional[int] = None): """ @@ -370,6 +371,15 @@ def __init__(__self__, *, :param int desired_healthy: minimum desired number of healthy pods :param int disruptions_allowed: Number of pod disruptions that are currently allowed. :param int expected_pods: total number of pods counted by this disruption budget + :param Sequence['_meta.v1.ConditionArgs'] conditions: Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + the number of allowed disruptions. Therefore no disruptions are + allowed and the status of the condition will be False. + - InsufficientPods: The number of pods are either at or below the number + required by the PodDisruptionBudget. No disruptions are + allowed and the status of the condition will be False. + - SufficientPods: There are more pods than required by the PodDisruptionBudget. + The condition will be True, and the number of allowed + disruptions are provided by the disruptionsAllowed property. :param Mapping[str, str] disrupted_pods: DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. :param int observed_generation: Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation. """ @@ -377,6 +387,8 @@ def __init__(__self__, *, pulumi.set(__self__, "desired_healthy", desired_healthy) pulumi.set(__self__, "disruptions_allowed", disruptions_allowed) pulumi.set(__self__, "expected_pods", expected_pods) + if conditions is not None: + pulumi.set(__self__, "conditions", conditions) if disrupted_pods is not None: pulumi.set(__self__, "disrupted_pods", disrupted_pods) if observed_generation is not None: @@ -414,6 +426,22 @@ def expected_pods(self) -> int: """ return pulumi.get(self, "expected_pods") + @property + @pulumi.getter + def conditions(self) -> Optional[Sequence['_meta.v1.outputs.Condition']]: + """ + Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute + the number of allowed disruptions. Therefore no disruptions are + allowed and the status of the condition will be False. + - InsufficientPods: The number of pods are either at or below the number + required by the PodDisruptionBudget. No disruptions are + allowed and the status of the condition will be False. + - SufficientPods: There are more pods than required by the PodDisruptionBudget. + The condition will be True, and the number of allowed + disruptions are provided by the disruptionsAllowed property. + """ + return pulumi.get(self, "conditions") + @property @pulumi.getter(name="disruptedPods") def disrupted_pods(self) -> Optional[Mapping[str, str]]: @@ -437,7 +465,7 @@ def _translate_property(self, prop): @pulumi.output_type class PodSecurityPolicy(dict): """ - PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. + PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. """ def __init__(__self__, *, api_version: Optional[str] = None, @@ -445,7 +473,7 @@ def __init__(__self__, *, metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None, spec: Optional['outputs.PodSecurityPolicySpec'] = None): """ - PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. + PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. :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 :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 :param '_meta.v1.ObjectMetaArgs' metadata: Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata diff --git a/sdk/python/pulumi_kubernetes/storage/v1/_inputs.py b/sdk/python/pulumi_kubernetes/storage/v1/_inputs.py index 8e77abec24..3670d85328 100644 --- a/sdk/python/pulumi_kubernetes/storage/v1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/storage/v1/_inputs.py @@ -110,23 +110,31 @@ def __init__(__self__, *, """ CSIDriverSpec is the specification of a CSIDriver. :param pulumi.Input[bool] attach_required: attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + + This field is immutable. :param pulumi.Input[str] fs_group_policy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. - :param pulumi.Input[bool] pod_info_on_mount: If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + + This field is immutable. + :param pulumi.Input[bool] pod_info_on_mount: If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise "false" "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + + This field is immutable. :param pulumi.Input[bool] requires_republish: RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false. Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. :param pulumi.Input[bool] storage_capacity: If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information. The check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object. Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. - This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + This field is immutable. + + This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. :param pulumi.Input[Sequence[pulumi.Input['TokenRequestArgs']]] token_requests: TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: "csi.storage.k8s.io/serviceAccount.tokens": { "": { "token": , @@ -137,8 +145,10 @@ def __init__(__self__, *, Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. :param pulumi.Input[Sequence[pulumi.Input[str]]] volume_lifecycle_modes: volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. + + This field is immutable. """ if attach_required is not None: pulumi.set(__self__, "attach_required", attach_required) @@ -160,6 +170,8 @@ def __init__(__self__, *, def attach_required(self) -> Optional[pulumi.Input[bool]]: """ attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + + This field is immutable. """ return pulumi.get(self, "attach_required") @@ -172,6 +184,8 @@ def attach_required(self, value: Optional[pulumi.Input[bool]]): def fs_group_policy(self) -> Optional[pulumi.Input[str]]: """ Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + + This field is immutable. """ return pulumi.get(self, "fs_group_policy") @@ -183,10 +197,12 @@ def fs_group_policy(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="podInfoOnMount") def pod_info_on_mount(self) -> Optional[pulumi.Input[bool]]: """ - If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise "false" "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + + This field is immutable. """ return pulumi.get(self, "pod_info_on_mount") @@ -202,7 +218,7 @@ def requires_republish(self) -> Optional[pulumi.Input[bool]]: Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. """ return pulumi.get(self, "requires_republish") @@ -220,7 +236,9 @@ def storage_capacity(self) -> Optional[pulumi.Input[bool]]: Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. - This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + This field is immutable. + + This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. """ return pulumi.get(self, "storage_capacity") @@ -242,7 +260,7 @@ def token_requests(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TokenRe Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. """ return pulumi.get(self, "token_requests") @@ -255,6 +273,8 @@ def token_requests(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['Tok def volume_lifecycle_modes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. + + This field is immutable. """ return pulumi.get(self, "volume_lifecycle_modes") @@ -731,7 +751,7 @@ def __init__(__self__, *, persistent_volume_name: Optional[pulumi.Input[str]] = None): """ VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. - :param pulumi.Input['_core.v1.PersistentVolumeSpecArgs'] inline_volume_spec: inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + :param pulumi.Input['_core.v1.PersistentVolumeSpecArgs'] inline_volume_spec: inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. :param pulumi.Input[str] persistent_volume_name: Name of the persistent volume to attach. """ if inline_volume_spec is not None: @@ -743,7 +763,7 @@ def __init__(__self__, *, @pulumi.getter(name="inlineVolumeSpec") def inline_volume_spec(self) -> Optional[pulumi.Input['_core.v1.PersistentVolumeSpecArgs']]: """ - inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. """ return pulumi.get(self, "inline_volume_spec") diff --git a/sdk/python/pulumi_kubernetes/storage/v1/outputs.py b/sdk/python/pulumi_kubernetes/storage/v1/outputs.py index 7788881b32..2247fbeb45 100644 --- a/sdk/python/pulumi_kubernetes/storage/v1/outputs.py +++ b/sdk/python/pulumi_kubernetes/storage/v1/outputs.py @@ -104,23 +104,31 @@ def __init__(__self__, *, """ CSIDriverSpec is the specification of a CSIDriver. :param bool attach_required: attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + + This field is immutable. :param str fs_group_policy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. - :param bool pod_info_on_mount: If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + + This field is immutable. + :param bool pod_info_on_mount: If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise "false" "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + + This field is immutable. :param bool requires_republish: RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false. Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. :param bool storage_capacity: If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information. The check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object. Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. - This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + This field is immutable. + + This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. :param Sequence['TokenRequestArgs'] token_requests: TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: "csi.storage.k8s.io/serviceAccount.tokens": { "": { "token": , @@ -131,8 +139,10 @@ def __init__(__self__, *, Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. :param Sequence[str] volume_lifecycle_modes: volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. + + This field is immutable. """ if attach_required is not None: pulumi.set(__self__, "attach_required", attach_required) @@ -154,6 +164,8 @@ def __init__(__self__, *, def attach_required(self) -> Optional[bool]: """ attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + + This field is immutable. """ return pulumi.get(self, "attach_required") @@ -162,6 +174,8 @@ def attach_required(self) -> Optional[bool]: def fs_group_policy(self) -> Optional[str]: """ Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + + This field is immutable. """ return pulumi.get(self, "fs_group_policy") @@ -169,10 +183,12 @@ def fs_group_policy(self) -> Optional[str]: @pulumi.getter(name="podInfoOnMount") def pod_info_on_mount(self) -> Optional[bool]: """ - If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise "false" "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + + This field is immutable. """ return pulumi.get(self, "pod_info_on_mount") @@ -184,7 +200,7 @@ def requires_republish(self) -> Optional[bool]: Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. """ return pulumi.get(self, "requires_republish") @@ -198,7 +214,9 @@ def storage_capacity(self) -> Optional[bool]: Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. - This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + This field is immutable. + + This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. """ return pulumi.get(self, "storage_capacity") @@ -216,7 +234,7 @@ def token_requests(self) -> Optional[Sequence['outputs.TokenRequest']]: Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. """ return pulumi.get(self, "token_requests") @@ -225,6 +243,8 @@ def token_requests(self) -> Optional[Sequence['outputs.TokenRequest']]: def volume_lifecycle_modes(self) -> Optional[Sequence[str]]: """ volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. + + This field is immutable. """ return pulumi.get(self, "volume_lifecycle_modes") @@ -639,7 +659,7 @@ def __init__(__self__, *, persistent_volume_name: Optional[str] = None): """ VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. - :param '_core.v1.PersistentVolumeSpecArgs' inline_volume_spec: inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + :param '_core.v1.PersistentVolumeSpecArgs' inline_volume_spec: inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. :param str persistent_volume_name: Name of the persistent volume to attach. """ if inline_volume_spec is not None: @@ -651,7 +671,7 @@ def __init__(__self__, *, @pulumi.getter(name="inlineVolumeSpec") def inline_volume_spec(self) -> Optional['_core.v1.outputs.PersistentVolumeSpec']: """ - inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. """ return pulumi.get(self, "inline_volume_spec") diff --git a/sdk/python/pulumi_kubernetes/storage/v1alpha1/CSIStorageCapacity.py b/sdk/python/pulumi_kubernetes/storage/v1alpha1/CSIStorageCapacity.py new file mode 100644 index 0000000000..5dc432bfdc --- /dev/null +++ b/sdk/python/pulumi_kubernetes/storage/v1alpha1/CSIStorageCapacity.py @@ -0,0 +1,186 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from ... import meta as _meta + +__all__ = ['CSIStorageCapacity'] + + +class CSIStorageCapacity(pulumi.CustomResource): + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + api_version: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + maximum_volume_size: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']]] = None, + node_topology: Optional[pulumi.Input[pulumi.InputType['_meta.v1.LabelSelectorArgs']]] = None, + storage_class_name: Optional[pulumi.Input[str]] = None, + __props__=None, + __name__=None, + __opts__=None): + """ + CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + + For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + + The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + + The producer of these objects can decide which approach is more suitable. + + They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[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 + :param pulumi.Input[str] capacity: Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + :param pulumi.Input[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 + :param pulumi.Input[str] maximum_volume_size: MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + :param pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']] metadata: Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param pulumi.Input[pulumi.InputType['_meta.v1.LabelSelectorArgs']] node_topology: NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + :param pulumi.Input[str] storage_class_name: The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + """ + if __name__ is not None: + warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) + resource_name = __name__ + if __opts__ is not None: + warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) + opts = __opts__ + if opts is None: + opts = pulumi.ResourceOptions() + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.version is None: + opts.version = _utilities.get_version() + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = dict() + + __props__['api_version'] = 'storage.k8s.io/v1alpha1' + __props__['capacity'] = capacity + __props__['kind'] = 'CSIStorageCapacity' + __props__['maximum_volume_size'] = maximum_volume_size + __props__['metadata'] = metadata + __props__['node_topology'] = node_topology + if storage_class_name is None and not opts.urn: + raise TypeError("Missing required property 'storage_class_name'") + __props__['storage_class_name'] = storage_class_name + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) + super(CSIStorageCapacity, __self__).__init__( + 'kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'CSIStorageCapacity': + """ + Get an existing CSIStorageCapacity resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = dict() + + __props__["api_version"] = None + __props__["capacity"] = None + __props__["kind"] = None + __props__["maximum_volume_size"] = None + __props__["metadata"] = None + __props__["node_topology"] = None + __props__["storage_class_name"] = None + return CSIStorageCapacity(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def capacity(self) -> pulumi.Output[Optional[str]]: + """ + Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + """ + return pulumi.get(self, "capacity") + + @property + @pulumi.getter + def kind(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter(name="maximumVolumeSize") + def maximum_volume_size(self) -> pulumi.Output[Optional[str]]: + """ + MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + """ + return pulumi.get(self, "maximum_volume_size") + + @property + @pulumi.getter + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ObjectMeta']]: + """ + Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @property + @pulumi.getter(name="nodeTopology") + def node_topology(self) -> pulumi.Output[Optional['_meta.v1.outputs.LabelSelector']]: + """ + NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + """ + return pulumi.get(self, "node_topology") + + @property + @pulumi.getter(name="storageClassName") + def storage_class_name(self) -> pulumi.Output[str]: + """ + The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + """ + return pulumi.get(self, "storage_class_name") + + def translate_output_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + def translate_input_property(self, prop): + return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop + diff --git a/sdk/python/pulumi_kubernetes/storage/v1alpha1/CSIStorageCapacityList.py b/sdk/python/pulumi_kubernetes/storage/v1alpha1/CSIStorageCapacityList.py new file mode 100644 index 0000000000..9543371df2 --- /dev/null +++ b/sdk/python/pulumi_kubernetes/storage/v1alpha1/CSIStorageCapacityList.py @@ -0,0 +1,126 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from . import outputs +from ... import meta as _meta +from ._inputs import * + +__all__ = ['CSIStorageCapacityList'] + + +class CSIStorageCapacityList(pulumi.CustomResource): + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + api_version: Optional[pulumi.Input[str]] = None, + items: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CSIStorageCapacityArgs']]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']]] = None, + __props__=None, + __name__=None, + __opts__=None): + """ + CSIStorageCapacityList is a collection of CSIStorageCapacity objects. + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[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 + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CSIStorageCapacityArgs']]]] items: Items is the list of CSIStorageCapacity objects. + :param pulumi.Input[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 + :param pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']] metadata: Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + if __name__ is not None: + warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) + resource_name = __name__ + if __opts__ is not None: + warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) + opts = __opts__ + if opts is None: + opts = pulumi.ResourceOptions() + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.version is None: + opts.version = _utilities.get_version() + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = dict() + + __props__['api_version'] = 'storage.k8s.io/v1alpha1' + if items is None and not opts.urn: + raise TypeError("Missing required property 'items'") + __props__['items'] = items + __props__['kind'] = 'CSIStorageCapacityList' + __props__['metadata'] = metadata + super(CSIStorageCapacityList, __self__).__init__( + 'kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'CSIStorageCapacityList': + """ + Get an existing CSIStorageCapacityList resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = dict() + + __props__["api_version"] = None + __props__["items"] = None + __props__["kind"] = None + __props__["metadata"] = None + return CSIStorageCapacityList(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def items(self) -> pulumi.Output[Sequence['outputs.CSIStorageCapacity']]: + """ + Items is the list of CSIStorageCapacity objects. + """ + return pulumi.get(self, "items") + + @property + @pulumi.getter + def kind(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ListMeta']]: + """ + Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + def translate_output_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + def translate_input_property(self, prop): + return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop + diff --git a/sdk/python/pulumi_kubernetes/storage/v1alpha1/__init__.py b/sdk/python/pulumi_kubernetes/storage/v1alpha1/__init__.py index aeb98a3e53..c6936106dd 100644 --- a/sdk/python/pulumi_kubernetes/storage/v1alpha1/__init__.py +++ b/sdk/python/pulumi_kubernetes/storage/v1alpha1/__init__.py @@ -3,6 +3,8 @@ # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: +from .CSIStorageCapacity import * +from .CSIStorageCapacityList import * from .VolumeAttachment import * from .VolumeAttachmentList import * from ._inputs import * @@ -20,7 +22,11 @@ def version(self): return Module._version def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource: - if typ == "kubernetes:storage.k8s.io/v1alpha1:VolumeAttachment": + if typ == "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity": + return CSIStorageCapacity(name, pulumi.ResourceOptions(urn=urn)) + elif typ == "kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacityList": + return CSIStorageCapacityList(name, pulumi.ResourceOptions(urn=urn)) + elif typ == "kubernetes:storage.k8s.io/v1alpha1:VolumeAttachment": return VolumeAttachment(name, pulumi.ResourceOptions(urn=urn)) elif typ == "kubernetes:storage.k8s.io/v1alpha1:VolumeAttachmentList": return VolumeAttachmentList(name, pulumi.ResourceOptions(urn=urn)) diff --git a/sdk/python/pulumi_kubernetes/storage/v1alpha1/_inputs.py b/sdk/python/pulumi_kubernetes/storage/v1alpha1/_inputs.py index 2a3762cdcc..d5e92200a8 100644 --- a/sdk/python/pulumi_kubernetes/storage/v1alpha1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/storage/v1alpha1/_inputs.py @@ -11,6 +11,7 @@ from ... import meta as _meta __all__ = [ + 'CSIStorageCapacityArgs', 'VolumeAttachmentArgs', 'VolumeAttachmentSourceArgs', 'VolumeAttachmentSpecArgs', @@ -18,6 +19,149 @@ 'VolumeErrorArgs', ] +@pulumi.input_type +class CSIStorageCapacityArgs: + def __init__(__self__, *, + storage_class_name: pulumi.Input[str], + api_version: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + maximum_volume_size: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']] = None, + node_topology: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']] = None): + """ + CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + + For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + + The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + + The producer of these objects can decide which approach is more suitable. + + They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + :param pulumi.Input[str] storage_class_name: The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + :param pulumi.Input[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 + :param pulumi.Input[str] capacity: Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + :param pulumi.Input[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 + :param pulumi.Input[str] maximum_volume_size: MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param pulumi.Input['_meta.v1.LabelSelectorArgs'] node_topology: NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + """ + pulumi.set(__self__, "storage_class_name", storage_class_name) + if api_version is not None: + pulumi.set(__self__, "api_version", 'storage.k8s.io/v1alpha1') + if capacity is not None: + pulumi.set(__self__, "capacity", capacity) + if kind is not None: + pulumi.set(__self__, "kind", 'CSIStorageCapacity') + if maximum_volume_size is not None: + pulumi.set(__self__, "maximum_volume_size", maximum_volume_size) + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if node_topology is not None: + pulumi.set(__self__, "node_topology", node_topology) + + @property + @pulumi.getter(name="storageClassName") + def storage_class_name(self) -> pulumi.Input[str]: + """ + The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + """ + return pulumi.get(self, "storage_class_name") + + @storage_class_name.setter + def storage_class_name(self, value: pulumi.Input[str]): + pulumi.set(self, "storage_class_name", value) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> Optional[pulumi.Input[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @api_version.setter + def api_version(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "api_version", value) + + @property + @pulumi.getter + def capacity(self) -> Optional[pulumi.Input[str]]: + """ + Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + """ + return pulumi.get(self, "capacity") + + @capacity.setter + def capacity(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "capacity", value) + + @property + @pulumi.getter + def kind(self) -> Optional[pulumi.Input[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @kind.setter + def kind(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "kind", value) + + @property + @pulumi.getter(name="maximumVolumeSize") + def maximum_volume_size(self) -> Optional[pulumi.Input[str]]: + """ + MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + """ + return pulumi.get(self, "maximum_volume_size") + + @maximum_volume_size.setter + def maximum_volume_size(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "maximum_volume_size", value) + + @property + @pulumi.getter + def metadata(self) -> Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]: + """ + Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @metadata.setter + def metadata(self, value: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]): + pulumi.set(self, "metadata", value) + + @property + @pulumi.getter(name="nodeTopology") + def node_topology(self) -> Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]: + """ + NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + """ + return pulumi.get(self, "node_topology") + + @node_topology.setter + def node_topology(self, value: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]): + pulumi.set(self, "node_topology", value) + + @pulumi.input_type class VolumeAttachmentArgs: def __init__(__self__, *, diff --git a/sdk/python/pulumi_kubernetes/storage/v1alpha1/outputs.py b/sdk/python/pulumi_kubernetes/storage/v1alpha1/outputs.py index 4fa410b2b0..c4eaa77242 100644 --- a/sdk/python/pulumi_kubernetes/storage/v1alpha1/outputs.py +++ b/sdk/python/pulumi_kubernetes/storage/v1alpha1/outputs.py @@ -12,6 +12,7 @@ from ... import meta as _meta __all__ = [ + 'CSIStorageCapacity', 'VolumeAttachment', 'VolumeAttachmentSource', 'VolumeAttachmentSpec', @@ -19,6 +20,135 @@ 'VolumeError', ] +@pulumi.output_type +class CSIStorageCapacity(dict): + """ + CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + + For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + + The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + + The producer of these objects can decide which approach is more suitable. + + They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + """ + def __init__(__self__, *, + storage_class_name: str, + api_version: Optional[str] = None, + capacity: Optional[str] = None, + kind: Optional[str] = None, + maximum_volume_size: Optional[str] = None, + metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None, + node_topology: Optional['_meta.v1.outputs.LabelSelector'] = None): + """ + CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + + For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + + The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + + The producer of these objects can decide which approach is more suitable. + + They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + :param str storage_class_name: The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + :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 + :param str capacity: Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + :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 + :param str maximum_volume_size: MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + :param '_meta.v1.ObjectMetaArgs' metadata: Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param '_meta.v1.LabelSelectorArgs' node_topology: NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + """ + pulumi.set(__self__, "storage_class_name", storage_class_name) + if api_version is not None: + pulumi.set(__self__, "api_version", 'storage.k8s.io/v1alpha1') + if capacity is not None: + pulumi.set(__self__, "capacity", capacity) + if kind is not None: + pulumi.set(__self__, "kind", 'CSIStorageCapacity') + if maximum_volume_size is not None: + pulumi.set(__self__, "maximum_volume_size", maximum_volume_size) + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if node_topology is not None: + pulumi.set(__self__, "node_topology", node_topology) + + @property + @pulumi.getter(name="storageClassName") + def storage_class_name(self) -> str: + """ + The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + """ + return pulumi.get(self, "storage_class_name") + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> Optional[str]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def capacity(self) -> Optional[str]: + """ + Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + """ + return pulumi.get(self, "capacity") + + @property + @pulumi.getter + def kind(self) -> Optional[str]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter(name="maximumVolumeSize") + def maximum_volume_size(self) -> Optional[str]: + """ + MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + """ + return pulumi.get(self, "maximum_volume_size") + + @property + @pulumi.getter + def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']: + """ + Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @property + @pulumi.getter(name="nodeTopology") + def node_topology(self) -> Optional['_meta.v1.outputs.LabelSelector']: + """ + NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + """ + return pulumi.get(self, "node_topology") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + @pulumi.output_type class VolumeAttachment(dict): """ diff --git a/sdk/python/pulumi_kubernetes/storage/v1beta1/CSIStorageCapacity.py b/sdk/python/pulumi_kubernetes/storage/v1beta1/CSIStorageCapacity.py new file mode 100644 index 0000000000..adc013d2c0 --- /dev/null +++ b/sdk/python/pulumi_kubernetes/storage/v1beta1/CSIStorageCapacity.py @@ -0,0 +1,186 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from ... import meta as _meta + +__all__ = ['CSIStorageCapacity'] + + +class CSIStorageCapacity(pulumi.CustomResource): + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + api_version: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + maximum_volume_size: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']]] = None, + node_topology: Optional[pulumi.Input[pulumi.InputType['_meta.v1.LabelSelectorArgs']]] = None, + storage_class_name: Optional[pulumi.Input[str]] = None, + __props__=None, + __name__=None, + __opts__=None): + """ + CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + + For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + + The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + + The producer of these objects can decide which approach is more suitable. + + They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[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 + :param pulumi.Input[str] capacity: Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + :param pulumi.Input[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 + :param pulumi.Input[str] maximum_volume_size: MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + :param pulumi.Input[pulumi.InputType['_meta.v1.ObjectMetaArgs']] metadata: Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param pulumi.Input[pulumi.InputType['_meta.v1.LabelSelectorArgs']] node_topology: NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + :param pulumi.Input[str] storage_class_name: The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + """ + if __name__ is not None: + warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) + resource_name = __name__ + if __opts__ is not None: + warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) + opts = __opts__ + if opts is None: + opts = pulumi.ResourceOptions() + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.version is None: + opts.version = _utilities.get_version() + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = dict() + + __props__['api_version'] = 'storage.k8s.io/v1beta1' + __props__['capacity'] = capacity + __props__['kind'] = 'CSIStorageCapacity' + __props__['maximum_volume_size'] = maximum_volume_size + __props__['metadata'] = metadata + __props__['node_topology'] = node_topology + if storage_class_name is None and not opts.urn: + raise TypeError("Missing required property 'storage_class_name'") + __props__['storage_class_name'] = storage_class_name + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:storage.k8s.io/v1alpha1:CSIStorageCapacity")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) + super(CSIStorageCapacity, __self__).__init__( + 'kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'CSIStorageCapacity': + """ + Get an existing CSIStorageCapacity resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = dict() + + __props__["api_version"] = None + __props__["capacity"] = None + __props__["kind"] = None + __props__["maximum_volume_size"] = None + __props__["metadata"] = None + __props__["node_topology"] = None + __props__["storage_class_name"] = None + return CSIStorageCapacity(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def capacity(self) -> pulumi.Output[Optional[str]]: + """ + Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + """ + return pulumi.get(self, "capacity") + + @property + @pulumi.getter + def kind(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter(name="maximumVolumeSize") + def maximum_volume_size(self) -> pulumi.Output[Optional[str]]: + """ + MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + """ + return pulumi.get(self, "maximum_volume_size") + + @property + @pulumi.getter + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ObjectMeta']]: + """ + Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @property + @pulumi.getter(name="nodeTopology") + def node_topology(self) -> pulumi.Output[Optional['_meta.v1.outputs.LabelSelector']]: + """ + NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + """ + return pulumi.get(self, "node_topology") + + @property + @pulumi.getter(name="storageClassName") + def storage_class_name(self) -> pulumi.Output[str]: + """ + The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + """ + return pulumi.get(self, "storage_class_name") + + def translate_output_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + def translate_input_property(self, prop): + return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop + diff --git a/sdk/python/pulumi_kubernetes/storage/v1beta1/CSIStorageCapacityList.py b/sdk/python/pulumi_kubernetes/storage/v1beta1/CSIStorageCapacityList.py new file mode 100644 index 0000000000..6de51af6ef --- /dev/null +++ b/sdk/python/pulumi_kubernetes/storage/v1beta1/CSIStorageCapacityList.py @@ -0,0 +1,126 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumigen. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union +from ... import _utilities, _tables +from . import outputs +from ... import meta as _meta +from ._inputs import * + +__all__ = ['CSIStorageCapacityList'] + + +class CSIStorageCapacityList(pulumi.CustomResource): + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + api_version: Optional[pulumi.Input[str]] = None, + items: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CSIStorageCapacityArgs']]]]] = None, + kind: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']]] = None, + __props__=None, + __name__=None, + __opts__=None): + """ + CSIStorageCapacityList is a collection of CSIStorageCapacity objects. + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[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 + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CSIStorageCapacityArgs']]]] items: Items is the list of CSIStorageCapacity objects. + :param pulumi.Input[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 + :param pulumi.Input[pulumi.InputType['_meta.v1.ListMetaArgs']] metadata: Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + if __name__ is not None: + warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) + resource_name = __name__ + if __opts__ is not None: + warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) + opts = __opts__ + if opts is None: + opts = pulumi.ResourceOptions() + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.version is None: + opts.version = _utilities.get_version() + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = dict() + + __props__['api_version'] = 'storage.k8s.io/v1beta1' + if items is None and not opts.urn: + raise TypeError("Missing required property 'items'") + __props__['items'] = items + __props__['kind'] = 'CSIStorageCapacityList' + __props__['metadata'] = metadata + super(CSIStorageCapacityList, __self__).__init__( + 'kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'CSIStorageCapacityList': + """ + Get an existing CSIStorageCapacityList resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = dict() + + __props__["api_version"] = None + __props__["items"] = None + __props__["kind"] = None + __props__["metadata"] = None + return CSIStorageCapacityList(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def items(self) -> pulumi.Output[Sequence['outputs.CSIStorageCapacity']]: + """ + Items is the list of CSIStorageCapacity objects. + """ + return pulumi.get(self, "items") + + @property + @pulumi.getter + def kind(self) -> pulumi.Output[Optional[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter + def metadata(self) -> pulumi.Output[Optional['_meta.v1.outputs.ListMeta']]: + """ + Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + def translate_output_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + def translate_input_property(self, prop): + return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop + diff --git a/sdk/python/pulumi_kubernetes/storage/v1beta1/__init__.py b/sdk/python/pulumi_kubernetes/storage/v1beta1/__init__.py index 7f82137c03..7deb780227 100644 --- a/sdk/python/pulumi_kubernetes/storage/v1beta1/__init__.py +++ b/sdk/python/pulumi_kubernetes/storage/v1beta1/__init__.py @@ -7,6 +7,8 @@ from .CSIDriverList import * from .CSINode import * from .CSINodeList import * +from .CSIStorageCapacity import * +from .CSIStorageCapacityList import * from .StorageClass import * from .StorageClassList import * from .VolumeAttachment import * @@ -34,6 +36,10 @@ def construct(self, name: str, typ: str, urn: str) -> pulumi.Resource: return CSINode(name, pulumi.ResourceOptions(urn=urn)) elif typ == "kubernetes:storage.k8s.io/v1beta1:CSINodeList": return CSINodeList(name, pulumi.ResourceOptions(urn=urn)) + elif typ == "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacity": + return CSIStorageCapacity(name, pulumi.ResourceOptions(urn=urn)) + elif typ == "kubernetes:storage.k8s.io/v1beta1:CSIStorageCapacityList": + return CSIStorageCapacityList(name, pulumi.ResourceOptions(urn=urn)) elif typ == "kubernetes:storage.k8s.io/v1beta1:StorageClass": return StorageClass(name, pulumi.ResourceOptions(urn=urn)) elif typ == "kubernetes:storage.k8s.io/v1beta1:StorageClassList": diff --git a/sdk/python/pulumi_kubernetes/storage/v1beta1/_inputs.py b/sdk/python/pulumi_kubernetes/storage/v1beta1/_inputs.py index 074a9eb167..1cc71b400a 100644 --- a/sdk/python/pulumi_kubernetes/storage/v1beta1/_inputs.py +++ b/sdk/python/pulumi_kubernetes/storage/v1beta1/_inputs.py @@ -16,6 +16,7 @@ 'CSINodeArgs', 'CSINodeDriverArgs', 'CSINodeSpecArgs', + 'CSIStorageCapacityArgs', 'StorageClassArgs', 'TokenRequestArgs', 'VolumeAttachmentArgs', @@ -110,23 +111,31 @@ def __init__(__self__, *, """ CSIDriverSpec is the specification of a CSIDriver. :param pulumi.Input[bool] attach_required: attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + + This field is immutable. :param pulumi.Input[str] fs_group_policy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. - :param pulumi.Input[bool] pod_info_on_mount: If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + + This field is immutable. + :param pulumi.Input[bool] pod_info_on_mount: If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise "false" "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + + This field is immutable. :param pulumi.Input[bool] requires_republish: RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false. Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. :param pulumi.Input[bool] storage_capacity: If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information. The check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object. Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. - This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + This field is immutable. + + This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. :param pulumi.Input[Sequence[pulumi.Input['TokenRequestArgs']]] token_requests: TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: "csi.storage.k8s.io/serviceAccount.tokens": { "": { "token": , @@ -137,8 +146,10 @@ def __init__(__self__, *, Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. :param pulumi.Input[Sequence[pulumi.Input[str]]] volume_lifecycle_modes: VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. + + This field is immutable. """ if attach_required is not None: pulumi.set(__self__, "attach_required", attach_required) @@ -160,6 +171,8 @@ def __init__(__self__, *, def attach_required(self) -> Optional[pulumi.Input[bool]]: """ attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + + This field is immutable. """ return pulumi.get(self, "attach_required") @@ -172,6 +185,8 @@ def attach_required(self, value: Optional[pulumi.Input[bool]]): def fs_group_policy(self) -> Optional[pulumi.Input[str]]: """ Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + + This field is immutable. """ return pulumi.get(self, "fs_group_policy") @@ -183,10 +198,12 @@ def fs_group_policy(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="podInfoOnMount") def pod_info_on_mount(self) -> Optional[pulumi.Input[bool]]: """ - If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise "false" "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + + This field is immutable. """ return pulumi.get(self, "pod_info_on_mount") @@ -202,7 +219,7 @@ def requires_republish(self) -> Optional[pulumi.Input[bool]]: Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. """ return pulumi.get(self, "requires_republish") @@ -220,7 +237,9 @@ def storage_capacity(self) -> Optional[pulumi.Input[bool]]: Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. - This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + This field is immutable. + + This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. """ return pulumi.get(self, "storage_capacity") @@ -242,7 +261,7 @@ def token_requests(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TokenRe Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. """ return pulumi.get(self, "token_requests") @@ -255,6 +274,8 @@ def token_requests(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['Tok def volume_lifecycle_modes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. + + This field is immutable. """ return pulumi.get(self, "volume_lifecycle_modes") @@ -427,6 +448,149 @@ def drivers(self, value: pulumi.Input[Sequence[pulumi.Input['CSINodeDriverArgs'] pulumi.set(self, "drivers", value) +@pulumi.input_type +class CSIStorageCapacityArgs: + def __init__(__self__, *, + storage_class_name: pulumi.Input[str], + api_version: Optional[pulumi.Input[str]] = None, + capacity: Optional[pulumi.Input[str]] = None, + kind: Optional[pulumi.Input[str]] = None, + maximum_volume_size: Optional[pulumi.Input[str]] = None, + metadata: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']] = None, + node_topology: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']] = None): + """ + CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + + For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + + The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + + The producer of these objects can decide which approach is more suitable. + + They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + :param pulumi.Input[str] storage_class_name: The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + :param pulumi.Input[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 + :param pulumi.Input[str] capacity: Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + :param pulumi.Input[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 + :param pulumi.Input[str] maximum_volume_size: MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param pulumi.Input['_meta.v1.LabelSelectorArgs'] node_topology: NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + """ + pulumi.set(__self__, "storage_class_name", storage_class_name) + if api_version is not None: + pulumi.set(__self__, "api_version", 'storage.k8s.io/v1beta1') + if capacity is not None: + pulumi.set(__self__, "capacity", capacity) + if kind is not None: + pulumi.set(__self__, "kind", 'CSIStorageCapacity') + if maximum_volume_size is not None: + pulumi.set(__self__, "maximum_volume_size", maximum_volume_size) + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if node_topology is not None: + pulumi.set(__self__, "node_topology", node_topology) + + @property + @pulumi.getter(name="storageClassName") + def storage_class_name(self) -> pulumi.Input[str]: + """ + The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + """ + return pulumi.get(self, "storage_class_name") + + @storage_class_name.setter + def storage_class_name(self, value: pulumi.Input[str]): + pulumi.set(self, "storage_class_name", value) + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> Optional[pulumi.Input[str]]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @api_version.setter + def api_version(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "api_version", value) + + @property + @pulumi.getter + def capacity(self) -> Optional[pulumi.Input[str]]: + """ + Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + """ + return pulumi.get(self, "capacity") + + @capacity.setter + def capacity(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "capacity", value) + + @property + @pulumi.getter + def kind(self) -> Optional[pulumi.Input[str]]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @kind.setter + def kind(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "kind", value) + + @property + @pulumi.getter(name="maximumVolumeSize") + def maximum_volume_size(self) -> Optional[pulumi.Input[str]]: + """ + MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + """ + return pulumi.get(self, "maximum_volume_size") + + @maximum_volume_size.setter + def maximum_volume_size(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "maximum_volume_size", value) + + @property + @pulumi.getter + def metadata(self) -> Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]: + """ + Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @metadata.setter + def metadata(self, value: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]): + pulumi.set(self, "metadata", value) + + @property + @pulumi.getter(name="nodeTopology") + def node_topology(self) -> Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]: + """ + NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + """ + return pulumi.get(self, "node_topology") + + @node_topology.setter + def node_topology(self, value: Optional[pulumi.Input['_meta.v1.LabelSelectorArgs']]): + pulumi.set(self, "node_topology", value) + + @pulumi.input_type class StorageClassArgs: def __init__(__self__, *, @@ -731,7 +895,7 @@ def __init__(__self__, *, persistent_volume_name: Optional[pulumi.Input[str]] = None): """ VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. - :param pulumi.Input['_core.v1.PersistentVolumeSpecArgs'] inline_volume_spec: inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + :param pulumi.Input['_core.v1.PersistentVolumeSpecArgs'] inline_volume_spec: inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. :param pulumi.Input[str] persistent_volume_name: Name of the persistent volume to attach. """ if inline_volume_spec is not None: @@ -743,7 +907,7 @@ def __init__(__self__, *, @pulumi.getter(name="inlineVolumeSpec") def inline_volume_spec(self) -> Optional[pulumi.Input['_core.v1.PersistentVolumeSpecArgs']]: """ - inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. """ return pulumi.get(self, "inline_volume_spec") diff --git a/sdk/python/pulumi_kubernetes/storage/v1beta1/outputs.py b/sdk/python/pulumi_kubernetes/storage/v1beta1/outputs.py index 7ad1d15943..445c1c9628 100644 --- a/sdk/python/pulumi_kubernetes/storage/v1beta1/outputs.py +++ b/sdk/python/pulumi_kubernetes/storage/v1beta1/outputs.py @@ -17,6 +17,7 @@ 'CSINode', 'CSINodeDriver', 'CSINodeSpec', + 'CSIStorageCapacity', 'StorageClass', 'TokenRequest', 'VolumeAttachment', @@ -104,23 +105,31 @@ def __init__(__self__, *, """ CSIDriverSpec is the specification of a CSIDriver. :param bool attach_required: attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + + This field is immutable. :param str fs_group_policy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. - :param bool pod_info_on_mount: If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + + This field is immutable. + :param bool pod_info_on_mount: If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise "false" "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + + This field is immutable. :param bool requires_republish: RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false. Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. :param bool storage_capacity: If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information. The check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object. Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. - This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + This field is immutable. + + This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. :param Sequence['TokenRequestArgs'] token_requests: TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: "csi.storage.k8s.io/serviceAccount.tokens": { "": { "token": , @@ -131,8 +140,10 @@ def __init__(__self__, *, Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. :param Sequence[str] volume_lifecycle_modes: VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. + + This field is immutable. """ if attach_required is not None: pulumi.set(__self__, "attach_required", attach_required) @@ -154,6 +165,8 @@ def __init__(__self__, *, def attach_required(self) -> Optional[bool]: """ attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + + This field is immutable. """ return pulumi.get(self, "attach_required") @@ -162,6 +175,8 @@ def attach_required(self) -> Optional[bool]: def fs_group_policy(self) -> Optional[str]: """ Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + + This field is immutable. """ return pulumi.get(self, "fs_group_policy") @@ -169,10 +184,12 @@ def fs_group_policy(self) -> Optional[str]: @pulumi.getter(name="podInfoOnMount") def pod_info_on_mount(self) -> Optional[bool]: """ - If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise "false" "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + + This field is immutable. """ return pulumi.get(self, "pod_info_on_mount") @@ -184,7 +201,7 @@ def requires_republish(self) -> Optional[bool]: Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. """ return pulumi.get(self, "requires_republish") @@ -198,7 +215,9 @@ def storage_capacity(self) -> Optional[bool]: Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. - This is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false. + This field is immutable. + + This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. """ return pulumi.get(self, "storage_capacity") @@ -216,7 +235,7 @@ def token_requests(self) -> Optional[Sequence['outputs.TokenRequest']]: Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. - This is an alpha feature and only available when the CSIServiceAccountToken feature is enabled. + This is a beta feature and only available when the CSIServiceAccountToken feature is enabled. """ return pulumi.get(self, "token_requests") @@ -225,6 +244,8 @@ def token_requests(self) -> Optional[Sequence['outputs.TokenRequest']]: def volume_lifecycle_modes(self) -> Optional[Sequence[str]]: """ VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. + + This field is immutable. """ return pulumi.get(self, "volume_lifecycle_modes") @@ -378,6 +399,135 @@ def _translate_property(self, prop): return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop +@pulumi.output_type +class CSIStorageCapacity(dict): + """ + CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + + For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + + The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + + The producer of these objects can decide which approach is more suitable. + + They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + """ + def __init__(__self__, *, + storage_class_name: str, + api_version: Optional[str] = None, + capacity: Optional[str] = None, + kind: Optional[str] = None, + maximum_volume_size: Optional[str] = None, + metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None, + node_topology: Optional['_meta.v1.outputs.LabelSelector'] = None): + """ + CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. + + For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" + + The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero + + The producer of these objects can decide which approach is more suitable. + + They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. + :param str storage_class_name: The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + :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 + :param str capacity: Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + :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 + :param str maximum_volume_size: MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + :param '_meta.v1.ObjectMetaArgs' metadata: Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + :param '_meta.v1.LabelSelectorArgs' node_topology: NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + """ + pulumi.set(__self__, "storage_class_name", storage_class_name) + if api_version is not None: + pulumi.set(__self__, "api_version", 'storage.k8s.io/v1beta1') + if capacity is not None: + pulumi.set(__self__, "capacity", capacity) + if kind is not None: + pulumi.set(__self__, "kind", 'CSIStorageCapacity') + if maximum_volume_size is not None: + pulumi.set(__self__, "maximum_volume_size", maximum_volume_size) + if metadata is not None: + pulumi.set(__self__, "metadata", metadata) + if node_topology is not None: + pulumi.set(__self__, "node_topology", node_topology) + + @property + @pulumi.getter(name="storageClassName") + def storage_class_name(self) -> str: + """ + The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + """ + return pulumi.get(self, "storage_class_name") + + @property + @pulumi.getter(name="apiVersion") + def api_version(self) -> Optional[str]: + """ + 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 + """ + return pulumi.get(self, "api_version") + + @property + @pulumi.getter + def capacity(self) -> Optional[str]: + """ + Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + """ + return pulumi.get(self, "capacity") + + @property + @pulumi.getter + def kind(self) -> Optional[str]: + """ + 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 + """ + return pulumi.get(self, "kind") + + @property + @pulumi.getter(name="maximumVolumeSize") + def maximum_volume_size(self) -> Optional[str]: + """ + MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + + This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + """ + return pulumi.get(self, "maximum_volume_size") + + @property + @pulumi.getter + def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']: + """ + Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + + Objects are namespaced. + + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + """ + return pulumi.get(self, "metadata") + + @property + @pulumi.getter(name="nodeTopology") + def node_topology(self) -> Optional['_meta.v1.outputs.LabelSelector']: + """ + NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + """ + return pulumi.get(self, "node_topology") + + def _translate_property(self, prop): + return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop + + @pulumi.output_type class StorageClass(dict): """ @@ -639,7 +789,7 @@ def __init__(__self__, *, persistent_volume_name: Optional[str] = None): """ VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. - :param '_core.v1.PersistentVolumeSpecArgs' inline_volume_spec: inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + :param '_core.v1.PersistentVolumeSpecArgs' inline_volume_spec: inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. :param str persistent_volume_name: Name of the persistent volume to attach. """ if inline_volume_spec is not None: @@ -651,7 +801,7 @@ def __init__(__self__, *, @pulumi.getter(name="inlineVolumeSpec") def inline_volume_spec(self) -> Optional['_core.v1.outputs.PersistentVolumeSpec']: """ - inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. """ return pulumi.get(self, "inline_volume_spec") diff --git a/sdk/python/pulumi_kubernetes/yaml.py b/sdk/python/pulumi_kubernetes/yaml.py index 9ac2b61071..2eb40a6ff2 100644 --- a/sdk/python/pulumi_kubernetes/yaml.py +++ b/sdk/python/pulumi_kubernetes/yaml.py @@ -829,6 +829,18 @@ def _parse_yaml_object( return [identifier.apply( lambda x: (f"autoscaling/v2beta2/HorizontalPodAutoscalerList:{x}", HorizontalPodAutoscalerList(f"{x}", opts, **obj)))] + if gvk == "batch/v1/CronJob": + # Import locally to avoid name collisions. + from pulumi_kubernetes.batch.v1 import CronJob + return [identifier.apply( + lambda x: (f"batch/v1/CronJob:{x}", + CronJob(f"{x}", opts, **obj)))] + if gvk == "batch/v1/CronJobList": + # Import locally to avoid name collisions. + from pulumi_kubernetes.batch.v1 import CronJobList + return [identifier.apply( + lambda x: (f"batch/v1/CronJobList:{x}", + CronJobList(f"{x}", opts, **obj)))] if gvk == "batch/v1/Job": # Import locally to avoid name collisions. from pulumi_kubernetes.batch.v1 import Job @@ -943,6 +955,12 @@ def _parse_yaml_object( return [identifier.apply( lambda x: (f"v1/EndpointsList:{x}", EndpointsList(f"{x}", opts, **obj)))] + if gvk == "v1/EphemeralContainers": + # Import locally to avoid name collisions. + from pulumi_kubernetes.core.v1 import EphemeralContainers + return [identifier.apply( + lambda x: (f"v1/EphemeralContainers:{x}", + EphemeralContainers(f"{x}", opts, **obj)))] if gvk == "v1/Event": # Import locally to avoid name collisions. from pulumi_kubernetes.core.v1 import Event @@ -1099,6 +1117,18 @@ def _parse_yaml_object( return [identifier.apply( lambda x: (f"v1/ServiceList:{x}", ServiceList(f"{x}", opts, **obj)))] + if gvk == "discovery.k8s.io/v1/EndpointSlice": + # Import locally to avoid name collisions. + from pulumi_kubernetes.discovery.v1 import EndpointSlice + return [identifier.apply( + lambda x: (f"discovery.k8s.io/v1/EndpointSlice:{x}", + EndpointSlice(f"{x}", opts, **obj)))] + if gvk == "discovery.k8s.io/v1/EndpointSliceList": + # Import locally to avoid name collisions. + from pulumi_kubernetes.discovery.v1 import EndpointSliceList + return [identifier.apply( + lambda x: (f"discovery.k8s.io/v1/EndpointSliceList:{x}", + EndpointSliceList(f"{x}", opts, **obj)))] if gvk == "discovery.k8s.io/v1beta1/EndpointSlice": # Import locally to avoid name collisions. from pulumi_kubernetes.discovery.v1beta1 import EndpointSlice @@ -1357,6 +1387,18 @@ def _parse_yaml_object( return [identifier.apply( lambda x: (f"node.k8s.io/v1beta1/RuntimeClassList:{x}", RuntimeClassList(f"{x}", opts, **obj)))] + if gvk == "policy/v1/PodDisruptionBudget": + # Import locally to avoid name collisions. + from pulumi_kubernetes.policy.v1 import PodDisruptionBudget + return [identifier.apply( + lambda x: (f"policy/v1/PodDisruptionBudget:{x}", + PodDisruptionBudget(f"{x}", opts, **obj)))] + if gvk == "policy/v1/PodDisruptionBudgetList": + # Import locally to avoid name collisions. + from pulumi_kubernetes.policy.v1 import PodDisruptionBudgetList + return [identifier.apply( + lambda x: (f"policy/v1/PodDisruptionBudgetList:{x}", + PodDisruptionBudgetList(f"{x}", opts, **obj)))] if gvk == "policy/v1beta1/PodDisruptionBudget": # Import locally to avoid name collisions. from pulumi_kubernetes.policy.v1beta1 import PodDisruptionBudget @@ -1621,6 +1663,18 @@ def _parse_yaml_object( return [identifier.apply( lambda x: (f"storage.k8s.io/v1/VolumeAttachmentList:{x}", VolumeAttachmentList(f"{x}", opts, **obj)))] + if gvk == "storage.k8s.io/v1alpha1/CSIStorageCapacity": + # Import locally to avoid name collisions. + from pulumi_kubernetes.storage.v1alpha1 import CSIStorageCapacity + return [identifier.apply( + lambda x: (f"storage.k8s.io/v1alpha1/CSIStorageCapacity:{x}", + CSIStorageCapacity(f"{x}", opts, **obj)))] + if gvk == "storage.k8s.io/v1alpha1/CSIStorageCapacityList": + # Import locally to avoid name collisions. + from pulumi_kubernetes.storage.v1alpha1 import CSIStorageCapacityList + return [identifier.apply( + lambda x: (f"storage.k8s.io/v1alpha1/CSIStorageCapacityList:{x}", + CSIStorageCapacityList(f"{x}", opts, **obj)))] if gvk == "storage.k8s.io/v1alpha1/VolumeAttachment": # Import locally to avoid name collisions. from pulumi_kubernetes.storage.v1alpha1 import VolumeAttachment @@ -1657,6 +1711,18 @@ def _parse_yaml_object( return [identifier.apply( lambda x: (f"storage.k8s.io/v1beta1/CSINodeList:{x}", CSINodeList(f"{x}", opts, **obj)))] + if gvk == "storage.k8s.io/v1beta1/CSIStorageCapacity": + # Import locally to avoid name collisions. + from pulumi_kubernetes.storage.v1beta1 import CSIStorageCapacity + return [identifier.apply( + lambda x: (f"storage.k8s.io/v1beta1/CSIStorageCapacity:{x}", + CSIStorageCapacity(f"{x}", opts, **obj)))] + if gvk == "storage.k8s.io/v1beta1/CSIStorageCapacityList": + # Import locally to avoid name collisions. + from pulumi_kubernetes.storage.v1beta1 import CSIStorageCapacityList + return [identifier.apply( + lambda x: (f"storage.k8s.io/v1beta1/CSIStorageCapacityList:{x}", + CSIStorageCapacityList(f"{x}", opts, **obj)))] if gvk == "storage.k8s.io/v1beta1/StorageClass": # Import locally to avoid name collisions. from pulumi_kubernetes.storage.v1beta1 import StorageClass